com.hedera.hashgraph.sdk.proto.Key Maven / Gradle / Ivy
The newest version!
// 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;
/**
*
**
* A Key can be a public key from either the Ed25519 or ECDSA(secp256k1) signature schemes, where
* in the ECDSA(secp256k1) case we require the 33-byte compressed form of the public key. We call
* these public keys <b>primitive keys</b>.
*
* If an account has primitive key associated to it, then the corresponding private key must sign
* any transaction to transfer cryptocurrency out of it.
*
* A Key can also be the ID of a smart contract instance, which is then authorized to perform any
* precompiled contract action that requires this key to sign.
*
* Note that when a Key is a smart contract ID, it <i>doesn't</i> mean the contract with that ID
* will actually create a cryptographic signature. It only means that when the contract calls a
* precompiled contract, the resulting "child transaction" will be authorized to perform any action
* controlled by the Key.
*
* A Key can be a "threshold key", which means a list of M keys, any N of which must sign in order
* for the threshold signature to be considered valid. The keys within a threshold signature may
* themselves be threshold signatures, to allow complex signature requirements.
*
* A Key can be a "key list" where all keys in the list must sign unless specified otherwise in the
* documentation for a specific transaction type (e.g. FileDeleteTransactionBody). Their use is
* dependent on context. For example, a Hedera file is created with a list of keys, where all of
* them must sign a transaction to create or modify the file, but only one of them is needed to sign
* a transaction to delete the file. So it's a single list that sometimes acts as a 1-of-M threshold
* key, and sometimes acts as an M-of-M threshold key. A key list is always an M-of-M, unless
* specified otherwise in documentation. A key list can have nested key lists or threshold keys.
* Nested key lists are always M-of-M. A key list can have repeated primitive public keys, but all
* repeated keys are only required to sign once.
*
* A Key can contain a ThresholdKey or KeyList, which in turn contain a Key, so this mutual
* recursion would allow nesting arbitrarily deep. A ThresholdKey which contains a list of primitive
* keys has 3 levels: ThresholdKey -> KeyList -> Key. A KeyList which contains several primitive
* keys has 2 levels: KeyList -> Key. A Key with 2 levels of nested ThresholdKeys has 7 levels:
* Key -> ThresholdKey -> KeyList -> Key -> ThresholdKey -> KeyList -> Key.
*
* Each Key should not have more than 46 levels, which implies 15 levels of nested ThresholdKeys.
*
*
* Protobuf type {@code proto.Key}
*/
public final class Key extends
com.google.protobuf.GeneratedMessageLite<
Key, Key.Builder> implements
// @@protoc_insertion_point(message_implements:proto.Key)
KeyOrBuilder {
private Key() {
}
private int keyCase_ = 0;
private java.lang.Object key_;
public enum KeyCase {
CONTRACTID(1),
ED25519(2),
RSA_3072(3),
ECDSA_384(4),
THRESHOLDKEY(5),
KEYLIST(6),
ECDSA_SECP256K1(7),
DELEGATABLE_CONTRACT_ID(8),
KEY_NOT_SET(0);
private final int value;
private KeyCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static KeyCase valueOf(int value) {
return forNumber(value);
}
public static KeyCase forNumber(int value) {
switch (value) {
case 1: return CONTRACTID;
case 2: return ED25519;
case 3: return RSA_3072;
case 4: return ECDSA_384;
case 5: return THRESHOLDKEY;
case 6: return KEYLIST;
case 7: return ECDSA_SECP256K1;
case 8: return DELEGATABLE_CONTRACT_ID;
case 0: return KEY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
@java.lang.Override
public KeyCase
getKeyCase() {
return KeyCase.forNumber(
keyCase_);
}
private void clearKey() {
keyCase_ = 0;
key_ = null;
}
public static final int CONTRACTID_FIELD_NUMBER = 1;
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
@java.lang.Override
public boolean hasContractID() {
return keyCase_ == 1;
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractID getContractID() {
if (keyCase_ == 1) {
return (com.hedera.hashgraph.sdk.proto.ContractID) key_;
}
return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
private void setContractID(com.hedera.hashgraph.sdk.proto.ContractID value) {
value.getClass();
key_ = value;
keyCase_ = 1;
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
private void mergeContractID(com.hedera.hashgraph.sdk.proto.ContractID value) {
value.getClass();
if (keyCase_ == 1 &&
key_ != com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance()) {
key_ = com.hedera.hashgraph.sdk.proto.ContractID.newBuilder((com.hedera.hashgraph.sdk.proto.ContractID) key_)
.mergeFrom(value).buildPartial();
} else {
key_ = value;
}
keyCase_ = 1;
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
private void clearContractID() {
if (keyCase_ == 1) {
keyCase_ = 0;
key_ = null;
}
}
public static final int ED25519_FIELD_NUMBER = 2;
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
* @return Whether the ed25519 field is set.
*/
@java.lang.Override
public boolean hasEd25519() {
return keyCase_ == 2;
}
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
* @return The ed25519.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEd25519() {
if (keyCase_ == 2) {
return (com.google.protobuf.ByteString) key_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
* @param value The ed25519 to set.
*/
private void setEd25519(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
keyCase_ = 2;
key_ = value;
}
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
*/
private void clearEd25519() {
if (keyCase_ == 2) {
keyCase_ = 0;
key_ = null;
}
}
public static final int RSA_3072_FIELD_NUMBER = 3;
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
* @return Whether the rSA3072 field is set.
*/
@java.lang.Override
public boolean hasRSA3072() {
return keyCase_ == 3;
}
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
* @return The rSA3072.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRSA3072() {
if (keyCase_ == 3) {
return (com.google.protobuf.ByteString) key_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
* @param value The rSA3072 to set.
*/
private void setRSA3072(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
keyCase_ = 3;
key_ = value;
}
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
*/
private void clearRSA3072() {
if (keyCase_ == 3) {
keyCase_ = 0;
key_ = null;
}
}
public static final int ECDSA_384_FIELD_NUMBER = 4;
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
* @return Whether the eCDSA384 field is set.
*/
@java.lang.Override
public boolean hasECDSA384() {
return keyCase_ == 4;
}
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
* @return The eCDSA384.
*/
@java.lang.Override
public com.google.protobuf.ByteString getECDSA384() {
if (keyCase_ == 4) {
return (com.google.protobuf.ByteString) key_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
* @param value The eCDSA384 to set.
*/
private void setECDSA384(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
keyCase_ = 4;
key_ = value;
}
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
*/
private void clearECDSA384() {
if (keyCase_ == 4) {
keyCase_ = 0;
key_ = null;
}
}
public static final int THRESHOLDKEY_FIELD_NUMBER = 5;
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
@java.lang.Override
public boolean hasThresholdKey() {
return keyCase_ == 5;
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ThresholdKey getThresholdKey() {
if (keyCase_ == 5) {
return (com.hedera.hashgraph.sdk.proto.ThresholdKey) key_;
}
return com.hedera.hashgraph.sdk.proto.ThresholdKey.getDefaultInstance();
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
private void setThresholdKey(com.hedera.hashgraph.sdk.proto.ThresholdKey value) {
value.getClass();
key_ = value;
keyCase_ = 5;
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
private void mergeThresholdKey(com.hedera.hashgraph.sdk.proto.ThresholdKey value) {
value.getClass();
if (keyCase_ == 5 &&
key_ != com.hedera.hashgraph.sdk.proto.ThresholdKey.getDefaultInstance()) {
key_ = com.hedera.hashgraph.sdk.proto.ThresholdKey.newBuilder((com.hedera.hashgraph.sdk.proto.ThresholdKey) key_)
.mergeFrom(value).buildPartial();
} else {
key_ = value;
}
keyCase_ = 5;
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
private void clearThresholdKey() {
if (keyCase_ == 5) {
keyCase_ = 0;
key_ = null;
}
}
public static final int KEYLIST_FIELD_NUMBER = 6;
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
@java.lang.Override
public boolean hasKeyList() {
return keyCase_ == 6;
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyList getKeyList() {
if (keyCase_ == 6) {
return (com.hedera.hashgraph.sdk.proto.KeyList) key_;
}
return com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance();
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
private void setKeyList(com.hedera.hashgraph.sdk.proto.KeyList value) {
value.getClass();
key_ = value;
keyCase_ = 6;
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
private void mergeKeyList(com.hedera.hashgraph.sdk.proto.KeyList value) {
value.getClass();
if (keyCase_ == 6 &&
key_ != com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance()) {
key_ = com.hedera.hashgraph.sdk.proto.KeyList.newBuilder((com.hedera.hashgraph.sdk.proto.KeyList) key_)
.mergeFrom(value).buildPartial();
} else {
key_ = value;
}
keyCase_ = 6;
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
private void clearKeyList() {
if (keyCase_ == 6) {
keyCase_ = 0;
key_ = null;
}
}
public static final int ECDSA_SECP256K1_FIELD_NUMBER = 7;
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
* @return Whether the eCDSASecp256k1 field is set.
*/
@java.lang.Override
public boolean hasECDSASecp256K1() {
return keyCase_ == 7;
}
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
* @return The eCDSASecp256k1.
*/
@java.lang.Override
public com.google.protobuf.ByteString getECDSASecp256K1() {
if (keyCase_ == 7) {
return (com.google.protobuf.ByteString) key_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
* @param value The eCDSASecp256k1 to set.
*/
private void setECDSASecp256K1(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
keyCase_ = 7;
key_ = value;
}
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
*/
private void clearECDSASecp256K1() {
if (keyCase_ == 7) {
keyCase_ = 0;
key_ = null;
}
}
public static final int DELEGATABLE_CONTRACT_ID_FIELD_NUMBER = 8;
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
@java.lang.Override
public boolean hasDelegatableContractId() {
return keyCase_ == 8;
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractID getDelegatableContractId() {
if (keyCase_ == 8) {
return (com.hedera.hashgraph.sdk.proto.ContractID) key_;
}
return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance();
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
private void setDelegatableContractId(com.hedera.hashgraph.sdk.proto.ContractID value) {
value.getClass();
key_ = value;
keyCase_ = 8;
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
private void mergeDelegatableContractId(com.hedera.hashgraph.sdk.proto.ContractID value) {
value.getClass();
if (keyCase_ == 8 &&
key_ != com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance()) {
key_ = com.hedera.hashgraph.sdk.proto.ContractID.newBuilder((com.hedera.hashgraph.sdk.proto.ContractID) key_)
.mergeFrom(value).buildPartial();
} else {
key_ = value;
}
keyCase_ = 8;
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
private void clearDelegatableContractId() {
if (keyCase_ == 8) {
keyCase_ = 0;
key_ = null;
}
}
public static com.hedera.hashgraph.sdk.proto.Key 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.Key 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.Key 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.Key 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.Key parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.Key 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.Key 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.Key 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.Key parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.Key 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.Key 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.Key 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.Key prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* A Key can be a public key from either the Ed25519 or ECDSA(secp256k1) signature schemes, where
* in the ECDSA(secp256k1) case we require the 33-byte compressed form of the public key. We call
* these public keys <b>primitive keys</b>.
*
* If an account has primitive key associated to it, then the corresponding private key must sign
* any transaction to transfer cryptocurrency out of it.
*
* A Key can also be the ID of a smart contract instance, which is then authorized to perform any
* precompiled contract action that requires this key to sign.
*
* Note that when a Key is a smart contract ID, it <i>doesn't</i> mean the contract with that ID
* will actually create a cryptographic signature. It only means that when the contract calls a
* precompiled contract, the resulting "child transaction" will be authorized to perform any action
* controlled by the Key.
*
* A Key can be a "threshold key", which means a list of M keys, any N of which must sign in order
* for the threshold signature to be considered valid. The keys within a threshold signature may
* themselves be threshold signatures, to allow complex signature requirements.
*
* A Key can be a "key list" where all keys in the list must sign unless specified otherwise in the
* documentation for a specific transaction type (e.g. FileDeleteTransactionBody). Their use is
* dependent on context. For example, a Hedera file is created with a list of keys, where all of
* them must sign a transaction to create or modify the file, but only one of them is needed to sign
* a transaction to delete the file. So it's a single list that sometimes acts as a 1-of-M threshold
* key, and sometimes acts as an M-of-M threshold key. A key list is always an M-of-M, unless
* specified otherwise in documentation. A key list can have nested key lists or threshold keys.
* Nested key lists are always M-of-M. A key list can have repeated primitive public keys, but all
* repeated keys are only required to sign once.
*
* A Key can contain a ThresholdKey or KeyList, which in turn contain a Key, so this mutual
* recursion would allow nesting arbitrarily deep. A ThresholdKey which contains a list of primitive
* keys has 3 levels: ThresholdKey -> KeyList -> Key. A KeyList which contains several primitive
* keys has 2 levels: KeyList -> Key. A Key with 2 levels of nested ThresholdKeys has 7 levels:
* Key -> ThresholdKey -> KeyList -> Key -> ThresholdKey -> KeyList -> Key.
*
* Each Key should not have more than 46 levels, which implies 15 levels of nested ThresholdKeys.
*
*
* Protobuf type {@code proto.Key}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.Key, Builder> implements
// @@protoc_insertion_point(builder_implements:proto.Key)
com.hedera.hashgraph.sdk.proto.KeyOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.Key.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
@java.lang.Override
public KeyCase
getKeyCase() {
return instance.getKeyCase();
}
public Builder clearKey() {
copyOnWrite();
instance.clearKey();
return this;
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
@java.lang.Override
public boolean hasContractID() {
return instance.hasContractID();
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractID getContractID() {
return instance.getContractID();
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
public Builder setContractID(com.hedera.hashgraph.sdk.proto.ContractID value) {
copyOnWrite();
instance.setContractID(value);
return this;
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
public Builder setContractID(
com.hedera.hashgraph.sdk.proto.ContractID.Builder builderForValue) {
copyOnWrite();
instance.setContractID(builderForValue.build());
return this;
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
public Builder mergeContractID(com.hedera.hashgraph.sdk.proto.ContractID value) {
copyOnWrite();
instance.mergeContractID(value);
return this;
}
/**
*
**
* smart contract instance that is authorized as if it had signed with a key
*
*
* .proto.ContractID contractID = 1;
*/
public Builder clearContractID() {
copyOnWrite();
instance.clearContractID();
return this;
}
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
* @return Whether the ed25519 field is set.
*/
@java.lang.Override
public boolean hasEd25519() {
return instance.hasEd25519();
}
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
* @return The ed25519.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEd25519() {
return instance.getEd25519();
}
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
* @param value The ed25519 to set.
* @return This builder for chaining.
*/
public Builder setEd25519(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setEd25519(value);
return this;
}
/**
*
**
* Ed25519 public key bytes
*
*
* bytes ed25519 = 2;
* @return This builder for chaining.
*/
public Builder clearEd25519() {
copyOnWrite();
instance.clearEd25519();
return this;
}
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
* @return Whether the rSA3072 field is set.
*/
@java.lang.Override
public boolean hasRSA3072() {
return instance.hasRSA3072();
}
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
* @return The rSA3072.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRSA3072() {
return instance.getRSA3072();
}
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
* @param value The rSA3072 to set.
* @return This builder for chaining.
*/
public Builder setRSA3072(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setRSA3072(value);
return this;
}
/**
*
**
* (NOT SUPPORTED) RSA-3072 public key bytes
*
*
* bytes RSA_3072 = 3;
* @return This builder for chaining.
*/
public Builder clearRSA3072() {
copyOnWrite();
instance.clearRSA3072();
return this;
}
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
* @return Whether the eCDSA384 field is set.
*/
@java.lang.Override
public boolean hasECDSA384() {
return instance.hasECDSA384();
}
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
* @return The eCDSA384.
*/
@java.lang.Override
public com.google.protobuf.ByteString getECDSA384() {
return instance.getECDSA384();
}
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
* @param value The eCDSA384 to set.
* @return This builder for chaining.
*/
public Builder setECDSA384(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setECDSA384(value);
return this;
}
/**
*
**
* (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
*
*
* bytes ECDSA_384 = 4;
* @return This builder for chaining.
*/
public Builder clearECDSA384() {
copyOnWrite();
instance.clearECDSA384();
return this;
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
@java.lang.Override
public boolean hasThresholdKey() {
return instance.hasThresholdKey();
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ThresholdKey getThresholdKey() {
return instance.getThresholdKey();
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
public Builder setThresholdKey(com.hedera.hashgraph.sdk.proto.ThresholdKey value) {
copyOnWrite();
instance.setThresholdKey(value);
return this;
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
public Builder setThresholdKey(
com.hedera.hashgraph.sdk.proto.ThresholdKey.Builder builderForValue) {
copyOnWrite();
instance.setThresholdKey(builderForValue.build());
return this;
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
public Builder mergeThresholdKey(com.hedera.hashgraph.sdk.proto.ThresholdKey value) {
copyOnWrite();
instance.mergeThresholdKey(value);
return this;
}
/**
*
**
* a threshold N followed by a list of M keys, any N of which are required to form a valid
* signature
*
*
* .proto.ThresholdKey thresholdKey = 5;
*/
public Builder clearThresholdKey() {
copyOnWrite();
instance.clearThresholdKey();
return this;
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
@java.lang.Override
public boolean hasKeyList() {
return instance.hasKeyList();
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.KeyList getKeyList() {
return instance.getKeyList();
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
public Builder setKeyList(com.hedera.hashgraph.sdk.proto.KeyList value) {
copyOnWrite();
instance.setKeyList(value);
return this;
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
public Builder setKeyList(
com.hedera.hashgraph.sdk.proto.KeyList.Builder builderForValue) {
copyOnWrite();
instance.setKeyList(builderForValue.build());
return this;
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
public Builder mergeKeyList(com.hedera.hashgraph.sdk.proto.KeyList value) {
copyOnWrite();
instance.mergeKeyList(value);
return this;
}
/**
*
**
* A list of Keys of the Key type.
*
*
* .proto.KeyList keyList = 6;
*/
public Builder clearKeyList() {
copyOnWrite();
instance.clearKeyList();
return this;
}
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
* @return Whether the eCDSASecp256k1 field is set.
*/
@java.lang.Override
public boolean hasECDSASecp256K1() {
return instance.hasECDSASecp256K1();
}
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
* @return The eCDSASecp256k1.
*/
@java.lang.Override
public com.google.protobuf.ByteString getECDSASecp256K1() {
return instance.getECDSASecp256K1();
}
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
* @param value The eCDSASecp256k1 to set.
* @return This builder for chaining.
*/
public Builder setECDSASecp256K1(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setECDSASecp256K1(value);
return this;
}
/**
*
**
* Compressed ECDSA(secp256k1) public key bytes
*
*
* bytes ECDSA_secp256k1 = 7;
* @return This builder for chaining.
*/
public Builder clearECDSASecp256K1() {
copyOnWrite();
instance.clearECDSASecp256K1();
return this;
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
@java.lang.Override
public boolean hasDelegatableContractId() {
return instance.hasDelegatableContractId();
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.ContractID getDelegatableContractId() {
return instance.getDelegatableContractId();
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
public Builder setDelegatableContractId(com.hedera.hashgraph.sdk.proto.ContractID value) {
copyOnWrite();
instance.setDelegatableContractId(value);
return this;
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
public Builder setDelegatableContractId(
com.hedera.hashgraph.sdk.proto.ContractID.Builder builderForValue) {
copyOnWrite();
instance.setDelegatableContractId(builderForValue.build());
return this;
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
public Builder mergeDelegatableContractId(com.hedera.hashgraph.sdk.proto.ContractID value) {
copyOnWrite();
instance.mergeDelegatableContractId(value);
return this;
}
/**
*
**
* A smart contract that, if the recipient of the active message frame, should be treated
* as having signed. (Note this does not mean the <i>code being executed in the frame</i>
* will belong to the given contract, since it could be running another contract's code via
* <tt>delegatecall</tt>. So setting this key is a more permissive version of setting the
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*
*
* .proto.ContractID delegatable_contract_id = 8;
*/
public Builder clearDelegatableContractId() {
copyOnWrite();
instance.clearDelegatableContractId();
return this;
}
// @@protoc_insertion_point(builder_scope:proto.Key)
}
@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.Key();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"key_",
"keyCase_",
com.hedera.hashgraph.sdk.proto.ContractID.class,
com.hedera.hashgraph.sdk.proto.ThresholdKey.class,
com.hedera.hashgraph.sdk.proto.KeyList.class,
com.hedera.hashgraph.sdk.proto.ContractID.class,
};
java.lang.String info =
"\u0000\b\u0001\u0000\u0001\b\b\u0000\u0000\u0000\u0001<\u0000\u0002=\u0000\u0003" +
"=\u0000\u0004=\u0000\u0005<\u0000\u0006<\u0000\u0007=\u0000\b<\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.Key.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.Key)
private static final com.hedera.hashgraph.sdk.proto.Key DEFAULT_INSTANCE;
static {
Key defaultInstance = new Key();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
Key.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.Key getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}