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 ClassesModifier and TypeClassDescriptionstatic 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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(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.static TokenAllowancegetOwner()* 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`.static TokenAllowance.Builderstatic TokenAllowance.BuildernewBuilder(TokenAllowance prototype) static TokenAllowanceparseDelimitedFrom(InputStream input) static TokenAllowanceparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenAllowanceparseFrom(byte[] data) static TokenAllowanceparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenAllowanceparseFrom(com.google.protobuf.ByteString data) static TokenAllowanceparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenAllowanceparseFrom(com.google.protobuf.CodedInputStream input) static TokenAllowanceparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenAllowanceparseFrom(InputStream input) static TokenAllowanceparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenAllowanceparseFrom(ByteBuffer data) static TokenAllowanceparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TokenAllowance> parser()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, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
-
AMOUNT_FIELD_NUMBER
public static final int AMOUNT_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 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.
-
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.
-
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.
-
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.
-
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
- Throws:
IOException
-
parseFrom
public static TokenAllowance parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<TokenAllowance,TokenAllowance.Builder>
-
getDefaultInstance
-
parser
-