Class AccountFungibleTokenAllowance.Builder

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

public static final class AccountFungibleTokenAllowance.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<AccountFungibleTokenAllowance,AccountFungibleTokenAllowance.Builder> implements AccountFungibleTokenAllowanceOrBuilder
 *
 Permission granted by one account (the "funding" account) to another account
 (the "spender" account) that allows the spender to spend a specified amount
 of a specific non-HBAR fungible token from the balance owned by the funding
 account.

 An allowance SHALL NOT transfer any tokens directly, it only permits
 transactions signed only by the spender account to transfer tokens of the
 specified type, up to the amount specified, from the funding account.

 Once the specified amount is spent, the allowance SHALL be consumed and a
 new allowance SHALL be required before that spending account may spend
 additional tokens from the funding account.
 
Protobuf type proto.AccountFungibleTokenAllowance
  • Method Details

    • hasTokenId

      public boolean hasTokenId()
       *
       The identifier for the token associated with this allowance.
       <p>
       This token MUST be a fungible/common token.
       
      .proto.TokenID token_id = 1;
      Specified by:
      hasTokenId in interface AccountFungibleTokenAllowanceOrBuilder
      Returns:
      Whether the tokenId field is set.
    • getTokenId

      public TokenID getTokenId()
       *
       The identifier for the token associated with this allowance.
       <p>
       This token MUST be a fungible/common token.
       
      .proto.TokenID token_id = 1;
      Specified by:
      getTokenId in interface AccountFungibleTokenAllowanceOrBuilder
      Returns:
      The tokenId.
    • setTokenId

       *
       The identifier for the token associated with this allowance.
       <p>
       This token MUST be a fungible/common token.
       
      .proto.TokenID token_id = 1;
    • setTokenId

      public AccountFungibleTokenAllowance.Builder setTokenId(TokenID.Builder builderForValue)
       *
       The identifier for the token associated with this allowance.
       <p>
       This token MUST be a fungible/common token.
       
      .proto.TokenID token_id = 1;
    • mergeTokenId

      public AccountFungibleTokenAllowance.Builder mergeTokenId(TokenID value)
       *
       The identifier for the token associated with this allowance.
       <p>
       This token MUST be a fungible/common token.
       
      .proto.TokenID token_id = 1;
    • clearTokenId

       *
       The identifier for the token associated with this allowance.
       <p>
       This token MUST be a fungible/common token.
       
      .proto.TokenID token_id = 1;
    • hasSpenderId

      public boolean hasSpenderId()
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend tokens of
       the associated token type from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender_id = 2;
      Specified by:
      hasSpenderId in interface AccountFungibleTokenAllowanceOrBuilder
      Returns:
      Whether the spenderId field is set.
    • getSpenderId

      public AccountID getSpenderId()
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend tokens of
       the associated token type from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender_id = 2;
      Specified by:
      getSpenderId in interface AccountFungibleTokenAllowanceOrBuilder
      Returns:
      The spenderId.
    • setSpenderId

      public AccountFungibleTokenAllowance.Builder setSpenderId(AccountID value)
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend tokens of
       the associated token type from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender_id = 2;
    • setSpenderId

      public AccountFungibleTokenAllowance.Builder setSpenderId(AccountID.Builder builderForValue)
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend tokens of
       the associated token type from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender_id = 2;
    • mergeSpenderId

      public AccountFungibleTokenAllowance.Builder mergeSpenderId(AccountID value)
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend tokens of
       the associated token type from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender_id = 2;
    • clearSpenderId

      public AccountFungibleTokenAllowance.Builder clearSpenderId()
       *
       The identifier for the spending account associated with this allowance.
       <p>
       This account SHALL be permitted to sign transactions to spend tokens of
       the associated token type from the funding/allowing account.<br/>
       This permission SHALL be limited to no more than the specified `amount`.
       
      .proto.AccountID spender_id = 2;
    • getAmount

      public long getAmount()
      
       The maximum amount that the spender account may transfer within the
       scope of this allowance.
       <p>
       This allowance SHALL be consumed if any combination of transfers
       authorized via this allowance meet this value in total.<br/>
       This value MUST be specified in the smallest units of the relevant token
       (i.e. 10<sup>-decimals</sup> whole tokens).
       
      int64 amount = 3;
      Specified by:
      getAmount in interface AccountFungibleTokenAllowanceOrBuilder
      Returns:
      The amount.
    • setAmount

      public AccountFungibleTokenAllowance.Builder setAmount(long value)
      
       The maximum amount that the spender account may transfer within the
       scope of this allowance.
       <p>
       This allowance SHALL be consumed if any combination of transfers
       authorized via this allowance meet this value in total.<br/>
       This value MUST be specified in the smallest units of the relevant token
       (i.e. 10<sup>-decimals</sup> whole tokens).
       
      int64 amount = 3;
      Parameters:
      value - The amount to set.
      Returns:
      This builder for chaining.
    • clearAmount

      
       The maximum amount that the spender account may transfer within the
       scope of this allowance.
       <p>
       This allowance SHALL be consumed if any combination of transfers
       authorized via this allowance meet this value in total.<br/>
       This value MUST be specified in the smallest units of the relevant token
       (i.e. 10<sup>-decimals</sup> whole tokens).
       
      int64 amount = 3;
      Returns:
      This builder for chaining.