openstatus.maintenance.v1.UpdateMaintenanceRequest
*/
class UpdateMaintenanceRequest extends \Google\Protobuf\Internal\Message
{
/**
* ID of the maintenance to update (required).
*
* Generated from protobuf field string id = 1 [json_name = "id", (.buf.validate.field) = {
*/
protected $id = '';
/**
* New title for the maintenance (optional).
*
* Generated from protobuf field optional string title = 2 [json_name = "title", (.buf.validate.field) = {
*/
protected $title = null;
/**
* New message for the maintenance (optional).
*
* Generated from protobuf field optional string message = 3 [json_name = "message"];
*/
protected $message = null;
/**
* New start time (RFC 3339 format, optional).
*
* Generated from protobuf field optional string from = 4 [json_name = "from", (.buf.validate.field) = {
*/
protected $from = null;
/**
* New end time (RFC 3339 format, optional).
*
* Generated from protobuf field optional string to = 5 [json_name = "to", (.buf.validate.field) = {
*/
protected $to = null;
/**
* Deprecated: page_id is now derived from page_component_ids.
*
* Generated from protobuf field optional string page_id = 6 [json_name = "pageId", deprecated = true];
* @deprecated
*/
protected $page_id = null;
/**
* New list of page component IDs (optional, replaces existing list).
*
* Generated from protobuf field repeated string page_component_ids = 7 [json_name = "pageComponentIds"];
*/
private $page_component_ids;
/**
* Set to true to update page component associations.
* When true, page_component_ids replaces the existing list (empty clears all).
* When false or unset, page_component_ids is ignored and existing associations are preserved.
*
* Generated from protobuf field optional bool update_page_component_ids = 8 [json_name = "updatePageComponentIds"];
*/
protected $update_page_component_ids = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $id
* ID of the maintenance to update (required).
* @type string $title
* New title for the maintenance (optional).
* @type string $message
* New message for the maintenance (optional).
* @type string $from
* New start time (RFC 3339 format, optional).
* @type string $to
* New end time (RFC 3339 format, optional).
* @type string $page_id
* Deprecated: page_id is now derived from page_component_ids.
* @type string[] $page_component_ids
* New list of page component IDs (optional, replaces existing list).
* @type bool $update_page_component_ids
* Set to true to update page component associations.
* When true, page_component_ids replaces the existing list (empty clears all).
* When false or unset, page_component_ids is ignored and existing associations are preserved.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Openstatus\Maintenance\V1\Service::initOnce();
parent::__construct($data);
}
/**
* ID of the maintenance to update (required).
*
* Generated from protobuf field string id = 1 [json_name = "id", (.buf.validate.field) = {
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* ID of the maintenance 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;
}
/**
* New title for the maintenance (optional).
*
* Generated from protobuf field optional string title = 2 [json_name = "title", (.buf.validate.field) = {
* @return string
*/
public function getTitle()
{
return isset($this->title) ? $this->title : '';
}
public function hasTitle()
{
return isset($this->title);
}
public function clearTitle()
{
unset($this->title);
}
/**
* New title for the maintenance (optional).
*
* Generated from protobuf field optional string title = 2 [json_name = "title", (.buf.validate.field) = {
* @param string $var
* @return $this
*/
public function setTitle(string $var)
{
GPBUtil::checkString($var, true);
$this->title = $var;
return $this;
}
/**
* New message for the maintenance (optional).
*
* Generated from protobuf field optional string message = 3 [json_name = "message"];
* @return string
*/
public function getMessage()
{
return isset($this->message) ? $this->message : '';
}
public function hasMessage()
{
return isset($this->message);
}
public function clearMessage()
{
unset($this->message);
}
/**
* New message for the maintenance (optional).
*
* Generated from protobuf field optional string message = 3 [json_name = "message"];
* @param string $var
* @return $this
*/
public function setMessage(string $var)
{
GPBUtil::checkString($var, true);
$this->message = $var;
return $this;
}
/**
* New start time (RFC 3339 format, optional).
*
* Generated from protobuf field optional string from = 4 [json_name = "from", (.buf.validate.field) = {
* @return string
*/
public function getFrom()
{
return isset($this->from) ? $this->from : '';
}
public function hasFrom()
{
return isset($this->from);
}
public function clearFrom()
{
unset($this->from);
}
/**
* New start time (RFC 3339 format, optional).
*
* Generated from protobuf field optional string from = 4 [json_name = "from", (.buf.validate.field) = {
* @param string $var
* @return $this
*/
public function setFrom(string $var)
{
GPBUtil::checkString($var, true);
$this->from = $var;
return $this;
}
/**
* New end time (RFC 3339 format, optional).
*
* Generated from protobuf field optional string to = 5 [json_name = "to", (.buf.validate.field) = {
* @return string
*/
public function getTo()
{
return isset($this->to) ? $this->to : '';
}
public function hasTo()
{
return isset($this->to);
}
public function clearTo()
{
unset($this->to);
}
/**
* New end time (RFC 3339 format, optional).
*
* Generated from protobuf field optional string to = 5 [json_name = "to", (.buf.validate.field) = {
* @param string $var
* @return $this
*/
public function setTo(string $var)
{
GPBUtil::checkString($var, true);
$this->to = $var;
return $this;
}
/**
* Deprecated: page_id is now derived from page_component_ids.
*
* Generated from protobuf field optional string page_id = 6 [json_name = "pageId", deprecated = true];
* @return string
* @deprecated
*/
public function getPageId()
{
if (isset($this->page_id)) {
@trigger_error('page_id is deprecated.', E_USER_DEPRECATED);
}
return isset($this->page_id) ? $this->page_id : '';
}
public function hasPageId()
{
if (isset($this->page_id)) {
@trigger_error('page_id is deprecated.', E_USER_DEPRECATED);
}
return isset($this->page_id);
}
public function clearPageId()
{
@trigger_error('page_id is deprecated.', E_USER_DEPRECATED);
unset($this->page_id);
}
/**
* Deprecated: page_id is now derived from page_component_ids.
*
* Generated from protobuf field optional string page_id = 6 [json_name = "pageId", deprecated = true];
* @param string $var
* @return $this
* @deprecated
*/
public function setPageId(string $var)
{
@trigger_error('page_id is deprecated.', E_USER_DEPRECATED);
GPBUtil::checkString($var, true);
$this->page_id = $var;
return $this;
}
/**
* New list of page component IDs (optional, replaces existing list).
*
* Generated from protobuf field repeated string page_component_ids = 7 [json_name = "pageComponentIds"];
* @return RepeatedField
*/
public function getPageComponentIds()
{
return $this->page_component_ids;
}
/**
* New list of page component IDs (optional, replaces existing list).
*
* Generated from protobuf field repeated string page_component_ids = 7 [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;
}
/**
* Set to true to update page component associations.
* When true, page_component_ids replaces the existing list (empty clears all).
* When false or unset, page_component_ids is ignored and existing associations are preserved.
*
* Generated from protobuf field optional bool update_page_component_ids = 8 [json_name = "updatePageComponentIds"];
* @return bool
*/
public function getUpdatePageComponentIds()
{
return isset($this->update_page_component_ids) ? $this->update_page_component_ids : false;
}
public function hasUpdatePageComponentIds()
{
return isset($this->update_page_component_ids);
}
public function clearUpdatePageComponentIds()
{
unset($this->update_page_component_ids);
}
/**
* Set to true to update page component associations.
* When true, page_component_ids replaces the existing list (empty clears all).
* When false or unset, page_component_ids is ignored and existing associations are preserved.
*
* Generated from protobuf field optional bool update_page_component_ids = 8 [json_name = "updatePageComponentIds"];
* @param bool $var
* @return $this
*/
public function setUpdatePageComponentIds(bool $var)
{
$this->update_page_component_ids = $var;
return $this;
}
}