package com.github.sullis.email.markup.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; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-dev * User agent: apibuilder app.apibuilder.io/sullis/email-markup/0.0.1-dev/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 * */ @JsonIgnoreProperties( ignoreUnknown = true ) public class Address { private final String addressCountry; private final String addressLocality; private final String addressRegion; private final String postalCode; private final String postOfficeBoxNumber; private final String streetAddress; @JsonCreator public Address(@JsonProperty("addressCountry") String addressCountry, @JsonProperty("addressLocality") String addressLocality, @JsonProperty("addressRegion") String addressRegion, @JsonProperty("postalCode") String postalCode, @JsonProperty("postOfficeBoxNumber") String postOfficeBoxNumber, @JsonProperty("streetAddress") String streetAddress) { this.addressCountry = addressCountry; this.addressLocality = addressLocality; this.addressRegion = addressRegion; this.postalCode = postalCode; this.postOfficeBoxNumber = postOfficeBoxNumber; this.streetAddress = streetAddress; } public String getAddressCountry() { return addressCountry; } public String getAddressLocality() { return addressLocality; } public String getAddressRegion() { return addressRegion; } public String getPostalCode() { return postalCode; } public String getPostOfficeBoxNumber() { return postOfficeBoxNumber; } public String getStreetAddress() { return streetAddress; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Address that = (Address) o; if (addressCountry != null ? !addressCountry.equals(that.addressCountry) : that.addressCountry != null) return false; if (addressLocality != null ? !addressLocality.equals(that.addressLocality) : that.addressLocality != null) return false; if (addressRegion != null ? !addressRegion.equals(that.addressRegion) : that.addressRegion != null) return false; if (postalCode != null ? !postalCode.equals(that.postalCode) : that.postalCode != null) return false; if (postOfficeBoxNumber != null ? !postOfficeBoxNumber.equals(that.postOfficeBoxNumber) : that.postOfficeBoxNumber != null) return false; if (streetAddress != null ? !streetAddress.equals(that.streetAddress) : that.streetAddress != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (addressCountry != null ? addressCountry.hashCode() : 0); result = 31 * result + (addressLocality != null ? addressLocality.hashCode() : 0); result = 31 * result + (addressRegion != null ? addressRegion.hashCode() : 0); result = 31 * result + (postalCode != null ? postalCode.hashCode() : 0); result = 31 * result + (postOfficeBoxNumber != null ? postOfficeBoxNumber.hashCode() : 0); result = 31 * result + (streetAddress != null ? streetAddress.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.github.sullis.email.markup.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Address parseJson(String json) throws IOException { return com.github.sullis.email.markup.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Address.class); } }