openstatus.maintenance.v1.CreateMaintenanceRequest */ class CreateMaintenanceRequest extends \Google\Protobuf\Internal\Message { /** * Title of the maintenance (required, 1-256 characters). * * Generated from protobuf field string title = 1 [json_name = "title", (.gnostic.openapi.v3.property) = { */ protected $title = ''; /** * Message describing the maintenance (required). * * Generated from protobuf field string message = 2 [json_name = "message", (.buf.validate.field) = { */ protected $message = ''; /** * Start time of the maintenance window (RFC 3339 format, required). * * Generated from protobuf field string from = 3 [json_name = "from", (.gnostic.openapi.v3.property) = { */ protected $from = ''; /** * End time of the maintenance window (RFC 3339 format, required). * * Generated from protobuf field string to = 4 [json_name = "to", (.gnostic.openapi.v3.property) = { */ protected $to = ''; /** * Page ID to associate with this maintenance (required). * * Generated from protobuf field string page_id = 5 [json_name = "pageId", (.buf.validate.field) = { */ protected $page_id = ''; /** * Page component IDs to associate with this maintenance (optional). * * Generated from protobuf field repeated string page_component_ids = 6 [json_name = "pageComponentIds"]; */ private $page_component_ids; /** * Whether to notify subscribers about this maintenance (optional, defaults to false). * * Generated from protobuf field optional bool notify = 7 [json_name = "notify"]; */ protected $notify = null; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $title * Title of the maintenance (required, 1-256 characters). * @type string $message * Message describing the maintenance (required). * @type string $from * Start time of the maintenance window (RFC 3339 format, required). * @type string $to * End time of the maintenance window (RFC 3339 format, required). * @type string $page_id * Page ID to associate with this maintenance (required). * @type string[] $page_component_ids * Page component IDs to associate with this maintenance (optional). * @type bool $notify * Whether to notify subscribers about this maintenance (optional, defaults to false). * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\Maintenance\V1\Service::initOnce(); parent::__construct($data); } /** * Title of the maintenance (required, 1-256 characters). * * Generated from protobuf field string title = 1 [json_name = "title", (.gnostic.openapi.v3.property) = { * @return string */ public function getTitle() { return $this->title; } /** * Title of the maintenance (required, 1-256 characters). * * Generated from protobuf field string title = 1 [json_name = "title", (.gnostic.openapi.v3.property) = { * @param string $var * @return $this */ public function setTitle(string $var) { GPBUtil::checkString($var, true); $this->title = $var; return $this; } /** * Message describing the maintenance (required). * * Generated from protobuf field string message = 2 [json_name = "message", (.buf.validate.field) = { * @return string */ public function getMessage() { return $this->message; } /** * Message describing the maintenance (required). * * Generated from protobuf field string message = 2 [json_name = "message", (.buf.validate.field) = { * @param string $var * @return $this */ public function setMessage(string $var) { GPBUtil::checkString($var, true); $this->message = $var; return $this; } /** * Start time of the maintenance window (RFC 3339 format, required). * * Generated from protobuf field string from = 3 [json_name = "from", (.gnostic.openapi.v3.property) = { * @return string */ public function getFrom() { return $this->from; } /** * Start time of the maintenance window (RFC 3339 format, required). * * Generated from protobuf field string from = 3 [json_name = "from", (.gnostic.openapi.v3.property) = { * @param string $var * @return $this */ public function setFrom(string $var) { GPBUtil::checkString($var, true); $this->from = $var; return $this; } /** * End time of the maintenance window (RFC 3339 format, required). * * Generated from protobuf field string to = 4 [json_name = "to", (.gnostic.openapi.v3.property) = { * @return string */ public function getTo() { return $this->to; } /** * End time of the maintenance window (RFC 3339 format, required). * * Generated from protobuf field string to = 4 [json_name = "to", (.gnostic.openapi.v3.property) = { * @param string $var * @return $this */ public function setTo(string $var) { GPBUtil::checkString($var, true); $this->to = $var; return $this; } /** * Page ID to associate with this maintenance (required). * * Generated from protobuf field string page_id = 5 [json_name = "pageId", (.buf.validate.field) = { * @return string */ public function getPageId() { return $this->page_id; } /** * Page ID to associate with this maintenance (required). * * Generated from protobuf field string page_id = 5 [json_name = "pageId", (.buf.validate.field) = { * @param string $var * @return $this */ public function setPageId(string $var) { GPBUtil::checkString($var, true); $this->page_id = $var; return $this; } /** * Page component IDs to associate with this maintenance (optional). * * Generated from protobuf field repeated string page_component_ids = 6 [json_name = "pageComponentIds"]; * @return RepeatedField */ public function getPageComponentIds() { return $this->page_component_ids; } /** * Page component IDs to associate with this maintenance (optional). * * Generated from protobuf field repeated string page_component_ids = 6 [json_name = "pageComponentIds"]; * @param string[] $var * @return $this */ public function setPageComponentIds(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->page_component_ids = $arr; return $this; } /** * Whether to notify subscribers about this maintenance (optional, defaults to false). * * Generated from protobuf field optional bool notify = 7 [json_name = "notify"]; * @return bool */ public function getNotify() { return isset($this->notify) ? $this->notify : false; } public function hasNotify() { return isset($this->notify); } public function clearNotify() { unset($this->notify); } /** * Whether to notify subscribers about this maintenance (optional, defaults to false). * * Generated from protobuf field optional bool notify = 7 [json_name = "notify"]; * @param bool $var * @return $this */ public function setNotify(bool $var) { $this->notify = $var; return $this; } }