Class CryptoApproveAllowanceTransactionBody.Builder

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

public static final class CryptoApproveAllowanceTransactionBody.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<CryptoApproveAllowanceTransactionBody,CryptoApproveAllowanceTransactionBody.Builder> implements CryptoApproveAllowanceTransactionBodyOrBuilder
 *
 Create ("Approve") allowances for one account to transfer tokens owned
 by a different account.<br/>
 An allowance permits a "spender" account to independently transfer tokens
 owned by a separate "owner" account. Each such allowance permits spending
 any amount, up to a specified limit, for fungible/common tokens; a single
 specified non-fungible/unique token, or all non-fungible/unique tokens
 of a particular token type held by the "owner" account.

 If the "owner" account is not specified for any allowance in this
 transaction (the `owner` field is not set), the `payer` account for this
 transaction SHALL be owner for that allowance.<br/>
 Each `owner` account specified in any allowance approved in this
 transaction MUST sign this transaction.<br/>
 If the `amount` field for any fungible/common allowance in this
 transaction is `0`, then that allowance SHOULD match an existing,
 previously approved, allowance which SHALL be removed.<br/>
 There are three lists in this message. Each list MAY be empty, but
 _at least one_ list MUST contain _at least one_ entry.

 Example for the `payer` rule.<br/>
 - Given an account `0.0.X` that pays for this transaction, and owner
 is not specified in an allowance of `200` HBAR to spender account
 `0.0.Y`. At consensus the spender account `0.0.Y` will have a new
 allowance to spend `200` HBAR from the balance of account `0.0.X`.

 ### Block Stream Effects
 None
 
Protobuf type proto.CryptoApproveAllowanceTransactionBody
  • Method Details

    • getCryptoAllowancesList

      public List<CryptoAllowance> getCryptoAllowancesList()
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
      Specified by:
      getCryptoAllowancesList in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • getCryptoAllowancesCount

      public int getCryptoAllowancesCount()
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
      Specified by:
      getCryptoAllowancesCount in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • getCryptoAllowances

      public CryptoAllowance getCryptoAllowances(int index)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
      Specified by:
      getCryptoAllowances in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • setCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder setCryptoAllowances(int index, CryptoAllowance value)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • setCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder setCryptoAllowances(int index, CryptoAllowance.Builder builderForValue)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • addCryptoAllowances

       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • addCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addCryptoAllowances(int index, CryptoAllowance value)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • addCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addCryptoAllowances(CryptoAllowance.Builder builderForValue)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • addCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addCryptoAllowances(int index, CryptoAllowance.Builder builderForValue)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • addAllCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addAllCryptoAllowances(Iterable<? extends CryptoAllowance> values)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • clearCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder clearCryptoAllowances()
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • removeCryptoAllowances

      public CryptoApproveAllowanceTransactionBody.Builder removeCryptoAllowances(int index)
       *
       List of hbar allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.CryptoAllowance cryptoAllowances = 1;
    • getNftAllowancesList

      public List<NftAllowance> getNftAllowancesList()
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
      Specified by:
      getNftAllowancesList in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • getNftAllowancesCount

      public int getNftAllowancesCount()
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
      Specified by:
      getNftAllowancesCount in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • getNftAllowances

      public NftAllowance getNftAllowances(int index)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
      Specified by:
      getNftAllowances in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • setNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder setNftAllowances(int index, NftAllowance value)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • setNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder setNftAllowances(int index, NftAllowance.Builder builderForValue)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • addNftAllowances

       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • addNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addNftAllowances(int index, NftAllowance value)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • addNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addNftAllowances(NftAllowance.Builder builderForValue)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • addNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addNftAllowances(int index, NftAllowance.Builder builderForValue)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • addAllNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addAllNftAllowances(Iterable<? extends NftAllowance> values)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • clearNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder clearNftAllowances()
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • removeNftAllowances

      public CryptoApproveAllowanceTransactionBody.Builder removeNftAllowances(int index)
       *
       List of non-fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.NftAllowance nftAllowances = 2;
    • getTokenAllowancesList

      public List<TokenAllowance> getTokenAllowancesList()
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
      Specified by:
      getTokenAllowancesList in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • getTokenAllowancesCount

      public int getTokenAllowancesCount()
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
      Specified by:
      getTokenAllowancesCount in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • getTokenAllowances

      public TokenAllowance getTokenAllowances(int index)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
      Specified by:
      getTokenAllowances in interface CryptoApproveAllowanceTransactionBodyOrBuilder
    • setTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder setTokenAllowances(int index, TokenAllowance value)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • setTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder setTokenAllowances(int index, TokenAllowance.Builder builderForValue)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • addTokenAllowances

       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • addTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addTokenAllowances(int index, TokenAllowance value)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • addTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addTokenAllowances(TokenAllowance.Builder builderForValue)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • addTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addTokenAllowances(int index, TokenAllowance.Builder builderForValue)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • addAllTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder addAllTokenAllowances(Iterable<? extends TokenAllowance> values)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • clearTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder clearTokenAllowances()
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;
    • removeTokenAllowances

      public CryptoApproveAllowanceTransactionBody.Builder removeTokenAllowances(int index)
       *
       List of fungible token allowances approved by the account owner.
       <p>
       This list MAY be empty, provided at least one other list is
       not empty.
       
      repeated .proto.TokenAllowance tokenAllowances = 3;