package io.gimbalabs.hilltop.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.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-SNAPSHOT * User agent: apibuilder app.apibuilder.io/gimbalabs/hilltop-api/0.0.1-SNAPSHOT/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 NativeAsset { private final String transactionId; private final String policyId; private final String tokenName; private final Object metadata; private final Long blockNumber; private final Long epochSlotNumber; private final Long epochNumber; private final Long invalidBefore; private final Long invalidHereafter; private final Long quantity; @JsonCreator public NativeAsset(@JsonProperty("transaction_id") String transactionId, @JsonProperty("policy_id") String policyId, @JsonProperty("token_name") String tokenName, @JsonProperty("metadata") Object metadata, @JsonProperty("block_number") Long blockNumber, @JsonProperty("epoch_slot_number") Long epochSlotNumber, @JsonProperty("epoch_number") Long epochNumber, @JsonProperty("invalid_before") Long invalidBefore, @JsonProperty("invalid_hereafter") Long invalidHereafter, @JsonProperty("quantity") Long quantity) { this.transactionId = transactionId; this.policyId = policyId; this.tokenName = tokenName; this.metadata = metadata; this.blockNumber = blockNumber; this.epochSlotNumber = epochSlotNumber; this.epochNumber = epochNumber; this.invalidBefore = invalidBefore; this.invalidHereafter = invalidHereafter; this.quantity = quantity; } public String getTransactionId() { return transactionId; } public String getPolicyId() { return policyId; } public String getTokenName() { return tokenName; } public Object getMetadata() { return metadata; } public Long getBlockNumber() { return blockNumber; } public Long getEpochSlotNumber() { return epochSlotNumber; } public Long getEpochNumber() { return epochNumber; } public Long getInvalidBefore() { return invalidBefore; } public Long getInvalidHereafter() { return invalidHereafter; } public Long getQuantity() { return quantity; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NativeAsset that = (NativeAsset) o; if (transactionId != null ? !transactionId.equals(that.transactionId) : that.transactionId != null) return false; if (policyId != null ? !policyId.equals(that.policyId) : that.policyId != null) return false; if (tokenName != null ? !tokenName.equals(that.tokenName) : that.tokenName != null) return false; if (metadata != null ? !metadata.equals(that.metadata) : that.metadata != null) return false; if (blockNumber != null ? !blockNumber.equals(that.blockNumber) : that.blockNumber != null) return false; if (epochSlotNumber != null ? !epochSlotNumber.equals(that.epochSlotNumber) : that.epochSlotNumber != null) return false; if (epochNumber != null ? !epochNumber.equals(that.epochNumber) : that.epochNumber != null) return false; if (invalidBefore != null ? !invalidBefore.equals(that.invalidBefore) : that.invalidBefore != null) return false; if (invalidHereafter != null ? !invalidHereafter.equals(that.invalidHereafter) : that.invalidHereafter != null) return false; if (quantity != null ? !quantity.equals(that.quantity) : that.quantity != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (transactionId != null ? transactionId.hashCode() : 0); result = 31 * result + (policyId != null ? policyId.hashCode() : 0); result = 31 * result + (tokenName != null ? tokenName.hashCode() : 0); result = 31 * result + (metadata != null ? metadata.hashCode() : 0); result = 31 * result + (blockNumber != null ? blockNumber.hashCode() : 0); result = 31 * result + (epochSlotNumber != null ? epochSlotNumber.hashCode() : 0); result = 31 * result + (epochNumber != null ? epochNumber.hashCode() : 0); result = 31 * result + (invalidBefore != null ? invalidBefore.hashCode() : 0); result = 31 * result + (invalidHereafter != null ? invalidHereafter.hashCode() : 0); result = 31 * result + (quantity != null ? quantity.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.gimbalabs.hilltop.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static NativeAsset parseJson(String json) throws IOException { return io.gimbalabs.hilltop.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, NativeAsset.class); } }