openstatus.monitor.v1.MonitorStatus */ class MonitorStatus { /** * MONITOR_STATUS_UNSPECIFIED indicates an unknown status. * * Generated from protobuf enum MONITOR_STATUS_UNSPECIFIED = 0; */ const MONITOR_STATUS_UNSPECIFIED = 0; /** * MONITOR_STATUS_ACTIVE indicates the monitor is actively checking. * * Generated from protobuf enum MONITOR_STATUS_ACTIVE = 1; */ const MONITOR_STATUS_ACTIVE = 1; /** * MONITOR_STATUS_DEGRADED indicates the monitor is degraded. * * Generated from protobuf enum MONITOR_STATUS_DEGRADED = 2; */ const MONITOR_STATUS_DEGRADED = 2; /** * MONITOR_STATUS_ERROR indicates the monitor is in an error state. * * Generated from protobuf enum MONITOR_STATUS_ERROR = 3; */ const MONITOR_STATUS_ERROR = 3; private static $valueToName = [ self::MONITOR_STATUS_UNSPECIFIED => 'MONITOR_STATUS_UNSPECIFIED', self::MONITOR_STATUS_ACTIVE => 'MONITOR_STATUS_ACTIVE', self::MONITOR_STATUS_DEGRADED => 'MONITOR_STATUS_DEGRADED', self::MONITOR_STATUS_ERROR => 'MONITOR_STATUS_ERROR', ]; 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); } }