Class NftAllowance.Builder

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 Type
    Method
    Description
    addAllSerialNumbers(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.
    * 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.
    long
    getSerialNumbers(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.
    boolean
    * 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.
    * 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 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`.
    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.
    * A spender-owner account identifier.<br/> This account identifier identifies a `spender` for whom an existing `approved_for_all` allowance was previously created.
    * 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.
    * 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`.
    * 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, 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

    • 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:
      hasTokenId in interface NftAllowanceOrBuilder
      Returns:
      Whether the tokenId field is set.
    • getTokenId

      public TokenID 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:
      getTokenId in interface NftAllowanceOrBuilder
      Returns:
      The tokenId.
    • setTokenId

      public NftAllowance.Builder setTokenId(TokenID value)
       *
       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

      public NftAllowance.Builder setTokenId(TokenID.Builder builderForValue)
       *
       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

      public NftAllowance.Builder mergeTokenId(TokenID value)
       *
       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

      public NftAllowance.Builder 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:
      hasOwner in interface NftAllowanceOrBuilder
      Returns:
      Whether the owner field is set.
    • getOwner

      public AccountID 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:
      getOwner in interface NftAllowanceOrBuilder
      Returns:
      The owner.
    • setOwner

      public NftAllowance.Builder setOwner(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.
       
      .proto.AccountID owner = 2;
    • setOwner

      public NftAllowance.Builder 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.
       
      .proto.AccountID owner = 2;
    • mergeOwner

      public NftAllowance.Builder 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.
       
      .proto.AccountID owner = 2;
    • clearOwner

      public NftAllowance.Builder 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:
      hasSpender in interface NftAllowanceOrBuilder
      Returns:
      Whether the spender field is set.
    • getSpender

      public AccountID 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:
      getSpender in interface NftAllowanceOrBuilder
      Returns:
      The spender.
    • setSpender

      public NftAllowance.Builder setSpender(AccountID value)
       *
       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

      public NftAllowance.Builder 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`.
       
      .proto.AccountID spender = 3;
    • mergeSpender

      public NftAllowance.Builder mergeSpender(AccountID value)
       *
       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

      public NftAllowance.Builder 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

      public List<Long> 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:
      getSerialNumbersList in interface NftAllowanceOrBuilder
      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:
      getSerialNumbersCount in interface NftAllowanceOrBuilder
      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:
      getSerialNumbers in interface NftAllowanceOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The serialNumbers at the given index.
    • setSerialNumbers

      public NftAllowance.Builder setSerialNumbers(int index, long value)
       *
       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

      public NftAllowance.Builder addSerialNumbers(long value)
       *
       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

      public NftAllowance.Builder addAllSerialNumbers(Iterable<? extends Long> values)
       *
       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

      public NftAllowance.Builder 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:
      hasApprovedForAll in interface NftAllowanceOrBuilder
      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:
      getApprovedForAll in interface NftAllowanceOrBuilder
      Returns:
      The approvedForAll.
    • setApprovedForAll

      public NftAllowance.Builder setApprovedForAll(com.google.protobuf.BoolValue value)
       *
       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

      public NftAllowance.Builder mergeApprovedForAll(com.google.protobuf.BoolValue value)
       *
       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

      public NftAllowance.Builder 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:
      hasDelegatingSpender in interface NftAllowanceOrBuilder
      Returns:
      Whether the delegatingSpender field is set.
    • getDelegatingSpender

      public AccountID 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:
      getDelegatingSpender in interface NftAllowanceOrBuilder
      Returns:
      The delegatingSpender.
    • setDelegatingSpender

      public NftAllowance.Builder 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. 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

      public NftAllowance.Builder 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. 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

      public NftAllowance.Builder 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. 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

      public NftAllowance.Builder 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;