com.hedera.hashgraph.sdk.proto.RoundRosterPair Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: roster_state.proto
// Protobuf Java Version: 3.25.4
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* A pair of round number and active roster hash.
* <p>
* This message SHALL encapsulate the round number and the hash of the
* active roster used for that round.
*
*
* Protobuf type {@code com.hedera.hapi.node.state.roster.RoundRosterPair}
*/
public final class RoundRosterPair extends
com.google.protobuf.GeneratedMessageLite<
RoundRosterPair, RoundRosterPair.Builder> implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.node.state.roster.RoundRosterPair)
RoundRosterPairOrBuilder {
private RoundRosterPair() {
activeRosterHash_ = com.google.protobuf.ByteString.EMPTY;
}
public static final int ROUND_NUMBER_FIELD_NUMBER = 1;
private long roundNumber_;
/**
*
**
* The round number.
* <p>
* This value SHALL be the round number of the consensus round in which this roster became active.
*
*
* uint64 round_number = 1;
* @return The roundNumber.
*/
@java.lang.Override
public long getRoundNumber() {
return roundNumber_;
}
/**
*
**
* The round number.
* <p>
* This value SHALL be the round number of the consensus round in which this roster became active.
*
*
* uint64 round_number = 1;
* @param value The roundNumber to set.
*/
private void setRoundNumber(long value) {
roundNumber_ = value;
}
/**
*
**
* The round number.
* <p>
* This value SHALL be the round number of the consensus round in which this roster became active.
*
*
* uint64 round_number = 1;
*/
private void clearRoundNumber() {
roundNumber_ = 0L;
}
public static final int ACTIVE_ROSTER_HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString activeRosterHash_;
/**
*
**
* The SHA-384 hash of the active roster for the given round number.
* <p>
* This value SHALL be the hash of the active roster used for the round.
*
*
* bytes active_roster_hash = 2;
* @return The activeRosterHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getActiveRosterHash() {
return activeRosterHash_;
}
/**
*
**
* The SHA-384 hash of the active roster for the given round number.
* <p>
* This value SHALL be the hash of the active roster used for the round.
*
*
* bytes active_roster_hash = 2;
* @param value The activeRosterHash to set.
*/
private void setActiveRosterHash(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
activeRosterHash_ = value;
}
/**
*
**
* The SHA-384 hash of the active roster for the given round number.
* <p>
* This value SHALL be the hash of the active roster used for the round.
*
*
* bytes active_roster_hash = 2;
*/
private void clearActiveRosterHash() {
activeRosterHash_ = getDefaultInstance().getActiveRosterHash();
}
public static com.hedera.hashgraph.sdk.proto.RoundRosterPair 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.RoundRosterPair 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.RoundRosterPair 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.RoundRosterPair 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.RoundRosterPair parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.RoundRosterPair 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.RoundRosterPair 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.RoundRosterPair 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.RoundRosterPair parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.RoundRosterPair 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.RoundRosterPair 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.RoundRosterPair 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.RoundRosterPair prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* A pair of round number and active roster hash.
* <p>
* This message SHALL encapsulate the round number and the hash of the
* active roster used for that round.
*
*
* Protobuf type {@code com.hedera.hapi.node.state.roster.RoundRosterPair}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.RoundRosterPair, Builder> implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.node.state.roster.RoundRosterPair)
com.hedera.hashgraph.sdk.proto.RoundRosterPairOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.RoundRosterPair.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* The round number.
* <p>
* This value SHALL be the round number of the consensus round in which this roster became active.
*
*
* uint64 round_number = 1;
* @return The roundNumber.
*/
@java.lang.Override
public long getRoundNumber() {
return instance.getRoundNumber();
}
/**
*
**
* The round number.
* <p>
* This value SHALL be the round number of the consensus round in which this roster became active.
*
*
* uint64 round_number = 1;
* @param value The roundNumber to set.
* @return This builder for chaining.
*/
public Builder setRoundNumber(long value) {
copyOnWrite();
instance.setRoundNumber(value);
return this;
}
/**
*
**
* The round number.
* <p>
* This value SHALL be the round number of the consensus round in which this roster became active.
*
*
* uint64 round_number = 1;
* @return This builder for chaining.
*/
public Builder clearRoundNumber() {
copyOnWrite();
instance.clearRoundNumber();
return this;
}
/**
*
**
* The SHA-384 hash of the active roster for the given round number.
* <p>
* This value SHALL be the hash of the active roster used for the round.
*
*
* bytes active_roster_hash = 2;
* @return The activeRosterHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getActiveRosterHash() {
return instance.getActiveRosterHash();
}
/**
*
**
* The SHA-384 hash of the active roster for the given round number.
* <p>
* This value SHALL be the hash of the active roster used for the round.
*
*
* bytes active_roster_hash = 2;
* @param value The activeRosterHash to set.
* @return This builder for chaining.
*/
public Builder setActiveRosterHash(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setActiveRosterHash(value);
return this;
}
/**
*
**
* The SHA-384 hash of the active roster for the given round number.
* <p>
* This value SHALL be the hash of the active roster used for the round.
*
*
* bytes active_roster_hash = 2;
* @return This builder for chaining.
*/
public Builder clearActiveRosterHash() {
copyOnWrite();
instance.clearActiveRosterHash();
return this;
}
// @@protoc_insertion_point(builder_scope:com.hedera.hapi.node.state.roster.RoundRosterPair)
}
@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.RoundRosterPair();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"roundNumber_",
"activeRosterHash_",
};
java.lang.String info =
"\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\n" +
"";
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.RoundRosterPair.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.RoundRosterPair)
private static final com.hedera.hashgraph.sdk.proto.RoundRosterPair DEFAULT_INSTANCE;
static {
RoundRosterPair defaultInstance = new RoundRosterPair();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
RoundRosterPair.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.RoundRosterPair getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}