Ydb.Monitoring.StatusFlag.Status */ class Status { /** * Generated from protobuf enum UNSPECIFIED = 0; */ const UNSPECIFIED = 0; /** * Generated from protobuf enum GREY = 1; */ const GREY = 1; /** * Generated from protobuf enum GREEN = 2; */ const GREEN = 2; /** * Generated from protobuf enum BLUE = 3; */ const BLUE = 3; /** * Generated from protobuf enum YELLOW = 4; */ const YELLOW = 4; /** * Generated from protobuf enum ORANGE = 5; */ const ORANGE = 5; /** * Generated from protobuf enum RED = 6; */ const RED = 6; private static $valueToName = [ self::UNSPECIFIED => 'UNSPECIFIED', self::GREY => 'GREY', self::GREEN => 'GREEN', self::BLUE => 'BLUE', self::YELLOW => 'YELLOW', self::ORANGE => 'ORANGE', self::RED => 'RED', ]; 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(Status::class, \Ydb\Monitoring\StatusFlag_Status::class);