io.nem.sdk.openapi.okhttp_gson.model.BlockDTO Maven / Gradle / Ivy
/*
* Catapult REST Endpoints
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.7.21
*
*
* 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.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.sdk.openapi.okhttp_gson.model.BlockDTOAllOf;
import io.nem.sdk.openapi.okhttp_gson.model.EntityDTO;
import io.nem.sdk.openapi.okhttp_gson.model.NetworkTypeEnum;
import io.nem.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 = "2019-11-23T10:27:05.030209+01:00[Europe/Madrid]")
public class BlockDTO {
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_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_PUBLIC_KEY = "beneficiaryPublicKey";
@SerializedName(SERIALIZED_NAME_BENEFICIARY_PUBLIC_KEY)
private String beneficiaryPublicKey;
public static final String SERIALIZED_NAME_FEE_MULTIPLIER = "feeMultiplier";
@SerializedName(SERIALIZED_NAME_FEE_MULTIPLIER)
private Integer feeMultiplier;
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;
}
/**
* Get signerPublicKey
* @return signerPublicKey
**/
@ApiModelProperty(example = "AC1A6E1D8DE5B17D2C6B1293F1CAD3829EEACF38D09311BB3C8E5A880092DE26", required = true, value = "")
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;
}
/**
* Number of seconds elapsed since the creation of the nemesis block.
* @return timestamp
**/
@ApiModelProperty(example = "108303181802", required = true, value = "Number of seconds elapsed since the creation of the nemesis block.")
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;
}
/**
* Defines how difficult it will be to harvest next the block, based on previous blocks.
* @return difficulty
**/
@ApiModelProperty(example = "100000000000000", required = true, value = "Defines how difficult it will be to harvest next the block, based on previous blocks.")
public java.math.BigInteger getDifficulty() {
return difficulty;
}
public void setDifficulty(java.math.BigInteger difficulty) {
this.difficulty = difficulty;
}
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 beneficiaryPublicKey(String beneficiaryPublicKey) {
this.beneficiaryPublicKey = beneficiaryPublicKey;
return this;
}
/**
* Get beneficiaryPublicKey
* @return beneficiaryPublicKey
**/
@ApiModelProperty(example = "AC1A6E1D8DE5B17D2C6B1293F1CAD3829EEACF38D09311BB3C8E5A880092DE26", required = true, value = "")
public String getBeneficiaryPublicKey() {
return beneficiaryPublicKey;
}
public void setBeneficiaryPublicKey(String beneficiaryPublicKey) {
this.beneficiaryPublicKey = beneficiaryPublicKey;
}
public BlockDTO feeMultiplier(Integer 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 Integer getFeeMultiplier() {
return feeMultiplier;
}
public void setFeeMultiplier(Integer 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.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.previousBlockHash, blockDTO.previousBlockHash) &&
Objects.equals(this.transactionsHash, blockDTO.transactionsHash) &&
Objects.equals(this.receiptsHash, blockDTO.receiptsHash) &&
Objects.equals(this.stateHash, blockDTO.stateHash) &&
Objects.equals(this.beneficiaryPublicKey, blockDTO.beneficiaryPublicKey) &&
Objects.equals(this.feeMultiplier, blockDTO.feeMultiplier);
}
@Override
public int hashCode() {
return Objects.hash(signature, signerPublicKey, version, network, type, height, timestamp, difficulty, previousBlockHash, transactionsHash, receiptsHash, stateHash, beneficiaryPublicKey, feeMultiplier);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BlockDTO {\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(" 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(" beneficiaryPublicKey: ").append(toIndentedString(beneficiaryPublicKey)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy