package org.bml.atlas.tags.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.Integer; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1 * User agent: apibuilder app.apibuilder.io/bml/atlas-tags/0.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 * * An cursor Slice for iterating through sets. */ @JsonIgnoreProperties( ignoreUnknown = true ) public class Slice { private final Integer number; private final Integer numberOfElements; private final Integer size; private final Boolean hasContent; private final Boolean hasNext; private final Boolean hasPrevious; private final Boolean isFirst; private final Boolean isLast; @JsonCreator public Slice(@JsonProperty("number") Integer number, @JsonProperty("numberOfElements") Integer numberOfElements, @JsonProperty("size") Integer size, @JsonProperty("hasContent") Boolean hasContent, @JsonProperty("hasNext") Boolean hasNext, @JsonProperty("hasPrevious") Boolean hasPrevious, @JsonProperty("isFirst") Boolean isFirst, @JsonProperty("isLast") Boolean isLast) { this.number = number; this.numberOfElements = numberOfElements; this.size = size; this.hasContent = hasContent; this.hasNext = hasNext; this.hasPrevious = hasPrevious; this.isFirst = isFirst; this.isLast = isLast; } /** * The number of the current Slice. */ public Integer getNumber() { return number; } /** * The number of elements currently on this Slice. */ public Integer getNumberOfElements() { return numberOfElements; } /** * The size of this Slice. */ public Integer getSize() { return size; } /** * Is there any content for this Slice. */ public Boolean getHasContent() { return hasContent; } /** * Is there is a next Slice. */ public Boolean getHasNext() { return hasNext; } /** * Is there is a previous Slice. */ public Boolean getHasPrevious() { return hasPrevious; } /** * Is this the first Slice. */ public Boolean getIsFirst() { return isFirst; } /** * Is this the last Slice. */ public Boolean getIsLast() { return isLast; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Slice that = (Slice) o; if (number != null ? !number.equals(that.number) : that.number != null) return false; if (numberOfElements != null ? !numberOfElements.equals(that.numberOfElements) : that.numberOfElements != null) return false; if (size != null ? !size.equals(that.size) : that.size != null) return false; if (hasContent != null ? !hasContent.equals(that.hasContent) : that.hasContent != null) return false; if (hasNext != null ? !hasNext.equals(that.hasNext) : that.hasNext != null) return false; if (hasPrevious != null ? !hasPrevious.equals(that.hasPrevious) : that.hasPrevious != null) return false; if (isFirst != null ? !isFirst.equals(that.isFirst) : that.isFirst != null) return false; if (isLast != null ? !isLast.equals(that.isLast) : that.isLast != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (number != null ? number.hashCode() : 0); result = 31 * result + (numberOfElements != null ? numberOfElements.hashCode() : 0); result = 31 * result + (size != null ? size.hashCode() : 0); result = 31 * result + (hasContent != null ? hasContent.hashCode() : 0); result = 31 * result + (hasNext != null ? hasNext.hashCode() : 0); result = 31 * result + (hasPrevious != null ? hasPrevious.hashCode() : 0); result = 31 * result + (isFirst != null ? isFirst.hashCode() : 0); result = 31 * result + (isLast != null ? isLast.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return org.bml.atlas.tags.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Slice parseJson(String json) throws IOException { return org.bml.atlas.tags.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Slice.class); } }