com.hedera.hapi.block.protoc.PublishStreamResponseCode Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: block_service.proto
package com.hedera.hapi.block.protoc;
/**
*
**
* An enumeration indicating the status of this request.
* This enumeration SHALL describe the reason a block stream
* (sent via `publishBlockStream`) ended.
*
*
* Protobuf enum {@code com.hedera.hapi.block.PublishStreamResponseCode}
*/
public enum PublishStreamResponseCode
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
**
* An "unset value" flag, this value SHALL NOT be used.<br/>
* This status indicates the server software failed to set a
* status, and SHALL be considered a software defect.
*
*
* STREAM_ITEMS_UNKNOWN = 0;
*/
STREAM_ITEMS_UNKNOWN(0),
/**
*
**
* The request succeeded.<br/>
* No errors occurred and the source node orderly ended the stream.
*
*
* STREAM_ITEMS_SUCCESS = 1;
*/
STREAM_ITEMS_SUCCESS(1),
/**
*
**
* The delay between items was too long.<br/>
* The source MUST start a new stream before the failed block.
*
*
* STREAM_ITEMS_TIMEOUT = 2;
*/
STREAM_ITEMS_TIMEOUT(2),
/**
*
**
* An item was received out-of-order.<br/>
* The source MUST start a new stream before the failed block.
*
*
* STREAM_ITEMS_OUT_OF_ORDER = 3;
*/
STREAM_ITEMS_OUT_OF_ORDER(3),
/**
*
**
* A block state proof item could not be validated.<br/>
* The source MUST start a new stream before the failed block.
*
*
* STREAM_ITEMS_BAD_STATE_PROOF = 4;
*/
STREAM_ITEMS_BAD_STATE_PROOF(4),
/**
*
**
* The block node is "behind" the publisher.<br/>
* Ths consensus node has sent a block later than this block node
* can process. The publisher may retry by sending blocks immediately
* following the `block_number` returned, or may end the stream and
* try again later.
* <p>
* Block nodes that are "behind" SHOULD attempt to "catch up" by requesting
* blocks from another block node or other source of recent historical
* block stream data.
*
*
* STREAM_ITEMS_BEHIND = 5;
*/
STREAM_ITEMS_BEHIND(5),
UNRECOGNIZED(-1),
;
/**
*
**
* An "unset value" flag, this value SHALL NOT be used.<br/>
* This status indicates the server software failed to set a
* status, and SHALL be considered a software defect.
*
*
* STREAM_ITEMS_UNKNOWN = 0;
*/
public static final int STREAM_ITEMS_UNKNOWN_VALUE = 0;
/**
*
**
* The request succeeded.<br/>
* No errors occurred and the source node orderly ended the stream.
*
*
* STREAM_ITEMS_SUCCESS = 1;
*/
public static final int STREAM_ITEMS_SUCCESS_VALUE = 1;
/**
*
**
* The delay between items was too long.<br/>
* The source MUST start a new stream before the failed block.
*
*
* STREAM_ITEMS_TIMEOUT = 2;
*/
public static final int STREAM_ITEMS_TIMEOUT_VALUE = 2;
/**
*
**
* An item was received out-of-order.<br/>
* The source MUST start a new stream before the failed block.
*
*
* STREAM_ITEMS_OUT_OF_ORDER = 3;
*/
public static final int STREAM_ITEMS_OUT_OF_ORDER_VALUE = 3;
/**
*
**
* A block state proof item could not be validated.<br/>
* The source MUST start a new stream before the failed block.
*
*
* STREAM_ITEMS_BAD_STATE_PROOF = 4;
*/
public static final int STREAM_ITEMS_BAD_STATE_PROOF_VALUE = 4;
/**
*
**
* The block node is "behind" the publisher.<br/>
* Ths consensus node has sent a block later than this block node
* can process. The publisher may retry by sending blocks immediately
* following the `block_number` returned, or may end the stream and
* try again later.
* <p>
* Block nodes that are "behind" SHOULD attempt to "catch up" by requesting
* blocks from another block node or other source of recent historical
* block stream data.
*
*
* STREAM_ITEMS_BEHIND = 5;
*/
public static final int STREAM_ITEMS_BEHIND_VALUE = 5;
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 PublishStreamResponseCode 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 PublishStreamResponseCode forNumber(int value) {
switch (value) {
case 0: return STREAM_ITEMS_UNKNOWN;
case 1: return STREAM_ITEMS_SUCCESS;
case 2: return STREAM_ITEMS_TIMEOUT;
case 3: return STREAM_ITEMS_OUT_OF_ORDER;
case 4: return STREAM_ITEMS_BAD_STATE_PROOF;
case 5: return STREAM_ITEMS_BEHIND;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PublishStreamResponseCode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PublishStreamResponseCode findValueByNumber(int number) {
return PublishStreamResponseCode.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 com.hedera.hapi.block.protoc.BlockService.getDescriptor().getEnumTypes().get(1);
}
private static final PublishStreamResponseCode[] VALUES = values();
public static PublishStreamResponseCode 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 PublishStreamResponseCode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:com.hedera.hapi.block.PublishStreamResponseCode)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy