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 TypeMethodDescription* 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.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.* 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`.booleanhasOwner()* 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`.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.mergeSpender(AccountID value) * A spender account identifier.<br/> This is the account identifier of the account permitted to transfer tokens held by the `owner`.mergeTokenId(TokenID value) * 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.setSpender(AccountID value) * 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`.setTokenId(TokenID value) * 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, 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
-
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:
hasTokenIdin interfaceTokenAllowanceOrBuilder- Returns:
- Whether the tokenId field is set.
-
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:
getTokenIdin interfaceTokenAllowanceOrBuilder- Returns:
- The tokenId.
-
setTokenId
* 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
* 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
* 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
* 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:
hasOwnerin interfaceTokenAllowanceOrBuilder- Returns:
- Whether the owner field is set.
-
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:
getOwnerin interfaceTokenAllowanceOrBuilder- Returns:
- The owner.
-
setOwner
* 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
* 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
* 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
* 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:
hasSpenderin interfaceTokenAllowanceOrBuilder- Returns:
- Whether the spender field is set.
-
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:
getSpenderin interfaceTokenAllowanceOrBuilder- Returns:
- The spender.
-
setSpender
* 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
* 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
* 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
* 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:
getAmountin interfaceTokenAllowanceOrBuilder- Returns:
- The amount.
-
setAmount
* 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
* 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.
-