com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: token_reject.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Reject undesired token(s).<br/>
* Transfer one or more token balances held by the requesting account to the treasury for each
* token type.<br/>
* Each transfer SHALL be one of the following
* - A single non-fungible/unique token.
* - The full balance held for a fungible/common token type.
*
* A single tokenReject transaction SHALL support a maximum of 10 transfers.
*
* ### Transaction Record Effects
* - Each successful transfer from `payer` to `treasury` SHALL be recorded in `token_transfer_list` for the transaction record.
*
*
* Protobuf type {@code proto.TokenRejectTransactionBody}
*/
public final class TokenRejectTransactionBody extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.TokenRejectTransactionBody)
TokenRejectTransactionBodyOrBuilder {
private static final long serialVersionUID = 0L;
// Use TokenRejectTransactionBody.newBuilder() to construct.
private TokenRejectTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TokenRejectTransactionBody() {
rejections_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TokenRejectTransactionBody();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenRejectTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenRejectTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.class, com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.Builder.class);
}
private int bitField0_;
public static final int OWNER_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.AccountID owner_;
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
* @return Whether the owner field is set.
*/
@java.lang.Override
public boolean hasOwner() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
* @return The owner.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountID getOwner() {
return owner_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : owner_;
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getOwnerOrBuilder() {
return owner_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : owner_;
}
public static final int REJECTIONS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List rejections_;
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
@java.lang.Override
public java.util.List getRejectionsList() {
return rejections_;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
@java.lang.Override
public java.util.List extends com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder>
getRejectionsOrBuilderList() {
return rejections_;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
@java.lang.Override
public int getRejectionsCount() {
return rejections_.size();
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenReference getRejections(int index) {
return rejections_.get(index);
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder getRejectionsOrBuilder(
int index) {
return rejections_.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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getOwner());
}
for (int i = 0; i < rejections_.size(); i++) {
output.writeMessage(2, rejections_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getOwner());
}
for (int i = 0; i < rejections_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, rejections_.get(i));
}
size += getUnknownFields().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.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody other = (com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody) obj;
if (hasOwner() != other.hasOwner()) return false;
if (hasOwner()) {
if (!getOwner()
.equals(other.getOwner())) return false;
}
if (!getRejectionsList()
.equals(other.getRejectionsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasOwner()) {
hash = (37 * hash) + OWNER_FIELD_NUMBER;
hash = (53 * hash) + getOwner().hashCode();
}
if (getRejectionsCount() > 0) {
hash = (37 * hash) + REJECTIONS_FIELD_NUMBER;
hash = (53 * hash) + getRejectionsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody 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.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody 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.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody 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.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody 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;
}
/**
*
**
* Reject undesired token(s).<br/>
* Transfer one or more token balances held by the requesting account to the treasury for each
* token type.<br/>
* Each transfer SHALL be one of the following
* - A single non-fungible/unique token.
* - The full balance held for a fungible/common token type.
*
* A single tokenReject transaction SHALL support a maximum of 10 transfers.
*
* ### Transaction Record Effects
* - Each successful transfer from `payer` to `treasury` SHALL be recorded in `token_transfer_list` for the transaction record.
*
*
* Protobuf type {@code proto.TokenRejectTransactionBody}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.TokenRejectTransactionBody)
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBodyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenRejectTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenRejectTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.class, com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getOwnerFieldBuilder();
getRejectionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
owner_ = null;
if (ownerBuilder_ != null) {
ownerBuilder_.dispose();
ownerBuilder_ = null;
}
if (rejectionsBuilder_ == null) {
rejections_ = java.util.Collections.emptyList();
} else {
rejections_ = null;
rejectionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.TokenReject.internal_static_proto_TokenRejectTransactionBody_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody build() {
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody buildPartial() {
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody result = new com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody result) {
if (rejectionsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
rejections_ = java.util.Collections.unmodifiableList(rejections_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.rejections_ = rejections_;
} else {
result.rejections_ = rejectionsBuilder_.build();
}
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.owner_ = ownerBuilder_ == null
? owner_
: ownerBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody other) {
if (other == com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.getDefaultInstance()) return this;
if (other.hasOwner()) {
mergeOwner(other.getOwner());
}
if (rejectionsBuilder_ == null) {
if (!other.rejections_.isEmpty()) {
if (rejections_.isEmpty()) {
rejections_ = other.rejections_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureRejectionsIsMutable();
rejections_.addAll(other.rejections_);
}
onChanged();
}
} else {
if (!other.rejections_.isEmpty()) {
if (rejectionsBuilder_.isEmpty()) {
rejectionsBuilder_.dispose();
rejectionsBuilder_ = null;
rejections_ = other.rejections_;
bitField0_ = (bitField0_ & ~0x00000002);
rejectionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRejectionsFieldBuilder() : null;
} else {
rejectionsBuilder_.addAllMessages(other.rejections_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getOwnerFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.hedera.hashgraph.sdk.proto.TokenReference m =
input.readMessage(
com.hedera.hashgraph.sdk.proto.TokenReference.parser(),
extensionRegistry);
if (rejectionsBuilder_ == null) {
ensureRejectionsIsMutable();
rejections_.add(m);
} else {
rejectionsBuilder_.addMessage(m);
}
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.hedera.hashgraph.sdk.proto.AccountID owner_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> ownerBuilder_;
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
* @return Whether the owner field is set.
*/
public boolean hasOwner() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
* @return The owner.
*/
public com.hedera.hashgraph.sdk.proto.AccountID getOwner() {
if (ownerBuilder_ == null) {
return owner_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : owner_;
} else {
return ownerBuilder_.getMessage();
}
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
public Builder setOwner(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (ownerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
owner_ = value;
} else {
ownerBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
public Builder setOwner(
com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) {
if (ownerBuilder_ == null) {
owner_ = builderForValue.build();
} else {
ownerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
public Builder mergeOwner(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (ownerBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
owner_ != null &&
owner_ != com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance()) {
getOwnerBuilder().mergeFrom(value);
} else {
owner_ = value;
}
} else {
ownerBuilder_.mergeFrom(value);
}
if (owner_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
public Builder clearOwner() {
bitField0_ = (bitField0_ & ~0x00000001);
owner_ = null;
if (ownerBuilder_ != null) {
ownerBuilder_.dispose();
ownerBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
public com.hedera.hashgraph.sdk.proto.AccountID.Builder getOwnerBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getOwnerFieldBuilder().getBuilder();
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getOwnerOrBuilder() {
if (ownerBuilder_ != null) {
return ownerBuilder_.getMessageOrBuilder();
} else {
return owner_ == null ?
com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : owner_;
}
}
/**
*
**
* An account holding the tokens to be rejected.<br/>
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*
*
* .proto.AccountID owner = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>
getOwnerFieldBuilder() {
if (ownerBuilder_ == null) {
ownerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>(
getOwner(),
getParentForChildren(),
isClean());
owner_ = null;
}
return ownerBuilder_;
}
private java.util.List rejections_ =
java.util.Collections.emptyList();
private void ensureRejectionsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
rejections_ = new java.util.ArrayList(rejections_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TokenReference, com.hedera.hashgraph.sdk.proto.TokenReference.Builder, com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder> rejectionsBuilder_;
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public java.util.List getRejectionsList() {
if (rejectionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(rejections_);
} else {
return rejectionsBuilder_.getMessageList();
}
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public int getRejectionsCount() {
if (rejectionsBuilder_ == null) {
return rejections_.size();
} else {
return rejectionsBuilder_.getCount();
}
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public com.hedera.hashgraph.sdk.proto.TokenReference getRejections(int index) {
if (rejectionsBuilder_ == null) {
return rejections_.get(index);
} else {
return rejectionsBuilder_.getMessage(index);
}
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder setRejections(
int index, com.hedera.hashgraph.sdk.proto.TokenReference value) {
if (rejectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRejectionsIsMutable();
rejections_.set(index, value);
onChanged();
} else {
rejectionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder setRejections(
int index, com.hedera.hashgraph.sdk.proto.TokenReference.Builder builderForValue) {
if (rejectionsBuilder_ == null) {
ensureRejectionsIsMutable();
rejections_.set(index, builderForValue.build());
onChanged();
} else {
rejectionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder addRejections(com.hedera.hashgraph.sdk.proto.TokenReference value) {
if (rejectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRejectionsIsMutable();
rejections_.add(value);
onChanged();
} else {
rejectionsBuilder_.addMessage(value);
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder addRejections(
int index, com.hedera.hashgraph.sdk.proto.TokenReference value) {
if (rejectionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRejectionsIsMutable();
rejections_.add(index, value);
onChanged();
} else {
rejectionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder addRejections(
com.hedera.hashgraph.sdk.proto.TokenReference.Builder builderForValue) {
if (rejectionsBuilder_ == null) {
ensureRejectionsIsMutable();
rejections_.add(builderForValue.build());
onChanged();
} else {
rejectionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder addRejections(
int index, com.hedera.hashgraph.sdk.proto.TokenReference.Builder builderForValue) {
if (rejectionsBuilder_ == null) {
ensureRejectionsIsMutable();
rejections_.add(index, builderForValue.build());
onChanged();
} else {
rejectionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder addAllRejections(
java.lang.Iterable extends com.hedera.hashgraph.sdk.proto.TokenReference> values) {
if (rejectionsBuilder_ == null) {
ensureRejectionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rejections_);
onChanged();
} else {
rejectionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder clearRejections() {
if (rejectionsBuilder_ == null) {
rejections_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
rejectionsBuilder_.clear();
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public Builder removeRejections(int index) {
if (rejectionsBuilder_ == null) {
ensureRejectionsIsMutable();
rejections_.remove(index);
onChanged();
} else {
rejectionsBuilder_.remove(index);
}
return this;
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public com.hedera.hashgraph.sdk.proto.TokenReference.Builder getRejectionsBuilder(
int index) {
return getRejectionsFieldBuilder().getBuilder(index);
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder getRejectionsOrBuilder(
int index) {
if (rejectionsBuilder_ == null) {
return rejections_.get(index); } else {
return rejectionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public java.util.List extends com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder>
getRejectionsOrBuilderList() {
if (rejectionsBuilder_ != null) {
return rejectionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rejections_);
}
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public com.hedera.hashgraph.sdk.proto.TokenReference.Builder addRejectionsBuilder() {
return getRejectionsFieldBuilder().addBuilder(
com.hedera.hashgraph.sdk.proto.TokenReference.getDefaultInstance());
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public com.hedera.hashgraph.sdk.proto.TokenReference.Builder addRejectionsBuilder(
int index) {
return getRejectionsFieldBuilder().addBuilder(
index, com.hedera.hashgraph.sdk.proto.TokenReference.getDefaultInstance());
}
/**
*
**
* A list of one or more token rejections.<br/>
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.<br/>
* After rejection the requesting account SHALL continue to be associated with the token.<br/>
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*
*
* repeated .proto.TokenReference rejections = 2;
*/
public java.util.List
getRejectionsBuilderList() {
return getRejectionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TokenReference, com.hedera.hashgraph.sdk.proto.TokenReference.Builder, com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder>
getRejectionsFieldBuilder() {
if (rejectionsBuilder_ == null) {
rejectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.TokenReference, com.hedera.hashgraph.sdk.proto.TokenReference.Builder, com.hedera.hashgraph.sdk.proto.TokenReferenceOrBuilder>(
rejections_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
rejections_ = null;
}
return rejectionsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:proto.TokenRejectTransactionBody)
}
// @@protoc_insertion_point(class_scope:proto.TokenRejectTransactionBody)
private static final com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody();
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TokenRejectTransactionBody parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}