openstatus.status_report.v1.CreateStatusReportRequest
*/
class CreateStatusReportRequest extends \Google\Protobuf\Internal\Message
{
/**
* Title of the status report (required).
*
* Generated from protobuf field string title = 1 [json_name = "title", (.gnostic.openapi.v3.property) = {
*/
protected $title = '';
/**
* Initial status (required).
*
* Generated from protobuf field .openstatus.status_report.v1.StatusReportStatus status = 2 [json_name = "status", (.buf.validate.field) = {
*/
protected $status = 0;
/**
* Initial message describing the incident (required).
*
* Generated from protobuf field string message = 3 [json_name = "message", (.gnostic.openapi.v3.property) = {
*/
protected $message = '';
/**
* Date when the event occurred (RFC 3339 format, required).
*
* Generated from protobuf field string date = 4 [json_name = "date", (.gnostic.openapi.v3.property) = {
*/
protected $date = '';
/**
* Page ID to associate with this report (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 report (optional).
*
* Generated from protobuf field repeated string page_component_ids = 6 [json_name = "pageComponentIds"];
*/
private $page_component_ids;
/**
* Whether to notify subscribers about this status report (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 status report (required).
* @type int $status
* Initial status (required).
* @type string $message
* Initial message describing the incident (required).
* @type string $date
* Date when the event occurred (RFC 3339 format, required).
* @type string $page_id
* Page ID to associate with this report (required).
* @type string[] $page_component_ids
* Page component IDs to associate with this report (optional).
* @type bool $notify
* Whether to notify subscribers about this status report (optional, defaults to false).
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Openstatus\StatusReport\V1\Service::initOnce();
parent::__construct($data);
}
/**
* Title of the status report (required).
*
* 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 status report (required).
*
* 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;
}
/**
* Initial status (required).
*
* Generated from protobuf field .openstatus.status_report.v1.StatusReportStatus status = 2 [json_name = "status", (.buf.validate.field) = {
* @return int one of the values in {@see \Openstatus\Status_report\V1\StatusReportStatus}
*/
public function getStatus()
{
return $this->status;
}
/**
* Initial status (required).
*
* Generated from protobuf field .openstatus.status_report.v1.StatusReportStatus status = 2 [json_name = "status", (.buf.validate.field) = {
* @param int $var one of the values in {@see \Openstatus\Status_report\V1\StatusReportStatus}
* @return $this
*/
public function setStatus(int $var)
{
GPBUtil::checkEnum($var, \Openstatus\Status_report\V1\StatusReportStatus::class);
$this->status = $var;
return $this;
}
/**
* Initial message describing the incident (required).
*
* Generated from protobuf field string message = 3 [json_name = "message", (.gnostic.openapi.v3.property) = {
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
* Initial message describing the incident (required).
*
* Generated from protobuf field string message = 3 [json_name = "message", (.gnostic.openapi.v3.property) = {
* @param string $var
* @return $this
*/
public function setMessage(string $var)
{
GPBUtil::checkString($var, true);
$this->message = $var;
return $this;
}
/**
* Date when the event occurred (RFC 3339 format, required).
*
* Generated from protobuf field string date = 4 [json_name = "date", (.gnostic.openapi.v3.property) = {
* @return string
*/
public function getDate()
{
return $this->date;
}
/**
* Date when the event occurred (RFC 3339 format, required).
*
* Generated from protobuf field string date = 4 [json_name = "date", (.gnostic.openapi.v3.property) = {
* @param string $var
* @return $this
*/
public function setDate(string $var)
{
GPBUtil::checkString($var, true);
$this->date = $var;
return $this;
}
/**
* Page ID to associate with this report (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 report (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 report (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 report (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 status report (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 status report (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;
}
}