package io.apibuilder.api.json.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.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.15.71 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-api-json/0.15.71/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 ApiJson { private final String name; private final Info info; private final String namespace; private final String baseUrl; private final String description; private final Import[] imports; private final Header[] headers; private final Map enums; private final Map interfaces; private final Map unions; private final Map models; private final Map resources; private final Map annotations; private final Attribute[] attributes; @JsonCreator public ApiJson(@JsonProperty("name") String name, @JsonProperty("info") Info info, @JsonProperty("namespace") String namespace, @JsonProperty("base_url") String baseUrl, @JsonProperty("description") String description, @JsonProperty("imports") Import[] imports, @JsonProperty("headers") Header[] headers, @JsonProperty("enums") Map enums, @JsonProperty("interfaces") Map interfaces, @JsonProperty("unions") Map unions, @JsonProperty("models") Map models, @JsonProperty("resources") Map resources, @JsonProperty("annotations") Map annotations, @JsonProperty("attributes") Attribute[] attributes) { this.name = name; this.info = info; this.namespace = namespace; this.baseUrl = baseUrl; this.description = description; this.imports = imports; this.headers = headers; this.enums = enums; this.interfaces = interfaces; this.unions = unions; this.models = models; this.resources = resources; this.annotations = annotations; this.attributes = attributes; } public String getName() { return name; } public Info getInfo() { return info; } public String getNamespace() { return namespace; } public String getBaseUrl() { return baseUrl; } public String getDescription() { return description; } public Import[] getImports() { return imports; } public Header[] getHeaders() { return headers; } public Map getEnums() { return enums; } public Map getInterfaces() { return interfaces; } public Map getUnions() { return unions; } public Map getModels() { return models; } public Map getResources() { return resources; } public Map getAnnotations() { return annotations; } public Attribute[] getAttributes() { return attributes; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ApiJson that = (ApiJson) o; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (info != null ? !info.equals(that.info) : that.info != null) return false; if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) return false; if (baseUrl != null ? !baseUrl.equals(that.baseUrl) : that.baseUrl != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (!Arrays.equals(imports, that.imports)) return false; if (!Arrays.equals(headers, that.headers)) return false; if (enums != null ? !enums.equals(that.enums) : that.enums != null) return false; if (interfaces != null ? !interfaces.equals(that.interfaces) : that.interfaces != null) return false; if (unions != null ? !unions.equals(that.unions) : that.unions != null) return false; if (models != null ? !models.equals(that.models) : that.models != null) return false; if (resources != null ? !resources.equals(that.resources) : that.resources != null) return false; if (annotations != null ? !annotations.equals(that.annotations) : that.annotations != null) return false; if (!Arrays.equals(attributes, that.attributes)) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (info != null ? info.hashCode() : 0); result = 31 * result + (namespace != null ? namespace.hashCode() : 0); result = 31 * result + (baseUrl != null ? baseUrl.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (imports != null ? imports.hashCode() : 0); result = 31 * result + (headers != null ? headers.hashCode() : 0); result = 31 * result + (enums != null ? enums.hashCode() : 0); result = 31 * result + (interfaces != null ? interfaces.hashCode() : 0); result = 31 * result + (unions != null ? unions.hashCode() : 0); result = 31 * result + (models != null ? models.hashCode() : 0); result = 31 * result + (resources != null ? resources.hashCode() : 0); result = 31 * result + (annotations != null ? annotations.hashCode() : 0); result = 31 * result + (attributes != null ? attributes.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.apibuilder.api.json.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static ApiJson parseJson(String json) throws IOException { return io.apibuilder.api.json.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, ApiJson.class); } }