openstatus.status_page.v1.PageComponent */ class PageComponent extends \Google\Protobuf\Internal\Message { /** * Unique identifier for the component. * * Generated from protobuf field string id = 1 [json_name = "id"]; */ protected $id = ''; /** * ID of the status page this component belongs to. * * Generated from protobuf field string page_id = 2 [json_name = "pageId"]; */ protected $page_id = ''; /** * Display name of the component. * * Generated from protobuf field string name = 3 [json_name = "name"]; */ protected $name = ''; /** * Description of the component (optional). * * Generated from protobuf field string description = 4 [json_name = "description"]; */ protected $description = ''; /** * Type of the component (monitor or static). * * Generated from protobuf field .openstatus.status_page.v1.PageComponentType type = 5 [json_name = "type"]; */ protected $type = 0; /** * ID of the monitor if type is MONITOR (optional). * * Generated from protobuf field string monitor_id = 6 [json_name = "monitorId"]; */ protected $monitor_id = ''; /** * Display order of the component. * * Generated from protobuf field int32 order = 7 [json_name = "order"]; */ protected $order = 0; /** * ID of the group this component belongs to (optional). * * Generated from protobuf field string group_id = 8 [json_name = "groupId"]; */ protected $group_id = ''; /** * Order within the group if grouped. * * Generated from protobuf field int32 group_order = 9 [json_name = "groupOrder"]; */ protected $group_order = 0; /** * Timestamp when the component was created (RFC 3339 format). * * Generated from protobuf field string created_at = 10 [json_name = "createdAt"]; */ protected $created_at = ''; /** * Timestamp when the component was last updated (RFC 3339 format). * * Generated from protobuf field string updated_at = 11 [json_name = "updatedAt"]; */ protected $updated_at = ''; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $id * Unique identifier for the component. * @type string $page_id * ID of the status page this component belongs to. * @type string $name * Display name of the component. * @type string $description * Description of the component (optional). * @type int $type * Type of the component (monitor or static). * @type string $monitor_id * ID of the monitor if type is MONITOR (optional). * @type int $order * Display order of the component. * @type string $group_id * ID of the group this component belongs to (optional). * @type int $group_order * Order within the group if grouped. * @type string $created_at * Timestamp when the component was created (RFC 3339 format). * @type string $updated_at * Timestamp when the component was last updated (RFC 3339 format). * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\StatusPage\V1\PageComponent::initOnce(); parent::__construct($data); } /** * Unique identifier for the component. * * Generated from protobuf field string id = 1 [json_name = "id"]; * @return string */ public function getId() { return $this->id; } /** * Unique identifier for the component. * * Generated from protobuf field string id = 1 [json_name = "id"]; * @param string $var * @return $this */ public function setId(string $var) { GPBUtil::checkString($var, true); $this->id = $var; return $this; } /** * ID of the status page this component belongs to. * * Generated from protobuf field string page_id = 2 [json_name = "pageId"]; * @return string */ public function getPageId() { return $this->page_id; } /** * ID of the status page this component belongs to. * * Generated from protobuf field string page_id = 2 [json_name = "pageId"]; * @param string $var * @return $this */ public function setPageId(string $var) { GPBUtil::checkString($var, true); $this->page_id = $var; return $this; } /** * Display name of the component. * * Generated from protobuf field string name = 3 [json_name = "name"]; * @return string */ public function getName() { return $this->name; } /** * Display name of the component. * * Generated from protobuf field string name = 3 [json_name = "name"]; * @param string $var * @return $this */ public function setName(string $var) { GPBUtil::checkString($var, true); $this->name = $var; return $this; } /** * Description of the component (optional). * * Generated from protobuf field string description = 4 [json_name = "description"]; * @return string */ public function getDescription() { return $this->description; } /** * Description of the component (optional). * * Generated from protobuf field string description = 4 [json_name = "description"]; * @param string $var * @return $this */ public function setDescription(string $var) { GPBUtil::checkString($var, true); $this->description = $var; return $this; } /** * Type of the component (monitor or static). * * Generated from protobuf field .openstatus.status_page.v1.PageComponentType type = 5 [json_name = "type"]; * @return int one of the values in {@see \Openstatus\Status_page\V1\PageComponentType} */ public function getType() { return $this->type; } /** * Type of the component (monitor or static). * * Generated from protobuf field .openstatus.status_page.v1.PageComponentType type = 5 [json_name = "type"]; * @param int $var one of the values in {@see \Openstatus\Status_page\V1\PageComponentType} * @return $this */ public function setType(int $var) { GPBUtil::checkEnum($var, \Openstatus\Status_page\V1\PageComponentType::class); $this->type = $var; return $this; } /** * ID of the monitor if type is MONITOR (optional). * * Generated from protobuf field string monitor_id = 6 [json_name = "monitorId"]; * @return string */ public function getMonitorId() { return $this->monitor_id; } /** * ID of the monitor if type is MONITOR (optional). * * Generated from protobuf field string monitor_id = 6 [json_name = "monitorId"]; * @param string $var * @return $this */ public function setMonitorId(string $var) { GPBUtil::checkString($var, true); $this->monitor_id = $var; return $this; } /** * Display order of the component. * * Generated from protobuf field int32 order = 7 [json_name = "order"]; * @return int */ public function getOrder() { return $this->order; } /** * Display order of the component. * * Generated from protobuf field int32 order = 7 [json_name = "order"]; * @param int $var * @return $this */ public function setOrder(int $var) { GPBUtil::checkInt32($var); $this->order = $var; return $this; } /** * ID of the group this component belongs to (optional). * * Generated from protobuf field string group_id = 8 [json_name = "groupId"]; * @return string */ public function getGroupId() { return $this->group_id; } /** * ID of the group this component belongs to (optional). * * Generated from protobuf field string group_id = 8 [json_name = "groupId"]; * @param string $var * @return $this */ public function setGroupId(string $var) { GPBUtil::checkString($var, true); $this->group_id = $var; return $this; } /** * Order within the group if grouped. * * Generated from protobuf field int32 group_order = 9 [json_name = "groupOrder"]; * @return int */ public function getGroupOrder() { return $this->group_order; } /** * Order within the group if grouped. * * Generated from protobuf field int32 group_order = 9 [json_name = "groupOrder"]; * @param int $var * @return $this */ public function setGroupOrder(int $var) { GPBUtil::checkInt32($var); $this->group_order = $var; return $this; } /** * Timestamp when the component was created (RFC 3339 format). * * Generated from protobuf field string created_at = 10 [json_name = "createdAt"]; * @return string */ public function getCreatedAt() { return $this->created_at; } /** * Timestamp when the component was created (RFC 3339 format). * * Generated from protobuf field string created_at = 10 [json_name = "createdAt"]; * @param string $var * @return $this */ public function setCreatedAt(string $var) { GPBUtil::checkString($var, true); $this->created_at = $var; return $this; } /** * Timestamp when the component was last updated (RFC 3339 format). * * Generated from protobuf field string updated_at = 11 [json_name = "updatedAt"]; * @return string */ public function getUpdatedAt() { return $this->updated_at; } /** * Timestamp when the component was last updated (RFC 3339 format). * * Generated from protobuf field string updated_at = 11 [json_name = "updatedAt"]; * @param string $var * @return $this */ public function setUpdatedAt(string $var) { GPBUtil::checkString($var, true); $this->updated_at = $var; return $this; } }