openstatus.status_page.v1.WebhookChannel */ class WebhookChannel extends \Google\Protobuf\Internal\Message { /** * Webhook URL (required). Payload flavor (Slack / Discord / generic) is auto-detected from the URL prefix. * * Generated from protobuf field string webhook_url = 1 [json_name = "webhookUrl", (.buf.validate.field) = { */ protected $webhook_url = ''; /** * Optional custom HTTP headers attached to every dispatch. * * Generated from protobuf field repeated .openstatus.status_page.v1.WebhookChannelHeader headers = 2 [json_name = "headers"]; */ private $headers; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $webhook_url * Webhook URL (required). Payload flavor (Slack / Discord / generic) is auto-detected from the URL prefix. * @type \Openstatus\Status_page\V1\WebhookChannelHeader[] $headers * Optional custom HTTP headers attached to every dispatch. * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\StatusPage\V1\Service::initOnce(); parent::__construct($data); } /** * Webhook URL (required). Payload flavor (Slack / Discord / generic) is auto-detected from the URL prefix. * * Generated from protobuf field string webhook_url = 1 [json_name = "webhookUrl", (.buf.validate.field) = { * @return string */ public function getWebhookUrl() { return $this->webhook_url; } /** * Webhook URL (required). Payload flavor (Slack / Discord / generic) is auto-detected from the URL prefix. * * Generated from protobuf field string webhook_url = 1 [json_name = "webhookUrl", (.buf.validate.field) = { * @param string $var * @return $this */ public function setWebhookUrl(string $var) { GPBUtil::checkString($var, true); $this->webhook_url = $var; return $this; } /** * Optional custom HTTP headers attached to every dispatch. * * Generated from protobuf field repeated .openstatus.status_page.v1.WebhookChannelHeader headers = 2 [json_name = "headers"]; * @return RepeatedField<\Openstatus\Status_page\V1\WebhookChannelHeader> */ public function getHeaders() { return $this->headers; } /** * Optional custom HTTP headers attached to every dispatch. * * Generated from protobuf field repeated .openstatus.status_page.v1.WebhookChannelHeader headers = 2 [json_name = "headers"]; * @param \Openstatus\Status_page\V1\WebhookChannelHeader[] $var * @return $this */ public function setHeaders(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Openstatus\Status_page\V1\WebhookChannelHeader::class); $this->headers = $arr; return $this; } }