All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hedera.hashgraph.sdk.proto.BlockStreamInfo Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: block_stream_info.proto

// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * A message stored in state to maintain block stream parameters.<br/>
 * Nodes use this information for three purposes.
 * 1. To maintain hash chain continuity at restart and reconnect boundaries.
 * 1. To store historical hashes for implementation of the EVM `BLOCKHASH`
 *    and `PREVRANDAO` opcodes.
 * 1. To track the amount of consensus time that has passed between blocks.
 *
 * This value MUST be updated for every block.<br/>
 * This value MUST be transmitted in the "state changes" section of
 * _each_ block, but MUST be updated at the beginning of the _next_ block.<br/>
 * This value SHALL contain the block hash up to, and including, the
 * immediately prior completed block.
 * 
* * Protobuf type {@code com.hedera.hapi.node.state.blockstream.BlockStreamInfo} */ public final class BlockStreamInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:com.hedera.hapi.node.state.blockstream.BlockStreamInfo) BlockStreamInfoOrBuilder { private static final long serialVersionUID = 0L; // Use BlockStreamInfo.newBuilder() to construct. private BlockStreamInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BlockStreamInfo() { trailingOutputHashes_ = com.google.protobuf.ByteString.EMPTY; trailingBlockHashes_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new BlockStreamInfo(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.BlockStreamInfoOuterClass.internal_static_com_hedera_hapi_node_state_blockstream_BlockStreamInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.BlockStreamInfoOuterClass.internal_static_com_hedera_hapi_node_state_blockstream_BlockStreamInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.BlockStreamInfo.class, com.hedera.hashgraph.sdk.proto.BlockStreamInfo.Builder.class); } private int bitField0_; public static final int BLOCK_NUMBER_FIELD_NUMBER = 1; private long blockNumber_ = 0L; /** *
   **
   * A block number.<br/>
   * This is the current block number.
   * 
* * uint64 block_number = 1; * @return The blockNumber. */ @java.lang.Override public long getBlockNumber() { return blockNumber_; } public static final int BLOCK_TIME_FIELD_NUMBER = 2; private com.hedera.hashgraph.sdk.proto.Timestamp blockTime_; /** *
   **
   * A consensus time for the current block.<br/>
   * This is the _first_ consensus time in the current block, and
   * is used to determine if this block was the first across an
   * important boundary in consensus time, such as UTC midnight.
   * This may also be used to purge entities expiring between the last
   * block time and this time.
   * 
* * .proto.Timestamp block_time = 2; * @return Whether the blockTime field is set. */ @java.lang.Override public boolean hasBlockTime() { return ((bitField0_ & 0x00000001) != 0); } /** *
   **
   * A consensus time for the current block.<br/>
   * This is the _first_ consensus time in the current block, and
   * is used to determine if this block was the first across an
   * important boundary in consensus time, such as UTC midnight.
   * This may also be used to purge entities expiring between the last
   * block time and this time.
   * 
* * .proto.Timestamp block_time = 2; * @return The blockTime. */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Timestamp getBlockTime() { return blockTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : blockTime_; } /** *
   **
   * A consensus time for the current block.<br/>
   * This is the _first_ consensus time in the current block, and
   * is used to determine if this block was the first across an
   * important boundary in consensus time, such as UTC midnight.
   * This may also be used to purge entities expiring between the last
   * block time and this time.
   * 
* * .proto.Timestamp block_time = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getBlockTimeOrBuilder() { return blockTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : blockTime_; } public static final int TRAILING_OUTPUT_HASHES_FIELD_NUMBER = 3; private com.google.protobuf.ByteString trailingOutputHashes_ = com.google.protobuf.ByteString.EMPTY; /** *
   **
   * A concatenation of hash values.<br/>
   * This combines several trailing output block item hashes and
   * is used as a seed value for a pseudo-random number generator.<br/>
   * This is also requiried to implement the EVM `PREVRANDAO` opcode.
   * 
* * bytes trailing_output_hashes = 3; * @return The trailingOutputHashes. */ @java.lang.Override public com.google.protobuf.ByteString getTrailingOutputHashes() { return trailingOutputHashes_; } public static final int TRAILING_BLOCK_HASHES_FIELD_NUMBER = 4; private com.google.protobuf.ByteString trailingBlockHashes_ = com.google.protobuf.ByteString.EMPTY; /** *
   **
   * A concatenation of hash values.<br/>
   * This field combines up to 256 trailing block hashes.
   * <p>
   * If this message is for block number N, then the earliest available
   * hash SHALL be for block number N-256.<br/>
   * The latest available hash SHALL be for block N-1.<br/>
   * This is REQUIRED to implement the EVM `BLOCKHASH` opcode.
   * 
* * bytes trailing_block_hashes = 4; * @return The trailingBlockHashes. */ @java.lang.Override public com.google.protobuf.ByteString getTrailingBlockHashes() { return trailingBlockHashes_; } 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 (blockNumber_ != 0L) { output.writeUInt64(1, blockNumber_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getBlockTime()); } if (!trailingOutputHashes_.isEmpty()) { output.writeBytes(3, trailingOutputHashes_); } if (!trailingBlockHashes_.isEmpty()) { output.writeBytes(4, trailingBlockHashes_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (blockNumber_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, blockNumber_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getBlockTime()); } if (!trailingOutputHashes_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, trailingOutputHashes_); } if (!trailingBlockHashes_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, trailingBlockHashes_); } 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.BlockStreamInfo)) { return super.equals(obj); } com.hedera.hashgraph.sdk.proto.BlockStreamInfo other = (com.hedera.hashgraph.sdk.proto.BlockStreamInfo) obj; if (getBlockNumber() != other.getBlockNumber()) return false; if (hasBlockTime() != other.hasBlockTime()) return false; if (hasBlockTime()) { if (!getBlockTime() .equals(other.getBlockTime())) return false; } if (!getTrailingOutputHashes() .equals(other.getTrailingOutputHashes())) return false; if (!getTrailingBlockHashes() .equals(other.getTrailingBlockHashes())) 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) + BLOCK_NUMBER_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBlockNumber()); if (hasBlockTime()) { hash = (37 * hash) + BLOCK_TIME_FIELD_NUMBER; hash = (53 * hash) + getBlockTime().hashCode(); } hash = (37 * hash) + TRAILING_OUTPUT_HASHES_FIELD_NUMBER; hash = (53 * hash) + getTrailingOutputHashes().hashCode(); hash = (37 * hash) + TRAILING_BLOCK_HASHES_FIELD_NUMBER; hash = (53 * hash) + getTrailingBlockHashes().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hashgraph.sdk.proto.BlockStreamInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.BlockStreamInfo 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.BlockStreamInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.BlockStreamInfo 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.BlockStreamInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.BlockStreamInfo 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.BlockStreamInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.BlockStreamInfo 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.BlockStreamInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.BlockStreamInfo 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.BlockStreamInfo 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.BlockStreamInfo 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.BlockStreamInfo 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 message stored in state to maintain block stream parameters.<br/>
   * Nodes use this information for three purposes.
   * 1. To maintain hash chain continuity at restart and reconnect boundaries.
   * 1. To store historical hashes for implementation of the EVM `BLOCKHASH`
   *    and `PREVRANDAO` opcodes.
   * 1. To track the amount of consensus time that has passed between blocks.
   *
   * This value MUST be updated for every block.<br/>
   * This value MUST be transmitted in the "state changes" section of
   * _each_ block, but MUST be updated at the beginning of the _next_ block.<br/>
   * This value SHALL contain the block hash up to, and including, the
   * immediately prior completed block.
   * 
* * Protobuf type {@code com.hedera.hapi.node.state.blockstream.BlockStreamInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:com.hedera.hapi.node.state.blockstream.BlockStreamInfo) com.hedera.hashgraph.sdk.proto.BlockStreamInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.BlockStreamInfoOuterClass.internal_static_com_hedera_hapi_node_state_blockstream_BlockStreamInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.BlockStreamInfoOuterClass.internal_static_com_hedera_hapi_node_state_blockstream_BlockStreamInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.BlockStreamInfo.class, com.hedera.hashgraph.sdk.proto.BlockStreamInfo.Builder.class); } // Construct using com.hedera.hashgraph.sdk.proto.BlockStreamInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getBlockTimeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; blockNumber_ = 0L; blockTime_ = null; if (blockTimeBuilder_ != null) { blockTimeBuilder_.dispose(); blockTimeBuilder_ = null; } trailingOutputHashes_ = com.google.protobuf.ByteString.EMPTY; trailingBlockHashes_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hedera.hashgraph.sdk.proto.BlockStreamInfoOuterClass.internal_static_com_hedera_hapi_node_state_blockstream_BlockStreamInfo_descriptor; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.BlockStreamInfo getDefaultInstanceForType() { return com.hedera.hashgraph.sdk.proto.BlockStreamInfo.getDefaultInstance(); } @java.lang.Override public com.hedera.hashgraph.sdk.proto.BlockStreamInfo build() { com.hedera.hashgraph.sdk.proto.BlockStreamInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.BlockStreamInfo buildPartial() { com.hedera.hashgraph.sdk.proto.BlockStreamInfo result = new com.hedera.hashgraph.sdk.proto.BlockStreamInfo(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.hedera.hashgraph.sdk.proto.BlockStreamInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.blockNumber_ = blockNumber_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.blockTime_ = blockTimeBuilder_ == null ? blockTime_ : blockTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.trailingOutputHashes_ = trailingOutputHashes_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.trailingBlockHashes_ = trailingBlockHashes_; } 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.BlockStreamInfo) { return mergeFrom((com.hedera.hashgraph.sdk.proto.BlockStreamInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.BlockStreamInfo other) { if (other == com.hedera.hashgraph.sdk.proto.BlockStreamInfo.getDefaultInstance()) return this; if (other.getBlockNumber() != 0L) { setBlockNumber(other.getBlockNumber()); } if (other.hasBlockTime()) { mergeBlockTime(other.getBlockTime()); } if (other.getTrailingOutputHashes() != com.google.protobuf.ByteString.EMPTY) { setTrailingOutputHashes(other.getTrailingOutputHashes()); } if (other.getTrailingBlockHashes() != com.google.protobuf.ByteString.EMPTY) { setTrailingBlockHashes(other.getTrailingBlockHashes()); } 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: { blockNumber_ = input.readUInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage( getBlockTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { trailingOutputHashes_ = input.readBytes(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { trailingBlockHashes_ = input.readBytes(); bitField0_ |= 0x00000008; break; } // case 34 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 blockNumber_ ; /** *
     **
     * A block number.<br/>
     * This is the current block number.
     * 
* * uint64 block_number = 1; * @return The blockNumber. */ @java.lang.Override public long getBlockNumber() { return blockNumber_; } /** *
     **
     * A block number.<br/>
     * This is the current block number.
     * 
* * uint64 block_number = 1; * @param value The blockNumber to set. * @return This builder for chaining. */ public Builder setBlockNumber(long value) { blockNumber_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     **
     * A block number.<br/>
     * This is the current block number.
     * 
* * uint64 block_number = 1; * @return This builder for chaining. */ public Builder clearBlockNumber() { bitField0_ = (bitField0_ & ~0x00000001); blockNumber_ = 0L; onChanged(); return this; } private com.hedera.hashgraph.sdk.proto.Timestamp blockTime_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> blockTimeBuilder_; /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; * @return Whether the blockTime field is set. */ public boolean hasBlockTime() { return ((bitField0_ & 0x00000002) != 0); } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; * @return The blockTime. */ public com.hedera.hashgraph.sdk.proto.Timestamp getBlockTime() { if (blockTimeBuilder_ == null) { return blockTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : blockTime_; } else { return blockTimeBuilder_.getMessage(); } } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; */ public Builder setBlockTime(com.hedera.hashgraph.sdk.proto.Timestamp value) { if (blockTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } blockTime_ = value; } else { blockTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; */ public Builder setBlockTime( com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) { if (blockTimeBuilder_ == null) { blockTime_ = builderForValue.build(); } else { blockTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; */ public Builder mergeBlockTime(com.hedera.hashgraph.sdk.proto.Timestamp value) { if (blockTimeBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && blockTime_ != null && blockTime_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) { getBlockTimeBuilder().mergeFrom(value); } else { blockTime_ = value; } } else { blockTimeBuilder_.mergeFrom(value); } if (blockTime_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; */ public Builder clearBlockTime() { bitField0_ = (bitField0_ & ~0x00000002); blockTime_ = null; if (blockTimeBuilder_ != null) { blockTimeBuilder_.dispose(); blockTimeBuilder_ = null; } onChanged(); return this; } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; */ public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getBlockTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); return getBlockTimeFieldBuilder().getBuilder(); } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 2; */ public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getBlockTimeOrBuilder() { if (blockTimeBuilder_ != null) { return blockTimeBuilder_.getMessageOrBuilder(); } else { return blockTime_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : blockTime_; } } /** *
     **
     * A consensus time for the current block.<br/>
     * This is the _first_ consensus time in the current block, and
     * is used to determine if this block was the first across an
     * important boundary in consensus time, such as UTC midnight.
     * This may also be used to purge entities expiring between the last
     * block time and this time.
     * 
* * .proto.Timestamp block_time = 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> getBlockTimeFieldBuilder() { if (blockTimeBuilder_ == null) { blockTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>( getBlockTime(), getParentForChildren(), isClean()); blockTime_ = null; } return blockTimeBuilder_; } private com.google.protobuf.ByteString trailingOutputHashes_ = com.google.protobuf.ByteString.EMPTY; /** *
     **
     * A concatenation of hash values.<br/>
     * This combines several trailing output block item hashes and
     * is used as a seed value for a pseudo-random number generator.<br/>
     * This is also requiried to implement the EVM `PREVRANDAO` opcode.
     * 
* * bytes trailing_output_hashes = 3; * @return The trailingOutputHashes. */ @java.lang.Override public com.google.protobuf.ByteString getTrailingOutputHashes() { return trailingOutputHashes_; } /** *
     **
     * A concatenation of hash values.<br/>
     * This combines several trailing output block item hashes and
     * is used as a seed value for a pseudo-random number generator.<br/>
     * This is also requiried to implement the EVM `PREVRANDAO` opcode.
     * 
* * bytes trailing_output_hashes = 3; * @param value The trailingOutputHashes to set. * @return This builder for chaining. */ public Builder setTrailingOutputHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } trailingOutputHashes_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     **
     * A concatenation of hash values.<br/>
     * This combines several trailing output block item hashes and
     * is used as a seed value for a pseudo-random number generator.<br/>
     * This is also requiried to implement the EVM `PREVRANDAO` opcode.
     * 
* * bytes trailing_output_hashes = 3; * @return This builder for chaining. */ public Builder clearTrailingOutputHashes() { bitField0_ = (bitField0_ & ~0x00000004); trailingOutputHashes_ = getDefaultInstance().getTrailingOutputHashes(); onChanged(); return this; } private com.google.protobuf.ByteString trailingBlockHashes_ = com.google.protobuf.ByteString.EMPTY; /** *
     **
     * A concatenation of hash values.<br/>
     * This field combines up to 256 trailing block hashes.
     * <p>
     * If this message is for block number N, then the earliest available
     * hash SHALL be for block number N-256.<br/>
     * The latest available hash SHALL be for block N-1.<br/>
     * This is REQUIRED to implement the EVM `BLOCKHASH` opcode.
     * 
* * bytes trailing_block_hashes = 4; * @return The trailingBlockHashes. */ @java.lang.Override public com.google.protobuf.ByteString getTrailingBlockHashes() { return trailingBlockHashes_; } /** *
     **
     * A concatenation of hash values.<br/>
     * This field combines up to 256 trailing block hashes.
     * <p>
     * If this message is for block number N, then the earliest available
     * hash SHALL be for block number N-256.<br/>
     * The latest available hash SHALL be for block N-1.<br/>
     * This is REQUIRED to implement the EVM `BLOCKHASH` opcode.
     * 
* * bytes trailing_block_hashes = 4; * @param value The trailingBlockHashes to set. * @return This builder for chaining. */ public Builder setTrailingBlockHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } trailingBlockHashes_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     **
     * A concatenation of hash values.<br/>
     * This field combines up to 256 trailing block hashes.
     * <p>
     * If this message is for block number N, then the earliest available
     * hash SHALL be for block number N-256.<br/>
     * The latest available hash SHALL be for block N-1.<br/>
     * This is REQUIRED to implement the EVM `BLOCKHASH` opcode.
     * 
* * bytes trailing_block_hashes = 4; * @return This builder for chaining. */ public Builder clearTrailingBlockHashes() { bitField0_ = (bitField0_ & ~0x00000008); trailingBlockHashes_ = getDefaultInstance().getTrailingBlockHashes(); onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:com.hedera.hapi.node.state.blockstream.BlockStreamInfo) } // @@protoc_insertion_point(class_scope:com.hedera.hapi.node.state.blockstream.BlockStreamInfo) private static final com.hedera.hashgraph.sdk.proto.BlockStreamInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.BlockStreamInfo(); } public static com.hedera.hashgraph.sdk.proto.BlockStreamInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BlockStreamInfo 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.BlockStreamInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy