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.Integer; 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_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 PoolRetiring { private final String tickerName; private final String poolId; private final Integer certificateIndex; private final Long epochNumber; private final Long blockNumber; private final Long retiringAtEpoch; private final String txHash; @JsonCreator public PoolRetiring(@JsonProperty("ticker_name") String tickerName, @JsonProperty("pool_id") String poolId, @JsonProperty("certificate_index") Integer certificateIndex, @JsonProperty("epoch_number") Long epochNumber, @JsonProperty("block_number") Long blockNumber, @JsonProperty("retiring_at_epoch") Long retiringAtEpoch, @JsonProperty("tx_hash") String txHash) { this.tickerName = tickerName; this.poolId = poolId; this.certificateIndex = certificateIndex; this.epochNumber = epochNumber; this.blockNumber = blockNumber; this.retiringAtEpoch = retiringAtEpoch; this.txHash = txHash; } public String getTickerName() { return tickerName; } public String getPoolId() { return poolId; } public Integer getCertificateIndex() { return certificateIndex; } public Long getEpochNumber() { return epochNumber; } public Long getBlockNumber() { return blockNumber; } public Long getRetiringAtEpoch() { return retiringAtEpoch; } public String getTxHash() { return txHash; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PoolRetiring that = (PoolRetiring) o; if (tickerName != null ? !tickerName.equals(that.tickerName) : that.tickerName != null) return false; if (poolId != null ? !poolId.equals(that.poolId) : that.poolId != null) return false; if (certificateIndex != null ? !certificateIndex.equals(that.certificateIndex) : that.certificateIndex != null) return false; if (epochNumber != null ? !epochNumber.equals(that.epochNumber) : that.epochNumber != null) return false; if (blockNumber != null ? !blockNumber.equals(that.blockNumber) : that.blockNumber != null) return false; if (retiringAtEpoch != null ? !retiringAtEpoch.equals(that.retiringAtEpoch) : that.retiringAtEpoch != null) return false; if (txHash != null ? !txHash.equals(that.txHash) : that.txHash != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (tickerName != null ? tickerName.hashCode() : 0); result = 31 * result + (poolId != null ? poolId.hashCode() : 0); result = 31 * result + (certificateIndex != null ? certificateIndex.hashCode() : 0); result = 31 * result + (epochNumber != null ? epochNumber.hashCode() : 0); result = 31 * result + (blockNumber != null ? blockNumber.hashCode() : 0); result = 31 * result + (retiringAtEpoch != null ? retiringAtEpoch.hashCode() : 0); result = 31 * result + (txHash != null ? txHash.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.gimbalabs.hilltop.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static PoolRetiring parseJson(String json) throws IOException { return io.gimbalabs.hilltop.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, PoolRetiring.class); } }