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

com.hederahashgraph.api.proto.java.Key Maven / Gradle / Ivy

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

package com.hederahashgraph.api.proto.java;

/**
 * 
 **
 * 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(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Key( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.hederahashgraph.api.proto.java.ContractID.Builder subBuilder = null; if (keyCase_ == 1) { subBuilder = ((com.hederahashgraph.api.proto.java.ContractID) key_).toBuilder(); } key_ = input.readMessage(com.hederahashgraph.api.proto.java.ContractID.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.ContractID) key_); key_ = subBuilder.buildPartial(); } keyCase_ = 1; break; } case 18: { keyCase_ = 2; key_ = input.readBytes(); break; } case 26: { keyCase_ = 3; key_ = input.readBytes(); break; } case 34: { keyCase_ = 4; key_ = input.readBytes(); break; } case 42: { com.hederahashgraph.api.proto.java.ThresholdKey.Builder subBuilder = null; if (keyCase_ == 5) { subBuilder = ((com.hederahashgraph.api.proto.java.ThresholdKey) key_).toBuilder(); } key_ = input.readMessage(com.hederahashgraph.api.proto.java.ThresholdKey.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.ThresholdKey) key_); key_ = subBuilder.buildPartial(); } keyCase_ = 5; break; } case 50: { com.hederahashgraph.api.proto.java.KeyList.Builder subBuilder = null; if (keyCase_ == 6) { subBuilder = ((com.hederahashgraph.api.proto.java.KeyList) key_).toBuilder(); } key_ = input.readMessage(com.hederahashgraph.api.proto.java.KeyList.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.KeyList) key_); key_ = subBuilder.buildPartial(); } keyCase_ = 6; break; } case 58: { keyCase_ = 7; key_ = input.readBytes(); break; } case 66: { com.hederahashgraph.api.proto.java.ContractID.Builder subBuilder = null; if (keyCase_ == 8) { subBuilder = ((com.hederahashgraph.api.proto.java.ContractID) key_).toBuilder(); } key_ = input.readMessage(com.hederahashgraph.api.proto.java.ContractID.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.ContractID) key_); key_ = subBuilder.buildPartial(); } keyCase_ = 8; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_Key_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.Key.class, com.hederahashgraph.api.proto.java.Key.Builder.class); } private int keyCase_ = 0; 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.hederahashgraph.api.proto.java.ContractID getContractID() { if (keyCase_ == 1) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractIDOrBuilder getContractIDOrBuilder() { if (keyCase_ == 1) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKey getThresholdKey() { if (keyCase_ == 5) { return (com.hederahashgraph.api.proto.java.ThresholdKey) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKeyOrBuilder getThresholdKeyOrBuilder() { if (keyCase_ == 5) { return (com.hederahashgraph.api.proto.java.ThresholdKey) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.KeyList getKeyList() { if (keyCase_ == 6) { return (com.hederahashgraph.api.proto.java.KeyList) key_; } return com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance(); } /** *
   **
   * A list of Keys of the Key type.
   * 
* * .proto.KeyList keyList = 6; */ @java.lang.Override public com.hederahashgraph.api.proto.java.KeyListOrBuilder getKeyListOrBuilder() { if (keyCase_ == 6) { return (com.hederahashgraph.api.proto.java.KeyList) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID getDelegatableContractId() { if (keyCase_ == 8) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractIDOrBuilder getDelegatableContractIdOrBuilder() { if (keyCase_ == 8) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKey) key_); } if (keyCase_ == 6) { output.writeMessage(6, (com.hederahashgraph.api.proto.java.KeyList) key_); } if (keyCase_ == 7) { output.writeBytes( 7, (com.google.protobuf.ByteString) key_); } if (keyCase_ == 8) { output.writeMessage(8, (com.hederahashgraph.api.proto.java.ContractID) key_); } unknownFields.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKey) key_); } if (keyCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID) key_); } size += unknownFields.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.hederahashgraph.api.proto.java.Key)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.Key other = (com.hederahashgraph.api.proto.java.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 (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.Key parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.Key parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.Key parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.Key parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.Key parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.Key parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.KeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_Key_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.Key.class, com.hederahashgraph.api.proto.java.Key.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.Key.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); keyCase_ = 0; key_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_Key_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.Key getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.Key.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.Key build() { com.hederahashgraph.api.proto.java.Key result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.Key buildPartial() { com.hederahashgraph.api.proto.java.Key result = new com.hederahashgraph.api.proto.java.Key(this); if (keyCase_ == 1) { if (contractIDBuilder_ == null) { result.key_ = key_; } else { result.key_ = contractIDBuilder_.build(); } } if (keyCase_ == 2) { result.key_ = key_; } if (keyCase_ == 3) { result.key_ = key_; } if (keyCase_ == 4) { result.key_ = key_; } if (keyCase_ == 5) { if (thresholdKeyBuilder_ == null) { result.key_ = key_; } else { result.key_ = thresholdKeyBuilder_.build(); } } if (keyCase_ == 6) { if (keyListBuilder_ == null) { result.key_ = key_; } else { result.key_ = keyListBuilder_.build(); } } if (keyCase_ == 7) { result.key_ = key_; } if (keyCase_ == 8) { if (delegatableContractIdBuilder_ == null) { result.key_ = key_; } else { result.key_ = delegatableContractIdBuilder_.build(); } } result.keyCase_ = keyCase_; onBuilt(); return result; } @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.hederahashgraph.api.proto.java.Key) { return mergeFrom((com.hederahashgraph.api.proto.java.Key)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.Key other) { if (other == com.hederahashgraph.api.proto.java.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.unknownFields); 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 { com.hederahashgraph.api.proto.java.Key parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.Key) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } 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 com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID getContractID() { if (contractIDBuilder_ == null) { if (keyCase_ == 1) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance(); } else { if (keyCase_ == 1) { return contractIDBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance(); } } /** *
     **
     * smart contract instance that is authorized as if it had signed with a key
     * 
* * .proto.ContractID contractID = 1; */ public Builder setContractID(com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID value) { if (contractIDBuilder_ == null) { if (keyCase_ == 1 && key_ != com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance()) { key_ = com.hederahashgraph.api.proto.java.ContractID.newBuilder((com.hederahashgraph.api.proto.java.ContractID) key_) .mergeFrom(value).buildPartial(); } else { key_ = value; } onChanged(); } else { if (keyCase_ == 1) { contractIDBuilder_.mergeFrom(value); } 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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractIDOrBuilder getContractIDOrBuilder() { if ((keyCase_ == 1) && (contractIDBuilder_ != null)) { return contractIDBuilder_.getMessageOrBuilder(); } else { if (keyCase_ == 1) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder> getContractIDFieldBuilder() { if (contractIDBuilder_ == null) { if (!(keyCase_ == 1)) { key_ = com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance(); } contractIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder>( (com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKey, com.hederahashgraph.api.proto.java.ThresholdKey.Builder, com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKey getThresholdKey() { if (thresholdKeyBuilder_ == null) { if (keyCase_ == 5) { return (com.hederahashgraph.api.proto.java.ThresholdKey) key_; } return com.hederahashgraph.api.proto.java.ThresholdKey.getDefaultInstance(); } else { if (keyCase_ == 5) { return thresholdKeyBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKey value) { if (thresholdKeyBuilder_ == null) { if (keyCase_ == 5 && key_ != com.hederahashgraph.api.proto.java.ThresholdKey.getDefaultInstance()) { key_ = com.hederahashgraph.api.proto.java.ThresholdKey.newBuilder((com.hederahashgraph.api.proto.java.ThresholdKey) key_) .mergeFrom(value).buildPartial(); } else { key_ = value; } onChanged(); } else { if (keyCase_ == 5) { thresholdKeyBuilder_.mergeFrom(value); } 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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKeyOrBuilder getThresholdKeyOrBuilder() { if ((keyCase_ == 5) && (thresholdKeyBuilder_ != null)) { return thresholdKeyBuilder_.getMessageOrBuilder(); } else { if (keyCase_ == 5) { return (com.hederahashgraph.api.proto.java.ThresholdKey) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ThresholdKey, com.hederahashgraph.api.proto.java.ThresholdKey.Builder, com.hederahashgraph.api.proto.java.ThresholdKeyOrBuilder> getThresholdKeyFieldBuilder() { if (thresholdKeyBuilder_ == null) { if (!(keyCase_ == 5)) { key_ = com.hederahashgraph.api.proto.java.ThresholdKey.getDefaultInstance(); } thresholdKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.ThresholdKey, com.hederahashgraph.api.proto.java.ThresholdKey.Builder, com.hederahashgraph.api.proto.java.ThresholdKeyOrBuilder>( (com.hederahashgraph.api.proto.java.ThresholdKey) key_, getParentForChildren(), isClean()); key_ = null; } keyCase_ = 5; onChanged();; return thresholdKeyBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.KeyList getKeyList() { if (keyListBuilder_ == null) { if (keyCase_ == 6) { return (com.hederahashgraph.api.proto.java.KeyList) key_; } return com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance(); } else { if (keyCase_ == 6) { return keyListBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance(); } } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ public Builder setKeyList(com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.KeyList value) { if (keyListBuilder_ == null) { if (keyCase_ == 6 && key_ != com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance()) { key_ = com.hederahashgraph.api.proto.java.KeyList.newBuilder((com.hederahashgraph.api.proto.java.KeyList) key_) .mergeFrom(value).buildPartial(); } else { key_ = value; } onChanged(); } else { if (keyCase_ == 6) { keyListBuilder_.mergeFrom(value); } 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.hederahashgraph.api.proto.java.KeyList.Builder getKeyListBuilder() { return getKeyListFieldBuilder().getBuilder(); } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ @java.lang.Override public com.hederahashgraph.api.proto.java.KeyListOrBuilder getKeyListOrBuilder() { if ((keyCase_ == 6) && (keyListBuilder_ != null)) { return keyListBuilder_.getMessageOrBuilder(); } else { if (keyCase_ == 6) { return (com.hederahashgraph.api.proto.java.KeyList) key_; } return com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance(); } } /** *
     **
     * A list of Keys of the Key type.
     * 
* * .proto.KeyList keyList = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder> getKeyListFieldBuilder() { if (keyListBuilder_ == null) { if (!(keyCase_ == 6)) { key_ = com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance(); } keyListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder>( (com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID getDelegatableContractId() { if (delegatableContractIdBuilder_ == null) { if (keyCase_ == 8) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance(); } else { if (keyCase_ == 8) { return delegatableContractIdBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID value) { if (delegatableContractIdBuilder_ == null) { if (keyCase_ == 8 && key_ != com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance()) { key_ = com.hederahashgraph.api.proto.java.ContractID.newBuilder((com.hederahashgraph.api.proto.java.ContractID) key_) .mergeFrom(value).buildPartial(); } else { key_ = value; } onChanged(); } else { if (keyCase_ == 8) { delegatableContractIdBuilder_.mergeFrom(value); } 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.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractIDOrBuilder getDelegatableContractIdOrBuilder() { if ((keyCase_ == 8) && (delegatableContractIdBuilder_ != null)) { return delegatableContractIdBuilder_.getMessageOrBuilder(); } else { if (keyCase_ == 8) { return (com.hederahashgraph.api.proto.java.ContractID) key_; } return com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder> getDelegatableContractIdFieldBuilder() { if (delegatableContractIdBuilder_ == null) { if (!(keyCase_ == 8)) { key_ = com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance(); } delegatableContractIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder>( (com.hederahashgraph.api.proto.java.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.hederahashgraph.api.proto.java.Key DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.Key(); } public static com.hederahashgraph.api.proto.java.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 { return new Key(input, extensionRegistry); } }; 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.hederahashgraph.api.proto.java.Key getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy