package bombas.storeback.api.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.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.Arrays; import java.util.Map; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.2.6 * User agent: apibuilder app.apibuilder.io/bombas/storeback-api/0.2.6/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 Product { private final Long id; private final String title; private final String handle; private final String description; private final String descriptionHtml; private final Integer itemCount; private final String productType; private final String gender; private final Color[] colors; private final Size[] sizes; private final Map[] images; private final Variant[] variants; private final Breadcrumb[] breadcrumbs; private final Detail[] details; private final String createdAt; private final String updatedAt; @JsonCreator public Product(@JsonProperty("id") Long id, @JsonProperty("title") String title, @JsonProperty("handle") String handle, @JsonProperty("description") String description, @JsonProperty("description_html") String descriptionHtml, @JsonProperty("item_count") Integer itemCount, @JsonProperty("product_type") String productType, @JsonProperty("gender") String gender, @JsonProperty("colors") Color[] colors, @JsonProperty("sizes") Size[] sizes, @JsonProperty("images") Map[] images, @JsonProperty("variants") Variant[] variants, @JsonProperty("breadcrumbs") Breadcrumb[] breadcrumbs, @JsonProperty("details") Detail[] details, @JsonProperty("created_at") String createdAt, @JsonProperty("updated_at") String updatedAt) { this.id = id; this.title = title; this.handle = handle; this.description = description; this.descriptionHtml = descriptionHtml; this.itemCount = itemCount; this.productType = productType; this.gender = gender; this.colors = colors; this.sizes = sizes; this.images = images; this.variants = variants; this.breadcrumbs = breadcrumbs; this.details = details; this.createdAt = createdAt; this.updatedAt = updatedAt; } /** * An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops. */ public Long getId() { return id; } /** * The name of the product. */ public String getTitle() { return title; } /** * A unique human-friendly string for the product. Automatically generated from the product's title. Used by the Liquid templating language to refer to objects. */ public String getHandle() { return handle; } /** * A description of the product. */ public String getDescription() { return description; } /** * A description of the product. Supports HTML formatting. */ public String getDescriptionHtml() { return descriptionHtml; } /** * The number of units included. If it is > 1, then it is a pack. */ public Integer getItemCount() { return itemCount; } /** * The product type */ public String getProductType() { return productType; } /** * The marketed gender of the products */ public String getGender() { return gender; } public Color[] getColors() { return colors; } public Size[] getSizes() { return sizes; } public Map[] getImages() { return images; } public Variant[] getVariants() { return variants; } public Breadcrumb[] getBreadcrumbs() { return breadcrumbs; } public Detail[] getDetails() { return details; } /** * The date and time (ISO 8601 format) when the product was created. */ public String getCreatedAt() { return createdAt; } /** * The date and time (ISO 8601 format) when the product was last modified. */ public String getUpdatedAt() { return updatedAt; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Product that = (Product) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (title != null ? !title.equals(that.title) : that.title != null) return false; if (handle != null ? !handle.equals(that.handle) : that.handle != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (descriptionHtml != null ? !descriptionHtml.equals(that.descriptionHtml) : that.descriptionHtml != null) return false; if (itemCount != null ? !itemCount.equals(that.itemCount) : that.itemCount != null) return false; if (productType != null ? !productType.equals(that.productType) : that.productType != null) return false; if (gender != null ? !gender.equals(that.gender) : that.gender != null) return false; if (!Arrays.equals(colors, that.colors)) return false; if (!Arrays.equals(sizes, that.sizes)) return false; if (!Arrays.equals(images, that.images)) return false; if (!Arrays.equals(variants, that.variants)) return false; if (!Arrays.equals(breadcrumbs, that.breadcrumbs)) return false; if (!Arrays.equals(details, that.details)) 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; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (title != null ? title.hashCode() : 0); result = 31 * result + (handle != null ? handle.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (descriptionHtml != null ? descriptionHtml.hashCode() : 0); result = 31 * result + (itemCount != null ? itemCount.hashCode() : 0); result = 31 * result + (productType != null ? productType.hashCode() : 0); result = 31 * result + (gender != null ? gender.hashCode() : 0); result = 31 * result + (colors != null ? colors.hashCode() : 0); result = 31 * result + (sizes != null ? sizes.hashCode() : 0); result = 31 * result + (images != null ? images.hashCode() : 0); result = 31 * result + (variants != null ? variants.hashCode() : 0); result = 31 * result + (breadcrumbs != null ? breadcrumbs.hashCode() : 0); result = 31 * result + (details != null ? details.hashCode() : 0); result = 31 * result + (createdAt != null ? createdAt.hashCode() : 0); result = 31 * result + (updatedAt != null ? updatedAt.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return bombas.storeback.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Product parseJson(String json) throws IOException { return bombas.storeback.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Product.class); } }