java.lang.Object
com.google.protobuf.AbstractMessageLite<GrantedTokenAllowance,GrantedTokenAllowance.Builder>
com.google.protobuf.GeneratedMessageLite<GrantedTokenAllowance,GrantedTokenAllowance.Builder>
com.hedera.hashgraph.sdk.proto.GrantedTokenAllowance
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,GrantedTokenAllowanceOrBuilder
@Generated
public final class GrantedTokenAllowance
extends com.google.protobuf.GeneratedMessageLite<GrantedTokenAllowance,GrantedTokenAllowance.Builder>
implements GrantedTokenAllowanceOrBuilder
* Permission granted by one account (the "funding" account) to another account (the "spender" account) that allows the spender to spend a specified amount of a specific non-HBAR fungible token from the balance owned by the funding account. An allowance SHALL NOT transfer any tokens directly, it only permits transactions signed only by the spender account to transfer tokens of the specified type, up to the amount specified, from the funding account. Once the specified amount is spent, the allowance SHALL be consumed and a new allowance SHALL be required before that spending account may spend additional tokens from the funding account.Protobuf type
proto.GrantedTokenAllowance-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* Permission granted by one account (the "funding" account) to another account (the "spender" account) that allows the spender to spend a specified amount of a specific non-HBAR fungible token from the balance owned by the funding account.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 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) longThe maximum amount that the spender account may transfer within the scope of this allowance.static GrantedTokenAllowance* The identifier for the spending account associated with this allowance.* The identifier for the token associated with this allowance.boolean* The identifier for the spending account associated with this allowance.boolean* The identifier for the token associated with this allowance.newBuilder(GrantedTokenAllowance prototype) static GrantedTokenAllowanceparseDelimitedFrom(InputStream input) static GrantedTokenAllowanceparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GrantedTokenAllowanceparseFrom(byte[] data) static GrantedTokenAllowanceparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GrantedTokenAllowanceparseFrom(com.google.protobuf.ByteString data) static GrantedTokenAllowanceparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GrantedTokenAllowanceparseFrom(com.google.protobuf.CodedInputStream input) static GrantedTokenAllowanceparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GrantedTokenAllowanceparseFrom(InputStream input) static GrantedTokenAllowanceparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static GrantedTokenAllowanceparseFrom(ByteBuffer data) static GrantedTokenAllowanceparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<GrantedTokenAllowance> 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
-
TOKEN_ID_FIELD_NUMBER
public static final int TOKEN_ID_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()* The identifier for the token associated with this allowance. <p> This token MUST be a fungible/common token.
.proto.TokenID token_id = 1;- Specified by:
hasTokenIdin interfaceGrantedTokenAllowanceOrBuilder- Returns:
- Whether the tokenId field is set.
-
getTokenId
* The identifier for the token associated with this allowance. <p> This token MUST be a fungible/common token.
.proto.TokenID token_id = 1;- Specified by:
getTokenIdin interfaceGrantedTokenAllowanceOrBuilder- Returns:
- The tokenId.
-
hasSpender
public boolean hasSpender()* The identifier for the spending account associated with this allowance. <p> This account SHALL be permitted to sign transactions to spend tokens of the associated token type from the funding/allowing account.<br/> This permission SHALL be limited to no more than the specified `amount`.
.proto.AccountID spender = 2;- Specified by:
hasSpenderin interfaceGrantedTokenAllowanceOrBuilder- Returns:
- Whether the spender field is set.
-
getSpender
* The identifier for the spending account associated with this allowance. <p> This account SHALL be permitted to sign transactions to spend tokens of the associated token type from the funding/allowing account.<br/> This permission SHALL be limited to no more than the specified `amount`.
.proto.AccountID spender = 2;- Specified by:
getSpenderin interfaceGrantedTokenAllowanceOrBuilder- Returns:
- The spender.
-
getAmount
public long getAmount()The maximum amount that the spender account may transfer within the scope of this allowance. <p> This allowance SHALL be consumed if any combination of transfers authorized via this allowance meet this value in total.<br/> This value MUST be specified in the smallest units of the relevant token (i.e. 10<sup>-decimals</sup> whole tokens).
int64 amount = 3;- Specified by:
getAmountin interfaceGrantedTokenAllowanceOrBuilder- Returns:
- The amount.
-
parseFrom
public static GrantedTokenAllowance parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrantedTokenAllowance parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrantedTokenAllowance parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrantedTokenAllowance parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrantedTokenAllowance parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrantedTokenAllowance parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static GrantedTokenAllowance parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static GrantedTokenAllowance parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static GrantedTokenAllowance parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static GrantedTokenAllowance 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<GrantedTokenAllowance,GrantedTokenAllowance.Builder>
-
getDefaultInstance
-
parser
-