java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<NftAllowance,NftAllowance.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<NftAllowance,NftAllowance.Builder>
com.hedera.hashgraph.sdk.proto.NftAllowance.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,NftAllowanceOrBuilder,Cloneable
- Enclosing class:
NftAllowance
public static final class NftAllowance.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<NftAllowance,NftAllowance.Builder>
implements NftAllowanceOrBuilder
* An approved allowance of non-fungible tokens.<br/> This type of allowance may permit transfers for one or more individual unique tokens, or may permit transfers for all unique tokens of the specified type. If `owner` is not set, the effective `owner` SHALL be the `payer` for the enclosing transaction.<br/> The `spender` MUST be specified and MUST be a valid account.<br/> If `approve_for_all` is set, then `serial_numbers` SHOULD be empty and SHALL be ignored. If `approve_for_all` is unset, then `serial_numbers` MUST NOT be empty.Protobuf type
proto.NftAllowance-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllSerialNumbers(Iterable<? extends Long> values) * A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer.addSerialNumbers(long value) * A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer.* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type.* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created.* 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 list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer.* 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`.com.google.protobuf.BoolValue* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type.* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created.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.longgetSerialNumbers(int index) * A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer.int* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer.* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer.* 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* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type.boolean* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created.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`.mergeApprovedForAll(com.google.protobuf.BoolValue value) * A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type.mergeDelegatingSpender(AccountID value) * A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created.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`.setApprovedForAll(com.google.protobuf.BoolValue value) * A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type.setApprovedForAll(com.google.protobuf.BoolValue.Builder builderForValue) * A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type.setDelegatingSpender(AccountID value) * A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created.setDelegatingSpender(AccountID.Builder builderForValue) * A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created.* 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.setSerialNumbers(int index, long value) * A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer.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 non-fungible/unique token.
.proto.TokenID tokenId = 1;- Specified by:
hasTokenIdin interfaceNftAllowanceOrBuilder- 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 non-fungible/unique token.
.proto.TokenID tokenId = 1;- Specified by:
getTokenIdin interfaceNftAllowanceOrBuilder- 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 non-fungible/unique 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 non-fungible/unique 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 non-fungible/unique 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 non-fungible/unique 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 interfaceNftAllowanceOrBuilder- 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 interfaceNftAllowanceOrBuilder- 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 interfaceNftAllowanceOrBuilder- 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 interfaceNftAllowanceOrBuilder- 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; -
getSerialNumbersList
* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer. <p> The `owner` MUST currently hold each token identified in this list.
repeated int64 serial_numbers = 4;- Specified by:
getSerialNumbersListin interfaceNftAllowanceOrBuilder- Returns:
- A list containing the serialNumbers.
-
getSerialNumbersCount
public int getSerialNumbersCount()* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer. <p> The `owner` MUST currently hold each token identified in this list.
repeated int64 serial_numbers = 4;- Specified by:
getSerialNumbersCountin interfaceNftAllowanceOrBuilder- Returns:
- The count of serialNumbers.
-
getSerialNumbers
public long getSerialNumbers(int index) * A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer. <p> The `owner` MUST currently hold each token identified in this list.
repeated int64 serial_numbers = 4;- Specified by:
getSerialNumbersin interfaceNftAllowanceOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The serialNumbers at the given index.
-
setSerialNumbers
* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer. <p> The `owner` MUST currently hold each token identified in this list.
repeated int64 serial_numbers = 4;- Parameters:
value- The serialNumbers to set.- Returns:
- This builder for chaining.
-
addSerialNumbers
* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer. <p> The `owner` MUST currently hold each token identified in this list.
repeated int64 serial_numbers = 4;- Parameters:
value- The serialNumbers to add.- Returns:
- This builder for chaining.
-
addAllSerialNumbers
* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer. <p> The `owner` MUST currently hold each token identified in this list.
repeated int64 serial_numbers = 4;- Parameters:
values- The serialNumbers to add.- Returns:
- This builder for chaining.
-
clearSerialNumbers
* A list of token serial numbers.<br/> The list of serial numbers that the spender is permitted to transfer. <p> The `owner` MUST currently hold each token identified in this list.
repeated int64 serial_numbers = 4;- Returns:
- This builder for chaining.
-
hasApprovedForAll
public boolean hasApprovedForAll()* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type. <p> If true, the `spender` SHALL be permitted to transfer any or all of the `owner`'s tokens of the specified token type. This SHALL apply not only to currently owned tokens, but to all such tokens acquired in the future, unless the allowance is `delete`d.
.google.protobuf.BoolValue approved_for_all = 5;- Specified by:
hasApprovedForAllin interfaceNftAllowanceOrBuilder- Returns:
- Whether the approvedForAll field is set.
-
getApprovedForAll
public com.google.protobuf.BoolValue getApprovedForAll()* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type. <p> If true, the `spender` SHALL be permitted to transfer any or all of the `owner`'s tokens of the specified token type. This SHALL apply not only to currently owned tokens, but to all such tokens acquired in the future, unless the allowance is `delete`d.
.google.protobuf.BoolValue approved_for_all = 5;- Specified by:
getApprovedForAllin interfaceNftAllowanceOrBuilder- Returns:
- The approvedForAll.
-
setApprovedForAll
* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type. <p> If true, the `spender` SHALL be permitted to transfer any or all of the `owner`'s tokens of the specified token type. This SHALL apply not only to currently owned tokens, but to all such tokens acquired in the future, unless the allowance is `delete`d.
.google.protobuf.BoolValue approved_for_all = 5; -
setApprovedForAll
public NftAllowance.Builder setApprovedForAll(com.google.protobuf.BoolValue.Builder builderForValue) * A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type. <p> If true, the `spender` SHALL be permitted to transfer any or all of the `owner`'s tokens of the specified token type. This SHALL apply not only to currently owned tokens, but to all such tokens acquired in the future, unless the allowance is `delete`d.
.google.protobuf.BoolValue approved_for_all = 5; -
mergeApprovedForAll
* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type. <p> If true, the `spender` SHALL be permitted to transfer any or all of the `owner`'s tokens of the specified token type. This SHALL apply not only to currently owned tokens, but to all such tokens acquired in the future, unless the allowance is `delete`d.
.google.protobuf.BoolValue approved_for_all = 5; -
clearApprovedForAll
* A flag indicating this allowance applies to all tokens of the specified (non-fungible/unique) type. <p> If true, the `spender` SHALL be permitted to transfer any or all of the `owner`'s tokens of the specified token type. This SHALL apply not only to currently owned tokens, but to all such tokens acquired in the future, unless the allowance is `delete`d.
.google.protobuf.BoolValue approved_for_all = 5; -
hasDelegatingSpender
public boolean hasDelegatingSpender()* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created. This enables an account with such broad access to grant allowances to transfer individual tokens from the original owner without involving that original owner. <p> If this is set, the account identified MUST sign this transaction, but the `owner` account MAY NOT sign this transaction.<br/> If this is set, there MUST exist an active `approved_for_all` allowance from the `owner` for the `delegating_spender` to transfer all tokens of the type identified by the `tokenId` field.<br/> If this value is set, the `approved_for_all` flag MUST be `false`.
.proto.AccountID delegating_spender = 6;- Specified by:
hasDelegatingSpenderin interfaceNftAllowanceOrBuilder- Returns:
- Whether the delegatingSpender field is set.
-
getDelegatingSpender
* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created. This enables an account with such broad access to grant allowances to transfer individual tokens from the original owner without involving that original owner. <p> If this is set, the account identified MUST sign this transaction, but the `owner` account MAY NOT sign this transaction.<br/> If this is set, there MUST exist an active `approved_for_all` allowance from the `owner` for the `delegating_spender` to transfer all tokens of the type identified by the `tokenId` field.<br/> If this value is set, the `approved_for_all` flag MUST be `false`.
.proto.AccountID delegating_spender = 6;- Specified by:
getDelegatingSpenderin interfaceNftAllowanceOrBuilder- Returns:
- The delegatingSpender.
-
setDelegatingSpender
* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created. This enables an account with such broad access to grant allowances to transfer individual tokens from the original owner without involving that original owner. <p> If this is set, the account identified MUST sign this transaction, but the `owner` account MAY NOT sign this transaction.<br/> If this is set, there MUST exist an active `approved_for_all` allowance from the `owner` for the `delegating_spender` to transfer all tokens of the type identified by the `tokenId` field.<br/> If this value is set, the `approved_for_all` flag MUST be `false`.
.proto.AccountID delegating_spender = 6; -
setDelegatingSpender
* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created. This enables an account with such broad access to grant allowances to transfer individual tokens from the original owner without involving that original owner. <p> If this is set, the account identified MUST sign this transaction, but the `owner` account MAY NOT sign this transaction.<br/> If this is set, there MUST exist an active `approved_for_all` allowance from the `owner` for the `delegating_spender` to transfer all tokens of the type identified by the `tokenId` field.<br/> If this value is set, the `approved_for_all` flag MUST be `false`.
.proto.AccountID delegating_spender = 6; -
mergeDelegatingSpender
* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created. This enables an account with such broad access to grant allowances to transfer individual tokens from the original owner without involving that original owner. <p> If this is set, the account identified MUST sign this transaction, but the `owner` account MAY NOT sign this transaction.<br/> If this is set, there MUST exist an active `approved_for_all` allowance from the `owner` for the `delegating_spender` to transfer all tokens of the type identified by the `tokenId` field.<br/> If this value is set, the `approved_for_all` flag MUST be `false`.
.proto.AccountID delegating_spender = 6; -
clearDelegatingSpender
* A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created. This enables an account with such broad access to grant allowances to transfer individual tokens from the original owner without involving that original owner. <p> If this is set, the account identified MUST sign this transaction, but the `owner` account MAY NOT sign this transaction.<br/> If this is set, there MUST exist an active `approved_for_all` allowance from the `owner` for the `delegating_spender` to transfer all tokens of the type identified by the `tokenId` field.<br/> If this value is set, the `approved_for_all` flag MUST be `false`.
.proto.AccountID delegating_spender = 6;
-