openstatus.notification.v1.WebhookData */ class WebhookData extends \Google\Protobuf\Internal\Message { /** * Webhook endpoint URL. * * Generated from protobuf field string endpoint = 1 [json_name = "endpoint", (.gnostic.openapi.v3.property) = { */ protected $endpoint = ''; /** * Optional custom headers. * * Generated from protobuf field repeated .openstatus.notification.v1.WebhookHeader headers = 2 [json_name = "headers"]; */ private $headers; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $endpoint * Webhook endpoint URL. * @type \Openstatus\Notification\V1\WebhookHeader[] $headers * Optional custom headers. * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\Notification\V1\Providers::initOnce(); parent::__construct($data); } /** * Webhook endpoint URL. * * Generated from protobuf field string endpoint = 1 [json_name = "endpoint", (.gnostic.openapi.v3.property) = { * @return string */ public function getEndpoint() { return $this->endpoint; } /** * Webhook endpoint URL. * * Generated from protobuf field string endpoint = 1 [json_name = "endpoint", (.gnostic.openapi.v3.property) = { * @param string $var * @return $this */ public function setEndpoint(string $var) { GPBUtil::checkString($var, true); $this->endpoint = $var; return $this; } /** * Optional custom headers. * * Generated from protobuf field repeated .openstatus.notification.v1.WebhookHeader headers = 2 [json_name = "headers"]; * @return RepeatedField<\Openstatus\Notification\V1\WebhookHeader> */ public function getHeaders() { return $this->headers; } /** * Optional custom headers. * * Generated from protobuf field repeated .openstatus.notification.v1.WebhookHeader headers = 2 [json_name = "headers"]; * @param \Openstatus\Notification\V1\WebhookHeader[] $var * @return $this */ public function setHeaders(array|RepeatedField $var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Openstatus\Notification\V1\WebhookHeader::class); $this->headers = $arr; return $this; } }