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.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_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 and retrofit2 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 user of the service */ @JsonIgnoreProperties( ignoreUnknown = true ) public class User { private final UUID id; private final String firstName; private final String lastName; private final String email; private final String city; private final String province; private final String country; private final DateTime birthdate; private final String sex; private final UserRole role; private final String stravaToken; private final DateTime createdAt; private final DateTime updatedAt; private final DateTime deletedAt; @JsonCreator public User(@JsonProperty("id") UUID id, @JsonProperty("firstName") String firstName, @JsonProperty("lastName") String lastName, @JsonProperty("email") String email, @JsonProperty("city") String city, @JsonProperty("province") String province, @JsonProperty("country") String country, @JsonProperty("birthdate") DateTime birthdate, @JsonProperty("sex") String sex, @JsonProperty("role") UserRole role, @JsonProperty("stravaToken") String stravaToken, @JsonProperty("createdAt") DateTime createdAt, @JsonProperty("updatedAt") DateTime updatedAt, @JsonProperty("deletedAt") DateTime deletedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; this.email = email; this.city = city; this.province = province; this.country = country; this.birthdate = birthdate; this.sex = sex; this.role = role; this.stravaToken = stravaToken; this.createdAt = createdAt; this.updatedAt = updatedAt; this.deletedAt = deletedAt; } public UUID getId() { return id; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public String getEmail() { return email; } public String getCity() { return city; } public String getProvince() { return province; } public String getCountry() { return country; } public DateTime getBirthdate() { return birthdate; } public String getSex() { return sex; } public UserRole getRole() { return role; } /** * Strava API token */ public String getStravaToken() { return stravaToken; } 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; User that = (User) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (firstName != null ? !firstName.equals(that.firstName) : that.firstName != null) return false; if (lastName != null ? !lastName.equals(that.lastName) : that.lastName != null) return false; if (email != null ? !email.equals(that.email) : that.email != null) return false; if (city != null ? !city.equals(that.city) : that.city != null) return false; if (province != null ? !province.equals(that.province) : that.province != null) return false; if (country != null ? !country.equals(that.country) : that.country != null) return false; if (birthdate != null ? !birthdate.equals(that.birthdate) : that.birthdate != null) return false; if (sex != null ? !sex.equals(that.sex) : that.sex != null) return false; if (role != null ? !role.equals(that.role) : that.role != null) return false; if (stravaToken != null ? !stravaToken.equals(that.stravaToken) : that.stravaToken != 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 + (firstName != null ? firstName.hashCode() : 0); result = 31 * result + (lastName != null ? lastName.hashCode() : 0); result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (city != null ? city.hashCode() : 0); result = 31 * result + (province != null ? province.hashCode() : 0); result = 31 * result + (country != null ? country.hashCode() : 0); result = 31 * result + (birthdate != null ? birthdate.hashCode() : 0); result = 31 * result + (sex != null ? sex.hashCode() : 0); result = 31 * result + (role != null ? role.hashCode() : 0); result = 31 * result + (stravaToken != null ? stravaToken.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 User parseJson(String json) throws IOException { return com.trifectalabs.roadquality.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, User.class); } }