package com.gilt.public_.api.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.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.math.BigDecimal; import java.util.Arrays; import java.util.Map; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 1.0.1 * User agent: apibuilder app.apibuilder.io/gilt/gilt-public-api/1.0.1/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 * */ @JsonIgnoreProperties( ignoreUnknown = true ) public class Sku { private final Long id; private final String inventoryStatus; private final BigDecimal msrpPrice; private final BigDecimal salePrice; private final BigDecimal shippingSurcharge; private final Map[] attributes; @JsonCreator public Sku(@JsonProperty("id") Long id, @JsonProperty("inventory_status") String inventoryStatus, @JsonProperty("msrp_price") BigDecimal msrpPrice, @JsonProperty("sale_price") BigDecimal salePrice, @JsonProperty("shipping_surcharge") BigDecimal shippingSurcharge, @JsonProperty("attributes") Map[] attributes) { this.id = id; this.inventoryStatus = inventoryStatus; this.msrpPrice = msrpPrice; this.salePrice = salePrice; this.shippingSurcharge = shippingSurcharge; this.attributes = attributes; } /** * The SKU unique identifier */ public Long getId() { return id; } /** * Describes product availability. One of: sold out, for sale or reserved. */ public String getInventoryStatus() { return inventoryStatus; } /** * MSRP price of SKU in US Dollars. */ public BigDecimal getMsrpPrice() { return msrpPrice; } /** * Sale price of SKU in US Dollars. */ public BigDecimal getSalePrice() { return salePrice; } /** * If absent, standard Gilt.com shipping policy and any resulting charges apply. If present, standard shipping charge is overridden by amount listed here in US Dollars. */ public BigDecimal getShippingSurcharge() { return shippingSurcharge; } /** * SKU attributes like color and size. */ public Map[] getAttributes() { return attributes; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Sku that = (Sku) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (inventoryStatus != null ? !inventoryStatus.equals(that.inventoryStatus) : that.inventoryStatus != null) return false; if (msrpPrice != null ? !msrpPrice.equals(that.msrpPrice) : that.msrpPrice != null) return false; if (salePrice != null ? !salePrice.equals(that.salePrice) : that.salePrice != null) return false; if (shippingSurcharge != null ? !shippingSurcharge.equals(that.shippingSurcharge) : that.shippingSurcharge != null) return false; if (!Arrays.equals(attributes, that.attributes)) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (inventoryStatus != null ? inventoryStatus.hashCode() : 0); result = 31 * result + (msrpPrice != null ? msrpPrice.hashCode() : 0); result = 31 * result + (salePrice != null ? salePrice.hashCode() : 0); result = 31 * result + (shippingSurcharge != null ? shippingSurcharge.hashCode() : 0); result = 31 * result + (attributes != null ? attributes.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.gilt.public_.api.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Sku parseJson(String json) throws IOException { return com.gilt.public_.api.android.ApiBuilderObjectMapper.getInstance().readValue( json, Sku.class); } }