openstatus.status_page.v1.CreatePageSubscriptionRequest */ class CreatePageSubscriptionRequest extends \Google\Protobuf\Internal\Message { /** * ID of the status page (required). * * Generated from protobuf field string page_id = 1 [json_name = "pageId", (.buf.validate.field) = { */ protected $page_id = ''; /** * Optional human-readable label. * * Generated from protobuf field optional string name = 2 [json_name = "name", (.buf.validate.field) = { */ protected $name = null; /** * Component scope. Empty = entire page. * * Generated from protobuf field repeated string component_ids = 3 [json_name = "componentIds"]; */ private $component_ids; protected $channel; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $page_id * ID of the status page (required). * @type string $name * Optional human-readable label. * @type string[] $component_ids * Component scope. Empty = entire page. * @type \Openstatus\Status_page\V1\EmailChannel $email_channel * @type \Openstatus\Status_page\V1\WebhookChannel $webhook_channel * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\StatusPage\V1\Service::initOnce(); parent::__construct($data); } /** * ID of the status page (required). * * Generated from protobuf field string page_id = 1 [json_name = "pageId", (.buf.validate.field) = { * @return string */ public function getPageId() { return $this->page_id; } /** * ID of the status page (required). * * Generated from protobuf field string page_id = 1 [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; } /** * Optional human-readable label. * * Generated from protobuf field optional string name = 2 [json_name = "name", (.buf.validate.field) = { * @return string */ public function getName() { return isset($this->name) ? $this->name : ''; } public function hasName() { return isset($this->name); } public function clearName() { unset($this->name); } /** * Optional human-readable label. * * Generated from protobuf field optional string name = 2 [json_name = "name", (.buf.validate.field) = { * @param string $var * @return $this */ public function setName(string $var) { GPBUtil::checkString($var, true); $this->name = $var; return $this; } /** * Component scope. Empty = entire page. * * Generated from protobuf field repeated string component_ids = 3 [json_name = "componentIds"]; * @return RepeatedField */ public function getComponentIds() { return $this->component_ids; } /** * Component scope. Empty = entire page. * * Generated from protobuf field repeated string component_ids = 3 [json_name = "componentIds"]; * @param string[] $var * @return $this */ public function setComponentIds(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->component_ids = $arr; return $this; } /** * Generated from protobuf field .openstatus.status_page.v1.EmailChannel email_channel = 10 [json_name = "emailChannel"]; * @return \Openstatus\Status_page\V1\EmailChannel|null */ public function getEmailChannel() { return $this->readOneof(10); } public function hasEmailChannel() { return $this->hasOneof(10); } /** * Generated from protobuf field .openstatus.status_page.v1.EmailChannel email_channel = 10 [json_name = "emailChannel"]; * @param \Openstatus\Status_page\V1\EmailChannel $var * @return $this */ public function setEmailChannel(\Openstatus\Status_page\V1\EmailChannel|null $var) { $this->writeOneof(10, $var); return $this; } /** * Generated from protobuf field .openstatus.status_page.v1.WebhookChannel webhook_channel = 11 [json_name = "webhookChannel"]; * @return \Openstatus\Status_page\V1\WebhookChannel|null */ public function getWebhookChannel() { return $this->readOneof(11); } public function hasWebhookChannel() { return $this->hasOneof(11); } /** * Generated from protobuf field .openstatus.status_page.v1.WebhookChannel webhook_channel = 11 [json_name = "webhookChannel"]; * @param \Openstatus\Status_page\V1\WebhookChannel $var * @return $this */ public function setWebhookChannel(\Openstatus\Status_page\V1\WebhookChannel|null $var) { $this->writeOneof(11, $var); return $this; } /** * @return string */ public function getChannel() { return $this->whichOneof("channel"); } }