com.hedera.hashgraph.sdk.proto.Roster Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: roster.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* A single roster in the network state.
* <p>
* The roster SHALL be a list of `RosterEntry` objects.
*
*
* Protobuf type {@code com.hedera.hapi.node.state.roster.Roster}
*/
public final class Roster extends
com.google.protobuf.GeneratedMessageLite<
Roster, Roster.Builder> implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.node.state.roster.Roster)
RosterOrBuilder {
private Roster() {
rosters_ = emptyProtobufList();
}
public static final int ROSTERS_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.ProtobufList rosters_;
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
@java.lang.Override
public java.util.List getRostersList() {
return rosters_;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public java.util.List extends com.hedera.hashgraph.sdk.proto.RosterEntryOrBuilder>
getRostersOrBuilderList() {
return rosters_;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
@java.lang.Override
public int getRostersCount() {
return rosters_.size();
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RosterEntry getRosters(int index) {
return rosters_.get(index);
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public com.hedera.hashgraph.sdk.proto.RosterEntryOrBuilder getRostersOrBuilder(
int index) {
return rosters_.get(index);
}
private void ensureRostersIsMutable() {
com.google.protobuf.Internal.ProtobufList tmp = rosters_;
if (!tmp.isModifiable()) {
rosters_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
}
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
private void setRosters(
int index, com.hedera.hashgraph.sdk.proto.RosterEntry value) {
value.getClass();
ensureRostersIsMutable();
rosters_.set(index, value);
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
private void addRosters(com.hedera.hashgraph.sdk.proto.RosterEntry value) {
value.getClass();
ensureRostersIsMutable();
rosters_.add(value);
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
private void addRosters(
int index, com.hedera.hashgraph.sdk.proto.RosterEntry value) {
value.getClass();
ensureRostersIsMutable();
rosters_.add(index, value);
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
private void addAllRosters(
java.lang.Iterable extends com.hedera.hashgraph.sdk.proto.RosterEntry> values) {
ensureRostersIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, rosters_);
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
private void clearRosters() {
rosters_ = emptyProtobufList();
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
private void removeRosters(int index) {
ensureRostersIsMutable();
rosters_.remove(index);
}
public static com.hedera.hashgraph.sdk.proto.Roster 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.Roster 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.Roster 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.Roster 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.Roster parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.Roster 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.Roster 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.Roster 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.Roster parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.Roster 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.Roster 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.Roster 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.Roster prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* A single roster in the network state.
* <p>
* The roster SHALL be a list of `RosterEntry` objects.
*
*
* Protobuf type {@code com.hedera.hapi.node.state.roster.Roster}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.Roster, Builder> implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.node.state.roster.Roster)
com.hedera.hashgraph.sdk.proto.RosterOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.Roster.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
@java.lang.Override
public java.util.List getRostersList() {
return java.util.Collections.unmodifiableList(
instance.getRostersList());
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
@java.lang.Override
public int getRostersCount() {
return instance.getRostersCount();
}/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.RosterEntry getRosters(int index) {
return instance.getRosters(index);
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder setRosters(
int index, com.hedera.hashgraph.sdk.proto.RosterEntry value) {
copyOnWrite();
instance.setRosters(index, value);
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder setRosters(
int index, com.hedera.hashgraph.sdk.proto.RosterEntry.Builder builderForValue) {
copyOnWrite();
instance.setRosters(index,
builderForValue.build());
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder addRosters(com.hedera.hashgraph.sdk.proto.RosterEntry value) {
copyOnWrite();
instance.addRosters(value);
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder addRosters(
int index, com.hedera.hashgraph.sdk.proto.RosterEntry value) {
copyOnWrite();
instance.addRosters(index, value);
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder addRosters(
com.hedera.hashgraph.sdk.proto.RosterEntry.Builder builderForValue) {
copyOnWrite();
instance.addRosters(builderForValue.build());
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder addRosters(
int index, com.hedera.hashgraph.sdk.proto.RosterEntry.Builder builderForValue) {
copyOnWrite();
instance.addRosters(index,
builderForValue.build());
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder addAllRosters(
java.lang.Iterable extends com.hedera.hashgraph.sdk.proto.RosterEntry> values) {
copyOnWrite();
instance.addAllRosters(values);
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder clearRosters() {
copyOnWrite();
instance.clearRosters();
return this;
}
/**
*
**
* List of roster entries, one per consensus node.
* <p>
* This list SHALL contain roster entries in natural order of ascending node ids.
* This list SHALL NOT be empty.<br/>
*
*
* repeated .com.hedera.hapi.node.state.roster.RosterEntry rosters = 1;
*/
public Builder removeRosters(int index) {
copyOnWrite();
instance.removeRosters(index);
return this;
}
// @@protoc_insertion_point(builder_scope:com.hedera.hapi.node.state.roster.Roster)
}
@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.Roster();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"rosters_",
com.hedera.hashgraph.sdk.proto.RosterEntry.class,
};
java.lang.String info =
"\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b";
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.Roster.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:com.hedera.hapi.node.state.roster.Roster)
private static final com.hedera.hashgraph.sdk.proto.Roster DEFAULT_INSTANCE;
static {
Roster defaultInstance = new Roster();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
Roster.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.Roster getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}