Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: token_dissociate.proto
package com.hederahashgraph.api.proto.java;
/**
*
**
* Dissociates the provided account with the provided tokens. Must be signed by the provided
* Account's key.
* If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID.
* If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED.
* If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF.
* If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED.
* If an association between the provided account and any of the tokens does not exist, the
* transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT.
* If a token has not been deleted and has not expired, and the user has a nonzero balance, the
* transaction will resolve to TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES.
* If a <b>fungible token</b> has expired, the user can disassociate even if their token balance is
* not zero.
* If a <b>non fungible token</b> has expired, the user can <b>not</b> disassociate if their token
* balance is not zero. The transaction will resolve to TRANSACTION_REQUIRED_ZERO_TOKEN_BALANCES.
* On success, associations between the provided account and tokens are removed.
*
*
* Protobuf type {@code proto.TokenDissociateTransactionBody}
*/
public final class TokenDissociateTransactionBody extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.TokenDissociateTransactionBody)
TokenDissociateTransactionBodyOrBuilder {
private static final long serialVersionUID = 0L;
// Use TokenDissociateTransactionBody.newBuilder() to construct.
private TokenDissociateTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TokenDissociateTransactionBody() {
tokens_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TokenDissociateTransactionBody();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TokenDissociateTransactionBody(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.hederahashgraph.api.proto.java.AccountID.Builder subBuilder = null;
if (account_ != null) {
subBuilder = account_.toBuilder();
}
account_ = input.readMessage(com.hederahashgraph.api.proto.java.AccountID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(account_);
account_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
tokens_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
tokens_.add(
input.readMessage(com.hederahashgraph.api.proto.java.TokenID.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
tokens_ = java.util.Collections.unmodifiableList(tokens_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.TokenDissociate.internal_static_proto_TokenDissociateTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.TokenDissociate.internal_static_proto_TokenDissociateTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody.class, com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody.Builder.class);
}
public static final int ACCOUNT_FIELD_NUMBER = 1;
private com.hederahashgraph.api.proto.java.AccountID account_;
/**
*
**
* The account to be dissociated with the provided tokens
*
*
* .proto.AccountID account = 1;
* @return Whether the account field is set.
*/
@java.lang.Override
public boolean hasAccount() {
return account_ != null;
}
/**
*
**
* The account to be dissociated with the provided tokens
*
**
* The tokens to be dissociated with the provided account
*
*
* repeated .proto.TokenID tokens = 2;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.TokenIDOrBuilder getTokensOrBuilder(
int index) {
return tokens_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (account_ != null) {
output.writeMessage(1, getAccount());
}
for (int i = 0; i < tokens_.size(); i++) {
output.writeMessage(2, tokens_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (account_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getAccount());
}
for (int i = 0; i < tokens_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, tokens_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody)) {
return super.equals(obj);
}
com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody other = (com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody) obj;
if (hasAccount() != other.hasAccount()) return false;
if (hasAccount()) {
if (!getAccount()
.equals(other.getAccount())) return false;
}
if (!getTokensList()
.equals(other.getTokensList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasAccount()) {
hash = (37 * hash) + ACCOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAccount().hashCode();
}
if (getTokensCount() > 0) {
hash = (37 * hash) + TOKENS_FIELD_NUMBER;
hash = (53 * hash) + getTokensList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
**
* Dissociates the provided account with the provided tokens. Must be signed by the provided
* Account's key.
* If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID.
* If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED.
* If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF.
* If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED.
* If an association between the provided account and any of the tokens does not exist, the
* transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT.
* If a token has not been deleted and has not expired, and the user has a nonzero balance, the
* transaction will resolve to TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES.
* If a <b>fungible token</b> has expired, the user can disassociate even if their token balance is
* not zero.
* If a <b>non fungible token</b> has expired, the user can <b>not</b> disassociate if their token
* balance is not zero. The transaction will resolve to TRANSACTION_REQUIRED_ZERO_TOKEN_BALANCES.
* On success, associations between the provided account and tokens are removed.
*