package com.trifectalabs.roadquality.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import com.trifectalabs.roadquality.v0.enums.PathType import com.trifectalabs.roadquality.v0.enums.SurfaceType import java.io.Serializable import java.util.UUID import kotlin.Int import kotlin.String import org.threeten.bp.Instant /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * A rating that is supplied with the segment */ @JsonIgnoreProperties(ignoreUnknown=true) data class SegmentRating( @JsonProperty("id") @get:JsonProperty("id") val id: UUID, @JsonProperty("segmentId") @get:JsonProperty("segmentId") val segmentId: UUID, @JsonProperty("userId") @get:JsonProperty("userId") val userId: UUID, @JsonProperty("trafficRating") @get:JsonProperty("trafficRating") val trafficRating: Int, @JsonProperty("surfaceRating") @get:JsonProperty("surfaceRating") val surfaceRating: Int, @JsonProperty("surfaceType") @get:JsonProperty("surfaceType") val surfaceType: SurfaceType, @JsonProperty("pathType") @get:JsonProperty("pathType") val pathType: PathType, @JsonProperty("createdAt") @get:JsonProperty("createdAt") val createdAt: Instant, @JsonProperty("updatedAt") @get:JsonProperty("updatedAt") val updatedAt: Instant, @JsonProperty("deletedAt") @get:JsonProperty("deletedAt") val deletedAt: Instant? ) : Serializable { fun toJsonString(): String = com.trifectalabs.roadquality.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): SegmentRating = com.trifectalabs.roadquality.v0.models.JacksonObjectMapperFactory.create().readValue( json, SegmentRating::class.java) } }