com.hedera.hashgraph.sdk.proto.BlockInfo 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
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: block_info.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Information about ongoing, most recently completed, and last 256 blocks.
*
*
* Protobuf type {@code proto.BlockInfo}
*/
public final class BlockInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.BlockInfo)
BlockInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use BlockInfo.newBuilder() to construct.
private BlockInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BlockInfo() {
blockHashes_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BlockInfo();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.BlockInfoOuterClass.internal_static_proto_BlockInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.BlockInfoOuterClass.internal_static_proto_BlockInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.BlockInfo.class, com.hedera.hashgraph.sdk.proto.BlockInfo.Builder.class);
}
private int bitField0_;
public static final int LAST_BLOCK_NUMBER_FIELD_NUMBER = 1;
private long lastBlockNumber_ = 0L;
/**
*
**
* The last block number, this is the last completed immutable block.
*
*
* int64 last_block_number = 1;
* @return The lastBlockNumber.
*/
@java.lang.Override
public long getLastBlockNumber() {
return lastBlockNumber_;
}
public static final int FIRST_CONS_TIME_OF_LAST_BLOCK_FIELD_NUMBER = 2;
private com.hedera.hashgraph.sdk.proto.Timestamp firstConsTimeOfLastBlock_;
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
* @return Whether the firstConsTimeOfLastBlock field is set.
*/
@java.lang.Override
public boolean hasFirstConsTimeOfLastBlock() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
* @return The firstConsTimeOfLastBlock.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Timestamp getFirstConsTimeOfLastBlock() {
return firstConsTimeOfLastBlock_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfLastBlock_;
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getFirstConsTimeOfLastBlockOrBuilder() {
return firstConsTimeOfLastBlock_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfLastBlock_;
}
public static final int BLOCK_HASHES_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString blockHashes_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* SHA384 48 byte hashes of the last 256 blocks in single byte array.
* First 48 bytes is the oldest block.
* Last 48 bytes is the newest block, which is the last fully completed immutable block.
* If we are shortly after genesis and there are less than 256 blocks then this could contain less than 256 hashes.
*
*
* bytes block_hashes = 3;
* @return The blockHashes.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBlockHashes() {
return blockHashes_;
}
public static final int CONS_TIME_OF_LAST_HANDLED_TXN_FIELD_NUMBER = 4;
private com.hedera.hashgraph.sdk.proto.Timestamp consTimeOfLastHandledTxn_;
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
* @return Whether the consTimeOfLastHandledTxn field is set.
*/
@java.lang.Override
public boolean hasConsTimeOfLastHandledTxn() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
* @return The consTimeOfLastHandledTxn.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Timestamp getConsTimeOfLastHandledTxn() {
return consTimeOfLastHandledTxn_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consTimeOfLastHandledTxn_;
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getConsTimeOfLastHandledTxnOrBuilder() {
return consTimeOfLastHandledTxn_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consTimeOfLastHandledTxn_;
}
public static final int MIGRATION_RECORDS_STREAMED_FIELD_NUMBER = 5;
private boolean migrationRecordsStreamed_ = false;
/**
*
**
* A flag indicating whether migration records have been published. This property should be marked 'false'
* immediately following a node upgrade, and marked 'true' once the migration records (if any) are published, which
* should happen during the first transaction handled by the node.
*
*
* bool migration_records_streamed = 5;
* @return The migrationRecordsStreamed.
*/
@java.lang.Override
public boolean getMigrationRecordsStreamed() {
return migrationRecordsStreamed_;
}
public static final int FIRST_CONS_TIME_OF_CURRENT_BLOCK_FIELD_NUMBER = 6;
private com.hedera.hashgraph.sdk.proto.Timestamp firstConsTimeOfCurrentBlock_;
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
* @return Whether the firstConsTimeOfCurrentBlock field is set.
*/
@java.lang.Override
public boolean hasFirstConsTimeOfCurrentBlock() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
* @return The firstConsTimeOfCurrentBlock.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Timestamp getFirstConsTimeOfCurrentBlock() {
return firstConsTimeOfCurrentBlock_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfCurrentBlock_;
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getFirstConsTimeOfCurrentBlockOrBuilder() {
return firstConsTimeOfCurrentBlock_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfCurrentBlock_;
}
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 (lastBlockNumber_ != 0L) {
output.writeInt64(1, lastBlockNumber_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getFirstConsTimeOfLastBlock());
}
if (!blockHashes_.isEmpty()) {
output.writeBytes(3, blockHashes_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getConsTimeOfLastHandledTxn());
}
if (migrationRecordsStreamed_ != false) {
output.writeBool(5, migrationRecordsStreamed_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(6, getFirstConsTimeOfCurrentBlock());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (lastBlockNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, lastBlockNumber_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getFirstConsTimeOfLastBlock());
}
if (!blockHashes_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, blockHashes_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getConsTimeOfLastHandledTxn());
}
if (migrationRecordsStreamed_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, migrationRecordsStreamed_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getFirstConsTimeOfCurrentBlock());
}
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.BlockInfo)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.BlockInfo other = (com.hedera.hashgraph.sdk.proto.BlockInfo) obj;
if (getLastBlockNumber()
!= other.getLastBlockNumber()) return false;
if (hasFirstConsTimeOfLastBlock() != other.hasFirstConsTimeOfLastBlock()) return false;
if (hasFirstConsTimeOfLastBlock()) {
if (!getFirstConsTimeOfLastBlock()
.equals(other.getFirstConsTimeOfLastBlock())) return false;
}
if (!getBlockHashes()
.equals(other.getBlockHashes())) return false;
if (hasConsTimeOfLastHandledTxn() != other.hasConsTimeOfLastHandledTxn()) return false;
if (hasConsTimeOfLastHandledTxn()) {
if (!getConsTimeOfLastHandledTxn()
.equals(other.getConsTimeOfLastHandledTxn())) return false;
}
if (getMigrationRecordsStreamed()
!= other.getMigrationRecordsStreamed()) return false;
if (hasFirstConsTimeOfCurrentBlock() != other.hasFirstConsTimeOfCurrentBlock()) return false;
if (hasFirstConsTimeOfCurrentBlock()) {
if (!getFirstConsTimeOfCurrentBlock()
.equals(other.getFirstConsTimeOfCurrentBlock())) 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) + LAST_BLOCK_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLastBlockNumber());
if (hasFirstConsTimeOfLastBlock()) {
hash = (37 * hash) + FIRST_CONS_TIME_OF_LAST_BLOCK_FIELD_NUMBER;
hash = (53 * hash) + getFirstConsTimeOfLastBlock().hashCode();
}
hash = (37 * hash) + BLOCK_HASHES_FIELD_NUMBER;
hash = (53 * hash) + getBlockHashes().hashCode();
if (hasConsTimeOfLastHandledTxn()) {
hash = (37 * hash) + CONS_TIME_OF_LAST_HANDLED_TXN_FIELD_NUMBER;
hash = (53 * hash) + getConsTimeOfLastHandledTxn().hashCode();
}
hash = (37 * hash) + MIGRATION_RECORDS_STREAMED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMigrationRecordsStreamed());
if (hasFirstConsTimeOfCurrentBlock()) {
hash = (37 * hash) + FIRST_CONS_TIME_OF_CURRENT_BLOCK_FIELD_NUMBER;
hash = (53 * hash) + getFirstConsTimeOfCurrentBlock().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.BlockInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.BlockInfo 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.BlockInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.BlockInfo 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.BlockInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.BlockInfo 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.BlockInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.BlockInfo 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.BlockInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.BlockInfo 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.BlockInfo 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.BlockInfo 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.BlockInfo 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;
}
/**
*
**
* Information about ongoing, most recently completed, and last 256 blocks.
*
*
* Protobuf type {@code proto.BlockInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.BlockInfo)
com.hedera.hashgraph.sdk.proto.BlockInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.BlockInfoOuterClass.internal_static_proto_BlockInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.BlockInfoOuterClass.internal_static_proto_BlockInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.BlockInfo.class, com.hedera.hashgraph.sdk.proto.BlockInfo.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.BlockInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFirstConsTimeOfLastBlockFieldBuilder();
getConsTimeOfLastHandledTxnFieldBuilder();
getFirstConsTimeOfCurrentBlockFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
lastBlockNumber_ = 0L;
firstConsTimeOfLastBlock_ = null;
if (firstConsTimeOfLastBlockBuilder_ != null) {
firstConsTimeOfLastBlockBuilder_.dispose();
firstConsTimeOfLastBlockBuilder_ = null;
}
blockHashes_ = com.google.protobuf.ByteString.EMPTY;
consTimeOfLastHandledTxn_ = null;
if (consTimeOfLastHandledTxnBuilder_ != null) {
consTimeOfLastHandledTxnBuilder_.dispose();
consTimeOfLastHandledTxnBuilder_ = null;
}
migrationRecordsStreamed_ = false;
firstConsTimeOfCurrentBlock_ = null;
if (firstConsTimeOfCurrentBlockBuilder_ != null) {
firstConsTimeOfCurrentBlockBuilder_.dispose();
firstConsTimeOfCurrentBlockBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.BlockInfoOuterClass.internal_static_proto_BlockInfo_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.BlockInfo getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.BlockInfo.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.BlockInfo build() {
com.hedera.hashgraph.sdk.proto.BlockInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.BlockInfo buildPartial() {
com.hedera.hashgraph.sdk.proto.BlockInfo result = new com.hedera.hashgraph.sdk.proto.BlockInfo(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.BlockInfo result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.lastBlockNumber_ = lastBlockNumber_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.firstConsTimeOfLastBlock_ = firstConsTimeOfLastBlockBuilder_ == null
? firstConsTimeOfLastBlock_
: firstConsTimeOfLastBlockBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.blockHashes_ = blockHashes_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.consTimeOfLastHandledTxn_ = consTimeOfLastHandledTxnBuilder_ == null
? consTimeOfLastHandledTxn_
: consTimeOfLastHandledTxnBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.migrationRecordsStreamed_ = migrationRecordsStreamed_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.firstConsTimeOfCurrentBlock_ = firstConsTimeOfCurrentBlockBuilder_ == null
? firstConsTimeOfCurrentBlock_
: firstConsTimeOfCurrentBlockBuilder_.build();
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@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.BlockInfo) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.BlockInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.BlockInfo other) {
if (other == com.hedera.hashgraph.sdk.proto.BlockInfo.getDefaultInstance()) return this;
if (other.getLastBlockNumber() != 0L) {
setLastBlockNumber(other.getLastBlockNumber());
}
if (other.hasFirstConsTimeOfLastBlock()) {
mergeFirstConsTimeOfLastBlock(other.getFirstConsTimeOfLastBlock());
}
if (other.getBlockHashes() != com.google.protobuf.ByteString.EMPTY) {
setBlockHashes(other.getBlockHashes());
}
if (other.hasConsTimeOfLastHandledTxn()) {
mergeConsTimeOfLastHandledTxn(other.getConsTimeOfLastHandledTxn());
}
if (other.getMigrationRecordsStreamed() != false) {
setMigrationRecordsStreamed(other.getMigrationRecordsStreamed());
}
if (other.hasFirstConsTimeOfCurrentBlock()) {
mergeFirstConsTimeOfCurrentBlock(other.getFirstConsTimeOfCurrentBlock());
}
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 8: {
lastBlockNumber_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getFirstConsTimeOfLastBlockFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
blockHashes_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getConsTimeOfLastHandledTxnFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
migrationRecordsStreamed_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50: {
input.readMessage(
getFirstConsTimeOfCurrentBlockFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
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 long lastBlockNumber_ ;
/**
*
**
* The last block number, this is the last completed immutable block.
*
*
* int64 last_block_number = 1;
* @return The lastBlockNumber.
*/
@java.lang.Override
public long getLastBlockNumber() {
return lastBlockNumber_;
}
/**
*
**
* The last block number, this is the last completed immutable block.
*
*
* int64 last_block_number = 1;
* @param value The lastBlockNumber to set.
* @return This builder for chaining.
*/
public Builder setLastBlockNumber(long value) {
lastBlockNumber_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* The last block number, this is the last completed immutable block.
*
*
* int64 last_block_number = 1;
* @return This builder for chaining.
*/
public Builder clearLastBlockNumber() {
bitField0_ = (bitField0_ & ~0x00000001);
lastBlockNumber_ = 0L;
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.Timestamp firstConsTimeOfLastBlock_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> firstConsTimeOfLastBlockBuilder_;
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
* @return Whether the firstConsTimeOfLastBlock field is set.
*/
public boolean hasFirstConsTimeOfLastBlock() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
* @return The firstConsTimeOfLastBlock.
*/
public com.hedera.hashgraph.sdk.proto.Timestamp getFirstConsTimeOfLastBlock() {
if (firstConsTimeOfLastBlockBuilder_ == null) {
return firstConsTimeOfLastBlock_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfLastBlock_;
} else {
return firstConsTimeOfLastBlockBuilder_.getMessage();
}
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
public Builder setFirstConsTimeOfLastBlock(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (firstConsTimeOfLastBlockBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
firstConsTimeOfLastBlock_ = value;
} else {
firstConsTimeOfLastBlockBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
public Builder setFirstConsTimeOfLastBlock(
com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) {
if (firstConsTimeOfLastBlockBuilder_ == null) {
firstConsTimeOfLastBlock_ = builderForValue.build();
} else {
firstConsTimeOfLastBlockBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
public Builder mergeFirstConsTimeOfLastBlock(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (firstConsTimeOfLastBlockBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
firstConsTimeOfLastBlock_ != null &&
firstConsTimeOfLastBlock_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) {
getFirstConsTimeOfLastBlockBuilder().mergeFrom(value);
} else {
firstConsTimeOfLastBlock_ = value;
}
} else {
firstConsTimeOfLastBlockBuilder_.mergeFrom(value);
}
if (firstConsTimeOfLastBlock_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
public Builder clearFirstConsTimeOfLastBlock() {
bitField0_ = (bitField0_ & ~0x00000002);
firstConsTimeOfLastBlock_ = null;
if (firstConsTimeOfLastBlockBuilder_ != null) {
firstConsTimeOfLastBlockBuilder_.dispose();
firstConsTimeOfLastBlockBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getFirstConsTimeOfLastBlockBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getFirstConsTimeOfLastBlockFieldBuilder().getBuilder();
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getFirstConsTimeOfLastBlockOrBuilder() {
if (firstConsTimeOfLastBlockBuilder_ != null) {
return firstConsTimeOfLastBlockBuilder_.getMessageOrBuilder();
} else {
return firstConsTimeOfLastBlock_ == null ?
com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfLastBlock_;
}
}
/**
*
**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*
*
* .proto.Timestamp first_cons_time_of_last_block = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>
getFirstConsTimeOfLastBlockFieldBuilder() {
if (firstConsTimeOfLastBlockBuilder_ == null) {
firstConsTimeOfLastBlockBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>(
getFirstConsTimeOfLastBlock(),
getParentForChildren(),
isClean());
firstConsTimeOfLastBlock_ = null;
}
return firstConsTimeOfLastBlockBuilder_;
}
private com.google.protobuf.ByteString blockHashes_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* SHA384 48 byte hashes of the last 256 blocks in single byte array.
* First 48 bytes is the oldest block.
* Last 48 bytes is the newest block, which is the last fully completed immutable block.
* If we are shortly after genesis and there are less than 256 blocks then this could contain less than 256 hashes.
*
*
* bytes block_hashes = 3;
* @return The blockHashes.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBlockHashes() {
return blockHashes_;
}
/**
*
**
* SHA384 48 byte hashes of the last 256 blocks in single byte array.
* First 48 bytes is the oldest block.
* Last 48 bytes is the newest block, which is the last fully completed immutable block.
* If we are shortly after genesis and there are less than 256 blocks then this could contain less than 256 hashes.
*
*
* bytes block_hashes = 3;
* @param value The blockHashes to set.
* @return This builder for chaining.
*/
public Builder setBlockHashes(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
blockHashes_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* SHA384 48 byte hashes of the last 256 blocks in single byte array.
* First 48 bytes is the oldest block.
* Last 48 bytes is the newest block, which is the last fully completed immutable block.
* If we are shortly after genesis and there are less than 256 blocks then this could contain less than 256 hashes.
*
*
* bytes block_hashes = 3;
* @return This builder for chaining.
*/
public Builder clearBlockHashes() {
bitField0_ = (bitField0_ & ~0x00000004);
blockHashes_ = getDefaultInstance().getBlockHashes();
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.Timestamp consTimeOfLastHandledTxn_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> consTimeOfLastHandledTxnBuilder_;
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
* @return Whether the consTimeOfLastHandledTxn field is set.
*/
public boolean hasConsTimeOfLastHandledTxn() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
* @return The consTimeOfLastHandledTxn.
*/
public com.hedera.hashgraph.sdk.proto.Timestamp getConsTimeOfLastHandledTxn() {
if (consTimeOfLastHandledTxnBuilder_ == null) {
return consTimeOfLastHandledTxn_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consTimeOfLastHandledTxn_;
} else {
return consTimeOfLastHandledTxnBuilder_.getMessage();
}
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
public Builder setConsTimeOfLastHandledTxn(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (consTimeOfLastHandledTxnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consTimeOfLastHandledTxn_ = value;
} else {
consTimeOfLastHandledTxnBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
public Builder setConsTimeOfLastHandledTxn(
com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) {
if (consTimeOfLastHandledTxnBuilder_ == null) {
consTimeOfLastHandledTxn_ = builderForValue.build();
} else {
consTimeOfLastHandledTxnBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
public Builder mergeConsTimeOfLastHandledTxn(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (consTimeOfLastHandledTxnBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
consTimeOfLastHandledTxn_ != null &&
consTimeOfLastHandledTxn_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) {
getConsTimeOfLastHandledTxnBuilder().mergeFrom(value);
} else {
consTimeOfLastHandledTxn_ = value;
}
} else {
consTimeOfLastHandledTxnBuilder_.mergeFrom(value);
}
if (consTimeOfLastHandledTxn_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
public Builder clearConsTimeOfLastHandledTxn() {
bitField0_ = (bitField0_ & ~0x00000008);
consTimeOfLastHandledTxn_ = null;
if (consTimeOfLastHandledTxnBuilder_ != null) {
consTimeOfLastHandledTxnBuilder_.dispose();
consTimeOfLastHandledTxnBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getConsTimeOfLastHandledTxnBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getConsTimeOfLastHandledTxnFieldBuilder().getBuilder();
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getConsTimeOfLastHandledTxnOrBuilder() {
if (consTimeOfLastHandledTxnBuilder_ != null) {
return consTimeOfLastHandledTxnBuilder_.getMessageOrBuilder();
} else {
return consTimeOfLastHandledTxn_ == null ?
com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : consTimeOfLastHandledTxn_;
}
}
/**
*
**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*
*
* .proto.Timestamp cons_time_of_last_handled_txn = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>
getConsTimeOfLastHandledTxnFieldBuilder() {
if (consTimeOfLastHandledTxnBuilder_ == null) {
consTimeOfLastHandledTxnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>(
getConsTimeOfLastHandledTxn(),
getParentForChildren(),
isClean());
consTimeOfLastHandledTxn_ = null;
}
return consTimeOfLastHandledTxnBuilder_;
}
private boolean migrationRecordsStreamed_ ;
/**
*
**
* A flag indicating whether migration records have been published. This property should be marked 'false'
* immediately following a node upgrade, and marked 'true' once the migration records (if any) are published, which
* should happen during the first transaction handled by the node.
*
*
* bool migration_records_streamed = 5;
* @return The migrationRecordsStreamed.
*/
@java.lang.Override
public boolean getMigrationRecordsStreamed() {
return migrationRecordsStreamed_;
}
/**
*
**
* A flag indicating whether migration records have been published. This property should be marked 'false'
* immediately following a node upgrade, and marked 'true' once the migration records (if any) are published, which
* should happen during the first transaction handled by the node.
*
*
* bool migration_records_streamed = 5;
* @param value The migrationRecordsStreamed to set.
* @return This builder for chaining.
*/
public Builder setMigrationRecordsStreamed(boolean value) {
migrationRecordsStreamed_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* A flag indicating whether migration records have been published. This property should be marked 'false'
* immediately following a node upgrade, and marked 'true' once the migration records (if any) are published, which
* should happen during the first transaction handled by the node.
*
*
* bool migration_records_streamed = 5;
* @return This builder for chaining.
*/
public Builder clearMigrationRecordsStreamed() {
bitField0_ = (bitField0_ & ~0x00000010);
migrationRecordsStreamed_ = false;
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.Timestamp firstConsTimeOfCurrentBlock_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> firstConsTimeOfCurrentBlockBuilder_;
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
* @return Whether the firstConsTimeOfCurrentBlock field is set.
*/
public boolean hasFirstConsTimeOfCurrentBlock() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
* @return The firstConsTimeOfCurrentBlock.
*/
public com.hedera.hashgraph.sdk.proto.Timestamp getFirstConsTimeOfCurrentBlock() {
if (firstConsTimeOfCurrentBlockBuilder_ == null) {
return firstConsTimeOfCurrentBlock_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfCurrentBlock_;
} else {
return firstConsTimeOfCurrentBlockBuilder_.getMessage();
}
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
public Builder setFirstConsTimeOfCurrentBlock(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (firstConsTimeOfCurrentBlockBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
firstConsTimeOfCurrentBlock_ = value;
} else {
firstConsTimeOfCurrentBlockBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
public Builder setFirstConsTimeOfCurrentBlock(
com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) {
if (firstConsTimeOfCurrentBlockBuilder_ == null) {
firstConsTimeOfCurrentBlock_ = builderForValue.build();
} else {
firstConsTimeOfCurrentBlockBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
public Builder mergeFirstConsTimeOfCurrentBlock(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (firstConsTimeOfCurrentBlockBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
firstConsTimeOfCurrentBlock_ != null &&
firstConsTimeOfCurrentBlock_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) {
getFirstConsTimeOfCurrentBlockBuilder().mergeFrom(value);
} else {
firstConsTimeOfCurrentBlock_ = value;
}
} else {
firstConsTimeOfCurrentBlockBuilder_.mergeFrom(value);
}
if (firstConsTimeOfCurrentBlock_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
public Builder clearFirstConsTimeOfCurrentBlock() {
bitField0_ = (bitField0_ & ~0x00000020);
firstConsTimeOfCurrentBlock_ = null;
if (firstConsTimeOfCurrentBlockBuilder_ != null) {
firstConsTimeOfCurrentBlockBuilder_.dispose();
firstConsTimeOfCurrentBlockBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getFirstConsTimeOfCurrentBlockBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getFirstConsTimeOfCurrentBlockFieldBuilder().getBuilder();
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getFirstConsTimeOfCurrentBlockOrBuilder() {
if (firstConsTimeOfCurrentBlockBuilder_ != null) {
return firstConsTimeOfCurrentBlockBuilder_.getMessageOrBuilder();
} else {
return firstConsTimeOfCurrentBlock_ == null ?
com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : firstConsTimeOfCurrentBlock_;
}
}
/**
*
**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*
*
* .proto.Timestamp first_cons_time_of_current_block = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>
getFirstConsTimeOfCurrentBlockFieldBuilder() {
if (firstConsTimeOfCurrentBlockBuilder_ == null) {
firstConsTimeOfCurrentBlockBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>(
getFirstConsTimeOfCurrentBlock(),
getParentForChildren(),
isClean());
firstConsTimeOfCurrentBlock_ = null;
}
return firstConsTimeOfCurrentBlockBuilder_;
}
@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:proto.BlockInfo)
}
// @@protoc_insertion_point(class_scope:proto.BlockInfo)
private static final com.hedera.hashgraph.sdk.proto.BlockInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.BlockInfo();
}
public static com.hedera.hashgraph.sdk.proto.BlockInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BlockInfo 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.BlockInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}