Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/sdk-php. php sdk for openstatus www.openstatus.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970<?php# Generated by the protocol buffer compiler. DO NOT EDIT!# NO CHECKED-IN PROTOBUF GENCODE# source: openstatus/monitor/v1/service.proto
namespace Openstatus\Monitor\V1;
use UnexpectedValueException;
/** * TimeRange represents the time period for metrics aggregation. * * Protobuf type <code>openstatus.monitor.v1.TimeRange</code> */class TimeRange{ /** * Unspecified time range. * * Generated from protobuf enum <code>TIME_RANGE_UNSPECIFIED = 0;</code> */ const TIME_RANGE_UNSPECIFIED = 0; /** * Last 24 hours. * * Generated from protobuf enum <code>TIME_RANGE_1D = 1;</code> */ const TIME_RANGE_1D = 1; /** * Last 7 days. * * Generated from protobuf enum <code>TIME_RANGE_7D = 2;</code> */ const TIME_RANGE_7D = 2; /** * Last 14 days. * * Generated from protobuf enum <code>TIME_RANGE_14D = 3;</code> */ const TIME_RANGE_14D = 3;
private static $valueToName = [ self::TIME_RANGE_UNSPECIFIED => 'TIME_RANGE_UNSPECIFIED', self::TIME_RANGE_1D => 'TIME_RANGE_1D', self::TIME_RANGE_7D => 'TIME_RANGE_7D', self::TIME_RANGE_14D => 'TIME_RANGE_14D', ];
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); }}