package com.trifectalabs.roadquality.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.UUID; import org.joda.time.DateTime; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.13 * User agent: apibuilder app.apibuilder.io/trifectalabs/roadquality/0.0.13/android_rx2_client * * WARNING: not all features (notably unions) and data types work with android generator yet. * Android generator is designed to be used in an android application, but should work in any java codebase as long as you import jackson, retrofit2 and RxJava2 libraries. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact android-feedback@gilt.com * * A rating that is supplied with the segment */ @JsonIgnoreProperties( ignoreUnknown = true ) public class SegmentRating { private final UUID id; private final UUID segmentId; private final UUID userId; private final Integer trafficRating; private final Integer surfaceRating; private final SurfaceType surfaceType; private final PathType pathType; private final DateTime createdAt; private final DateTime updatedAt; private final DateTime deletedAt; @JsonCreator public SegmentRating(@JsonProperty("id") UUID id, @JsonProperty("segmentId") UUID segmentId, @JsonProperty("userId") UUID userId, @JsonProperty("trafficRating") Integer trafficRating, @JsonProperty("surfaceRating") Integer surfaceRating, @JsonProperty("surfaceType") SurfaceType surfaceType, @JsonProperty("pathType") PathType pathType, @JsonProperty("createdAt") DateTime createdAt, @JsonProperty("updatedAt") DateTime updatedAt, @JsonProperty("deletedAt") DateTime deletedAt) { this.id = id; this.segmentId = segmentId; this.userId = userId; this.trafficRating = trafficRating; this.surfaceRating = surfaceRating; this.surfaceType = surfaceType; this.pathType = pathType; this.createdAt = createdAt; this.updatedAt = updatedAt; this.deletedAt = deletedAt; } public UUID getId() { return id; } public UUID getSegmentId() { return segmentId; } public UUID getUserId() { return userId; } public Integer getTrafficRating() { return trafficRating; } public Integer getSurfaceRating() { return surfaceRating; } public SurfaceType getSurfaceType() { return surfaceType; } public PathType getPathType() { return pathType; } public DateTime getCreatedAt() { return createdAt; } public DateTime getUpdatedAt() { return updatedAt; } public DateTime getDeletedAt() { return deletedAt; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SegmentRating that = (SegmentRating) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (segmentId != null ? !segmentId.equals(that.segmentId) : that.segmentId != null) return false; if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false; if (trafficRating != null ? !trafficRating.equals(that.trafficRating) : that.trafficRating != null) return false; if (surfaceRating != null ? !surfaceRating.equals(that.surfaceRating) : that.surfaceRating != null) return false; if (surfaceType != null ? !surfaceType.equals(that.surfaceType) : that.surfaceType != null) return false; if (pathType != null ? !pathType.equals(that.pathType) : that.pathType != null) return false; if (createdAt != null ? !createdAt.equals(that.createdAt) : that.createdAt != null) return false; if (updatedAt != null ? !updatedAt.equals(that.updatedAt) : that.updatedAt != null) return false; if (deletedAt != null ? !deletedAt.equals(that.deletedAt) : that.deletedAt != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (segmentId != null ? segmentId.hashCode() : 0); result = 31 * result + (userId != null ? userId.hashCode() : 0); result = 31 * result + (trafficRating != null ? trafficRating.hashCode() : 0); result = 31 * result + (surfaceRating != null ? surfaceRating.hashCode() : 0); result = 31 * result + (surfaceType != null ? surfaceType.hashCode() : 0); result = 31 * result + (pathType != null ? pathType.hashCode() : 0); result = 31 * result + (createdAt != null ? createdAt.hashCode() : 0); result = 31 * result + (updatedAt != null ? updatedAt.hashCode() : 0); result = 31 * result + (deletedAt != null ? deletedAt.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.trifectalabs.roadquality.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static SegmentRating parseJson(String json) throws IOException { return com.trifectalabs.roadquality.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, SegmentRating.class); } }