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.Boolean; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.math.BigDecimal; import org.joda.time.DateTime; /** * 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 PriceSpecification { private final String eligibleQuantity; private final String eligibleTransactionVolume; private final BigDecimal maxPrice; private final BigDecimal minPrice; private final BigDecimal price; private final String priceCurrency; private final DateTime validFrom; private final DateTime validThrough; private final Boolean valueAddedTaxIncluded; @JsonCreator public PriceSpecification(@JsonProperty("eligibleQuantity") String eligibleQuantity, @JsonProperty("eligibleTransactionVolume") String eligibleTransactionVolume, @JsonProperty("maxPrice") BigDecimal maxPrice, @JsonProperty("minPrice") BigDecimal minPrice, @JsonProperty("price") BigDecimal price, @JsonProperty("priceCurrency") String priceCurrency, @JsonProperty("validFrom") DateTime validFrom, @JsonProperty("validThrough") DateTime validThrough, @JsonProperty("valueAddedTaxIncluded") Boolean valueAddedTaxIncluded) { this.eligibleQuantity = eligibleQuantity; this.eligibleTransactionVolume = eligibleTransactionVolume; this.maxPrice = maxPrice; this.minPrice = minPrice; this.price = price; this.priceCurrency = priceCurrency; this.validFrom = validFrom; this.validThrough = validThrough; this.valueAddedTaxIncluded = valueAddedTaxIncluded; } public String getEligibleQuantity() { return eligibleQuantity; } public String getEligibleTransactionVolume() { return eligibleTransactionVolume; } public BigDecimal getMaxPrice() { return maxPrice; } public BigDecimal getMinPrice() { return minPrice; } public BigDecimal getPrice() { return price; } public String getPriceCurrency() { return priceCurrency; } public DateTime getValidFrom() { return validFrom; } public DateTime getValidThrough() { return validThrough; } public Boolean getValueAddedTaxIncluded() { return valueAddedTaxIncluded; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PriceSpecification that = (PriceSpecification) o; if (eligibleQuantity != null ? !eligibleQuantity.equals(that.eligibleQuantity) : that.eligibleQuantity != null) return false; if (eligibleTransactionVolume != null ? !eligibleTransactionVolume.equals(that.eligibleTransactionVolume) : that.eligibleTransactionVolume != null) return false; if (maxPrice != null ? !maxPrice.equals(that.maxPrice) : that.maxPrice != null) return false; if (minPrice != null ? !minPrice.equals(that.minPrice) : that.minPrice != null) return false; if (price != null ? !price.equals(that.price) : that.price != null) return false; if (priceCurrency != null ? !priceCurrency.equals(that.priceCurrency) : that.priceCurrency != null) return false; if (validFrom != null ? !validFrom.equals(that.validFrom) : that.validFrom != null) return false; if (validThrough != null ? !validThrough.equals(that.validThrough) : that.validThrough != null) return false; if (valueAddedTaxIncluded != null ? !valueAddedTaxIncluded.equals(that.valueAddedTaxIncluded) : that.valueAddedTaxIncluded != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (eligibleQuantity != null ? eligibleQuantity.hashCode() : 0); result = 31 * result + (eligibleTransactionVolume != null ? eligibleTransactionVolume.hashCode() : 0); result = 31 * result + (maxPrice != null ? maxPrice.hashCode() : 0); result = 31 * result + (minPrice != null ? minPrice.hashCode() : 0); result = 31 * result + (price != null ? price.hashCode() : 0); result = 31 * result + (priceCurrency != null ? priceCurrency.hashCode() : 0); result = 31 * result + (validFrom != null ? validFrom.hashCode() : 0); result = 31 * result + (validThrough != null ? validThrough.hashCode() : 0); result = 31 * result + (valueAddedTaxIncluded != null ? valueAddedTaxIncluded.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.github.sullis.email.markup.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static PriceSpecification parseJson(String json) throws IOException { return com.github.sullis.email.markup.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, PriceSpecification.class); } }