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

com.hedera.hapi.block.protoc.SubscribeStreamResponse Maven / Gradle / Ivy

There is a newer version: 0.57.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: block_service.proto

package com.hedera.hapi.block.protoc;

/**
 * 
 **
 * One item in a stream of `subscribeBlockStream` responses.
 * The block node SHALL respond to a `subscribeBlockStream` request with a
 * stream of `SubscribeStreamResponse` messages.<br/>
 * The block node SHALL stream the full contents of the blocks requested.<br/>
 * The block items SHALL be streamed in order originally produced within
 * a block.<br/>
 * The blocks SHALL be streamed in ascending order by `block_number`.<br/>
 * The block node SHALL end the stream when the last requested block has
 * been sent.<br/>
 * The block node SHALL end the stream with a response code status of SUCCESS
 * when the stream is complete.<br/>
 * The block node SHALL end the stream with a response code status of
 * `READ_STREAM_INVALID_START_BLOCK_NUMBER` if the start block number is
 * greater than the end block number.<br/>
 * The block node SHALL end the stream with a response code status of
 * `READ_STREAM_INSUFFICIENT_BALANCE` if insufficient balance remains to
 * complete the requested stream.
 * The block node SHALL make every reasonable effort to fulfill as much of the
 * request as available balance supports, in the event balance is not
 * sufficient to complete the request.
 * 
* * Protobuf type {@code com.hedera.hapi.block.SubscribeStreamResponse} */ public final class SubscribeStreamResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:com.hedera.hapi.block.SubscribeStreamResponse) SubscribeStreamResponseOrBuilder { private static final long serialVersionUID = 0L; // Use SubscribeStreamResponse.newBuilder() to construct. private SubscribeStreamResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SubscribeStreamResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new SubscribeStreamResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private SubscribeStreamResponse( 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(); responseCase_ = 1; response_ = rawValue; break; } case 18: { com.hedera.hapi.block.protoc.BlockItemSet.Builder subBuilder = null; if (responseCase_ == 2) { subBuilder = ((com.hedera.hapi.block.protoc.BlockItemSet) response_).toBuilder(); } response_ = input.readMessage(com.hedera.hapi.block.protoc.BlockItemSet.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hedera.hapi.block.protoc.BlockItemSet) 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_SubscribeStreamResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_SubscribeStreamResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hapi.block.protoc.SubscribeStreamResponse.class, com.hedera.hapi.block.protoc.SubscribeStreamResponse.Builder.class); } private int responseCase_ = 0; private java.lang.Object response_; public enum ResponseCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { STATUS(1), BLOCK_ITEMS(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 STATUS; case 2: return BLOCK_ITEMS; 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 STATUS_FIELD_NUMBER = 1; /** *
   **
   * A final response item describing the terminal status of this stream.
   * <p>
   * The block node server SHALL end the stream following this message.
   * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @return Whether the status field is set. */ public boolean hasStatus() { return responseCase_ == 1; } /** *
   **
   * A final response item describing the terminal status of this stream.
   * <p>
   * The block node server SHALL end the stream following this message.
   * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @return The enum numeric value on the wire for status. */ public int getStatusValue() { if (responseCase_ == 1) { return (java.lang.Integer) response_; } return 0; } /** *
   **
   * A final response item describing the terminal status of this stream.
   * <p>
   * The block node server SHALL end the stream following this message.
   * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @return The status. */ public com.hedera.hapi.block.protoc.SubscribeStreamResponseCode getStatus() { if (responseCase_ == 1) { @SuppressWarnings("deprecation") com.hedera.hapi.block.protoc.SubscribeStreamResponseCode result = com.hedera.hapi.block.protoc.SubscribeStreamResponseCode.valueOf( (java.lang.Integer) response_); return result == null ? com.hedera.hapi.block.protoc.SubscribeStreamResponseCode.UNRECOGNIZED : result; } return com.hedera.hapi.block.protoc.SubscribeStreamResponseCode.READ_STREAM_UNKNOWN; } public static final int BLOCK_ITEMS_FIELD_NUMBER = 2; /** *
   **
   * A stream response item containing one or more `BlockItem`s.
   * <p>
   * The full stream SHALL consist of many `block_items` messages
   * followed by a single `status` message.
   * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; * @return Whether the blockItems field is set. */ @java.lang.Override public boolean hasBlockItems() { return responseCase_ == 2; } /** *
   **
   * A stream response item containing one or more `BlockItem`s.
   * <p>
   * The full stream SHALL consist of many `block_items` messages
   * followed by a single `status` message.
   * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; * @return The blockItems. */ @java.lang.Override public com.hedera.hapi.block.protoc.BlockItemSet getBlockItems() { if (responseCase_ == 2) { return (com.hedera.hapi.block.protoc.BlockItemSet) response_; } return com.hedera.hapi.block.protoc.BlockItemSet.getDefaultInstance(); } /** *
   **
   * A stream response item containing one or more `BlockItem`s.
   * <p>
   * The full stream SHALL consist of many `block_items` messages
   * followed by a single `status` message.
   * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ @java.lang.Override public com.hedera.hapi.block.protoc.BlockItemSetOrBuilder getBlockItemsOrBuilder() { if (responseCase_ == 2) { return (com.hedera.hapi.block.protoc.BlockItemSet) response_; } return com.hedera.hapi.block.protoc.BlockItemSet.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.writeEnum(1, ((java.lang.Integer) response_)); } if (responseCase_ == 2) { output.writeMessage(2, (com.hedera.hapi.block.protoc.BlockItemSet) 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 .computeEnumSize(1, ((java.lang.Integer) response_)); } if (responseCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.hedera.hapi.block.protoc.BlockItemSet) 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.SubscribeStreamResponse)) { return super.equals(obj); } com.hedera.hapi.block.protoc.SubscribeStreamResponse other = (com.hedera.hapi.block.protoc.SubscribeStreamResponse) obj; if (!getResponseCase().equals(other.getResponseCase())) return false; switch (responseCase_) { case 1: if (getStatusValue() != other.getStatusValue()) return false; break; case 2: if (!getBlockItems() .equals(other.getBlockItems())) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatusValue(); break; case 2: hash = (37 * hash) + BLOCK_ITEMS_FIELD_NUMBER; hash = (53 * hash) + getBlockItems().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hapi.block.protoc.SubscribeStreamResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hapi.block.protoc.SubscribeStreamResponse 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.SubscribeStreamResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hapi.block.protoc.SubscribeStreamResponse 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.SubscribeStreamResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hapi.block.protoc.SubscribeStreamResponse 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.SubscribeStreamResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hapi.block.protoc.SubscribeStreamResponse 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.SubscribeStreamResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hapi.block.protoc.SubscribeStreamResponse 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.SubscribeStreamResponse 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.SubscribeStreamResponse 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.SubscribeStreamResponse 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; } /** *
   **
   * One item in a stream of `subscribeBlockStream` responses.
   * The block node SHALL respond to a `subscribeBlockStream` request with a
   * stream of `SubscribeStreamResponse` messages.<br/>
   * The block node SHALL stream the full contents of the blocks requested.<br/>
   * The block items SHALL be streamed in order originally produced within
   * a block.<br/>
   * The blocks SHALL be streamed in ascending order by `block_number`.<br/>
   * The block node SHALL end the stream when the last requested block has
   * been sent.<br/>
   * The block node SHALL end the stream with a response code status of SUCCESS
   * when the stream is complete.<br/>
   * The block node SHALL end the stream with a response code status of
   * `READ_STREAM_INVALID_START_BLOCK_NUMBER` if the start block number is
   * greater than the end block number.<br/>
   * The block node SHALL end the stream with a response code status of
   * `READ_STREAM_INSUFFICIENT_BALANCE` if insufficient balance remains to
   * complete the requested stream.
   * The block node SHALL make every reasonable effort to fulfill as much of the
   * request as available balance supports, in the event balance is not
   * sufficient to complete the request.
   * 
* * Protobuf type {@code com.hedera.hapi.block.SubscribeStreamResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:com.hedera.hapi.block.SubscribeStreamResponse) com.hedera.hapi.block.protoc.SubscribeStreamResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_SubscribeStreamResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hapi.block.protoc.BlockService.internal_static_com_hedera_hapi_block_SubscribeStreamResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hapi.block.protoc.SubscribeStreamResponse.class, com.hedera.hapi.block.protoc.SubscribeStreamResponse.Builder.class); } // Construct using com.hedera.hapi.block.protoc.SubscribeStreamResponse.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_SubscribeStreamResponse_descriptor; } @java.lang.Override public com.hedera.hapi.block.protoc.SubscribeStreamResponse getDefaultInstanceForType() { return com.hedera.hapi.block.protoc.SubscribeStreamResponse.getDefaultInstance(); } @java.lang.Override public com.hedera.hapi.block.protoc.SubscribeStreamResponse build() { com.hedera.hapi.block.protoc.SubscribeStreamResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hapi.block.protoc.SubscribeStreamResponse buildPartial() { com.hedera.hapi.block.protoc.SubscribeStreamResponse result = new com.hedera.hapi.block.protoc.SubscribeStreamResponse(this); if (responseCase_ == 1) { result.response_ = response_; } if (responseCase_ == 2) { if (blockItemsBuilder_ == null) { result.response_ = response_; } else { result.response_ = blockItemsBuilder_.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.SubscribeStreamResponse) { return mergeFrom((com.hedera.hapi.block.protoc.SubscribeStreamResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hapi.block.protoc.SubscribeStreamResponse other) { if (other == com.hedera.hapi.block.protoc.SubscribeStreamResponse.getDefaultInstance()) return this; switch (other.getResponseCase()) { case STATUS: { setStatusValue(other.getStatusValue()); break; } case BLOCK_ITEMS: { mergeBlockItems(other.getBlockItems()); 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.SubscribeStreamResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hedera.hapi.block.protoc.SubscribeStreamResponse) 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; } /** *
     **
     * A final response item describing the terminal status of this stream.
     * <p>
     * The block node server SHALL end the stream following this message.
     * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @return Whether the status field is set. */ @java.lang.Override public boolean hasStatus() { return responseCase_ == 1; } /** *
     **
     * A final response item describing the terminal status of this stream.
     * <p>
     * The block node server SHALL end the stream following this message.
     * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { if (responseCase_ == 1) { return ((java.lang.Integer) response_).intValue(); } return 0; } /** *
     **
     * A final response item describing the terminal status of this stream.
     * <p>
     * The block node server SHALL end the stream following this message.
     * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode 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) { responseCase_ = 1; response_ = value; onChanged(); return this; } /** *
     **
     * A final response item describing the terminal status of this stream.
     * <p>
     * The block node server SHALL end the stream following this message.
     * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @return The status. */ @java.lang.Override public com.hedera.hapi.block.protoc.SubscribeStreamResponseCode getStatus() { if (responseCase_ == 1) { @SuppressWarnings("deprecation") com.hedera.hapi.block.protoc.SubscribeStreamResponseCode result = com.hedera.hapi.block.protoc.SubscribeStreamResponseCode.valueOf( (java.lang.Integer) response_); return result == null ? com.hedera.hapi.block.protoc.SubscribeStreamResponseCode.UNRECOGNIZED : result; } return com.hedera.hapi.block.protoc.SubscribeStreamResponseCode.READ_STREAM_UNKNOWN; } /** *
     **
     * A final response item describing the terminal status of this stream.
     * <p>
     * The block node server SHALL end the stream following this message.
     * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(com.hedera.hapi.block.protoc.SubscribeStreamResponseCode value) { if (value == null) { throw new NullPointerException(); } responseCase_ = 1; response_ = value.getNumber(); onChanged(); return this; } /** *
     **
     * A final response item describing the terminal status of this stream.
     * <p>
     * The block node server SHALL end the stream following this message.
     * 
* * .com.hedera.hapi.block.SubscribeStreamResponseCode status = 1; * @return This builder for chaining. */ public Builder clearStatus() { if (responseCase_ == 1) { responseCase_ = 0; response_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hapi.block.protoc.BlockItemSet, com.hedera.hapi.block.protoc.BlockItemSet.Builder, com.hedera.hapi.block.protoc.BlockItemSetOrBuilder> blockItemsBuilder_; /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; * @return Whether the blockItems field is set. */ @java.lang.Override public boolean hasBlockItems() { return responseCase_ == 2; } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; * @return The blockItems. */ @java.lang.Override public com.hedera.hapi.block.protoc.BlockItemSet getBlockItems() { if (blockItemsBuilder_ == null) { if (responseCase_ == 2) { return (com.hedera.hapi.block.protoc.BlockItemSet) response_; } return com.hedera.hapi.block.protoc.BlockItemSet.getDefaultInstance(); } else { if (responseCase_ == 2) { return blockItemsBuilder_.getMessage(); } return com.hedera.hapi.block.protoc.BlockItemSet.getDefaultInstance(); } } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ public Builder setBlockItems(com.hedera.hapi.block.protoc.BlockItemSet value) { if (blockItemsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } response_ = value; onChanged(); } else { blockItemsBuilder_.setMessage(value); } responseCase_ = 2; return this; } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ public Builder setBlockItems( com.hedera.hapi.block.protoc.BlockItemSet.Builder builderForValue) { if (blockItemsBuilder_ == null) { response_ = builderForValue.build(); onChanged(); } else { blockItemsBuilder_.setMessage(builderForValue.build()); } responseCase_ = 2; return this; } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ public Builder mergeBlockItems(com.hedera.hapi.block.protoc.BlockItemSet value) { if (blockItemsBuilder_ == null) { if (responseCase_ == 2 && response_ != com.hedera.hapi.block.protoc.BlockItemSet.getDefaultInstance()) { response_ = com.hedera.hapi.block.protoc.BlockItemSet.newBuilder((com.hedera.hapi.block.protoc.BlockItemSet) response_) .mergeFrom(value).buildPartial(); } else { response_ = value; } onChanged(); } else { if (responseCase_ == 2) { blockItemsBuilder_.mergeFrom(value); } blockItemsBuilder_.setMessage(value); } responseCase_ = 2; return this; } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ public Builder clearBlockItems() { if (blockItemsBuilder_ == null) { if (responseCase_ == 2) { responseCase_ = 0; response_ = null; onChanged(); } } else { if (responseCase_ == 2) { responseCase_ = 0; response_ = null; } blockItemsBuilder_.clear(); } return this; } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ public com.hedera.hapi.block.protoc.BlockItemSet.Builder getBlockItemsBuilder() { return getBlockItemsFieldBuilder().getBuilder(); } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ @java.lang.Override public com.hedera.hapi.block.protoc.BlockItemSetOrBuilder getBlockItemsOrBuilder() { if ((responseCase_ == 2) && (blockItemsBuilder_ != null)) { return blockItemsBuilder_.getMessageOrBuilder(); } else { if (responseCase_ == 2) { return (com.hedera.hapi.block.protoc.BlockItemSet) response_; } return com.hedera.hapi.block.protoc.BlockItemSet.getDefaultInstance(); } } /** *
     **
     * A stream response item containing one or more `BlockItem`s.
     * <p>
     * The full stream SHALL consist of many `block_items` messages
     * followed by a single `status` message.
     * 
* * .com.hedera.hapi.block.BlockItemSet block_items = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hapi.block.protoc.BlockItemSet, com.hedera.hapi.block.protoc.BlockItemSet.Builder, com.hedera.hapi.block.protoc.BlockItemSetOrBuilder> getBlockItemsFieldBuilder() { if (blockItemsBuilder_ == null) { if (!(responseCase_ == 2)) { response_ = com.hedera.hapi.block.protoc.BlockItemSet.getDefaultInstance(); } blockItemsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hapi.block.protoc.BlockItemSet, com.hedera.hapi.block.protoc.BlockItemSet.Builder, com.hedera.hapi.block.protoc.BlockItemSetOrBuilder>( (com.hedera.hapi.block.protoc.BlockItemSet) response_, getParentForChildren(), isClean()); response_ = null; } responseCase_ = 2; onChanged();; return blockItemsBuilder_; } @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.SubscribeStreamResponse) } // @@protoc_insertion_point(class_scope:com.hedera.hapi.block.SubscribeStreamResponse) private static final com.hedera.hapi.block.protoc.SubscribeStreamResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hapi.block.protoc.SubscribeStreamResponse(); } public static com.hedera.hapi.block.protoc.SubscribeStreamResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SubscribeStreamResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new SubscribeStreamResponse(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.SubscribeStreamResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy