Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: orderer/ab.proto
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.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:orderer.SeekInfo)
SeekInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use SeekInfo.newBuilder() to construct.
private SeekInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private SeekInfo() {
behavior_ = 0;
errorResponse_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SeekInfo();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SeekInfo(
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: {
org.hyperledger.fabric.protos.orderer.SeekPosition.Builder subBuilder = null;
if (start_ != null) {
subBuilder = start_.toBuilder();
}
start_ = input.readMessage(org.hyperledger.fabric.protos.orderer.SeekPosition.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(start_);
start_ = subBuilder.buildPartial();
}
break;
}
case 18: {
org.hyperledger.fabric.protos.orderer.SeekPosition.Builder subBuilder = null;
if (stop_ != null) {
subBuilder = stop_.toBuilder();
}
stop_ = input.readMessage(org.hyperledger.fabric.protos.orderer.SeekPosition.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(stop_);
stop_ = subBuilder.buildPartial();
}
break;
}
case 24: {
int rawValue = input.readEnum();
behavior_ = rawValue;
break;
}
case 32: {
int rawValue = input.readEnum();
errorResponse_ = rawValue;
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 org.hyperledger.fabric.protos.orderer.AbProto.internal_static_orderer_SeekInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.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),
;
/**
* 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),
;
/**
* 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)
}
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 start_ != null;
}
/**
*
*
* .orderer.SeekPosition stop = 2 [json_name = "stop"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.orderer.SeekPositionOrBuilder getStopOrBuilder() {
return getStop();
}
public static final int BEHAVIOR_FIELD_NUMBER = 3;
private int behavior_;
/**
*
* 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() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.valueOf(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_;
/**
*
* 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() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.valueOf(errorResponse_);
return result == null ? org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.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 (start_ != null) {
output.writeMessage(1, getStart());
}
if (stop_ != null) {
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_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (start_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getStart());
}
if (stop_ != null) {
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_);
}
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 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 (!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();
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 = (29 * hash) + unknownFields.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.GeneratedMessageV3
.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.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(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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (startBuilder_ == null) {
start_ = null;
} else {
start_ = null;
startBuilder_ = null;
}
if (stopBuilder_ == null) {
stop_ = null;
} else {
stop_ = null;
stopBuilder_ = null;
}
behavior_ = 0;
errorResponse_ = 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 (startBuilder_ == null) {
result.start_ = start_;
} else {
result.start_ = startBuilder_.build();
}
if (stopBuilder_ == null) {
result.stop_ = stop_;
} else {
result.stop_ = stopBuilder_.build();
}
result.behavior_ = behavior_;
result.errorResponse_ = errorResponse_;
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 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());
}
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 {
org.hyperledger.fabric.protos.orderer.SeekInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.orderer.SeekInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.fabric.protos.orderer.SeekPosition start_;
private com.google.protobuf.SingleFieldBuilderV3<
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 startBuilder_ != null || start_ != null;
}
/**
*
* 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;
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() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekBehavior.valueOf(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();
}
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() {
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;
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() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse result = org.hyperledger.fabric.protos.orderer.SeekInfo.SeekErrorResponse.valueOf(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();
}
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() {
errorResponse_ = 0;
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: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 {
return new SeekInfo(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 org.hyperledger.fabric.protos.orderer.SeekInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}