Class TokenRelationship

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 Classes
    Modifier and Type
    Class
    Description
    static 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

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    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)
     
    boolean
    * An automatic association flag.
    long
    * An account balance for this token.
    int
    * A maximum "precision" for this token.
     
    * 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.
     
     
     
    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<TokenRelationship>
     

    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

    • 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:
      hasTokenId in interface TokenRelationshipOrBuilder
      Returns:
      Whether the tokenId field is set.
    • getTokenId

      public TokenID getTokenId()
       *
       A token identifier.
       <p>
       This MUST match an existing token that is not deleted.
       
      .proto.TokenID tokenId = 1;
      Specified by:
      getTokenId in interface TokenRelationshipOrBuilder
      Returns:
      The tokenId.
    • getSymbol

      public String 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:
      getSymbol in interface TokenRelationshipOrBuilder
      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:
      getSymbolBytes in interface TokenRelationshipOrBuilder
      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:
      getBalance in interface TokenRelationshipOrBuilder
      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:
      getKycStatusValue in interface TokenRelationshipOrBuilder
      Returns:
      The enum numeric value on the wire for kycStatus.
    • getKycStatus

      public TokenKycStatus 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:
      getKycStatus in interface TokenRelationshipOrBuilder
      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:
      getFreezeStatusValue in interface TokenRelationshipOrBuilder
      Returns:
      The enum numeric value on the wire for freezeStatus.
    • getFreezeStatus

      public TokenFreezeStatus 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:
      getFreezeStatus in interface TokenRelationshipOrBuilder
      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:
      getDecimals in interface TokenRelationshipOrBuilder
      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:
      getAutomaticAssociation in interface TokenRelationshipOrBuilder
      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

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

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

      public static TokenRelationship parseDelimitedFrom(InputStream input) throws IOException
      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

      public static TokenRelationship.Builder newBuilder()
    • newBuilder

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

      public static TokenRelationship getDefaultInstance()
    • parser

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