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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137<?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 Google\Protobuf\Internal\GPBType;use Google\Protobuf\Internal\GPBUtil;use Google\Protobuf\RepeatedField;
/** * GetMonitorSummaryRequest is the request to get aggregated metrics for a monitor. * * Generated from protobuf message <code>openstatus.monitor.v1.GetMonitorSummaryRequest</code> */class GetMonitorSummaryRequest extends \Google\Protobuf\Internal\Message{ /** * Monitor ID to get summary for (required). * * Generated from protobuf field <code>string id = 1 [json_name = "id", (.buf.validate.field) = {</code> */ protected $id = ''; /** * Time range for metrics aggregation (defaults to 1 day if unspecified). * * Generated from protobuf field <code>.openstatus.monitor.v1.TimeRange time_range = 2 [json_name = "timeRange"];</code> */ protected $time_range = 0; /** * Optional filter by regions. If empty, returns metrics for all regions. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Region regions = 3 [json_name = "regions", (.buf.validate.field) = {</code> */ private $regions;
/** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $id * Monitor ID to get summary for (required). * @type int $time_range * Time range for metrics aggregation (defaults to 1 day if unspecified). * @type int[] $regions * Optional filter by regions. If empty, returns metrics for all regions. * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\Monitor\V1\Service::initOnce(); parent::__construct($data); }
/** * Monitor ID to get summary for (required). * * Generated from protobuf field <code>string id = 1 [json_name = "id", (.buf.validate.field) = {</code> * @return string */ public function getId() { return $this->id; }
/** * Monitor ID to get summary for (required). * * Generated from protobuf field <code>string id = 1 [json_name = "id", (.buf.validate.field) = {</code> * @param string $var * @return $this */ public function setId(string $var) { GPBUtil::checkString($var, true); $this->id = $var;
return $this; }
/** * Time range for metrics aggregation (defaults to 1 day if unspecified). * * Generated from protobuf field <code>.openstatus.monitor.v1.TimeRange time_range = 2 [json_name = "timeRange"];</code> * @return int one of the values in {@see \Openstatus\Monitor\V1\TimeRange} */ public function getTimeRange() { return $this->time_range; }
/** * Time range for metrics aggregation (defaults to 1 day if unspecified). * * Generated from protobuf field <code>.openstatus.monitor.v1.TimeRange time_range = 2 [json_name = "timeRange"];</code> * @param int $var one of the values in {@see \Openstatus\Monitor\V1\TimeRange} * @return $this */ public function setTimeRange(int $var) { GPBUtil::checkEnum($var, \Openstatus\Monitor\V1\TimeRange::class); $this->time_range = $var;
return $this; }
/** * Optional filter by regions. If empty, returns metrics for all regions. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Region regions = 3 [json_name = "regions", (.buf.validate.field) = {</code> * @return RepeatedField<int> one of the values in {@see \Openstatus\Monitor\V1\Region} */ public function getRegions() { return $this->regions; }
/** * Optional filter by regions. If empty, returns metrics for all regions. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Region regions = 3 [json_name = "regions", (.buf.validate.field) = {</code> * @param int[] $var one of the values in {@see \Openstatus\Monitor\V1\Region} * @return $this */ public function setRegions(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Openstatus\Monitor\V1\Region::class); $this->regions = $arr;
return $this; }
}