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

org.hyperledger.fabric.protos.orderer.SeekInfo Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: orderer/ab.proto
// Protobuf Java Version: 4.28.2

package org.hyperledger.fabric.protos.orderer;

/**
 * 
 * SeekInfo specifies the range of requested blocks to return
 * If the start position is not found, an error is immediately returned
 * Otherwise, blocks are returned until a missing block is encountered, then behavior is dictated
 * by the SeekBehavior specified.
 * 
* * Protobuf type {@code orderer.SeekInfo} */ public final class SeekInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:orderer.SeekInfo) SeekInfoOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, /* minor= */ 28, /* patch= */ 2, /* suffix= */ "", SeekInfo.class.getName()); } // Use SeekInfo.newBuilder() to construct. private SeekInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SeekInfo() { behavior_ = 0; errorResponse_ = 0; contentType_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.orderer.AbProto.internal_static_orderer_SeekInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.orderer.AbProto.internal_static_orderer_SeekInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.orderer.SeekInfo.class, org.hyperledger.fabric.protos.orderer.SeekInfo.Builder.class); } /** *
   * If BLOCK_UNTIL_READY is specified, the reply will block until the requested blocks are available,
   * if FAIL_IF_NOT_READY is specified, the reply will return an error indicating that the block is not
   * found.  To request that all blocks be returned indefinitely as they are created, behavior should be
   * set to BLOCK_UNTIL_READY and the stop should be set to specified with a number of MAX_UINT64
   * 
* * Protobuf enum {@code orderer.SeekInfo.SeekBehavior} */ public enum SeekBehavior implements com.google.protobuf.ProtocolMessageEnum { /** * BLOCK_UNTIL_READY = 0; */ BLOCK_UNTIL_READY(0), /** * FAIL_IF_NOT_READY = 1; */ FAIL_IF_NOT_READY(1), UNRECOGNIZED(-1), ; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, /* minor= */ 28, /* patch= */ 2, /* suffix= */ "", SeekBehavior.class.getName()); } /** * BLOCK_UNTIL_READY = 0; */ public static final int BLOCK_UNTIL_READY_VALUE = 0; /** * FAIL_IF_NOT_READY = 1; */ public static final int FAIL_IF_NOT_READY_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SeekBehavior valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static SeekBehavior forNumber(int value) { switch (value) { case 0: return BLOCK_UNTIL_READY; case 1: return FAIL_IF_NOT_READY; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< SeekBehavior> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public SeekBehavior findValueByNumber(int number) { return SeekBehavior.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.hyperledger.fabric.protos.orderer.SeekInfo.getDescriptor().getEnumTypes().get(0); } private static final SeekBehavior[] VALUES = values(); public static SeekBehavior valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private SeekBehavior(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:orderer.SeekInfo.SeekBehavior) } /** *
   * SeekErrorTolerance indicates to the server how block provider errors should be tolerated.  By default,
   * if the deliver service detects a problem in the underlying block source (typically, in the orderer,
   * a consenter error), it will begin to reject deliver requests.  This is to prevent a client from waiting
   * for blocks from an orderer which is stuck in an errored state.  This is almost always the desired behavior
   * and clients should stick with the default STRICT checking behavior.  However, in some scenarios, particularly
   * when attempting to recover from a crash or other corruption, it's desirable to force an orderer to respond
   * with blocks on a best effort basis, even if the backing consensus implementation is in an errored state.
   * In this case, set the SeekErrorResponse to BEST_EFFORT to ignore the consenter errors.
   * 
* * Protobuf enum {@code orderer.SeekInfo.SeekErrorResponse} */ public enum SeekErrorResponse implements com.google.protobuf.ProtocolMessageEnum { /** * STRICT = 0; */ STRICT(0), /** * BEST_EFFORT = 1; */ BEST_EFFORT(1), UNRECOGNIZED(-1), ; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, /* minor= */ 28, /* patch= */ 2, /* suffix= */ "", SeekErrorResponse.class.getName()); } /** * STRICT = 0; */ public static final int STRICT_VALUE = 0; /** * BEST_EFFORT = 1; */ public static final int BEST_EFFORT_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SeekErrorResponse valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static SeekErrorResponse forNumber(int value) { switch (value) { case 0: return STRICT; case 1: return BEST_EFFORT; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< SeekErrorResponse> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public SeekErrorResponse findValueByNumber(int number) { return SeekErrorResponse.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.hyperledger.fabric.protos.orderer.SeekInfo.getDescriptor().getEnumTypes().get(1); } private static final SeekErrorResponse[] VALUES = values(); public static SeekErrorResponse valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private SeekErrorResponse(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:orderer.SeekInfo.SeekErrorResponse) } /** *
   * SeekContentType indicates what type of content to deliver in response to a request. If BLOCK is specified,
   * the orderer will stream blocks back to the peer. This is the default behavior. If HEADER_WITH_SIG is  specified, the
   * orderer will stream only a the header and the signature, and the payload field will be set to nil. This allows
   * the requester to ascertain that the respective signed block exists in the orderer (or cluster of orderers).
   * 
* * Protobuf enum {@code orderer.SeekInfo.SeekContentType} */ public enum SeekContentType implements com.google.protobuf.ProtocolMessageEnum { /** * BLOCK = 0; */ BLOCK(0), /** * HEADER_WITH_SIG = 1; */ HEADER_WITH_SIG(1), UNRECOGNIZED(-1), ; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, /* minor= */ 28, /* patch= */ 2, /* suffix= */ "", SeekContentType.class.getName()); } /** * BLOCK = 0; */ public static final int BLOCK_VALUE = 0; /** * HEADER_WITH_SIG = 1; */ public static final int HEADER_WITH_SIG_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SeekContentType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static SeekContentType forNumber(int value) { switch (value) { case 0: return BLOCK; case 1: return HEADER_WITH_SIG; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< SeekContentType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public SeekContentType findValueByNumber(int number) { return SeekContentType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.hyperledger.fabric.protos.orderer.SeekInfo.getDescriptor().getEnumTypes().get(2); } private static final SeekContentType[] VALUES = values(); public static SeekContentType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private SeekContentType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:orderer.SeekInfo.SeekContentType) } private int bitField0_; public static final int START_FIELD_NUMBER = 1; private org.hyperledger.fabric.protos.orderer.SeekPosition start_; /** *
   * The position to start the deliver from
   * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; * @return Whether the start field is set. */ @java.lang.Override public boolean hasStart() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * The position to start the deliver from
   * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; * @return The start. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekPosition getStart() { return start_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : start_; } /** *
   * The position to start the deliver from
   * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder getStartOrBuilder() { return start_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : start_; } public static final int STOP_FIELD_NUMBER = 2; private org.hyperledger.fabric.protos.orderer.SeekPosition stop_; /** *
   * The position to stop the deliver
   * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; * @return Whether the stop field is set. */ @java.lang.Override public boolean hasStop() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * The position to stop the deliver
   * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; * @return The stop. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekPosition getStop() { return stop_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : stop_; } /** *
   * The position to stop the deliver
   * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder getStopOrBuilder() { return stop_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : stop_; } public static final int BEHAVIOR_FIELD_NUMBER = 3; private int behavior_ = 0; /** *
   * The behavior when a missing block is encountered
   * 
* * .orderer.SeekInfo.SeekBehavior behavior = 3 [json_name = "behavior"]; * @return The enum numeric value on the wire for behavior. */ @java.lang.Override public int getBehaviorValue() { return behavior_; } /** *
   * The behavior when a missing block is encountered
   * 
* * .orderer.SeekInfo.SeekBehavior behavior = 3 [json_name = "behavior"]; * @return The behavior. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior getBehavior() { org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.forNumber(behavior_); return result == null ? org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.UNRECOGNIZED : result; } public static final int ERROR_RESPONSE_FIELD_NUMBER = 4; private int errorResponse_ = 0; /** *
   * How to respond to errors reported to the deliver service
   * 
* * .orderer.SeekInfo.SeekErrorResponse error_response = 4 [json_name = "errorResponse"]; * @return The enum numeric value on the wire for errorResponse. */ @java.lang.Override public int getErrorResponseValue() { return errorResponse_; } /** *
   * How to respond to errors reported to the deliver service
   * 
* * .orderer.SeekInfo.SeekErrorResponse error_response = 4 [json_name = "errorResponse"]; * @return The errorResponse. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse getErrorResponse() { org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.forNumber(errorResponse_); return result == null ? org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.UNRECOGNIZED : result; } public static final int CONTENT_TYPE_FIELD_NUMBER = 5; private int contentType_ = 0; /** *
   * Defines what type of content to deliver in response to a request
   * 
* * .orderer.SeekInfo.SeekContentType content_type = 5 [json_name = "contentType"]; * @return The enum numeric value on the wire for contentType. */ @java.lang.Override public int getContentTypeValue() { return contentType_; } /** *
   * Defines what type of content to deliver in response to a request
   * 
* * .orderer.SeekInfo.SeekContentType content_type = 5 [json_name = "contentType"]; * @return The contentType. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType getContentType() { org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType.forNumber(contentType_); return result == null ? org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType.UNRECOGNIZED : result; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getStart()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getStop()); } if (behavior_ != org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.BLOCK_UNTIL_READY.getNumber()) { output.writeEnum(3, behavior_); } if (errorResponse_ != org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.STRICT.getNumber()) { output.writeEnum(4, errorResponse_); } if (contentType_ != org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType.BLOCK.getNumber()) { output.writeEnum(5, contentType_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getStart()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getStop()); } if (behavior_ != org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.BLOCK_UNTIL_READY.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, behavior_); } if (errorResponse_ != org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.STRICT.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, errorResponse_); } if (contentType_ != org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType.BLOCK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(5, contentType_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.orderer.SeekInfo)) { return super.equals(obj); } org.hyperledger.fabric.protos.orderer.SeekInfo other = (org.hyperledger.fabric.protos.orderer.SeekInfo) obj; if (hasStart() != other.hasStart()) return false; if (hasStart()) { if (!getStart() .equals(other.getStart())) return false; } if (hasStop() != other.hasStop()) return false; if (hasStop()) { if (!getStop() .equals(other.getStop())) return false; } if (behavior_ != other.behavior_) return false; if (errorResponse_ != other.errorResponse_) return false; if (contentType_ != other.contentType_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasStart()) { hash = (37 * hash) + START_FIELD_NUMBER; hash = (53 * hash) + getStart().hashCode(); } if (hasStop()) { hash = (37 * hash) + STOP_FIELD_NUMBER; hash = (53 * hash) + getStop().hashCode(); } hash = (37 * hash) + BEHAVIOR_FIELD_NUMBER; hash = (53 * hash) + behavior_; hash = (37 * hash) + ERROR_RESPONSE_FIELD_NUMBER; hash = (53 * hash) + errorResponse_; hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + contentType_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.orderer.SeekInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.orderer.SeekInfo 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.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * SeekInfo specifies the range of requested blocks to return
   * If the start position is not found, an error is immediately returned
   * Otherwise, blocks are returned until a missing block is encountered, then behavior is dictated
   * by the SeekBehavior specified.
   * 
* * Protobuf type {@code orderer.SeekInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:orderer.SeekInfo) org.hyperledger.fabric.protos.orderer.SeekInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.orderer.AbProto.internal_static_orderer_SeekInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.orderer.AbProto.internal_static_orderer_SeekInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.orderer.SeekInfo.class, org.hyperledger.fabric.protos.orderer.SeekInfo.Builder.class); } // Construct using org.hyperledger.fabric.protos.orderer.SeekInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getStartFieldBuilder(); getStopFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; start_ = null; if (startBuilder_ != null) { startBuilder_.dispose(); startBuilder_ = null; } stop_ = null; if (stopBuilder_ != null) { stopBuilder_.dispose(); stopBuilder_ = null; } behavior_ = 0; errorResponse_ = 0; contentType_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.orderer.AbProto.internal_static_orderer_SeekInfo_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo getDefaultInstanceForType() { return org.hyperledger.fabric.protos.orderer.SeekInfo.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo build() { org.hyperledger.fabric.protos.orderer.SeekInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo buildPartial() { org.hyperledger.fabric.protos.orderer.SeekInfo result = new org.hyperledger.fabric.protos.orderer.SeekInfo(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.hyperledger.fabric.protos.orderer.SeekInfo result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.start_ = startBuilder_ == null ? start_ : startBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.stop_ = stopBuilder_ == null ? stop_ : stopBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.behavior_ = behavior_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.errorResponse_ = errorResponse_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.contentType_ = contentType_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.orderer.SeekInfo) { return mergeFrom((org.hyperledger.fabric.protos.orderer.SeekInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.orderer.SeekInfo other) { if (other == org.hyperledger.fabric.protos.orderer.SeekInfo.getDefaultInstance()) return this; if (other.hasStart()) { mergeStart(other.getStart()); } if (other.hasStop()) { mergeStop(other.getStop()); } if (other.behavior_ != 0) { setBehaviorValue(other.getBehaviorValue()); } if (other.errorResponse_ != 0) { setErrorResponseValue(other.getErrorResponseValue()); } if (other.contentType_ != 0) { setContentTypeValue(other.getContentTypeValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getStartFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getStopFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 24: { behavior_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { errorResponse_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { contentType_ = input.readEnum(); bitField0_ |= 0x00000010; break; } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private org.hyperledger.fabric.protos.orderer.SeekPosition start_; private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.orderer.SeekPosition, org.hyperledger.fabric.protos.orderer.SeekPosition.Builder, org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder> startBuilder_; /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; * @return Whether the start field is set. */ public boolean hasStart() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; * @return The start. */ public org.hyperledger.fabric.protos.orderer.SeekPosition getStart() { if (startBuilder_ == null) { return start_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : start_; } else { return startBuilder_.getMessage(); } } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ public Builder setStart(org.hyperledger.fabric.protos.orderer.SeekPosition value) { if (startBuilder_ == null) { if (value == null) { throw new NullPointerException(); } start_ = value; } else { startBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ public Builder setStart( org.hyperledger.fabric.protos.orderer.SeekPosition.Builder builderForValue) { if (startBuilder_ == null) { start_ = builderForValue.build(); } else { startBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ public Builder mergeStart(org.hyperledger.fabric.protos.orderer.SeekPosition value) { if (startBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && start_ != null && start_ != org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance()) { getStartBuilder().mergeFrom(value); } else { start_ = value; } } else { startBuilder_.mergeFrom(value); } if (start_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ public Builder clearStart() { bitField0_ = (bitField0_ & ~0x00000001); start_ = null; if (startBuilder_ != null) { startBuilder_.dispose(); startBuilder_ = null; } onChanged(); return this; } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ public org.hyperledger.fabric.protos.orderer.SeekPosition.Builder getStartBuilder() { bitField0_ |= 0x00000001; onChanged(); return getStartFieldBuilder().getBuilder(); } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ public org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder getStartOrBuilder() { if (startBuilder_ != null) { return startBuilder_.getMessageOrBuilder(); } else { return start_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : start_; } } /** *
     * The position to start the deliver from
     * 
* * .orderer.SeekPosition start = 1 [json_name = "start"]; */ private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.orderer.SeekPosition, org.hyperledger.fabric.protos.orderer.SeekPosition.Builder, org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder> getStartFieldBuilder() { if (startBuilder_ == null) { startBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.orderer.SeekPosition, org.hyperledger.fabric.protos.orderer.SeekPosition.Builder, org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder>( getStart(), getParentForChildren(), isClean()); start_ = null; } return startBuilder_; } private org.hyperledger.fabric.protos.orderer.SeekPosition stop_; private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.orderer.SeekPosition, org.hyperledger.fabric.protos.orderer.SeekPosition.Builder, org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder> stopBuilder_; /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; * @return Whether the stop field is set. */ public boolean hasStop() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; * @return The stop. */ public org.hyperledger.fabric.protos.orderer.SeekPosition getStop() { if (stopBuilder_ == null) { return stop_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : stop_; } else { return stopBuilder_.getMessage(); } } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ public Builder setStop(org.hyperledger.fabric.protos.orderer.SeekPosition value) { if (stopBuilder_ == null) { if (value == null) { throw new NullPointerException(); } stop_ = value; } else { stopBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ public Builder setStop( org.hyperledger.fabric.protos.orderer.SeekPosition.Builder builderForValue) { if (stopBuilder_ == null) { stop_ = builderForValue.build(); } else { stopBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ public Builder mergeStop(org.hyperledger.fabric.protos.orderer.SeekPosition value) { if (stopBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && stop_ != null && stop_ != org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance()) { getStopBuilder().mergeFrom(value); } else { stop_ = value; } } else { stopBuilder_.mergeFrom(value); } if (stop_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ public Builder clearStop() { bitField0_ = (bitField0_ & ~0x00000002); stop_ = null; if (stopBuilder_ != null) { stopBuilder_.dispose(); stopBuilder_ = null; } onChanged(); return this; } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ public org.hyperledger.fabric.protos.orderer.SeekPosition.Builder getStopBuilder() { bitField0_ |= 0x00000002; onChanged(); return getStopFieldBuilder().getBuilder(); } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ public org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder getStopOrBuilder() { if (stopBuilder_ != null) { return stopBuilder_.getMessageOrBuilder(); } else { return stop_ == null ? org.hyperledger.fabric.protos.orderer.SeekPosition.getDefaultInstance() : stop_; } } /** *
     * The position to stop the deliver
     * 
* * .orderer.SeekPosition stop = 2 [json_name = "stop"]; */ private com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.orderer.SeekPosition, org.hyperledger.fabric.protos.orderer.SeekPosition.Builder, org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder> getStopFieldBuilder() { if (stopBuilder_ == null) { stopBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.hyperledger.fabric.protos.orderer.SeekPosition, org.hyperledger.fabric.protos.orderer.SeekPosition.Builder, org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder>( getStop(), getParentForChildren(), isClean()); stop_ = null; } return stopBuilder_; } private int behavior_ = 0; /** *
     * The behavior when a missing block is encountered
     * 
* * .orderer.SeekInfo.SeekBehavior behavior = 3 [json_name = "behavior"]; * @return The enum numeric value on the wire for behavior. */ @java.lang.Override public int getBehaviorValue() { return behavior_; } /** *
     * The behavior when a missing block is encountered
     * 
* * .orderer.SeekInfo.SeekBehavior behavior = 3 [json_name = "behavior"]; * @param value The enum numeric value on the wire for behavior to set. * @return This builder for chaining. */ public Builder setBehaviorValue(int value) { behavior_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The behavior when a missing block is encountered
     * 
* * .orderer.SeekInfo.SeekBehavior behavior = 3 [json_name = "behavior"]; * @return The behavior. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior getBehavior() { org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.forNumber(behavior_); return result == null ? org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.UNRECOGNIZED : result; } /** *
     * The behavior when a missing block is encountered
     * 
* * .orderer.SeekInfo.SeekBehavior behavior = 3 [json_name = "behavior"]; * @param value The behavior to set. * @return This builder for chaining. */ public Builder setBehavior(org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; behavior_ = value.getNumber(); onChanged(); return this; } /** *
     * The behavior when a missing block is encountered
     * 
* * .orderer.SeekInfo.SeekBehavior behavior = 3 [json_name = "behavior"]; * @return This builder for chaining. */ public Builder clearBehavior() { bitField0_ = (bitField0_ & ~0x00000004); behavior_ = 0; onChanged(); return this; } private int errorResponse_ = 0; /** *
     * How to respond to errors reported to the deliver service
     * 
* * .orderer.SeekInfo.SeekErrorResponse error_response = 4 [json_name = "errorResponse"]; * @return The enum numeric value on the wire for errorResponse. */ @java.lang.Override public int getErrorResponseValue() { return errorResponse_; } /** *
     * How to respond to errors reported to the deliver service
     * 
* * .orderer.SeekInfo.SeekErrorResponse error_response = 4 [json_name = "errorResponse"]; * @param value The enum numeric value on the wire for errorResponse to set. * @return This builder for chaining. */ public Builder setErrorResponseValue(int value) { errorResponse_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * How to respond to errors reported to the deliver service
     * 
* * .orderer.SeekInfo.SeekErrorResponse error_response = 4 [json_name = "errorResponse"]; * @return The errorResponse. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse getErrorResponse() { org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.forNumber(errorResponse_); return result == null ? org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.UNRECOGNIZED : result; } /** *
     * How to respond to errors reported to the deliver service
     * 
* * .orderer.SeekInfo.SeekErrorResponse error_response = 4 [json_name = "errorResponse"]; * @param value The errorResponse to set. * @return This builder for chaining. */ public Builder setErrorResponse(org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; errorResponse_ = value.getNumber(); onChanged(); return this; } /** *
     * How to respond to errors reported to the deliver service
     * 
* * .orderer.SeekInfo.SeekErrorResponse error_response = 4 [json_name = "errorResponse"]; * @return This builder for chaining. */ public Builder clearErrorResponse() { bitField0_ = (bitField0_ & ~0x00000008); errorResponse_ = 0; onChanged(); return this; } private int contentType_ = 0; /** *
     * Defines what type of content to deliver in response to a request
     * 
* * .orderer.SeekInfo.SeekContentType content_type = 5 [json_name = "contentType"]; * @return The enum numeric value on the wire for contentType. */ @java.lang.Override public int getContentTypeValue() { return contentType_; } /** *
     * Defines what type of content to deliver in response to a request
     * 
* * .orderer.SeekInfo.SeekContentType content_type = 5 [json_name = "contentType"]; * @param value The enum numeric value on the wire for contentType to set. * @return This builder for chaining. */ public Builder setContentTypeValue(int value) { contentType_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Defines what type of content to deliver in response to a request
     * 
* * .orderer.SeekInfo.SeekContentType content_type = 5 [json_name = "contentType"]; * @return The contentType. */ @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType getContentType() { org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType.forNumber(contentType_); return result == null ? org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType.UNRECOGNIZED : result; } /** *
     * Defines what type of content to deliver in response to a request
     * 
* * .orderer.SeekInfo.SeekContentType content_type = 5 [json_name = "contentType"]; * @param value The contentType to set. * @return This builder for chaining. */ public Builder setContentType(org.hyperledger.fabric.protos.orderer.SeekInfo.SeekContentType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; contentType_ = value.getNumber(); onChanged(); return this; } /** *
     * Defines what type of content to deliver in response to a request
     * 
* * .orderer.SeekInfo.SeekContentType content_type = 5 [json_name = "contentType"]; * @return This builder for chaining. */ public Builder clearContentType() { bitField0_ = (bitField0_ & ~0x00000010); contentType_ = 0; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:orderer.SeekInfo) } // @@protoc_insertion_point(class_scope:orderer.SeekInfo) private static final org.hyperledger.fabric.protos.orderer.SeekInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.orderer.SeekInfo(); } public static org.hyperledger.fabric.protos.orderer.SeekInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SeekInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.hyperledger.fabric.protos.orderer.SeekInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy