openstatus.notification.v1.UpdateNotificationRequest */ class UpdateNotificationRequest extends \Google\Protobuf\Internal\Message { /** * Notification ID to update (required). * * Generated from protobuf field string id = 1 [json_name = "id", (.buf.validate.field) = { */ protected $id = ''; /** * Updated display name. * * Generated from protobuf field optional string name = 2 [json_name = "name"]; */ protected $name = null; /** * Updated provider-specific configuration. * * Generated from protobuf field optional .openstatus.notification.v1.NotificationData data = 3 [json_name = "data"]; */ protected $data = null; /** * Updated monitor IDs to associate. * * Generated from protobuf field repeated string monitor_ids = 4 [json_name = "monitorIds"]; */ private $monitor_ids; /** * Set to true to update monitor associations. * When true, monitor_ids replaces the existing list (empty clears all). * When false or unset, monitor_ids is ignored and existing associations are preserved. * * Generated from protobuf field optional bool update_monitor_ids = 5 [json_name = "updateMonitorIds"]; */ protected $update_monitor_ids = null; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $id * Notification ID to update (required). * @type string $name * Updated display name. * @type \Openstatus\Notification\V1\NotificationData $data * Updated provider-specific configuration. * @type string[] $monitor_ids * Updated monitor IDs to associate. * @type bool $update_monitor_ids * Set to true to update monitor associations. * When true, monitor_ids replaces the existing list (empty clears all). * When false or unset, monitor_ids is ignored and existing associations are preserved. * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\Notification\V1\Service::initOnce(); parent::__construct($data); } /** * Notification ID to update (required). * * Generated from protobuf field string id = 1 [json_name = "id", (.buf.validate.field) = { * @return string */ public function getId() { return $this->id; } /** * Notification ID to update (required). * * Generated from protobuf field string id = 1 [json_name = "id", (.buf.validate.field) = { * @param string $var * @return $this */ public function setId(string $var) { GPBUtil::checkString($var, true); $this->id = $var; return $this; } /** * Updated display name. * * Generated from protobuf field optional string name = 2 [json_name = "name"]; * @return string */ public function getName() { return isset($this->name) ? $this->name : ''; } public function hasName() { return isset($this->name); } public function clearName() { unset($this->name); } /** * Updated display name. * * Generated from protobuf field optional 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; } /** * Updated provider-specific configuration. * * Generated from protobuf field optional .openstatus.notification.v1.NotificationData data = 3 [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); } /** * Updated provider-specific configuration. * * Generated from protobuf field optional .openstatus.notification.v1.NotificationData data = 3 [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; } /** * Updated monitor IDs to associate. * * Generated from protobuf field repeated string monitor_ids = 4 [json_name = "monitorIds"]; * @return RepeatedField */ public function getMonitorIds() { return $this->monitor_ids; } /** * Updated monitor IDs to associate. * * Generated from protobuf field repeated string monitor_ids = 4 [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; } /** * Set to true to update monitor associations. * When true, monitor_ids replaces the existing list (empty clears all). * When false or unset, monitor_ids is ignored and existing associations are preserved. * * Generated from protobuf field optional bool update_monitor_ids = 5 [json_name = "updateMonitorIds"]; * @return bool */ public function getUpdateMonitorIds() { return isset($this->update_monitor_ids) ? $this->update_monitor_ids : false; } public function hasUpdateMonitorIds() { return isset($this->update_monitor_ids); } public function clearUpdateMonitorIds() { unset($this->update_monitor_ids); } /** * Set to true to update monitor associations. * When true, monitor_ids replaces the existing list (empty clears all). * When false or unset, monitor_ids is ignored and existing associations are preserved. * * Generated from protobuf field optional bool update_monitor_ids = 5 [json_name = "updateMonitorIds"]; * @param bool $var * @return $this */ public function setUpdateMonitorIds(bool $var) { $this->update_monitor_ids = $var; return $this; } }