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

org.hyperledger.fabric.protos.common.Status Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: common/common.proto

package org.hyperledger.fabric.protos.common;

/**
 * 
 * These status codes are intended to resemble selected HTTP status codes
 * 
* * Protobuf enum {@code common.Status} */ public enum Status implements com.google.protobuf.ProtocolMessageEnum { /** * UNKNOWN = 0; */ UNKNOWN(0), /** * SUCCESS = 200; */ SUCCESS(200), /** * BAD_REQUEST = 400; */ BAD_REQUEST(400), /** * FORBIDDEN = 403; */ FORBIDDEN(403), /** * NOT_FOUND = 404; */ NOT_FOUND(404), /** * REQUEST_ENTITY_TOO_LARGE = 413; */ REQUEST_ENTITY_TOO_LARGE(413), /** * INTERNAL_SERVER_ERROR = 500; */ INTERNAL_SERVER_ERROR(500), /** * NOT_IMPLEMENTED = 501; */ NOT_IMPLEMENTED(501), /** * SERVICE_UNAVAILABLE = 503; */ SERVICE_UNAVAILABLE(503), UNRECOGNIZED(-1), ; /** * UNKNOWN = 0; */ public static final int UNKNOWN_VALUE = 0; /** * SUCCESS = 200; */ public static final int SUCCESS_VALUE = 200; /** * BAD_REQUEST = 400; */ public static final int BAD_REQUEST_VALUE = 400; /** * FORBIDDEN = 403; */ public static final int FORBIDDEN_VALUE = 403; /** * NOT_FOUND = 404; */ public static final int NOT_FOUND_VALUE = 404; /** * REQUEST_ENTITY_TOO_LARGE = 413; */ public static final int REQUEST_ENTITY_TOO_LARGE_VALUE = 413; /** * INTERNAL_SERVER_ERROR = 500; */ public static final int INTERNAL_SERVER_ERROR_VALUE = 500; /** * NOT_IMPLEMENTED = 501; */ public static final int NOT_IMPLEMENTED_VALUE = 501; /** * SERVICE_UNAVAILABLE = 503; */ public static final int SERVICE_UNAVAILABLE_VALUE = 503; 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 Status 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 Status forNumber(int value) { switch (value) { case 0: return UNKNOWN; case 200: return SUCCESS; case 400: return BAD_REQUEST; case 403: return FORBIDDEN; case 404: return NOT_FOUND; case 413: return REQUEST_ENTITY_TOO_LARGE; case 500: return INTERNAL_SERVER_ERROR; case 501: return NOT_IMPLEMENTED; case 503: return SERVICE_UNAVAILABLE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Status> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Status findValueByNumber(int number) { return Status.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.common.CommonProto.getDescriptor().getEnumTypes().get(0); } private static final Status[] VALUES = values(); public static Status 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 Status(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:common.Status) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy