1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_monitoring.proto
- namespace Ydb\Monitoring\StatusFlag;
- use UnexpectedValueException;
- /**
- * Describes the general state of a component.
- * From GREEN to RED, where GREEN is good, and RED is bad.
- * GREY means that the corresponding status is unknown.
- *
- * Protobuf type <code>Ydb.Monitoring.StatusFlag.Status</code>
- */
- class Status
- {
- /**
- * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
- */
- const UNSPECIFIED = 0;
- /**
- * Generated from protobuf enum <code>GREY = 1;</code>
- */
- const GREY = 1;
- /**
- * Generated from protobuf enum <code>GREEN = 2;</code>
- */
- const GREEN = 2;
- /**
- * Generated from protobuf enum <code>BLUE = 3;</code>
- */
- const BLUE = 3;
- /**
- * Generated from protobuf enum <code>YELLOW = 4;</code>
- */
- const YELLOW = 4;
- /**
- * Generated from protobuf enum <code>ORANGE = 5;</code>
- */
- const ORANGE = 5;
- /**
- * Generated from protobuf enum <code>RED = 6;</code>
- */
- 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);
|