Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
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 NoneProtobuf type
proto.TokenAssociateTransactionBody-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic 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
FieldsModifier and TypeFieldDescriptionstatic 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.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.List<? extends TokenIDOrBuilder> * A list of token identifiers.boolean* An account identifier.newBuilder(TokenAssociateTransactionBody prototype) parseDelimitedFrom(InputStream input) 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) parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TokenAssociateTransactionBody> 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
-
ACCOUNT_FIELD_NUMBER
public static final int ACCOUNT_FIELD_NUMBER- See Also:
-
TOKENS_FIELD_NUMBER
public static final int TOKENS_FIELD_NUMBER- See Also:
-
-
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:
hasAccountin interfaceTokenAssociateTransactionBodyOrBuilder- Returns:
- Whether the account field is set.
-
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:
getAccountin interfaceTokenAssociateTransactionBodyOrBuilder- Returns:
- The account.
-
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:
getTokensListin interfaceTokenAssociateTransactionBodyOrBuilder
-
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:
getTokensCountin interfaceTokenAssociateTransactionBodyOrBuilder
-
getTokens
* 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:
getTokensin interfaceTokenAssociateTransactionBodyOrBuilder
-
getTokensOrBuilder
* 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
- 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
-
newBuilder
public static TokenAssociateTransactionBody.Builder newBuilder(TokenAssociateTransactionBody prototype) -
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<TokenAssociateTransactionBody,TokenAssociateTransactionBody.Builder>
-
getDefaultInstance
-
parser
-