com.hedera.hashgraph.sdk.proto.RosterState Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: roster_state.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* 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();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.RosterState.class, com.hedera.hashgraph.sdk.proto.RosterState.Builder.class);
}
public static final int CANDIDATE_ROSTER_HASH_FIELD_NUMBER = 1;
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_;
}
public static final int ROUND_ROSTER_PAIRS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
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 extends com.hedera.hashgraph.sdk.proto.RoundRosterPairOrBuilder>
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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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));
}
getUnknownFields().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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hashgraph.sdk.proto.RosterState)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.RosterState other = (com.hedera.hashgraph.sdk.proto.RosterState) obj;
if (!getCandidateRosterHash()
.equals(other.getCandidateRosterHash())) return false;
if (!getRoundRosterPairsList()
.equals(other.getRoundRosterPairsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
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) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.RosterState parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.RosterState parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.RosterState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RosterState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.RosterState parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.RosterState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RosterState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RosterState parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RosterStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.RosterState.class, com.hedera.hashgraph.sdk.proto.RosterState.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.RosterState.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
candidateRosterHash_ = com.google.protobuf.ByteString.EMPTY;
if (roundRosterPairsBuilder_ == null) {
roundRosterPairs_ = java.util.Collections.emptyList();
} else {
roundRosterPairs_ = null;
roundRosterPairsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.RosterStateOuterClass.internal_static_com_hedera_hapi_node_state_roster_RosterState_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RosterState getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.RosterState.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RosterState build() {
com.hedera.hashgraph.sdk.proto.RosterState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RosterState buildPartial() {
com.hedera.hashgraph.sdk.proto.RosterState result = new com.hedera.hashgraph.sdk.proto.RosterState(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.hedera.hashgraph.sdk.proto.RosterState result) {
if (roundRosterPairsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
roundRosterPairs_ = java.util.Collections.unmodifiableList(roundRosterPairs_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.roundRosterPairs_ = roundRosterPairs_;
} else {
result.roundRosterPairs_ = roundRosterPairsBuilder_.build();
}
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.RosterState result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.candidateRosterHash_ = candidateRosterHash_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.hedera.hashgraph.sdk.proto.RosterState) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.RosterState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.RosterState other) {
if (other == com.hedera.hashgraph.sdk.proto.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_ & ~0x00000002);
} else {
ensureRoundRosterPairsIsMutable();
roundRosterPairs_.addAll(other.roundRosterPairs_);
}
onChanged();
}
} else {
if (!other.roundRosterPairs_.isEmpty()) {
if (roundRosterPairsBuilder_.isEmpty()) {
roundRosterPairsBuilder_.dispose();
roundRosterPairsBuilder_ = null;
roundRosterPairs_ = other.roundRosterPairs_;
bitField0_ = (bitField0_ & ~0x00000002);
roundRosterPairsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRoundRosterPairsFieldBuilder() : null;
} else {
roundRosterPairsBuilder_.addAllMessages(other.roundRosterPairs_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
candidateRosterHash_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.hedera.hashgraph.sdk.proto.RoundRosterPair m =
input.readMessage(
com.hedera.hashgraph.sdk.proto.RoundRosterPair.parser(),
extensionRegistry);
if (roundRosterPairsBuilder_ == null) {
ensureRoundRosterPairsIsMutable();
roundRosterPairs_.add(m);
} else {
roundRosterPairsBuilder_.addMessage(m);
}
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int 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;
bitField0_ |= 0x00000001;
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() {
bitField0_ = (bitField0_ & ~0x00000001);
candidateRosterHash_ = getDefaultInstance().getCandidateRosterHash();
onChanged();
return this;
}
private java.util.List roundRosterPairs_ =
java.util.Collections.emptyList();
private void ensureRoundRosterPairsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
roundRosterPairs_ = new java.util.ArrayList(roundRosterPairs_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.RoundRosterPair, com.hedera.hashgraph.sdk.proto.RoundRosterPair.Builder, com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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 extends com.hedera.hashgraph.sdk.proto.RoundRosterPair> 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_ & ~0x00000002);
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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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 extends com.hedera.hashgraph.sdk.proto.RoundRosterPairOrBuilder>
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.hedera.hashgraph.sdk.proto.RoundRosterPair.Builder addRoundRosterPairsBuilder() {
return getRoundRosterPairsFieldBuilder().addBuilder(
com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RoundRosterPair.Builder addRoundRosterPairsBuilder(
int index) {
return getRoundRosterPairsFieldBuilder().addBuilder(
index, com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RoundRosterPair, com.hedera.hashgraph.sdk.proto.RoundRosterPair.Builder, com.hedera.hashgraph.sdk.proto.RoundRosterPairOrBuilder>
getRoundRosterPairsFieldBuilder() {
if (roundRosterPairsBuilder_ == null) {
roundRosterPairsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.RoundRosterPair, com.hedera.hashgraph.sdk.proto.RoundRosterPair.Builder, com.hedera.hashgraph.sdk.proto.RoundRosterPairOrBuilder>(
roundRosterPairs_,
((bitField0_ & 0x00000002) != 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.hedera.hashgraph.sdk.proto.RosterState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.RosterState();
}
public static com.hedera.hashgraph.sdk.proto.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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RosterState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}