Class TokenAssociateTransactionBody

java.lang.Object
com.google.protobuf.AbstractMessageLite<TokenAssociateTransactionBody,TokenAssociateTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite<TokenAssociateTransactionBody,TokenAssociateTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.TokenAssociateTransactionBody
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, TokenAssociateTransactionBodyOrBuilder

@Generated public final class TokenAssociateTransactionBody extends com.google.protobuf.GeneratedMessageLite<TokenAssociateTransactionBody,TokenAssociateTransactionBody.Builder> implements TokenAssociateTransactionBodyOrBuilder
 *
 Associate an Hedera Token Service (HTS) token and an account.

 An association MUST exist between an account and a token before that
 account may transfer or receive that token.<br/>
 If the identified account is not found,
 the transaction SHALL return `INVALID_ACCOUNT_ID`.<br/>
 If the identified account has been deleted,
 the transaction SHALL return `ACCOUNT_DELETED`.<br/>
 If any of the identified tokens is not found,
 the transaction SHALL return `INVALID_TOKEN_REF`.<br/>
 If any of the identified tokens has been deleted,
 the transaction SHALL return `TOKEN_WAS_DELETED`.<br/>
 If an association already exists for any of the identified tokens,
 the transaction SHALL return `TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT`.<br/>
 The identified account MUST sign this transaction.

 ### Block Stream Effects
 None
 
Protobuf type proto.TokenAssociateTransactionBody
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * Associate an Hedera Token Service (HTS) token and an 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

    Fields
    Modifier and Type
    Field
    Description
    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)
     
    * An account identifier.
     
    getTokens(int index)
    * A list of token identifiers.
    int
    * A list of token identifiers.
    * A list of token identifiers.
    getTokensOrBuilder(int index)
    * A list of token identifiers.
    * A list of token identifiers.
    boolean
    * An account 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<TokenAssociateTransactionBody>
     

    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

  • Method Details

    • hasAccount

      public boolean hasAccount()
       *
       An account identifier.
       <p>
       The identified account SHALL be associated to each of the
       tokens identified in the `tokens` field.<br/>
       This field is REQUIRED and MUST be a valid account identifier.<br/>
       The identified account MUST exist in state.<br/>
       The identified account MUST NOT be deleted.<br/>
       The identified account MUST NOT be expired.
       
      .proto.AccountID account = 1;
      Specified by:
      hasAccount in interface TokenAssociateTransactionBodyOrBuilder
      Returns:
      Whether the account field is set.
    • getAccount

      public AccountID getAccount()
       *
       An account identifier.
       <p>
       The identified account SHALL be associated to each of the
       tokens identified in the `tokens` field.<br/>
       This field is REQUIRED and MUST be a valid account identifier.<br/>
       The identified account MUST exist in state.<br/>
       The identified account MUST NOT be deleted.<br/>
       The identified account MUST NOT be expired.
       
      .proto.AccountID account = 1;
      Specified by:
      getAccount in interface TokenAssociateTransactionBodyOrBuilder
      Returns:
      The account.
    • getTokensList

      public List<TokenID> getTokensList()
       *
       A list of token identifiers.
       <p>
       Each token identified in this list SHALL be separately associated with
       the account identified in the `account` field.<br/>
       This list MUST NOT be empty.
       Each entry in this list MUST be a valid token identifier.<br/>
       Each entry in this list MUST NOT be currently associated to the
       account identified in `account`.<br/>
       Each entry in this list MUST NOT be expired.<br/>
       Each entry in this list MUST NOT be deleted.
       
      repeated .proto.TokenID tokens = 2;
      Specified by:
      getTokensList in interface TokenAssociateTransactionBodyOrBuilder
    • getTokensOrBuilderList

      public List<? extends TokenIDOrBuilder> getTokensOrBuilderList()
       *
       A list of token identifiers.
       <p>
       Each token identified in this list SHALL be separately associated with
       the account identified in the `account` field.<br/>
       This list MUST NOT be empty.
       Each entry in this list MUST be a valid token identifier.<br/>
       Each entry in this list MUST NOT be currently associated to the
       account identified in `account`.<br/>
       Each entry in this list MUST NOT be expired.<br/>
       Each entry in this list MUST NOT be deleted.
       
      repeated .proto.TokenID tokens = 2;
    • getTokensCount

      public int getTokensCount()
       *
       A list of token identifiers.
       <p>
       Each token identified in this list SHALL be separately associated with
       the account identified in the `account` field.<br/>
       This list MUST NOT be empty.
       Each entry in this list MUST be a valid token identifier.<br/>
       Each entry in this list MUST NOT be currently associated to the
       account identified in `account`.<br/>
       Each entry in this list MUST NOT be expired.<br/>
       Each entry in this list MUST NOT be deleted.
       
      repeated .proto.TokenID tokens = 2;
      Specified by:
      getTokensCount in interface TokenAssociateTransactionBodyOrBuilder
    • getTokens

      public TokenID getTokens(int index)
       *
       A list of token identifiers.
       <p>
       Each token identified in this list SHALL be separately associated with
       the account identified in the `account` field.<br/>
       This list MUST NOT be empty.
       Each entry in this list MUST be a valid token identifier.<br/>
       Each entry in this list MUST NOT be currently associated to the
       account identified in `account`.<br/>
       Each entry in this list MUST NOT be expired.<br/>
       Each entry in this list MUST NOT be deleted.
       
      repeated .proto.TokenID tokens = 2;
      Specified by:
      getTokens in interface TokenAssociateTransactionBodyOrBuilder
    • getTokensOrBuilder

      public TokenIDOrBuilder getTokensOrBuilder(int index)
       *
       A list of token identifiers.
       <p>
       Each token identified in this list SHALL be separately associated with
       the account identified in the `account` field.<br/>
       This list MUST NOT be empty.
       Each entry in this list MUST be a valid token identifier.<br/>
       Each entry in this list MUST NOT be currently associated to the
       account identified in `account`.<br/>
       Each entry in this list MUST NOT be expired.<br/>
       Each entry in this list MUST NOT be deleted.
       
      repeated .proto.TokenID tokens = 2;
    • parseFrom

      public static TokenAssociateTransactionBody parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenAssociateTransactionBody parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenAssociateTransactionBody parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenAssociateTransactionBody parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenAssociateTransactionBody parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenAssociateTransactionBody parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static TokenAssociateTransactionBody parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

      public static TokenAssociateTransactionBody parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static TokenAssociateTransactionBody parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static TokenAssociateTransactionBody.Builder newBuilder()
    • newBuilder

    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<TokenAssociateTransactionBody,TokenAssociateTransactionBody.Builder>
    • getDefaultInstance

      public static TokenAssociateTransactionBody getDefaultInstance()
    • parser

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