com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: crypto_create.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
*
* Create a new account. After the account is created, the AccountID for it is in the receipt. It
* can also be retrieved with a GetByKey query. Threshold values can be defined, and records are
* generated and stored for 25 hours for any transfer that exceeds the thresholds. This account is
* charged for each record generated, so the thresholds are useful for limiting record generation to
* happen only for large transactions.
*
* The Key field is the key used to sign transactions for this account. If the account has
* receiverSigRequired set to true, then all cryptocurrency transfers must be signed by this
* account's key, both for transfers in and out. If it is false, then only transfers out have to be
* signed by it. When the account is created, the payer account is charged enough hbars so that the
* new account will not expire for the next autoRenewPeriod seconds. When it reaches the expiration
* time, the new account will then be automatically charged to renew for another autoRenewPeriod
* seconds. If it does not have enough hbars to renew for that long, then the remaining hbars are
* used to extend its expiration as long as possible. If it is has a zero balance when it expires,
* then it is deleted. This transaction must be signed by the payer account. If receiverSigRequired
* is false, then the transaction does not have to be signed by the keys in the keys field. If it is
* true, then it must be signed by them, in addition to the keys of the payer account. If the
* auto_renew_account field is set, the key of the referenced account must sign.
*
* 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.
*
*
* Protobuf type {@code proto.CryptoCreateTransactionBody}
*/
public final class CryptoCreateTransactionBody extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.CryptoCreateTransactionBody)
CryptoCreateTransactionBodyOrBuilder {
private static final long serialVersionUID = 0L;
// Use CryptoCreateTransactionBody.newBuilder() to construct.
private CryptoCreateTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CryptoCreateTransactionBody() {
memo_ = "";
alias_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CryptoCreateTransactionBody();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.CryptoCreate.internal_static_proto_CryptoCreateTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.CryptoCreate.internal_static_proto_CryptoCreateTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody.class, com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody.Builder.class);
}
private int bitField0_;
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(15),
STAKED_NODE_ID(16),
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 15: return STAKED_ACCOUNT_ID;
case 16: 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 KEY_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.Key key_;
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
* @return Whether the key field is set.
*/
@java.lang.Override
public boolean hasKey() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
* @return The key.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Key getKey() {
return key_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : key_;
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getKeyOrBuilder() {
return key_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : key_;
}
public static final int INITIALBALANCE_FIELD_NUMBER = 2;
private long initialBalance_ = 0L;
/**
*
**
* The initial number of tinybars to put into the account
*
*
* uint64 initialBalance = 2;
* @return The initialBalance.
*/
@java.lang.Override
public long getInitialBalance() {
return initialBalance_;
}
public static final int PROXYACCOUNTID_FIELD_NUMBER = 3;
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 = 3 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.proxyAccountID is deprecated.
* See crypto_create.proto;l=82
* @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 = 3 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.proxyAccountID is deprecated.
* See crypto_create.proto;l=82
* @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 = 3 [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 SENDRECORDTHRESHOLD_FIELD_NUMBER = 6;
private long sendRecordThreshold_ = 0L;
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any send/withdraw transaction
*
*
* uint64 sendRecordThreshold = 6 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.sendRecordThreshold is deprecated.
* See crypto_create.proto;l=88
* @return The sendRecordThreshold.
*/
@java.lang.Override
@java.lang.Deprecated public long getSendRecordThreshold() {
return sendRecordThreshold_;
}
public static final int RECEIVERECORDTHRESHOLD_FIELD_NUMBER = 7;
private long receiveRecordThreshold_ = 0L;
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any receive/deposit transaction
*
*
* uint64 receiveRecordThreshold = 7 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.receiveRecordThreshold is deprecated.
* See crypto_create.proto;l=94
* @return The receiveRecordThreshold.
*/
@java.lang.Override
@java.lang.Deprecated public long getReceiveRecordThreshold() {
return receiveRecordThreshold_;
}
public static final int RECEIVERSIGREQUIRED_FIELD_NUMBER = 8;
private boolean receiverSigRequired_ = false;
/**
*
**
* If true, this account's key must sign any transaction depositing into this account (in
* addition to all withdrawals)
*
*
* bool receiverSigRequired = 8;
* @return The receiverSigRequired.
*/
@java.lang.Override
public boolean getReceiverSigRequired() {
return receiverSigRequired_;
}
public static final int AUTORENEWPERIOD_FIELD_NUMBER = 9;
private com.hedera.hashgraph.sdk.proto.Duration autoRenewPeriod_;
/**
*
**
* The account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
* @return Whether the autoRenewPeriod field is set.
*/
@java.lang.Override
public boolean hasAutoRenewPeriod() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
**
* The account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
* @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 account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
@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 SHARDID_FIELD_NUMBER = 10;
private com.hedera.hashgraph.sdk.proto.ShardID shardID_;
/**
*
**
* The shard in which this account is created
*
*
* .proto.ShardID shardID = 10;
* @return Whether the shardID field is set.
*/
@java.lang.Override
public boolean hasShardID() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
**
* The shard in which this account is created
*
*
* .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_;
}
/**
*
**
* The shard in which this account is created
*
*
* .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_;
/**
*
**
* The realm in which this account is created (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);
}
/**
*
**
* The realm in which this account is created (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_;
}
/**
*
**
* The realm in which this account is created (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 associated with the account (UTF-8 encoding 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 associated with the account (UTF-8 encoding 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 account.<br/>
* If this is less than or equal to `used_auto_associations`, or 0, then this account
* 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 accounts except for auto-created accounts which default -1.
*
*
* int32 max_automatic_token_associations = 14;
* @return The maxAutomaticTokenAssociations.
*/
@java.lang.Override
public int getMaxAutomaticTokenAssociations() {
return maxAutomaticTokenAssociations_;
}
public static final int STAKED_ACCOUNT_ID_FIELD_NUMBER = 15;
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
* @return Whether the stakedAccountId field is set.
*/
@java.lang.Override
public boolean hasStakedAccountId() {
return stakedIdCase_ == 15;
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
* @return The stakedAccountId.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountID getStakedAccountId() {
if (stakedIdCase_ == 15) {
return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_;
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getStakedAccountIdOrBuilder() {
if (stakedIdCase_ == 15) {
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 = 16;
/**
*
**
* ID of the node this account is staked to.
*
*
* int64 staked_node_id = 16;
* @return Whether the stakedNodeId field is set.
*/
@java.lang.Override
public boolean hasStakedNodeId() {
return stakedIdCase_ == 16;
}
/**
*
**
* ID of the node this account is staked to.
*
*
* int64 staked_node_id = 16;
* @return The stakedNodeId.
*/
@java.lang.Override
public long getStakedNodeId() {
if (stakedIdCase_ == 16) {
return (java.lang.Long) stakedId_;
}
return 0L;
}
public static final int DECLINE_REWARD_FIELD_NUMBER = 17;
private boolean declineReward_ = false;
/**
*
**
* If true, the account declines receiving a staking reward. The default value is false.
*
*
* bool decline_reward = 17;
* @return The declineReward.
*/
@java.lang.Override
public boolean getDeclineReward() {
return declineReward_;
}
public static final int ALIAS_FIELD_NUMBER = 18;
private com.google.protobuf.ByteString alias_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* The bytes to be used as the account's alias. It will be the
* serialization of a protobuf Key message for an ED25519/ECDSA_SECP256K1 primitive key type. Currently only primitive key bytes are
* supported as the key for an account with an alias. ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id are not supported.
*
* May also be the EOA 20-byte address to create that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* A given alias can map to at most one account on the network at a time. This uniqueness will be enforced
* relative to aliases currently on the network at alias assignment.
*
* If a transaction creates an account using an alias, any further crypto transfers to that alias will
* simply be deposited in that account, without creating anything, and with no creation fee being charged.
*
*
* bytes alias = 18;
* @return The alias.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAlias() {
return alias_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getKey());
}
if (initialBalance_ != 0L) {
output.writeUInt64(2, initialBalance_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getProxyAccountID());
}
if (sendRecordThreshold_ != 0L) {
output.writeUInt64(6, sendRecordThreshold_);
}
if (receiveRecordThreshold_ != 0L) {
output.writeUInt64(7, receiveRecordThreshold_);
}
if (receiverSigRequired_ != false) {
output.writeBool(8, receiverSigRequired_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(9, getAutoRenewPeriod());
}
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 (stakedIdCase_ == 15) {
output.writeMessage(15, (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_);
}
if (stakedIdCase_ == 16) {
output.writeInt64(
16, (long)((java.lang.Long) stakedId_));
}
if (declineReward_ != false) {
output.writeBool(17, declineReward_);
}
if (!alias_.isEmpty()) {
output.writeBytes(18, alias_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getKey());
}
if (initialBalance_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, initialBalance_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getProxyAccountID());
}
if (sendRecordThreshold_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(6, sendRecordThreshold_);
}
if (receiveRecordThreshold_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(7, receiveRecordThreshold_);
}
if (receiverSigRequired_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, receiverSigRequired_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getAutoRenewPeriod());
}
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 (stakedIdCase_ == 15) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_);
}
if (stakedIdCase_ == 16) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
16, (long)((java.lang.Long) stakedId_));
}
if (declineReward_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(17, declineReward_);
}
if (!alias_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(18, alias_);
}
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.CryptoCreateTransactionBody)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody other = (com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody) obj;
if (hasKey() != other.hasKey()) return false;
if (hasKey()) {
if (!getKey()
.equals(other.getKey())) return false;
}
if (getInitialBalance()
!= other.getInitialBalance()) return false;
if (hasProxyAccountID() != other.hasProxyAccountID()) return false;
if (hasProxyAccountID()) {
if (!getProxyAccountID()
.equals(other.getProxyAccountID())) return false;
}
if (getSendRecordThreshold()
!= other.getSendRecordThreshold()) return false;
if (getReceiveRecordThreshold()
!= other.getReceiveRecordThreshold()) return false;
if (getReceiverSigRequired()
!= other.getReceiverSigRequired()) return false;
if (hasAutoRenewPeriod() != other.hasAutoRenewPeriod()) return false;
if (hasAutoRenewPeriod()) {
if (!getAutoRenewPeriod()
.equals(other.getAutoRenewPeriod())) 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 (getDeclineReward()
!= other.getDeclineReward()) return false;
if (!getAlias()
.equals(other.getAlias())) return false;
if (!getStakedIdCase().equals(other.getStakedIdCase())) return false;
switch (stakedIdCase_) {
case 15:
if (!getStakedAccountId()
.equals(other.getStakedAccountId())) return false;
break;
case 16:
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 (hasKey()) {
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
}
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();
}
hash = (37 * hash) + SENDRECORDTHRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSendRecordThreshold());
hash = (37 * hash) + RECEIVERECORDTHRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getReceiveRecordThreshold());
hash = (37 * hash) + RECEIVERSIGREQUIRED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReceiverSigRequired());
if (hasAutoRenewPeriod()) {
hash = (37 * hash) + AUTORENEWPERIOD_FIELD_NUMBER;
hash = (53 * hash) + getAutoRenewPeriod().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();
hash = (37 * hash) + DECLINE_REWARD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeclineReward());
hash = (37 * hash) + ALIAS_FIELD_NUMBER;
hash = (53 * hash) + getAlias().hashCode();
switch (stakedIdCase_) {
case 15:
hash = (37 * hash) + STAKED_ACCOUNT_ID_FIELD_NUMBER;
hash = (53 * hash) + getStakedAccountId().hashCode();
break;
case 16:
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.CryptoCreateTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody 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.CryptoCreateTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody 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.CryptoCreateTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody 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.CryptoCreateTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody 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.CryptoCreateTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody 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.CryptoCreateTransactionBody 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.CryptoCreateTransactionBody 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.CryptoCreateTransactionBody 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;
}
/**
*
*
* Create a new account. After the account is created, the AccountID for it is in the receipt. It
* can also be retrieved with a GetByKey query. Threshold values can be defined, and records are
* generated and stored for 25 hours for any transfer that exceeds the thresholds. This account is
* charged for each record generated, so the thresholds are useful for limiting record generation to
* happen only for large transactions.
*
* The Key field is the key used to sign transactions for this account. If the account has
* receiverSigRequired set to true, then all cryptocurrency transfers must be signed by this
* account's key, both for transfers in and out. If it is false, then only transfers out have to be
* signed by it. When the account is created, the payer account is charged enough hbars so that the
* new account will not expire for the next autoRenewPeriod seconds. When it reaches the expiration
* time, the new account will then be automatically charged to renew for another autoRenewPeriod
* seconds. If it does not have enough hbars to renew for that long, then the remaining hbars are
* used to extend its expiration as long as possible. If it is has a zero balance when it expires,
* then it is deleted. This transaction must be signed by the payer account. If receiverSigRequired
* is false, then the transaction does not have to be signed by the keys in the keys field. If it is
* true, then it must be signed by them, in addition to the keys of the payer account. If the
* auto_renew_account field is set, the key of the referenced account must sign.
*
* 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.
*
*
* Protobuf type {@code proto.CryptoCreateTransactionBody}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.CryptoCreateTransactionBody)
com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBodyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.CryptoCreate.internal_static_proto_CryptoCreateTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.CryptoCreate.internal_static_proto_CryptoCreateTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody.class, com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getKeyFieldBuilder();
getProxyAccountIDFieldBuilder();
getAutoRenewPeriodFieldBuilder();
getShardIDFieldBuilder();
getRealmIDFieldBuilder();
getNewRealmAdminKeyFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
key_ = null;
if (keyBuilder_ != null) {
keyBuilder_.dispose();
keyBuilder_ = null;
}
initialBalance_ = 0L;
proxyAccountID_ = null;
if (proxyAccountIDBuilder_ != null) {
proxyAccountIDBuilder_.dispose();
proxyAccountIDBuilder_ = null;
}
sendRecordThreshold_ = 0L;
receiveRecordThreshold_ = 0L;
receiverSigRequired_ = false;
autoRenewPeriod_ = null;
if (autoRenewPeriodBuilder_ != null) {
autoRenewPeriodBuilder_.dispose();
autoRenewPeriodBuilder_ = null;
}
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;
if (stakedAccountIdBuilder_ != null) {
stakedAccountIdBuilder_.clear();
}
declineReward_ = false;
alias_ = com.google.protobuf.ByteString.EMPTY;
stakedIdCase_ = 0;
stakedId_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.CryptoCreate.internal_static_proto_CryptoCreateTransactionBody_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody build() {
com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody buildPartial() {
com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody result = new com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = keyBuilder_ == null
? key_
: keyBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.initialBalance_ = initialBalance_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.proxyAccountID_ = proxyAccountIDBuilder_ == null
? proxyAccountID_
: proxyAccountIDBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.sendRecordThreshold_ = sendRecordThreshold_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.receiveRecordThreshold_ = receiveRecordThreshold_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.receiverSigRequired_ = receiverSigRequired_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.autoRenewPeriod_ = autoRenewPeriodBuilder_ == null
? autoRenewPeriod_
: autoRenewPeriodBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.shardID_ = shardIDBuilder_ == null
? shardID_
: shardIDBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.realmID_ = realmIDBuilder_ == null
? realmID_
: realmIDBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.newRealmAdminKey_ = newRealmAdminKeyBuilder_ == null
? newRealmAdminKey_
: newRealmAdminKeyBuilder_.build();
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.memo_ = memo_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.maxAutomaticTokenAssociations_ = maxAutomaticTokenAssociations_;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.declineReward_ = declineReward_;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.alias_ = alias_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody result) {
result.stakedIdCase_ = stakedIdCase_;
result.stakedId_ = this.stakedId_;
if (stakedIdCase_ == 15 &&
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.CryptoCreateTransactionBody) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody other) {
if (other == com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody.getDefaultInstance()) return this;
if (other.hasKey()) {
mergeKey(other.getKey());
}
if (other.getInitialBalance() != 0L) {
setInitialBalance(other.getInitialBalance());
}
if (other.hasProxyAccountID()) {
mergeProxyAccountID(other.getProxyAccountID());
}
if (other.getSendRecordThreshold() != 0L) {
setSendRecordThreshold(other.getSendRecordThreshold());
}
if (other.getReceiveRecordThreshold() != 0L) {
setReceiveRecordThreshold(other.getReceiveRecordThreshold());
}
if (other.getReceiverSigRequired() != false) {
setReceiverSigRequired(other.getReceiverSigRequired());
}
if (other.hasAutoRenewPeriod()) {
mergeAutoRenewPeriod(other.getAutoRenewPeriod());
}
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_ |= 0x00000400;
onChanged();
}
if (other.getMaxAutomaticTokenAssociations() != 0) {
setMaxAutomaticTokenAssociations(other.getMaxAutomaticTokenAssociations());
}
if (other.getDeclineReward() != false) {
setDeclineReward(other.getDeclineReward());
}
if (other.getAlias() != com.google.protobuf.ByteString.EMPTY) {
setAlias(other.getAlias());
}
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(
getKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
initialBalance_ = input.readUInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
input.readMessage(
getProxyAccountIDFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 48: {
sendRecordThreshold_ = input.readUInt64();
bitField0_ |= 0x00000008;
break;
} // case 48
case 56: {
receiveRecordThreshold_ = input.readUInt64();
bitField0_ |= 0x00000010;
break;
} // case 56
case 64: {
receiverSigRequired_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 64
case 74: {
input.readMessage(
getAutoRenewPeriodFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 74
case 82: {
input.readMessage(
getShardIDFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 82
case 90: {
input.readMessage(
getRealmIDFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 90
case 98: {
input.readMessage(
getNewRealmAdminKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 98
case 106: {
memo_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 106
case 112: {
maxAutomaticTokenAssociations_ = input.readInt32();
bitField0_ |= 0x00000800;
break;
} // case 112
case 122: {
input.readMessage(
getStakedAccountIdFieldBuilder().getBuilder(),
extensionRegistry);
stakedIdCase_ = 15;
break;
} // case 122
case 128: {
stakedId_ = input.readInt64();
stakedIdCase_ = 16;
break;
} // case 128
case 136: {
declineReward_ = input.readBool();
bitField0_ |= 0x00004000;
break;
} // case 136
case 146: {
alias_ = input.readBytes();
bitField0_ |= 0x00008000;
break;
} // case 146
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 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.hedera.hashgraph.sdk.proto.Key key_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder> keyBuilder_;
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
* @return Whether the key field is set.
*/
public boolean hasKey() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
* @return The key.
*/
public com.hedera.hashgraph.sdk.proto.Key getKey() {
if (keyBuilder_ == null) {
return key_ == null ? com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : key_;
} else {
return keyBuilder_.getMessage();
}
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
public Builder setKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (keyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
} else {
keyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
public Builder setKey(
com.hedera.hashgraph.sdk.proto.Key.Builder builderForValue) {
if (keyBuilder_ == null) {
key_ = builderForValue.build();
} else {
keyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
public Builder mergeKey(com.hedera.hashgraph.sdk.proto.Key value) {
if (keyBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
key_ != null &&
key_ != com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance()) {
getKeyBuilder().mergeFrom(value);
} else {
key_ = value;
}
} else {
keyBuilder_.mergeFrom(value);
}
if (key_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
public Builder clearKey() {
bitField0_ = (bitField0_ & ~0x00000001);
key_ = null;
if (keyBuilder_ != null) {
keyBuilder_.dispose();
keyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
public com.hedera.hashgraph.sdk.proto.Key.Builder getKeyBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getKeyFieldBuilder().getBuilder();
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
public com.hedera.hashgraph.sdk.proto.KeyOrBuilder getKeyOrBuilder() {
if (keyBuilder_ != null) {
return keyBuilder_.getMessageOrBuilder();
} else {
return key_ == null ?
com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance() : key_;
}
}
/**
*
**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*
*
* .proto.Key key = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>
getKeyFieldBuilder() {
if (keyBuilder_ == null) {
keyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Key, com.hedera.hashgraph.sdk.proto.Key.Builder, com.hedera.hashgraph.sdk.proto.KeyOrBuilder>(
getKey(),
getParentForChildren(),
isClean());
key_ = null;
}
return keyBuilder_;
}
private long initialBalance_ ;
/**
*
**
* The initial number of tinybars to put into the account
*
*
* uint64 initialBalance = 2;
* @return The initialBalance.
*/
@java.lang.Override
public long getInitialBalance() {
return initialBalance_;
}
/**
*
**
* The initial number of tinybars to put into the account
*
*
* uint64 initialBalance = 2;
* @param value The initialBalance to set.
* @return This builder for chaining.
*/
public Builder setInitialBalance(long value) {
initialBalance_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* The initial number of tinybars to put into the account
*
*
* uint64 initialBalance = 2;
* @return This builder for chaining.
*/
public Builder clearInitialBalance() {
bitField0_ = (bitField0_ & ~0x00000002);
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 = 3 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.proxyAccountID is deprecated.
* See crypto_create.proto;l=82
* @return Whether the proxyAccountID field is set.
*/
@java.lang.Deprecated public boolean hasProxyAccountID() {
return ((bitField0_ & 0x00000004) != 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 = 3 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.proxyAccountID is deprecated.
* See crypto_create.proto;l=82
* @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 = 3 [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_ |= 0x00000004;
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 = 3 [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_ |= 0x00000004;
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 = 3 [deprecated = true];
*/
@java.lang.Deprecated public Builder mergeProxyAccountID(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (proxyAccountIDBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 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_ |= 0x00000004;
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 = 3 [deprecated = true];
*/
@java.lang.Deprecated public Builder clearProxyAccountID() {
bitField0_ = (bitField0_ & ~0x00000004);
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 = 3 [deprecated = true];
*/
@java.lang.Deprecated public com.hedera.hashgraph.sdk.proto.AccountID.Builder getProxyAccountIDBuilder() {
bitField0_ |= 0x00000004;
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 = 3 [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 = 3 [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 long sendRecordThreshold_ ;
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any send/withdraw transaction
*
*
* uint64 sendRecordThreshold = 6 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.sendRecordThreshold is deprecated.
* See crypto_create.proto;l=88
* @return The sendRecordThreshold.
*/
@java.lang.Override
@java.lang.Deprecated public long getSendRecordThreshold() {
return sendRecordThreshold_;
}
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any send/withdraw transaction
*
*
* uint64 sendRecordThreshold = 6 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.sendRecordThreshold is deprecated.
* See crypto_create.proto;l=88
* @param value The sendRecordThreshold to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setSendRecordThreshold(long value) {
sendRecordThreshold_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any send/withdraw transaction
*
*
* uint64 sendRecordThreshold = 6 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.sendRecordThreshold is deprecated.
* See crypto_create.proto;l=88
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearSendRecordThreshold() {
bitField0_ = (bitField0_ & ~0x00000008);
sendRecordThreshold_ = 0L;
onChanged();
return this;
}
private long receiveRecordThreshold_ ;
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any receive/deposit transaction
*
*
* uint64 receiveRecordThreshold = 7 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.receiveRecordThreshold is deprecated.
* See crypto_create.proto;l=94
* @return The receiveRecordThreshold.
*/
@java.lang.Override
@java.lang.Deprecated public long getReceiveRecordThreshold() {
return receiveRecordThreshold_;
}
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any receive/deposit transaction
*
*
* uint64 receiveRecordThreshold = 7 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.receiveRecordThreshold is deprecated.
* See crypto_create.proto;l=94
* @param value The receiveRecordThreshold to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setReceiveRecordThreshold(long value) {
receiveRecordThreshold_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any receive/deposit transaction
*
*
* uint64 receiveRecordThreshold = 7 [deprecated = true];
* @deprecated proto.CryptoCreateTransactionBody.receiveRecordThreshold is deprecated.
* See crypto_create.proto;l=94
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearReceiveRecordThreshold() {
bitField0_ = (bitField0_ & ~0x00000010);
receiveRecordThreshold_ = 0L;
onChanged();
return this;
}
private boolean receiverSigRequired_ ;
/**
*
**
* If true, this account's key must sign any transaction depositing into this account (in
* addition to all withdrawals)
*
*
* bool receiverSigRequired = 8;
* @return The receiverSigRequired.
*/
@java.lang.Override
public boolean getReceiverSigRequired() {
return receiverSigRequired_;
}
/**
*
**
* If true, this account's key must sign any transaction depositing into this account (in
* addition to all withdrawals)
*
*
* bool receiverSigRequired = 8;
* @param value The receiverSigRequired to set.
* @return This builder for chaining.
*/
public Builder setReceiverSigRequired(boolean value) {
receiverSigRequired_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* If true, this account's key must sign any transaction depositing into this account (in
* addition to all withdrawals)
*
*
* bool receiverSigRequired = 8;
* @return This builder for chaining.
*/
public Builder clearReceiverSigRequired() {
bitField0_ = (bitField0_ & ~0x00000020);
receiverSigRequired_ = false;
onChanged();
return this;
}
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 account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
* @return Whether the autoRenewPeriod field is set.
*/
public boolean hasAutoRenewPeriod() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
**
* The account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
* @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 account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
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 account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
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 account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
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 account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
public Builder clearAutoRenewPeriod() {
bitField0_ = (bitField0_ & ~0x00000040);
autoRenewPeriod_ = null;
if (autoRenewPeriodBuilder_ != null) {
autoRenewPeriodBuilder_.dispose();
autoRenewPeriodBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
public com.hedera.hashgraph.sdk.proto.Duration.Builder getAutoRenewPeriodBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getAutoRenewPeriodFieldBuilder().getBuilder();
}
/**
*
**
* The account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
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 account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*
*
* .proto.Duration autoRenewPeriod = 9;
*/
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.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_;
/**
*
**
* The shard in which this account is created
*
*
* .proto.ShardID shardID = 10;
* @return Whether the shardID field is set.
*/
public boolean hasShardID() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
**
* The shard in which this account is created
*
*
* .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();
}
}
/**
*
**
* The shard in which this account is created
*
*
* .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_ |= 0x00000080;
onChanged();
return this;
}
/**
*
**
* The shard in which this account is created
*
*
* .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_ |= 0x00000080;
onChanged();
return this;
}
/**
*
**
* The shard in which this account is created
*
*
* .proto.ShardID shardID = 10;
*/
public Builder mergeShardID(com.hedera.hashgraph.sdk.proto.ShardID value) {
if (shardIDBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 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_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
**
* The shard in which this account is created
*
*
* .proto.ShardID shardID = 10;
*/
public Builder clearShardID() {
bitField0_ = (bitField0_ & ~0x00000080);
shardID_ = null;
if (shardIDBuilder_ != null) {
shardIDBuilder_.dispose();
shardIDBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The shard in which this account is created
*
*
* .proto.ShardID shardID = 10;
*/
public com.hedera.hashgraph.sdk.proto.ShardID.Builder getShardIDBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getShardIDFieldBuilder().getBuilder();
}
/**
*
**
* The shard in which this account is created
*
*
* .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_;
}
}
/**
*
**
* The shard in which this account is created
*
*
* .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_;
/**
*
**
* The realm in which this account is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 11;
* @return Whether the realmID field is set.
*/
public boolean hasRealmID() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
**
* The realm in which this account is created (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();
}
}
/**
*
**
* The realm in which this account is created (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_ |= 0x00000100;
onChanged();
return this;
}
/**
*
**
* The realm in which this account is created (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_ |= 0x00000100;
onChanged();
return this;
}
/**
*
**
* The realm in which this account is created (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_ & 0x00000100) != 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_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
**
* The realm in which this account is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 11;
*/
public Builder clearRealmID() {
bitField0_ = (bitField0_ & ~0x00000100);
realmID_ = null;
if (realmIDBuilder_ != null) {
realmIDBuilder_.dispose();
realmIDBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The realm in which this account is created (leave this null to create a new realm)
*
*
* .proto.RealmID realmID = 11;
*/
public com.hedera.hashgraph.sdk.proto.RealmID.Builder getRealmIDBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getRealmIDFieldBuilder().getBuilder();
}
/**
*
**
* The realm in which this account is created (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_;
}
}
/**
*
**
* The realm in which this account is created (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_ & 0x00000200) != 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_ |= 0x00000200;
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_ |= 0x00000200;
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_ & 0x00000200) != 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_ |= 0x00000200;
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_ & ~0x00000200);
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_ |= 0x00000200;
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 associated with the account (UTF-8 encoding 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 associated with the account (UTF-8 encoding 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 associated with the account (UTF-8 encoding 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_ |= 0x00000400;
onChanged();
return this;
}
/**
*
**
* The memo associated with the account (UTF-8 encoding max 100 bytes)
*
*
* string memo = 13;
* @return This builder for chaining.
*/
public Builder clearMemo() {
memo_ = getDefaultInstance().getMemo();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
**
* The memo associated with the account (UTF-8 encoding 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_ |= 0x00000400;
onChanged();
return this;
}
private int maxAutomaticTokenAssociations_ ;
/**
*
**
* The maximum number of tokens that can be auto-associated with the account.<br/>
* If this is less than or equal to `used_auto_associations`, or 0, then this account
* 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 accounts except for auto-created accounts which default -1.
*
*
* 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 account.<br/>
* If this is less than or equal to `used_auto_associations`, or 0, then this account
* 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 accounts except for auto-created accounts which default -1.
*
*
* 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_ |= 0x00000800;
onChanged();
return this;
}
/**
*
**
* The maximum number of tokens that can be auto-associated with the account.<br/>
* If this is less than or equal to `used_auto_associations`, or 0, then this account
* 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 accounts except for auto-created accounts which default -1.
*
*
* int32 max_automatic_token_associations = 14;
* @return This builder for chaining.
*/
public Builder clearMaxAutomaticTokenAssociations() {
bitField0_ = (bitField0_ & ~0x00000800);
maxAutomaticTokenAssociations_ = 0;
onChanged();
return this;
}
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 account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
* @return Whether the stakedAccountId field is set.
*/
@java.lang.Override
public boolean hasStakedAccountId() {
return stakedIdCase_ == 15;
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
* @return The stakedAccountId.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountID getStakedAccountId() {
if (stakedAccountIdBuilder_ == null) {
if (stakedIdCase_ == 15) {
return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_;
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
} else {
if (stakedIdCase_ == 15) {
return stakedAccountIdBuilder_.getMessage();
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
*/
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_ = 15;
return this;
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
*/
public Builder setStakedAccountId(
com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) {
if (stakedAccountIdBuilder_ == null) {
stakedId_ = builderForValue.build();
onChanged();
} else {
stakedAccountIdBuilder_.setMessage(builderForValue.build());
}
stakedIdCase_ = 15;
return this;
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
*/
public Builder mergeStakedAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) {
if (stakedAccountIdBuilder_ == null) {
if (stakedIdCase_ == 15 &&
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_ == 15) {
stakedAccountIdBuilder_.mergeFrom(value);
} else {
stakedAccountIdBuilder_.setMessage(value);
}
}
stakedIdCase_ = 15;
return this;
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
*/
public Builder clearStakedAccountId() {
if (stakedAccountIdBuilder_ == null) {
if (stakedIdCase_ == 15) {
stakedIdCase_ = 0;
stakedId_ = null;
onChanged();
}
} else {
if (stakedIdCase_ == 15) {
stakedIdCase_ = 0;
stakedId_ = null;
}
stakedAccountIdBuilder_.clear();
}
return this;
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
*/
public com.hedera.hashgraph.sdk.proto.AccountID.Builder getStakedAccountIdBuilder() {
return getStakedAccountIdFieldBuilder().getBuilder();
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_account_id = 15;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder getStakedAccountIdOrBuilder() {
if ((stakedIdCase_ == 15) && (stakedAccountIdBuilder_ != null)) {
return stakedAccountIdBuilder_.getMessageOrBuilder();
} else {
if (stakedIdCase_ == 15) {
return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_;
}
return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance();
}
}
/**
*
**
* ID of the account to which this account is staking.
*
*
* .proto.AccountID staked_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>
getStakedAccountIdFieldBuilder() {
if (stakedAccountIdBuilder_ == null) {
if (!(stakedIdCase_ == 15)) {
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_ = 15;
onChanged();
return stakedAccountIdBuilder_;
}
/**
*
**
* ID of the node this account is staked to.
*
*
* int64 staked_node_id = 16;
* @return Whether the stakedNodeId field is set.
*/
public boolean hasStakedNodeId() {
return stakedIdCase_ == 16;
}
/**
*
**
* ID of the node this account is staked to.
*
*
* int64 staked_node_id = 16;
* @return The stakedNodeId.
*/
public long getStakedNodeId() {
if (stakedIdCase_ == 16) {
return (java.lang.Long) stakedId_;
}
return 0L;
}
/**
*
**
* ID of the node this account is staked to.
*
*
* int64 staked_node_id = 16;
* @param value The stakedNodeId to set.
* @return This builder for chaining.
*/
public Builder setStakedNodeId(long value) {
stakedIdCase_ = 16;
stakedId_ = value;
onChanged();
return this;
}
/**
*
**
* ID of the node this account is staked to.
*
*
* int64 staked_node_id = 16;
* @return This builder for chaining.
*/
public Builder clearStakedNodeId() {
if (stakedIdCase_ == 16) {
stakedIdCase_ = 0;
stakedId_ = null;
onChanged();
}
return this;
}
private boolean declineReward_ ;
/**
*
**
* If true, the account declines receiving a staking reward. The default value is false.
*
*
* bool decline_reward = 17;
* @return The declineReward.
*/
@java.lang.Override
public boolean getDeclineReward() {
return declineReward_;
}
/**
*
**
* If true, the account declines receiving a staking reward. The default value is false.
*
*
* bool decline_reward = 17;
* @param value The declineReward to set.
* @return This builder for chaining.
*/
public Builder setDeclineReward(boolean value) {
declineReward_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
**
* If true, the account declines receiving a staking reward. The default value is false.
*
*
* bool decline_reward = 17;
* @return This builder for chaining.
*/
public Builder clearDeclineReward() {
bitField0_ = (bitField0_ & ~0x00004000);
declineReward_ = false;
onChanged();
return this;
}
private com.google.protobuf.ByteString alias_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* The bytes to be used as the account's alias. It will be the
* serialization of a protobuf Key message for an ED25519/ECDSA_SECP256K1 primitive key type. Currently only primitive key bytes are
* supported as the key for an account with an alias. ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id are not supported.
*
* May also be the EOA 20-byte address to create that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* A given alias can map to at most one account on the network at a time. This uniqueness will be enforced
* relative to aliases currently on the network at alias assignment.
*
* If a transaction creates an account using an alias, any further crypto transfers to that alias will
* simply be deposited in that account, without creating anything, and with no creation fee being charged.
*
*
* bytes alias = 18;
* @return The alias.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAlias() {
return alias_;
}
/**
*
**
* The bytes to be used as the account's alias. It will be the
* serialization of a protobuf Key message for an ED25519/ECDSA_SECP256K1 primitive key type. Currently only primitive key bytes are
* supported as the key for an account with an alias. ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id are not supported.
*
* May also be the EOA 20-byte address to create that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* A given alias can map to at most one account on the network at a time. This uniqueness will be enforced
* relative to aliases currently on the network at alias assignment.
*
* If a transaction creates an account using an alias, any further crypto transfers to that alias will
* simply be deposited in that account, without creating anything, and with no creation fee being charged.
*
*
* bytes alias = 18;
* @param value The alias to set.
* @return This builder for chaining.
*/
public Builder setAlias(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
alias_ = value;
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
**
* The bytes to be used as the account's alias. It will be the
* serialization of a protobuf Key message for an ED25519/ECDSA_SECP256K1 primitive key type. Currently only primitive key bytes are
* supported as the key for an account with an alias. ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id are not supported.
*
* May also be the EOA 20-byte address to create that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* A given alias can map to at most one account on the network at a time. This uniqueness will be enforced
* relative to aliases currently on the network at alias assignment.
*
* If a transaction creates an account using an alias, any further crypto transfers to that alias will
* simply be deposited in that account, without creating anything, and with no creation fee being charged.
*
*
* bytes alias = 18;
* @return This builder for chaining.
*/
public Builder clearAlias() {
bitField0_ = (bitField0_ & ~0x00008000);
alias_ = getDefaultInstance().getAlias();
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.CryptoCreateTransactionBody)
}
// @@protoc_insertion_point(class_scope:proto.CryptoCreateTransactionBody)
private static final com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody();
}
public static com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CryptoCreateTransactionBody 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.CryptoCreateTransactionBody getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}