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.Object; import java.lang.Override; import java.lang.String; /** * 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 Image { private final Integer id; private final Integer position; private final String alt; private final String src; @JsonCreator public Image(@JsonProperty("id") Integer id, @JsonProperty("position") Integer position, @JsonProperty("alt") String alt, @JsonProperty("src") String src) { this.id = id; this.position = position; this.alt = alt; this.src = src; } /** * A unique numeric identifier for the product image. */ public Integer getId() { return id; } /** * The order of the product image in the list. The first product image is at position 1 and is the 'main' image for the product. */ public Integer getPosition() { return position; } /** * ALT text */ public String getAlt() { return alt; } /** * Specifies the location of the product image. This parameter supports URL filters that you can use to retrieve modified copies of the image. For example, add _small, to the filename to retrieve a scaled copy of the image at 100 x 100 px (for example, ipod-nano_small.png), or add _2048x2048 to retrieve a copy of the image constrained at 2048 x 2048 px resolution (for example, ipod-nano_2048x2048.png). */ public String getSrc() { return src; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Image that = (Image) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (position != null ? !position.equals(that.position) : that.position != null) return false; if (alt != null ? !alt.equals(that.alt) : that.alt != null) return false; if (src != null ? !src.equals(that.src) : that.src != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (position != null ? position.hashCode() : 0); result = 31 * result + (alt != null ? alt.hashCode() : 0); result = 31 * result + (src != null ? src.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return bombas.storeback.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Image parseJson(String json) throws IOException { return bombas.storeback.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Image.class); } }