java.lang.Object
com.google.protobuf.AbstractMessageLite<TokenRelation,TokenRelation.Builder>
com.google.protobuf.GeneratedMessageLite<TokenRelation,TokenRelation.Builder>
com.hedera.hashgraph.sdk.proto.TokenRelation
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,TokenRelationOrBuilder
@Generated
public final class TokenRelation
extends com.google.protobuf.GeneratedMessageLite<TokenRelation,TokenRelation.Builder>
implements TokenRelationOrBuilder
* An Hedera Token Service token relationship. A token relationship connects an Account with a Token and is necessary for that Account to transact in that Token. TokenRelationship defines a connection between one account and one token type. A TokenRelation SHALL be identified by the combination of token_id and account_id.<br/> A TokenRelation SHALL contain, for the referenced token,<br/> The account's current balance, whether the account has KYC granted, and whether the assets are frozen. TokenRelation entries SHALL be connected via a "virtual linked list" with the next TokenID and previous TokenID stored in the TokenRelation. These TokenIDs MUST be combined with the AccountID to find the next or previous relationship in the list.Protobuf type
proto.TokenRelation-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* An Hedera Token Service token relationship.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 intstatic 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) * An account identifier.boolean* A flag indicating that this token relationship was created using automatic association.long* The fungible token balance of this token relationship.static TokenRelationboolean* A flag indicating that this token relationship is frozen.boolean* A flag indicating that this token relationship has been granted KYC status.* The Token ID of the next entry in the associated Account's "virtual double-linked list" of token relationships.* The Token ID of the previous entry in the associated Account's "virtual double-linked list" of token relationships.* A token identifier.boolean* An account identifier.boolean* The Token ID of the next entry in the associated Account's "virtual double-linked list" of token relationships.boolean* The Token ID of the previous entry in the associated Account's "virtual double-linked list" of token relationships.boolean* A token identifier.static TokenRelation.Builderstatic TokenRelation.BuildernewBuilder(TokenRelation prototype) static TokenRelationparseDelimitedFrom(InputStream input) static TokenRelationparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationparseFrom(byte[] data) static TokenRelationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationparseFrom(com.google.protobuf.ByteString data) static TokenRelationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationparseFrom(com.google.protobuf.CodedInputStream input) static TokenRelationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationparseFrom(InputStream input) static TokenRelationparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationparseFrom(ByteBuffer data) static TokenRelationparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TokenRelation> 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:
-
ACCOUNT_ID_FIELD_NUMBER
public static final int ACCOUNT_ID_FIELD_NUMBER- See Also:
-
BALANCE_FIELD_NUMBER
public static final int BALANCE_FIELD_NUMBER- See Also:
-
FROZEN_FIELD_NUMBER
public static final int FROZEN_FIELD_NUMBER- See Also:
-
KYC_GRANTED_FIELD_NUMBER
public static final int KYC_GRANTED_FIELD_NUMBER- See Also:
-
AUTOMATIC_ASSOCIATION_FIELD_NUMBER
public static final int AUTOMATIC_ASSOCIATION_FIELD_NUMBER- See Also:
-
PREVIOUS_TOKEN_FIELD_NUMBER
public static final int PREVIOUS_TOKEN_FIELD_NUMBER- See Also:
-
NEXT_TOKEN_FIELD_NUMBER
public static final int NEXT_TOKEN_FIELD_NUMBER- See Also:
-
-
Method Details
-
hasTokenId
public boolean hasTokenId()* A token identifier. <p> This SHALL identify the token involved in this association.
.proto.TokenID token_id = 1;- Specified by:
hasTokenIdin interfaceTokenRelationOrBuilder- Returns:
- Whether the tokenId field is set.
-
getTokenId
* A token identifier. <p> This SHALL identify the token involved in this association.
.proto.TokenID token_id = 1;- Specified by:
getTokenIdin interfaceTokenRelationOrBuilder- Returns:
- The tokenId.
-
hasAccountId
public boolean hasAccountId()* An account identifier. <p> This SHALL identify the account involved in this association.
.proto.AccountID account_id = 2;- Specified by:
hasAccountIdin interfaceTokenRelationOrBuilder- Returns:
- Whether the accountId field is set.
-
getAccountId
* An account identifier. <p> This SHALL identify the account involved in this association.
.proto.AccountID account_id = 2;- Specified by:
getAccountIdin interfaceTokenRelationOrBuilder- Returns:
- The accountId.
-
getBalance
public long getBalance()* The fungible token balance of this token relationship. <p> This MUST be a whole number.
int64 balance = 3;- Specified by:
getBalancein interfaceTokenRelationOrBuilder- Returns:
- The balance.
-
getFrozen
public boolean getFrozen()* A flag indicating that this token relationship is frozen. <p> When a token relationship is frozen the associated account SHALL NOT be permitted to transfer to or from the associated balance. <p> This flag is associated with the Token value `freeze_key`, and any transaction to set this flag MUST be signed by that key. If the Token does not have a `freeze_key` set, then this flag SHALL NOT be set true for relationships between accounts and that token.
bool frozen = 4;- Specified by:
getFrozenin interfaceTokenRelationOrBuilder- Returns:
- The frozen.
-
getKycGranted
public boolean getKycGranted()* A flag indicating that this token relationship has been granted KYC status. <p> If the token flag `accounts_kyc_granted_by_default` is set true, then this flag SHALL be set true for all accounts subsequently associated to that token. Otherwise this flag SHALL NOT be set until a transaction is submitted, and signed with the Token `kyc_key` to set the flag true.<br/> If the Token does not have a `kyc_key` set and the token flag `accounts_kyc_granted_by_default` is not set true, then this value MUST be false for all accounts subsequently associated to that token. <p> Typically a transaction to set this value to true is considered equivalent to asserting that the "Know Your Customer" (KYC) requirements have been met for this combination of account and token and the relevant records are available as required.
bool kyc_granted = 5;- Specified by:
getKycGrantedin interfaceTokenRelationOrBuilder- Returns:
- The kycGranted.
-
getAutomaticAssociation
public boolean getAutomaticAssociation()* A flag indicating that this token relationship was created using automatic association. <p> If this is true then there MUST NOT exist a customer-signed transaction associating this account and token combination and the account `used_auto_associations` SHALL be incremented when this relationship is created.
bool automatic_association = 6;- Specified by:
getAutomaticAssociationin interfaceTokenRelationOrBuilder- Returns:
- The automaticAssociation.
-
hasPreviousToken
public boolean hasPreviousToken()* The Token ID of the previous entry in the associated Account's "virtual double-linked list" of token relationships. <p> This must be combined with the value of `account_id` to identify the actual `TokenRelation` referenced.
.proto.TokenID previous_token = 7;- Specified by:
hasPreviousTokenin interfaceTokenRelationOrBuilder- Returns:
- Whether the previousToken field is set.
-
getPreviousToken
* The Token ID of the previous entry in the associated Account's "virtual double-linked list" of token relationships. <p> This must be combined with the value of `account_id` to identify the actual `TokenRelation` referenced.
.proto.TokenID previous_token = 7;- Specified by:
getPreviousTokenin interfaceTokenRelationOrBuilder- Returns:
- The previousToken.
-
hasNextToken
public boolean hasNextToken()* The Token ID of the next entry in the associated Account's "virtual double-linked list" of token relationships. <p> This must be combined with the value of `account_id` to identify the actual `TokenRelation` referenced.
.proto.TokenID next_token = 8;- Specified by:
hasNextTokenin interfaceTokenRelationOrBuilder- Returns:
- Whether the nextToken field is set.
-
getNextToken
* The Token ID of the next entry in the associated Account's "virtual double-linked list" of token relationships. <p> This must be combined with the value of `account_id` to identify the actual `TokenRelation` referenced.
.proto.TokenID next_token = 8;- Specified by:
getNextTokenin interfaceTokenRelationOrBuilder- Returns:
- The nextToken.
-
parseFrom
public static TokenRelation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static TokenRelation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static TokenRelation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static TokenRelation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static TokenRelation 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<TokenRelation,TokenRelation.Builder>
-
getDefaultInstance
-
parser
-