Ydb.Monitoring.SelfCheck.Result
*/
class Result
{
/**
* Generated from protobuf enum UNSPECIFIED = 0;
*/
const UNSPECIFIED = 0;
/**
* Generated from protobuf enum GOOD = 1;
*/
const GOOD = 1;
/**
* Generated from protobuf enum DEGRADED = 2;
*/
const DEGRADED = 2;
/**
* Generated from protobuf enum MAINTENANCE_REQUIRED = 3;
*/
const MAINTENANCE_REQUIRED = 3;
/**
* Generated from protobuf enum EMERGENCY = 4;
*/
const EMERGENCY = 4;
private static $valueToName = [
self::UNSPECIFIED => 'UNSPECIFIED',
self::GOOD => 'GOOD',
self::DEGRADED => 'DEGRADED',
self::MAINTENANCE_REQUIRED => 'MAINTENANCE_REQUIRED',
self::EMERGENCY => 'EMERGENCY',
];
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(Result::class, \Ydb\Monitoring\SelfCheck_Result::class);