Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/sdk-php. php sdk for openstatus www.openstatus.dev
Something went wrong. Try again.
15 kB · 506 lines
PHP
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507<?php# Generated by the protocol buffer compiler. DO NOT EDIT!# NO CHECKED-IN PROTOBUF GENCODE# source: openstatus/status_page/v1/page_subscriber.proto
namespace Openstatus\Status_page\V1;
use Google\Protobuf\Internal\GPBType;use Google\Protobuf\Internal\GPBUtil;use Google\Protobuf\RepeatedField;
/** * PageSubscriber represents a subscriber to a status page. * * Generated from protobuf message <code>openstatus.status_page.v1.PageSubscriber</code> */class PageSubscriber extends \Google\Protobuf\Internal\Message{ /** * Unique identifier for the subscriber. * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> */ protected $id = ''; /** * ID of the status page the user is subscribed to. * * Generated from protobuf field <code>string page_id = 2 [json_name = "pageId"];</code> */ protected $page_id = ''; /** * Email address of the subscriber (empty for webhook channels). * * Generated from protobuf field <code>string email = 3 [json_name = "email"];</code> */ protected $email = ''; /** * Timestamp when the subscription was accepted/confirmed (RFC 3339 format, optional). * * Generated from protobuf field <code>string accepted_at = 4 [json_name = "acceptedAt"];</code> */ protected $accepted_at = ''; /** * Timestamp when the user unsubscribed (RFC 3339 format, optional). * * Generated from protobuf field <code>string unsubscribed_at = 5 [json_name = "unsubscribedAt"];</code> */ protected $unsubscribed_at = ''; /** * Timestamp when the subscription was created (RFC 3339 format). * * Generated from protobuf field <code>string created_at = 6 [json_name = "createdAt"];</code> */ protected $created_at = ''; /** * Timestamp when the subscription was last updated (RFC 3339 format). * * Generated from protobuf field <code>string updated_at = 7 [json_name = "updatedAt"];</code> */ protected $updated_at = ''; /** * How the subscription was created. Vendor-added rows skip verification. * * Generated from protobuf field <code>.openstatus.status_page.v1.SubscriberSource source = 8 [json_name = "source"];</code> */ protected $source = 0; /** * Optional human-readable label (e.g. "Supabase #incidents"). * * Generated from protobuf field <code>optional string name = 9 [json_name = "name"];</code> */ protected $name = null; /** * Channel type: "email" or "webhook". * * Generated from protobuf field <code>string channel_type = 10 [json_name = "channelType"];</code> */ protected $channel_type = ''; /** * Webhook URL (populated only for channel_type = "webhook"). * * Generated from protobuf field <code>optional string webhook_url = 11 [json_name = "webhookUrl"];</code> */ protected $webhook_url = null; /** * JSON-encoded channel config (e.g. custom headers). Populated for webhook channels. * * Generated from protobuf field <code>optional string channel_config = 12 [json_name = "channelConfig"];</code> */ protected $channel_config = null; /** * IDs of components this subscription is scoped to. Empty = entire page. * * Generated from protobuf field <code>repeated string component_ids = 13 [json_name = "componentIds"];</code> */ private $component_ids;
/** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $id * Unique identifier for the subscriber. * @type string $page_id * ID of the status page the user is subscribed to. * @type string $email * Email address of the subscriber (empty for webhook channels). * @type string $accepted_at * Timestamp when the subscription was accepted/confirmed (RFC 3339 format, optional). * @type string $unsubscribed_at * Timestamp when the user unsubscribed (RFC 3339 format, optional). * @type string $created_at * Timestamp when the subscription was created (RFC 3339 format). * @type string $updated_at * Timestamp when the subscription was last updated (RFC 3339 format). * @type int $source * How the subscription was created. Vendor-added rows skip verification. * @type string $name * Optional human-readable label (e.g. "Supabase #incidents"). * @type string $channel_type * Channel type: "email" or "webhook". * @type string $webhook_url * Webhook URL (populated only for channel_type = "webhook"). * @type string $channel_config * JSON-encoded channel config (e.g. custom headers). Populated for webhook channels. * @type string[] $component_ids * IDs of components this subscription is scoped to. Empty = entire page. * } */ public function __construct($data = NULL) { \GPBMetadata\Openstatus\StatusPage\V1\PageSubscriber::initOnce(); parent::__construct($data); }
/** * Unique identifier for the subscriber. * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> * @return string */ public function getId() { return $this->id; }
/** * Unique identifier for the subscriber. * * Generated from protobuf field <code>string id = 1 [json_name = "id"];</code> * @param string $var * @return $this */ public function setId(string $var) { GPBUtil::checkString($var, true); $this->id = $var;
return $this; }
/** * ID of the status page the user is subscribed to. * * Generated from protobuf field <code>string page_id = 2 [json_name = "pageId"];</code> * @return string */ public function getPageId() { return $this->page_id; }
/** * ID of the status page the user is subscribed to. * * Generated from protobuf field <code>string page_id = 2 [json_name = "pageId"];</code> * @param string $var * @return $this */ public function setPageId(string $var) { GPBUtil::checkString($var, true); $this->page_id = $var;
return $this; }
/** * Email address of the subscriber (empty for webhook channels). * * Generated from protobuf field <code>string email = 3 [json_name = "email"];</code> * @return string */ public function getEmail() { return $this->email; }
/** * Email address of the subscriber (empty for webhook channels). * * Generated from protobuf field <code>string email = 3 [json_name = "email"];</code> * @param string $var * @return $this */ public function setEmail(string $var) { GPBUtil::checkString($var, true); $this->email = $var;
return $this; }
/** * Timestamp when the subscription was accepted/confirmed (RFC 3339 format, optional). * * Generated from protobuf field <code>string accepted_at = 4 [json_name = "acceptedAt"];</code> * @return string */ public function getAcceptedAt() { return $this->accepted_at; }
/** * Timestamp when the subscription was accepted/confirmed (RFC 3339 format, optional). * * Generated from protobuf field <code>string accepted_at = 4 [json_name = "acceptedAt"];</code> * @param string $var * @return $this */ public function setAcceptedAt(string $var) { GPBUtil::checkString($var, true); $this->accepted_at = $var;
return $this; }
/** * Timestamp when the user unsubscribed (RFC 3339 format, optional). * * Generated from protobuf field <code>string unsubscribed_at = 5 [json_name = "unsubscribedAt"];</code> * @return string */ public function getUnsubscribedAt() { return $this->unsubscribed_at; }
/** * Timestamp when the user unsubscribed (RFC 3339 format, optional). * * Generated from protobuf field <code>string unsubscribed_at = 5 [json_name = "unsubscribedAt"];</code> * @param string $var * @return $this */ public function setUnsubscribedAt(string $var) { GPBUtil::checkString($var, true); $this->unsubscribed_at = $var;
return $this; }
/** * Timestamp when the subscription was created (RFC 3339 format). * * Generated from protobuf field <code>string created_at = 6 [json_name = "createdAt"];</code> * @return string */ public function getCreatedAt() { return $this->created_at; }
/** * Timestamp when the subscription was created (RFC 3339 format). * * Generated from protobuf field <code>string created_at = 6 [json_name = "createdAt"];</code> * @param string $var * @return $this */ public function setCreatedAt(string $var) { GPBUtil::checkString($var, true); $this->created_at = $var;
return $this; }
/** * Timestamp when the subscription was last updated (RFC 3339 format). * * Generated from protobuf field <code>string updated_at = 7 [json_name = "updatedAt"];</code> * @return string */ public function getUpdatedAt() { return $this->updated_at; }
/** * Timestamp when the subscription was last updated (RFC 3339 format). * * Generated from protobuf field <code>string updated_at = 7 [json_name = "updatedAt"];</code> * @param string $var * @return $this */ public function setUpdatedAt(string $var) { GPBUtil::checkString($var, true); $this->updated_at = $var;
return $this; }
/** * How the subscription was created. Vendor-added rows skip verification. * * Generated from protobuf field <code>.openstatus.status_page.v1.SubscriberSource source = 8 [json_name = "source"];</code> * @return int one of the values in {@see \Openstatus\Status_page\V1\SubscriberSource} */ public function getSource() { return $this->source; }
/** * How the subscription was created. Vendor-added rows skip verification. * * Generated from protobuf field <code>.openstatus.status_page.v1.SubscriberSource source = 8 [json_name = "source"];</code> * @param int $var one of the values in {@see \Openstatus\Status_page\V1\SubscriberSource} * @return $this */ public function setSource(int $var) { GPBUtil::checkEnum($var, \Openstatus\Status_page\V1\SubscriberSource::class); $this->source = $var;
return $this; }
/** * Optional human-readable label (e.g. "Supabase #incidents"). * * Generated from protobuf field <code>optional string name = 9 [json_name = "name"];</code> * @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 (e.g. "Supabase #incidents"). * * Generated from protobuf field <code>optional string name = 9 [json_name = "name"];</code> * @param string $var * @return $this */ public function setName(string $var) { GPBUtil::checkString($var, true); $this->name = $var;
return $this; }
/** * Channel type: "email" or "webhook". * * Generated from protobuf field <code>string channel_type = 10 [json_name = "channelType"];</code> * @return string */ public function getChannelType() { return $this->channel_type; }
/** * Channel type: "email" or "webhook". * * Generated from protobuf field <code>string channel_type = 10 [json_name = "channelType"];</code> * @param string $var * @return $this */ public function setChannelType(string $var) { GPBUtil::checkString($var, true); $this->channel_type = $var;
return $this; }
/** * Webhook URL (populated only for channel_type = "webhook"). * * Generated from protobuf field <code>optional string webhook_url = 11 [json_name = "webhookUrl"];</code> * @return string */ public function getWebhookUrl() { return isset($this->webhook_url) ? $this->webhook_url : ''; }
public function hasWebhookUrl() { return isset($this->webhook_url); }
public function clearWebhookUrl() { unset($this->webhook_url); }
/** * Webhook URL (populated only for channel_type = "webhook"). * * Generated from protobuf field <code>optional string webhook_url = 11 [json_name = "webhookUrl"];</code> * @param string $var * @return $this */ public function setWebhookUrl(string $var) { GPBUtil::checkString($var, true); $this->webhook_url = $var;
return $this; }
/** * JSON-encoded channel config (e.g. custom headers). Populated for webhook channels. * * Generated from protobuf field <code>optional string channel_config = 12 [json_name = "channelConfig"];</code> * @return string */ public function getChannelConfig() { return isset($this->channel_config) ? $this->channel_config : ''; }
public function hasChannelConfig() { return isset($this->channel_config); }
public function clearChannelConfig() { unset($this->channel_config); }
/** * JSON-encoded channel config (e.g. custom headers). Populated for webhook channels. * * Generated from protobuf field <code>optional string channel_config = 12 [json_name = "channelConfig"];</code> * @param string $var * @return $this */ public function setChannelConfig(string $var) { GPBUtil::checkString($var, true); $this->channel_config = $var;
return $this; }
/** * IDs of components this subscription is scoped to. Empty = entire page. * * Generated from protobuf field <code>repeated string component_ids = 13 [json_name = "componentIds"];</code> * @return RepeatedField<string> */ public function getComponentIds() { return $this->component_ids; }
/** * IDs of components this subscription is scoped to. Empty = entire page. * * Generated from protobuf field <code>repeated string component_ids = 13 [json_name = "componentIds"];</code> * @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; }
}