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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528<?php# Generated by the protocol buffer compiler. DO NOT EDIT!# NO CHECKED-IN PROTOBUF GENCODE# source: openstatus/monitor/v1/dns_monitor.proto
namespace Openstatus\Monitor\V1;
use Google\Protobuf\Internal\GPBType;use Google\Protobuf\Internal\GPBUtil;use Google\Protobuf\RepeatedField;
/** * DNSMonitor defines the configuration for a DNS monitor. * * Generated from protobuf message <code>openstatus.monitor.v1.DNSMonitor</code> */class DNSMonitor 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 = ''; /** * Domain to resolve (required, max 2048 characters). * * Generated from protobuf field <code>string uri = 3 [json_name = "uri", (.gnostic.openapi.v3.property) = {</code> */ protected $uri = ''; /** * Check periodicity (required). * * Generated from protobuf field <code>.openstatus.monitor.v1.Periodicity periodicity = 4 [json_name = "periodicity", (.buf.validate.field) = {</code> */ protected $periodicity = 0; /** * Timeout in milliseconds (0-120000, defaults to 45000). * * Generated from protobuf field <code>int64 timeout = 5 [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 = 6 [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 = 7 [json_name = "retry", (.buf.validate.field) = {</code> */ protected $retry = 0; /** * DNS record assertions for validation. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.RecordAssertion record_assertions = 8 [json_name = "recordAssertions", (.buf.validate.field) = {</code> */ private $record_assertions; /** * Description of the monitor (optional). * * Generated from protobuf field <code>string description = 9 [json_name = "description", (.buf.validate.field) = {</code> */ protected $description = ''; /** * Whether the monitor is active (defaults to false). * * Generated from protobuf field <code>bool active = 10 [json_name = "active"];</code> */ protected $active = false; /** * Whether the monitor is publicly visible (defaults to false). * * Generated from protobuf field <code>bool public = 11 [json_name = "public"];</code> */ protected $public = false; /** * Geographic regions to run checks from. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.Region regions = 12 [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 = 13 [json_name = "openTelemetry"];</code> */ protected $open_telemetry = null; /** * Current operational status of the monitor. * * Generated from protobuf field <code>.openstatus.monitor.v1.MonitorStatus status = 14 [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 $uri * Domain to resolve (required, max 2048 characters). * @type int $periodicity * Check periodicity (required). * @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 \Openstatus\Monitor\V1\RecordAssertion[] $record_assertions * DNS record assertions for validation. * @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\DnsMonitor::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; }
/** * Domain to resolve (required, max 2048 characters). * * Generated from protobuf field <code>string uri = 3 [json_name = "uri", (.gnostic.openapi.v3.property) = {</code> * @return string */ public function getUri() { return $this->uri; }
/** * Domain to resolve (required, max 2048 characters). * * Generated from protobuf field <code>string uri = 3 [json_name = "uri", (.gnostic.openapi.v3.property) = {</code> * @param string $var * @return $this */ public function setUri(string $var) { GPBUtil::checkString($var, true); $this->uri = $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; }
/** * Timeout in milliseconds (0-120000, defaults to 45000). * * Generated from protobuf field <code>int64 timeout = 5 [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 = 5 [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 = 6 [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 = 6 [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 = 7 [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 = 7 [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; }
/** * DNS record assertions for validation. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.RecordAssertion record_assertions = 8 [json_name = "recordAssertions", (.buf.validate.field) = {</code> * @return RepeatedField<\Openstatus\Monitor\V1\RecordAssertion> */ public function getRecordAssertions() { return $this->record_assertions; }
/** * DNS record assertions for validation. * * Generated from protobuf field <code>repeated .openstatus.monitor.v1.RecordAssertion record_assertions = 8 [json_name = "recordAssertions", (.buf.validate.field) = {</code> * @param \Openstatus\Monitor\V1\RecordAssertion[] $var * @return $this */ public function setRecordAssertions(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Openstatus\Monitor\V1\RecordAssertion::class); $this->record_assertions = $arr;
return $this; }
/** * Description of the monitor (optional). * * Generated from protobuf field <code>string description = 9 [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 = 9 [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 = 10 [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 = 10 [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 = 11 [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 = 11 [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 = 12 [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 = 12 [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 = 13 [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 = 13 [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 = 14 [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 = 14 [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; }
}