package io.apibuilder.api.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.UUID; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.16.74 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-api/0.16.74/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 * * Attribute values can be set at different levels. Initially we support setting organization wide attributes, but in the future plan to support setting attribute values with each version of the application. */ @JsonIgnoreProperties( ignoreUnknown = true ) public class AttributeValue { private final UUID guid; private final AttributeSummary attribute; private final String value; private final io.apibuilder.common.v0.models.Audit audit; @JsonCreator public AttributeValue(@JsonProperty("guid") UUID guid, @JsonProperty("attribute") AttributeSummary attribute, @JsonProperty("value") String value, @JsonProperty("audit") io.apibuilder.common.v0.models.Audit audit) { this.guid = guid; this.attribute = attribute; this.value = value; this.audit = audit; } /** * Internal unique identifier for this attribute value. */ public UUID getGuid() { return guid; } public AttributeSummary getAttribute() { return attribute; } public String getValue() { return value; } public io.apibuilder.common.v0.models.Audit getAudit() { return audit; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AttributeValue that = (AttributeValue) o; if (guid != null ? !guid.equals(that.guid) : that.guid != null) return false; if (attribute != null ? !attribute.equals(that.attribute) : that.attribute != null) return false; if (value != null ? !value.equals(that.value) : that.value != null) return false; if (audit != null ? !audit.equals(that.audit) : that.audit != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (guid != null ? guid.hashCode() : 0); result = 31 * result + (attribute != null ? attribute.hashCode() : 0); result = 31 * result + (value != null ? value.hashCode() : 0); result = 31 * result + (audit != null ? audit.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.apibuilder.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static AttributeValue parseJson(String json) throws IOException { return io.apibuilder.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, AttributeValue.class); } }