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

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

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

// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * Start a new smart contract instance. After the instance is created, the ContractID for it is in
 * the receipt, and can be retrieved by the Record or with a GetByKey query. The instance will run
 * the bytecode, either stored in a previously created file or in the transaction body itself for 
 * small contracts.
 * 
 * 
 * The constructor will be executed using the given amount of gas, and any unspent gas will be
 * refunded to the paying account. Constructor inputs come from the given constructorParameters.
 *  - The instance will exist for autoRenewPeriod seconds. When that is reached, it will renew
 *    itself for another autoRenewPeriod seconds by charging its associated cryptocurrency account
 *    (which it creates here). If it has insufficient cryptocurrency to extend that long, it will
 *    extend as long as it can. If its balance is zero, the instance will be deleted.
 *
 *  - A smart contract instance normally enforces rules, so "the code is law". For example, an
 *    ERC-20 contract prevents a transfer from being undone without a signature by the recipient of
 *    the transfer. This is always enforced if the contract instance was created with the adminKeys
 *    being null. But for some uses, it might be desirable to create something like an ERC-20
 *    contract that has a specific group of trusted individuals who can act as a "supreme court"
 *    with the ability to override the normal operation, when a sufficient number of them agree to
 *    do so. If adminKeys is not null, then they can sign a transaction that can change the state of
 *    the smart contract in arbitrary ways, such as to reverse a transaction that violates some
 *    standard of behavior that is not covered by the code itself. The admin keys can also be used
 *    to change the autoRenewPeriod, and change the adminKeys field itself. The API currently does
 *    not implement this ability. But it does allow the adminKeys field to be set and queried, and
 *    will in the future implement such admin abilities for any instance that has a non-null
 *    adminKeys.
 *
 *  - If this constructor stores information, it is charged gas to store it. There is a fee in hbars
 *    to maintain that storage until the expiration time, and that fee is added as part of the
 *    transaction fee.
 *
 *  - An entity (account, file, or smart contract instance) must be created in a particular realm.
 *    If the realmID is left null, then a new realm will be created with the given admin key. If a
 *    new realm has a null adminKey, then anyone can create/modify/delete entities in that realm.
 *    But if an admin key is given, then any transaction to create/modify/delete an entity in that
 *    realm must be signed by that key, though anyone can still call functions on smart contract
 *    instances that exist in that realm. A realm ceases to exist when everything within it has
 *    expired and no longer exists.
 *
 *  - The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in
 *    shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms
 *    and multiple shards.
 *
 *  - The optional memo field can contain a string whose length is up to 100 bytes. That is the size
 *    after Unicode NFD then UTF-8 conversion. This field can be used to describe the smart contract.
 *    It could also be used for other purposes. One recommended purpose is to hold a hexadecimal
 *    string that is the SHA-384 hash of a PDF file containing a human-readable legal contract. Then,
 *    if the admin keys are the public keys of human arbitrators, they can use that legal document to
 *    guide their decisions during a binding arbitration tribunal, convened to consider any changes
 *    to the smart contract in the future. The memo field can only be changed using the admin keys.
 *    If there are no admin keys, then it cannot be changed after the smart contract is created.
 *
 * <b>Signing requirements:</b> If an admin key is set, it must sign the transaction. If an 
 * auto-renew account is set, its key must sign the transaction.
 * 
* * Protobuf type {@code proto.ContractCreateTransactionBody} */ public final class ContractCreateTransactionBody extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.ContractCreateTransactionBody) ContractCreateTransactionBodyOrBuilder { private static final long serialVersionUID = 0L; // Use ContractCreateTransactionBody.newBuilder() to construct. private ContractCreateTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ContractCreateTransactionBody() { constructorParameters_ = com.google.protobuf.ByteString.EMPTY; memo_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ContractCreateTransactionBody(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.ContractCreate.internal_static_proto_ContractCreateTransactionBody_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.ContractCreate.internal_static_proto_ContractCreateTransactionBody_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.class, com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.Builder.class); } private int bitField0_; private int initcodeSourceCase_ = 0; @SuppressWarnings("serial") private java.lang.Object initcodeSource_; public enum InitcodeSourceCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { FILEID(1), INITCODE(16), INITCODESOURCE_NOT_SET(0); private final int value; private InitcodeSourceCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static InitcodeSourceCase valueOf(int value) { return forNumber(value); } public static InitcodeSourceCase forNumber(int value) { switch (value) { case 1: return FILEID; case 16: return INITCODE; case 0: return INITCODESOURCE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public InitcodeSourceCase getInitcodeSourceCase() { return InitcodeSourceCase.forNumber( initcodeSourceCase_); } private int stakedIdCase_ = 0; @SuppressWarnings("serial") private java.lang.Object stakedId_; public enum StakedIdCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { STAKED_ACCOUNT_ID(17), STAKED_NODE_ID(18), STAKEDID_NOT_SET(0); private final int value; private StakedIdCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static StakedIdCase valueOf(int value) { return forNumber(value); } public static StakedIdCase forNumber(int value) { switch (value) { case 17: return STAKED_ACCOUNT_ID; case 18: return STAKED_NODE_ID; case 0: return STAKEDID_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public StakedIdCase getStakedIdCase() { return StakedIdCase.forNumber( stakedIdCase_); } public static final int FILEID_FIELD_NUMBER = 1; /** *
   **
   * The file containing the smart contract initcode. A copy will be made and held by the
   * contract instance, and have the same expiration time as the instance.
   * 
* * .proto.FileID fileID = 1; * @return Whether the fileID field is set. */ @java.lang.Override public boolean hasFileID() { return initcodeSourceCase_ == 1; } /** *
   **
   * The file containing the smart contract initcode. A copy will be made and held by the
   * contract instance, and have the same expiration time as the instance.
   * 
* * .proto.FileID fileID = 1; * @return The fileID. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.FileID getFileID() { if (initcodeSourceCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_; } return com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance(); } /** *
   **
   * The file containing the smart contract initcode. A copy will be made and held by the
   * contract instance, and have the same expiration time as the instance.
   * 
* * .proto.FileID fileID = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.FileIDOrBuilder getFileIDOrBuilder() { if (initcodeSourceCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_; } return com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance(); } public static final int INITCODE_FIELD_NUMBER = 16; /** *
   **
   * The bytes of the smart contract initcode. This is only useful if the smart contract init
   * is less than the hedera transaction limit. In those cases fileID must be used.
   * 
* * bytes initcode = 16; * @return Whether the initcode field is set. */ @java.lang.Override public boolean hasInitcode() { return initcodeSourceCase_ == 16; } /** *
   **
   * The bytes of the smart contract initcode. This is only useful if the smart contract init
   * is less than the hedera transaction limit. In those cases fileID must be used.
   * 
* * bytes initcode = 16; * @return The initcode. */ @java.lang.Override public com.google.protobuf.ByteString getInitcode() { if (initcodeSourceCase_ == 16) { return (com.google.protobuf.ByteString) initcodeSource_; } return com.google.protobuf.ByteString.EMPTY; } public static final int ADMINKEY_FIELD_NUMBER = 3; private com.hedera.hashgraph.sdk.proto.Key adminKey_; /** *
   **
   * the state of the instance and its fields can be modified arbitrarily if this key signs a
   * transaction to modify it. If this is null, then such modifications are not possible, and
   * there is no administrator that can override the normal operation of this smart contract
   * instance. Note that if it is created with no admin keys, then there is no administrator to
   * authorize changing the admin keys, so there can never be any admin keys for that instance.
   * 
* * .proto.Key adminKey = 3; * @return Whether the adminKey field is set. */ @java.lang.Override public boolean hasAdminKey() { return ((bitField0_ & 0x00000001) != 0); } /** *
   **
   * the state of the instance and its fields can be modified arbitrarily if this key signs a
   * transaction to modify it. If this is null, then such modifications are not possible, and
   * there is no administrator that can override the normal operation of this smart contract
   * instance. Note that if it is created with no admin keys, then there is no administrator to
   * authorize changing the admin keys, so there can never be any admin keys for that instance.
   * 
* * .proto.Key adminKey = 3; * @return The adminKey. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Key getAdminKey() { return adminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_; } /** *
   **
   * the state of the instance and its fields can be modified arbitrarily if this key signs a
   * transaction to modify it. If this is null, then such modifications are not possible, and
   * there is no administrator that can override the normal operation of this smart contract
   * instance. Note that if it is created with no admin keys, then there is no administrator to
   * authorize changing the admin keys, so there can never be any admin keys for that instance.
   * 
* * .proto.Key adminKey = 3; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getAdminKeyOrBuilder() { return adminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_; } public static final int GAS_FIELD_NUMBER = 4; private long gas_ = 0L; /** *
   **
   * gas to run the constructor
   * 
* * int64 gas = 4; * @return The gas. */ @java.lang.Override public long getGas() { return gas_; } public static final int INITIALBALANCE_FIELD_NUMBER = 5; private long initialBalance_ = 0L; /** *
   **
   * initial number of tinybars to put into the cryptocurrency account associated with and owned
   * by the smart contract
   * 
* * int64 initialBalance = 5; * @return The initialBalance. */ @java.lang.Override public long getInitialBalance() { return initialBalance_; } public static final int PROXYACCOUNTID_FIELD_NUMBER = 6; private com.hedera.hashgraph.sdk.proto.AccountID proxyAccountID_; /** *
   **
   * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
   * invalid account, or is an account that isn't a node, then this account is automatically proxy
   * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
   * account refuses to accept proxy staking , or if it is not currently running a node, then it
   * will behave as if  proxyAccountID was null.
   * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; * @deprecated proto.ContractCreateTransactionBody.proxyAccountID is deprecated. * See contract_create.proto;l=136 * @return Whether the proxyAccountID field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasProxyAccountID() { return ((bitField0_ & 0x00000002) != 0); } /** *
   **
   * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
   * invalid account, or is an account that isn't a node, then this account is automatically proxy
   * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
   * account refuses to accept proxy staking , or if it is not currently running a node, then it
   * will behave as if  proxyAccountID was null.
   * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; * @deprecated proto.ContractCreateTransactionBody.proxyAccountID is deprecated. * See contract_create.proto;l=136 * @return The proxyAccountID. */ @java.lang.Override @java.lang.Deprecated public com.hedera.hashgraph.sdk.proto.AccountID getProxyAccountID() { return proxyAccountID_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : proxyAccountID_; } /** *
   **
   * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
   * invalid account, or is an account that isn't a node, then this account is automatically proxy
   * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
   * account refuses to accept proxy staking , or if it is not currently running a node, then it
   * will behave as if  proxyAccountID was null.
   * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getProxyAccountIDOrBuilder() { return proxyAccountID_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : proxyAccountID_; } public static final int AUTORENEWPERIOD_FIELD_NUMBER = 8; private com.hedera.hashgraph.sdk.proto.Duration autoRenewPeriod_; /** *
   **
   * the instance will charge its account every this many seconds to renew for this long
   * 
* * .proto.Duration autoRenewPeriod = 8; * @return Whether the autoRenewPeriod field is set. */ @java.lang.Override public boolean hasAutoRenewPeriod() { return ((bitField0_ & 0x00000004) != 0); } /** *
   **
   * the instance will charge its account every this many seconds to renew for this long
   * 
* * .proto.Duration autoRenewPeriod = 8; * @return The autoRenewPeriod. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Duration getAutoRenewPeriod() { return autoRenewPeriod_ == null ? com.hedera.hashgraph.sdk.proto.Duration.getDefaultInstance() : autoRenewPeriod_; } /** *
   **
   * the instance will charge its account every this many seconds to renew for this long
   * 
* * .proto.Duration autoRenewPeriod = 8; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.DurationOrBuilder getAutoRenewPeriodOrBuilder() { return autoRenewPeriod_ == null ? com.hedera.hashgraph.sdk.proto.Duration.getDefaultInstance() : autoRenewPeriod_; } public static final int CONSTRUCTORPARAMETERS_FIELD_NUMBER = 9; private com.google.protobuf.ByteString constructorParameters_ = com.google.protobuf.ByteString.EMPTY; /** *
   **
   * parameters to pass to the constructor
   * 
* * bytes constructorParameters = 9; * @return The constructorParameters. */ @java.lang.Override public com.google.protobuf.ByteString getConstructorParameters() { return constructorParameters_; } public static final int SHARDID_FIELD_NUMBER = 10; private com.hedera.hashgraph.sdk.proto.ShardID shardID_; /** *
   **
   * shard in which to create this
   * 
* * .proto.ShardID shardID = 10; * @return Whether the shardID field is set. */ @java.lang.Override public boolean hasShardID() { return ((bitField0_ & 0x00000008) != 0); } /** *
   **
   * shard in which to create this
   * 
* * .proto.ShardID shardID = 10; * @return The shardID. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ShardID getShardID() { return shardID_ == null ? com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_; } /** *
   **
   * shard in which to create this
   * 
* * .proto.ShardID shardID = 10; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder getShardIDOrBuilder() { return shardID_ == null ? com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_; } public static final int REALMID_FIELD_NUMBER = 11; private com.hedera.hashgraph.sdk.proto.RealmID realmID_; /** *
   **
   * realm in which to create this (leave this null to create a new realm)
   * 
* * .proto.RealmID realmID = 11; * @return Whether the realmID field is set. */ @java.lang.Override public boolean hasRealmID() { return ((bitField0_ & 0x00000010) != 0); } /** *
   **
   * realm in which to create this (leave this null to create a new realm)
   * 
* * .proto.RealmID realmID = 11; * @return The realmID. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.RealmID getRealmID() { return realmID_ == null ? com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_; } /** *
   **
   * realm in which to create this (leave this null to create a new realm)
   * 
* * .proto.RealmID realmID = 11; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder getRealmIDOrBuilder() { return realmID_ == null ? com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_; } public static final int NEWREALMADMINKEY_FIELD_NUMBER = 12; private com.hedera.hashgraph.sdk.proto.Key newRealmAdminKey_; /** *
   **
   * if realmID is null, then this the admin key for the new realm that will be created
   * 
* * .proto.Key newRealmAdminKey = 12; * @return Whether the newRealmAdminKey field is set. */ @java.lang.Override public boolean hasNewRealmAdminKey() { return ((bitField0_ & 0x00000020) != 0); } /** *
   **
   * if realmID is null, then this the admin key for the new realm that will be created
   * 
* * .proto.Key newRealmAdminKey = 12; * @return The newRealmAdminKey. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Key getNewRealmAdminKey() { return newRealmAdminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_; } /** *
   **
   * if realmID is null, then this the admin key for the new realm that will be created
   * 
* * .proto.Key newRealmAdminKey = 12; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getNewRealmAdminKeyOrBuilder() { return newRealmAdminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_; } public static final int MEMO_FIELD_NUMBER = 13; @SuppressWarnings("serial") private volatile java.lang.Object memo_ = ""; /** *
   **
   * the memo that was submitted as part of the contract (max 100 bytes)
   * 
* * string memo = 13; * @return The memo. */ @java.lang.Override public java.lang.String getMemo() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); memo_ = s; return s; } } /** *
   **
   * the memo that was submitted as part of the contract (max 100 bytes)
   * 
* * string memo = 13; * @return The bytes for memo. */ @java.lang.Override public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER = 14; private int maxAutomaticTokenAssociations_ = 0; /** *
   **
   * The maximum number of tokens that can be auto-associated with the contract.<br/>
   * If this is less than or equal to `used_auto_associations`, or 0, then this contract
   * MUST manually associate with a token before transacting in that token.<br/>
   * This value MAY also be `-1` to indicate no limit.<br/>
   * This value MUST NOT be less than `-1`.<br/>
   * By default this value is 0 for contracts.
   * 
* * int32 max_automatic_token_associations = 14; * @return The maxAutomaticTokenAssociations. */ @java.lang.Override public int getMaxAutomaticTokenAssociations() { return maxAutomaticTokenAssociations_; } public static final int AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER = 15; private com.hedera.hashgraph.sdk.proto.AccountID autoRenewAccountId_; /** *
   **
   * An account to charge for auto-renewal of this contract. If not set, or set to an
   * account with zero hbar balance, the contract's own hbar balance will be used to
   * cover auto-renewal fees.
   * 
* * .proto.AccountID auto_renew_account_id = 15; * @return Whether the autoRenewAccountId field is set. */ @java.lang.Override public boolean hasAutoRenewAccountId() { return ((bitField0_ & 0x00000040) != 0); } /** *
   **
   * An account to charge for auto-renewal of this contract. If not set, or set to an
   * account with zero hbar balance, the contract's own hbar balance will be used to
   * cover auto-renewal fees.
   * 
* * .proto.AccountID auto_renew_account_id = 15; * @return The autoRenewAccountId. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountID getAutoRenewAccountId() { return autoRenewAccountId_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_; } /** *
   **
   * An account to charge for auto-renewal of this contract. If not set, or set to an
   * account with zero hbar balance, the contract's own hbar balance will be used to
   * cover auto-renewal fees.
   * 
* * .proto.AccountID auto_renew_account_id = 15; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getAutoRenewAccountIdOrBuilder() { return autoRenewAccountId_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_; } public static final int STAKED_ACCOUNT_ID_FIELD_NUMBER = 17; /** *
   **
   * ID of the account to which this contract is staking.
   * 
* * .proto.AccountID staked_account_id = 17; * @return Whether the stakedAccountId field is set. */ @java.lang.Override public boolean hasStakedAccountId() { return stakedIdCase_ == 17; } /** *
   **
   * ID of the account to which this contract is staking.
   * 
* * .proto.AccountID staked_account_id = 17; * @return The stakedAccountId. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountID getStakedAccountId() { if (stakedIdCase_ == 17) { return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_; } return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance(); } /** *
   **
   * ID of the account to which this contract is staking.
   * 
* * .proto.AccountID staked_account_id = 17; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getStakedAccountIdOrBuilder() { if (stakedIdCase_ == 17) { return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_; } return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance(); } public static final int STAKED_NODE_ID_FIELD_NUMBER = 18; /** *
   **
   * ID of the node this contract is staked to.
   * 
* * int64 staked_node_id = 18; * @return Whether the stakedNodeId field is set. */ @java.lang.Override public boolean hasStakedNodeId() { return stakedIdCase_ == 18; } /** *
   **
   * ID of the node this contract is staked to.
   * 
* * int64 staked_node_id = 18; * @return The stakedNodeId. */ @java.lang.Override public long getStakedNodeId() { if (stakedIdCase_ == 18) { return (java.lang.Long) stakedId_; } return 0L; } public static final int DECLINE_REWARD_FIELD_NUMBER = 19; private boolean declineReward_ = false; /** *
   **
   * If true, the contract declines receiving a staking reward. The default value is false.
   * 
* * bool decline_reward = 19; * @return The declineReward. */ @java.lang.Override public boolean getDeclineReward() { return declineReward_; } 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 (initcodeSourceCase_ == 1) { output.writeMessage(1, (com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getAdminKey()); } if (gas_ != 0L) { output.writeInt64(4, gas_); } if (initialBalance_ != 0L) { output.writeInt64(5, initialBalance_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getProxyAccountID()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(8, getAutoRenewPeriod()); } if (!constructorParameters_.isEmpty()) { output.writeBytes(9, constructorParameters_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(10, getShardID()); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(11, getRealmID()); } if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(12, getNewRealmAdminKey()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, memo_); } if (maxAutomaticTokenAssociations_ != 0) { output.writeInt32(14, maxAutomaticTokenAssociations_); } if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(15, getAutoRenewAccountId()); } if (initcodeSourceCase_ == 16) { output.writeBytes( 16, (com.google.protobuf.ByteString) initcodeSource_); } if (stakedIdCase_ == 17) { output.writeMessage(17, (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_); } if (stakedIdCase_ == 18) { output.writeInt64( 18, (long)((java.lang.Long) stakedId_)); } if (declineReward_ != false) { output.writeBool(19, declineReward_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (initcodeSourceCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getAdminKey()); } if (gas_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, gas_); } if (initialBalance_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, initialBalance_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getProxyAccountID()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getAutoRenewPeriod()); } if (!constructorParameters_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(9, constructorParameters_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, getShardID()); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, getRealmID()); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(12, getNewRealmAdminKey()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, memo_); } if (maxAutomaticTokenAssociations_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(14, maxAutomaticTokenAssociations_); } if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(15, getAutoRenewAccountId()); } if (initcodeSourceCase_ == 16) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 16, (com.google.protobuf.ByteString) initcodeSource_); } if (stakedIdCase_ == 17) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(17, (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_); } if (stakedIdCase_ == 18) { size += com.google.protobuf.CodedOutputStream .computeInt64Size( 18, (long)((java.lang.Long) stakedId_)); } if (declineReward_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(19, declineReward_); } 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.ContractCreateTransactionBody)) { return super.equals(obj); } com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody other = (com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody) obj; if (hasAdminKey() != other.hasAdminKey()) return false; if (hasAdminKey()) { if (!getAdminKey() .equals(other.getAdminKey())) return false; } if (getGas() != other.getGas()) return false; if (getInitialBalance() != other.getInitialBalance()) return false; if (hasProxyAccountID() != other.hasProxyAccountID()) return false; if (hasProxyAccountID()) { if (!getProxyAccountID() .equals(other.getProxyAccountID())) return false; } if (hasAutoRenewPeriod() != other.hasAutoRenewPeriod()) return false; if (hasAutoRenewPeriod()) { if (!getAutoRenewPeriod() .equals(other.getAutoRenewPeriod())) return false; } if (!getConstructorParameters() .equals(other.getConstructorParameters())) return false; if (hasShardID() != other.hasShardID()) return false; if (hasShardID()) { if (!getShardID() .equals(other.getShardID())) return false; } if (hasRealmID() != other.hasRealmID()) return false; if (hasRealmID()) { if (!getRealmID() .equals(other.getRealmID())) return false; } if (hasNewRealmAdminKey() != other.hasNewRealmAdminKey()) return false; if (hasNewRealmAdminKey()) { if (!getNewRealmAdminKey() .equals(other.getNewRealmAdminKey())) return false; } if (!getMemo() .equals(other.getMemo())) return false; if (getMaxAutomaticTokenAssociations() != other.getMaxAutomaticTokenAssociations()) return false; if (hasAutoRenewAccountId() != other.hasAutoRenewAccountId()) return false; if (hasAutoRenewAccountId()) { if (!getAutoRenewAccountId() .equals(other.getAutoRenewAccountId())) return false; } if (getDeclineReward() != other.getDeclineReward()) return false; if (!getInitcodeSourceCase().equals(other.getInitcodeSourceCase())) return false; switch (initcodeSourceCase_) { case 1: if (!getFileID() .equals(other.getFileID())) return false; break; case 16: if (!getInitcode() .equals(other.getInitcode())) return false; break; case 0: default: } if (!getStakedIdCase().equals(other.getStakedIdCase())) return false; switch (stakedIdCase_) { case 17: if (!getStakedAccountId() .equals(other.getStakedAccountId())) return false; break; case 18: if (getStakedNodeId() != other.getStakedNodeId()) return false; break; case 0: default: } 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 (hasAdminKey()) { hash = (37 * hash) + ADMINKEY_FIELD_NUMBER; hash = (53 * hash) + getAdminKey().hashCode(); } hash = (37 * hash) + GAS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getGas()); hash = (37 * hash) + INITIALBALANCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getInitialBalance()); if (hasProxyAccountID()) { hash = (37 * hash) + PROXYACCOUNTID_FIELD_NUMBER; hash = (53 * hash) + getProxyAccountID().hashCode(); } if (hasAutoRenewPeriod()) { hash = (37 * hash) + AUTORENEWPERIOD_FIELD_NUMBER; hash = (53 * hash) + getAutoRenewPeriod().hashCode(); } hash = (37 * hash) + CONSTRUCTORPARAMETERS_FIELD_NUMBER; hash = (53 * hash) + getConstructorParameters().hashCode(); if (hasShardID()) { hash = (37 * hash) + SHARDID_FIELD_NUMBER; hash = (53 * hash) + getShardID().hashCode(); } if (hasRealmID()) { hash = (37 * hash) + REALMID_FIELD_NUMBER; hash = (53 * hash) + getRealmID().hashCode(); } if (hasNewRealmAdminKey()) { hash = (37 * hash) + NEWREALMADMINKEY_FIELD_NUMBER; hash = (53 * hash) + getNewRealmAdminKey().hashCode(); } hash = (37 * hash) + MEMO_FIELD_NUMBER; hash = (53 * hash) + getMemo().hashCode(); hash = (37 * hash) + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER; hash = (53 * hash) + getMaxAutomaticTokenAssociations(); if (hasAutoRenewAccountId()) { hash = (37 * hash) + AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER; hash = (53 * hash) + getAutoRenewAccountId().hashCode(); } hash = (37 * hash) + DECLINE_REWARD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getDeclineReward()); switch (initcodeSourceCase_) { case 1: hash = (37 * hash) + FILEID_FIELD_NUMBER; hash = (53 * hash) + getFileID().hashCode(); break; case 16: hash = (37 * hash) + INITCODE_FIELD_NUMBER; hash = (53 * hash) + getInitcode().hashCode(); break; case 0: default: } switch (stakedIdCase_) { case 17: hash = (37 * hash) + STAKED_ACCOUNT_ID_FIELD_NUMBER; hash = (53 * hash) + getStakedAccountId().hashCode(); break; case 18: hash = (37 * hash) + STAKED_NODE_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStakedNodeId()); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody 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.ContractCreateTransactionBody parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody 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.ContractCreateTransactionBody parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody 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.ContractCreateTransactionBody parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody 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.ContractCreateTransactionBody parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody 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.ContractCreateTransactionBody 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.ContractCreateTransactionBody 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.ContractCreateTransactionBody 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; } /** *
   **
   * Start a new smart contract instance. After the instance is created, the ContractID for it is in
   * the receipt, and can be retrieved by the Record or with a GetByKey query. The instance will run
   * the bytecode, either stored in a previously created file or in the transaction body itself for 
   * small contracts.
   * 
   * 
   * The constructor will be executed using the given amount of gas, and any unspent gas will be
   * refunded to the paying account. Constructor inputs come from the given constructorParameters.
   *  - The instance will exist for autoRenewPeriod seconds. When that is reached, it will renew
   *    itself for another autoRenewPeriod seconds by charging its associated cryptocurrency account
   *    (which it creates here). If it has insufficient cryptocurrency to extend that long, it will
   *    extend as long as it can. If its balance is zero, the instance will be deleted.
   *
   *  - A smart contract instance normally enforces rules, so "the code is law". For example, an
   *    ERC-20 contract prevents a transfer from being undone without a signature by the recipient of
   *    the transfer. This is always enforced if the contract instance was created with the adminKeys
   *    being null. But for some uses, it might be desirable to create something like an ERC-20
   *    contract that has a specific group of trusted individuals who can act as a "supreme court"
   *    with the ability to override the normal operation, when a sufficient number of them agree to
   *    do so. If adminKeys is not null, then they can sign a transaction that can change the state of
   *    the smart contract in arbitrary ways, such as to reverse a transaction that violates some
   *    standard of behavior that is not covered by the code itself. The admin keys can also be used
   *    to change the autoRenewPeriod, and change the adminKeys field itself. The API currently does
   *    not implement this ability. But it does allow the adminKeys field to be set and queried, and
   *    will in the future implement such admin abilities for any instance that has a non-null
   *    adminKeys.
   *
   *  - If this constructor stores information, it is charged gas to store it. There is a fee in hbars
   *    to maintain that storage until the expiration time, and that fee is added as part of the
   *    transaction fee.
   *
   *  - An entity (account, file, or smart contract instance) must be created in a particular realm.
   *    If the realmID is left null, then a new realm will be created with the given admin key. If a
   *    new realm has a null adminKey, then anyone can create/modify/delete entities in that realm.
   *    But if an admin key is given, then any transaction to create/modify/delete an entity in that
   *    realm must be signed by that key, though anyone can still call functions on smart contract
   *    instances that exist in that realm. A realm ceases to exist when everything within it has
   *    expired and no longer exists.
   *
   *  - The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in
   *    shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms
   *    and multiple shards.
   *
   *  - The optional memo field can contain a string whose length is up to 100 bytes. That is the size
   *    after Unicode NFD then UTF-8 conversion. This field can be used to describe the smart contract.
   *    It could also be used for other purposes. One recommended purpose is to hold a hexadecimal
   *    string that is the SHA-384 hash of a PDF file containing a human-readable legal contract. Then,
   *    if the admin keys are the public keys of human arbitrators, they can use that legal document to
   *    guide their decisions during a binding arbitration tribunal, convened to consider any changes
   *    to the smart contract in the future. The memo field can only be changed using the admin keys.
   *    If there are no admin keys, then it cannot be changed after the smart contract is created.
   *
   * <b>Signing requirements:</b> If an admin key is set, it must sign the transaction. If an 
   * auto-renew account is set, its key must sign the transaction.
   * 
* * Protobuf type {@code proto.ContractCreateTransactionBody} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.ContractCreateTransactionBody) com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBodyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.ContractCreate.internal_static_proto_ContractCreateTransactionBody_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.ContractCreate.internal_static_proto_ContractCreateTransactionBody_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.class, com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.Builder.class); } // Construct using com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getAdminKeyFieldBuilder(); getProxyAccountIDFieldBuilder(); getAutoRenewPeriodFieldBuilder(); getShardIDFieldBuilder(); getRealmIDFieldBuilder(); getNewRealmAdminKeyFieldBuilder(); getAutoRenewAccountIdFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (fileIDBuilder_ != null) { fileIDBuilder_.clear(); } adminKey_ = null; if (adminKeyBuilder_ != null) { adminKeyBuilder_.dispose(); adminKeyBuilder_ = null; } gas_ = 0L; initialBalance_ = 0L; proxyAccountID_ = null; if (proxyAccountIDBuilder_ != null) { proxyAccountIDBuilder_.dispose(); proxyAccountIDBuilder_ = null; } autoRenewPeriod_ = null; if (autoRenewPeriodBuilder_ != null) { autoRenewPeriodBuilder_.dispose(); autoRenewPeriodBuilder_ = null; } constructorParameters_ = com.google.protobuf.ByteString.EMPTY; shardID_ = null; if (shardIDBuilder_ != null) { shardIDBuilder_.dispose(); shardIDBuilder_ = null; } realmID_ = null; if (realmIDBuilder_ != null) { realmIDBuilder_.dispose(); realmIDBuilder_ = null; } newRealmAdminKey_ = null; if (newRealmAdminKeyBuilder_ != null) { newRealmAdminKeyBuilder_.dispose(); newRealmAdminKeyBuilder_ = null; } memo_ = ""; maxAutomaticTokenAssociations_ = 0; autoRenewAccountId_ = null; if (autoRenewAccountIdBuilder_ != null) { autoRenewAccountIdBuilder_.dispose(); autoRenewAccountIdBuilder_ = null; } if (stakedAccountIdBuilder_ != null) { stakedAccountIdBuilder_.clear(); } declineReward_ = false; initcodeSourceCase_ = 0; initcodeSource_ = null; stakedIdCase_ = 0; stakedId_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hedera.hashgraph.sdk.proto.ContractCreate.internal_static_proto_ContractCreateTransactionBody_descriptor; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody getDefaultInstanceForType() { return com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.getDefaultInstance(); } @java.lang.Override public com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody build() { com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody buildPartial() { com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody result = new com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.adminKey_ = adminKeyBuilder_ == null ? adminKey_ : adminKeyBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.gas_ = gas_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.initialBalance_ = initialBalance_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.proxyAccountID_ = proxyAccountIDBuilder_ == null ? proxyAccountID_ : proxyAccountIDBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000040) != 0)) { result.autoRenewPeriod_ = autoRenewPeriodBuilder_ == null ? autoRenewPeriod_ : autoRenewPeriodBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000080) != 0)) { result.constructorParameters_ = constructorParameters_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.shardID_ = shardIDBuilder_ == null ? shardID_ : shardIDBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000200) != 0)) { result.realmID_ = realmIDBuilder_ == null ? realmID_ : realmIDBuilder_.build(); to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000400) != 0)) { result.newRealmAdminKey_ = newRealmAdminKeyBuilder_ == null ? newRealmAdminKey_ : newRealmAdminKeyBuilder_.build(); to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000800) != 0)) { result.memo_ = memo_; } if (((from_bitField0_ & 0x00001000) != 0)) { result.maxAutomaticTokenAssociations_ = maxAutomaticTokenAssociations_; } if (((from_bitField0_ & 0x00002000) != 0)) { result.autoRenewAccountId_ = autoRenewAccountIdBuilder_ == null ? autoRenewAccountId_ : autoRenewAccountIdBuilder_.build(); to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00010000) != 0)) { result.declineReward_ = declineReward_; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody result) { result.initcodeSourceCase_ = initcodeSourceCase_; result.initcodeSource_ = this.initcodeSource_; if (initcodeSourceCase_ == 1 && fileIDBuilder_ != null) { result.initcodeSource_ = fileIDBuilder_.build(); } result.stakedIdCase_ = stakedIdCase_; result.stakedId_ = this.stakedId_; if (stakedIdCase_ == 17 && stakedAccountIdBuilder_ != null) { result.stakedId_ = stakedAccountIdBuilder_.build(); } } @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.ContractCreateTransactionBody) { return mergeFrom((com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody other) { if (other == com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody.getDefaultInstance()) return this; if (other.hasAdminKey()) { mergeAdminKey(other.getAdminKey()); } if (other.getGas() != 0L) { setGas(other.getGas()); } if (other.getInitialBalance() != 0L) { setInitialBalance(other.getInitialBalance()); } if (other.hasProxyAccountID()) { mergeProxyAccountID(other.getProxyAccountID()); } if (other.hasAutoRenewPeriod()) { mergeAutoRenewPeriod(other.getAutoRenewPeriod()); } if (other.getConstructorParameters() != com.google.protobuf.ByteString.EMPTY) { setConstructorParameters(other.getConstructorParameters()); } if (other.hasShardID()) { mergeShardID(other.getShardID()); } if (other.hasRealmID()) { mergeRealmID(other.getRealmID()); } if (other.hasNewRealmAdminKey()) { mergeNewRealmAdminKey(other.getNewRealmAdminKey()); } if (!other.getMemo().isEmpty()) { memo_ = other.memo_; bitField0_ |= 0x00000800; onChanged(); } if (other.getMaxAutomaticTokenAssociations() != 0) { setMaxAutomaticTokenAssociations(other.getMaxAutomaticTokenAssociations()); } if (other.hasAutoRenewAccountId()) { mergeAutoRenewAccountId(other.getAutoRenewAccountId()); } if (other.getDeclineReward() != false) { setDeclineReward(other.getDeclineReward()); } switch (other.getInitcodeSourceCase()) { case FILEID: { mergeFileID(other.getFileID()); break; } case INITCODE: { setInitcode(other.getInitcode()); break; } case INITCODESOURCE_NOT_SET: { break; } } switch (other.getStakedIdCase()) { case STAKED_ACCOUNT_ID: { mergeStakedAccountId(other.getStakedAccountId()); break; } case STAKED_NODE_ID: { setStakedNodeId(other.getStakedNodeId()); break; } case STAKEDID_NOT_SET: { break; } } 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( getFileIDFieldBuilder().getBuilder(), extensionRegistry); initcodeSourceCase_ = 1; break; } // case 10 case 26: { input.readMessage( getAdminKeyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 32: { gas_ = input.readInt64(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { initialBalance_ = input.readInt64(); bitField0_ |= 0x00000010; break; } // case 40 case 50: { input.readMessage( getProxyAccountIDFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 66: { input.readMessage( getAutoRenewPeriodFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 66 case 74: { constructorParameters_ = input.readBytes(); bitField0_ |= 0x00000080; break; } // case 74 case 82: { input.readMessage( getShardIDFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000100; break; } // case 82 case 90: { input.readMessage( getRealmIDFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 90 case 98: { input.readMessage( getNewRealmAdminKeyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 98 case 106: { memo_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000800; break; } // case 106 case 112: { maxAutomaticTokenAssociations_ = input.readInt32(); bitField0_ |= 0x00001000; break; } // case 112 case 122: { input.readMessage( getAutoRenewAccountIdFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00002000; break; } // case 122 case 130: { initcodeSource_ = input.readBytes(); initcodeSourceCase_ = 16; break; } // case 130 case 138: { input.readMessage( getStakedAccountIdFieldBuilder().getBuilder(), extensionRegistry); stakedIdCase_ = 17; break; } // case 138 case 144: { stakedId_ = input.readInt64(); stakedIdCase_ = 18; break; } // case 144 case 152: { declineReward_ = input.readBool(); bitField0_ |= 0x00010000; break; } // case 152 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 initcodeSourceCase_ = 0; private java.lang.Object initcodeSource_; public InitcodeSourceCase getInitcodeSourceCase() { return InitcodeSourceCase.forNumber( initcodeSourceCase_); } public Builder clearInitcodeSource() { initcodeSourceCase_ = 0; initcodeSource_ = null; onChanged(); return this; } private int stakedIdCase_ = 0; private java.lang.Object stakedId_; public StakedIdCase getStakedIdCase() { return StakedIdCase.forNumber( stakedIdCase_); } public Builder clearStakedId() { stakedIdCase_ = 0; stakedId_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.FileID, com.hedera.hashgraph.sdk.proto.FileID.Builder, com.hedera.hashgraph.sdk.proto.FileIDOrBuilder> fileIDBuilder_; /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; * @return Whether the fileID field is set. */ @java.lang.Override public boolean hasFileID() { return initcodeSourceCase_ == 1; } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; * @return The fileID. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.FileID getFileID() { if (fileIDBuilder_ == null) { if (initcodeSourceCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_; } return com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance(); } else { if (initcodeSourceCase_ == 1) { return fileIDBuilder_.getMessage(); } return com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance(); } } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; */ public Builder setFileID(com.hedera.hashgraph.sdk.proto.FileID value) { if (fileIDBuilder_ == null) { if (value == null) { throw new NullPointerException(); } initcodeSource_ = value; onChanged(); } else { fileIDBuilder_.setMessage(value); } initcodeSourceCase_ = 1; return this; } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; */ public Builder setFileID( com.hedera.hashgraph.sdk.proto.FileID.Builder builderForValue) { if (fileIDBuilder_ == null) { initcodeSource_ = builderForValue.build(); onChanged(); } else { fileIDBuilder_.setMessage(builderForValue.build()); } initcodeSourceCase_ = 1; return this; } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; */ public Builder mergeFileID(com.hedera.hashgraph.sdk.proto.FileID value) { if (fileIDBuilder_ == null) { if (initcodeSourceCase_ == 1 && initcodeSource_ != com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance()) { initcodeSource_ = com.hedera.hashgraph.sdk.proto.FileID.newBuilder((com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_) .mergeFrom(value).buildPartial(); } else { initcodeSource_ = value; } onChanged(); } else { if (initcodeSourceCase_ == 1) { fileIDBuilder_.mergeFrom(value); } else { fileIDBuilder_.setMessage(value); } } initcodeSourceCase_ = 1; return this; } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; */ public Builder clearFileID() { if (fileIDBuilder_ == null) { if (initcodeSourceCase_ == 1) { initcodeSourceCase_ = 0; initcodeSource_ = null; onChanged(); } } else { if (initcodeSourceCase_ == 1) { initcodeSourceCase_ = 0; initcodeSource_ = null; } fileIDBuilder_.clear(); } return this; } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; */ public com.hedera.hashgraph.sdk.proto.FileID.Builder getFileIDBuilder() { return getFileIDFieldBuilder().getBuilder(); } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.FileIDOrBuilder getFileIDOrBuilder() { if ((initcodeSourceCase_ == 1) && (fileIDBuilder_ != null)) { return fileIDBuilder_.getMessageOrBuilder(); } else { if (initcodeSourceCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_; } return com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance(); } } /** *
     **
     * The file containing the smart contract initcode. A copy will be made and held by the
     * contract instance, and have the same expiration time as the instance.
     * 
* * .proto.FileID fileID = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.FileID, com.hedera.hashgraph.sdk.proto.FileID.Builder, com.hedera.hashgraph.sdk.proto.FileIDOrBuilder> getFileIDFieldBuilder() { if (fileIDBuilder_ == null) { if (!(initcodeSourceCase_ == 1)) { initcodeSource_ = com.hedera.hashgraph.sdk.proto.FileID.getDefaultInstance(); } fileIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.FileID, com.hedera.hashgraph.sdk.proto.FileID.Builder, com.hedera.hashgraph.sdk.proto.FileIDOrBuilder>( (com.hedera.hashgraph.sdk.proto.FileID) initcodeSource_, getParentForChildren(), isClean()); initcodeSource_ = null; } initcodeSourceCase_ = 1; onChanged(); return fileIDBuilder_; } /** *
     **
     * The bytes of the smart contract initcode. This is only useful if the smart contract init
     * is less than the hedera transaction limit. In those cases fileID must be used.
     * 
* * bytes initcode = 16; * @return Whether the initcode field is set. */ public boolean hasInitcode() { return initcodeSourceCase_ == 16; } /** *
     **
     * The bytes of the smart contract initcode. This is only useful if the smart contract init
     * is less than the hedera transaction limit. In those cases fileID must be used.
     * 
* * bytes initcode = 16; * @return The initcode. */ public com.google.protobuf.ByteString getInitcode() { if (initcodeSourceCase_ == 16) { return (com.google.protobuf.ByteString) initcodeSource_; } return com.google.protobuf.ByteString.EMPTY; } /** *
     **
     * The bytes of the smart contract initcode. This is only useful if the smart contract init
     * is less than the hedera transaction limit. In those cases fileID must be used.
     * 
* * bytes initcode = 16; * @param value The initcode to set. * @return This builder for chaining. */ public Builder setInitcode(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } initcodeSourceCase_ = 16; initcodeSource_ = value; onChanged(); return this; } /** *
     **
     * The bytes of the smart contract initcode. This is only useful if the smart contract init
     * is less than the hedera transaction limit. In those cases fileID must be used.
     * 
* * bytes initcode = 16; * @return This builder for chaining. */ public Builder clearInitcode() { if (initcodeSourceCase_ == 16) { initcodeSourceCase_ = 0; initcodeSource_ = null; onChanged(); } return this; } private com.hedera.hashgraph.sdk.proto.Key adminKey_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> adminKeyBuilder_; /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; * @return Whether the adminKey field is set. */ public boolean hasAdminKey() { return ((bitField0_ & 0x00000004) != 0); } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; * @return The adminKey. */ public com.hedera.hashgraph.sdk.proto.Key getAdminKey() { if (adminKeyBuilder_ == null) { return adminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_; } else { return adminKeyBuilder_.getMessage(); } } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; */ public Builder setAdminKey(com.hedera.hashgraph.sdk.proto.Key value) { if (adminKeyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } adminKey_ = value; } else { adminKeyBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; */ public Builder setAdminKey( com.hedera.hashgraph.sdk.proto.Key.Builder builderForValue) { if (adminKeyBuilder_ == null) { adminKey_ = builderForValue.build(); } else { adminKeyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; */ public Builder mergeAdminKey(com.hedera.hashgraph.sdk.proto.Key value) { if (adminKeyBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && adminKey_ != null && adminKey_ != com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance()) { getAdminKeyBuilder().mergeFrom(value); } else { adminKey_ = value; } } else { adminKeyBuilder_.mergeFrom(value); } if (adminKey_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; */ public Builder clearAdminKey() { bitField0_ = (bitField0_ & ~0x00000004); adminKey_ = null; if (adminKeyBuilder_ != null) { adminKeyBuilder_.dispose(); adminKeyBuilder_ = null; } onChanged(); return this; } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; */ public com.hedera.hashgraph.sdk.proto.Key.Builder getAdminKeyBuilder() { bitField0_ |= 0x00000004; onChanged(); return getAdminKeyFieldBuilder().getBuilder(); } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; */ public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getAdminKeyOrBuilder() { if (adminKeyBuilder_ != null) { return adminKeyBuilder_.getMessageOrBuilder(); } else { return adminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : adminKey_; } } /** *
     **
     * the state of the instance and its fields can be modified arbitrarily if this key signs a
     * transaction to modify it. If this is null, then such modifications are not possible, and
     * there is no administrator that can override the normal operation of this smart contract
     * instance. Note that if it is created with no admin keys, then there is no administrator to
     * authorize changing the admin keys, so there can never be any admin keys for that instance.
     * 
* * .proto.Key adminKey = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> getAdminKeyFieldBuilder() { if (adminKeyBuilder_ == null) { adminKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>( getAdminKey(), getParentForChildren(), isClean()); adminKey_ = null; } return adminKeyBuilder_; } private long gas_ ; /** *
     **
     * gas to run the constructor
     * 
* * int64 gas = 4; * @return The gas. */ @java.lang.Override public long getGas() { return gas_; } /** *
     **
     * gas to run the constructor
     * 
* * int64 gas = 4; * @param value The gas to set. * @return This builder for chaining. */ public Builder setGas(long value) { gas_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     **
     * gas to run the constructor
     * 
* * int64 gas = 4; * @return This builder for chaining. */ public Builder clearGas() { bitField0_ = (bitField0_ & ~0x00000008); gas_ = 0L; onChanged(); return this; } private long initialBalance_ ; /** *
     **
     * initial number of tinybars to put into the cryptocurrency account associated with and owned
     * by the smart contract
     * 
* * int64 initialBalance = 5; * @return The initialBalance. */ @java.lang.Override public long getInitialBalance() { return initialBalance_; } /** *
     **
     * initial number of tinybars to put into the cryptocurrency account associated with and owned
     * by the smart contract
     * 
* * int64 initialBalance = 5; * @param value The initialBalance to set. * @return This builder for chaining. */ public Builder setInitialBalance(long value) { initialBalance_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     **
     * initial number of tinybars to put into the cryptocurrency account associated with and owned
     * by the smart contract
     * 
* * int64 initialBalance = 5; * @return This builder for chaining. */ public Builder clearInitialBalance() { bitField0_ = (bitField0_ & ~0x00000010); initialBalance_ = 0L; onChanged(); return this; } private com.hedera.hashgraph.sdk.proto.AccountID proxyAccountID_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> proxyAccountIDBuilder_; /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; * @deprecated proto.ContractCreateTransactionBody.proxyAccountID is deprecated. * See contract_create.proto;l=136 * @return Whether the proxyAccountID field is set. */ @java.lang.Deprecated public boolean hasProxyAccountID() { return ((bitField0_ & 0x00000020) != 0); } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; * @deprecated proto.ContractCreateTransactionBody.proxyAccountID is deprecated. * See contract_create.proto;l=136 * @return The proxyAccountID. */ @java.lang.Deprecated public com.hedera.hashgraph.sdk.proto.AccountID getProxyAccountID() { if (proxyAccountIDBuilder_ == null) { return proxyAccountID_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : proxyAccountID_; } else { return proxyAccountIDBuilder_.getMessage(); } } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder setProxyAccountID(com.hedera.hashgraph.sdk.proto.AccountID value) { if (proxyAccountIDBuilder_ == null) { if (value == null) { throw new NullPointerException(); } proxyAccountID_ = value; } else { proxyAccountIDBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder setProxyAccountID( com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) { if (proxyAccountIDBuilder_ == null) { proxyAccountID_ = builderForValue.build(); } else { proxyAccountIDBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder mergeProxyAccountID(com.hedera.hashgraph.sdk.proto.AccountID value) { if (proxyAccountIDBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && proxyAccountID_ != null && proxyAccountID_ != com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance()) { getProxyAccountIDBuilder().mergeFrom(value); } else { proxyAccountID_ = value; } } else { proxyAccountIDBuilder_.mergeFrom(value); } if (proxyAccountID_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder clearProxyAccountID() { bitField0_ = (bitField0_ & ~0x00000020); proxyAccountID_ = null; if (proxyAccountIDBuilder_ != null) { proxyAccountIDBuilder_.dispose(); proxyAccountIDBuilder_ = null; } onChanged(); return this; } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ @java.lang.Deprecated public com.hedera.hashgraph.sdk.proto.AccountID.Builder getProxyAccountIDBuilder() { bitField0_ |= 0x00000020; onChanged(); return getProxyAccountIDFieldBuilder().getBuilder(); } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ @java.lang.Deprecated public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getProxyAccountIDOrBuilder() { if (proxyAccountIDBuilder_ != null) { return proxyAccountIDBuilder_.getMessageOrBuilder(); } else { return proxyAccountID_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : proxyAccountID_; } } /** *
     **
     * [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
     * invalid account, or is an account that isn't a node, then this account is automatically proxy
     * staked to a node chosen by the network, but without earning payments. If the proxyAccountID
     * account refuses to accept proxy staking , or if it is not currently running a node, then it
     * will behave as if  proxyAccountID was null.
     * 
* * .proto.AccountID proxyAccountID = 6 [deprecated = true]; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> getProxyAccountIDFieldBuilder() { if (proxyAccountIDBuilder_ == null) { proxyAccountIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>( getProxyAccountID(), getParentForChildren(), isClean()); proxyAccountID_ = null; } return proxyAccountIDBuilder_; } private com.hedera.hashgraph.sdk.proto.Duration autoRenewPeriod_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Duration, com.hedera.hashgraph.sdk.proto.Duration.Builder, com.hedera.hashgraph.sdk.proto.DurationOrBuilder> autoRenewPeriodBuilder_; /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; * @return Whether the autoRenewPeriod field is set. */ public boolean hasAutoRenewPeriod() { return ((bitField0_ & 0x00000040) != 0); } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; * @return The autoRenewPeriod. */ public com.hedera.hashgraph.sdk.proto.Duration getAutoRenewPeriod() { if (autoRenewPeriodBuilder_ == null) { return autoRenewPeriod_ == null ? com.hedera.hashgraph.sdk.proto.Duration.getDefaultInstance() : autoRenewPeriod_; } else { return autoRenewPeriodBuilder_.getMessage(); } } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; */ public Builder setAutoRenewPeriod(com.hedera.hashgraph.sdk.proto.Duration value) { if (autoRenewPeriodBuilder_ == null) { if (value == null) { throw new NullPointerException(); } autoRenewPeriod_ = value; } else { autoRenewPeriodBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; */ public Builder setAutoRenewPeriod( com.hedera.hashgraph.sdk.proto.Duration.Builder builderForValue) { if (autoRenewPeriodBuilder_ == null) { autoRenewPeriod_ = builderForValue.build(); } else { autoRenewPeriodBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; */ public Builder mergeAutoRenewPeriod(com.hedera.hashgraph.sdk.proto.Duration value) { if (autoRenewPeriodBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && autoRenewPeriod_ != null && autoRenewPeriod_ != com.hedera.hashgraph.sdk.proto.Duration.getDefaultInstance()) { getAutoRenewPeriodBuilder().mergeFrom(value); } else { autoRenewPeriod_ = value; } } else { autoRenewPeriodBuilder_.mergeFrom(value); } if (autoRenewPeriod_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; */ public Builder clearAutoRenewPeriod() { bitField0_ = (bitField0_ & ~0x00000040); autoRenewPeriod_ = null; if (autoRenewPeriodBuilder_ != null) { autoRenewPeriodBuilder_.dispose(); autoRenewPeriodBuilder_ = null; } onChanged(); return this; } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; */ public com.hedera.hashgraph.sdk.proto.Duration.Builder getAutoRenewPeriodBuilder() { bitField0_ |= 0x00000040; onChanged(); return getAutoRenewPeriodFieldBuilder().getBuilder(); } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; */ public com.hedera.hashgraph.sdk.proto.DurationOrBuilder getAutoRenewPeriodOrBuilder() { if (autoRenewPeriodBuilder_ != null) { return autoRenewPeriodBuilder_.getMessageOrBuilder(); } else { return autoRenewPeriod_ == null ? com.hedera.hashgraph.sdk.proto.Duration.getDefaultInstance() : autoRenewPeriod_; } } /** *
     **
     * the instance will charge its account every this many seconds to renew for this long
     * 
* * .proto.Duration autoRenewPeriod = 8; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Duration, com.hedera.hashgraph.sdk.proto.Duration.Builder, com.hedera.hashgraph.sdk.proto.DurationOrBuilder> getAutoRenewPeriodFieldBuilder() { if (autoRenewPeriodBuilder_ == null) { autoRenewPeriodBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Duration, com.hedera.hashgraph.sdk.proto.Duration.Builder, com.hedera.hashgraph.sdk.proto.DurationOrBuilder>( getAutoRenewPeriod(), getParentForChildren(), isClean()); autoRenewPeriod_ = null; } return autoRenewPeriodBuilder_; } private com.google.protobuf.ByteString constructorParameters_ = com.google.protobuf.ByteString.EMPTY; /** *
     **
     * parameters to pass to the constructor
     * 
* * bytes constructorParameters = 9; * @return The constructorParameters. */ @java.lang.Override public com.google.protobuf.ByteString getConstructorParameters() { return constructorParameters_; } /** *
     **
     * parameters to pass to the constructor
     * 
* * bytes constructorParameters = 9; * @param value The constructorParameters to set. * @return This builder for chaining. */ public Builder setConstructorParameters(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } constructorParameters_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** *
     **
     * parameters to pass to the constructor
     * 
* * bytes constructorParameters = 9; * @return This builder for chaining. */ public Builder clearConstructorParameters() { bitField0_ = (bitField0_ & ~0x00000080); constructorParameters_ = getDefaultInstance().getConstructorParameters(); onChanged(); return this; } private com.hedera.hashgraph.sdk.proto.ShardID shardID_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ShardID, com.hedera.hashgraph.sdk.proto.ShardID.Builder, com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder> shardIDBuilder_; /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; * @return Whether the shardID field is set. */ public boolean hasShardID() { return ((bitField0_ & 0x00000100) != 0); } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; * @return The shardID. */ public com.hedera.hashgraph.sdk.proto.ShardID getShardID() { if (shardIDBuilder_ == null) { return shardID_ == null ? com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_; } else { return shardIDBuilder_.getMessage(); } } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; */ public Builder setShardID(com.hedera.hashgraph.sdk.proto.ShardID value) { if (shardIDBuilder_ == null) { if (value == null) { throw new NullPointerException(); } shardID_ = value; } else { shardIDBuilder_.setMessage(value); } bitField0_ |= 0x00000100; onChanged(); return this; } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; */ public Builder setShardID( com.hedera.hashgraph.sdk.proto.ShardID.Builder builderForValue) { if (shardIDBuilder_ == null) { shardID_ = builderForValue.build(); } else { shardIDBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; onChanged(); return this; } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; */ public Builder mergeShardID(com.hedera.hashgraph.sdk.proto.ShardID value) { if (shardIDBuilder_ == null) { if (((bitField0_ & 0x00000100) != 0) && shardID_ != null && shardID_ != com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance()) { getShardIDBuilder().mergeFrom(value); } else { shardID_ = value; } } else { shardIDBuilder_.mergeFrom(value); } if (shardID_ != null) { bitField0_ |= 0x00000100; onChanged(); } return this; } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; */ public Builder clearShardID() { bitField0_ = (bitField0_ & ~0x00000100); shardID_ = null; if (shardIDBuilder_ != null) { shardIDBuilder_.dispose(); shardIDBuilder_ = null; } onChanged(); return this; } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; */ public com.hedera.hashgraph.sdk.proto.ShardID.Builder getShardIDBuilder() { bitField0_ |= 0x00000100; onChanged(); return getShardIDFieldBuilder().getBuilder(); } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; */ public com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder getShardIDOrBuilder() { if (shardIDBuilder_ != null) { return shardIDBuilder_.getMessageOrBuilder(); } else { return shardID_ == null ? com.hedera.hashgraph.sdk.proto.ShardID.getDefaultInstance() : shardID_; } } /** *
     **
     * shard in which to create this
     * 
* * .proto.ShardID shardID = 10; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ShardID, com.hedera.hashgraph.sdk.proto.ShardID.Builder, com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder> getShardIDFieldBuilder() { if (shardIDBuilder_ == null) { shardIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ShardID, com.hedera.hashgraph.sdk.proto.ShardID.Builder, com.hedera.hashgraph.sdk.proto.ShardIDOrBuilder>( getShardID(), getParentForChildren(), isClean()); shardID_ = null; } return shardIDBuilder_; } private com.hedera.hashgraph.sdk.proto.RealmID realmID_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.RealmID, com.hedera.hashgraph.sdk.proto.RealmID.Builder, com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder> realmIDBuilder_; /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; * @return Whether the realmID field is set. */ public boolean hasRealmID() { return ((bitField0_ & 0x00000200) != 0); } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; * @return The realmID. */ public com.hedera.hashgraph.sdk.proto.RealmID getRealmID() { if (realmIDBuilder_ == null) { return realmID_ == null ? com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_; } else { return realmIDBuilder_.getMessage(); } } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; */ public Builder setRealmID(com.hedera.hashgraph.sdk.proto.RealmID value) { if (realmIDBuilder_ == null) { if (value == null) { throw new NullPointerException(); } realmID_ = value; } else { realmIDBuilder_.setMessage(value); } bitField0_ |= 0x00000200; onChanged(); return this; } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; */ public Builder setRealmID( com.hedera.hashgraph.sdk.proto.RealmID.Builder builderForValue) { if (realmIDBuilder_ == null) { realmID_ = builderForValue.build(); } else { realmIDBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000200; onChanged(); return this; } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; */ public Builder mergeRealmID(com.hedera.hashgraph.sdk.proto.RealmID value) { if (realmIDBuilder_ == null) { if (((bitField0_ & 0x00000200) != 0) && realmID_ != null && realmID_ != com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance()) { getRealmIDBuilder().mergeFrom(value); } else { realmID_ = value; } } else { realmIDBuilder_.mergeFrom(value); } if (realmID_ != null) { bitField0_ |= 0x00000200; onChanged(); } return this; } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; */ public Builder clearRealmID() { bitField0_ = (bitField0_ & ~0x00000200); realmID_ = null; if (realmIDBuilder_ != null) { realmIDBuilder_.dispose(); realmIDBuilder_ = null; } onChanged(); return this; } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; */ public com.hedera.hashgraph.sdk.proto.RealmID.Builder getRealmIDBuilder() { bitField0_ |= 0x00000200; onChanged(); return getRealmIDFieldBuilder().getBuilder(); } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; */ public com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder getRealmIDOrBuilder() { if (realmIDBuilder_ != null) { return realmIDBuilder_.getMessageOrBuilder(); } else { return realmID_ == null ? com.hedera.hashgraph.sdk.proto.RealmID.getDefaultInstance() : realmID_; } } /** *
     **
     * realm in which to create this (leave this null to create a new realm)
     * 
* * .proto.RealmID realmID = 11; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.RealmID, com.hedera.hashgraph.sdk.proto.RealmID.Builder, com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder> getRealmIDFieldBuilder() { if (realmIDBuilder_ == null) { realmIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.RealmID, com.hedera.hashgraph.sdk.proto.RealmID.Builder, com.hedera.hashgraph.sdk.proto.RealmIDOrBuilder>( getRealmID(), getParentForChildren(), isClean()); realmID_ = null; } return realmIDBuilder_; } private com.hedera.hashgraph.sdk.proto.Key newRealmAdminKey_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> newRealmAdminKeyBuilder_; /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; * @return Whether the newRealmAdminKey field is set. */ public boolean hasNewRealmAdminKey() { return ((bitField0_ & 0x00000400) != 0); } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; * @return The newRealmAdminKey. */ public com.hedera.hashgraph.sdk.proto.Key getNewRealmAdminKey() { if (newRealmAdminKeyBuilder_ == null) { return newRealmAdminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_; } else { return newRealmAdminKeyBuilder_.getMessage(); } } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; */ public Builder setNewRealmAdminKey(com.hedera.hashgraph.sdk.proto.Key value) { if (newRealmAdminKeyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } newRealmAdminKey_ = value; } else { newRealmAdminKeyBuilder_.setMessage(value); } bitField0_ |= 0x00000400; onChanged(); return this; } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; */ public Builder setNewRealmAdminKey( com.hedera.hashgraph.sdk.proto.Key.Builder builderForValue) { if (newRealmAdminKeyBuilder_ == null) { newRealmAdminKey_ = builderForValue.build(); } else { newRealmAdminKeyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000400; onChanged(); return this; } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; */ public Builder mergeNewRealmAdminKey(com.hedera.hashgraph.sdk.proto.Key value) { if (newRealmAdminKeyBuilder_ == null) { if (((bitField0_ & 0x00000400) != 0) && newRealmAdminKey_ != null && newRealmAdminKey_ != com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance()) { getNewRealmAdminKeyBuilder().mergeFrom(value); } else { newRealmAdminKey_ = value; } } else { newRealmAdminKeyBuilder_.mergeFrom(value); } if (newRealmAdminKey_ != null) { bitField0_ |= 0x00000400; onChanged(); } return this; } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; */ public Builder clearNewRealmAdminKey() { bitField0_ = (bitField0_ & ~0x00000400); newRealmAdminKey_ = null; if (newRealmAdminKeyBuilder_ != null) { newRealmAdminKeyBuilder_.dispose(); newRealmAdminKeyBuilder_ = null; } onChanged(); return this; } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; */ public com.hedera.hashgraph.sdk.proto.Key.Builder getNewRealmAdminKeyBuilder() { bitField0_ |= 0x00000400; onChanged(); return getNewRealmAdminKeyFieldBuilder().getBuilder(); } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; */ public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getNewRealmAdminKeyOrBuilder() { if (newRealmAdminKeyBuilder_ != null) { return newRealmAdminKeyBuilder_.getMessageOrBuilder(); } else { return newRealmAdminKey_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : newRealmAdminKey_; } } /** *
     **
     * if realmID is null, then this the admin key for the new realm that will be created
     * 
* * .proto.Key newRealmAdminKey = 12; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> getNewRealmAdminKeyFieldBuilder() { if (newRealmAdminKeyBuilder_ == null) { newRealmAdminKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>( getNewRealmAdminKey(), getParentForChildren(), isClean()); newRealmAdminKey_ = null; } return newRealmAdminKeyBuilder_; } private java.lang.Object memo_ = ""; /** *
     **
     * the memo that was submitted as part of the contract (max 100 bytes)
     * 
* * string memo = 13; * @return The memo. */ public java.lang.String getMemo() { java.lang.Object ref = memo_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); memo_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     **
     * the memo that was submitted as part of the contract (max 100 bytes)
     * 
* * string memo = 13; * @return The bytes for memo. */ public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     **
     * the memo that was submitted as part of the contract (max 100 bytes)
     * 
* * string memo = 13; * @param value The memo to set. * @return This builder for chaining. */ public Builder setMemo( java.lang.String value) { if (value == null) { throw new NullPointerException(); } memo_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } /** *
     **
     * the memo that was submitted as part of the contract (max 100 bytes)
     * 
* * string memo = 13; * @return This builder for chaining. */ public Builder clearMemo() { memo_ = getDefaultInstance().getMemo(); bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } /** *
     **
     * the memo that was submitted as part of the contract (max 100 bytes)
     * 
* * string memo = 13; * @param value The bytes for memo to set. * @return This builder for chaining. */ public Builder setMemoBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); memo_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } private int maxAutomaticTokenAssociations_ ; /** *
     **
     * The maximum number of tokens that can be auto-associated with the contract.<br/>
     * If this is less than or equal to `used_auto_associations`, or 0, then this contract
     * MUST manually associate with a token before transacting in that token.<br/>
     * This value MAY also be `-1` to indicate no limit.<br/>
     * This value MUST NOT be less than `-1`.<br/>
     * By default this value is 0 for contracts.
     * 
* * int32 max_automatic_token_associations = 14; * @return The maxAutomaticTokenAssociations. */ @java.lang.Override public int getMaxAutomaticTokenAssociations() { return maxAutomaticTokenAssociations_; } /** *
     **
     * The maximum number of tokens that can be auto-associated with the contract.<br/>
     * If this is less than or equal to `used_auto_associations`, or 0, then this contract
     * MUST manually associate with a token before transacting in that token.<br/>
     * This value MAY also be `-1` to indicate no limit.<br/>
     * This value MUST NOT be less than `-1`.<br/>
     * By default this value is 0 for contracts.
     * 
* * int32 max_automatic_token_associations = 14; * @param value The maxAutomaticTokenAssociations to set. * @return This builder for chaining. */ public Builder setMaxAutomaticTokenAssociations(int value) { maxAutomaticTokenAssociations_ = value; bitField0_ |= 0x00001000; onChanged(); return this; } /** *
     **
     * The maximum number of tokens that can be auto-associated with the contract.<br/>
     * If this is less than or equal to `used_auto_associations`, or 0, then this contract
     * MUST manually associate with a token before transacting in that token.<br/>
     * This value MAY also be `-1` to indicate no limit.<br/>
     * This value MUST NOT be less than `-1`.<br/>
     * By default this value is 0 for contracts.
     * 
* * int32 max_automatic_token_associations = 14; * @return This builder for chaining. */ public Builder clearMaxAutomaticTokenAssociations() { bitField0_ = (bitField0_ & ~0x00001000); maxAutomaticTokenAssociations_ = 0; onChanged(); return this; } private com.hedera.hashgraph.sdk.proto.AccountID autoRenewAccountId_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> autoRenewAccountIdBuilder_; /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; * @return Whether the autoRenewAccountId field is set. */ public boolean hasAutoRenewAccountId() { return ((bitField0_ & 0x00002000) != 0); } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; * @return The autoRenewAccountId. */ public com.hedera.hashgraph.sdk.proto.AccountID getAutoRenewAccountId() { if (autoRenewAccountIdBuilder_ == null) { return autoRenewAccountId_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_; } else { return autoRenewAccountIdBuilder_.getMessage(); } } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; */ public Builder setAutoRenewAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { if (autoRenewAccountIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } autoRenewAccountId_ = value; } else { autoRenewAccountIdBuilder_.setMessage(value); } bitField0_ |= 0x00002000; onChanged(); return this; } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; */ public Builder setAutoRenewAccountId( com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) { if (autoRenewAccountIdBuilder_ == null) { autoRenewAccountId_ = builderForValue.build(); } else { autoRenewAccountIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00002000; onChanged(); return this; } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; */ public Builder mergeAutoRenewAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { if (autoRenewAccountIdBuilder_ == null) { if (((bitField0_ & 0x00002000) != 0) && autoRenewAccountId_ != null && autoRenewAccountId_ != com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance()) { getAutoRenewAccountIdBuilder().mergeFrom(value); } else { autoRenewAccountId_ = value; } } else { autoRenewAccountIdBuilder_.mergeFrom(value); } if (autoRenewAccountId_ != null) { bitField0_ |= 0x00002000; onChanged(); } return this; } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; */ public Builder clearAutoRenewAccountId() { bitField0_ = (bitField0_ & ~0x00002000); autoRenewAccountId_ = null; if (autoRenewAccountIdBuilder_ != null) { autoRenewAccountIdBuilder_.dispose(); autoRenewAccountIdBuilder_ = null; } onChanged(); return this; } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; */ public com.hedera.hashgraph.sdk.proto.AccountID.Builder getAutoRenewAccountIdBuilder() { bitField0_ |= 0x00002000; onChanged(); return getAutoRenewAccountIdFieldBuilder().getBuilder(); } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; */ public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getAutoRenewAccountIdOrBuilder() { if (autoRenewAccountIdBuilder_ != null) { return autoRenewAccountIdBuilder_.getMessageOrBuilder(); } else { return autoRenewAccountId_ == null ? com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance() : autoRenewAccountId_; } } /** *
     **
     * An account to charge for auto-renewal of this contract. If not set, or set to an
     * account with zero hbar balance, the contract's own hbar balance will be used to
     * cover auto-renewal fees.
     * 
* * .proto.AccountID auto_renew_account_id = 15; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> getAutoRenewAccountIdFieldBuilder() { if (autoRenewAccountIdBuilder_ == null) { autoRenewAccountIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>( getAutoRenewAccountId(), getParentForChildren(), isClean()); autoRenewAccountId_ = null; } return autoRenewAccountIdBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> stakedAccountIdBuilder_; /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; * @return Whether the stakedAccountId field is set. */ @java.lang.Override public boolean hasStakedAccountId() { return stakedIdCase_ == 17; } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; * @return The stakedAccountId. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountID getStakedAccountId() { if (stakedAccountIdBuilder_ == null) { if (stakedIdCase_ == 17) { return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_; } return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance(); } else { if (stakedIdCase_ == 17) { return stakedAccountIdBuilder_.getMessage(); } return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance(); } } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; */ public Builder setStakedAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { if (stakedAccountIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } stakedId_ = value; onChanged(); } else { stakedAccountIdBuilder_.setMessage(value); } stakedIdCase_ = 17; return this; } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; */ public Builder setStakedAccountId( com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) { if (stakedAccountIdBuilder_ == null) { stakedId_ = builderForValue.build(); onChanged(); } else { stakedAccountIdBuilder_.setMessage(builderForValue.build()); } stakedIdCase_ = 17; return this; } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; */ public Builder mergeStakedAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { if (stakedAccountIdBuilder_ == null) { if (stakedIdCase_ == 17 && stakedId_ != com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance()) { stakedId_ = com.hedera.hashgraph.sdk.proto.AccountID.newBuilder((com.hedera.hashgraph.sdk.proto.AccountID) stakedId_) .mergeFrom(value).buildPartial(); } else { stakedId_ = value; } onChanged(); } else { if (stakedIdCase_ == 17) { stakedAccountIdBuilder_.mergeFrom(value); } else { stakedAccountIdBuilder_.setMessage(value); } } stakedIdCase_ = 17; return this; } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; */ public Builder clearStakedAccountId() { if (stakedAccountIdBuilder_ == null) { if (stakedIdCase_ == 17) { stakedIdCase_ = 0; stakedId_ = null; onChanged(); } } else { if (stakedIdCase_ == 17) { stakedIdCase_ = 0; stakedId_ = null; } stakedAccountIdBuilder_.clear(); } return this; } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; */ public com.hedera.hashgraph.sdk.proto.AccountID.Builder getStakedAccountIdBuilder() { return getStakedAccountIdFieldBuilder().getBuilder(); } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getStakedAccountIdOrBuilder() { if ((stakedIdCase_ == 17) && (stakedAccountIdBuilder_ != null)) { return stakedAccountIdBuilder_.getMessageOrBuilder(); } else { if (stakedIdCase_ == 17) { return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_; } return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance(); } } /** *
     **
     * ID of the account to which this contract is staking.
     * 
* * .proto.AccountID staked_account_id = 17; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder> getStakedAccountIdFieldBuilder() { if (stakedAccountIdBuilder_ == null) { if (!(stakedIdCase_ == 17)) { stakedId_ = com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance(); } stakedAccountIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.AccountID, com.hedera.hashgraph.sdk.proto.AccountID.Builder, com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder>( (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_, getParentForChildren(), isClean()); stakedId_ = null; } stakedIdCase_ = 17; onChanged(); return stakedAccountIdBuilder_; } /** *
     **
     * ID of the node this contract is staked to.
     * 
* * int64 staked_node_id = 18; * @return Whether the stakedNodeId field is set. */ public boolean hasStakedNodeId() { return stakedIdCase_ == 18; } /** *
     **
     * ID of the node this contract is staked to.
     * 
* * int64 staked_node_id = 18; * @return The stakedNodeId. */ public long getStakedNodeId() { if (stakedIdCase_ == 18) { return (java.lang.Long) stakedId_; } return 0L; } /** *
     **
     * ID of the node this contract is staked to.
     * 
* * int64 staked_node_id = 18; * @param value The stakedNodeId to set. * @return This builder for chaining. */ public Builder setStakedNodeId(long value) { stakedIdCase_ = 18; stakedId_ = value; onChanged(); return this; } /** *
     **
     * ID of the node this contract is staked to.
     * 
* * int64 staked_node_id = 18; * @return This builder for chaining. */ public Builder clearStakedNodeId() { if (stakedIdCase_ == 18) { stakedIdCase_ = 0; stakedId_ = null; onChanged(); } return this; } private boolean declineReward_ ; /** *
     **
     * If true, the contract declines receiving a staking reward. The default value is false.
     * 
* * bool decline_reward = 19; * @return The declineReward. */ @java.lang.Override public boolean getDeclineReward() { return declineReward_; } /** *
     **
     * If true, the contract declines receiving a staking reward. The default value is false.
     * 
* * bool decline_reward = 19; * @param value The declineReward to set. * @return This builder for chaining. */ public Builder setDeclineReward(boolean value) { declineReward_ = value; bitField0_ |= 0x00010000; onChanged(); return this; } /** *
     **
     * If true, the contract declines receiving a staking reward. The default value is false.
     * 
* * bool decline_reward = 19; * @return This builder for chaining. */ public Builder clearDeclineReward() { bitField0_ = (bitField0_ & ~0x00010000); declineReward_ = false; onChanged(); return this; } @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.ContractCreateTransactionBody) } // @@protoc_insertion_point(class_scope:proto.ContractCreateTransactionBody) private static final com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody(); } public static com.hedera.hashgraph.sdk.proto.ContractCreateTransactionBody getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ContractCreateTransactionBody 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.ContractCreateTransactionBody getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy