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

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

There is a newer version: 2.39.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: basic_types.proto

package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * 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.GeneratedMessageLite< ThresholdKey, ThresholdKey.Builder> implements // @@protoc_insertion_point(message_implements:proto.ThresholdKey) ThresholdKeyOrBuilder { private ThresholdKey() { } 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_; } /** *
   **
   * A valid signature set must have at least this many signatures
   * 
* * uint32 threshold = 1; * @param value The threshold to set. */ private void setThreshold(int value) { threshold_ = value; } /** *
   **
   * A valid signature set must have at least this many signatures
   * 
* * uint32 threshold = 1; */ private void clearThreshold() { threshold_ = 0; } public static final int KEYS_FIELD_NUMBER = 2; private com.hedera.hashgraph.sdk.proto.KeyList keys_; /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; */ @java.lang.Override public boolean hasKeys() { return keys_ != null; } /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.KeyList getKeys() { return keys_ == null ? com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance() : keys_; } /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; */ private void setKeys(com.hedera.hashgraph.sdk.proto.KeyList value) { value.getClass(); keys_ = value; } /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; */ @java.lang.SuppressWarnings({"ReferenceEquality"}) private void mergeKeys(com.hedera.hashgraph.sdk.proto.KeyList value) { value.getClass(); if (keys_ != null && keys_ != com.hedera.hashgraph.sdk.proto.KeyList.getDefaultInstance()) { keys_ = com.hedera.hashgraph.sdk.proto.KeyList.newBuilder(keys_).mergeFrom(value).buildPartial(); } else { keys_ = value; } } /** *
   **
   * List of all the keys that can sign
   * 
* * .proto.KeyList keys = 2; */ private void clearKeys() { keys_ = null; } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.ThresholdKey prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } /** *
   **
   * 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.GeneratedMessageLite.Builder< com.hedera.hashgraph.sdk.proto.ThresholdKey, Builder> implements // @@protoc_insertion_point(builder_implements:proto.ThresholdKey) com.hedera.hashgraph.sdk.proto.ThresholdKeyOrBuilder { // Construct using com.hedera.hashgraph.sdk.proto.ThresholdKey.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     **
     * A valid signature set must have at least this many signatures
     * 
* * uint32 threshold = 1; * @return The threshold. */ @java.lang.Override public int getThreshold() { return instance.getThreshold(); } /** *
     **
     * 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) { copyOnWrite(); instance.setThreshold(value); return this; } /** *
     **
     * A valid signature set must have at least this many signatures
     * 
* * uint32 threshold = 1; * @return This builder for chaining. */ public Builder clearThreshold() { copyOnWrite(); instance.clearThreshold(); return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ @java.lang.Override public boolean hasKeys() { return instance.hasKeys(); } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.KeyList getKeys() { return instance.getKeys(); } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder setKeys(com.hedera.hashgraph.sdk.proto.KeyList value) { copyOnWrite(); instance.setKeys(value); return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder setKeys( com.hedera.hashgraph.sdk.proto.KeyList.Builder builderForValue) { copyOnWrite(); instance.setKeys(builderForValue.build()); return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder mergeKeys(com.hedera.hashgraph.sdk.proto.KeyList value) { copyOnWrite(); instance.mergeKeys(value); return this; } /** *
     **
     * List of all the keys that can sign
     * 
* * .proto.KeyList keys = 2; */ public Builder clearKeys() { copyOnWrite(); instance.clearKeys(); return this; } // @@protoc_insertion_point(builder_scope:proto.ThresholdKey) } @java.lang.Override @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) protected final java.lang.Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.hedera.hashgraph.sdk.proto.ThresholdKey(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "threshold_", "keys_", }; java.lang.String info = "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u000b\u0002\t" + ""; return newMessageInfo(DEFAULT_INSTANCE, info, objects); } // fall through case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { com.google.protobuf.Parser parser = PARSER; if (parser == null) { synchronized (com.hedera.hashgraph.sdk.proto.ThresholdKey.class) { parser = PARSER; if (parser == null) { parser = new DefaultInstanceBasedParser( DEFAULT_INSTANCE); PARSER = parser; } } } return parser; } case GET_MEMOIZED_IS_INITIALIZED: { return (byte) 1; } case SET_MEMOIZED_IS_INITIALIZED: { return null; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:proto.ThresholdKey) private static final com.hedera.hashgraph.sdk.proto.ThresholdKey DEFAULT_INSTANCE; static { ThresholdKey defaultInstance = new ThresholdKey(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( ThresholdKey.class, defaultInstance); } public static com.hedera.hashgraph.sdk.proto.ThresholdKey getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy