Class AssessedCustomFee.Builder

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

public static final class AssessedCustomFee.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<AssessedCustomFee,AssessedCustomFee.Builder> implements AssessedCustomFeeOrBuilder
 *
 Description of a transfer added to a `cryptoTransfer` transaction that
 satisfies custom fee requirements.

 It is important to note that this is not the actual transfer. The transfer
 of value SHALL be merged into the original transaction to minimize the
 number of actual transfers. This descriptor presents the fee assessed
 separately in the record stream so that the details of the fee assessed
 are not hidden in this process.
 
Protobuf type proto.AssessedCustomFee
  • Method Details

    • getAmount

      public long getAmount()
       *
       An amount of tokens assessed for this custom fee.
       <p>
       This shall be expressed in units of 10<sup>-decimals</sup> tokens.
       
      int64 amount = 1;
      Specified by:
      getAmount in interface AssessedCustomFeeOrBuilder
      Returns:
      The amount.
    • setAmount

      public AssessedCustomFee.Builder setAmount(long value)
       *
       An amount of tokens assessed for this custom fee.
       <p>
       This shall be expressed in units of 10<sup>-decimals</sup> tokens.
       
      int64 amount = 1;
      Parameters:
      value - The amount to set.
      Returns:
      This builder for chaining.
    • clearAmount

      public AssessedCustomFee.Builder clearAmount()
       *
       An amount of tokens assessed for this custom fee.
       <p>
       This shall be expressed in units of 10<sup>-decimals</sup> tokens.
       
      int64 amount = 1;
      Returns:
      This builder for chaining.
    • hasTokenId

      public boolean hasTokenId()
       *
       The token transferred to satisfy this fee.
       <p>
       If the token transferred is HBAR, this field SHALL NOT be set.
       
      .proto.TokenID token_id = 2;
      Specified by:
      hasTokenId in interface AssessedCustomFeeOrBuilder
      Returns:
      Whether the tokenId field is set.
    • getTokenId

      public TokenID getTokenId()
       *
       The token transferred to satisfy this fee.
       <p>
       If the token transferred is HBAR, this field SHALL NOT be set.
       
      .proto.TokenID token_id = 2;
      Specified by:
      getTokenId in interface AssessedCustomFeeOrBuilder
      Returns:
      The tokenId.
    • setTokenId

      public AssessedCustomFee.Builder setTokenId(TokenID value)
       *
       The token transferred to satisfy this fee.
       <p>
       If the token transferred is HBAR, this field SHALL NOT be set.
       
      .proto.TokenID token_id = 2;
    • setTokenId

      public AssessedCustomFee.Builder setTokenId(TokenID.Builder builderForValue)
       *
       The token transferred to satisfy this fee.
       <p>
       If the token transferred is HBAR, this field SHALL NOT be set.
       
      .proto.TokenID token_id = 2;
    • mergeTokenId

      public AssessedCustomFee.Builder mergeTokenId(TokenID value)
       *
       The token transferred to satisfy this fee.
       <p>
       If the token transferred is HBAR, this field SHALL NOT be set.
       
      .proto.TokenID token_id = 2;
    • clearTokenId

      public AssessedCustomFee.Builder clearTokenId()
       *
       The token transferred to satisfy this fee.
       <p>
       If the token transferred is HBAR, this field SHALL NOT be set.
       
      .proto.TokenID token_id = 2;
    • hasFeeCollectorAccountId

      public boolean hasFeeCollectorAccountId()
       *
       An account that received the fee assessed.
       <p>
       This SHALL NOT be the sender or receiver of the original
       cryptoTransfer transaction.
       
      .proto.AccountID fee_collector_account_id = 3;
      Specified by:
      hasFeeCollectorAccountId in interface AssessedCustomFeeOrBuilder
      Returns:
      Whether the feeCollectorAccountId field is set.
    • getFeeCollectorAccountId

      public AccountID getFeeCollectorAccountId()
       *
       An account that received the fee assessed.
       <p>
       This SHALL NOT be the sender or receiver of the original
       cryptoTransfer transaction.
       
      .proto.AccountID fee_collector_account_id = 3;
      Specified by:
      getFeeCollectorAccountId in interface AssessedCustomFeeOrBuilder
      Returns:
      The feeCollectorAccountId.
    • setFeeCollectorAccountId

      public AssessedCustomFee.Builder setFeeCollectorAccountId(AccountID value)
       *
       An account that received the fee assessed.
       <p>
       This SHALL NOT be the sender or receiver of the original
       cryptoTransfer transaction.
       
      .proto.AccountID fee_collector_account_id = 3;
    • setFeeCollectorAccountId

      public AssessedCustomFee.Builder setFeeCollectorAccountId(AccountID.Builder builderForValue)
       *
       An account that received the fee assessed.
       <p>
       This SHALL NOT be the sender or receiver of the original
       cryptoTransfer transaction.
       
      .proto.AccountID fee_collector_account_id = 3;
    • mergeFeeCollectorAccountId

      public AssessedCustomFee.Builder mergeFeeCollectorAccountId(AccountID value)
       *
       An account that received the fee assessed.
       <p>
       This SHALL NOT be the sender or receiver of the original
       cryptoTransfer transaction.
       
      .proto.AccountID fee_collector_account_id = 3;
    • clearFeeCollectorAccountId

      public AssessedCustomFee.Builder clearFeeCollectorAccountId()
       *
       An account that received the fee assessed.
       <p>
       This SHALL NOT be the sender or receiver of the original
       cryptoTransfer transaction.
       
      .proto.AccountID fee_collector_account_id = 3;
    • getEffectivePayerAccountIdList

      public List<AccountID> getEffectivePayerAccountIdList()
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
      Specified by:
      getEffectivePayerAccountIdList in interface AssessedCustomFeeOrBuilder
    • getEffectivePayerAccountIdCount

      public int getEffectivePayerAccountIdCount()
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
      Specified by:
      getEffectivePayerAccountIdCount in interface AssessedCustomFeeOrBuilder
    • getEffectivePayerAccountId

      public AccountID getEffectivePayerAccountId(int index)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
      Specified by:
      getEffectivePayerAccountId in interface AssessedCustomFeeOrBuilder
    • setEffectivePayerAccountId

      public AssessedCustomFee.Builder setEffectivePayerAccountId(int index, AccountID value)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • setEffectivePayerAccountId

      public AssessedCustomFee.Builder setEffectivePayerAccountId(int index, AccountID.Builder builderForValue)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • addEffectivePayerAccountId

      public AssessedCustomFee.Builder addEffectivePayerAccountId(AccountID value)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • addEffectivePayerAccountId

      public AssessedCustomFee.Builder addEffectivePayerAccountId(int index, AccountID value)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • addEffectivePayerAccountId

      public AssessedCustomFee.Builder addEffectivePayerAccountId(AccountID.Builder builderForValue)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • addEffectivePayerAccountId

      public AssessedCustomFee.Builder addEffectivePayerAccountId(int index, AccountID.Builder builderForValue)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • addAllEffectivePayerAccountId

      public AssessedCustomFee.Builder addAllEffectivePayerAccountId(Iterable<? extends AccountID> values)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • clearEffectivePayerAccountId

      public AssessedCustomFee.Builder clearEffectivePayerAccountId()
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;
    • removeEffectivePayerAccountId

      public AssessedCustomFee.Builder removeEffectivePayerAccountId(int index)
       *
       An account that provided the tokens assessed as a fee.
       <p>
       This SHALL be the account that _would have_ had a higher balance
       absent the fee. In most cases this SHALL be the `sender`, but
       some _fractional_ fees reduce the amount transferred, and in those
       cases the `receiver` SHALL be the effective payer for the fee.<br/>
       There are currently no situations where a third party pays a custom
       fee. This MAY change in a future release.
       
      repeated .proto.AccountID effective_payer_account_id = 4;