package io.apibuilder.spec.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; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.12.14 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-spec/0.12.14/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 import is used to declare a dependency on another application. This allows you to reference the models and or enums from that application in your own app. */ @JsonIgnoreProperties( ignoreUnknown = true ) public class Import { private final String uri; private final String namespace; private final Organization organization; private final Application application; private final String version; private final String[] enums; private final String[] unions; private final String[] models; @JsonCreator public Import(@JsonProperty("uri") String uri, @JsonProperty("namespace") String namespace, @JsonProperty("organization") Organization organization, @JsonProperty("application") Application application, @JsonProperty("version") String version, @JsonProperty("enums") String[] enums, @JsonProperty("unions") String[] unions, @JsonProperty("models") String[] models) { this.uri = uri; this.namespace = namespace; this.organization = organization; this.application = application; this.version = version; this.enums = enums; this.unions = unions; this.models = models; } /** * Full URI to the service.json file of the service we are importing */ public String getUri() { return uri; } /** * the fully qualified namespace that we have imported */ public String getNamespace() { return namespace; } public Organization getOrganization() { return organization; } public Application getApplication() { return application; } /** * The version of the service that we are importing */ public String getVersion() { return version; } /** * Models made available by this import */ public String[] getEnums() { return enums; } /** * Unions made available by this import */ public String[] getUnions() { return unions; } /** * Models made available by this import */ public String[] getModels() { return models; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Import that = (Import) o; if (uri != null ? !uri.equals(that.uri) : that.uri != null) return false; if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) return false; if (organization != null ? !organization.equals(that.organization) : that.organization != null) return false; if (application != null ? !application.equals(that.application) : that.application != null) return false; if (version != null ? !version.equals(that.version) : that.version != null) return false; if (!Arrays.equals(enums, that.enums)) return false; if (!Arrays.equals(unions, that.unions)) return false; if (!Arrays.equals(models, that.models)) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (uri != null ? uri.hashCode() : 0); result = 31 * result + (namespace != null ? namespace.hashCode() : 0); result = 31 * result + (organization != null ? organization.hashCode() : 0); result = 31 * result + (application != null ? application.hashCode() : 0); result = 31 * result + (version != null ? version.hashCode() : 0); result = 31 * result + (enums != null ? enums.hashCode() : 0); result = 31 * result + (unions != null ? unions.hashCode() : 0); result = 31 * result + (models != null ? models.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.apibuilder.spec.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Import parseJson(String json) throws IOException { return io.apibuilder.spec.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Import.class); } }