Class TransactionResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<TransactionResponse,TransactionResponse.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<TransactionResponse,TransactionResponse.Builder>
com.hedera.hashgraph.sdk.proto.TransactionResponse.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, TransactionResponseOrBuilder, Cloneable
Enclosing class:
TransactionResponse

public static final class TransactionResponse.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<TransactionResponse,TransactionResponse.Builder> implements TransactionResponseOrBuilder
 *
 A message sent by a node in response to a transaction submission.<br/>
 This message only acknowledges that the individual node has checked
 the transaction, completed pre-check, and checked the fee offered.

 If the transaction fee is not sufficient, the `nodeTransactionPrecheckCode`
 value SHALL be `INSUFFICIENT_TX_FEE` and the `cost` field SHALL be the
 actual transaction fee, in tinybar, required.<br/>
 If the client requires acknowledgement of the network consensus result
 for a transaction, the client SHOULD request a transaction receipt or
 detailed transaction record. A client MAY also obtain network consensus
 results from a mirror node.
 
Protobuf type proto.TransactionResponse
  • Method Details

    • getNodeTransactionPrecheckCodeValue

      public int getNodeTransactionPrecheckCodeValue()
       *
       A pre-consensus response code.
       <p>
       This response SHALL represent the response of the individual node, and
       SHALL NOT represent the consensus of the network.
       
      .proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;
      Specified by:
      getNodeTransactionPrecheckCodeValue in interface TransactionResponseOrBuilder
      Returns:
      The enum numeric value on the wire for nodeTransactionPrecheckCode.
    • setNodeTransactionPrecheckCodeValue

      public TransactionResponse.Builder setNodeTransactionPrecheckCodeValue(int value)
       *
       A pre-consensus response code.
       <p>
       This response SHALL represent the response of the individual node, and
       SHALL NOT represent the consensus of the network.
       
      .proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;
      Parameters:
      value - The nodeTransactionPrecheckCode to set.
      Returns:
      This builder for chaining.
      Throws:
      IllegalArgumentException - if UNRECOGNIZED is provided.
    • getNodeTransactionPrecheckCode

      public ResponseCodeEnum getNodeTransactionPrecheckCode()
       *
       A pre-consensus response code.
       <p>
       This response SHALL represent the response of the individual node, and
       SHALL NOT represent the consensus of the network.
       
      .proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;
      Specified by:
      getNodeTransactionPrecheckCode in interface TransactionResponseOrBuilder
      Returns:
      The nodeTransactionPrecheckCode.
    • setNodeTransactionPrecheckCode

      public TransactionResponse.Builder setNodeTransactionPrecheckCode(ResponseCodeEnum value)
       *
       A pre-consensus response code.
       <p>
       This response SHALL represent the response of the individual node, and
       SHALL NOT represent the consensus of the network.
       
      .proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;
      Parameters:
      value - The enum numeric value on the wire for nodeTransactionPrecheckCode to set.
      Returns:
      This builder for chaining.
    • clearNodeTransactionPrecheckCode

      public TransactionResponse.Builder clearNodeTransactionPrecheckCode()
       *
       A pre-consensus response code.
       <p>
       This response SHALL represent the response of the individual node, and
       SHALL NOT represent the consensus of the network.
       
      .proto.ResponseCodeEnum nodeTransactionPrecheckCode = 1;
      Returns:
      This builder for chaining.
    • getCost

      public long getCost()
       *
       An approximate transaction fee.
       <p>
       This value SHALL be `0` unless the `nodeTransactionPrecheckCode` is
       `INSUFFICIENT_TX_FEE`.<br/>
       This value SHOULD be an amount, in tinybar, that _would have_ succeeded
       at the time the transaction was submitted.<br/>
       Note that this amount is not guaranteed to succeed in a future
       transaction due to uncontrolled variables, such as network congestion,
       but should be considered a close approximation.
       
      uint64 cost = 2;
      Specified by:
      getCost in interface TransactionResponseOrBuilder
      Returns:
      The cost.
    • setCost

      public TransactionResponse.Builder setCost(long value)
       *
       An approximate transaction fee.
       <p>
       This value SHALL be `0` unless the `nodeTransactionPrecheckCode` is
       `INSUFFICIENT_TX_FEE`.<br/>
       This value SHOULD be an amount, in tinybar, that _would have_ succeeded
       at the time the transaction was submitted.<br/>
       Note that this amount is not guaranteed to succeed in a future
       transaction due to uncontrolled variables, such as network congestion,
       but should be considered a close approximation.
       
      uint64 cost = 2;
      Parameters:
      value - The cost to set.
      Returns:
      This builder for chaining.
    • clearCost

      public TransactionResponse.Builder clearCost()
       *
       An approximate transaction fee.
       <p>
       This value SHALL be `0` unless the `nodeTransactionPrecheckCode` is
       `INSUFFICIENT_TX_FEE`.<br/>
       This value SHOULD be an amount, in tinybar, that _would have_ succeeded
       at the time the transaction was submitted.<br/>
       Note that this amount is not guaranteed to succeed in a future
       transaction due to uncontrolled variables, such as network congestion,
       but should be considered a close approximation.
       
      uint64 cost = 2;
      Returns:
      This builder for chaining.