package com.hbc.api.product.recommendations.lat.v1.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.Double; import java.lang.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 1.1.0 * User agent: apibuilder app.apibuilder.io/hbc/api-product-recommendations-lat/1.1.0/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 Recommendation { private final String productId; private final String productName; private final String productUrl; private final String productImageUrl; private final String brandName; private final Price price; private final Double rating; private final Long numReviews; @JsonCreator public Recommendation(@JsonProperty("productId") String productId, @JsonProperty("productName") String productName, @JsonProperty("productUrl") String productUrl, @JsonProperty("productImageUrl") String productImageUrl, @JsonProperty("brandName") String brandName, @JsonProperty("price") Price price, @JsonProperty("rating") Double rating, @JsonProperty("numReviews") Long numReviews) { this.productId = productId; this.productName = productName; this.productUrl = productUrl; this.productImageUrl = productImageUrl; this.brandName = brandName; this.price = price; this.rating = rating; this.numReviews = numReviews; } public String getProductId() { return productId; } public String getProductName() { return productName; } public String getProductUrl() { return productUrl; } public String getProductImageUrl() { return productImageUrl; } public String getBrandName() { return brandName; } public Price getPrice() { return price; } /** * customer review's rating */ public Double getRating() { return rating; } /** * number of customers that reviewed the product */ public Long getNumReviews() { return numReviews; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Recommendation that = (Recommendation) o; if (productId != null ? !productId.equals(that.productId) : that.productId != null) return false; if (productName != null ? !productName.equals(that.productName) : that.productName != null) return false; if (productUrl != null ? !productUrl.equals(that.productUrl) : that.productUrl != null) return false; if (productImageUrl != null ? !productImageUrl.equals(that.productImageUrl) : that.productImageUrl != null) return false; if (brandName != null ? !brandName.equals(that.brandName) : that.brandName != null) return false; if (price != null ? !price.equals(that.price) : that.price != null) return false; if (rating != null ? !rating.equals(that.rating) : that.rating != null) return false; if (numReviews != null ? !numReviews.equals(that.numReviews) : that.numReviews != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (productId != null ? productId.hashCode() : 0); result = 31 * result + (productName != null ? productName.hashCode() : 0); result = 31 * result + (productUrl != null ? productUrl.hashCode() : 0); result = 31 * result + (productImageUrl != null ? productImageUrl.hashCode() : 0); result = 31 * result + (brandName != null ? brandName.hashCode() : 0); result = 31 * result + (price != null ? price.hashCode() : 0); result = 31 * result + (rating != null ? rating.hashCode() : 0); result = 31 * result + (numReviews != null ? numReviews.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.hbc.api.product.recommendations.lat.v1.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Recommendation parseJson(String json) throws IOException { return com.hbc.api.product.recommendations.lat.v1.android.ApiBuilderObjectMapper.getInstance().readValue( json, Recommendation.class); } }