io.proximax.sdk.gen.model.BlockDTOAllOf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-xpx-chain-sdk Show documentation
Show all versions of java-xpx-chain-sdk Show documentation
The ProximaX Sirius Chain Java SDK is a Java library for interacting with the Sirius Blockchain.
The newest version!
/*
* Catapult REST API Reference
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.7.15
*
*
* 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.proximax.sdk.gen.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.proximax.sdk.gen.model.UInt64DTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* BlockDTOAllOf
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-09-22T22:57:50.932+02:00[Europe/Prague]")
public class BlockDTOAllOf {
public static final String SERIALIZED_NAME_HEIGHT = "height";
@SerializedName(SERIALIZED_NAME_HEIGHT)
private UInt64DTO height = new UInt64DTO();
public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp";
@SerializedName(SERIALIZED_NAME_TIMESTAMP)
private UInt64DTO timestamp = new UInt64DTO();
public static final String SERIALIZED_NAME_DIFFICULTY = "difficulty";
@SerializedName(SERIALIZED_NAME_DIFFICULTY)
private UInt64DTO difficulty = new UInt64DTO();
public static final String SERIALIZED_NAME_FEE_MULTIPLIER = "feeMultiplier";
@SerializedName(SERIALIZED_NAME_FEE_MULTIPLIER)
private Integer feeMultiplier;
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_BLOCK_TRANSACTIONS_HASH = "blockTransactionsHash";
@SerializedName(SERIALIZED_NAME_BLOCK_TRANSACTIONS_HASH)
private String blockTransactionsHash;
public static final String SERIALIZED_NAME_BLOCK_RECEIPTS_HASH = "blockReceiptsHash";
@SerializedName(SERIALIZED_NAME_BLOCK_RECEIPTS_HASH)
private String blockReceiptsHash;
public static final String SERIALIZED_NAME_STATE_HASH = "stateHash";
@SerializedName(SERIALIZED_NAME_STATE_HASH)
private String stateHash;
public static final String SERIALIZED_NAME_BENEFICIARY = "beneficiary";
@SerializedName(SERIALIZED_NAME_BENEFICIARY)
private String beneficiary;
public static final String SERIALIZED_NAME_FEE_INTEREST = "feeInterest";
@SerializedName(SERIALIZED_NAME_FEE_INTEREST)
private Integer feeInterest;
public static final String SERIALIZED_NAME_FEE_INTEREST_DENOMINATOR = "feeInterestDenominator";
@SerializedName(SERIALIZED_NAME_FEE_INTEREST_DENOMINATOR)
private Integer feeInterestDenominator;
public BlockDTOAllOf height(UInt64DTO height) {
this.height = height;
return this;
}
/**
* Get height
* @return height
**/
@ApiModelProperty(required = true, value = "")
public UInt64DTO getHeight() {
return height;
}
public void setHeight(UInt64DTO height) {
this.height = height;
}
public BlockDTOAllOf timestamp(UInt64DTO timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Get timestamp
* @return timestamp
**/
@ApiModelProperty(required = true, value = "")
public UInt64DTO getTimestamp() {
return timestamp;
}
public void setTimestamp(UInt64DTO timestamp) {
this.timestamp = timestamp;
}
public BlockDTOAllOf difficulty(UInt64DTO difficulty) {
this.difficulty = difficulty;
return this;
}
/**
* Get difficulty
* @return difficulty
**/
@ApiModelProperty(required = true, value = "")
public UInt64DTO getDifficulty() {
return difficulty;
}
public void setDifficulty(UInt64DTO difficulty) {
this.difficulty = difficulty;
}
public BlockDTOAllOf feeMultiplier(Integer feeMultiplier) {
this.feeMultiplier = feeMultiplier;
return this;
}
/**
* The fee multiplier applied to transactions contained in block.
* @return feeMultiplier
**/
@ApiModelProperty(example = "0", required = true, value = "The fee multiplier applied to transactions contained in block.")
public Integer getFeeMultiplier() {
return feeMultiplier;
}
public void setFeeMultiplier(Integer feeMultiplier) {
this.feeMultiplier = feeMultiplier;
}
public BlockDTOAllOf previousBlockHash(String previousBlockHash) {
this.previousBlockHash = previousBlockHash;
return this;
}
/**
* The hash of the previous block.
* @return previousBlockHash
**/
@ApiModelProperty(example = "[0]", required = true, value = "The hash of the previous block.")
public String getPreviousBlockHash() {
return previousBlockHash;
}
public void setPreviousBlockHash(String previousBlockHash) {
this.previousBlockHash = previousBlockHash;
}
public BlockDTOAllOf blockTransactionsHash(String blockTransactionsHash) {
this.blockTransactionsHash = blockTransactionsHash;
return this;
}
/**
* The transactions included in a block are hashed forming a merkle tree. The root of the tree summarizes them.
* @return blockTransactionsHash
**/
@ApiModelProperty(example = "8F8C6EB33332F69196AD0D30D7CD90FAC1332089DF460DF0CF4A8A28C1C17AD4", required = true, value = "The transactions included in a block are hashed forming a merkle tree. The root of the tree summarizes them. ")
public String getBlockTransactionsHash() {
return blockTransactionsHash;
}
public void setBlockTransactionsHash(String blockTransactionsHash) {
this.blockTransactionsHash = blockTransactionsHash;
}
public BlockDTOAllOf blockReceiptsHash(String blockReceiptsHash) {
this.blockReceiptsHash = blockReceiptsHash;
return this;
}
/**
* The collection of receipts are hashed into a merkle tree and linked to a block. The block header stores the root hash.
* @return blockReceiptsHash
**/
@ApiModelProperty(example = "sZznHmvGSZKIy1Ney2O0tKxJ4sOgk5jYYhqsua1RCRo=", required = true, value = "The collection of receipts are hashed into a merkle tree and linked to a block. The block header stores the root hash. ")
public String getBlockReceiptsHash() {
return blockReceiptsHash;
}
public void setBlockReceiptsHash(String blockReceiptsHash) {
this.blockReceiptsHash = blockReceiptsHash;
}
public BlockDTOAllOf stateHash(String stateHash) {
this.stateHash = stateHash;
return this;
}
/**
* For each block, the state of the blockchain is stored in RocksDB, forming a patricia tree. The root of the tree summarizes the state of the blockchain for the given block.
* @return stateHash
**/
@ApiModelProperty(example = "011811795453FA9FBD9DAC969085F8938BBFEDE3A3FDDC0C93B8FD6C4E7B2840", required = true, value = "For each block, the state of the blockchain is stored in RocksDB, forming a patricia tree. The root of the tree summarizes the state of the blockchain for the given block. ")
public String getStateHash() {
return stateHash;
}
public void setStateHash(String stateHash) {
this.stateHash = stateHash;
}
public BlockDTOAllOf beneficiary(String beneficiary) {
this.beneficiary = beneficiary;
return this;
}
/**
* The public key of the optional beneficiary designated by harvester.
* @return beneficiary
**/
@ApiModelProperty(example = "0", required = true, value = "The public key of the optional beneficiary designated by harvester.")
public String getBeneficiary() {
return beneficiary;
}
public void setBeneficiary(String beneficiary) {
this.beneficiary = beneficiary;
}
public BlockDTOAllOf feeInterest(Integer feeInterest) {
this.feeInterest = feeInterest;
return this;
}
/**
* The part of the transaction fee harvester is willing to get. From 0 up to FeeInterestDenominator. The customer gets (FeeInterest / FeeInterestDenominator)'th part of the maximum transaction fee.
* @return feeInterest
**/
@ApiModelProperty(example = "0", required = true, value = "The part of the transaction fee harvester is willing to get. From 0 up to FeeInterestDenominator. The customer gets (FeeInterest / FeeInterestDenominator)'th part of the maximum transaction fee.")
public Integer getFeeInterest() {
return feeInterest;
}
public void setFeeInterest(Integer feeInterest) {
this.feeInterest = feeInterest;
}
public BlockDTOAllOf feeInterestDenominator(Integer feeInterestDenominator) {
this.feeInterestDenominator = feeInterestDenominator;
return this;
}
/**
* Denominator of the transaction fee.
* @return feeInterestDenominator
**/
@ApiModelProperty(example = "0", required = true, value = "Denominator of the transaction fee.")
public Integer getFeeInterestDenominator() {
return feeInterestDenominator;
}
public void setFeeInterestDenominator(Integer feeInterestDenominator) {
this.feeInterestDenominator = feeInterestDenominator;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BlockDTOAllOf blockDTOAllOf = (BlockDTOAllOf) o;
return Objects.equals(this.height, blockDTOAllOf.height) &&
Objects.equals(this.timestamp, blockDTOAllOf.timestamp) &&
Objects.equals(this.difficulty, blockDTOAllOf.difficulty) &&
Objects.equals(this.feeMultiplier, blockDTOAllOf.feeMultiplier) &&
Objects.equals(this.previousBlockHash, blockDTOAllOf.previousBlockHash) &&
Objects.equals(this.blockTransactionsHash, blockDTOAllOf.blockTransactionsHash) &&
Objects.equals(this.blockReceiptsHash, blockDTOAllOf.blockReceiptsHash) &&
Objects.equals(this.stateHash, blockDTOAllOf.stateHash) &&
Objects.equals(this.beneficiary, blockDTOAllOf.beneficiary) &&
Objects.equals(this.feeInterest, blockDTOAllOf.feeInterest) &&
Objects.equals(this.feeInterestDenominator, blockDTOAllOf.feeInterestDenominator);
}
@Override
public int hashCode() {
return Objects.hash(height, timestamp, difficulty, feeMultiplier, previousBlockHash, blockTransactionsHash, blockReceiptsHash, stateHash, beneficiary, feeInterest, feeInterestDenominator);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BlockDTOAllOf {\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(" feeMultiplier: ").append(toIndentedString(feeMultiplier)).append("\n");
sb.append(" previousBlockHash: ").append(toIndentedString(previousBlockHash)).append("\n");
sb.append(" blockTransactionsHash: ").append(toIndentedString(blockTransactionsHash)).append("\n");
sb.append(" blockReceiptsHash: ").append(toIndentedString(blockReceiptsHash)).append("\n");
sb.append(" stateHash: ").append(toIndentedString(stateHash)).append("\n");
sb.append(" beneficiary: ").append(toIndentedString(beneficiary)).append("\n");
sb.append(" feeInterest: ").append(toIndentedString(feeInterest)).append("\n");
sb.append(" feeInterestDenominator: ").append(toIndentedString(feeInterestDenominator)).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 ");
}
}