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.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 ) public class Url { private final String raw; private final String protocol; private final String[] host; private final String[] path; private final String port; private final QueryParam[] query; private final String hash; private final Variable[] variable; @JsonCreator public Url(@JsonProperty("raw") String raw, @JsonProperty("protocol") String protocol, @JsonProperty("host") String[] host, @JsonProperty("path") String[] path, @JsonProperty("port") String port, @JsonProperty("query") QueryParam[] query, @JsonProperty("hash") String hash, @JsonProperty("variable") Variable[] variable) { this.raw = raw; this.protocol = protocol; this.host = host; this.path = path; this.port = port; this.query = query; this.hash = hash; this.variable = variable; } /** * The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s). */ public String getRaw() { return raw; } /** * The protocol_ associated with the request, E.g: 'http' */ public String getProtocol() { return protocol; } /** * The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings. */ public String[] getHost() { return host; } public String[] getPath() { return path; } /** * The port number present in this URL. An empty value implies 80/443 depending on whether the protocol_ field contains http/https. */ public String getPort() { return port; } public QueryParam[] getQuery() { return query; } /** * Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases. */ public String getHash() { return hash; } /** * Postman supports path variables with the syntax /path/:variableName/to/somewhere. These variables are stored in this field. */ public Variable[] getVariable() { return variable; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Url that = (Url) o; if (raw != null ? !raw.equals(that.raw) : that.raw != null) return false; if (protocol != null ? !protocol.equals(that.protocol) : that.protocol != null) return false; if (!Arrays.equals(host, that.host)) return false; if (!Arrays.equals(path, that.path)) return false; if (port != null ? !port.equals(that.port) : that.port != null) return false; if (!Arrays.equals(query, that.query)) return false; if (hash != null ? !hash.equals(that.hash) : that.hash != null) return false; if (!Arrays.equals(variable, that.variable)) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (raw != null ? raw.hashCode() : 0); result = 31 * result + (protocol != null ? protocol.hashCode() : 0); result = 31 * result + (host != null ? host.hashCode() : 0); result = 31 * result + (path != null ? path.hashCode() : 0); result = 31 * result + (port != null ? port.hashCode() : 0); result = 31 * result + (query != null ? query.hashCode() : 0); result = 31 * result + (hash != null ? hash.hashCode() : 0); result = 31 * result + (variable != null ? variable.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.apibuilder.postman.collection.v21.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Url parseJson(String json) throws IOException { return io.apibuilder.postman.collection.v21.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Url.class); } }