com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: token_airdrop.proto
package com.hederahashgraph.api.proto.java;
/**
*
**
* Airdrop one or more tokens to one or more accounts.
* ### Effects
* This distributes tokens from the balance of one or more sending account(s) to the balance
* of one or more recipient accounts. Accounts MAY receive the tokens in one of four ways.
* - An account already associated to the token to be distributed SHALL receive the
* airdropped tokens immediately to the recipient account balance.<br/>
* The fee for this transfer SHALL include the transfer, the airdrop fee, and any custom fees.
* - An account with available automatic association slots SHALL be automatically
* associated to the token, and SHALL immediately receive the airdropped tokens to the
* recipient account balance.<br/>
* The fee for this transfer SHALL include the transfer, the association, the cost to renew
* that association once, the airdrop fee, and any custom fees.
* - An account with "receiver signature required" set SHALL have a "Pending Airdrop" created
* and must claim that airdrop with a `claimAirdrop` transaction.<br/>
* The fee for this transfer SHALL include the transfer, the association, the cost to renew
* that association once, the airdrop fee, and any custom fees. If the pending airdrop is not
* claimed immediately, the `sender` SHALL pay the cost to renew the token association, and
* the cost to maintain the pending airdrop, until the pending airdrop is claimed or cancelled.
* - An account with no available automatic association slots SHALL have a "Pending Airdrop"
* created and must claim that airdrop with a `claimAirdrop` transaction.<br/>
* The fee for this transfer SHALL include the transfer, the association, the cost to renew
* that association once, the airdrop fee, and any custom fees. If the pending airdrop is not
* claimed immediately, the `sender` SHALL pay the cost to renew the token association, and
* the cost to maintain the pending airdrop, until the pending airdrop is claimed or cancelled.
* If an airdrop would create a pending airdrop for a fungible/common token, and a pending airdrop
* for the same sender, receiver, and token already exists, the existing pending airdrop
* SHALL be updated to add the new amount to the existing airdrop, rather than creating a new
* pending airdrop.
* Any airdrop that completes immediately SHALL be irreversible. Any airdrop that results in a
* "Pending Airdrop" MAY be canceled via a `cancelAirdrop` transaction.
* All transfer fees (including custom fees and royalties), as well as the rent cost for the
* first auto-renewal period for any automatic-association slot occupied by the airdropped
* tokens, SHALL be charged to the account paying for this transaction.
* ### Record Stream Effects
* - Each successful transfer SHALL be recorded in `token_transfer_list` for the transaction record.
* - Each successful transfer that consumes an automatic association slot SHALL populate the
* `automatic_association` field for the record.
* - Each pending transfer _created_ SHALL be added to the `pending_airdrops` field for the record.
* - Each pending transfer _updated_ SHALL be added to the `pending_airdrops` field for the record.
*
*
* Protobuf type {@code proto.TokenAirdropTransactionBody}
*/
public final class TokenAirdropTransactionBody extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.TokenAirdropTransactionBody)
TokenAirdropTransactionBodyOrBuilder {
private static final long serialVersionUID = 0L;
// Use TokenAirdropTransactionBody.newBuilder() to construct.
private TokenAirdropTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TokenAirdropTransactionBody() {
tokenTransfers_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TokenAirdropTransactionBody();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TokenAirdropTransactionBody(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
tokenTransfers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
tokenTransfers_.add(
input.readMessage(com.hederahashgraph.api.proto.java.TokenTransferList.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)) {
tokenTransfers_ = java.util.Collections.unmodifiableList(tokenTransfers_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.TokenAirdrop.internal_static_proto_TokenAirdropTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.TokenAirdrop.internal_static_proto_TokenAirdropTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody.class, com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody.Builder.class);
}
public static final int TOKEN_TRANSFERS_FIELD_NUMBER = 1;
private java.util.List tokenTransfers_;
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
@java.lang.Override
public java.util.List getTokenTransfersList() {
return tokenTransfers_;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
@java.lang.Override
public java.util.List extends com.hederahashgraph.api.proto.java.TokenTransferListOrBuilder>
getTokenTransfersOrBuilderList() {
return tokenTransfers_;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
@java.lang.Override
public int getTokenTransfersCount() {
return tokenTransfers_.size();
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.TokenTransferList getTokenTransfers(int index) {
return tokenTransfers_.get(index);
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.TokenTransferListOrBuilder getTokenTransfersOrBuilder(
int index) {
return tokenTransfers_.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 {
for (int i = 0; i < tokenTransfers_.size(); i++) {
output.writeMessage(1, tokenTransfers_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < tokenTransfers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, tokenTransfers_.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.TokenAirdropTransactionBody)) {
return super.equals(obj);
}
com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody other = (com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody) obj;
if (!getTokenTransfersList()
.equals(other.getTokenTransfersList())) 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 (getTokenTransfersCount() > 0) {
hash = (37 * hash) + TOKEN_TRANSFERS_FIELD_NUMBER;
hash = (53 * hash) + getTokenTransfersList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody 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.TokenAirdropTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody 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.TokenAirdropTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody 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.TokenAirdropTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody 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.TokenAirdropTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody 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.TokenAirdropTransactionBody 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.TokenAirdropTransactionBody 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.TokenAirdropTransactionBody 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;
}
/**
*
**
* Airdrop one or more tokens to one or more accounts.
* ### Effects
* This distributes tokens from the balance of one or more sending account(s) to the balance
* of one or more recipient accounts. Accounts MAY receive the tokens in one of four ways.
* - An account already associated to the token to be distributed SHALL receive the
* airdropped tokens immediately to the recipient account balance.<br/>
* The fee for this transfer SHALL include the transfer, the airdrop fee, and any custom fees.
* - An account with available automatic association slots SHALL be automatically
* associated to the token, and SHALL immediately receive the airdropped tokens to the
* recipient account balance.<br/>
* The fee for this transfer SHALL include the transfer, the association, the cost to renew
* that association once, the airdrop fee, and any custom fees.
* - An account with "receiver signature required" set SHALL have a "Pending Airdrop" created
* and must claim that airdrop with a `claimAirdrop` transaction.<br/>
* The fee for this transfer SHALL include the transfer, the association, the cost to renew
* that association once, the airdrop fee, and any custom fees. If the pending airdrop is not
* claimed immediately, the `sender` SHALL pay the cost to renew the token association, and
* the cost to maintain the pending airdrop, until the pending airdrop is claimed or cancelled.
* - An account with no available automatic association slots SHALL have a "Pending Airdrop"
* created and must claim that airdrop with a `claimAirdrop` transaction.<br/>
* The fee for this transfer SHALL include the transfer, the association, the cost to renew
* that association once, the airdrop fee, and any custom fees. If the pending airdrop is not
* claimed immediately, the `sender` SHALL pay the cost to renew the token association, and
* the cost to maintain the pending airdrop, until the pending airdrop is claimed or cancelled.
* If an airdrop would create a pending airdrop for a fungible/common token, and a pending airdrop
* for the same sender, receiver, and token already exists, the existing pending airdrop
* SHALL be updated to add the new amount to the existing airdrop, rather than creating a new
* pending airdrop.
* Any airdrop that completes immediately SHALL be irreversible. Any airdrop that results in a
* "Pending Airdrop" MAY be canceled via a `cancelAirdrop` transaction.
* All transfer fees (including custom fees and royalties), as well as the rent cost for the
* first auto-renewal period for any automatic-association slot occupied by the airdropped
* tokens, SHALL be charged to the account paying for this transaction.
* ### Record Stream Effects
* - Each successful transfer SHALL be recorded in `token_transfer_list` for the transaction record.
* - Each successful transfer that consumes an automatic association slot SHALL populate the
* `automatic_association` field for the record.
* - Each pending transfer _created_ SHALL be added to the `pending_airdrops` field for the record.
* - Each pending transfer _updated_ SHALL be added to the `pending_airdrops` field for the record.
*
*
* Protobuf type {@code proto.TokenAirdropTransactionBody}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.TokenAirdropTransactionBody)
com.hederahashgraph.api.proto.java.TokenAirdropTransactionBodyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.TokenAirdrop.internal_static_proto_TokenAirdropTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.TokenAirdrop.internal_static_proto_TokenAirdropTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody.class, com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody.Builder.class);
}
// Construct using com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTokenTransfersFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (tokenTransfersBuilder_ == null) {
tokenTransfers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
tokenTransfersBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hederahashgraph.api.proto.java.TokenAirdrop.internal_static_proto_TokenAirdropTransactionBody_descriptor;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody getDefaultInstanceForType() {
return com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody.getDefaultInstance();
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody build() {
com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody buildPartial() {
com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody result = new com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody(this);
int from_bitField0_ = bitField0_;
if (tokenTransfersBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
tokenTransfers_ = java.util.Collections.unmodifiableList(tokenTransfers_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.tokenTransfers_ = tokenTransfers_;
} else {
result.tokenTransfers_ = tokenTransfersBuilder_.build();
}
onBuilt();
return result;
}
@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.hederahashgraph.api.proto.java.TokenAirdropTransactionBody) {
return mergeFrom((com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody other) {
if (other == com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody.getDefaultInstance()) return this;
if (tokenTransfersBuilder_ == null) {
if (!other.tokenTransfers_.isEmpty()) {
if (tokenTransfers_.isEmpty()) {
tokenTransfers_ = other.tokenTransfers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTokenTransfersIsMutable();
tokenTransfers_.addAll(other.tokenTransfers_);
}
onChanged();
}
} else {
if (!other.tokenTransfers_.isEmpty()) {
if (tokenTransfersBuilder_.isEmpty()) {
tokenTransfersBuilder_.dispose();
tokenTransfersBuilder_ = null;
tokenTransfers_ = other.tokenTransfers_;
bitField0_ = (bitField0_ & ~0x00000001);
tokenTransfersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTokenTransfersFieldBuilder() : null;
} else {
tokenTransfersBuilder_.addAllMessages(other.tokenTransfers_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List tokenTransfers_ =
java.util.Collections.emptyList();
private void ensureTokenTransfersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
tokenTransfers_ = new java.util.ArrayList(tokenTransfers_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.TokenTransferList, com.hederahashgraph.api.proto.java.TokenTransferList.Builder, com.hederahashgraph.api.proto.java.TokenTransferListOrBuilder> tokenTransfersBuilder_;
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public java.util.List getTokenTransfersList() {
if (tokenTransfersBuilder_ == null) {
return java.util.Collections.unmodifiableList(tokenTransfers_);
} else {
return tokenTransfersBuilder_.getMessageList();
}
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public int getTokenTransfersCount() {
if (tokenTransfersBuilder_ == null) {
return tokenTransfers_.size();
} else {
return tokenTransfersBuilder_.getCount();
}
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public com.hederahashgraph.api.proto.java.TokenTransferList getTokenTransfers(int index) {
if (tokenTransfersBuilder_ == null) {
return tokenTransfers_.get(index);
} else {
return tokenTransfersBuilder_.getMessage(index);
}
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder setTokenTransfers(
int index, com.hederahashgraph.api.proto.java.TokenTransferList value) {
if (tokenTransfersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokenTransfersIsMutable();
tokenTransfers_.set(index, value);
onChanged();
} else {
tokenTransfersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder setTokenTransfers(
int index, com.hederahashgraph.api.proto.java.TokenTransferList.Builder builderForValue) {
if (tokenTransfersBuilder_ == null) {
ensureTokenTransfersIsMutable();
tokenTransfers_.set(index, builderForValue.build());
onChanged();
} else {
tokenTransfersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder addTokenTransfers(com.hederahashgraph.api.proto.java.TokenTransferList value) {
if (tokenTransfersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokenTransfersIsMutable();
tokenTransfers_.add(value);
onChanged();
} else {
tokenTransfersBuilder_.addMessage(value);
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder addTokenTransfers(
int index, com.hederahashgraph.api.proto.java.TokenTransferList value) {
if (tokenTransfersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokenTransfersIsMutable();
tokenTransfers_.add(index, value);
onChanged();
} else {
tokenTransfersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder addTokenTransfers(
com.hederahashgraph.api.proto.java.TokenTransferList.Builder builderForValue) {
if (tokenTransfersBuilder_ == null) {
ensureTokenTransfersIsMutable();
tokenTransfers_.add(builderForValue.build());
onChanged();
} else {
tokenTransfersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder addTokenTransfers(
int index, com.hederahashgraph.api.proto.java.TokenTransferList.Builder builderForValue) {
if (tokenTransfersBuilder_ == null) {
ensureTokenTransfersIsMutable();
tokenTransfers_.add(index, builderForValue.build());
onChanged();
} else {
tokenTransfersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder addAllTokenTransfers(
java.lang.Iterable extends com.hederahashgraph.api.proto.java.TokenTransferList> values) {
if (tokenTransfersBuilder_ == null) {
ensureTokenTransfersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tokenTransfers_);
onChanged();
} else {
tokenTransfersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder clearTokenTransfers() {
if (tokenTransfersBuilder_ == null) {
tokenTransfers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
tokenTransfersBuilder_.clear();
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public Builder removeTokenTransfers(int index) {
if (tokenTransfersBuilder_ == null) {
ensureTokenTransfersIsMutable();
tokenTransfers_.remove(index);
onChanged();
} else {
tokenTransfersBuilder_.remove(index);
}
return this;
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public com.hederahashgraph.api.proto.java.TokenTransferList.Builder getTokenTransfersBuilder(
int index) {
return getTokenTransfersFieldBuilder().getBuilder(index);
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public com.hederahashgraph.api.proto.java.TokenTransferListOrBuilder getTokenTransfersOrBuilder(
int index) {
if (tokenTransfersBuilder_ == null) {
return tokenTransfers_.get(index); } else {
return tokenTransfersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public java.util.List extends com.hederahashgraph.api.proto.java.TokenTransferListOrBuilder>
getTokenTransfersOrBuilderList() {
if (tokenTransfersBuilder_ != null) {
return tokenTransfersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(tokenTransfers_);
}
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public com.hederahashgraph.api.proto.java.TokenTransferList.Builder addTokenTransfersBuilder() {
return getTokenTransfersFieldBuilder().addBuilder(
com.hederahashgraph.api.proto.java.TokenTransferList.getDefaultInstance());
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public com.hederahashgraph.api.proto.java.TokenTransferList.Builder addTokenTransfersBuilder(
int index) {
return getTokenTransfersFieldBuilder().addBuilder(
index, com.hederahashgraph.api.proto.java.TokenTransferList.getDefaultInstance());
}
/**
*
**
* A list of token transfers representing one or more airdrops.
* The sender for each transfer MUST have sufficient balance to complete the transfers.
* All token transfers MUST successfully transfer tokens or create a pending airdrop
* for this transaction to succeed.
* This list MUST contain between 1 and 10 transfers, inclusive.
* Note that each transfer of fungible/common tokens requires both a debit and
* a credit, so each _fungible_ token transfer MUST have _balanced_ entries in the
* TokenTransferList for that transfer.
*
*
* repeated .proto.TokenTransferList token_transfers = 1;
*/
public java.util.List
getTokenTransfersBuilderList() {
return getTokenTransfersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.TokenTransferList, com.hederahashgraph.api.proto.java.TokenTransferList.Builder, com.hederahashgraph.api.proto.java.TokenTransferListOrBuilder>
getTokenTransfersFieldBuilder() {
if (tokenTransfersBuilder_ == null) {
tokenTransfersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.TokenTransferList, com.hederahashgraph.api.proto.java.TokenTransferList.Builder, com.hederahashgraph.api.proto.java.TokenTransferListOrBuilder>(
tokenTransfers_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
tokenTransfers_ = null;
}
return tokenTransfersBuilder_;
}
@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.TokenAirdropTransactionBody)
}
// @@protoc_insertion_point(class_scope:proto.TokenAirdropTransactionBody)
private static final com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody();
}
public static com.hederahashgraph.api.proto.java.TokenAirdropTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TokenAirdropTransactionBody parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TokenAirdropTransactionBody(input, extensionRegistry);
}
};
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.hederahashgraph.api.proto.java.TokenAirdropTransactionBody getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}