java.lang.Object
com.google.protobuf.AbstractMessageLite<TokenRelationship,TokenRelationship.Builder>
com.google.protobuf.GeneratedMessageLite<TokenRelationship,TokenRelationship.Builder>
com.hedera.hashgraph.sdk.proto.TokenRelationship
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,TokenRelationshipOrBuilder
@Generated
public final class TokenRelationship
extends com.google.protobuf.GeneratedMessageLite<TokenRelationship,TokenRelationship.Builder>
implements TokenRelationshipOrBuilder
* An Hedera Token Service token relationship. A token relationship describes the connection between an Account and a Token type, including the current account balance in that token. A `TokenRelationship` SHALL contain, for the designated token and enclosing account, The account's current balance, whether the account has KYC granted, whether the assets are frozen and whether the association was automatic.<br/> A `TokenRelationship` MAY also contain the `symbol` and `decimals` values copied from the token.<br/> `TokenRelationship` entries SHALL be valid only within the context of a `GetAccountDetails` query response, or other enclosing message, which specifies the account side of the relationship.Protobuf type
proto.TokenRelationship-
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 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) boolean* An automatic association flag.long* An account balance for this token.int* A maximum "precision" for this token.static TokenRelationship* A Freeze status for the account with respect to this token.int* A Freeze status for the account with respect to this token.* A KYC status for the account with respect to this token.int* A KYC status for the account with respect to this token.* A token symbol.com.google.protobuf.ByteString* A token symbol.* A token identifier.boolean* A token identifier.static TokenRelationship.Builderstatic TokenRelationship.BuildernewBuilder(TokenRelationship prototype) static TokenRelationshipparseDelimitedFrom(InputStream input) static TokenRelationshipparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationshipparseFrom(byte[] data) static TokenRelationshipparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationshipparseFrom(com.google.protobuf.ByteString data) static TokenRelationshipparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationshipparseFrom(com.google.protobuf.CodedInputStream input) static TokenRelationshipparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationshipparseFrom(InputStream input) static TokenRelationshipparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TokenRelationshipparseFrom(ByteBuffer data) static TokenRelationshipparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TokenRelationship> 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:
-
SYMBOL_FIELD_NUMBER
public static final int SYMBOL_FIELD_NUMBER- See Also:
-
BALANCE_FIELD_NUMBER
public static final int BALANCE_FIELD_NUMBER- See Also:
-
KYCSTATUS_FIELD_NUMBER
public static final int KYCSTATUS_FIELD_NUMBER- See Also:
-
FREEZESTATUS_FIELD_NUMBER
public static final int FREEZESTATUS_FIELD_NUMBER- See Also:
-
DECIMALS_FIELD_NUMBER
public static final int DECIMALS_FIELD_NUMBER- See Also:
-
AUTOMATIC_ASSOCIATION_FIELD_NUMBER
public static final int AUTOMATIC_ASSOCIATION_FIELD_NUMBER- See Also:
-
-
Method Details
-
hasTokenId
public boolean hasTokenId()* A token identifier. <p> This MUST match an existing token that is not deleted.
.proto.TokenID tokenId = 1;- Specified by:
hasTokenIdin interfaceTokenRelationshipOrBuilder- Returns:
- Whether the tokenId field is set.
-
getTokenId
* A token identifier. <p> This MUST match an existing token that is not deleted.
.proto.TokenID tokenId = 1;- Specified by:
getTokenIdin interfaceTokenRelationshipOrBuilder- Returns:
- The tokenId.
-
getSymbol
* A token symbol. <p> This MUST match an existing token that is not deleted.<br/> This MUST match the value for the token identified in `tokenId`.
string symbol = 2;- Specified by:
getSymbolin interfaceTokenRelationshipOrBuilder- Returns:
- The symbol.
-
getSymbolBytes
public com.google.protobuf.ByteString getSymbolBytes()* A token symbol. <p> This MUST match an existing token that is not deleted.<br/> This MUST match the value for the token identified in `tokenId`.
string symbol = 2;- Specified by:
getSymbolBytesin interfaceTokenRelationshipOrBuilder- Returns:
- The bytes for symbol.
-
getBalance
public long getBalance()* An account balance for this token. <p> For fungible/common tokens this SHALL be the balance that the account holds of that token. The value is provided as an integer amount of the smallest unit of the token (i.e. 10<sup>`-decimals`</sup> whole tokens).<br/> For non-fungible/unique tokens this SHALL be the whole number of unique tokens held by the account for this token type.
uint64 balance = 3;- Specified by:
getBalancein interfaceTokenRelationshipOrBuilder- Returns:
- The balance.
-
getKycStatusValue
public int getKycStatusValue()* A KYC status for the account with respect to this token. <p> This may be `KycNotApplicable`, `Granted` or `Revoked` and, if KYC is not supported for this token (e.g. the `kyc_key` of the token is not set), this SHALL be `KycNotApplicable`.
.proto.TokenKycStatus kycStatus = 4;- Specified by:
getKycStatusValuein interfaceTokenRelationshipOrBuilder- Returns:
- The enum numeric value on the wire for kycStatus.
-
getKycStatus
* A KYC status for the account with respect to this token. <p> This may be `KycNotApplicable`, `Granted` or `Revoked` and, if KYC is not supported for this token (e.g. the `kyc_key` of the token is not set), this SHALL be `KycNotApplicable`.
.proto.TokenKycStatus kycStatus = 4;- Specified by:
getKycStatusin interfaceTokenRelationshipOrBuilder- Returns:
- The kycStatus.
-
getFreezeStatusValue
public int getFreezeStatusValue()* A Freeze status for the account with respect to this token. <p> This value SHALL be one of `FreezeNotApplicable`, `Frozen` or `Unfrozen`.<br/> If the token cannot freeze account assets (e.g. the `freeze_key` of the token is not set), this SHALL be `FreezeNotApplicable`.
.proto.TokenFreezeStatus freezeStatus = 5;- Specified by:
getFreezeStatusValuein interfaceTokenRelationshipOrBuilder- Returns:
- The enum numeric value on the wire for freezeStatus.
-
getFreezeStatus
* A Freeze status for the account with respect to this token. <p> This value SHALL be one of `FreezeNotApplicable`, `Frozen` or `Unfrozen`.<br/> If the token cannot freeze account assets (e.g. the `freeze_key` of the token is not set), this SHALL be `FreezeNotApplicable`.
.proto.TokenFreezeStatus freezeStatus = 5;- Specified by:
getFreezeStatusin interfaceTokenRelationshipOrBuilder- Returns:
- The freezeStatus.
-
getDecimals
public int getDecimals()* A maximum "precision" for this token. <p> This value MUST match the `decimals` field of the token identified in the `tokenId` field.<br/> A single whole token SHALL be divided into at most 10<sup>`decimals`</sup> sub-units.
uint32 decimals = 6;- Specified by:
getDecimalsin interfaceTokenRelationshipOrBuilder- Returns:
- The decimals.
-
getAutomaticAssociation
public boolean getAutomaticAssociation()* An automatic association flag. <p> This SHALL be set if the relationship was created implicitly (automatically).<br/> This SHALL be unset if the relationship was created explicitly (manually) via a `TokenAssociate` transaction.
bool automatic_association = 7;- Specified by:
getAutomaticAssociationin interfaceTokenRelationshipOrBuilder- Returns:
- The automaticAssociation.
-
parseFrom
public static TokenRelationship parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelationship parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelationship parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelationship parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelationship parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TokenRelationship parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static TokenRelationship parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static TokenRelationship parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static TokenRelationship parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static TokenRelationship 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<TokenRelationship,TokenRelationship.Builder>
-
getDefaultInstance
-
parser
-