google.api.MetricDescriptor.MetricKind
*/
class MetricKind
{
/**
* Do not use this default value.
*
* Generated from protobuf enum METRIC_KIND_UNSPECIFIED = 0;
*/
const METRIC_KIND_UNSPECIFIED = 0;
/**
* An instantaneous measurement of a value.
*
* Generated from protobuf enum GAUGE = 1;
*/
const GAUGE = 1;
/**
* The change in a value during a time interval.
*
* Generated from protobuf enum DELTA = 2;
*/
const DELTA = 2;
/**
* A value accumulated over a time interval. Cumulative
* measurements in a time series should have the same start time
* and increasing end times, until an event resets the cumulative
* value to zero and sets a new start time for the following
* points.
*
* Generated from protobuf enum CUMULATIVE = 3;
*/
const CUMULATIVE = 3;
private static $valueToName = [self::METRIC_KIND_UNSPECIFIED => 'METRIC_KIND_UNSPECIFIED', self::GAUGE => 'GAUGE', self::DELTA => 'DELTA', self::CUMULATIVE => 'CUMULATIVE'];
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);
}
}