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

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

There is a newer version: 2.40.0
Show 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.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.Key) KeyOrBuilder { private static final long serialVersionUID = 0L; // Use Key.newBuilder() to construct. private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Key() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Key(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_Key_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.Key.class, com.hedera.hashgraph.sdk.proto.Key.Builder.class); } private int keyCase_ = 0; @SuppressWarnings("serial") private java.lang.Object key_; public enum KeyCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { 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; } /** * @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 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; } }; public KeyCase getKeyCase() { return KeyCase.forNumber( keyCase_); } 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; * @return Whether the contractID field is set. */ @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; * @return The contractID. */ @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; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder getContractIDOrBuilder() { if (keyCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.ContractID) key_; } return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance(); } 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; } 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; } 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; } 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; * @return Whether the thresholdKey field is set. */ @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; * @return The thresholdKey. */ @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; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ThresholdKeyOrBuilder getThresholdKeyOrBuilder() { if (keyCase_ == 5) { return (com.hedera.hashgraph.sdk.proto.ThresholdKey) key_; } return com.hedera.hashgraph.sdk.proto.ThresholdKey.getDefaultInstance(); } public static final int KEYLIST_FIELD_NUMBER = 6; /** *
   **
   * A list of Keys of the Key type.
   * 
* * .proto.KeyList keyList = 6; * @return Whether the keyList field is set. */ @java.lang.Override public boolean hasKeyList() { return keyCase_ == 6; } /** *
   **
   * A list of Keys of the Key type.
   * 
* * .proto.KeyList keyList = 6; * @return The keyList. */ @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; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.KeyListOrBuilder getKeyListOrBuilder() { if (keyCase_ == 6) { return (com.hedera.hashgraph.sdk.proto.KeyList) key_; } return com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance(); } 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; } 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; * @return Whether the delegatableContractId field is set. */ @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; * @return The delegatableContractId. */ @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; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder getDelegatableContractIdOrBuilder() { if (keyCase_ == 8) { return (com.hedera.hashgraph.sdk.proto.ContractID) key_; } return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance(); } 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 (keyCase_ == 1) { output.writeMessage(1, (com.hedera.hashgraph.sdk.proto.ContractID) key_); } if (keyCase_ == 2) { output.writeBytes( 2, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 3) { output.writeBytes( 3, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 4) { output.writeBytes( 4, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 5) { output.writeMessage(5, (com.hedera.hashgraph.sdk.proto.ThresholdKey) key_); } if (keyCase_ == 6) { output.writeMessage(6, (com.hedera.hashgraph.sdk.proto.KeyList) key_); } if (keyCase_ == 7) { output.writeBytes( 7, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 8) { output.writeMessage(8, (com.hedera.hashgraph.sdk.proto.ContractID) key_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (keyCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.hedera.hashgraph.sdk.proto.ContractID) key_); } if (keyCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 2, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 3, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 4, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (com.hedera.hashgraph.sdk.proto.ThresholdKey) key_); } if (keyCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (com.hedera.hashgraph.sdk.proto.KeyList) key_); } if (keyCase_ == 7) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 7, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 8) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, (com.hedera.hashgraph.sdk.proto.ContractID) key_); } 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.Key)) { return super.equals(obj); } com.hedera.hashgraph.sdk.proto.Key other = (com.hedera.hashgraph.sdk.proto.Key) obj; if (!getKeyCase().equals(other.getKeyCase())) return false; switch (keyCase_) { case 1: if (!getContractID() .equals(other.getContractID())) return false; break; case 2: if (!getEd25519() .equals(other.getEd25519())) return false; break; case 3: if (!getRSA3072() .equals(other.getRSA3072())) return false; break; case 4: if (!getECDSA384() .equals(other.getECDSA384())) return false; break; case 5: if (!getThresholdKey() .equals(other.getThresholdKey())) return false; break; case 6: if (!getKeyList() .equals(other.getKeyList())) return false; break; case 7: if (!getECDSASecp256K1() .equals(other.getECDSASecp256K1())) return false; break; case 8: if (!getDelegatableContractId() .equals(other.getDelegatableContractId())) 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(); switch (keyCase_) { case 1: hash = (37 * hash) + CONTRACTID_FIELD_NUMBER; hash = (53 * hash) + getContractID().hashCode(); break; case 2: hash = (37 * hash) + ED25519_FIELD_NUMBER; hash = (53 * hash) + getEd25519().hashCode(); break; case 3: hash = (37 * hash) + RSA_3072_FIELD_NUMBER; hash = (53 * hash) + getRSA3072().hashCode(); break; case 4: hash = (37 * hash) + ECDSA_384_FIELD_NUMBER; hash = (53 * hash) + getECDSA384().hashCode(); break; case 5: hash = (37 * hash) + THRESHOLDKEY_FIELD_NUMBER; hash = (53 * hash) + getThresholdKey().hashCode(); break; case 6: hash = (37 * hash) + KEYLIST_FIELD_NUMBER; hash = (53 * hash) + getKeyList().hashCode(); break; case 7: hash = (37 * hash) + ECDSA_SECP256K1_FIELD_NUMBER; hash = (53 * hash) + getECDSASecp256K1().hashCode(); break; case 8: hash = (37 * hash) + DELEGATABLE_CONTRACT_ID_FIELD_NUMBER; hash = (53 * hash) + getDelegatableContractId().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hashgraph.sdk.proto.Key parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.Key parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.Key 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.Key parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, 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.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.Key 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.Key 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.Key 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.Key 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; } /** *
   **
   * 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.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.Key) com.hedera.hashgraph.sdk.proto.KeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_Key_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.Key.class, com.hedera.hashgraph.sdk.proto.Key.Builder.class); } // Construct using com.hedera.hashgraph.sdk.proto.Key.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (contractIDBuilder_ != null) { contractIDBuilder_.clear(); } if (thresholdKeyBuilder_ != null) { thresholdKeyBuilder_.clear(); } if (keyListBuilder_ != null) { keyListBuilder_.clear(); } if (delegatableContractIdBuilder_ != null) { delegatableContractIdBuilder_.clear(); } keyCase_ = 0; key_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hedera.hashgraph.sdk.proto.BasicTypes.internal_static_proto_Key_descriptor; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.Key getDefaultInstanceForType() { return com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance(); } @java.lang.Override public com.hedera.hashgraph.sdk.proto.Key build() { com.hedera.hashgraph.sdk.proto.Key result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.Key buildPartial() { com.hedera.hashgraph.sdk.proto.Key result = new com.hedera.hashgraph.sdk.proto.Key(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.hedera.hashgraph.sdk.proto.Key result) { int from_bitField0_ = bitField0_; } private void buildPartialOneofs(com.hedera.hashgraph.sdk.proto.Key result) { result.keyCase_ = keyCase_; result.key_ = this.key_; if (keyCase_ == 1 && contractIDBuilder_ != null) { result.key_ = contractIDBuilder_.build(); } if (keyCase_ == 5 && thresholdKeyBuilder_ != null) { result.key_ = thresholdKeyBuilder_.build(); } if (keyCase_ == 6 && keyListBuilder_ != null) { result.key_ = keyListBuilder_.build(); } if (keyCase_ == 8 && delegatableContractIdBuilder_ != null) { result.key_ = delegatableContractIdBuilder_.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.Key) { return mergeFrom((com.hedera.hashgraph.sdk.proto.Key)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.Key other) { if (other == com.hedera.hashgraph.sdk.proto.Key.getDefaultInstance()) return this; switch (other.getKeyCase()) { case CONTRACTID: { mergeContractID(other.getContractID()); break; } case ED25519: { setEd25519(other.getEd25519()); break; } case RSA_3072: { setRSA3072(other.getRSA3072()); break; } case ECDSA_384: { setECDSA384(other.getECDSA384()); break; } case THRESHOLDKEY: { mergeThresholdKey(other.getThresholdKey()); break; } case KEYLIST: { mergeKeyList(other.getKeyList()); break; } case ECDSA_SECP256K1: { setECDSASecp256K1(other.getECDSASecp256K1()); break; } case DELEGATABLE_CONTRACT_ID: { mergeDelegatableContractId(other.getDelegatableContractId()); break; } case KEY_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( getContractIDFieldBuilder().getBuilder(), extensionRegistry); keyCase_ = 1; break; } // case 10 case 18: { key_ = input.readBytes(); keyCase_ = 2; break; } // case 18 case 26: { key_ = input.readBytes(); keyCase_ = 3; break; } // case 26 case 34: { key_ = input.readBytes(); keyCase_ = 4; break; } // case 34 case 42: { input.readMessage( getThresholdKeyFieldBuilder().getBuilder(), extensionRegistry); keyCase_ = 5; break; } // case 42 case 50: { input.readMessage( getKeyListFieldBuilder().getBuilder(), extensionRegistry); keyCase_ = 6; break; } // case 50 case 58: { key_ = input.readBytes(); keyCase_ = 7; break; } // case 58 case 66: { input.readMessage( getDelegatableContractIdFieldBuilder().getBuilder(), extensionRegistry); keyCase_ = 8; break; } // case 66 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 keyCase_ = 0; private java.lang.Object key_; public KeyCase getKeyCase() { return KeyCase.forNumber( keyCase_); } public Builder clearKey() { keyCase_ = 0; key_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder> contractIDBuilder_; /** *
     **
     * smart contract instance that is authorized as if it had signed with a key
     * 
* * .proto.ContractID contractID = 1; * @return Whether the contractID field is set. */ @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; * @return The contractID. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ContractID getContractID() { if (contractIDBuilder_ == null) { if (keyCase_ == 1) { return (com.hedera.hashgraph.sdk.proto.ContractID) key_; } return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance(); } else { if (keyCase_ == 1) { return contractIDBuilder_.getMessage(); } 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; */ public Builder setContractID(com.hedera.hashgraph.sdk.proto.ContractID value) { if (contractIDBuilder_ == null) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); } else { contractIDBuilder_.setMessage(value); } keyCase_ = 1; 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) { if (contractIDBuilder_ == null) { key_ = builderForValue.build(); onChanged(); } else { contractIDBuilder_.setMessage(builderForValue.build()); } keyCase_ = 1; 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) { if (contractIDBuilder_ == null) { 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; } onChanged(); } else { if (keyCase_ == 1) { contractIDBuilder_.mergeFrom(value); } else { contractIDBuilder_.setMessage(value); } } keyCase_ = 1; return this; } /** *
     **
     * smart contract instance that is authorized as if it had signed with a key
     * 
* * .proto.ContractID contractID = 1; */ public Builder clearContractID() { if (contractIDBuilder_ == null) { if (keyCase_ == 1) { keyCase_ = 0; key_ = null; onChanged(); } } else { if (keyCase_ == 1) { keyCase_ = 0; key_ = null; } contractIDBuilder_.clear(); } return this; } /** *
     **
     * smart contract instance that is authorized as if it had signed with a key
     * 
* * .proto.ContractID contractID = 1; */ public com.hedera.hashgraph.sdk.proto.ContractID.Builder getContractIDBuilder() { return getContractIDFieldBuilder().getBuilder(); } /** *
     **
     * 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.ContractIDOrBuilder getContractIDOrBuilder() { if ((keyCase_ == 1) && (contractIDBuilder_ != null)) { return contractIDBuilder_.getMessageOrBuilder(); } else { 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 com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder> getContractIDFieldBuilder() { if (contractIDBuilder_ == null) { if (!(keyCase_ == 1)) { key_ = com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance(); } contractIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder>( (com.hedera.hashgraph.sdk.proto.ContractID) key_, getParentForChildren(), isClean()); key_ = null; } keyCase_ = 1; onChanged(); return contractIDBuilder_; } /** *
     **
     * Ed25519 public key bytes
     * 
* * bytes ed25519 = 2; * @return Whether the ed25519 field is set. */ public boolean hasEd25519() { return keyCase_ == 2; } /** *
     **
     * Ed25519 public key bytes
     * 
* * bytes ed25519 = 2; * @return The ed25519. */ 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. * @return This builder for chaining. */ public Builder setEd25519(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } keyCase_ = 2; key_ = value; onChanged(); return this; } /** *
     **
     * Ed25519 public key bytes
     * 
* * bytes ed25519 = 2; * @return This builder for chaining. */ public Builder clearEd25519() { if (keyCase_ == 2) { keyCase_ = 0; key_ = null; onChanged(); } return this; } /** *
     **
     * (NOT SUPPORTED) RSA-3072 public key bytes
     * 
* * bytes RSA_3072 = 3; * @return Whether the rSA3072 field is set. */ public boolean hasRSA3072() { return keyCase_ == 3; } /** *
     **
     * (NOT SUPPORTED) RSA-3072 public key bytes
     * 
* * bytes RSA_3072 = 3; * @return The rSA3072. */ 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. * @return This builder for chaining. */ public Builder setRSA3072(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } keyCase_ = 3; key_ = value; onChanged(); return this; } /** *
     **
     * (NOT SUPPORTED) RSA-3072 public key bytes
     * 
* * bytes RSA_3072 = 3; * @return This builder for chaining. */ public Builder clearRSA3072() { if (keyCase_ == 3) { keyCase_ = 0; key_ = null; onChanged(); } return this; } /** *
     **
     * (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
     * 
* * bytes ECDSA_384 = 4; * @return Whether the eCDSA384 field is set. */ public boolean hasECDSA384() { return keyCase_ == 4; } /** *
     **
     * (NOT SUPPORTED) ECDSA with the p-384 curve public key bytes
     * 
* * bytes ECDSA_384 = 4; * @return The eCDSA384. */ 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. * @return This builder for chaining. */ public Builder setECDSA384(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } keyCase_ = 4; key_ = value; onChanged(); 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() { if (keyCase_ == 4) { keyCase_ = 0; key_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ThresholdKey, com.hedera.hashgraph.sdk.proto.ThresholdKey.Builder, com.hedera.hashgraph.sdk.proto.ThresholdKeyOrBuilder> thresholdKeyBuilder_; /** *
     **
     * 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; * @return Whether the thresholdKey field is set. */ @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; * @return The thresholdKey. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ThresholdKey getThresholdKey() { if (thresholdKeyBuilder_ == null) { if (keyCase_ == 5) { return (com.hedera.hashgraph.sdk.proto.ThresholdKey) key_; } return com.hedera.hashgraph.sdk.proto.ThresholdKey.getDefaultInstance(); } else { if (keyCase_ == 5) { return thresholdKeyBuilder_.getMessage(); } 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; */ public Builder setThresholdKey(com.hedera.hashgraph.sdk.proto.ThresholdKey value) { if (thresholdKeyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); } else { thresholdKeyBuilder_.setMessage(value); } keyCase_ = 5; 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) { if (thresholdKeyBuilder_ == null) { key_ = builderForValue.build(); onChanged(); } else { thresholdKeyBuilder_.setMessage(builderForValue.build()); } keyCase_ = 5; 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) { if (thresholdKeyBuilder_ == null) { 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; } onChanged(); } else { if (keyCase_ == 5) { thresholdKeyBuilder_.mergeFrom(value); } else { thresholdKeyBuilder_.setMessage(value); } } keyCase_ = 5; 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() { if (thresholdKeyBuilder_ == null) { if (keyCase_ == 5) { keyCase_ = 0; key_ = null; onChanged(); } } else { if (keyCase_ == 5) { keyCase_ = 0; key_ = null; } thresholdKeyBuilder_.clear(); } 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 com.hedera.hashgraph.sdk.proto.ThresholdKey.Builder getThresholdKeyBuilder() { return getThresholdKeyFieldBuilder().getBuilder(); } /** *
     **
     * 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.ThresholdKeyOrBuilder getThresholdKeyOrBuilder() { if ((keyCase_ == 5) && (thresholdKeyBuilder_ != null)) { return thresholdKeyBuilder_.getMessageOrBuilder(); } else { 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 com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ThresholdKey, com.hedera.hashgraph.sdk.proto.ThresholdKey.Builder, com.hedera.hashgraph.sdk.proto.ThresholdKeyOrBuilder> getThresholdKeyFieldBuilder() { if (thresholdKeyBuilder_ == null) { if (!(keyCase_ == 5)) { key_ = com.hedera.hashgraph.sdk.proto.ThresholdKey.getDefaultInstance(); } thresholdKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ThresholdKey, com.hedera.hashgraph.sdk.proto.ThresholdKey.Builder, com.hedera.hashgraph.sdk.proto.ThresholdKeyOrBuilder>( (com.hedera.hashgraph.sdk.proto.ThresholdKey) key_, getParentForChildren(), isClean()); key_ = null; } keyCase_ = 5; onChanged(); return thresholdKeyBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.KeyList, com.hedera.hashgraph.sdk.proto.KeyList.Builder, com.hedera.hashgraph.sdk.proto.KeyListOrBuilder> keyListBuilder_; /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; * @return Whether the keyList field is set. */ @java.lang.Override public boolean hasKeyList() { return keyCase_ == 6; } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; * @return The keyList. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.KeyList getKeyList() { if (keyListBuilder_ == null) { if (keyCase_ == 6) { return (com.hedera.hashgraph.sdk.proto.KeyList) key_; } return com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance(); } else { if (keyCase_ == 6) { return keyListBuilder_.getMessage(); } return com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance(); } } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ public Builder setKeyList(com.hedera.hashgraph.sdk.proto.KeyList value) { if (keyListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); } else { keyListBuilder_.setMessage(value); } keyCase_ = 6; 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) { if (keyListBuilder_ == null) { key_ = builderForValue.build(); onChanged(); } else { keyListBuilder_.setMessage(builderForValue.build()); } keyCase_ = 6; return this; } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ public Builder mergeKeyList(com.hedera.hashgraph.sdk.proto.KeyList value) { if (keyListBuilder_ == null) { 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; } onChanged(); } else { if (keyCase_ == 6) { keyListBuilder_.mergeFrom(value); } else { keyListBuilder_.setMessage(value); } } keyCase_ = 6; return this; } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ public Builder clearKeyList() { if (keyListBuilder_ == null) { if (keyCase_ == 6) { keyCase_ = 0; key_ = null; onChanged(); } } else { if (keyCase_ == 6) { keyCase_ = 0; key_ = null; } keyListBuilder_.clear(); } return this; } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ public com.hedera.hashgraph.sdk.proto.KeyList.Builder getKeyListBuilder() { return getKeyListFieldBuilder().getBuilder(); } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.KeyListOrBuilder getKeyListOrBuilder() { if ((keyCase_ == 6) && (keyListBuilder_ != null)) { return keyListBuilder_.getMessageOrBuilder(); } else { 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 com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.KeyList, com.hedera.hashgraph.sdk.proto.KeyList.Builder, com.hedera.hashgraph.sdk.proto.KeyListOrBuilder> getKeyListFieldBuilder() { if (keyListBuilder_ == null) { if (!(keyCase_ == 6)) { key_ = com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance(); } keyListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.KeyList, com.hedera.hashgraph.sdk.proto.KeyList.Builder, com.hedera.hashgraph.sdk.proto.KeyListOrBuilder>( (com.hedera.hashgraph.sdk.proto.KeyList) key_, getParentForChildren(), isClean()); key_ = null; } keyCase_ = 6; onChanged(); return keyListBuilder_; } /** *
     **
     * Compressed ECDSA(secp256k1) public key bytes
     * 
* * bytes ECDSA_secp256k1 = 7; * @return Whether the eCDSASecp256k1 field is set. */ public boolean hasECDSASecp256K1() { return keyCase_ == 7; } /** *
     **
     * Compressed ECDSA(secp256k1) public key bytes
     * 
* * bytes ECDSA_secp256k1 = 7; * @return The eCDSASecp256k1. */ 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. * @return This builder for chaining. */ public Builder setECDSASecp256K1(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } keyCase_ = 7; key_ = value; onChanged(); return this; } /** *
     **
     * Compressed ECDSA(secp256k1) public key bytes
     * 
* * bytes ECDSA_secp256k1 = 7; * @return This builder for chaining. */ public Builder clearECDSASecp256K1() { if (keyCase_ == 7) { keyCase_ = 0; key_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder> delegatableContractIdBuilder_; /** *
     **
     * 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; * @return Whether the delegatableContractId field is set. */ @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; * @return The delegatableContractId. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.ContractID getDelegatableContractId() { if (delegatableContractIdBuilder_ == null) { if (keyCase_ == 8) { return (com.hedera.hashgraph.sdk.proto.ContractID) key_; } return com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance(); } else { if (keyCase_ == 8) { return delegatableContractIdBuilder_.getMessage(); } 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; */ public Builder setDelegatableContractId(com.hedera.hashgraph.sdk.proto.ContractID value) { if (delegatableContractIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); } else { delegatableContractIdBuilder_.setMessage(value); } keyCase_ = 8; 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) { if (delegatableContractIdBuilder_ == null) { key_ = builderForValue.build(); onChanged(); } else { delegatableContractIdBuilder_.setMessage(builderForValue.build()); } keyCase_ = 8; 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) { if (delegatableContractIdBuilder_ == null) { 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; } onChanged(); } else { if (keyCase_ == 8) { delegatableContractIdBuilder_.mergeFrom(value); } else { delegatableContractIdBuilder_.setMessage(value); } } keyCase_ = 8; 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() { if (delegatableContractIdBuilder_ == null) { if (keyCase_ == 8) { keyCase_ = 0; key_ = null; onChanged(); } } else { if (keyCase_ == 8) { keyCase_ = 0; key_ = null; } delegatableContractIdBuilder_.clear(); } 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 com.hedera.hashgraph.sdk.proto.ContractID.Builder getDelegatableContractIdBuilder() { return getDelegatableContractIdFieldBuilder().getBuilder(); } /** *
     **
     * 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.ContractIDOrBuilder getDelegatableContractIdOrBuilder() { if ((keyCase_ == 8) && (delegatableContractIdBuilder_ != null)) { return delegatableContractIdBuilder_.getMessageOrBuilder(); } else { 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 com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder> getDelegatableContractIdFieldBuilder() { if (delegatableContractIdBuilder_ == null) { if (!(keyCase_ == 8)) { key_ = com.hedera.hashgraph.sdk.proto.ContractID.getDefaultInstance(); } delegatableContractIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.ContractID, com.hedera.hashgraph.sdk.proto.ContractID.Builder, com.hedera.hashgraph.sdk.proto.ContractIDOrBuilder>( (com.hedera.hashgraph.sdk.proto.ContractID) key_, getParentForChildren(), isClean()); key_ = null; } keyCase_ = 8; onChanged(); return delegatableContractIdBuilder_; } @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.Key) } // @@protoc_insertion_point(class_scope:proto.Key) private static final com.hedera.hashgraph.sdk.proto.Key DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.Key(); } public static com.hedera.hashgraph.sdk.proto.Key getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Key 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.Key getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy