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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741<?php# Generated by the protocol buffer compiler. DO NOT EDIT!# NO CHECKED-IN PROTOBUF GENCODE# source: openstatus/monitor/v1/http_monitor.proto
namespace Openstatus\Monitor\V1;
use Google\Protobuf\Internal\GPBType;use Google\Protobuf\Internal\GPBUtil;use Google\Protobuf\RepeatedField;
/** * HTTPMonitor defines the configuration for an HTTP monitor. * * Generated from protobuf message <code>openstatus.monitor.v1.HTTPMonitor</code> */class HTTPMonitor extends \Google\Protobuf\Internal\Message{ /** * Unique identifier for the monitor (output only for create requests). * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> */ protected $id = ''; /** * Name of the monitor (required, max 256 characters). * * Generated from protobuf field <code>string name = 2 [json_name = "name", (.gnostic.openapi.v3.property) = {</code> */ protected $name = ''; /** * URL to monitor (required, max 2048 characters). * * Generated from protobuf field <code>string url = 3 [json_name = "url", (.gnostic.openapi.v3.property) = {</code> */ protected $url = ''; /** * Check periodicity (required). * * Generated from protobuf field <code>.openstatus.monitor.v1.Periodicity periodicity = 4 [json_name = "periodicity", (.buf.validate.field) = {</code> */ protected $periodicity = 0; /** * HTTP method to use (defaults to GET). * * Generated from protobuf field <code>.openstatus.monitor.v1.HTTPMethod method = 5 [json_name = "method", (.buf.validate.field) = {</code> */ protected $method = 0; /** * Request body (optional). * * Generated from protobuf field <code>string body = 6 [json_name = "body", (.gnostic.openapi.v3.property) = {</code> */ protected $body = ''; /** * Timeout in milliseconds (0-120000, defaults to 45000). * * Generated from protobuf field <code>int64 timeout = 7 [json_name = "timeout", (.buf.validate.field) = {</code> */ protected $timeout = 0; /** * Latency threshold for degraded status in milliseconds (optional, 0-120000). * * Generated from protobuf field <code>optional int64 degraded_at = 8 [json_name = "degradedAt", (.buf.validate.field) = {</code> */ protected $degraded_at = null; /** * Number of retry attempts (0-10, defaults to 3). * * Generated from protobuf field <code>int64 retry = 9 [json_name = "retry", (.buf.validate.field) = {</code> */ protected $retry = 0; /** * Whether to follow HTTP redirects (defaults to true when not specified). * * Generated from protobuf field <code>optional bool follow_redirects = 10 [json_name = "followRedirects"];</code> */ protected $follow_redirects = null; /** * Custom headers for the request. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Headers headers = 11 [json_name = "headers", (.buf.validate.field) = {</code> */ private $headers; /** * Status code assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.StatusCodeAssertion status_code_assertions = 12 [json_name = "statusCodeAssertions", (.buf.validate.field) = {</code> */ private $status_code_assertions; /** * Body content assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.BodyAssertion body_assertions = 13 [json_name = "bodyAssertions", (.buf.validate.field) = {</code> */ private $body_assertions; /** * Header assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.HeaderAssertion header_assertions = 14 [json_name = "headerAssertions", (.buf.validate.field) = {</code> */ private $header_assertions; /** * Description of the monitor (optional). * * Generated from protobuf field <code>string description = 15 [json_name = "description", (.buf.validate.field) = {</code> */ protected $description = ''; /** * Whether the monitor is active (defaults to false). * * Generated from protobuf field <code>bool active = 16 [json_name = "active"];</code> */ protected $active = false; /** * Whether the monitor is publicly visible (defaults to false). * * Generated from protobuf field <code>bool public = 17 [json_name = "public"];</code> */ protected $public = false; /** * Geographic regions to run checks from. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Region regions = 18 [json_name = "regions", (.buf.validate.field) = {</code> */ private $regions; /** * OpenTelemetry configuration for exporting metrics. * * Generated from protobuf field <code>.openstatus.monitor.v1.OpenTelemetryConfig open_telemetry = 19 [json_name = "openTelemetry"];</code> */ protected $open_telemetry = null; /** * Current operational status of the monitor. * * Generated from protobuf field <code>.openstatus.monitor.v1.MonitorStatus status = 20 [json_name = "status"];</code> */ protected $status = 0;
/** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $id * Unique identifier for the monitor (output only for create requests). * @type string $name * Name of the monitor (required, max 256 characters). * @type string $url * URL to monitor (required, max 2048 characters). * @type int $periodicity * Check periodicity (required). * @type int $method * HTTP method to use (defaults to GET). * @type string $body * Request body (optional). * @type int|string $timeout * Timeout in milliseconds (0-120000, defaults to 45000). * @type int|string $degraded_at * Latency threshold for degraded status in milliseconds (optional, 0-120000). * @type int|string $retry * Number of retry attempts (0-10, defaults to 3). * @type bool $follow_redirects * Whether to follow HTTP redirects (defaults to true when not specified). * @type \Openstatus\Monitor\V1\Headers[] $headers * Custom headers for the request. * @type \Openstatus\Monitor\V1\StatusCodeAssertion[] $status_code_assertions * Status code assertions for the response. * @type \Openstatus\Monitor\V1\BodyAssertion[] $body_assertions * Body content assertions for the response. * @type \Openstatus\Monitor\V1\HeaderAssertion[] $header_assertions * Header assertions for the response. * @type string $description * Description of the monitor (optional). * @type bool $active * Whether the monitor is active (defaults to false). * @type bool $public * Whether the monitor is publicly visible (defaults to false). * @type int[] $regions * Geographic regions to run checks from. * @type \Openstatus\Monitor\V1\OpenTelemetryConfig $open_telemetry * OpenTelemetry configuration for exporting metrics. * @type int $status * Current operational status of the monitor. * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\Monitor\V1\HttpMonitor::initOnce(); parent::__construct($data); }
/** * Unique identifier for the monitor (output only for create requests). * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> * @return string */ public function getId() { return $this->id; }
/** * Unique identifier for the monitor (output only for create requests). * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> * @param string $var * @return $this */ public function setId(string $var) { GPBUtil::checkString($var, true); $this->id = $var;
return $this; }
/** * Name of the monitor (required, max 256 characters). * * Generated from protobuf field <code>string name = 2 [json_name = "name", (.gnostic.openapi.v3.property) = {</code> * @return string */ public function getName() { return $this->name; }
/** * Name of the monitor (required, max 256 characters). * * Generated from protobuf field <code>string name = 2 [json_name = "name", (.gnostic.openapi.v3.property) = {</code> * @param string $var * @return $this */ public function setName(string $var) { GPBUtil::checkString($var, true); $this->name = $var;
return $this; }
/** * URL to monitor (required, max 2048 characters). * * Generated from protobuf field <code>string url = 3 [json_name = "url", (.gnostic.openapi.v3.property) = {</code> * @return string */ public function getUrl() { return $this->url; }
/** * URL to monitor (required, max 2048 characters). * * Generated from protobuf field <code>string url = 3 [json_name = "url", (.gnostic.openapi.v3.property) = {</code> * @param string $var * @return $this */ public function setUrl(string $var) { GPBUtil::checkString($var, true); $this->url = $var;
return $this; }
/** * Check periodicity (required). * * Generated from protobuf field <code>.openstatus.monitor.v1.Periodicity periodicity = 4 [json_name = "periodicity", (.buf.validate.field) = {</code> * @return int one of the values in {@see \Openstatus\Monitor\V1\Periodicity} */ public function getPeriodicity() { return $this->periodicity; }
/** * Check periodicity (required). * * Generated from protobuf field <code>.openstatus.monitor.v1.Periodicity periodicity = 4 [json_name = "periodicity", (.buf.validate.field) = {</code> * @param int $var one of the values in {@see \Openstatus\Monitor\V1\Periodicity} * @return $this */ public function setPeriodicity(int $var) { GPBUtil::checkEnum($var, \Openstatus\Monitor\V1\Periodicity::class); $this->periodicity = $var;
return $this; }
/** * HTTP method to use (defaults to GET). * * Generated from protobuf field <code>.openstatus.monitor.v1.HTTPMethod method = 5 [json_name = "method", (.buf.validate.field) = {</code> * @return int one of the values in {@see \Openstatus\Monitor\V1\HTTPMethod} */ public function getMethod() { return $this->method; }
/** * HTTP method to use (defaults to GET). * * Generated from protobuf field <code>.openstatus.monitor.v1.HTTPMethod method = 5 [json_name = "method", (.buf.validate.field) = {</code> * @param int $var one of the values in {@see \Openstatus\Monitor\V1\HTTPMethod} * @return $this */ public function setMethod(int $var) { GPBUtil::checkEnum($var, \Openstatus\Monitor\V1\HTTPMethod::class); $this->method = $var;
return $this; }
/** * Request body (optional). * * Generated from protobuf field <code>string body = 6 [json_name = "body", (.gnostic.openapi.v3.property) = {</code> * @return string */ public function getBody() { return $this->body; }
/** * Request body (optional). * * Generated from protobuf field <code>string body = 6 [json_name = "body", (.gnostic.openapi.v3.property) = {</code> * @param string $var * @return $this */ public function setBody(string $var) { GPBUtil::checkString($var, true); $this->body = $var;
return $this; }
/** * Timeout in milliseconds (0-120000, defaults to 45000). * * Generated from protobuf field <code>int64 timeout = 7 [json_name = "timeout", (.buf.validate.field) = {</code> * @return int|string */ public function getTimeout() { return $this->timeout; }
/** * Timeout in milliseconds (0-120000, defaults to 45000). * * Generated from protobuf field <code>int64 timeout = 7 [json_name = "timeout", (.buf.validate.field) = {</code> * @param int|string $var * @return $this */ public function setTimeout(int|string $var) { GPBUtil::checkInt64($var); $this->timeout = $var;
return $this; }
/** * Latency threshold for degraded status in milliseconds (optional, 0-120000). * * Generated from protobuf field <code>optional int64 degraded_at = 8 [json_name = "degradedAt", (.buf.validate.field) = {</code> * @return int|string */ public function getDegradedAt() { return isset($this->degraded_at) ? $this->degraded_at : GPBUtil::compatibleInt64(0, '0'); }
public function hasDegradedAt() { return isset($this->degraded_at); }
public function clearDegradedAt() { unset($this->degraded_at); }
/** * Latency threshold for degraded status in milliseconds (optional, 0-120000). * * Generated from protobuf field <code>optional int64 degraded_at = 8 [json_name = "degradedAt", (.buf.validate.field) = {</code> * @param int|string $var * @return $this */ public function setDegradedAt(int|string $var) { GPBUtil::checkInt64($var); $this->degraded_at = $var;
return $this; }
/** * Number of retry attempts (0-10, defaults to 3). * * Generated from protobuf field <code>int64 retry = 9 [json_name = "retry", (.buf.validate.field) = {</code> * @return int|string */ public function getRetry() { return $this->retry; }
/** * Number of retry attempts (0-10, defaults to 3). * * Generated from protobuf field <code>int64 retry = 9 [json_name = "retry", (.buf.validate.field) = {</code> * @param int|string $var * @return $this */ public function setRetry(int|string $var) { GPBUtil::checkInt64($var); $this->retry = $var;
return $this; }
/** * Whether to follow HTTP redirects (defaults to true when not specified). * * Generated from protobuf field <code>optional bool follow_redirects = 10 [json_name = "followRedirects"];</code> * @return bool */ public function getFollowRedirects() { return isset($this->follow_redirects) ? $this->follow_redirects : false; }
public function hasFollowRedirects() { return isset($this->follow_redirects); }
public function clearFollowRedirects() { unset($this->follow_redirects); }
/** * Whether to follow HTTP redirects (defaults to true when not specified). * * Generated from protobuf field <code>optional bool follow_redirects = 10 [json_name = "followRedirects"];</code> * @param bool $var * @return $this */ public function setFollowRedirects(bool $var) { $this->follow_redirects = $var;
return $this; }
/** * Custom headers for the request. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Headers headers = 11 [json_name = "headers", (.buf.validate.field) = {</code> * @return RepeatedField<\Openstatus\Monitor\V1\Headers> */ public function getHeaders() { return $this->headers; }
/** * Custom headers for the request. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Headers headers = 11 [json_name = "headers", (.buf.validate.field) = {</code> * @param \Openstatus\Monitor\V1\Headers[] $var * @return $this */ public function setHeaders(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Openstatus\Monitor\V1\Headers::class); $this->headers = $arr;
return $this; }
/** * Status code assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.StatusCodeAssertion status_code_assertions = 12 [json_name = "statusCodeAssertions", (.buf.validate.field) = {</code> * @return RepeatedField<\Openstatus\Monitor\V1\StatusCodeAssertion> */ public function getStatusCodeAssertions() { return $this->status_code_assertions; }
/** * Status code assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.StatusCodeAssertion status_code_assertions = 12 [json_name = "statusCodeAssertions", (.buf.validate.field) = {</code> * @param \Openstatus\Monitor\V1\StatusCodeAssertion[] $var * @return $this */ public function setStatusCodeAssertions(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Openstatus\Monitor\V1\StatusCodeAssertion::class); $this->status_code_assertions = $arr;
return $this; }
/** * Body content assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.BodyAssertion body_assertions = 13 [json_name = "bodyAssertions", (.buf.validate.field) = {</code> * @return RepeatedField<\Openstatus\Monitor\V1\BodyAssertion> */ public function getBodyAssertions() { return $this->body_assertions; }
/** * Body content assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.BodyAssertion body_assertions = 13 [json_name = "bodyAssertions", (.buf.validate.field) = {</code> * @param \Openstatus\Monitor\V1\BodyAssertion[] $var * @return $this */ public function setBodyAssertions(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Openstatus\Monitor\V1\BodyAssertion::class); $this->body_assertions = $arr;
return $this; }
/** * Header assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.HeaderAssertion header_assertions = 14 [json_name = "headerAssertions", (.buf.validate.field) = {</code> * @return RepeatedField<\Openstatus\Monitor\V1\HeaderAssertion> */ public function getHeaderAssertions() { return $this->header_assertions; }
/** * Header assertions for the response. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.HeaderAssertion header_assertions = 14 [json_name = "headerAssertions", (.buf.validate.field) = {</code> * @param \Openstatus\Monitor\V1\HeaderAssertion[] $var * @return $this */ public function setHeaderAssertions(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Openstatus\Monitor\V1\HeaderAssertion::class); $this->header_assertions = $arr;
return $this; }
/** * Description of the monitor (optional). * * Generated from protobuf field <code>string description = 15 [json_name = "description", (.buf.validate.field) = {</code> * @return string */ public function getDescription() { return $this->description; }
/** * Description of the monitor (optional). * * Generated from protobuf field <code>string description = 15 [json_name = "description", (.buf.validate.field) = {</code> * @param string $var * @return $this */ public function setDescription(string $var) { GPBUtil::checkString($var, true); $this->description = $var;
return $this; }
/** * Whether the monitor is active (defaults to false). * * Generated from protobuf field <code>bool active = 16 [json_name = "active"];</code> * @return bool */ public function getActive() { return $this->active; }
/** * Whether the monitor is active (defaults to false). * * Generated from protobuf field <code>bool active = 16 [json_name = "active"];</code> * @param bool $var * @return $this */ public function setActive(bool $var) { $this->active = $var;
return $this; }
/** * Whether the monitor is publicly visible (defaults to false). * * Generated from protobuf field <code>bool public = 17 [json_name = "public"];</code> * @return bool */ public function getPublic() { return $this->public; }
/** * Whether the monitor is publicly visible (defaults to false). * * Generated from protobuf field <code>bool public = 17 [json_name = "public"];</code> * @param bool $var * @return $this */ public function setPublic(bool $var) { $this->public = $var;
return $this; }
/** * Geographic regions to run checks from. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Region regions = 18 [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; }
/** * Geographic regions to run checks from. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Region regions = 18 [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; }
/** * OpenTelemetry configuration for exporting metrics. * * Generated from protobuf field <code>.openstatus.monitor.v1.OpenTelemetryConfig open_telemetry = 19 [json_name = "openTelemetry"];</code> * @return \Openstatus\Monitor\V1\OpenTelemetryConfig|null */ public function getOpenTelemetry() { return $this->open_telemetry; }
public function hasOpenTelemetry() { return isset($this->open_telemetry); }
public function clearOpenTelemetry() { unset($this->open_telemetry); }
/** * OpenTelemetry configuration for exporting metrics. * * Generated from protobuf field <code>.openstatus.monitor.v1.OpenTelemetryConfig open_telemetry = 19 [json_name = "openTelemetry"];</code> * @param \Openstatus\Monitor\V1\OpenTelemetryConfig $var * @return $this */ public function setOpenTelemetry(\Openstatus\Monitor\V1\OpenTelemetryConfig|null $var) { $this->open_telemetry = $var;
return $this; }
/** * Current operational status of the monitor. * * Generated from protobuf field <code>.openstatus.monitor.v1.MonitorStatus status = 20 [json_name = "status"];</code> * @return int one of the values in {@see \Openstatus\Monitor\V1\MonitorStatus} */ public function getStatus() { return $this->status; }
/** * Current operational status of the monitor. * * Generated from protobuf field <code>.openstatus.monitor.v1.MonitorStatus status = 20 [json_name = "status"];</code> * @param int $var one of the values in {@see \Openstatus\Monitor\V1\MonitorStatus} * @return $this */ public function setStatus(int $var) { GPBUtil::checkEnum($var, \Openstatus\Monitor\V1\MonitorStatus::class); $this->status = $var;
return $this; }
}