Class AccountAmount.Builder

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

public static final class AccountAmount.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<AccountAmount,AccountAmount.Builder> implements AccountAmountOrBuilder
 *
 An account, and the amount that it sends or receives during a token transfer.

 This message is only relevant to fungible/common token transfers.
 Non-fungible/unique (NFT) token transfers MUST use the NftTransfer message.
 
Protobuf type proto.AccountAmount
  • Field Summary

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

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    * An account identifier that will send or receive token(s).
    * An amount to send (negative) or receive (positive).
     
    * An approved allowance flag.<br/> If true then the transfer is expected to be an approved allowance.
    * Two calls, the first call before attempting the CryptoTransfer, to a method with logical signature allowPre(HookContext, ProposedTransfers); and the second call after attempting the CryptoTransfer, to a method with logical signature allowPost(HookContext, ProposedTransfers).
    * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)
    * An account identifier that will send or receive token(s).
    long
    * An amount to send (negative) or receive (positive).
     
    boolean
    * An approved allowance flag.<br/> If true then the transfer is expected to be an approved allowance.
    * Two calls, the first call before attempting the CryptoTransfer, to a method with logical signature allowPre(HookContext, ProposedTransfers); and the second call after attempting the CryptoTransfer, to a method with logical signature allowPost(HookContext, ProposedTransfers).
    * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)
    boolean
    * An account identifier that will send or receive token(s).
    boolean
    * Two calls, the first call before attempting the CryptoTransfer, to a method with logical signature allowPre(HookContext, ProposedTransfers); and the second call after attempting the CryptoTransfer, to a method with logical signature allowPost(HookContext, ProposedTransfers).
    boolean
    * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)
    * An account identifier that will send or receive token(s).
    * Two calls, the first call before attempting the CryptoTransfer, to a method with logical signature allowPre(HookContext, ProposedTransfers); and the second call after attempting the CryptoTransfer, to a method with logical signature allowPost(HookContext, ProposedTransfers).
    * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)
    * An account identifier that will send or receive token(s).
    * An account identifier that will send or receive token(s).
    setAmount(long value)
    * An amount to send (negative) or receive (positive).
    setIsApproval(boolean value)
    * An approved allowance flag.<br/> If true then the transfer is expected to be an approved allowance.
    * Two calls, the first call before attempting the CryptoTransfer, to a method with logical signature allowPre(HookContext, ProposedTransfers); and the second call after attempting the CryptoTransfer, to a method with logical signature allowPost(HookContext, ProposedTransfers).
    * Two calls, the first call before attempting the CryptoTransfer, to a method with logical signature allowPre(HookContext, ProposedTransfers); and the second call after attempting the CryptoTransfer, to a method with logical signature allowPost(HookContext, ProposedTransfers).
    * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)
    * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)

    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

    • getHookCallCase

      public AccountAmount.HookCallCase getHookCallCase()
      Specified by:
      getHookCallCase in interface AccountAmountOrBuilder
    • clearHookCall

      public AccountAmount.Builder clearHookCall()
    • hasAccountID

      public boolean hasAccountID()
       *
       An account identifier that will send or receive token(s).
       
      .proto.AccountID accountID = 1;
      Specified by:
      hasAccountID in interface AccountAmountOrBuilder
      Returns:
      Whether the accountID field is set.
    • getAccountID

      public AccountID getAccountID()
       *
       An account identifier that will send or receive token(s).
       
      .proto.AccountID accountID = 1;
      Specified by:
      getAccountID in interface AccountAmountOrBuilder
      Returns:
      The accountID.
    • setAccountID

      public AccountAmount.Builder setAccountID(AccountID value)
       *
       An account identifier that will send or receive token(s).
       
      .proto.AccountID accountID = 1;
    • setAccountID

      public AccountAmount.Builder setAccountID(AccountID.Builder builderForValue)
       *
       An account identifier that will send or receive token(s).
       
      .proto.AccountID accountID = 1;
    • mergeAccountID

      public AccountAmount.Builder mergeAccountID(AccountID value)
       *
       An account identifier that will send or receive token(s).
       
      .proto.AccountID accountID = 1;
    • clearAccountID

      public AccountAmount.Builder clearAccountID()
       *
       An account identifier that will send or receive token(s).
       
      .proto.AccountID accountID = 1;
    • getAmount

      public long getAmount()
       *
       An amount to send (negative) or receive (positive).
       <p>
       This amount MUST be denominated in the smallest unit of the relevant
       token.<br/>
       For HBAR this SHALL be tinybar (10<sup>-8</sup> HBAR).<br/>
       For other fungible/common tokens this SHALL depend on the value of
       `decimals` for that token.
       
      sint64 amount = 2;
      Specified by:
      getAmount in interface AccountAmountOrBuilder
      Returns:
      The amount.
    • setAmount

      public AccountAmount.Builder setAmount(long value)
       *
       An amount to send (negative) or receive (positive).
       <p>
       This amount MUST be denominated in the smallest unit of the relevant
       token.<br/>
       For HBAR this SHALL be tinybar (10<sup>-8</sup> HBAR).<br/>
       For other fungible/common tokens this SHALL depend on the value of
       `decimals` for that token.
       
      sint64 amount = 2;
      Parameters:
      value - The amount to set.
      Returns:
      This builder for chaining.
    • clearAmount

      public AccountAmount.Builder clearAmount()
       *
       An amount to send (negative) or receive (positive).
       <p>
       This amount MUST be denominated in the smallest unit of the relevant
       token.<br/>
       For HBAR this SHALL be tinybar (10<sup>-8</sup> HBAR).<br/>
       For other fungible/common tokens this SHALL depend on the value of
       `decimals` for that token.
       
      sint64 amount = 2;
      Returns:
      This builder for chaining.
    • getIsApproval

      public boolean getIsApproval()
       *
       An approved allowance flag.<br/>
       If true then the transfer is expected to be an approved allowance.
       <p>
       If set, `accountID` SHALL be the owner that previously approved
       the allowance.<br/>
       The default value SHALL be false (unset).
       
      bool is_approval = 3;
      Specified by:
      getIsApproval in interface AccountAmountOrBuilder
      Returns:
      The isApproval.
    • setIsApproval

      public AccountAmount.Builder setIsApproval(boolean value)
       *
       An approved allowance flag.<br/>
       If true then the transfer is expected to be an approved allowance.
       <p>
       If set, `accountID` SHALL be the owner that previously approved
       the allowance.<br/>
       The default value SHALL be false (unset).
       
      bool is_approval = 3;
      Parameters:
      value - The isApproval to set.
      Returns:
      This builder for chaining.
    • clearIsApproval

      public AccountAmount.Builder clearIsApproval()
       *
       An approved allowance flag.<br/>
       If true then the transfer is expected to be an approved allowance.
       <p>
       If set, `accountID` SHALL be the owner that previously approved
       the allowance.<br/>
       The default value SHALL be false (unset).
       
      bool is_approval = 3;
      Returns:
      This builder for chaining.
    • hasPreTxAllowanceHook

      public boolean hasPreTxAllowanceHook()
       *
       A single call made before attempting the CryptoTransfer, to a
       method with logical signature allow(HookContext, ProposedTransfers)
       
      .proto.HookCall pre_tx_allowance_hook = 4;
      Specified by:
      hasPreTxAllowanceHook in interface AccountAmountOrBuilder
      Returns:
      Whether the preTxAllowanceHook field is set.
    • getPreTxAllowanceHook

      public HookCall getPreTxAllowanceHook()
       *
       A single call made before attempting the CryptoTransfer, to a
       method with logical signature allow(HookContext, ProposedTransfers)
       
      .proto.HookCall pre_tx_allowance_hook = 4;
      Specified by:
      getPreTxAllowanceHook in interface AccountAmountOrBuilder
      Returns:
      The preTxAllowanceHook.
    • setPreTxAllowanceHook

      public AccountAmount.Builder setPreTxAllowanceHook(HookCall value)
       *
       A single call made before attempting the CryptoTransfer, to a
       method with logical signature allow(HookContext, ProposedTransfers)
       
      .proto.HookCall pre_tx_allowance_hook = 4;
    • setPreTxAllowanceHook

      public AccountAmount.Builder setPreTxAllowanceHook(HookCall.Builder builderForValue)
       *
       A single call made before attempting the CryptoTransfer, to a
       method with logical signature allow(HookContext, ProposedTransfers)
       
      .proto.HookCall pre_tx_allowance_hook = 4;
    • mergePreTxAllowanceHook

      public AccountAmount.Builder mergePreTxAllowanceHook(HookCall value)
       *
       A single call made before attempting the CryptoTransfer, to a
       method with logical signature allow(HookContext, ProposedTransfers)
       
      .proto.HookCall pre_tx_allowance_hook = 4;
    • clearPreTxAllowanceHook

      public AccountAmount.Builder clearPreTxAllowanceHook()
       *
       A single call made before attempting the CryptoTransfer, to a
       method with logical signature allow(HookContext, ProposedTransfers)
       
      .proto.HookCall pre_tx_allowance_hook = 4;
    • hasPrePostTxAllowanceHook

      public boolean hasPrePostTxAllowanceHook()
       *
       Two calls, the first call before attempting the CryptoTransfer, to a
       method with logical signature allowPre(HookContext, ProposedTransfers);
       and the second call after attempting the CryptoTransfer, to a method
       with logical signature allowPost(HookContext, ProposedTransfers).
       
      .proto.HookCall pre_post_tx_allowance_hook = 5;
      Specified by:
      hasPrePostTxAllowanceHook in interface AccountAmountOrBuilder
      Returns:
      Whether the prePostTxAllowanceHook field is set.
    • getPrePostTxAllowanceHook

      public HookCall getPrePostTxAllowanceHook()
       *
       Two calls, the first call before attempting the CryptoTransfer, to a
       method with logical signature allowPre(HookContext, ProposedTransfers);
       and the second call after attempting the CryptoTransfer, to a method
       with logical signature allowPost(HookContext, ProposedTransfers).
       
      .proto.HookCall pre_post_tx_allowance_hook = 5;
      Specified by:
      getPrePostTxAllowanceHook in interface AccountAmountOrBuilder
      Returns:
      The prePostTxAllowanceHook.
    • setPrePostTxAllowanceHook

      public AccountAmount.Builder setPrePostTxAllowanceHook(HookCall value)
       *
       Two calls, the first call before attempting the CryptoTransfer, to a
       method with logical signature allowPre(HookContext, ProposedTransfers);
       and the second call after attempting the CryptoTransfer, to a method
       with logical signature allowPost(HookContext, ProposedTransfers).
       
      .proto.HookCall pre_post_tx_allowance_hook = 5;
    • setPrePostTxAllowanceHook

      public AccountAmount.Builder setPrePostTxAllowanceHook(HookCall.Builder builderForValue)
       *
       Two calls, the first call before attempting the CryptoTransfer, to a
       method with logical signature allowPre(HookContext, ProposedTransfers);
       and the second call after attempting the CryptoTransfer, to a method
       with logical signature allowPost(HookContext, ProposedTransfers).
       
      .proto.HookCall pre_post_tx_allowance_hook = 5;
    • mergePrePostTxAllowanceHook

      public AccountAmount.Builder mergePrePostTxAllowanceHook(HookCall value)
       *
       Two calls, the first call before attempting the CryptoTransfer, to a
       method with logical signature allowPre(HookContext, ProposedTransfers);
       and the second call after attempting the CryptoTransfer, to a method
       with logical signature allowPost(HookContext, ProposedTransfers).
       
      .proto.HookCall pre_post_tx_allowance_hook = 5;
    • clearPrePostTxAllowanceHook

      public AccountAmount.Builder clearPrePostTxAllowanceHook()
       *
       Two calls, the first call before attempting the CryptoTransfer, to a
       method with logical signature allowPre(HookContext, ProposedTransfers);
       and the second call after attempting the CryptoTransfer, to a method
       with logical signature allowPost(HookContext, ProposedTransfers).
       
      .proto.HookCall pre_post_tx_allowance_hook = 5;