Class AccountAmount

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

@Generated public final class AccountAmount extends com.google.protobuf.GeneratedMessageLite<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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * An account, and the amount that it sends or receives during a token transfer.
    static enum 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    * 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)
     
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<AccountAmount>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • ACCOUNTID_FIELD_NUMBER

      public static final int ACCOUNTID_FIELD_NUMBER
      See Also:
    • AMOUNT_FIELD_NUMBER

      public static final int AMOUNT_FIELD_NUMBER
      See Also:
    • IS_APPROVAL_FIELD_NUMBER

      public static final int IS_APPROVAL_FIELD_NUMBER
      See Also:
    • PRE_TX_ALLOWANCE_HOOK_FIELD_NUMBER

      public static final int PRE_TX_ALLOWANCE_HOOK_FIELD_NUMBER
      See Also:
    • PRE_POST_TX_ALLOWANCE_HOOK_FIELD_NUMBER

      public static final int PRE_POST_TX_ALLOWANCE_HOOK_FIELD_NUMBER
      See Also:
  • Method Details

    • getHookCallCase

      public AccountAmount.HookCallCase getHookCallCase()
      Specified by:
      getHookCallCase in interface AccountAmountOrBuilder
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • parseFrom

      public static AccountAmount parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AccountAmount parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AccountAmount parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AccountAmount parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AccountAmount parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AccountAmount parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AccountAmount parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AccountAmount parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AccountAmount parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AccountAmount parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AccountAmount parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AccountAmount parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static AccountAmount.Builder newBuilder()
    • newBuilder

      public static AccountAmount.Builder newBuilder(AccountAmount prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<AccountAmount,AccountAmount.Builder>
    • getDefaultInstance

      public static AccountAmount getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AccountAmount> parser()