Ydb.StatusIds.StatusCode */ class StatusCode { /** * Generated from protobuf enum STATUS_CODE_UNSPECIFIED = 0; */ const STATUS_CODE_UNSPECIFIED = 0; /** * Generated from protobuf enum SUCCESS = 400000; */ const SUCCESS = 400000; /** * Generated from protobuf enum BAD_REQUEST = 400010; */ const BAD_REQUEST = 400010; /** * Generated from protobuf enum UNAUTHORIZED = 400020; */ const UNAUTHORIZED = 400020; /** * Generated from protobuf enum INTERNAL_ERROR = 400030; */ const INTERNAL_ERROR = 400030; /** * Generated from protobuf enum ABORTED = 400040; */ const ABORTED = 400040; /** * Generated from protobuf enum UNAVAILABLE = 400050; */ const UNAVAILABLE = 400050; /** * Generated from protobuf enum OVERLOADED = 400060; */ const OVERLOADED = 400060; /** * Generated from protobuf enum SCHEME_ERROR = 400070; */ const SCHEME_ERROR = 400070; /** * Generated from protobuf enum GENERIC_ERROR = 400080; */ const GENERIC_ERROR = 400080; /** * Generated from protobuf enum TIMEOUT = 400090; */ const TIMEOUT = 400090; /** * Generated from protobuf enum BAD_SESSION = 400100; */ const BAD_SESSION = 400100; /** * Generated from protobuf enum PRECONDITION_FAILED = 400120; */ const PRECONDITION_FAILED = 400120; /** * Generated from protobuf enum ALREADY_EXISTS = 400130; */ const ALREADY_EXISTS = 400130; /** * Generated from protobuf enum NOT_FOUND = 400140; */ const NOT_FOUND = 400140; /** * Generated from protobuf enum SESSION_EXPIRED = 400150; */ const SESSION_EXPIRED = 400150; /** * Generated from protobuf enum CANCELLED = 400160; */ const CANCELLED = 400160; /** * Generated from protobuf enum UNDETERMINED = 400170; */ const UNDETERMINED = 400170; /** * Generated from protobuf enum UNSUPPORTED = 400180; */ const UNSUPPORTED = 400180; /** * Generated from protobuf enum SESSION_BUSY = 400190; */ const SESSION_BUSY = 400190; private static $valueToName = [ self::STATUS_CODE_UNSPECIFIED => 'STATUS_CODE_UNSPECIFIED', self::SUCCESS => 'SUCCESS', self::BAD_REQUEST => 'BAD_REQUEST', self::UNAUTHORIZED => 'UNAUTHORIZED', self::INTERNAL_ERROR => 'INTERNAL_ERROR', self::ABORTED => 'ABORTED', self::UNAVAILABLE => 'UNAVAILABLE', self::OVERLOADED => 'OVERLOADED', self::SCHEME_ERROR => 'SCHEME_ERROR', self::GENERIC_ERROR => 'GENERIC_ERROR', self::TIMEOUT => 'TIMEOUT', self::BAD_SESSION => 'BAD_SESSION', self::PRECONDITION_FAILED => 'PRECONDITION_FAILED', self::ALREADY_EXISTS => 'ALREADY_EXISTS', self::NOT_FOUND => 'NOT_FOUND', self::SESSION_EXPIRED => 'SESSION_EXPIRED', self::CANCELLED => 'CANCELLED', self::UNDETERMINED => 'UNDETERMINED', self::UNSUPPORTED => 'UNSUPPORTED', self::SESSION_BUSY => 'SESSION_BUSY', ]; public static function name($value) { if (!isset(self::$valueToName[$value])) { throw new UnexpectedValueException(sprintf( 'Enum %s has no name defined for value %s', __CLASS__, $value)); } return self::$valueToName[$value]; } public static function value($name) { $const = __CLASS__ . '::' . strtoupper($name); if (!defined($const)) { throw new UnexpectedValueException(sprintf( 'Enum %s has no value defined for name %s', __CLASS__, $name)); } return constant($const); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(StatusCode::class, \Ydb\StatusIds_StatusCode::class);