com.hedera.hapi.block.protoc.PublishStreamResponse Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: block_service.proto
package com.hedera.hapi.block.protoc;
/**
*
**
* A response to writing a block stream.
* This message is sent in response to each Block in a block stream sent
* to a block node. The block stream is sent as a stream of messages, and each
* message MAY be acknowledged with a message of this type.<br/>
* Each `BlockItem` MAY be acknowledged with an `Acknowledgement`
* response. Item acknowledgement is an OPTIONAL feature.<br/>
* Each completed block SHALL be acknowledged with an `Acknowledgement`
* response. Block acknowledgement is a REQUIRED feature.<br/>
* A final response SHALL be sent with an `EndOfStream` status result after
* the last block stream item is received, or when the receiving system
* must end the stream for any reason.<br/>
* If a failure is detected (which may include a block or block item that
* fails validation) an `EndOfStream` response SHALL be sent with a
* relevant error status.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse}
*/
public final class PublishStreamResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.block.PublishStreamResponse)
PublishStreamResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use PublishStreamResponse.newBuilder() to construct.
private PublishStreamResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PublishStreamResponse() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PublishStreamResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PublishStreamResponse(
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 10: {
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder subBuilder = null;
if (responseCase_ == 1) {
subBuilder = ((com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_).toBuilder();
}
response_ =
input.readMessage(com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_);
response_ = subBuilder.buildPartial();
}
responseCase_ = 1;
break;
}
case 18: {
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder subBuilder = null;
if (responseCase_ == 2) {
subBuilder = ((com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_).toBuilder();
}
response_ =
input.readMessage(com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_);
response_ = subBuilder.buildPartial();
}
responseCase_ = 2;
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_PublishStreamResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.class, com.hedera.hapi.block.protoc.PublishStreamResponse.Builder.class);
}
public interface AcknowledgementOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.hedera.hapi.block.PublishStreamResponse.Acknowledgement)
com.google.protobuf.MessageOrBuilder {
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
* @return Whether the blockAck field is set.
*/
boolean hasBlockAck();
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
* @return The blockAck.
*/
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement getBlockAck();
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgementOrBuilder getBlockAckOrBuilder();
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
* @return Whether the itemAck field is set.
*/
boolean hasItemAck();
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
* @return The itemAck.
*/
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement getItemAck();
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgementOrBuilder getItemAckOrBuilder();
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.AcknowledgementsCase getAcknowledgementsCase();
}
/**
*
**
* A response to acknowledge receipt and verification of a single item
* or full block.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.Acknowledgement}
*/
public static final class Acknowledgement extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.block.PublishStreamResponse.Acknowledgement)
AcknowledgementOrBuilder {
private static final long serialVersionUID = 0L;
// Use Acknowledgement.newBuilder() to construct.
private Acknowledgement(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Acknowledgement() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Acknowledgement();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Acknowledgement(
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 10: {
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder subBuilder = null;
if (acknowledgementsCase_ == 1) {
subBuilder = ((com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_).toBuilder();
}
acknowledgements_ =
input.readMessage(com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_);
acknowledgements_ = subBuilder.buildPartial();
}
acknowledgementsCase_ = 1;
break;
}
case 18: {
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder subBuilder = null;
if (acknowledgementsCase_ == 2) {
subBuilder = ((com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_).toBuilder();
}
acknowledgements_ =
input.readMessage(com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_);
acknowledgements_ = subBuilder.buildPartial();
}
acknowledgementsCase_ = 2;
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_PublishStreamResponse_Acknowledgement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_Acknowledgement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.class, com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder.class);
}
private int acknowledgementsCase_ = 0;
private java.lang.Object acknowledgements_;
public enum AcknowledgementsCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
BLOCK_ACK(1),
ITEM_ACK(2),
ACKNOWLEDGEMENTS_NOT_SET(0);
private final int value;
private AcknowledgementsCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AcknowledgementsCase valueOf(int value) {
return forNumber(value);
}
public static AcknowledgementsCase forNumber(int value) {
switch (value) {
case 1: return BLOCK_ACK;
case 2: return ITEM_ACK;
case 0: return ACKNOWLEDGEMENTS_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public AcknowledgementsCase
getAcknowledgementsCase() {
return AcknowledgementsCase.forNumber(
acknowledgementsCase_);
}
public static final int BLOCK_ACK_FIELD_NUMBER = 1;
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
* @return Whether the blockAck field is set.
*/
@java.lang.Override
public boolean hasBlockAck() {
return acknowledgementsCase_ == 1;
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
* @return The blockAck.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement getBlockAck() {
if (acknowledgementsCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance();
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgementOrBuilder getBlockAckOrBuilder() {
if (acknowledgementsCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance();
}
public static final int ITEM_ACK_FIELD_NUMBER = 2;
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
* @return Whether the itemAck field is set.
*/
@java.lang.Override
public boolean hasItemAck() {
return acknowledgementsCase_ == 2;
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
* @return The itemAck.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement getItemAck() {
if (acknowledgementsCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance();
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgementOrBuilder getItemAckOrBuilder() {
if (acknowledgementsCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance();
}
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 (acknowledgementsCase_ == 1) {
output.writeMessage(1, (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_);
}
if (acknowledgementsCase_ == 2) {
output.writeMessage(2, (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (acknowledgementsCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_);
}
if (acknowledgementsCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement)) {
return super.equals(obj);
}
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement other = (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) obj;
if (!getAcknowledgementsCase().equals(other.getAcknowledgementsCase())) return false;
switch (acknowledgementsCase_) {
case 1:
if (!getBlockAck()
.equals(other.getBlockAck())) return false;
break;
case 2:
if (!getItemAck()
.equals(other.getItemAck())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (acknowledgementsCase_) {
case 1:
hash = (37 * hash) + BLOCK_ACK_FIELD_NUMBER;
hash = (53 * hash) + getBlockAck().hashCode();
break;
case 2:
hash = (37 * hash) + ITEM_ACK_FIELD_NUMBER;
hash = (53 * hash) + getItemAck().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement 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 response to acknowledge receipt and verification of a single item
* or full block.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.Acknowledgement}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.block.PublishStreamResponse.Acknowledgement)
com.hedera.hapi.block.protoc.PublishStreamResponse.AcknowledgementOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_Acknowledgement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_Acknowledgement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.class, com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder.class);
}
// Construct using com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.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();
acknowledgementsCase_ = 0;
acknowledgements_ = 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_PublishStreamResponse_Acknowledgement_descriptor;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement getDefaultInstanceForType() {
return com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement build() {
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement buildPartial() {
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement result = new com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement(this);
if (acknowledgementsCase_ == 1) {
if (blockAckBuilder_ == null) {
result.acknowledgements_ = acknowledgements_;
} else {
result.acknowledgements_ = blockAckBuilder_.build();
}
}
if (acknowledgementsCase_ == 2) {
if (itemAckBuilder_ == null) {
result.acknowledgements_ = acknowledgements_;
} else {
result.acknowledgements_ = itemAckBuilder_.build();
}
}
result.acknowledgementsCase_ = acknowledgementsCase_;
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.PublishStreamResponse.Acknowledgement) {
return mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement other) {
if (other == com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance()) return this;
switch (other.getAcknowledgementsCase()) {
case BLOCK_ACK: {
mergeBlockAck(other.getBlockAck());
break;
}
case ITEM_ACK: {
mergeItemAck(other.getItemAck());
break;
}
case ACKNOWLEDGEMENTS_NOT_SET: {
break;
}
}
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.PublishStreamResponse.Acknowledgement parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int acknowledgementsCase_ = 0;
private java.lang.Object acknowledgements_;
public AcknowledgementsCase
getAcknowledgementsCase() {
return AcknowledgementsCase.forNumber(
acknowledgementsCase_);
}
public Builder clearAcknowledgements() {
acknowledgementsCase_ = 0;
acknowledgements_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgementOrBuilder> blockAckBuilder_;
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
* @return Whether the blockAck field is set.
*/
@java.lang.Override
public boolean hasBlockAck() {
return acknowledgementsCase_ == 1;
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
* @return The blockAck.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement getBlockAck() {
if (blockAckBuilder_ == null) {
if (acknowledgementsCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance();
} else {
if (acknowledgementsCase_ == 1) {
return blockAckBuilder_.getMessage();
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance();
}
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
public Builder setBlockAck(com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement value) {
if (blockAckBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
acknowledgements_ = value;
onChanged();
} else {
blockAckBuilder_.setMessage(value);
}
acknowledgementsCase_ = 1;
return this;
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
public Builder setBlockAck(
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder builderForValue) {
if (blockAckBuilder_ == null) {
acknowledgements_ = builderForValue.build();
onChanged();
} else {
blockAckBuilder_.setMessage(builderForValue.build());
}
acknowledgementsCase_ = 1;
return this;
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
public Builder mergeBlockAck(com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement value) {
if (blockAckBuilder_ == null) {
if (acknowledgementsCase_ == 1 &&
acknowledgements_ != com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance()) {
acknowledgements_ = com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.newBuilder((com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_)
.mergeFrom(value).buildPartial();
} else {
acknowledgements_ = value;
}
onChanged();
} else {
if (acknowledgementsCase_ == 1) {
blockAckBuilder_.mergeFrom(value);
}
blockAckBuilder_.setMessage(value);
}
acknowledgementsCase_ = 1;
return this;
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
public Builder clearBlockAck() {
if (blockAckBuilder_ == null) {
if (acknowledgementsCase_ == 1) {
acknowledgementsCase_ = 0;
acknowledgements_ = null;
onChanged();
}
} else {
if (acknowledgementsCase_ == 1) {
acknowledgementsCase_ = 0;
acknowledgements_ = null;
}
blockAckBuilder_.clear();
}
return this;
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder getBlockAckBuilder() {
return getBlockAckFieldBuilder().getBuilder();
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgementOrBuilder getBlockAckOrBuilder() {
if ((acknowledgementsCase_ == 1) && (blockAckBuilder_ != null)) {
return blockAckBuilder_.getMessageOrBuilder();
} else {
if (acknowledgementsCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance();
}
}
/**
*
**
* A response type to acknowledge a full and complete block.
* <p>
* All block node implementations SHOULD acknowledge each block.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement block_ack = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgementOrBuilder>
getBlockAckFieldBuilder() {
if (blockAckBuilder_ == null) {
if (!(acknowledgementsCase_ == 1)) {
acknowledgements_ = com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance();
}
blockAckBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgementOrBuilder>(
(com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) acknowledgements_,
getParentForChildren(),
isClean());
acknowledgements_ = null;
}
acknowledgementsCase_ = 1;
onChanged();;
return blockAckBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgementOrBuilder> itemAckBuilder_;
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
* @return Whether the itemAck field is set.
*/
@java.lang.Override
public boolean hasItemAck() {
return acknowledgementsCase_ == 2;
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
* @return The itemAck.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement getItemAck() {
if (itemAckBuilder_ == null) {
if (acknowledgementsCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance();
} else {
if (acknowledgementsCase_ == 2) {
return itemAckBuilder_.getMessage();
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance();
}
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
public Builder setItemAck(com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement value) {
if (itemAckBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
acknowledgements_ = value;
onChanged();
} else {
itemAckBuilder_.setMessage(value);
}
acknowledgementsCase_ = 2;
return this;
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
public Builder setItemAck(
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder builderForValue) {
if (itemAckBuilder_ == null) {
acknowledgements_ = builderForValue.build();
onChanged();
} else {
itemAckBuilder_.setMessage(builderForValue.build());
}
acknowledgementsCase_ = 2;
return this;
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
public Builder mergeItemAck(com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement value) {
if (itemAckBuilder_ == null) {
if (acknowledgementsCase_ == 2 &&
acknowledgements_ != com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance()) {
acknowledgements_ = com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.newBuilder((com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_)
.mergeFrom(value).buildPartial();
} else {
acknowledgements_ = value;
}
onChanged();
} else {
if (acknowledgementsCase_ == 2) {
itemAckBuilder_.mergeFrom(value);
}
itemAckBuilder_.setMessage(value);
}
acknowledgementsCase_ = 2;
return this;
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
public Builder clearItemAck() {
if (itemAckBuilder_ == null) {
if (acknowledgementsCase_ == 2) {
acknowledgementsCase_ = 0;
acknowledgements_ = null;
onChanged();
}
} else {
if (acknowledgementsCase_ == 2) {
acknowledgementsCase_ = 0;
acknowledgements_ = null;
}
itemAckBuilder_.clear();
}
return this;
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder getItemAckBuilder() {
return getItemAckFieldBuilder().getBuilder();
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgementOrBuilder getItemAckOrBuilder() {
if ((acknowledgementsCase_ == 2) && (itemAckBuilder_ != null)) {
return itemAckBuilder_.getMessageOrBuilder();
} else {
if (acknowledgementsCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance();
}
}
/**
*
**
* A response type to acknowledge a single `BlockItem`.<br/>
* This is an OPTIONAL message and implementations MAY choose to
* only acknowledge full blocks.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement item_ack = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgementOrBuilder>
getItemAckFieldBuilder() {
if (itemAckBuilder_ == null) {
if (!(acknowledgementsCase_ == 2)) {
acknowledgements_ = com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance();
}
itemAckBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgementOrBuilder>(
(com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) acknowledgements_,
getParentForChildren(),
isClean());
acknowledgements_ = null;
}
acknowledgementsCase_ = 2;
onChanged();;
return itemAckBuilder_;
}
@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.block.PublishStreamResponse.Acknowledgement)
}
// @@protoc_insertion_point(class_scope:com.hedera.hapi.block.PublishStreamResponse.Acknowledgement)
private static final com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement();
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Acknowledgement parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Acknowledgement(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ItemAcknowledgementOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement)
com.google.protobuf.MessageOrBuilder {
/**
*
**
* A SHA2-384 hash of the `BlockItem`s received.
* <p>
* This field is REQUIRED.<br/>
* A source system MUST verify that this value matches its own internal
* calculated hash value, and MUST end the stream if the values do not
* match.
*
*
* bytes items_hash = 1;
* @return The itemsHash.
*/
com.google.protobuf.ByteString getItemsHash();
}
/**
*
**
* Acknowledgement for a single repeated `BlockItem`.<br/>
* Most nodes are expected to implement this acknowledgement only for
* debugging and development purposes.
* If a node implements single item acknowledgement, the block node SHALL
* send one `ItemAcknowledgement` for each repeated `BlockItem` received
* and verified.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement}
*/
public static final class ItemAcknowledgement extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement)
ItemAcknowledgementOrBuilder {
private static final long serialVersionUID = 0L;
// Use ItemAcknowledgement.newBuilder() to construct.
private ItemAcknowledgement(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ItemAcknowledgement() {
itemsHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ItemAcknowledgement();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ItemAcknowledgement(
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 10: {
itemsHash_ = input.readBytes();
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_PublishStreamResponse_ItemAcknowledgement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_ItemAcknowledgement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.class, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder.class);
}
public static final int ITEMS_HASH_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString itemsHash_;
/**
*
**
* A SHA2-384 hash of the `BlockItem`s received.
* <p>
* This field is REQUIRED.<br/>
* A source system MUST verify that this value matches its own internal
* calculated hash value, and MUST end the stream if the values do not
* match.
*
*
* bytes items_hash = 1;
* @return The itemsHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getItemsHash() {
return itemsHash_;
}
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 (!itemsHash_.isEmpty()) {
output.writeBytes(1, itemsHash_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!itemsHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, itemsHash_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement)) {
return super.equals(obj);
}
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement other = (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) obj;
if (!getItemsHash()
.equals(other.getItemsHash())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ITEMS_HASH_FIELD_NUMBER;
hash = (53 * hash) + getItemsHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement 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;
}
/**
*
**
* Acknowledgement for a single repeated `BlockItem`.<br/>
* Most nodes are expected to implement this acknowledgement only for
* debugging and development purposes.
* If a node implements single item acknowledgement, the block node SHALL
* send one `ItemAcknowledgement` for each repeated `BlockItem` received
* and verified.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement)
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgementOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_ItemAcknowledgement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_ItemAcknowledgement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.class, com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.Builder.class);
}
// Construct using com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.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();
itemsHash_ = com.google.protobuf.ByteString.EMPTY;
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_PublishStreamResponse_ItemAcknowledgement_descriptor;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement getDefaultInstanceForType() {
return com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement build() {
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement buildPartial() {
com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement result = new com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement(this);
result.itemsHash_ = itemsHash_;
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.PublishStreamResponse.ItemAcknowledgement) {
return mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement other) {
if (other == com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement.getDefaultInstance()) return this;
if (other.getItemsHash() != com.google.protobuf.ByteString.EMPTY) {
setItemsHash(other.getItemsHash());
}
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.PublishStreamResponse.ItemAcknowledgement parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString itemsHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* A SHA2-384 hash of the `BlockItem`s received.
* <p>
* This field is REQUIRED.<br/>
* A source system MUST verify that this value matches its own internal
* calculated hash value, and MUST end the stream if the values do not
* match.
*
*
* bytes items_hash = 1;
* @return The itemsHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getItemsHash() {
return itemsHash_;
}
/**
*
**
* A SHA2-384 hash of the `BlockItem`s received.
* <p>
* This field is REQUIRED.<br/>
* A source system MUST verify that this value matches its own internal
* calculated hash value, and MUST end the stream if the values do not
* match.
*
*
* bytes items_hash = 1;
* @param value The itemsHash to set.
* @return This builder for chaining.
*/
public Builder setItemsHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
itemsHash_ = value;
onChanged();
return this;
}
/**
*
**
* A SHA2-384 hash of the `BlockItem`s received.
* <p>
* This field is REQUIRED.<br/>
* A source system MUST verify that this value matches its own internal
* calculated hash value, and MUST end the stream if the values do not
* match.
*
*
* bytes items_hash = 1;
* @return This builder for chaining.
*/
public Builder clearItemsHash() {
itemsHash_ = getDefaultInstance().getItemsHash();
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.block.PublishStreamResponse.ItemAcknowledgement)
}
// @@protoc_insertion_point(class_scope:com.hedera.hapi.block.PublishStreamResponse.ItemAcknowledgement)
private static final com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement();
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ItemAcknowledgement parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ItemAcknowledgement(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.ItemAcknowledgement getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BlockAcknowledgementOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement)
com.google.protobuf.MessageOrBuilder {
/**
*
**
* A block number number of the acknowledged block.
* <p>
* A source system SHOULD verify that this value matches the block sent.
*
*
* uint64 block_number = 1;
* @return The blockNumber.
*/
long getBlockNumber();
/**
*
**
* A hash of the virtual merkle root for the block.
* <p>
* This SHALL be the hash calculated by the block node for the
* root node of the virtual merkle tree that is signed by the source
* system to validate the block.
*
*
* bytes block_root_hash = 2;
* @return The blockRootHash.
*/
com.google.protobuf.ByteString getBlockRootHash();
/**
*
**
* A flag indicating that the received block duplicates an
* existing block.
* <p>
* If a source system receives acknowledgement with this flag set
* true the source system SHOULD end the stream. The `block_number`
* returned SHALL be the last block known and verified by the receiving
* system, and the source system MAY resume publishing immediately
* after that block.
*
*
* bool block_already_exists = 3;
* @return The blockAlreadyExists.
*/
boolean getBlockAlreadyExists();
}
/**
*
**
* Acknowledgement of a full block.<br/>
* This message is a necessary part of the block streaming protocol.
* This response SHALL be sent after a block state proof item is
* received and verified.<br/>
* The block node SHALL send exactly one `BlockAcknowledgement` for
* each successful block.<br/>
* The `BlockAcknowledgement` response MAY be sent after sending an
* `ItemAcknowledgement` response for the `BlockStateProof` item
* at the end of the block, if item acknowledgement is enabled.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement}
*/
public static final class BlockAcknowledgement extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement)
BlockAcknowledgementOrBuilder {
private static final long serialVersionUID = 0L;
// Use BlockAcknowledgement.newBuilder() to construct.
private BlockAcknowledgement(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BlockAcknowledgement() {
blockRootHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BlockAcknowledgement();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BlockAcknowledgement(
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: {
blockNumber_ = input.readUInt64();
break;
}
case 18: {
blockRootHash_ = input.readBytes();
break;
}
case 24: {
blockAlreadyExists_ = input.readBool();
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_PublishStreamResponse_BlockAcknowledgement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_BlockAcknowledgement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.class, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder.class);
}
public static final int BLOCK_NUMBER_FIELD_NUMBER = 1;
private long blockNumber_;
/**
*
**
* A block number number of the acknowledged block.
* <p>
* A source system SHOULD verify that this value matches the block sent.
*
*
* uint64 block_number = 1;
* @return The blockNumber.
*/
@java.lang.Override
public long getBlockNumber() {
return blockNumber_;
}
public static final int BLOCK_ROOT_HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString blockRootHash_;
/**
*
**
* A hash of the virtual merkle root for the block.
* <p>
* This SHALL be the hash calculated by the block node for the
* root node of the virtual merkle tree that is signed by the source
* system to validate the block.
*
*
* bytes block_root_hash = 2;
* @return The blockRootHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBlockRootHash() {
return blockRootHash_;
}
public static final int BLOCK_ALREADY_EXISTS_FIELD_NUMBER = 3;
private boolean blockAlreadyExists_;
/**
*
**
* A flag indicating that the received block duplicates an
* existing block.
* <p>
* If a source system receives acknowledgement with this flag set
* true the source system SHOULD end the stream. The `block_number`
* returned SHALL be the last block known and verified by the receiving
* system, and the source system MAY resume publishing immediately
* after that block.
*
*
* bool block_already_exists = 3;
* @return The blockAlreadyExists.
*/
@java.lang.Override
public boolean getBlockAlreadyExists() {
return blockAlreadyExists_;
}
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 (!blockRootHash_.isEmpty()) {
output.writeBytes(2, blockRootHash_);
}
if (blockAlreadyExists_ != false) {
output.writeBool(3, blockAlreadyExists_);
}
unknownFields.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 (!blockRootHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, blockRootHash_);
}
if (blockAlreadyExists_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, blockAlreadyExists_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement)) {
return super.equals(obj);
}
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement other = (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) obj;
if (getBlockNumber()
!= other.getBlockNumber()) return false;
if (!getBlockRootHash()
.equals(other.getBlockRootHash())) return false;
if (getBlockAlreadyExists()
!= other.getBlockAlreadyExists()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + BLOCK_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockNumber());
hash = (37 * hash) + BLOCK_ROOT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getBlockRootHash().hashCode();
hash = (37 * hash) + BLOCK_ALREADY_EXISTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBlockAlreadyExists());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement 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;
}
/**
*
**
* Acknowledgement of a full block.<br/>
* This message is a necessary part of the block streaming protocol.
* This response SHALL be sent after a block state proof item is
* received and verified.<br/>
* The block node SHALL send exactly one `BlockAcknowledgement` for
* each successful block.<br/>
* The `BlockAcknowledgement` response MAY be sent after sending an
* `ItemAcknowledgement` response for the `BlockStateProof` item
* at the end of the block, if item acknowledgement is enabled.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement)
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgementOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_BlockAcknowledgement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_BlockAcknowledgement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.class, com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.Builder.class);
}
// Construct using com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.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();
blockNumber_ = 0L;
blockRootHash_ = com.google.protobuf.ByteString.EMPTY;
blockAlreadyExists_ = false;
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_PublishStreamResponse_BlockAcknowledgement_descriptor;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement getDefaultInstanceForType() {
return com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement build() {
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement buildPartial() {
com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement result = new com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement(this);
result.blockNumber_ = blockNumber_;
result.blockRootHash_ = blockRootHash_;
result.blockAlreadyExists_ = blockAlreadyExists_;
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.PublishStreamResponse.BlockAcknowledgement) {
return mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement other) {
if (other == com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement.getDefaultInstance()) return this;
if (other.getBlockNumber() != 0L) {
setBlockNumber(other.getBlockNumber());
}
if (other.getBlockRootHash() != com.google.protobuf.ByteString.EMPTY) {
setBlockRootHash(other.getBlockRootHash());
}
if (other.getBlockAlreadyExists() != false) {
setBlockAlreadyExists(other.getBlockAlreadyExists());
}
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.PublishStreamResponse.BlockAcknowledgement parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long blockNumber_ ;
/**
*
**
* A block number number of the acknowledged block.
* <p>
* A source system SHOULD verify that this value matches the block sent.
*
*
* uint64 block_number = 1;
* @return The blockNumber.
*/
@java.lang.Override
public long getBlockNumber() {
return blockNumber_;
}
/**
*
**
* A block number number of the acknowledged block.
* <p>
* A source system SHOULD verify that this value matches the block sent.
*
*
* uint64 block_number = 1;
* @param value The blockNumber to set.
* @return This builder for chaining.
*/
public Builder setBlockNumber(long value) {
blockNumber_ = value;
onChanged();
return this;
}
/**
*
**
* A block number number of the acknowledged block.
* <p>
* A source system SHOULD verify that this value matches the block sent.
*
*
* uint64 block_number = 1;
* @return This builder for chaining.
*/
public Builder clearBlockNumber() {
blockNumber_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString blockRootHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* A hash of the virtual merkle root for the block.
* <p>
* This SHALL be the hash calculated by the block node for the
* root node of the virtual merkle tree that is signed by the source
* system to validate the block.
*
*
* bytes block_root_hash = 2;
* @return The blockRootHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBlockRootHash() {
return blockRootHash_;
}
/**
*
**
* A hash of the virtual merkle root for the block.
* <p>
* This SHALL be the hash calculated by the block node for the
* root node of the virtual merkle tree that is signed by the source
* system to validate the block.
*
*
* bytes block_root_hash = 2;
* @param value The blockRootHash to set.
* @return This builder for chaining.
*/
public Builder setBlockRootHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
blockRootHash_ = value;
onChanged();
return this;
}
/**
*
**
* A hash of the virtual merkle root for the block.
* <p>
* This SHALL be the hash calculated by the block node for the
* root node of the virtual merkle tree that is signed by the source
* system to validate the block.
*
*
* bytes block_root_hash = 2;
* @return This builder for chaining.
*/
public Builder clearBlockRootHash() {
blockRootHash_ = getDefaultInstance().getBlockRootHash();
onChanged();
return this;
}
private boolean blockAlreadyExists_ ;
/**
*
**
* A flag indicating that the received block duplicates an
* existing block.
* <p>
* If a source system receives acknowledgement with this flag set
* true the source system SHOULD end the stream. The `block_number`
* returned SHALL be the last block known and verified by the receiving
* system, and the source system MAY resume publishing immediately
* after that block.
*
*
* bool block_already_exists = 3;
* @return The blockAlreadyExists.
*/
@java.lang.Override
public boolean getBlockAlreadyExists() {
return blockAlreadyExists_;
}
/**
*
**
* A flag indicating that the received block duplicates an
* existing block.
* <p>
* If a source system receives acknowledgement with this flag set
* true the source system SHOULD end the stream. The `block_number`
* returned SHALL be the last block known and verified by the receiving
* system, and the source system MAY resume publishing immediately
* after that block.
*
*
* bool block_already_exists = 3;
* @param value The blockAlreadyExists to set.
* @return This builder for chaining.
*/
public Builder setBlockAlreadyExists(boolean value) {
blockAlreadyExists_ = value;
onChanged();
return this;
}
/**
*
**
* A flag indicating that the received block duplicates an
* existing block.
* <p>
* If a source system receives acknowledgement with this flag set
* true the source system SHOULD end the stream. The `block_number`
* returned SHALL be the last block known and verified by the receiving
* system, and the source system MAY resume publishing immediately
* after that block.
*
*
* bool block_already_exists = 3;
* @return This builder for chaining.
*/
public Builder clearBlockAlreadyExists() {
blockAlreadyExists_ = false;
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.block.PublishStreamResponse.BlockAcknowledgement)
}
// @@protoc_insertion_point(class_scope:com.hedera.hapi.block.PublishStreamResponse.BlockAcknowledgement)
private static final com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement();
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BlockAcknowledgement parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BlockAcknowledgement(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.BlockAcknowledgement getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EndOfStreamOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.hedera.hapi.block.PublishStreamResponse.EndOfStream)
com.google.protobuf.MessageOrBuilder {
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @return The status.
*/
com.hedera.hapi.block.protoc.PublishStreamResponseCode getStatus();
/**
*
**
* The number of the last completed and _verified_ block.
* <p>
* Nodes SHOULD only end a stream after a block state proof to avoid
* the need to resend items.<br/>
* If status is a failure code, the source node MUST start a new
* stream at the beginning of the first block _following_ this number
* (e.g. if this is 91827362983, then the new stream must start with
* the _header_ for block 91827362984).
*
*
* uint64 block_number = 2;
* @return The blockNumber.
*/
long getBlockNumber();
}
/**
*
**
* A message sent to end a stream.
* This response message SHALL be sent from a block node to a block
* stream source system when a `publishBlockStream` stream ends.<br/>
* This message SHALL be sent exactly once for each `publishBlockStream`
* call.<br/>
* The source system SHALL cease sending block items upon receiving
* this response, and MAY determine the ending state of the stream from
* the `status` enumeration and the `block_number` returned.<br/>
* A source system SHOULD verify that the `block_number` value matches the
* last block sent, and SHOULD resend one or more blocks if the value
* here does not match the expected value.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.EndOfStream}
*/
public static final class EndOfStream extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.block.PublishStreamResponse.EndOfStream)
EndOfStreamOrBuilder {
private static final long serialVersionUID = 0L;
// Use EndOfStream.newBuilder() to construct.
private EndOfStream(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private EndOfStream() {
status_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new EndOfStream();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private EndOfStream(
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: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 16: {
blockNumber_ = input.readUInt64();
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_PublishStreamResponse_EndOfStream_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_EndOfStream_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.class, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder.class);
}
public static final int STATUS_FIELD_NUMBER = 1;
private int status_;
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @return The status.
*/
@java.lang.Override public com.hedera.hapi.block.protoc.PublishStreamResponseCode getStatus() {
@SuppressWarnings("deprecation")
com.hedera.hapi.block.protoc.PublishStreamResponseCode result = com.hedera.hapi.block.protoc.PublishStreamResponseCode.valueOf(status_);
return result == null ? com.hedera.hapi.block.protoc.PublishStreamResponseCode.UNRECOGNIZED : result;
}
public static final int BLOCK_NUMBER_FIELD_NUMBER = 2;
private long blockNumber_;
/**
*
**
* The number of the last completed and _verified_ block.
* <p>
* Nodes SHOULD only end a stream after a block state proof to avoid
* the need to resend items.<br/>
* If status is a failure code, the source node MUST start a new
* stream at the beginning of the first block _following_ this number
* (e.g. if this is 91827362983, then the new stream must start with
* the _header_ for block 91827362984).
*
*
* uint64 block_number = 2;
* @return The blockNumber.
*/
@java.lang.Override
public long getBlockNumber() {
return blockNumber_;
}
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 (status_ != com.hedera.hapi.block.protoc.PublishStreamResponseCode.STREAM_ITEMS_UNKNOWN.getNumber()) {
output.writeEnum(1, status_);
}
if (blockNumber_ != 0L) {
output.writeUInt64(2, blockNumber_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (status_ != com.hedera.hapi.block.protoc.PublishStreamResponseCode.STREAM_ITEMS_UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, status_);
}
if (blockNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, blockNumber_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream)) {
return super.equals(obj);
}
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream other = (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) obj;
if (status_ != other.status_) return false;
if (getBlockNumber()
!= other.getBlockNumber()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
hash = (37 * hash) + BLOCK_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockNumber());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream 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 sent to end a stream.
* This response message SHALL be sent from a block node to a block
* stream source system when a `publishBlockStream` stream ends.<br/>
* This message SHALL be sent exactly once for each `publishBlockStream`
* call.<br/>
* The source system SHALL cease sending block items upon receiving
* this response, and MAY determine the ending state of the stream from
* the `status` enumeration and the `block_number` returned.<br/>
* A source system SHOULD verify that the `block_number` value matches the
* last block sent, and SHOULD resend one or more blocks if the value
* here does not match the expected value.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse.EndOfStream}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.block.PublishStreamResponse.EndOfStream)
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStreamOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_EndOfStream_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_EndOfStream_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.class, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder.class);
}
// Construct using com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.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();
status_ = 0;
blockNumber_ = 0L;
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_PublishStreamResponse_EndOfStream_descriptor;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream getDefaultInstanceForType() {
return com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream build() {
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream buildPartial() {
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream result = new com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream(this);
result.status_ = status_;
result.blockNumber_ = blockNumber_;
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.PublishStreamResponse.EndOfStream) {
return mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream other) {
if (other == com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance()) return this;
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (other.getBlockNumber() != 0L) {
setBlockNumber(other.getBlockNumber());
}
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.PublishStreamResponse.EndOfStream parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int status_ = 0;
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @return The status.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponseCode getStatus() {
@SuppressWarnings("deprecation")
com.hedera.hapi.block.protoc.PublishStreamResponseCode result = com.hedera.hapi.block.protoc.PublishStreamResponseCode.valueOf(status_);
return result == null ? com.hedera.hapi.block.protoc.PublishStreamResponseCode.UNRECOGNIZED : result;
}
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(com.hedera.hapi.block.protoc.PublishStreamResponseCode value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
**
* A response code.
* <p>
* This code indicates the reason the stream ended.<br/>
* This value MUST be set to a non-default value.
*
*
* .com.hedera.hapi.block.PublishStreamResponseCode status = 1;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private long blockNumber_ ;
/**
*
**
* The number of the last completed and _verified_ block.
* <p>
* Nodes SHOULD only end a stream after a block state proof to avoid
* the need to resend items.<br/>
* If status is a failure code, the source node MUST start a new
* stream at the beginning of the first block _following_ this number
* (e.g. if this is 91827362983, then the new stream must start with
* the _header_ for block 91827362984).
*
*
* uint64 block_number = 2;
* @return The blockNumber.
*/
@java.lang.Override
public long getBlockNumber() {
return blockNumber_;
}
/**
*
**
* The number of the last completed and _verified_ block.
* <p>
* Nodes SHOULD only end a stream after a block state proof to avoid
* the need to resend items.<br/>
* If status is a failure code, the source node MUST start a new
* stream at the beginning of the first block _following_ this number
* (e.g. if this is 91827362983, then the new stream must start with
* the _header_ for block 91827362984).
*
*
* uint64 block_number = 2;
* @param value The blockNumber to set.
* @return This builder for chaining.
*/
public Builder setBlockNumber(long value) {
blockNumber_ = value;
onChanged();
return this;
}
/**
*
**
* The number of the last completed and _verified_ block.
* <p>
* Nodes SHOULD only end a stream after a block state proof to avoid
* the need to resend items.<br/>
* If status is a failure code, the source node MUST start a new
* stream at the beginning of the first block _following_ this number
* (e.g. if this is 91827362983, then the new stream must start with
* the _header_ for block 91827362984).
*
*
* uint64 block_number = 2;
* @return This builder for chaining.
*/
public Builder clearBlockNumber() {
blockNumber_ = 0L;
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.block.PublishStreamResponse.EndOfStream)
}
// @@protoc_insertion_point(class_scope:com.hedera.hapi.block.PublishStreamResponse.EndOfStream)
private static final com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream();
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public EndOfStream parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new EndOfStream(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int responseCase_ = 0;
private java.lang.Object response_;
public enum ResponseCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ACKNOWLEDGEMENT(1),
STATUS(2),
RESPONSE_NOT_SET(0);
private final int value;
private ResponseCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ResponseCase valueOf(int value) {
return forNumber(value);
}
public static ResponseCase forNumber(int value) {
switch (value) {
case 1: return ACKNOWLEDGEMENT;
case 2: return STATUS;
case 0: return RESPONSE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ResponseCase
getResponseCase() {
return ResponseCase.forNumber(
responseCase_);
}
public static final int ACKNOWLEDGEMENT_FIELD_NUMBER = 1;
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
* @return Whether the acknowledgement field is set.
*/
@java.lang.Override
public boolean hasAcknowledgement() {
return responseCase_ == 1;
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
* @return The acknowledgement.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement getAcknowledgement() {
if (responseCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance();
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.AcknowledgementOrBuilder getAcknowledgementOrBuilder() {
if (responseCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance();
}
public static final int STATUS_FIELD_NUMBER = 2;
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return responseCase_ == 2;
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
* @return The status.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream getStatus() {
if (responseCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance();
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStreamOrBuilder getStatusOrBuilder() {
if (responseCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance();
}
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 (responseCase_ == 1) {
output.writeMessage(1, (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_);
}
if (responseCase_ == 2) {
output.writeMessage(2, (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (responseCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_);
}
if (responseCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hapi.block.protoc.PublishStreamResponse)) {
return super.equals(obj);
}
com.hedera.hapi.block.protoc.PublishStreamResponse other = (com.hedera.hapi.block.protoc.PublishStreamResponse) obj;
if (!getResponseCase().equals(other.getResponseCase())) return false;
switch (responseCase_) {
case 1:
if (!getAcknowledgement()
.equals(other.getAcknowledgement())) return false;
break;
case 2:
if (!getStatus()
.equals(other.getStatus())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (responseCase_) {
case 1:
hash = (37 * hash) + ACKNOWLEDGEMENT_FIELD_NUMBER;
hash = (53 * hash) + getAcknowledgement().hashCode();
break;
case 2:
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.hedera.hapi.block.protoc.PublishStreamResponse 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 response to writing a block stream.
* This message is sent in response to each Block in a block stream sent
* to a block node. The block stream is sent as a stream of messages, and each
* message MAY be acknowledged with a message of this type.<br/>
* Each `BlockItem` MAY be acknowledged with an `Acknowledgement`
* response. Item acknowledgement is an OPTIONAL feature.<br/>
* Each completed block SHALL be acknowledged with an `Acknowledgement`
* response. Block acknowledgement is a REQUIRED feature.<br/>
* A final response SHALL be sent with an `EndOfStream` status result after
* the last block stream item is received, or when the receiving system
* must end the stream for any reason.<br/>
* If a failure is detected (which may include a block or block item that
* fails validation) an `EndOfStream` response SHALL be sent with a
* relevant error status.
*
*
* Protobuf type {@code com.hedera.hapi.block.PublishStreamResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.block.PublishStreamResponse)
com.hedera.hapi.block.protoc.PublishStreamResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_PublishStreamResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hapi.block.protoc.PublishStreamResponse.class, com.hedera.hapi.block.protoc.PublishStreamResponse.Builder.class);
}
// Construct using com.hedera.hapi.block.protoc.PublishStreamResponse.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();
responseCase_ = 0;
response_ = 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_PublishStreamResponse_descriptor;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse getDefaultInstanceForType() {
return com.hedera.hapi.block.protoc.PublishStreamResponse.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse build() {
com.hedera.hapi.block.protoc.PublishStreamResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse buildPartial() {
com.hedera.hapi.block.protoc.PublishStreamResponse result = new com.hedera.hapi.block.protoc.PublishStreamResponse(this);
if (responseCase_ == 1) {
if (acknowledgementBuilder_ == null) {
result.response_ = response_;
} else {
result.response_ = acknowledgementBuilder_.build();
}
}
if (responseCase_ == 2) {
if (statusBuilder_ == null) {
result.response_ = response_;
} else {
result.response_ = statusBuilder_.build();
}
}
result.responseCase_ = responseCase_;
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.PublishStreamResponse) {
return mergeFrom((com.hedera.hapi.block.protoc.PublishStreamResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hapi.block.protoc.PublishStreamResponse other) {
if (other == com.hedera.hapi.block.protoc.PublishStreamResponse.getDefaultInstance()) return this;
switch (other.getResponseCase()) {
case ACKNOWLEDGEMENT: {
mergeAcknowledgement(other.getAcknowledgement());
break;
}
case STATUS: {
mergeStatus(other.getStatus());
break;
}
case RESPONSE_NOT_SET: {
break;
}
}
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.PublishStreamResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hedera.hapi.block.protoc.PublishStreamResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int responseCase_ = 0;
private java.lang.Object response_;
public ResponseCase
getResponseCase() {
return ResponseCase.forNumber(
responseCase_);
}
public Builder clearResponse() {
responseCase_ = 0;
response_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.AcknowledgementOrBuilder> acknowledgementBuilder_;
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
* @return Whether the acknowledgement field is set.
*/
@java.lang.Override
public boolean hasAcknowledgement() {
return responseCase_ == 1;
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
* @return The acknowledgement.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement getAcknowledgement() {
if (acknowledgementBuilder_ == null) {
if (responseCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance();
} else {
if (responseCase_ == 1) {
return acknowledgementBuilder_.getMessage();
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance();
}
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
public Builder setAcknowledgement(com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement value) {
if (acknowledgementBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
response_ = value;
onChanged();
} else {
acknowledgementBuilder_.setMessage(value);
}
responseCase_ = 1;
return this;
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
public Builder setAcknowledgement(
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder builderForValue) {
if (acknowledgementBuilder_ == null) {
response_ = builderForValue.build();
onChanged();
} else {
acknowledgementBuilder_.setMessage(builderForValue.build());
}
responseCase_ = 1;
return this;
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
public Builder mergeAcknowledgement(com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement value) {
if (acknowledgementBuilder_ == null) {
if (responseCase_ == 1 &&
response_ != com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance()) {
response_ = com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.newBuilder((com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_)
.mergeFrom(value).buildPartial();
} else {
response_ = value;
}
onChanged();
} else {
if (responseCase_ == 1) {
acknowledgementBuilder_.mergeFrom(value);
}
acknowledgementBuilder_.setMessage(value);
}
responseCase_ = 1;
return this;
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
public Builder clearAcknowledgement() {
if (acknowledgementBuilder_ == null) {
if (responseCase_ == 1) {
responseCase_ = 0;
response_ = null;
onChanged();
}
} else {
if (responseCase_ == 1) {
responseCase_ = 0;
response_ = null;
}
acknowledgementBuilder_.clear();
}
return this;
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
public com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder getAcknowledgementBuilder() {
return getAcknowledgementFieldBuilder().getBuilder();
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.AcknowledgementOrBuilder getAcknowledgementOrBuilder() {
if ((responseCase_ == 1) && (acknowledgementBuilder_ != null)) {
return acknowledgementBuilder_.getMessageOrBuilder();
} else {
if (responseCase_ == 1) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance();
}
}
/**
*
**
* A response sent for each block, and optionally for each item.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.Acknowledgement acknowledgement = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.AcknowledgementOrBuilder>
getAcknowledgementFieldBuilder() {
if (acknowledgementBuilder_ == null) {
if (!(responseCase_ == 1)) {
response_ = com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.getDefaultInstance();
}
acknowledgementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement, com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.AcknowledgementOrBuilder>(
(com.hedera.hapi.block.protoc.PublishStreamResponse.Acknowledgement) response_,
getParentForChildren(),
isClean());
response_ = null;
}
responseCase_ = 1;
onChanged();;
return acknowledgementBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStreamOrBuilder> statusBuilder_;
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return responseCase_ == 2;
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
* @return The status.
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream getStatus() {
if (statusBuilder_ == null) {
if (responseCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance();
} else {
if (responseCase_ == 2) {
return statusBuilder_.getMessage();
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance();
}
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
public Builder setStatus(com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
response_ = value;
onChanged();
} else {
statusBuilder_.setMessage(value);
}
responseCase_ = 2;
return this;
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
public Builder setStatus(
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder builderForValue) {
if (statusBuilder_ == null) {
response_ = builderForValue.build();
onChanged();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
responseCase_ = 2;
return this;
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
public Builder mergeStatus(com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream value) {
if (statusBuilder_ == null) {
if (responseCase_ == 2 &&
response_ != com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance()) {
response_ = com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.newBuilder((com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_)
.mergeFrom(value).buildPartial();
} else {
response_ = value;
}
onChanged();
} else {
if (responseCase_ == 2) {
statusBuilder_.mergeFrom(value);
}
statusBuilder_.setMessage(value);
}
responseCase_ = 2;
return this;
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
if (responseCase_ == 2) {
responseCase_ = 0;
response_ = null;
onChanged();
}
} else {
if (responseCase_ == 2) {
responseCase_ = 0;
response_ = null;
}
statusBuilder_.clear();
}
return this;
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder getStatusBuilder() {
return getStatusFieldBuilder().getBuilder();
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStreamOrBuilder getStatusOrBuilder() {
if ((responseCase_ == 2) && (statusBuilder_ != null)) {
return statusBuilder_.getMessageOrBuilder();
} else {
if (responseCase_ == 2) {
return (com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_;
}
return com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance();
}
}
/**
*
**
* A response sent when a stream ends.
*
*
* .com.hedera.hapi.block.PublishStreamResponse.EndOfStream status = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStreamOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
if (!(responseCase_ == 2)) {
response_ = com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.getDefaultInstance();
}
statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream.Builder, com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStreamOrBuilder>(
(com.hedera.hapi.block.protoc.PublishStreamResponse.EndOfStream) response_,
getParentForChildren(),
isClean());
response_ = null;
}
responseCase_ = 2;
onChanged();;
return statusBuilder_;
}
@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.block.PublishStreamResponse)
}
// @@protoc_insertion_point(class_scope:com.hedera.hapi.block.PublishStreamResponse)
private static final com.hedera.hapi.block.protoc.PublishStreamResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hapi.block.protoc.PublishStreamResponse();
}
public static com.hedera.hapi.block.protoc.PublishStreamResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PublishStreamResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PublishStreamResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hapi.block.protoc.PublishStreamResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy