tmp = rejections_;
if (!tmp.isModifiable()) {
rejections_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
}
}
/**
*
**
* 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;
*/
private void setRejections(
int index, com.hedera.hashgraph.sdk.proto.TokenReference value) {
value.getClass();
ensureRejectionsIsMutable();
rejections_.set(index, value);
}
/**
*
**
* 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;
*/
private void addRejections(com.hedera.hashgraph.sdk.proto.TokenReference value) {
value.getClass();
ensureRejectionsIsMutable();
rejections_.add(value);
}
/**
*
**
* 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;
*/
private void addRejections(
int index, com.hedera.hashgraph.sdk.proto.TokenReference value) {
value.getClass();
ensureRejectionsIsMutable();
rejections_.add(index, value);
}
/**
*
**
* 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;
*/
private void addAllRejections(
java.lang.Iterable extends com.hedera.hashgraph.sdk.proto.TokenReference> values) {
ensureRejectionsIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, 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;
*/
private void clearRejections() {
rejections_ = emptyProtobufList();
}
/**
*
**
* 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;
*/
private void removeRejections(int index) {
ensureRejectionsIsMutable();
rejections_.remove(index);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, 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 com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, 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 com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, 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.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, 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.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* 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.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody, Builder> implements
// @@protoc_insertion_point(builder_implements:proto.TokenRejectTransactionBody)
com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBodyOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* 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 boolean hasOwner() {
return instance.hasOwner();
}
/**
*
**
* 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.AccountID getOwner() {
return instance.getOwner();
}
/**
*
**
* 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) {
copyOnWrite();
instance.setOwner(value);
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) {
copyOnWrite();
instance.setOwner(builderForValue.build());
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) {
copyOnWrite();
instance.mergeOwner(value);
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() { copyOnWrite();
instance.clearOwner();
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;
*/
@java.lang.Override
public java.util.List getRejectionsList() {
return java.util.Collections.unmodifiableList(
instance.getRejectionsList());
}
/**
*
**
* 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 instance.getRejectionsCount();
}/**
*
**
* 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 instance.getRejections(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) {
copyOnWrite();
instance.setRejections(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) {
copyOnWrite();
instance.setRejections(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) {
copyOnWrite();
instance.addRejections(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) {
copyOnWrite();
instance.addRejections(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) {
copyOnWrite();
instance.addRejections(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) {
copyOnWrite();
instance.addRejections(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) {
copyOnWrite();
instance.addAllRejections(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() {
copyOnWrite();
instance.clearRejections();
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) {
copyOnWrite();
instance.removeRejections(index);
return this;
}
// @@protoc_insertion_point(builder_scope:proto.TokenRejectTransactionBody)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"owner_",
"rejections_",
com.hedera.hashgraph.sdk.proto.TokenReference.class,
};
java.lang.String info =
"\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0001\u0000\u0001\t\u0002\u001b" +
"";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:proto.TokenRejectTransactionBody)
private static final com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody DEFAULT_INSTANCE;
static {
TokenRejectTransactionBody defaultInstance = new TokenRejectTransactionBody();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
TokenRejectTransactionBody.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.TokenRejectTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}