Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: block_service.proto
package com.hedera.hapi.block.protoc;
/**
*
**
* A response to a server status request.
* This message SHALL provide a client with information needed to successfully
* query this block node server for a block, stream of blocks, or
* state snapshot.<br/>
* A request for blocks between `first_available_block` and
* `last_available_block`, inclusive, SHOULD succeed. Any request for blocks
* outside that range SHOULD fail.
*
*
* Protobuf type {@code com.hedera.hapi.block.ServerStatusResponse}
*/
public final class ServerStatusResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.block.ServerStatusResponse)
ServerStatusResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use ServerStatusResponse.newBuilder() to construct.
private ServerStatusResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServerStatusResponse() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ServerStatusResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ServerStatusResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
firstAvailableBlock_ = input.readUInt64();
break;
}
case 16: {
lastAvailableBlock_ = input.readUInt64();
break;
}
case 24: {
onlyLatestState_ = input.readBool();
break;
}
case 34: {
com.hedera.hapi.block.protoc.BlockNodeVersions.Builder subBuilder = null;
if (versionInformation_ != null) {
subBuilder = versionInformation_.toBuilder();
}
versionInformation_ = input.readMessage(com.hedera.hapi.block.protoc.BlockNodeVersions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(versionInformation_);
versionInformation_ = 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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_ServerStatusResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_ServerStatusResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.ServerStatusResponse.class, com.hedera.hapi.block.protoc.ServerStatusResponse.Builder.class);
}
public static final int FIRST_AVAILABLE_BLOCK_FIELD_NUMBER = 1;
private long firstAvailableBlock_;
/**
*
**
* The lowest numbered block available on this block node server.
* <p>
* Any request for a block with lower number than this value SHALL fail
* with a status value indicating and invalid start block number.
*
*
* uint64 first_available_block = 1;
* @return The firstAvailableBlock.
*/
@java.lang.Override
public long getFirstAvailableBlock() {
return firstAvailableBlock_;
}
public static final int LAST_AVAILABLE_BLOCK_FIELD_NUMBER = 2;
private long lastAvailableBlock_;
/**
*
**
* The greatest block number available from this block node server.
* <p>
* Any request for a block with a block number higher than this
* value MAY fail.
*
*
* uint64 last_available_block = 2;
* @return The lastAvailableBlock.
*/
@java.lang.Override
public long getLastAvailableBlock() {
return lastAvailableBlock_;
}
public static final int ONLY_LATEST_STATE_FIELD_NUMBER = 3;
private boolean onlyLatestState_;
/**
*
**
* A flag indicating this block node only offers the latest state snapshot.
* <p>
* If this value is `true` the client MUST set `retrieve_latest` `true`
* in any `StateSnapshotRequest` sent to this block node.
*
*
* bool only_latest_state = 3;
* @return The onlyLatestState.
*/
@java.lang.Override
public boolean getOnlyLatestState() {
return onlyLatestState_;
}
public static final int VERSION_INFORMATION_FIELD_NUMBER = 4;
private com.hedera.hapi.block.protoc.BlockNodeVersions versionInformation_;
/**
*
**
* Version information.<br/>
* Versions for the block network address book, block stream protocol
* buffer schema, and block node software.
*
*
* .com.hedera.hapi.block.BlockNodeVersions version_information = 4;
* @return Whether the versionInformation field is set.
*/
@java.lang.Override
public boolean hasVersionInformation() {
return versionInformation_ != null;
}
/**
*
**
* Version information.<br/>
* Versions for the block network address book, block stream protocol
* buffer schema, and block node software.
*
**
* A response to a server status request.
* This message SHALL provide a client with information needed to successfully
* query this block node server for a block, stream of blocks, or
* state snapshot.<br/>
* A request for blocks between `first_available_block` and
* `last_available_block`, inclusive, SHOULD succeed. Any request for blocks
* outside that range SHOULD fail.
*
*
* Protobuf type {@code com.hedera.hapi.block.ServerStatusResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.block.ServerStatusResponse)
com.hedera.hapi.block.protoc.ServerStatusResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_ServerStatusResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_ServerStatusResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.ServerStatusResponse.class, com.hedera.hapi.block.protoc.ServerStatusResponse.Builder.class);
}
// Construct using com.hedera.hapi.block.protoc.ServerStatusResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
firstAvailableBlock_ = 0L;
lastAvailableBlock_ = 0L;
onlyLatestState_ = false;
if (versionInformationBuilder_ == null) {
versionInformation_ = null;
} else {
versionInformation_ = null;
versionInformationBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_ServerStatusResponse_descriptor;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.ServerStatusResponse getDefaultInstanceForType() {
return com.hedera.hapi.block.protoc.ServerStatusResponse.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hapi.block.protoc.ServerStatusResponse build() {
com.hedera.hapi.block.protoc.ServerStatusResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.ServerStatusResponse buildPartial() {
com.hedera.hapi.block.protoc.ServerStatusResponse result = new com.hedera.hapi.block.protoc.ServerStatusResponse(this);
result.firstAvailableBlock_ = firstAvailableBlock_;
result.lastAvailableBlock_ = lastAvailableBlock_;
result.onlyLatestState_ = onlyLatestState_;
if (versionInformationBuilder_ == null) {
result.versionInformation_ = versionInformation_;
} else {
result.versionInformation_ = versionInformationBuilder_.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.block.protoc.ServerStatusResponse) {
return mergeFrom((com.hedera.hapi.block.protoc.ServerStatusResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hapi.block.protoc.ServerStatusResponse other) {
if (other == com.hedera.hapi.block.protoc.ServerStatusResponse.getDefaultInstance()) return this;
if (other.getFirstAvailableBlock() != 0L) {
setFirstAvailableBlock(other.getFirstAvailableBlock());
}
if (other.getLastAvailableBlock() != 0L) {
setLastAvailableBlock(other.getLastAvailableBlock());
}
if (other.getOnlyLatestState() != false) {
setOnlyLatestState(other.getOnlyLatestState());
}
if (other.hasVersionInformation()) {
mergeVersionInformation(other.getVersionInformation());
}
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.block.protoc.ServerStatusResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.hapi.block.protoc.ServerStatusResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long firstAvailableBlock_ ;
/**
*
**
* The lowest numbered block available on this block node server.
* <p>
* Any request for a block with lower number than this value SHALL fail
* with a status value indicating and invalid start block number.
*
*
* uint64 first_available_block = 1;
* @return The firstAvailableBlock.
*/
@java.lang.Override
public long getFirstAvailableBlock() {
return firstAvailableBlock_;
}
/**
*
**
* The lowest numbered block available on this block node server.
* <p>
* Any request for a block with lower number than this value SHALL fail
* with a status value indicating and invalid start block number.
*
*
* uint64 first_available_block = 1;
* @param value The firstAvailableBlock to set.
* @return This builder for chaining.
*/
public Builder setFirstAvailableBlock(long value) {
firstAvailableBlock_ = value;
onChanged();
return this;
}
/**
*
**
* The lowest numbered block available on this block node server.
* <p>
* Any request for a block with lower number than this value SHALL fail
* with a status value indicating and invalid start block number.
*
*
* uint64 first_available_block = 1;
* @return This builder for chaining.
*/
public Builder clearFirstAvailableBlock() {
firstAvailableBlock_ = 0L;
onChanged();
return this;
}
private long lastAvailableBlock_ ;
/**
*
**
* The greatest block number available from this block node server.
* <p>
* Any request for a block with a block number higher than this
* value MAY fail.
*
*
* uint64 last_available_block = 2;
* @return The lastAvailableBlock.
*/
@java.lang.Override
public long getLastAvailableBlock() {
return lastAvailableBlock_;
}
/**
*
**
* The greatest block number available from this block node server.
* <p>
* Any request for a block with a block number higher than this
* value MAY fail.
*
*
* uint64 last_available_block = 2;
* @param value The lastAvailableBlock to set.
* @return This builder for chaining.
*/
public Builder setLastAvailableBlock(long value) {
lastAvailableBlock_ = value;
onChanged();
return this;
}
/**
*
**
* The greatest block number available from this block node server.
* <p>
* Any request for a block with a block number higher than this
* value MAY fail.
*
*
* uint64 last_available_block = 2;
* @return This builder for chaining.
*/
public Builder clearLastAvailableBlock() {
lastAvailableBlock_ = 0L;
onChanged();
return this;
}
private boolean onlyLatestState_ ;
/**
*
**
* A flag indicating this block node only offers the latest state snapshot.
* <p>
* If this value is `true` the client MUST set `retrieve_latest` `true`
* in any `StateSnapshotRequest` sent to this block node.
*
**
* A flag indicating this block node only offers the latest state snapshot.
* <p>
* If this value is `true` the client MUST set `retrieve_latest` `true`
* in any `StateSnapshotRequest` sent to this block node.
*
*
* bool only_latest_state = 3;
* @param value The onlyLatestState to set.
* @return This builder for chaining.
*/
public Builder setOnlyLatestState(boolean value) {
onlyLatestState_ = value;
onChanged();
return this;
}
/**
*
**
* A flag indicating this block node only offers the latest state snapshot.
* <p>
* If this value is `true` the client MUST set `retrieve_latest` `true`
* in any `StateSnapshotRequest` sent to this block node.
*