package io.apibuilder.postman.collection.v21.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.Arrays; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.16.74 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-postman-collection-v2-1/0.16.74/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 ) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE ) public class Item implements Items { private final String id; private final String name; private final Description description; private final Variable[] variable; private final Event[] event; private final Request request; private final Response[] response; @JsonCreator public Item(@JsonProperty("id") String id, @JsonProperty("name") String name, @JsonProperty("description") Description description, @JsonProperty("variable") Variable[] variable, @JsonProperty("event") Event[] event, @JsonProperty("request") Request request, @JsonProperty("response") Response[] response) { this.id = id; this.name = name; this.description = description; this.variable = variable; this.event = event; this.request = request; this.response = response; } /** * A unique ID that is used to identify collections internally */ public String getId() { return id; } /** * A human readable identifier for the current item. */ public String getName() { return name; } /** * A Description can be a raw text, or be an object, which holds the description along with its format. */ public Description getDescription() { return description; } /** * Collection variables allow you to define a set of variables, that are a part of the collection, as opposed to environments, which are separate entities. */ public Variable[] getVariable() { return variable; } /** * Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID. */ public Event[] getEvent() { return event; } public Request getRequest() { return request; } public Response[] getResponse() { return response; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Item that = (Item) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (!Arrays.equals(variable, that.variable)) return false; if (!Arrays.equals(event, that.event)) return false; if (request != null ? !request.equals(that.request) : that.request != null) return false; if (!Arrays.equals(response, that.response)) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (variable != null ? variable.hashCode() : 0); result = 31 * result + (event != null ? event.hashCode() : 0); result = 31 * result + (request != null ? request.hashCode() : 0); result = 31 * result + (response != null ? response.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.apibuilder.postman.collection.v21.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Item parseJson(String json) throws IOException { return io.apibuilder.postman.collection.v21.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Item.class); } }