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 TypeMethodDescription* 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)mergeAccountID(AccountID value) * 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).mergePreTxAllowanceHook(HookCall value) * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)setAccountID(AccountID value) * An account identifier that will send or receive token(s).setAccountID(AccountID.Builder builderForValue) * 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).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).setPreTxAllowanceHook(HookCall value) * A single call made before attempting the CryptoTransfer, to a method with logical signature allow(HookContext, ProposedTransfers)setPreTxAllowanceHook(HookCall.Builder builderForValue) * 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, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getHookCallCase
- Specified by:
getHookCallCasein interfaceAccountAmountOrBuilder
-
clearHookCall
-
hasAccountID
public boolean hasAccountID()* An account identifier that will send or receive token(s).
.proto.AccountID accountID = 1;- Specified by:
hasAccountIDin interfaceAccountAmountOrBuilder- Returns:
- Whether the accountID field is set.
-
getAccountID
* An account identifier that will send or receive token(s).
.proto.AccountID accountID = 1;- Specified by:
getAccountIDin interfaceAccountAmountOrBuilder- Returns:
- The accountID.
-
setAccountID
* An account identifier that will send or receive token(s).
.proto.AccountID accountID = 1; -
setAccountID
* An account identifier that will send or receive token(s).
.proto.AccountID accountID = 1; -
mergeAccountID
* An account identifier that will send or receive token(s).
.proto.AccountID accountID = 1; -
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:
getAmountin interfaceAccountAmountOrBuilder- Returns:
- The amount.
-
setAmount
* 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
* 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:
getIsApprovalin interfaceAccountAmountOrBuilder- Returns:
- The isApproval.
-
setIsApproval
* 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
* 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:
hasPreTxAllowanceHookin interfaceAccountAmountOrBuilder- Returns:
- Whether the preTxAllowanceHook field is set.
-
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:
getPreTxAllowanceHookin interfaceAccountAmountOrBuilder- Returns:
- The preTxAllowanceHook.
-
setPreTxAllowanceHook
* 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
* 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
* 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
* 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:
hasPrePostTxAllowanceHookin interfaceAccountAmountOrBuilder- Returns:
- Whether the prePostTxAllowanceHook field is set.
-
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:
getPrePostTxAllowanceHookin interfaceAccountAmountOrBuilder- Returns:
- The prePostTxAllowanceHook.
-
setPrePostTxAllowanceHook
* 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
* 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
* 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
* 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;
-