openstatus.status_page.v1.ComponentStatus
*/
class ComponentStatus extends \Google\Protobuf\Internal\Message
{
/**
* ID of the component.
*
* Generated from protobuf field string component_id = 1 [json_name = "componentId"];
*/
protected $component_id = '';
/**
* Current status of the component.
*
* Generated from protobuf field .openstatus.status_page.v1.OverallStatus status = 2 [json_name = "status"];
*/
protected $status = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $component_id
* ID of the component.
* @type int $status
* Current status of the component.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Openstatus\StatusPage\V1\Service::initOnce();
parent::__construct($data);
}
/**
* ID of the component.
*
* Generated from protobuf field string component_id = 1 [json_name = "componentId"];
* @return string
*/
public function getComponentId()
{
return $this->component_id;
}
/**
* ID of the component.
*
* Generated from protobuf field string component_id = 1 [json_name = "componentId"];
* @param string $var
* @return $this
*/
public function setComponentId(string $var)
{
GPBUtil::checkString($var, true);
$this->component_id = $var;
return $this;
}
/**
* Current status of the component.
*
* Generated from protobuf field .openstatus.status_page.v1.OverallStatus status = 2 [json_name = "status"];
* @return int one of the values in {@see \Openstatus\Status_page\V1\OverallStatus}
*/
public function getStatus()
{
return $this->status;
}
/**
* Current status of the component.
*
* Generated from protobuf field .openstatus.status_page.v1.OverallStatus status = 2 [json_name = "status"];
* @param int $var one of the values in {@see \Openstatus\Status_page\V1\OverallStatus}
* @return $this
*/
public function setStatus(int $var)
{
GPBUtil::checkEnum($var, \Openstatus\Status_page\V1\OverallStatus::class);
$this->status = $var;
return $this;
}
}