Class FixedFee.Builder

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

public static final class FixedFee.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<FixedFee,FixedFee.Builder> implements FixedFeeOrBuilder
 *
 A fixed fee to assess for each token transfer, regardless of the
 amount transferred.<br/>
 This fee type describes a fixed fee for each transfer of a token type.

 The fee SHALL be charged to the `sender` for the token transfer
 transaction.<br/>
 This fee MAY be assessed in HBAR, the token type transferred, or any
 other token type, as determined by the `denominating_token_id` field.
 
Protobuf type proto.FixedFee
  • Method Details

    • getAmount

      public long getAmount()
       *
       The amount to assess for each transfer.
       <p>
       This value MUST be greater than `0`.<br/>
       This amount is expressed in units of 10<sup>-decimals</sup> tokens.
       
      int64 amount = 1;
      Specified by:
      getAmount in interface FixedFeeOrBuilder
      Returns:
      The amount.
    • setAmount

      public FixedFee.Builder setAmount(long value)
       *
       The amount to assess for each transfer.
       <p>
       This value MUST be greater than `0`.<br/>
       This amount is 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 FixedFee.Builder clearAmount()
       *
       The amount to assess for each transfer.
       <p>
       This value MUST be greater than `0`.<br/>
       This amount is expressed in units of 10<sup>-decimals</sup> tokens.
       
      int64 amount = 1;
      Returns:
      This builder for chaining.
    • hasDenominatingTokenId

      public boolean hasDenominatingTokenId()
       *
       The token type used to pay the assessed fee.
       <p>
       If this is unset, the fee SHALL be assessed in HBAR.<br/>
       If this is set, the fee SHALL be assessed in the token identified.
       This MAY be any token type. Custom fees assessed in other token types
       are more likely to fail, however, and it is RECOMMENDED that token
       creators denominate custom fees in the transferred token, HBAR, or
       well documented and closely related token types.<br/>
       If this value is set to `0.0.0` in the `tokenCreate` transaction, it
       SHALL be replaced with the `TokenID` of the newly created token.
       
      .proto.TokenID denominating_token_id = 2;
      Specified by:
      hasDenominatingTokenId in interface FixedFeeOrBuilder
      Returns:
      Whether the denominatingTokenId field is set.
    • getDenominatingTokenId

      public TokenID getDenominatingTokenId()
       *
       The token type used to pay the assessed fee.
       <p>
       If this is unset, the fee SHALL be assessed in HBAR.<br/>
       If this is set, the fee SHALL be assessed in the token identified.
       This MAY be any token type. Custom fees assessed in other token types
       are more likely to fail, however, and it is RECOMMENDED that token
       creators denominate custom fees in the transferred token, HBAR, or
       well documented and closely related token types.<br/>
       If this value is set to `0.0.0` in the `tokenCreate` transaction, it
       SHALL be replaced with the `TokenID` of the newly created token.
       
      .proto.TokenID denominating_token_id = 2;
      Specified by:
      getDenominatingTokenId in interface FixedFeeOrBuilder
      Returns:
      The denominatingTokenId.
    • setDenominatingTokenId

      public FixedFee.Builder setDenominatingTokenId(TokenID value)
       *
       The token type used to pay the assessed fee.
       <p>
       If this is unset, the fee SHALL be assessed in HBAR.<br/>
       If this is set, the fee SHALL be assessed in the token identified.
       This MAY be any token type. Custom fees assessed in other token types
       are more likely to fail, however, and it is RECOMMENDED that token
       creators denominate custom fees in the transferred token, HBAR, or
       well documented and closely related token types.<br/>
       If this value is set to `0.0.0` in the `tokenCreate` transaction, it
       SHALL be replaced with the `TokenID` of the newly created token.
       
      .proto.TokenID denominating_token_id = 2;
    • setDenominatingTokenId

      public FixedFee.Builder setDenominatingTokenId(TokenID.Builder builderForValue)
       *
       The token type used to pay the assessed fee.
       <p>
       If this is unset, the fee SHALL be assessed in HBAR.<br/>
       If this is set, the fee SHALL be assessed in the token identified.
       This MAY be any token type. Custom fees assessed in other token types
       are more likely to fail, however, and it is RECOMMENDED that token
       creators denominate custom fees in the transferred token, HBAR, or
       well documented and closely related token types.<br/>
       If this value is set to `0.0.0` in the `tokenCreate` transaction, it
       SHALL be replaced with the `TokenID` of the newly created token.
       
      .proto.TokenID denominating_token_id = 2;
    • mergeDenominatingTokenId

      public FixedFee.Builder mergeDenominatingTokenId(TokenID value)
       *
       The token type used to pay the assessed fee.
       <p>
       If this is unset, the fee SHALL be assessed in HBAR.<br/>
       If this is set, the fee SHALL be assessed in the token identified.
       This MAY be any token type. Custom fees assessed in other token types
       are more likely to fail, however, and it is RECOMMENDED that token
       creators denominate custom fees in the transferred token, HBAR, or
       well documented and closely related token types.<br/>
       If this value is set to `0.0.0` in the `tokenCreate` transaction, it
       SHALL be replaced with the `TokenID` of the newly created token.
       
      .proto.TokenID denominating_token_id = 2;
    • clearDenominatingTokenId

      public FixedFee.Builder clearDenominatingTokenId()
       *
       The token type used to pay the assessed fee.
       <p>
       If this is unset, the fee SHALL be assessed in HBAR.<br/>
       If this is set, the fee SHALL be assessed in the token identified.
       This MAY be any token type. Custom fees assessed in other token types
       are more likely to fail, however, and it is RECOMMENDED that token
       creators denominate custom fees in the transferred token, HBAR, or
       well documented and closely related token types.<br/>
       If this value is set to `0.0.0` in the `tokenCreate` transaction, it
       SHALL be replaced with the `TokenID` of the newly created token.
       
      .proto.TokenID denominating_token_id = 2;