Class NftAllowance

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

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

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * 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.

    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
     
    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)
     
    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`.
     
     
     
    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<NftAllowance>
     

    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

    • TOKENID_FIELD_NUMBER

      public static final int TOKENID_FIELD_NUMBER
      See Also:
    • OWNER_FIELD_NUMBER

      public static final int OWNER_FIELD_NUMBER
      See Also:
    • SPENDER_FIELD_NUMBER

      public static final int SPENDER_FIELD_NUMBER
      See Also:
    • SERIAL_NUMBERS_FIELD_NUMBER

      public static final int SERIAL_NUMBERS_FIELD_NUMBER
      See Also:
    • APPROVED_FOR_ALL_FIELD_NUMBER

      public static final int APPROVED_FOR_ALL_FIELD_NUMBER
      See Also:
    • DELEGATING_SPENDER_FIELD_NUMBER

      public static final int DELEGATING_SPENDER_FIELD_NUMBER
      See Also:
  • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static NftAllowance.Builder newBuilder()
    • newBuilder

      public static NftAllowance.Builder newBuilder(NftAllowance 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<NftAllowance,NftAllowance.Builder>
    • getDefaultInstance

      public static NftAllowance getDefaultInstance()
    • parser

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