openstatus.monitor.v1.Periodicity
*/
class Periodicity
{
/**
* Generated from protobuf enum PERIODICITY_UNSPECIFIED = 0;
*/
const PERIODICITY_UNSPECIFIED = 0;
/**
* Generated from protobuf enum PERIODICITY_30S = 1;
*/
const PERIODICITY_30S = 1;
/**
* Generated from protobuf enum PERIODICITY_1M = 2;
*/
const PERIODICITY_1M = 2;
/**
* Generated from protobuf enum PERIODICITY_5M = 3;
*/
const PERIODICITY_5M = 3;
/**
* Generated from protobuf enum PERIODICITY_10M = 4;
*/
const PERIODICITY_10M = 4;
/**
* Generated from protobuf enum PERIODICITY_30M = 5;
*/
const PERIODICITY_30M = 5;
/**
* Generated from protobuf enum PERIODICITY_1H = 6;
*/
const PERIODICITY_1H = 6;
private static $valueToName = [
self::PERIODICITY_UNSPECIFIED => 'PERIODICITY_UNSPECIFIED',
self::PERIODICITY_30S => 'PERIODICITY_30S',
self::PERIODICITY_1M => 'PERIODICITY_1M',
self::PERIODICITY_5M => 'PERIODICITY_5M',
self::PERIODICITY_10M => 'PERIODICITY_10M',
self::PERIODICITY_30M => 'PERIODICITY_30M',
self::PERIODICITY_1H => 'PERIODICITY_1H',
];
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);
}
}