// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: basic_types.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* The ID for an a cryptocurrency account
*
*
* Protobuf type {@code proto.AccountID}
*/
public final class AccountID extends
com.google.protobuf.GeneratedMessageLite<
AccountID, AccountID.Builder> implements
// @@protoc_insertion_point(message_implements:proto.AccountID)
AccountIDOrBuilder {
private AccountID() {
}
private int accountCase_ = 0;
private java.lang.Object account_;
public enum AccountCase {
ACCOUNTNUM(3),
ALIAS(4),
ACCOUNT_NOT_SET(0);
private final int value;
private AccountCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AccountCase valueOf(int value) {
return forNumber(value);
}
public static AccountCase forNumber(int value) {
switch (value) {
case 3: return ACCOUNTNUM;
case 4: return ALIAS;
case 0: return ACCOUNT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
@java.lang.Override
public AccountCase
getAccountCase() {
return AccountCase.forNumber(
accountCase_);
}
private void clearAccount() {
accountCase_ = 0;
account_ = null;
}
public static final int SHARDNUM_FIELD_NUMBER = 1;
private long shardNum_;
/**
*
**
* The shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @return The shardNum.
*/
@java.lang.Override
public long getShardNum() {
return shardNum_;
}
/**
*
**
* The shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @param value The shardNum to set.
*/
private void setShardNum(long value) {
shardNum_ = value;
}
/**
*
**
* The shard number (nonnegative)
*
*
* int64 shardNum = 1;
*/
private void clearShardNum() {
shardNum_ = 0L;
}
public static final int REALMNUM_FIELD_NUMBER = 2;
private long realmNum_;
/**
*
**
* The realm number (nonnegative)
*
*
* int64 realmNum = 2;
* @return The realmNum.
*/
@java.lang.Override
public long getRealmNum() {
return realmNum_;
}
/**
*
**
* The realm number (nonnegative)
*
*
* int64 realmNum = 2;
* @param value The realmNum to set.
*/
private void setRealmNum(long value) {
realmNum_ = value;
}
/**
*
**
* The realm number (nonnegative)
*
*
* int64 realmNum = 2;
*/
private void clearRealmNum() {
realmNum_ = 0L;
}
public static final int ACCOUNTNUM_FIELD_NUMBER = 3;
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
* @return Whether the accountNum field is set.
*/
@java.lang.Override
public boolean hasAccountNum() {
return accountCase_ == 3;
}
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
* @return The accountNum.
*/
@java.lang.Override
public long getAccountNum() {
if (accountCase_ == 3) {
return (java.lang.Long) account_;
}
return 0L;
}
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
* @param value The accountNum to set.
*/
private void setAccountNum(long value) {
accountCase_ = 3;
account_ = value;
}
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
*/
private void clearAccountNum() {
if (accountCase_ == 3) {
accountCase_ = 0;
account_ = null;
}
}
public static final int ALIAS_FIELD_NUMBER = 4;
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
* @return Whether the alias field is set.
*/
@java.lang.Override
public boolean hasAlias() {
return accountCase_ == 4;
}
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
* @return The alias.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAlias() {
if (accountCase_ == 4) {
return (com.google.protobuf.ByteString) account_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
* @param value The alias to set.
*/
private void setAlias(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
accountCase_ = 4;
account_ = value;
}
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
*/
private void clearAlias() {
if (accountCase_ == 4) {
accountCase_ = 0;
account_ = null;
}
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.AccountID parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.AccountID prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* The ID for an a cryptocurrency account
*
*
* Protobuf type {@code proto.AccountID}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.AccountID, Builder> implements
// @@protoc_insertion_point(builder_implements:proto.AccountID)
com.hedera.hashgraph.sdk.proto.AccountIDOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.AccountID.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
@java.lang.Override
public AccountCase
getAccountCase() {
return instance.getAccountCase();
}
public Builder clearAccount() {
copyOnWrite();
instance.clearAccount();
return this;
}
/**
*
**
* The shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @return The shardNum.
*/
@java.lang.Override
public long getShardNum() {
return instance.getShardNum();
}
/**
*
**
* The shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @param value The shardNum to set.
* @return This builder for chaining.
*/
public Builder setShardNum(long value) {
copyOnWrite();
instance.setShardNum(value);
return this;
}
/**
*
**
* The shard number (nonnegative)
*
*
* int64 shardNum = 1;
* @return This builder for chaining.
*/
public Builder clearShardNum() {
copyOnWrite();
instance.clearShardNum();
return this;
}
/**
*
**
* The realm number (nonnegative)
*
*
* int64 realmNum = 2;
* @return The realmNum.
*/
@java.lang.Override
public long getRealmNum() {
return instance.getRealmNum();
}
/**
*
**
* The realm number (nonnegative)
*
*
* int64 realmNum = 2;
* @param value The realmNum to set.
* @return This builder for chaining.
*/
public Builder setRealmNum(long value) {
copyOnWrite();
instance.setRealmNum(value);
return this;
}
/**
*
**
* The realm number (nonnegative)
*
*
* int64 realmNum = 2;
* @return This builder for chaining.
*/
public Builder clearRealmNum() {
copyOnWrite();
instance.clearRealmNum();
return this;
}
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
* @return Whether the accountNum field is set.
*/
@java.lang.Override
public boolean hasAccountNum() {
return instance.hasAccountNum();
}
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
* @return The accountNum.
*/
@java.lang.Override
public long getAccountNum() {
return instance.getAccountNum();
}
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
* @param value The accountNum to set.
* @return This builder for chaining.
*/
public Builder setAccountNum(long value) {
copyOnWrite();
instance.setAccountNum(value);
return this;
}
/**
*
**
* A non-negative account number unique within its realm
*
*
* int64 accountNum = 3;
* @return This builder for chaining.
*/
public Builder clearAccountNum() {
copyOnWrite();
instance.clearAccountNum();
return this;
}
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
* @return Whether the alias field is set.
*/
@java.lang.Override
public boolean hasAlias() {
return instance.hasAlias();
}
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
* @return The alias.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAlias() {
return instance.getAlias();
}
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
* @param value The alias to set.
* @return This builder for chaining.
*/
public Builder setAlias(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setAlias(value);
return this;
}
/**
*
**
* The public key bytes to be used as the account's alias. The public key bytes are the result of serializing
* a protobuf Key message for any primitive key type. Currently only primitive key bytes are supported as an alias
* (ThresholdKey, KeyList, ContractID, and delegatable_contract_id are not supported)
*
* May also be the ethereum account 20-byte EVM address to be used initially in place of the public key bytes. This EVM
* address may be either the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* At most one account can ever have a given alias and it is used for account creation if it
* was automatically created using a crypto transfer. It will be null if an account is created normally.
* It is immutable once it is set for an account.
*
* If a transaction auto-creates the account, any further transfers to that alias will simply be deposited
* in that account, without creating anything, and with no creation fee being charged.
*
* If a transaction lazily-creates this account, a subsequent transaction will be required containing the public key bytes
* that map to the EVM address bytes. The provided public key bytes will then serve as the final alias bytes.
*
*
* bytes alias = 4;
* @return This builder for chaining.
*/
public Builder clearAlias() {
copyOnWrite();
instance.clearAlias();
return this;
}
// @@protoc_insertion_point(builder_scope:proto.AccountID)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.hedera.hashgraph.sdk.proto.AccountID();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"account_",
"accountCase_",
"shardNum_",
"realmNum_",
};
java.lang.String info =
"\u0000\u0004\u0001\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\u0002\u0002\u0002" +
"\u00035\u0000\u0004=\u0000";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.hedera.hashgraph.sdk.proto.AccountID.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:proto.AccountID)
private static final com.hedera.hashgraph.sdk.proto.AccountID DEFAULT_INSTANCE;
static {
AccountID defaultInstance = new AccountID();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
AccountID.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.AccountID getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}