Class TokenAllowance.Builder

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

public static final class TokenAllowance.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<TokenAllowance,TokenAllowance.Builder> implements TokenAllowanceOrBuilder
 *
 An approved allowance of fungible/common token transfers.
 This message specifies one allowance for a single, unique, combination
 of token, owner, spender, and amount.

 If `owner` is not set, the effective `owner` SHALL be the `payer` for the
 enclosing transaction.<br/>
 The `tokenId` MUST be specified and MUST be a valid
 fungible/common token type.<br/>
 The `spender` MUST be specified and MUST be a valid account.<br/>
 The `amount` MUST be a whole number, and SHOULD be greater than `0` unless
 this allowance is intended to _remove_ a previously approved allowance.
 
Protobuf type proto.TokenAllowance
  • Field Summary

    Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    * An amount of fractional tokens (10<sup>-decimals</sup> tokens).<br/> This is the amount of tokens held by the `owner` that the `spender` is permitted to transfer.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    * A token identifier.<br/> This identifies the type of token the `spender` is permitted to transfer from the `owner`.
    long
    * An amount of fractional tokens (10<sup>-decimals</sup> tokens).<br/> This is the amount of tokens held by the `owner` that the `spender` is permitted to transfer.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    * A token identifier.<br/> This identifies the type of token the `spender` is permitted to transfer from the `owner`.
    boolean
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    boolean
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    boolean
    * A token identifier.<br/> This identifies the type of token the `spender` is permitted to transfer from the `owner`.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    * A token identifier.<br/> This identifies the type of token the `spender` is permitted to transfer from the `owner`.
    setAmount(long value)
    * An amount of fractional tokens (10<sup>-decimals</sup> tokens).<br/> This is the amount of tokens held by the `owner` that the `spender` is permitted to transfer.
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    setOwner(AccountID.Builder builderForValue)
    * An owner account identifier.<br/> This is the account identifier of the account granting an allowance for the `spender` to transfer tokens held by this account.
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    setSpender(AccountID.Builder builderForValue)
    * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.
    * A token identifier.<br/> This identifies the type of token the `spender` is permitted to transfer from the `owner`.
    setTokenId(TokenID.Builder builderForValue)
    * A token identifier.<br/> This identifies the type of token the `spender` is permitted to transfer from the `owner`.

    Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Method Details

    • hasTokenId

      public boolean hasTokenId()
       *
       A token identifier.<br/>
       This identifies the type of token the `spender` is permitted to
       transfer from the `owner`.
       <p>
       The identified token type MUST be a fungible/common token.
       
      .proto.TokenID tokenId = 1;
      Specified by:
      hasTokenId in interface TokenAllowanceOrBuilder
      Returns:
      Whether the tokenId field is set.
    • getTokenId

      public TokenID getTokenId()
       *
       A token identifier.<br/>
       This identifies the type of token the `spender` is permitted to
       transfer from the `owner`.
       <p>
       The identified token type MUST be a fungible/common token.
       
      .proto.TokenID tokenId = 1;
      Specified by:
      getTokenId in interface TokenAllowanceOrBuilder
      Returns:
      The tokenId.
    • setTokenId

      public TokenAllowance.Builder setTokenId(TokenID value)
       *
       A token identifier.<br/>
       This identifies the type of token the `spender` is permitted to
       transfer from the `owner`.
       <p>
       The identified token type MUST be a fungible/common token.
       
      .proto.TokenID tokenId = 1;
    • setTokenId

      public TokenAllowance.Builder setTokenId(TokenID.Builder builderForValue)
       *
       A token identifier.<br/>
       This identifies the type of token the `spender` is permitted to
       transfer from the `owner`.
       <p>
       The identified token type MUST be a fungible/common token.
       
      .proto.TokenID tokenId = 1;
    • mergeTokenId

      public TokenAllowance.Builder mergeTokenId(TokenID value)
       *
       A token identifier.<br/>
       This identifies the type of token the `spender` is permitted to
       transfer from the `owner`.
       <p>
       The identified token type MUST be a fungible/common token.
       
      .proto.TokenID tokenId = 1;
    • clearTokenId

      public TokenAllowance.Builder clearTokenId()
       *
       A token identifier.<br/>
       This identifies the type of token the `spender` is permitted to
       transfer from the `owner`.
       <p>
       The identified token type MUST be a fungible/common token.
       
      .proto.TokenID tokenId = 1;
    • hasOwner

      public boolean hasOwner()
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 2;
      Specified by:
      hasOwner in interface TokenAllowanceOrBuilder
      Returns:
      Whether the owner field is set.
    • getOwner

      public AccountID getOwner()
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 2;
      Specified by:
      getOwner in interface TokenAllowanceOrBuilder
      Returns:
      The owner.
    • setOwner

      public TokenAllowance.Builder setOwner(AccountID value)
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 2;
    • setOwner

      public TokenAllowance.Builder setOwner(AccountID.Builder builderForValue)
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 2;
    • mergeOwner

      public TokenAllowance.Builder mergeOwner(AccountID value)
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 2;
    • clearOwner

      public TokenAllowance.Builder clearOwner()
       *
       An owner account identifier.<br/>
       This is the account identifier of the account granting an allowance
       for the `spender` to transfer tokens held by this account.
       
      .proto.AccountID owner = 2;
    • hasSpender

      public boolean hasSpender()
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 3;
      Specified by:
      hasSpender in interface TokenAllowanceOrBuilder
      Returns:
      Whether the spender field is set.
    • getSpender

      public AccountID getSpender()
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 3;
      Specified by:
      getSpender in interface TokenAllowanceOrBuilder
      Returns:
      The spender.
    • setSpender

      public TokenAllowance.Builder setSpender(AccountID value)
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 3;
    • setSpender

      public TokenAllowance.Builder setSpender(AccountID.Builder builderForValue)
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 3;
    • mergeSpender

      public TokenAllowance.Builder mergeSpender(AccountID value)
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 3;
    • clearSpender

      public TokenAllowance.Builder clearSpender()
       *
       A spender account identifier.<br/>
       This is the account identifier of the account permitted to transfer
       tokens held by the `owner`.
       
      .proto.AccountID spender = 3;
    • getAmount

      public long getAmount()
       *
       An amount of fractional tokens (10<sup>-decimals</sup> tokens).<br/>
       This is the amount of tokens held by the `owner` that the
       `spender` is permitted to transfer.
       <p>
       This value MUST be a whole number.<br/>
       This value MUST be greater than 0 to create a new allowance.<br/>
       This value MAY be exactly `0` to _remove_ an existing allowance.<br/>
       
      int64 amount = 4;
      Specified by:
      getAmount in interface TokenAllowanceOrBuilder
      Returns:
      The amount.
    • setAmount

      public TokenAllowance.Builder setAmount(long value)
       *
       An amount of fractional tokens (10<sup>-decimals</sup> tokens).<br/>
       This is the amount of tokens held by the `owner` that the
       `spender` is permitted to transfer.
       <p>
       This value MUST be a whole number.<br/>
       This value MUST be greater than 0 to create a new allowance.<br/>
       This value MAY be exactly `0` to _remove_ an existing allowance.<br/>
       
      int64 amount = 4;
      Parameters:
      value - The amount to set.
      Returns:
      This builder for chaining.
    • clearAmount

      public TokenAllowance.Builder clearAmount()
       *
       An amount of fractional tokens (10<sup>-decimals</sup> tokens).<br/>
       This is the amount of tokens held by the `owner` that the
       `spender` is permitted to transfer.
       <p>
       This value MUST be a whole number.<br/>
       This value MUST be greater than 0 to create a new allowance.<br/>
       This value MAY be exactly `0` to _remove_ an existing allowance.<br/>
       
      int64 amount = 4;
      Returns:
      This builder for chaining.