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

com.hederahashgraph.api.proto.java.ThresholdKey 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 set of public keys that are used together to form a threshold signature.  If the threshold is N
 * and there are M keys, then this is an N of M threshold signature. If an account is associated
 * with ThresholdKeys, then a transaction to move cryptocurrency out of it must be signed by a list
 * of M signatures, where at most M-N of them are blank, and the other at least N of them are valid
 * signatures corresponding to at least N of the public keys listed here.
 * 
* * Protobuf type {@code proto.ThresholdKey} */ public final class ThresholdKey extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.ThresholdKey) ThresholdKeyOrBuilder { private static final long serialVersionUID = 0L; // Use ThresholdKey.newBuilder() to construct. private ThresholdKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ThresholdKey() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ThresholdKey(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ThresholdKey( 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 8: { threshold_ = input.readUInt32(); break; } case 18: { com.hederahashgraph.api.proto.java.KeyList.Builder subBuilder = null; if (keys_ != null) { subBuilder = keys_.toBuilder(); } keys_ = input.readMessage(com.hederahashgraph.api.proto.java.KeyList.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(keys_); keys_ = subBuilder.buildPartial(); } 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_ThresholdKey_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ThresholdKey_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.ThresholdKey.class, com.hederahashgraph.api.proto.java.ThresholdKey.Builder.class); } public static final int THRESHOLD_FIELD_NUMBER = 1; private int threshold_; /** *
   **
   * A valid signature set must have at least this many signatures
   * 
* * uint32 threshold = 1; * @return The threshold. */ @java.lang.Override public int getThreshold() { return threshold_; } public static final int KEYS_FIELD_NUMBER = 2; private com.hederahashgraph.api.proto.java.KeyList keys_; /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; * @return Whether the keys field is set. */ @java.lang.Override public boolean hasKeys() { return keys_ != null; } /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; * @return The keys. */ @java.lang.Override public com.hederahashgraph.api.proto.java.KeyList getKeys() { return keys_ == null ? com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance() : keys_; } /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; */ @java.lang.Override public com.hederahashgraph.api.proto.java.KeyListOrBuilder getKeysOrBuilder() { return getKeys(); } 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 (threshold_ != 0) { output.writeUInt32(1, threshold_); } if (keys_ != null) { output.writeMessage(2, getKeys()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (threshold_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, threshold_); } if (keys_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getKeys()); } 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.ThresholdKey)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.ThresholdKey other = (com.hederahashgraph.api.proto.java.ThresholdKey) obj; if (getThreshold() != other.getThreshold()) return false; if (hasKeys() != other.hasKeys()) return false; if (hasKeys()) { if (!getKeys() .equals(other.getKeys())) return false; } 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(); hash = (37 * hash) + THRESHOLD_FIELD_NUMBER; hash = (53 * hash) + getThreshold(); if (hasKeys()) { hash = (37 * hash) + KEYS_FIELD_NUMBER; hash = (53 * hash) + getKeys().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.ThresholdKey parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.ThresholdKey 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.ThresholdKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.ThresholdKey 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.ThresholdKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.ThresholdKey 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.ThresholdKey parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.ThresholdKey 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.ThresholdKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.ThresholdKey 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.ThresholdKey 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.ThresholdKey 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.ThresholdKey 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 set of public keys that are used together to form a threshold signature.  If the threshold is N
   * and there are M keys, then this is an N of M threshold signature. If an account is associated
   * with ThresholdKeys, then a transaction to move cryptocurrency out of it must be signed by a list
   * of M signatures, where at most M-N of them are blank, and the other at least N of them are valid
   * signatures corresponding to at least N of the public keys listed here.
   * 
* * Protobuf type {@code proto.ThresholdKey} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.ThresholdKey) com.hederahashgraph.api.proto.java.ThresholdKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ThresholdKey_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ThresholdKey_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.ThresholdKey.class, com.hederahashgraph.api.proto.java.ThresholdKey.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.ThresholdKey.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(); threshold_ = 0; if (keysBuilder_ == null) { keys_ = null; } else { keys_ = null; keysBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ThresholdKey_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.ThresholdKey getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.ThresholdKey.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.ThresholdKey build() { com.hederahashgraph.api.proto.java.ThresholdKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.ThresholdKey buildPartial() { com.hederahashgraph.api.proto.java.ThresholdKey result = new com.hederahashgraph.api.proto.java.ThresholdKey(this); result.threshold_ = threshold_; if (keysBuilder_ == null) { result.keys_ = keys_; } else { result.keys_ = keysBuilder_.build(); } 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.ThresholdKey) { return mergeFrom((com.hederahashgraph.api.proto.java.ThresholdKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.ThresholdKey other) { if (other == com.hederahashgraph.api.proto.java.ThresholdKey.getDefaultInstance()) return this; if (other.getThreshold() != 0) { setThreshold(other.getThreshold()); } if (other.hasKeys()) { mergeKeys(other.getKeys()); } 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.ThresholdKey parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.ThresholdKey) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int threshold_ ; /** *
     **
     * A valid signature set must have at least this many signatures
     * 
* * uint32 threshold = 1; * @return The threshold. */ @java.lang.Override public int getThreshold() { return threshold_; } /** *
     **
     * A valid signature set must have at least this many signatures
     * 
* * uint32 threshold = 1; * @param value The threshold to set. * @return This builder for chaining. */ public Builder setThreshold(int value) { threshold_ = value; onChanged(); return this; } /** *
     **
     * A valid signature set must have at least this many signatures
     * 
* * uint32 threshold = 1; * @return This builder for chaining. */ public Builder clearThreshold() { threshold_ = 0; onChanged(); return this; } private com.hederahashgraph.api.proto.java.KeyList keys_; private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder> keysBuilder_; /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; * @return Whether the keys field is set. */ public boolean hasKeys() { return keysBuilder_ != null || keys_ != null; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; * @return The keys. */ public com.hederahashgraph.api.proto.java.KeyList getKeys() { if (keysBuilder_ == null) { return keys_ == null ? com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance() : keys_; } else { return keysBuilder_.getMessage(); } } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder setKeys(com.hederahashgraph.api.proto.java.KeyList value) { if (keysBuilder_ == null) { if (value == null) { throw new NullPointerException(); } keys_ = value; onChanged(); } else { keysBuilder_.setMessage(value); } return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder setKeys( com.hederahashgraph.api.proto.java.KeyList.Builder builderForValue) { if (keysBuilder_ == null) { keys_ = builderForValue.build(); onChanged(); } else { keysBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder mergeKeys(com.hederahashgraph.api.proto.java.KeyList value) { if (keysBuilder_ == null) { if (keys_ != null) { keys_ = com.hederahashgraph.api.proto.java.KeyList.newBuilder(keys_).mergeFrom(value).buildPartial(); } else { keys_ = value; } onChanged(); } else { keysBuilder_.mergeFrom(value); } return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder clearKeys() { if (keysBuilder_ == null) { keys_ = null; onChanged(); } else { keys_ = null; keysBuilder_ = null; } return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public com.hederahashgraph.api.proto.java.KeyList.Builder getKeysBuilder() { onChanged(); return getKeysFieldBuilder().getBuilder(); } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public com.hederahashgraph.api.proto.java.KeyListOrBuilder getKeysOrBuilder() { if (keysBuilder_ != null) { return keysBuilder_.getMessageOrBuilder(); } else { return keys_ == null ? com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance() : keys_; } } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder> getKeysFieldBuilder() { if (keysBuilder_ == null) { keysBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder>( getKeys(), getParentForChildren(), isClean()); keys_ = null; } return keysBuilder_; } @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.ThresholdKey) } // @@protoc_insertion_point(class_scope:proto.ThresholdKey) private static final com.hederahashgraph.api.proto.java.ThresholdKey DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.ThresholdKey(); } public static com.hederahashgraph.api.proto.java.ThresholdKey getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ThresholdKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ThresholdKey(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.ThresholdKey getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy