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

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

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

package com.hederahashgraph.api.proto.java;

/**
 * 
 **
 * The current state of platform rosters.<br/>
 * This message stores a roster data for the platform in network state.
 * The roster state SHALL encapsulate the incoming candidate roster's hash,
 * and a list of pairs of round number and active roster hash.<br/>
 * This data SHALL be used to track round numbers and the rosters used in determining the consensus.<br/>
 * 
* * Protobuf type {@code com.hedera.hapi.node.state.roster.RosterState} */ public final class RosterState extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:com.hedera.hapi.node.state.roster.RosterState) RosterStateOrBuilder { private static final long serialVersionUID = 0L; // Use RosterState.newBuilder() to construct. private RosterState(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RosterState() { candidateRosterHash_ = com.google.protobuf.ByteString.EMPTY; roundRosterPairs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RosterState(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RosterState( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; 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: { candidateRosterHash_ = input.readBytes(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { roundRosterPairs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } roundRosterPairs_.add( input.readMessage(com.hederahashgraph.api.proto.java.RoundRosterPair.parser(), extensionRegistry)); 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 { if (((mutable_bitField0_ & 0x00000001) != 0)) { roundRosterPairs_ = java.util.Collections.unmodifiableList(roundRosterPairs_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.RosterState.class, com.hederahashgraph.api.proto.java.RosterState.Builder.class); } public static final int CANDIDATE_ROSTER_HASH_FIELD_NUMBER = 1; private com.google.protobuf.ByteString candidateRosterHash_; /** *
   **
   * The SHA-384 hash of a candidate roster.
   * <p>
   * This is the hash of the roster that is currently being considered
   * for adoption.<br/>
   * A Node SHALL NOT, ever, have more than one candidate roster
   * at the same time.
   * 
* * bytes candidate_roster_hash = 1; * @return The candidateRosterHash. */ @java.lang.Override public com.google.protobuf.ByteString getCandidateRosterHash() { return candidateRosterHash_; } public static final int ROUND_ROSTER_PAIRS_FIELD_NUMBER = 2; private java.util.List roundRosterPairs_; /** *
   **
   * A list of round numbers and roster hashes.<br/>
   * The round number indicates the round in which the corresponding roster became active
   * <p>
   * This list SHALL be ordered by round numbers in descending order.
   * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ @java.lang.Override public java.util.List getRoundRosterPairsList() { return roundRosterPairs_; } /** *
   **
   * A list of round numbers and roster hashes.<br/>
   * The round number indicates the round in which the corresponding roster became active
   * <p>
   * This list SHALL be ordered by round numbers in descending order.
   * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ @java.lang.Override public java.util.List getRoundRosterPairsOrBuilderList() { return roundRosterPairs_; } /** *
   **
   * A list of round numbers and roster hashes.<br/>
   * The round number indicates the round in which the corresponding roster became active
   * <p>
   * This list SHALL be ordered by round numbers in descending order.
   * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ @java.lang.Override public int getRoundRosterPairsCount() { return roundRosterPairs_.size(); } /** *
   **
   * A list of round numbers and roster hashes.<br/>
   * The round number indicates the round in which the corresponding roster became active
   * <p>
   * This list SHALL be ordered by round numbers in descending order.
   * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ @java.lang.Override public com.hederahashgraph.api.proto.java.RoundRosterPair getRoundRosterPairs(int index) { return roundRosterPairs_.get(index); } /** *
   **
   * A list of round numbers and roster hashes.<br/>
   * The round number indicates the round in which the corresponding roster became active
   * <p>
   * This list SHALL be ordered by round numbers in descending order.
   * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ @java.lang.Override public com.hederahashgraph.api.proto.java.RoundRosterPairOrBuilder getRoundRosterPairsOrBuilder( int index) { return roundRosterPairs_.get(index); } 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 (!candidateRosterHash_.isEmpty()) { output.writeBytes(1, candidateRosterHash_); } for (int i = 0; i < roundRosterPairs_.size(); i++) { output.writeMessage(2, roundRosterPairs_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!candidateRosterHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, candidateRosterHash_); } for (int i = 0; i < roundRosterPairs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, roundRosterPairs_.get(i)); } 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.RosterState)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.RosterState other = (com.hederahashgraph.api.proto.java.RosterState) obj; if (!getCandidateRosterHash() .equals(other.getCandidateRosterHash())) return false; if (!getRoundRosterPairsList() .equals(other.getRoundRosterPairsList())) 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) + CANDIDATE_ROSTER_HASH_FIELD_NUMBER; hash = (53 * hash) + getCandidateRosterHash().hashCode(); if (getRoundRosterPairsCount() > 0) { hash = (37 * hash) + ROUND_ROSTER_PAIRS_FIELD_NUMBER; hash = (53 * hash) + getRoundRosterPairsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.RosterState parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.RosterState 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.RosterState parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.RosterState 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.RosterState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.RosterState 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.RosterState parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.RosterState 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.RosterState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.RosterState 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.RosterState 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.RosterState 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.RosterState 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; } /** *
   **
   * The current state of platform rosters.<br/>
   * This message stores a roster data for the platform in network state.
   * The roster state SHALL encapsulate the incoming candidate roster's hash,
   * and a list of pairs of round number and active roster hash.<br/>
   * This data SHALL be used to track round numbers and the rosters used in determining the consensus.<br/>
   * 
* * Protobuf type {@code com.hedera.hapi.node.state.roster.RosterState} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:com.hedera.hapi.node.state.roster.RosterState) com.hederahashgraph.api.proto.java.RosterStateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.RosterState.class, com.hederahashgraph.api.proto.java.RosterState.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.RosterState.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getRoundRosterPairsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); candidateRosterHash_ = com.google.protobuf.ByteString.EMPTY; if (roundRosterPairsBuilder_ == null) { roundRosterPairs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { roundRosterPairsBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.RosterState getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.RosterState.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.RosterState build() { com.hederahashgraph.api.proto.java.RosterState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.RosterState buildPartial() { com.hederahashgraph.api.proto.java.RosterState result = new com.hederahashgraph.api.proto.java.RosterState(this); int from_bitField0_ = bitField0_; result.candidateRosterHash_ = candidateRosterHash_; if (roundRosterPairsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { roundRosterPairs_ = java.util.Collections.unmodifiableList(roundRosterPairs_); bitField0_ = (bitField0_ & ~0x00000001); } result.roundRosterPairs_ = roundRosterPairs_; } else { result.roundRosterPairs_ = roundRosterPairsBuilder_.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.RosterState) { return mergeFrom((com.hederahashgraph.api.proto.java.RosterState)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.RosterState other) { if (other == com.hederahashgraph.api.proto.java.RosterState.getDefaultInstance()) return this; if (other.getCandidateRosterHash() != com.google.protobuf.ByteString.EMPTY) { setCandidateRosterHash(other.getCandidateRosterHash()); } if (roundRosterPairsBuilder_ == null) { if (!other.roundRosterPairs_.isEmpty()) { if (roundRosterPairs_.isEmpty()) { roundRosterPairs_ = other.roundRosterPairs_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureRoundRosterPairsIsMutable(); roundRosterPairs_.addAll(other.roundRosterPairs_); } onChanged(); } } else { if (!other.roundRosterPairs_.isEmpty()) { if (roundRosterPairsBuilder_.isEmpty()) { roundRosterPairsBuilder_.dispose(); roundRosterPairsBuilder_ = null; roundRosterPairs_ = other.roundRosterPairs_; bitField0_ = (bitField0_ & ~0x00000001); roundRosterPairsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRoundRosterPairsFieldBuilder() : null; } else { roundRosterPairsBuilder_.addAllMessages(other.roundRosterPairs_); } } } 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.RosterState parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.RosterState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString candidateRosterHash_ = com.google.protobuf.ByteString.EMPTY; /** *
     **
     * The SHA-384 hash of a candidate roster.
     * <p>
     * This is the hash of the roster that is currently being considered
     * for adoption.<br/>
     * A Node SHALL NOT, ever, have more than one candidate roster
     * at the same time.
     * 
* * bytes candidate_roster_hash = 1; * @return The candidateRosterHash. */ @java.lang.Override public com.google.protobuf.ByteString getCandidateRosterHash() { return candidateRosterHash_; } /** *
     **
     * The SHA-384 hash of a candidate roster.
     * <p>
     * This is the hash of the roster that is currently being considered
     * for adoption.<br/>
     * A Node SHALL NOT, ever, have more than one candidate roster
     * at the same time.
     * 
* * bytes candidate_roster_hash = 1; * @param value The candidateRosterHash to set. * @return This builder for chaining. */ public Builder setCandidateRosterHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } candidateRosterHash_ = value; onChanged(); return this; } /** *
     **
     * The SHA-384 hash of a candidate roster.
     * <p>
     * This is the hash of the roster that is currently being considered
     * for adoption.<br/>
     * A Node SHALL NOT, ever, have more than one candidate roster
     * at the same time.
     * 
* * bytes candidate_roster_hash = 1; * @return This builder for chaining. */ public Builder clearCandidateRosterHash() { candidateRosterHash_ = getDefaultInstance().getCandidateRosterHash(); onChanged(); return this; } private java.util.List roundRosterPairs_ = java.util.Collections.emptyList(); private void ensureRoundRosterPairsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { roundRosterPairs_ = new java.util.ArrayList(roundRosterPairs_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.hederahashgraph.api.proto.java.RoundRosterPair, com.hederahashgraph.api.proto.java.RoundRosterPair.Builder, com.hederahashgraph.api.proto.java.RoundRosterPairOrBuilder> roundRosterPairsBuilder_; /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public java.util.List getRoundRosterPairsList() { if (roundRosterPairsBuilder_ == null) { return java.util.Collections.unmodifiableList(roundRosterPairs_); } else { return roundRosterPairsBuilder_.getMessageList(); } } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public int getRoundRosterPairsCount() { if (roundRosterPairsBuilder_ == null) { return roundRosterPairs_.size(); } else { return roundRosterPairsBuilder_.getCount(); } } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public com.hederahashgraph.api.proto.java.RoundRosterPair getRoundRosterPairs(int index) { if (roundRosterPairsBuilder_ == null) { return roundRosterPairs_.get(index); } else { return roundRosterPairsBuilder_.getMessage(index); } } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder setRoundRosterPairs( int index, com.hederahashgraph.api.proto.java.RoundRosterPair value) { if (roundRosterPairsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRoundRosterPairsIsMutable(); roundRosterPairs_.set(index, value); onChanged(); } else { roundRosterPairsBuilder_.setMessage(index, value); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder setRoundRosterPairs( int index, com.hederahashgraph.api.proto.java.RoundRosterPair.Builder builderForValue) { if (roundRosterPairsBuilder_ == null) { ensureRoundRosterPairsIsMutable(); roundRosterPairs_.set(index, builderForValue.build()); onChanged(); } else { roundRosterPairsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder addRoundRosterPairs(com.hederahashgraph.api.proto.java.RoundRosterPair value) { if (roundRosterPairsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRoundRosterPairsIsMutable(); roundRosterPairs_.add(value); onChanged(); } else { roundRosterPairsBuilder_.addMessage(value); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder addRoundRosterPairs( int index, com.hederahashgraph.api.proto.java.RoundRosterPair value) { if (roundRosterPairsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRoundRosterPairsIsMutable(); roundRosterPairs_.add(index, value); onChanged(); } else { roundRosterPairsBuilder_.addMessage(index, value); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder addRoundRosterPairs( com.hederahashgraph.api.proto.java.RoundRosterPair.Builder builderForValue) { if (roundRosterPairsBuilder_ == null) { ensureRoundRosterPairsIsMutable(); roundRosterPairs_.add(builderForValue.build()); onChanged(); } else { roundRosterPairsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder addRoundRosterPairs( int index, com.hederahashgraph.api.proto.java.RoundRosterPair.Builder builderForValue) { if (roundRosterPairsBuilder_ == null) { ensureRoundRosterPairsIsMutable(); roundRosterPairs_.add(index, builderForValue.build()); onChanged(); } else { roundRosterPairsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder addAllRoundRosterPairs( java.lang.Iterable values) { if (roundRosterPairsBuilder_ == null) { ensureRoundRosterPairsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, roundRosterPairs_); onChanged(); } else { roundRosterPairsBuilder_.addAllMessages(values); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder clearRoundRosterPairs() { if (roundRosterPairsBuilder_ == null) { roundRosterPairs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { roundRosterPairsBuilder_.clear(); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public Builder removeRoundRosterPairs(int index) { if (roundRosterPairsBuilder_ == null) { ensureRoundRosterPairsIsMutable(); roundRosterPairs_.remove(index); onChanged(); } else { roundRosterPairsBuilder_.remove(index); } return this; } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public com.hederahashgraph.api.proto.java.RoundRosterPair.Builder getRoundRosterPairsBuilder( int index) { return getRoundRosterPairsFieldBuilder().getBuilder(index); } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public com.hederahashgraph.api.proto.java.RoundRosterPairOrBuilder getRoundRosterPairsOrBuilder( int index) { if (roundRosterPairsBuilder_ == null) { return roundRosterPairs_.get(index); } else { return roundRosterPairsBuilder_.getMessageOrBuilder(index); } } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public java.util.List getRoundRosterPairsOrBuilderList() { if (roundRosterPairsBuilder_ != null) { return roundRosterPairsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(roundRosterPairs_); } } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public com.hederahashgraph.api.proto.java.RoundRosterPair.Builder addRoundRosterPairsBuilder() { return getRoundRosterPairsFieldBuilder().addBuilder( com.hederahashgraph.api.proto.java.RoundRosterPair.getDefaultInstance()); } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public com.hederahashgraph.api.proto.java.RoundRosterPair.Builder addRoundRosterPairsBuilder( int index) { return getRoundRosterPairsFieldBuilder().addBuilder( index, com.hederahashgraph.api.proto.java.RoundRosterPair.getDefaultInstance()); } /** *
     **
     * A list of round numbers and roster hashes.<br/>
     * The round number indicates the round in which the corresponding roster became active
     * <p>
     * This list SHALL be ordered by round numbers in descending order.
     * 
* * repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2; */ public java.util.List getRoundRosterPairsBuilderList() { return getRoundRosterPairsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.hederahashgraph.api.proto.java.RoundRosterPair, com.hederahashgraph.api.proto.java.RoundRosterPair.Builder, com.hederahashgraph.api.proto.java.RoundRosterPairOrBuilder> getRoundRosterPairsFieldBuilder() { if (roundRosterPairsBuilder_ == null) { roundRosterPairsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.hederahashgraph.api.proto.java.RoundRosterPair, com.hederahashgraph.api.proto.java.RoundRosterPair.Builder, com.hederahashgraph.api.proto.java.RoundRosterPairOrBuilder>( roundRosterPairs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); roundRosterPairs_ = null; } return roundRosterPairsBuilder_; } @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:com.hedera.hapi.node.state.roster.RosterState) } // @@protoc_insertion_point(class_scope:com.hedera.hapi.node.state.roster.RosterState) private static final com.hederahashgraph.api.proto.java.RosterState DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.RosterState(); } public static com.hederahashgraph.api.proto.java.RosterState getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RosterState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RosterState(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.RosterState getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy