All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: crypto_transfer.proto

package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * Transfers cryptocurrency among two or more accounts by making the desired adjustments to their
 * balances. Each transfer list can specify up to 10 adjustments. Each negative amount is withdrawn
 * from the corresponding account (a sender), and each positive one is added to the corresponding
 * account (a receiver). The amounts list must sum to zero. Each amount is a number of tinybars
 * (there are 100,000,000 tinybars in one hbar).  If any sender account fails to have sufficient
 * hbars, then the entire transaction fails, and none of those transfers occur, though the
 * transaction fee is still charged. This transaction must be signed by the keys for all the sending
 * accounts, and for any receiving accounts that have receiverSigRequired == true. The signatures
 * are in the same order as the accounts, skipping those accounts that don't need a signature. 
 * 
* * Protobuf type {@code proto.CryptoTransferTransactionBody} */ public final class CryptoTransferTransactionBody extends com.google.protobuf.GeneratedMessageLite< CryptoTransferTransactionBody, CryptoTransferTransactionBody.Builder> implements // @@protoc_insertion_point(message_implements:proto.CryptoTransferTransactionBody) CryptoTransferTransactionBodyOrBuilder { private CryptoTransferTransactionBody() { tokenTransfers_ = emptyProtobufList(); } public static final int TRANSFERS_FIELD_NUMBER = 1; private com.hedera.hashgraph.sdk.proto.TransferList transfers_; /** *
   **
   * The desired hbar balance adjustments
   * 
* * .proto.TransferList transfers = 1; */ @java.lang.Override public boolean hasTransfers() { return transfers_ != null; } /** *
   **
   * The desired hbar balance adjustments
   * 
* * .proto.TransferList transfers = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TransferList getTransfers() { return transfers_ == null ? com.hedera.hashgraph.sdk.proto.TransferList.getDefaultInstance() : transfers_; } /** *
   **
   * The desired hbar balance adjustments
   * 
* * .proto.TransferList transfers = 1; */ private void setTransfers(com.hedera.hashgraph.sdk.proto.TransferList value) { value.getClass(); transfers_ = value; } /** *
   **
   * The desired hbar balance adjustments
   * 
* * .proto.TransferList transfers = 1; */ @java.lang.SuppressWarnings({"ReferenceEquality"}) private void mergeTransfers(com.hedera.hashgraph.sdk.proto.TransferList value) { value.getClass(); if (transfers_ != null && transfers_ != com.hedera.hashgraph.sdk.proto.TransferList.getDefaultInstance()) { transfers_ = com.hedera.hashgraph.sdk.proto.TransferList.newBuilder(transfers_).mergeFrom(value).buildPartial(); } else { transfers_ = value; } } /** *
   **
   * The desired hbar balance adjustments
   * 
* * .proto.TransferList transfers = 1; */ private void clearTransfers() { transfers_ = null; } public static final int TOKENTRANSFERS_FIELD_NUMBER = 2; private com.google.protobuf.Internal.ProtobufList tokenTransfers_; /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ @java.lang.Override public java.util.List getTokenTransfersList() { return tokenTransfers_; } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public java.util.List getTokenTransfersOrBuilderList() { return tokenTransfers_; } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ @java.lang.Override public int getTokenTransfersCount() { return tokenTransfers_.size(); } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenTransferList getTokenTransfers(int index) { return tokenTransfers_.get(index); } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public com.hedera.hashgraph.sdk.proto.TokenTransferListOrBuilder getTokenTransfersOrBuilder( int index) { return tokenTransfers_.get(index); } private void ensureTokenTransfersIsMutable() { com.google.protobuf.Internal.ProtobufList tmp = tokenTransfers_; if (!tmp.isModifiable()) { tokenTransfers_ = com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); } } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ private void setTokenTransfers( int index, com.hedera.hashgraph.sdk.proto.TokenTransferList value) { value.getClass(); ensureTokenTransfersIsMutable(); tokenTransfers_.set(index, value); } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ private void addTokenTransfers(com.hedera.hashgraph.sdk.proto.TokenTransferList value) { value.getClass(); ensureTokenTransfersIsMutable(); tokenTransfers_.add(value); } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ private void addTokenTransfers( int index, com.hedera.hashgraph.sdk.proto.TokenTransferList value) { value.getClass(); ensureTokenTransfersIsMutable(); tokenTransfers_.add(index, value); } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ private void addAllTokenTransfers( java.lang.Iterable values) { ensureTokenTransfersIsMutable(); com.google.protobuf.AbstractMessageLite.addAll( values, tokenTransfers_); } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ private void clearTokenTransfers() { tokenTransfers_ = emptyProtobufList(); } /** *
   **
   * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
   * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
   * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
   * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ private void removeTokenTransfers(int index) { ensureTokenTransfersIsMutable(); tokenTransfers_.remove(index); } public static com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody 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.CryptoTransferTransactionBody prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } /** *
   **
   * Transfers cryptocurrency among two or more accounts by making the desired adjustments to their
   * balances. Each transfer list can specify up to 10 adjustments. Each negative amount is withdrawn
   * from the corresponding account (a sender), and each positive one is added to the corresponding
   * account (a receiver). The amounts list must sum to zero. Each amount is a number of tinybars
   * (there are 100,000,000 tinybars in one hbar).  If any sender account fails to have sufficient
   * hbars, then the entire transaction fails, and none of those transfers occur, though the
   * transaction fee is still charged. This transaction must be signed by the keys for all the sending
   * accounts, and for any receiving accounts that have receiverSigRequired == true. The signatures
   * are in the same order as the accounts, skipping those accounts that don't need a signature. 
   * 
* * Protobuf type {@code proto.CryptoTransferTransactionBody} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody, Builder> implements // @@protoc_insertion_point(builder_implements:proto.CryptoTransferTransactionBody) com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBodyOrBuilder { // Construct using com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     **
     * The desired hbar balance adjustments
     * 
* * .proto.TransferList transfers = 1; */ @java.lang.Override public boolean hasTransfers() { return instance.hasTransfers(); } /** *
     **
     * The desired hbar balance adjustments
     * 
* * .proto.TransferList transfers = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TransferList getTransfers() { return instance.getTransfers(); } /** *
     **
     * The desired hbar balance adjustments
     * 
* * .proto.TransferList transfers = 1; */ public Builder setTransfers(com.hedera.hashgraph.sdk.proto.TransferList value) { copyOnWrite(); instance.setTransfers(value); return this; } /** *
     **
     * The desired hbar balance adjustments
     * 
* * .proto.TransferList transfers = 1; */ public Builder setTransfers( com.hedera.hashgraph.sdk.proto.TransferList.Builder builderForValue) { copyOnWrite(); instance.setTransfers(builderForValue.build()); return this; } /** *
     **
     * The desired hbar balance adjustments
     * 
* * .proto.TransferList transfers = 1; */ public Builder mergeTransfers(com.hedera.hashgraph.sdk.proto.TransferList value) { copyOnWrite(); instance.mergeTransfers(value); return this; } /** *
     **
     * The desired hbar balance adjustments
     * 
* * .proto.TransferList transfers = 1; */ public Builder clearTransfers() { copyOnWrite(); instance.clearTransfers(); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ @java.lang.Override public java.util.List getTokenTransfersList() { return java.util.Collections.unmodifiableList( instance.getTokenTransfersList()); } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ @java.lang.Override public int getTokenTransfersCount() { return instance.getTokenTransfersCount(); }/** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TokenTransferList getTokenTransfers(int index) { return instance.getTokenTransfers(index); } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder setTokenTransfers( int index, com.hedera.hashgraph.sdk.proto.TokenTransferList value) { copyOnWrite(); instance.setTokenTransfers(index, value); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder setTokenTransfers( int index, com.hedera.hashgraph.sdk.proto.TokenTransferList.Builder builderForValue) { copyOnWrite(); instance.setTokenTransfers(index, builderForValue.build()); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder addTokenTransfers(com.hedera.hashgraph.sdk.proto.TokenTransferList value) { copyOnWrite(); instance.addTokenTransfers(value); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder addTokenTransfers( int index, com.hedera.hashgraph.sdk.proto.TokenTransferList value) { copyOnWrite(); instance.addTokenTransfers(index, value); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder addTokenTransfers( com.hedera.hashgraph.sdk.proto.TokenTransferList.Builder builderForValue) { copyOnWrite(); instance.addTokenTransfers(builderForValue.build()); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder addTokenTransfers( int index, com.hedera.hashgraph.sdk.proto.TokenTransferList.Builder builderForValue) { copyOnWrite(); instance.addTokenTransfers(index, builderForValue.build()); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder addAllTokenTransfers( java.lang.Iterable values) { copyOnWrite(); instance.addAllTokenTransfers(values); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder clearTokenTransfers() { copyOnWrite(); instance.clearTokenTransfers(); return this; } /** *
     **
     * The desired token unit balance adjustments; if any custom fees are assessed, the ledger will
     * try to deduct them from the payer of this CryptoTransfer, resolving the transaction to
     * INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
     * 
* * repeated .proto.TokenTransferList tokenTransfers = 2; */ public Builder removeTokenTransfers(int index) { copyOnWrite(); instance.removeTokenTransfers(index); return this; } // @@protoc_insertion_point(builder_scope:proto.CryptoTransferTransactionBody) } @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.CryptoTransferTransactionBody(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "transfers_", "tokenTransfers_", com.hedera.hashgraph.sdk.proto.TokenTransferList.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.CryptoTransferTransactionBody.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.CryptoTransferTransactionBody) private static final com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody DEFAULT_INSTANCE; static { CryptoTransferTransactionBody defaultInstance = new CryptoTransferTransactionBody(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( CryptoTransferTransactionBody.class, defaultInstance); } public static com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy