Class TokenAllowance

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

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

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * An approved allowance of fungible/common token transfers.

    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
     

    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)
     
    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.
     
    * 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`.
    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<TokenAllowance>
     

    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

  • 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:
      hasTokenId in interface TokenAllowanceOrBuilder
      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 fungible/common token.
       
      .proto.TokenID tokenId = 1;
      Specified by:
      getTokenId in interface TokenAllowanceOrBuilder
      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 TokenAllowanceOrBuilder
      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 TokenAllowanceOrBuilder
      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 TokenAllowanceOrBuilder
      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 TokenAllowanceOrBuilder
      Returns:
      The spender.
    • 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:
      getAmount in interface TokenAllowanceOrBuilder
      Returns:
      The amount.
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static TokenAllowance.Builder newBuilder()
    • newBuilder

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

      public static TokenAllowance getDefaultInstance()
    • parser

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