io.nem.symbol.sdk.openapi.okhttp_gson.model.BlockDTO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of symbol-openapi-okhttp-gson-client Show documentation
Show all versions of symbol-openapi-okhttp-gson-client Show documentation
symbol-openapi-okhttp-gson-client Generated Open API client for symbol-sdk-java
/*
* Catapult REST Endpoints
* OpenAPI Specification of catapult-rest 1.1.2
*
* The version of the OpenAPI document: 0.9.4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.nem.symbol.sdk.openapi.okhttp_gson.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.BlockDTOAllOf;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.EntityDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.NetworkTypeEnum;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.SizePrefixedEntityDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.VerifiableEntityDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* BlockDTO
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-06-30T14:27:18.729Z[UTC]")
public class BlockDTO {
public static final String SERIALIZED_NAME_SIZE = "size";
@SerializedName(SERIALIZED_NAME_SIZE)
private Long size;
public static final String SERIALIZED_NAME_SIGNATURE = "signature";
@SerializedName(SERIALIZED_NAME_SIGNATURE)
private String signature;
public static final String SERIALIZED_NAME_SIGNER_PUBLIC_KEY = "signerPublicKey";
@SerializedName(SERIALIZED_NAME_SIGNER_PUBLIC_KEY)
private String signerPublicKey;
public static final String SERIALIZED_NAME_VERSION = "version";
@SerializedName(SERIALIZED_NAME_VERSION)
private Integer version;
public static final String SERIALIZED_NAME_NETWORK = "network";
@SerializedName(SERIALIZED_NAME_NETWORK)
private NetworkTypeEnum network;
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private Integer type;
public static final String SERIALIZED_NAME_HEIGHT = "height";
@SerializedName(SERIALIZED_NAME_HEIGHT)
private java.math.BigInteger height = null;
public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp";
@SerializedName(SERIALIZED_NAME_TIMESTAMP)
private java.math.BigInteger timestamp = null;
public static final String SERIALIZED_NAME_DIFFICULTY = "difficulty";
@SerializedName(SERIALIZED_NAME_DIFFICULTY)
private java.math.BigInteger difficulty = null;
public static final String SERIALIZED_NAME_PROOF_GAMMA = "proofGamma";
@SerializedName(SERIALIZED_NAME_PROOF_GAMMA)
private String proofGamma;
public static final String SERIALIZED_NAME_PROOF_VERIFICATION_HASH = "proofVerificationHash";
@SerializedName(SERIALIZED_NAME_PROOF_VERIFICATION_HASH)
private String proofVerificationHash;
public static final String SERIALIZED_NAME_PROOF_SCALAR = "proofScalar";
@SerializedName(SERIALIZED_NAME_PROOF_SCALAR)
private String proofScalar;
public static final String SERIALIZED_NAME_PREVIOUS_BLOCK_HASH = "previousBlockHash";
@SerializedName(SERIALIZED_NAME_PREVIOUS_BLOCK_HASH)
private String previousBlockHash;
public static final String SERIALIZED_NAME_TRANSACTIONS_HASH = "transactionsHash";
@SerializedName(SERIALIZED_NAME_TRANSACTIONS_HASH)
private String transactionsHash;
public static final String SERIALIZED_NAME_RECEIPTS_HASH = "receiptsHash";
@SerializedName(SERIALIZED_NAME_RECEIPTS_HASH)
private String receiptsHash;
public static final String SERIALIZED_NAME_STATE_HASH = "stateHash";
@SerializedName(SERIALIZED_NAME_STATE_HASH)
private String stateHash;
public static final String SERIALIZED_NAME_BENEFICIARY_ADDRESS = "beneficiaryAddress";
@SerializedName(SERIALIZED_NAME_BENEFICIARY_ADDRESS)
private String beneficiaryAddress;
public static final String SERIALIZED_NAME_FEE_MULTIPLIER = "feeMultiplier";
@SerializedName(SERIALIZED_NAME_FEE_MULTIPLIER)
private Long feeMultiplier;
public BlockDTO size(Long size) {
this.size = size;
return this;
}
/**
* A number that allows uint 32 values.
* @return size
**/
@ApiModelProperty(example = "2222212828", required = true, value = "A number that allows uint 32 values.")
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public BlockDTO signature(String signature) {
this.signature = signature;
return this;
}
/**
* Entity's signature generated by the signer.
* @return signature
**/
@ApiModelProperty(example = "4B408BBEDF25F2AC8E0E44A6E51E3CCBA03885902055F75EB9FF50433532CA44BF9175FDA7502EEE2FC1617126E453A2BD692BAFDAAF06BC8EDEBA7961B3730D", required = true, value = "Entity's signature generated by the signer.")
public String getSignature() {
return signature;
}
public void setSignature(String signature) {
this.signature = signature;
}
public BlockDTO signerPublicKey(String signerPublicKey) {
this.signerPublicKey = signerPublicKey;
return this;
}
/**
* Public key.
* @return signerPublicKey
**/
@ApiModelProperty(example = "AC1A6E1D8DE5B17D2C6B1293F1CAD3829EEACF38D09311BB3C8E5A880092DE26", required = true, value = "Public key.")
public String getSignerPublicKey() {
return signerPublicKey;
}
public void setSignerPublicKey(String signerPublicKey) {
this.signerPublicKey = signerPublicKey;
}
public BlockDTO version(Integer version) {
this.version = version;
return this;
}
/**
* Entity version.
* @return version
**/
@ApiModelProperty(required = true, value = "Entity version.")
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public BlockDTO network(NetworkTypeEnum network) {
this.network = network;
return this;
}
/**
* Get network
* @return network
**/
@ApiModelProperty(required = true, value = "")
public NetworkTypeEnum getNetwork() {
return network;
}
public void setNetwork(NetworkTypeEnum network) {
this.network = network;
}
public BlockDTO type(Integer type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@ApiModelProperty(required = true, value = "")
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public BlockDTO height(java.math.BigInteger height) {
this.height = height;
return this;
}
/**
* Height of the blockchain.
* @return height
**/
@ApiModelProperty(example = "1", required = true, value = "Height of the blockchain.")
public java.math.BigInteger getHeight() {
return height;
}
public void setHeight(java.math.BigInteger height) {
this.height = height;
}
public BlockDTO timestamp(java.math.BigInteger timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Get timestamp
* @return timestamp
**/
@ApiModelProperty(required = true, value = "")
public java.math.BigInteger getTimestamp() {
return timestamp;
}
public void setTimestamp(java.math.BigInteger timestamp) {
this.timestamp = timestamp;
}
public BlockDTO difficulty(java.math.BigInteger difficulty) {
this.difficulty = difficulty;
return this;
}
/**
* Determines how hard is to harvest a new block, based on previous blocks.
* @return difficulty
**/
@ApiModelProperty(example = "100000000000000", required = true, value = "Determines how hard is to harvest a new block, based on previous blocks.")
public java.math.BigInteger getDifficulty() {
return difficulty;
}
public void setDifficulty(java.math.BigInteger difficulty) {
this.difficulty = difficulty;
}
public BlockDTO proofGamma(String proofGamma) {
this.proofGamma = proofGamma;
return this;
}
/**
* 32-bytes VRF proof gamma.
* @return proofGamma
**/
@ApiModelProperty(example = "8D49594A96C31EC6C64305FB2CCB47AA7A4AC0A4F614442BB3684D2BF41F274E", required = true, value = "32-bytes VRF proof gamma.")
public String getProofGamma() {
return proofGamma;
}
public void setProofGamma(String proofGamma) {
this.proofGamma = proofGamma;
}
public BlockDTO proofVerificationHash(String proofVerificationHash) {
this.proofVerificationHash = proofVerificationHash;
return this;
}
/**
* 16-bytes VRF proof verification hash.
* @return proofVerificationHash
**/
@ApiModelProperty(example = "82FB583BFE3EE78805784D078F2547AE", required = true, value = "16-bytes VRF proof verification hash.")
public String getProofVerificationHash() {
return proofVerificationHash;
}
public void setProofVerificationHash(String proofVerificationHash) {
this.proofVerificationHash = proofVerificationHash;
}
public BlockDTO proofScalar(String proofScalar) {
this.proofScalar = proofScalar;
return this;
}
/**
* 32-bytes VRF proof scalar.
* @return proofScalar
**/
@ApiModelProperty(example = "480175C83739B22C53EAECAA7E7F3B245F1DFAFA6B3AE5C1D0129502FCBAAD0C", required = true, value = "32-bytes VRF proof scalar.")
public String getProofScalar() {
return proofScalar;
}
public void setProofScalar(String proofScalar) {
this.proofScalar = proofScalar;
}
public BlockDTO previousBlockHash(String previousBlockHash) {
this.previousBlockHash = previousBlockHash;
return this;
}
/**
* Get previousBlockHash
* @return previousBlockHash
**/
@ApiModelProperty(example = "C8FC3FB54FDDFBCE0E8C71224990124E4EEC5AD5D30E592EDFA9524669A23810", required = true, value = "")
public String getPreviousBlockHash() {
return previousBlockHash;
}
public void setPreviousBlockHash(String previousBlockHash) {
this.previousBlockHash = previousBlockHash;
}
public BlockDTO transactionsHash(String transactionsHash) {
this.transactionsHash = transactionsHash;
return this;
}
/**
* Get transactionsHash
* @return transactionsHash
**/
@ApiModelProperty(example = "C8FC3FB54FDDFBCE0E8C71224990124E4EEC5AD5D30E592EDFA9524669A23810", required = true, value = "")
public String getTransactionsHash() {
return transactionsHash;
}
public void setTransactionsHash(String transactionsHash) {
this.transactionsHash = transactionsHash;
}
public BlockDTO receiptsHash(String receiptsHash) {
this.receiptsHash = receiptsHash;
return this;
}
/**
* Get receiptsHash
* @return receiptsHash
**/
@ApiModelProperty(example = "C8FC3FB54FDDFBCE0E8C71224990124E4EEC5AD5D30E592EDFA9524669A23810", required = true, value = "")
public String getReceiptsHash() {
return receiptsHash;
}
public void setReceiptsHash(String receiptsHash) {
this.receiptsHash = receiptsHash;
}
public BlockDTO stateHash(String stateHash) {
this.stateHash = stateHash;
return this;
}
/**
* Get stateHash
* @return stateHash
**/
@ApiModelProperty(example = "C8FC3FB54FDDFBCE0E8C71224990124E4EEC5AD5D30E592EDFA9524669A23810", required = true, value = "")
public String getStateHash() {
return stateHash;
}
public void setStateHash(String stateHash) {
this.stateHash = stateHash;
}
public BlockDTO beneficiaryAddress(String beneficiaryAddress) {
this.beneficiaryAddress = beneficiaryAddress;
return this;
}
/**
* Address expressed in hexadecimal base.
* @return beneficiaryAddress
**/
@ApiModelProperty(example = "9081FCCB41F8C8409A9B99E485E0E28D23BD6304EF7215E0", required = true, value = "Address expressed in hexadecimal base.")
public String getBeneficiaryAddress() {
return beneficiaryAddress;
}
public void setBeneficiaryAddress(String beneficiaryAddress) {
this.beneficiaryAddress = beneficiaryAddress;
}
public BlockDTO feeMultiplier(Long feeMultiplier) {
this.feeMultiplier = feeMultiplier;
return this;
}
/**
* Fee multiplier applied to transactions contained in block.
* @return feeMultiplier
**/
@ApiModelProperty(example = "0", required = true, value = "Fee multiplier applied to transactions contained in block.")
public Long getFeeMultiplier() {
return feeMultiplier;
}
public void setFeeMultiplier(Long feeMultiplier) {
this.feeMultiplier = feeMultiplier;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BlockDTO blockDTO = (BlockDTO) o;
return Objects.equals(this.size, blockDTO.size) &&
Objects.equals(this.signature, blockDTO.signature) &&
Objects.equals(this.signerPublicKey, blockDTO.signerPublicKey) &&
Objects.equals(this.version, blockDTO.version) &&
Objects.equals(this.network, blockDTO.network) &&
Objects.equals(this.type, blockDTO.type) &&
Objects.equals(this.height, blockDTO.height) &&
Objects.equals(this.timestamp, blockDTO.timestamp) &&
Objects.equals(this.difficulty, blockDTO.difficulty) &&
Objects.equals(this.proofGamma, blockDTO.proofGamma) &&
Objects.equals(this.proofVerificationHash, blockDTO.proofVerificationHash) &&
Objects.equals(this.proofScalar, blockDTO.proofScalar) &&
Objects.equals(this.previousBlockHash, blockDTO.previousBlockHash) &&
Objects.equals(this.transactionsHash, blockDTO.transactionsHash) &&
Objects.equals(this.receiptsHash, blockDTO.receiptsHash) &&
Objects.equals(this.stateHash, blockDTO.stateHash) &&
Objects.equals(this.beneficiaryAddress, blockDTO.beneficiaryAddress) &&
Objects.equals(this.feeMultiplier, blockDTO.feeMultiplier);
}
@Override
public int hashCode() {
return Objects.hash(size, signature, signerPublicKey, version, network, type, height, timestamp, difficulty, proofGamma, proofVerificationHash, proofScalar, previousBlockHash, transactionsHash, receiptsHash, stateHash, beneficiaryAddress, feeMultiplier);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BlockDTO {\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" signature: ").append(toIndentedString(signature)).append("\n");
sb.append(" signerPublicKey: ").append(toIndentedString(signerPublicKey)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" network: ").append(toIndentedString(network)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" height: ").append(toIndentedString(height)).append("\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" difficulty: ").append(toIndentedString(difficulty)).append("\n");
sb.append(" proofGamma: ").append(toIndentedString(proofGamma)).append("\n");
sb.append(" proofVerificationHash: ").append(toIndentedString(proofVerificationHash)).append("\n");
sb.append(" proofScalar: ").append(toIndentedString(proofScalar)).append("\n");
sb.append(" previousBlockHash: ").append(toIndentedString(previousBlockHash)).append("\n");
sb.append(" transactionsHash: ").append(toIndentedString(transactionsHash)).append("\n");
sb.append(" receiptsHash: ").append(toIndentedString(receiptsHash)).append("\n");
sb.append(" stateHash: ").append(toIndentedString(stateHash)).append("\n");
sb.append(" beneficiaryAddress: ").append(toIndentedString(beneficiaryAddress)).append("\n");
sb.append(" feeMultiplier: ").append(toIndentedString(feeMultiplier)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}