openstatus.monitor.v1.NumberComparator
*/
class NumberComparator
{
/**
* Generated from protobuf enum NUMBER_COMPARATOR_UNSPECIFIED = 0;
*/
const NUMBER_COMPARATOR_UNSPECIFIED = 0;
/**
* Generated from protobuf enum NUMBER_COMPARATOR_EQUAL = 1;
*/
const NUMBER_COMPARATOR_EQUAL = 1;
/**
* Generated from protobuf enum NUMBER_COMPARATOR_NOT_EQUAL = 2;
*/
const NUMBER_COMPARATOR_NOT_EQUAL = 2;
/**
* Generated from protobuf enum NUMBER_COMPARATOR_GREATER_THAN = 3;
*/
const NUMBER_COMPARATOR_GREATER_THAN = 3;
/**
* Generated from protobuf enum NUMBER_COMPARATOR_GREATER_THAN_OR_EQUAL = 4;
*/
const NUMBER_COMPARATOR_GREATER_THAN_OR_EQUAL = 4;
/**
* Generated from protobuf enum NUMBER_COMPARATOR_LESS_THAN = 5;
*/
const NUMBER_COMPARATOR_LESS_THAN = 5;
/**
* Generated from protobuf enum NUMBER_COMPARATOR_LESS_THAN_OR_EQUAL = 6;
*/
const NUMBER_COMPARATOR_LESS_THAN_OR_EQUAL = 6;
private static $valueToName = [
self::NUMBER_COMPARATOR_UNSPECIFIED => 'NUMBER_COMPARATOR_UNSPECIFIED',
self::NUMBER_COMPARATOR_EQUAL => 'NUMBER_COMPARATOR_EQUAL',
self::NUMBER_COMPARATOR_NOT_EQUAL => 'NUMBER_COMPARATOR_NOT_EQUAL',
self::NUMBER_COMPARATOR_GREATER_THAN => 'NUMBER_COMPARATOR_GREATER_THAN',
self::NUMBER_COMPARATOR_GREATER_THAN_OR_EQUAL => 'NUMBER_COMPARATOR_GREATER_THAN_OR_EQUAL',
self::NUMBER_COMPARATOR_LESS_THAN => 'NUMBER_COMPARATOR_LESS_THAN',
self::NUMBER_COMPARATOR_LESS_THAN_OR_EQUAL => 'NUMBER_COMPARATOR_LESS_THAN_OR_EQUAL',
];
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);
}
}