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.
8.1 kB · 281 lines
PHP
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282<?php# Generated by the protocol buffer compiler. DO NOT EDIT!# NO CHECKED-IN PROTOBUF GENCODE# source: openstatus/notification/v1/notification.proto
namespace Openstatus\Notification\V1;
use Google\Protobuf\Internal\GPBType;use Google\Protobuf\Internal\GPBUtil;use Google\Protobuf\RepeatedField;
/** * Notification represents a notification channel with full details. * * Generated from protobuf message <code>openstatus.notification.v1.Notification</code> */class Notification extends \Google\Protobuf\Internal\Message{ /** * Unique identifier for the notification. * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> */ protected $id = ''; /** * Display name for the notification channel. * * Generated from protobuf field <code>string name = 2 [json_name = "name"];</code> */ protected $name = ''; /** * Provider type. * * Generated from protobuf field <code>.openstatus.notification.v1.NotificationProvider provider = 3 [json_name = "provider"];</code> */ protected $provider = 0; /** * Provider-specific configuration. * * Generated from protobuf field <code>.openstatus.notification.v1.NotificationData data = 4 [json_name = "data"];</code> */ protected $data = null; /** * IDs of monitors associated with this notification. * * Generated from protobuf field <code>repeated string monitor_ids = 5 [json_name = "monitorIds"];</code> */ private $monitor_ids; /** * Timestamp when the notification was created (RFC 3339). * * Generated from protobuf field <code>string created_at = 6 [json_name = "createdAt"];</code> */ protected $created_at = ''; /** * Timestamp when the notification was last updated (RFC 3339). * * Generated from protobuf field <code>string updated_at = 7 [json_name = "updatedAt"];</code> */ protected $updated_at = '';
/** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $id * Unique identifier for the notification. * @type string $name * Display name for the notification channel. * @type int $provider * Provider type. * @type \Openstatus\Notification\V1\NotificationData $data * Provider-specific configuration. * @type string[] $monitor_ids * IDs of monitors associated with this notification. * @type string $created_at * Timestamp when the notification was created (RFC 3339). * @type string $updated_at * Timestamp when the notification was last updated (RFC 3339). * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\Notification\V1\Notification::initOnce(); parent::__construct($data); }
/** * Unique identifier for the notification. * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> * @return string */ public function getId() { return $this->id; }
/** * Unique identifier for the notification. * * 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; }
/** * Display name for the notification channel. * * Generated from protobuf field <code>string name = 2 [json_name = "name"];</code> * @return string */ public function getName() { return $this->name; }
/** * Display name for the notification channel. * * Generated from protobuf field <code>string name = 2 [json_name = "name"];</code> * @param string $var * @return $this */ public function setName(string $var) { GPBUtil::checkString($var, true); $this->name = $var;
return $this; }
/** * Provider type. * * Generated from protobuf field <code>.openstatus.notification.v1.NotificationProvider provider = 3 [json_name = "provider"];</code> * @return int one of the values in {@see \Openstatus\Notification\V1\NotificationProvider} */ public function getProvider() { return $this->provider; }
/** * Provider type. * * Generated from protobuf field <code>.openstatus.notification.v1.NotificationProvider provider = 3 [json_name = "provider"];</code> * @param int $var one of the values in {@see \Openstatus\Notification\V1\NotificationProvider} * @return $this */ public function setProvider(int $var) { GPBUtil::checkEnum($var, \Openstatus\Notification\V1\NotificationProvider::class); $this->provider = $var;
return $this; }
/** * Provider-specific configuration. * * Generated from protobuf field <code>.openstatus.notification.v1.NotificationData data = 4 [json_name = "data"];</code> * @return \Openstatus\Notification\V1\NotificationData|null */ public function getData() { return $this->data; }
public function hasData() { return isset($this->data); }
public function clearData() { unset($this->data); }
/** * Provider-specific configuration. * * Generated from protobuf field <code>.openstatus.notification.v1.NotificationData data = 4 [json_name = "data"];</code> * @param \Openstatus\Notification\V1\NotificationData $var * @return $this */ public function setData(\Openstatus\Notification\V1\NotificationData|null $var) { $this->data = $var;
return $this; }
/** * IDs of monitors associated with this notification. * * Generated from protobuf field <code>repeated string monitor_ids = 5 [json_name = "monitorIds"];</code> * @return RepeatedField<string> */ public function getMonitorIds() { return $this->monitor_ids; }
/** * IDs of monitors associated with this notification. * * Generated from protobuf field <code>repeated string monitor_ids = 5 [json_name = "monitorIds"];</code> * @param string[] $var * @return $this */ public function setMonitorIds(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->monitor_ids = $arr;
return $this; }
/** * Timestamp when the notification was created (RFC 3339). * * Generated from protobuf field <code>string created_at = 6 [json_name = "createdAt"];</code> * @return string */ public function getCreatedAt() { return $this->created_at; }
/** * Timestamp when the notification was created (RFC 3339). * * Generated from protobuf field <code>string created_at = 6 [json_name = "createdAt"];</code> * @param string $var * @return $this */ public function setCreatedAt(string $var) { GPBUtil::checkString($var, true); $this->created_at = $var;
return $this; }
/** * Timestamp when the notification was last updated (RFC 3339). * * Generated from protobuf field <code>string updated_at = 7 [json_name = "updatedAt"];</code> * @return string */ public function getUpdatedAt() { return $this->updated_at; }
/** * Timestamp when the notification was last updated (RFC 3339). * * Generated from protobuf field <code>string updated_at = 7 [json_name = "updatedAt"];</code> * @param string $var * @return $this */ public function setUpdatedAt(string $var) { GPBUtil::checkString($var, true); $this->updated_at = $var;
return $this; }
}