com.hedera.hapi.block.protoc.StateSnapshotResponseCode 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 a StateSnapshotResponse request.
*
*
* Protobuf enum {@code com.hedera.hapi.block.StateSnapshotResponseCode}
*/
public enum StateSnapshotResponseCode
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.
*
*
* STATE_SNAPSHOT_UNKNOWN = 0;
*/
STATE_SNAPSHOT_UNKNOWN(0),
/**
*
**
* The requesting client account lacks sufficient HBAR to pay the
* service fee for this request.<br/>
* The client MAY retry the request, but MUST increase the client
* account balance with this block node server before doing so.
*
*
* STATE_SNAPSHOT_INSUFFICIENT_BALANCE = 1;
*/
STATE_SNAPSHOT_INSUFFICIENT_BALANCE(1),
/**
*
**
* The request succeeded.<br/>
* The full snapshot data MAY be read via the endpoint provided in the
* `snapshot_reference` field for the duration specified.
*
*
* STATE_SNAPSHOT_SUCCESS = 2;
*/
STATE_SNAPSHOT_SUCCESS(2),
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.
*
*
* STATE_SNAPSHOT_UNKNOWN = 0;
*/
public static final int STATE_SNAPSHOT_UNKNOWN_VALUE = 0;
/**
*
**
* The requesting client account lacks sufficient HBAR to pay the
* service fee for this request.<br/>
* The client MAY retry the request, but MUST increase the client
* account balance with this block node server before doing so.
*
*
* STATE_SNAPSHOT_INSUFFICIENT_BALANCE = 1;
*/
public static final int STATE_SNAPSHOT_INSUFFICIENT_BALANCE_VALUE = 1;
/**
*
**
* The request succeeded.<br/>
* The full snapshot data MAY be read via the endpoint provided in the
* `snapshot_reference` field for the duration specified.
*
*
* STATE_SNAPSHOT_SUCCESS = 2;
*/
public static final int STATE_SNAPSHOT_SUCCESS_VALUE = 2;
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 StateSnapshotResponseCode 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 StateSnapshotResponseCode forNumber(int value) {
switch (value) {
case 0: return STATE_SNAPSHOT_UNKNOWN;
case 1: return STATE_SNAPSHOT_INSUFFICIENT_BALANCE;
case 2: return STATE_SNAPSHOT_SUCCESS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
StateSnapshotResponseCode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public StateSnapshotResponseCode findValueByNumber(int number) {
return StateSnapshotResponseCode.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(4);
}
private static final StateSnapshotResponseCode[] VALUES = values();
public static StateSnapshotResponseCode 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 StateSnapshotResponseCode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:com.hedera.hapi.block.StateSnapshotResponseCode)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy