com.hedera.hapi.platform.state.legacy.ConsensusSnapshot Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: state/platform_state.proto
package com.hedera.hapi.platform.state.legacy;
/**
*
**
* A consensus snapshot.<br/>
* This is a snapshot of the consensus state for a particular round.
* This message SHALL record consensus data necessary for restart
* and reconnect.
*
*
* Protobuf type {@code com.hedera.hapi.platform.state.ConsensusSnapshot}
*/
public final class ConsensusSnapshot extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.platform.state.ConsensusSnapshot)
ConsensusSnapshotOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConsensusSnapshot.newBuilder() to construct.
private ConsensusSnapshot(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConsensusSnapshot() {
judgeHashes_ = java.util.Collections.emptyList();
minimumJudgeInfoList_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConsensusSnapshot();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConsensusSnapshot(
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 8: {
round_ = input.readUInt64();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
judgeHashes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
judgeHashes_.add(input.readBytes());
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
minimumJudgeInfoList_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
minimumJudgeInfoList_.add(
input.readMessage(com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.parser(), extensionRegistry));
break;
}
case 32: {
nextConsensusNumber_ = input.readUInt64();
break;
}
case 42: {
com.hederahashgraph.api.proto.java.Timestamp.Builder subBuilder = null;
if (consensusTimestamp_ != null) {
subBuilder = consensusTimestamp_.toBuilder();
}
consensusTimestamp_ = input.readMessage(com.hederahashgraph.api.proto.java.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(consensusTimestamp_);
consensusTimestamp_ = subBuilder.buildPartial();
}
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)) {
judgeHashes_ = java.util.Collections.unmodifiableList(judgeHashes_); // C
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
minimumJudgeInfoList_ = java.util.Collections.unmodifiableList(minimumJudgeInfoList_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.platform.state.legacy.PlatformStateOuterClass.internal_static_com_hedera_hapi_platform_state_ConsensusSnapshot_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.platform.state.legacy.PlatformStateOuterClass.internal_static_com_hedera_hapi_platform_state_ConsensusSnapshot_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.platform.state.legacy.ConsensusSnapshot.class, com.hedera.hapi.platform.state.legacy.ConsensusSnapshot.Builder.class);
}
public static final int ROUND_FIELD_NUMBER = 1;
private long round_;
/**
*
**
* A consensus round.<br/>
* The round number of this snapshot.
*
*
* uint64 round = 1;
* @return The round.
*/
@java.lang.Override
public long getRound() {
return round_;
}
public static final int JUDGE_HASHES_FIELD_NUMBER = 2;
private java.util.List judgeHashes_;
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @return A list containing the judgeHashes.
*/
@java.lang.Override
public java.util.List
getJudgeHashesList() {
return judgeHashes_;
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @return The count of judgeHashes.
*/
public int getJudgeHashesCount() {
return judgeHashes_.size();
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @param index The index of the element to return.
* @return The judgeHashes at the given index.
*/
public com.google.protobuf.ByteString getJudgeHashes(int index) {
return judgeHashes_.get(index);
}
public static final int MINIMUM_JUDGE_INFO_LIST_FIELD_NUMBER = 3;
private java.util.List minimumJudgeInfoList_;
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
@java.lang.Override
public java.util.List getMinimumJudgeInfoListList() {
return minimumJudgeInfoList_;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
@java.lang.Override
public java.util.List extends com.hedera.hapi.platform.state.legacy.MinimumJudgeInfoOrBuilder>
getMinimumJudgeInfoListOrBuilderList() {
return minimumJudgeInfoList_;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
@java.lang.Override
public int getMinimumJudgeInfoListCount() {
return minimumJudgeInfoList_.size();
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
@java.lang.Override
public com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo getMinimumJudgeInfoList(int index) {
return minimumJudgeInfoList_.get(index);
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
@java.lang.Override
public com.hedera.hapi.platform.state.legacy.MinimumJudgeInfoOrBuilder getMinimumJudgeInfoListOrBuilder(
int index) {
return minimumJudgeInfoList_.get(index);
}
public static final int NEXT_CONSENSUS_NUMBER_FIELD_NUMBER = 4;
private long nextConsensusNumber_;
/**
*
**
* A single consensus number.<br/>
* The consensus order of the next event to reach consensus.
*
*
* uint64 next_consensus_number = 4;
* @return The nextConsensusNumber.
*/
@java.lang.Override
public long getNextConsensusNumber() {
return nextConsensusNumber_;
}
public static final int CONSENSUS_TIMESTAMP_FIELD_NUMBER = 5;
private com.hederahashgraph.api.proto.java.Timestamp consensusTimestamp_;
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
* @return Whether the consensusTimestamp field is set.
*/
@java.lang.Override
public boolean hasConsensusTimestamp() {
return consensusTimestamp_ != null;
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
* @return The consensusTimestamp.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.Timestamp getConsensusTimestamp() {
return consensusTimestamp_ == null ? com.hederahashgraph.api.proto.java.Timestamp.getDefaultInstance() : consensusTimestamp_;
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.TimestampOrBuilder getConsensusTimestampOrBuilder() {
return getConsensusTimestamp();
}
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 (round_ != 0L) {
output.writeUInt64(1, round_);
}
for (int i = 0; i < judgeHashes_.size(); i++) {
output.writeBytes(2, judgeHashes_.get(i));
}
for (int i = 0; i < minimumJudgeInfoList_.size(); i++) {
output.writeMessage(3, minimumJudgeInfoList_.get(i));
}
if (nextConsensusNumber_ != 0L) {
output.writeUInt64(4, nextConsensusNumber_);
}
if (consensusTimestamp_ != null) {
output.writeMessage(5, getConsensusTimestamp());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (round_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, round_);
}
{
int dataSize = 0;
for (int i = 0; i < judgeHashes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(judgeHashes_.get(i));
}
size += dataSize;
size += 1 * getJudgeHashesList().size();
}
for (int i = 0; i < minimumJudgeInfoList_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, minimumJudgeInfoList_.get(i));
}
if (nextConsensusNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, nextConsensusNumber_);
}
if (consensusTimestamp_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getConsensusTimestamp());
}
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.hedera.hapi.platform.state.legacy.ConsensusSnapshot)) {
return super.equals(obj);
}
com.hedera.hapi.platform.state.legacy.ConsensusSnapshot other = (com.hedera.hapi.platform.state.legacy.ConsensusSnapshot) obj;
if (getRound()
!= other.getRound()) return false;
if (!getJudgeHashesList()
.equals(other.getJudgeHashesList())) return false;
if (!getMinimumJudgeInfoListList()
.equals(other.getMinimumJudgeInfoListList())) return false;
if (getNextConsensusNumber()
!= other.getNextConsensusNumber()) return false;
if (hasConsensusTimestamp() != other.hasConsensusTimestamp()) return false;
if (hasConsensusTimestamp()) {
if (!getConsensusTimestamp()
.equals(other.getConsensusTimestamp())) 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) + ROUND_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRound());
if (getJudgeHashesCount() > 0) {
hash = (37 * hash) + JUDGE_HASHES_FIELD_NUMBER;
hash = (53 * hash) + getJudgeHashesList().hashCode();
}
if (getMinimumJudgeInfoListCount() > 0) {
hash = (37 * hash) + MINIMUM_JUDGE_INFO_LIST_FIELD_NUMBER;
hash = (53 * hash) + getMinimumJudgeInfoListList().hashCode();
}
hash = (37 * hash) + NEXT_CONSENSUS_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNextConsensusNumber());
if (hasConsensusTimestamp()) {
hash = (37 * hash) + CONSENSUS_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getConsensusTimestamp().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot 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.hapi.platform.state.legacy.ConsensusSnapshot parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot 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.hapi.platform.state.legacy.ConsensusSnapshot parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot 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.hapi.platform.state.legacy.ConsensusSnapshot parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot 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.hapi.platform.state.legacy.ConsensusSnapshot 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;
}
/**
*
**
* A consensus snapshot.<br/>
* This is a snapshot of the consensus state for a particular round.
* This message SHALL record consensus data necessary for restart
* and reconnect.
*
*
* Protobuf type {@code com.hedera.hapi.platform.state.ConsensusSnapshot}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.platform.state.ConsensusSnapshot)
com.hedera.hapi.platform.state.legacy.ConsensusSnapshotOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.platform.state.legacy.PlatformStateOuterClass.internal_static_com_hedera_hapi_platform_state_ConsensusSnapshot_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.platform.state.legacy.PlatformStateOuterClass.internal_static_com_hedera_hapi_platform_state_ConsensusSnapshot_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.platform.state.legacy.ConsensusSnapshot.class, com.hedera.hapi.platform.state.legacy.ConsensusSnapshot.Builder.class);
}
// Construct using com.hedera.hapi.platform.state.legacy.ConsensusSnapshot.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getMinimumJudgeInfoListFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
round_ = 0L;
judgeHashes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
if (minimumJudgeInfoListBuilder_ == null) {
minimumJudgeInfoList_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
minimumJudgeInfoListBuilder_.clear();
}
nextConsensusNumber_ = 0L;
if (consensusTimestampBuilder_ == null) {
consensusTimestamp_ = null;
} else {
consensusTimestamp_ = null;
consensusTimestampBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hapi.platform.state.legacy.PlatformStateOuterClass.internal_static_com_hedera_hapi_platform_state_ConsensusSnapshot_descriptor;
}
@java.lang.Override
public com.hedera.hapi.platform.state.legacy.ConsensusSnapshot getDefaultInstanceForType() {
return com.hedera.hapi.platform.state.legacy.ConsensusSnapshot.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hapi.platform.state.legacy.ConsensusSnapshot build() {
com.hedera.hapi.platform.state.legacy.ConsensusSnapshot result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hapi.platform.state.legacy.ConsensusSnapshot buildPartial() {
com.hedera.hapi.platform.state.legacy.ConsensusSnapshot result = new com.hedera.hapi.platform.state.legacy.ConsensusSnapshot(this);
int from_bitField0_ = bitField0_;
result.round_ = round_;
if (((bitField0_ & 0x00000001) != 0)) {
judgeHashes_ = java.util.Collections.unmodifiableList(judgeHashes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.judgeHashes_ = judgeHashes_;
if (minimumJudgeInfoListBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
minimumJudgeInfoList_ = java.util.Collections.unmodifiableList(minimumJudgeInfoList_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.minimumJudgeInfoList_ = minimumJudgeInfoList_;
} else {
result.minimumJudgeInfoList_ = minimumJudgeInfoListBuilder_.build();
}
result.nextConsensusNumber_ = nextConsensusNumber_;
if (consensusTimestampBuilder_ == null) {
result.consensusTimestamp_ = consensusTimestamp_;
} else {
result.consensusTimestamp_ = consensusTimestampBuilder_.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.hedera.hapi.platform.state.legacy.ConsensusSnapshot) {
return mergeFrom((com.hedera.hapi.platform.state.legacy.ConsensusSnapshot)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hapi.platform.state.legacy.ConsensusSnapshot other) {
if (other == com.hedera.hapi.platform.state.legacy.ConsensusSnapshot.getDefaultInstance()) return this;
if (other.getRound() != 0L) {
setRound(other.getRound());
}
if (!other.judgeHashes_.isEmpty()) {
if (judgeHashes_.isEmpty()) {
judgeHashes_ = other.judgeHashes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureJudgeHashesIsMutable();
judgeHashes_.addAll(other.judgeHashes_);
}
onChanged();
}
if (minimumJudgeInfoListBuilder_ == null) {
if (!other.minimumJudgeInfoList_.isEmpty()) {
if (minimumJudgeInfoList_.isEmpty()) {
minimumJudgeInfoList_ = other.minimumJudgeInfoList_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.addAll(other.minimumJudgeInfoList_);
}
onChanged();
}
} else {
if (!other.minimumJudgeInfoList_.isEmpty()) {
if (minimumJudgeInfoListBuilder_.isEmpty()) {
minimumJudgeInfoListBuilder_.dispose();
minimumJudgeInfoListBuilder_ = null;
minimumJudgeInfoList_ = other.minimumJudgeInfoList_;
bitField0_ = (bitField0_ & ~0x00000002);
minimumJudgeInfoListBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getMinimumJudgeInfoListFieldBuilder() : null;
} else {
minimumJudgeInfoListBuilder_.addAllMessages(other.minimumJudgeInfoList_);
}
}
}
if (other.getNextConsensusNumber() != 0L) {
setNextConsensusNumber(other.getNextConsensusNumber());
}
if (other.hasConsensusTimestamp()) {
mergeConsensusTimestamp(other.getConsensusTimestamp());
}
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.hedera.hapi.platform.state.legacy.ConsensusSnapshot parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.hapi.platform.state.legacy.ConsensusSnapshot) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long round_ ;
/**
*
**
* A consensus round.<br/>
* The round number of this snapshot.
*
*
* uint64 round = 1;
* @return The round.
*/
@java.lang.Override
public long getRound() {
return round_;
}
/**
*
**
* A consensus round.<br/>
* The round number of this snapshot.
*
*
* uint64 round = 1;
* @param value The round to set.
* @return This builder for chaining.
*/
public Builder setRound(long value) {
round_ = value;
onChanged();
return this;
}
/**
*
**
* A consensus round.<br/>
* The round number of this snapshot.
*
*
* uint64 round = 1;
* @return This builder for chaining.
*/
public Builder clearRound() {
round_ = 0L;
onChanged();
return this;
}
private java.util.List judgeHashes_ = java.util.Collections.emptyList();
private void ensureJudgeHashesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
judgeHashes_ = new java.util.ArrayList(judgeHashes_);
bitField0_ |= 0x00000001;
}
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @return A list containing the judgeHashes.
*/
public java.util.List
getJudgeHashesList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(judgeHashes_) : judgeHashes_;
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @return The count of judgeHashes.
*/
public int getJudgeHashesCount() {
return judgeHashes_.size();
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @param index The index of the element to return.
* @return The judgeHashes at the given index.
*/
public com.google.protobuf.ByteString getJudgeHashes(int index) {
return judgeHashes_.get(index);
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @param index The index to set the value at.
* @param value The judgeHashes to set.
* @return This builder for chaining.
*/
public Builder setJudgeHashes(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureJudgeHashesIsMutable();
judgeHashes_.set(index, value);
onChanged();
return this;
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @param value The judgeHashes to add.
* @return This builder for chaining.
*/
public Builder addJudgeHashes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureJudgeHashesIsMutable();
judgeHashes_.add(value);
onChanged();
return this;
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @param values The judgeHashes to add.
* @return This builder for chaining.
*/
public Builder addAllJudgeHashes(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureJudgeHashesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, judgeHashes_);
onChanged();
return this;
}
/**
*
**
* A list of SHA-384 hash values.<br/>
* The hashes of all judges for this round.
* <p>
* This list SHALL be ordered by creator ID.<br/>
* This list MUST be deterministically ordered.
*
*
* repeated bytes judge_hashes = 2;
* @return This builder for chaining.
*/
public Builder clearJudgeHashes() {
judgeHashes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private java.util.List minimumJudgeInfoList_ =
java.util.Collections.emptyList();
private void ensureMinimumJudgeInfoListIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
minimumJudgeInfoList_ = new java.util.ArrayList(minimumJudgeInfoList_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfoOrBuilder> minimumJudgeInfoListBuilder_;
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public java.util.List getMinimumJudgeInfoListList() {
if (minimumJudgeInfoListBuilder_ == null) {
return java.util.Collections.unmodifiableList(minimumJudgeInfoList_);
} else {
return minimumJudgeInfoListBuilder_.getMessageList();
}
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public int getMinimumJudgeInfoListCount() {
if (minimumJudgeInfoListBuilder_ == null) {
return minimumJudgeInfoList_.size();
} else {
return minimumJudgeInfoListBuilder_.getCount();
}
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo getMinimumJudgeInfoList(int index) {
if (minimumJudgeInfoListBuilder_ == null) {
return minimumJudgeInfoList_.get(index);
} else {
return minimumJudgeInfoListBuilder_.getMessage(index);
}
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder setMinimumJudgeInfoList(
int index, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo value) {
if (minimumJudgeInfoListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.set(index, value);
onChanged();
} else {
minimumJudgeInfoListBuilder_.setMessage(index, value);
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder setMinimumJudgeInfoList(
int index, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder builderForValue) {
if (minimumJudgeInfoListBuilder_ == null) {
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.set(index, builderForValue.build());
onChanged();
} else {
minimumJudgeInfoListBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder addMinimumJudgeInfoList(com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo value) {
if (minimumJudgeInfoListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.add(value);
onChanged();
} else {
minimumJudgeInfoListBuilder_.addMessage(value);
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder addMinimumJudgeInfoList(
int index, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo value) {
if (minimumJudgeInfoListBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.add(index, value);
onChanged();
} else {
minimumJudgeInfoListBuilder_.addMessage(index, value);
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder addMinimumJudgeInfoList(
com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder builderForValue) {
if (minimumJudgeInfoListBuilder_ == null) {
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.add(builderForValue.build());
onChanged();
} else {
minimumJudgeInfoListBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder addMinimumJudgeInfoList(
int index, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder builderForValue) {
if (minimumJudgeInfoListBuilder_ == null) {
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.add(index, builderForValue.build());
onChanged();
} else {
minimumJudgeInfoListBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder addAllMinimumJudgeInfoList(
java.lang.Iterable extends com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo> values) {
if (minimumJudgeInfoListBuilder_ == null) {
ensureMinimumJudgeInfoListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, minimumJudgeInfoList_);
onChanged();
} else {
minimumJudgeInfoListBuilder_.addAllMessages(values);
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder clearMinimumJudgeInfoList() {
if (minimumJudgeInfoListBuilder_ == null) {
minimumJudgeInfoList_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
minimumJudgeInfoListBuilder_.clear();
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public Builder removeMinimumJudgeInfoList(int index) {
if (minimumJudgeInfoListBuilder_ == null) {
ensureMinimumJudgeInfoListIsMutable();
minimumJudgeInfoList_.remove(index);
onChanged();
} else {
minimumJudgeInfoListBuilder_.remove(index);
}
return this;
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder getMinimumJudgeInfoListBuilder(
int index) {
return getMinimumJudgeInfoListFieldBuilder().getBuilder(index);
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public com.hedera.hapi.platform.state.legacy.MinimumJudgeInfoOrBuilder getMinimumJudgeInfoListOrBuilder(
int index) {
if (minimumJudgeInfoListBuilder_ == null) {
return minimumJudgeInfoList_.get(index); } else {
return minimumJudgeInfoListBuilder_.getMessageOrBuilder(index);
}
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public java.util.List extends com.hedera.hapi.platform.state.legacy.MinimumJudgeInfoOrBuilder>
getMinimumJudgeInfoListOrBuilderList() {
if (minimumJudgeInfoListBuilder_ != null) {
return minimumJudgeInfoListBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(minimumJudgeInfoList_);
}
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder addMinimumJudgeInfoListBuilder() {
return getMinimumJudgeInfoListFieldBuilder().addBuilder(
com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.getDefaultInstance());
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder addMinimumJudgeInfoListBuilder(
int index) {
return getMinimumJudgeInfoListFieldBuilder().addBuilder(
index, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.getDefaultInstance());
}
/**
*
**
* A list of minimum judge information entries.<br/>
* These are "minimum ancient" entries for non-ancient rounds.
*
*
* repeated .com.hedera.hapi.platform.state.MinimumJudgeInfo minimum_judge_info_list = 3;
*/
public java.util.List
getMinimumJudgeInfoListBuilderList() {
return getMinimumJudgeInfoListFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfoOrBuilder>
getMinimumJudgeInfoListFieldBuilder() {
if (minimumJudgeInfoListBuilder_ == null) {
minimumJudgeInfoListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfo.Builder, com.hedera.hapi.platform.state.legacy.MinimumJudgeInfoOrBuilder>(
minimumJudgeInfoList_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
minimumJudgeInfoList_ = null;
}
return minimumJudgeInfoListBuilder_;
}
private long nextConsensusNumber_ ;
/**
*
**
* A single consensus number.<br/>
* The consensus order of the next event to reach consensus.
*
*
* uint64 next_consensus_number = 4;
* @return The nextConsensusNumber.
*/
@java.lang.Override
public long getNextConsensusNumber() {
return nextConsensusNumber_;
}
/**
*
**
* A single consensus number.<br/>
* The consensus order of the next event to reach consensus.
*
*
* uint64 next_consensus_number = 4;
* @param value The nextConsensusNumber to set.
* @return This builder for chaining.
*/
public Builder setNextConsensusNumber(long value) {
nextConsensusNumber_ = value;
onChanged();
return this;
}
/**
*
**
* A single consensus number.<br/>
* The consensus order of the next event to reach consensus.
*
*
* uint64 next_consensus_number = 4;
* @return This builder for chaining.
*/
public Builder clearNextConsensusNumber() {
nextConsensusNumber_ = 0L;
onChanged();
return this;
}
private com.hederahashgraph.api.proto.java.Timestamp consensusTimestamp_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.Timestamp, com.hederahashgraph.api.proto.java.Timestamp.Builder, com.hederahashgraph.api.proto.java.TimestampOrBuilder> consensusTimestampBuilder_;
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
* @return Whether the consensusTimestamp field is set.
*/
public boolean hasConsensusTimestamp() {
return consensusTimestampBuilder_ != null || consensusTimestamp_ != null;
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
* @return The consensusTimestamp.
*/
public com.hederahashgraph.api.proto.java.Timestamp getConsensusTimestamp() {
if (consensusTimestampBuilder_ == null) {
return consensusTimestamp_ == null ? com.hederahashgraph.api.proto.java.Timestamp.getDefaultInstance() : consensusTimestamp_;
} else {
return consensusTimestampBuilder_.getMessage();
}
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
public Builder setConsensusTimestamp(com.hederahashgraph.api.proto.java.Timestamp value) {
if (consensusTimestampBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consensusTimestamp_ = value;
onChanged();
} else {
consensusTimestampBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
public Builder setConsensusTimestamp(
com.hederahashgraph.api.proto.java.Timestamp.Builder builderForValue) {
if (consensusTimestampBuilder_ == null) {
consensusTimestamp_ = builderForValue.build();
onChanged();
} else {
consensusTimestampBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
public Builder mergeConsensusTimestamp(com.hederahashgraph.api.proto.java.Timestamp value) {
if (consensusTimestampBuilder_ == null) {
if (consensusTimestamp_ != null) {
consensusTimestamp_ =
com.hederahashgraph.api.proto.java.Timestamp.newBuilder(consensusTimestamp_).mergeFrom(value).buildPartial();
} else {
consensusTimestamp_ = value;
}
onChanged();
} else {
consensusTimestampBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
public Builder clearConsensusTimestamp() {
if (consensusTimestampBuilder_ == null) {
consensusTimestamp_ = null;
onChanged();
} else {
consensusTimestamp_ = null;
consensusTimestampBuilder_ = null;
}
return this;
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
public com.hederahashgraph.api.proto.java.Timestamp.Builder getConsensusTimestampBuilder() {
onChanged();
return getConsensusTimestampFieldBuilder().getBuilder();
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
public com.hederahashgraph.api.proto.java.TimestampOrBuilder getConsensusTimestampOrBuilder() {
if (consensusTimestampBuilder_ != null) {
return consensusTimestampBuilder_.getMessageOrBuilder();
} else {
return consensusTimestamp_ == null ?
com.hederahashgraph.api.proto.java.Timestamp.getDefaultInstance() : consensusTimestamp_;
}
}
/**
*
**
* A "consensus" timestamp.<br/>
* The consensus timestamp of this snapshot.
* <p>
* Depending on the context this timestamp may have different meanings:
* <ul>
* <li>if there are transactions, the timestamp is equal to the timestamp of the last transaction</li>
* <li>if there are no transactions, the timestamp is equal to the timestamp of the last event</li>
* <li>if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant</li>
* </ul>
* <p>
* This SHALL be a consensus value and MAY NOT correspond to an actual
* "wall clock" timestamp.<br/>
* Consensus Timestamps SHALL always increase.
*
*
* .proto.Timestamp consensus_timestamp = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.Timestamp, com.hederahashgraph.api.proto.java.Timestamp.Builder, com.hederahashgraph.api.proto.java.TimestampOrBuilder>
getConsensusTimestampFieldBuilder() {
if (consensusTimestampBuilder_ == null) {
consensusTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.Timestamp, com.hederahashgraph.api.proto.java.Timestamp.Builder, com.hederahashgraph.api.proto.java.TimestampOrBuilder>(
getConsensusTimestamp(),
getParentForChildren(),
isClean());
consensusTimestamp_ = null;
}
return consensusTimestampBuilder_;
}
@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.platform.state.ConsensusSnapshot)
}
// @@protoc_insertion_point(class_scope:com.hedera.hapi.platform.state.ConsensusSnapshot)
private static final com.hedera.hapi.platform.state.legacy.ConsensusSnapshot DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hapi.platform.state.legacy.ConsensusSnapshot();
}
public static com.hedera.hapi.platform.state.legacy.ConsensusSnapshot getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConsensusSnapshot parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConsensusSnapshot(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.hedera.hapi.platform.state.legacy.ConsensusSnapshot getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy