openstatus.notification.v1.Notification */ class Notification extends \Google\Protobuf\Internal\Message { /** * Unique identifier for the notification. * * Generated from protobuf field string id = 1 [json_name = "id"]; */ protected $id = ''; /** * Display name for the notification channel. * * Generated from protobuf field string name = 2 [json_name = "name"]; */ protected $name = ''; /** * Provider type. * * Generated from protobuf field .openstatus.notification.v1.NotificationProvider provider = 3 [json_name = "provider"]; */ protected $provider = 0; /** * Provider-specific configuration. * * Generated from protobuf field .openstatus.notification.v1.NotificationData data = 4 [json_name = "data"]; */ protected $data = null; /** * IDs of monitors associated with this notification. * * Generated from protobuf field repeated string monitor_ids = 5 [json_name = "monitorIds"]; */ private $monitor_ids; /** * Timestamp when the notification was created (RFC 3339). * * Generated from protobuf field string created_at = 6 [json_name = "createdAt"]; */ protected $created_at = ''; /** * Timestamp when the notification was last updated (RFC 3339). * * Generated from protobuf field string updated_at = 7 [json_name = "updatedAt"]; */ 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 string id = 1 [json_name = "id"]; * @return string */ public function getId() { return $this->id; } /** * Unique identifier for the notification. * * Generated from protobuf field string id = 1 [json_name = "id"]; * @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 string name = 2 [json_name = "name"]; * @return string */ public function getName() { return $this->name; } /** * Display name for the notification channel. * * Generated from protobuf field string name = 2 [json_name = "name"]; * @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 .openstatus.notification.v1.NotificationProvider provider = 3 [json_name = "provider"]; * @return int one of the values in {@see \Openstatus\Notification\V1\NotificationProvider} */ public function getProvider() { return $this->provider; } /** * Provider type. * * Generated from protobuf field .openstatus.notification.v1.NotificationProvider provider = 3 [json_name = "provider"]; * @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 .openstatus.notification.v1.NotificationData data = 4 [json_name = "data"]; * @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 .openstatus.notification.v1.NotificationData data = 4 [json_name = "data"]; * @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 repeated string monitor_ids = 5 [json_name = "monitorIds"]; * @return RepeatedField */ public function getMonitorIds() { return $this->monitor_ids; } /** * IDs of monitors associated with this notification. * * Generated from protobuf field repeated string monitor_ids = 5 [json_name = "monitorIds"]; * @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 string created_at = 6 [json_name = "createdAt"]; * @return string */ public function getCreatedAt() { return $this->created_at; } /** * Timestamp when the notification was created (RFC 3339). * * Generated from protobuf field string created_at = 6 [json_name = "createdAt"]; * @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 string updated_at = 7 [json_name = "updatedAt"]; * @return string */ public function getUpdatedAt() { return $this->updated_at; } /** * Timestamp when the notification was last updated (RFC 3339). * * Generated from protobuf field string updated_at = 7 [json_name = "updatedAt"]; * @param string $var * @return $this */ public function setUpdatedAt(string $var) { GPBUtil::checkString($var, true); $this->updated_at = $var; return $this; } }