openstatus.notification.v1.NotificationData
*/
class NotificationData extends \Google\Protobuf\Internal\Message
{
protected $data;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Openstatus\Notification\V1\DiscordData $discord
* Discord configuration.
* @type \Openstatus\Notification\V1\EmailData $email
* Email configuration.
* @type \Openstatus\Notification\V1\GoogleChatData $google_chat
* Google Chat configuration.
* @type \Openstatus\Notification\V1\GrafanaOncallData $grafana_oncall
* Grafana OnCall configuration.
* @type \Openstatus\Notification\V1\NtfyData $ntfy
* Ntfy configuration.
* @type \Openstatus\Notification\V1\PagerDutyData $pagerduty
* PagerDuty configuration.
* @type \Openstatus\Notification\V1\OpsgenieData $opsgenie
* Opsgenie configuration.
* @type \Openstatus\Notification\V1\SlackData $slack
* Slack configuration.
* @type \Openstatus\Notification\V1\SmsData $sms
* SMS configuration.
* @type \Openstatus\Notification\V1\TelegramData $telegram
* Telegram configuration.
* @type \Openstatus\Notification\V1\WebhookData $webhook
* Webhook configuration.
* @type \Openstatus\Notification\V1\WhatsappData $whatsapp
* WhatsApp configuration.
* @type \Openstatus\Notification\V1\MsTeamsData $ms_teams
* Microsoft Teams configuration.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Openstatus\Notification\V1\Providers::initOnce();
parent::__construct($data);
}
/**
* Discord configuration.
*
* Generated from protobuf field .openstatus.notification.v1.DiscordData discord = 1 [json_name = "discord"];
* @return \Openstatus\Notification\V1\DiscordData|null
*/
public function getDiscord()
{
return $this->readOneof(1);
}
public function hasDiscord()
{
return $this->hasOneof(1);
}
/**
* Discord configuration.
*
* Generated from protobuf field .openstatus.notification.v1.DiscordData discord = 1 [json_name = "discord"];
* @param \Openstatus\Notification\V1\DiscordData $var
* @return $this
*/
public function setDiscord(\Openstatus\Notification\V1\DiscordData|null $var)
{
$this->writeOneof(1, $var);
return $this;
}
/**
* Email configuration.
*
* Generated from protobuf field .openstatus.notification.v1.EmailData email = 2 [json_name = "email"];
* @return \Openstatus\Notification\V1\EmailData|null
*/
public function getEmail()
{
return $this->readOneof(2);
}
public function hasEmail()
{
return $this->hasOneof(2);
}
/**
* Email configuration.
*
* Generated from protobuf field .openstatus.notification.v1.EmailData email = 2 [json_name = "email"];
* @param \Openstatus\Notification\V1\EmailData $var
* @return $this
*/
public function setEmail(\Openstatus\Notification\V1\EmailData|null $var)
{
$this->writeOneof(2, $var);
return $this;
}
/**
* Google Chat configuration.
*
* Generated from protobuf field .openstatus.notification.v1.GoogleChatData google_chat = 3 [json_name = "googleChat"];
* @return \Openstatus\Notification\V1\GoogleChatData|null
*/
public function getGoogleChat()
{
return $this->readOneof(3);
}
public function hasGoogleChat()
{
return $this->hasOneof(3);
}
/**
* Google Chat configuration.
*
* Generated from protobuf field .openstatus.notification.v1.GoogleChatData google_chat = 3 [json_name = "googleChat"];
* @param \Openstatus\Notification\V1\GoogleChatData $var
* @return $this
*/
public function setGoogleChat(\Openstatus\Notification\V1\GoogleChatData|null $var)
{
$this->writeOneof(3, $var);
return $this;
}
/**
* Grafana OnCall configuration.
*
* Generated from protobuf field .openstatus.notification.v1.GrafanaOncallData grafana_oncall = 4 [json_name = "grafanaOncall"];
* @return \Openstatus\Notification\V1\GrafanaOncallData|null
*/
public function getGrafanaOncall()
{
return $this->readOneof(4);
}
public function hasGrafanaOncall()
{
return $this->hasOneof(4);
}
/**
* Grafana OnCall configuration.
*
* Generated from protobuf field .openstatus.notification.v1.GrafanaOncallData grafana_oncall = 4 [json_name = "grafanaOncall"];
* @param \Openstatus\Notification\V1\GrafanaOncallData $var
* @return $this
*/
public function setGrafanaOncall(\Openstatus\Notification\V1\GrafanaOncallData|null $var)
{
$this->writeOneof(4, $var);
return $this;
}
/**
* Ntfy configuration.
*
* Generated from protobuf field .openstatus.notification.v1.NtfyData ntfy = 5 [json_name = "ntfy"];
* @return \Openstatus\Notification\V1\NtfyData|null
*/
public function getNtfy()
{
return $this->readOneof(5);
}
public function hasNtfy()
{
return $this->hasOneof(5);
}
/**
* Ntfy configuration.
*
* Generated from protobuf field .openstatus.notification.v1.NtfyData ntfy = 5 [json_name = "ntfy"];
* @param \Openstatus\Notification\V1\NtfyData $var
* @return $this
*/
public function setNtfy(\Openstatus\Notification\V1\NtfyData|null $var)
{
$this->writeOneof(5, $var);
return $this;
}
/**
* PagerDuty configuration.
*
* Generated from protobuf field .openstatus.notification.v1.PagerDutyData pagerduty = 6 [json_name = "pagerduty"];
* @return \Openstatus\Notification\V1\PagerDutyData|null
*/
public function getPagerduty()
{
return $this->readOneof(6);
}
public function hasPagerduty()
{
return $this->hasOneof(6);
}
/**
* PagerDuty configuration.
*
* Generated from protobuf field .openstatus.notification.v1.PagerDutyData pagerduty = 6 [json_name = "pagerduty"];
* @param \Openstatus\Notification\V1\PagerDutyData $var
* @return $this
*/
public function setPagerduty(\Openstatus\Notification\V1\PagerDutyData|null $var)
{
$this->writeOneof(6, $var);
return $this;
}
/**
* Opsgenie configuration.
*
* Generated from protobuf field .openstatus.notification.v1.OpsgenieData opsgenie = 7 [json_name = "opsgenie"];
* @return \Openstatus\Notification\V1\OpsgenieData|null
*/
public function getOpsgenie()
{
return $this->readOneof(7);
}
public function hasOpsgenie()
{
return $this->hasOneof(7);
}
/**
* Opsgenie configuration.
*
* Generated from protobuf field .openstatus.notification.v1.OpsgenieData opsgenie = 7 [json_name = "opsgenie"];
* @param \Openstatus\Notification\V1\OpsgenieData $var
* @return $this
*/
public function setOpsgenie(\Openstatus\Notification\V1\OpsgenieData|null $var)
{
$this->writeOneof(7, $var);
return $this;
}
/**
* Slack configuration.
*
* Generated from protobuf field .openstatus.notification.v1.SlackData slack = 8 [json_name = "slack"];
* @return \Openstatus\Notification\V1\SlackData|null
*/
public function getSlack()
{
return $this->readOneof(8);
}
public function hasSlack()
{
return $this->hasOneof(8);
}
/**
* Slack configuration.
*
* Generated from protobuf field .openstatus.notification.v1.SlackData slack = 8 [json_name = "slack"];
* @param \Openstatus\Notification\V1\SlackData $var
* @return $this
*/
public function setSlack(\Openstatus\Notification\V1\SlackData|null $var)
{
$this->writeOneof(8, $var);
return $this;
}
/**
* SMS configuration.
*
* Generated from protobuf field .openstatus.notification.v1.SmsData sms = 9 [json_name = "sms"];
* @return \Openstatus\Notification\V1\SmsData|null
*/
public function getSms()
{
return $this->readOneof(9);
}
public function hasSms()
{
return $this->hasOneof(9);
}
/**
* SMS configuration.
*
* Generated from protobuf field .openstatus.notification.v1.SmsData sms = 9 [json_name = "sms"];
* @param \Openstatus\Notification\V1\SmsData $var
* @return $this
*/
public function setSms(\Openstatus\Notification\V1\SmsData|null $var)
{
$this->writeOneof(9, $var);
return $this;
}
/**
* Telegram configuration.
*
* Generated from protobuf field .openstatus.notification.v1.TelegramData telegram = 10 [json_name = "telegram"];
* @return \Openstatus\Notification\V1\TelegramData|null
*/
public function getTelegram()
{
return $this->readOneof(10);
}
public function hasTelegram()
{
return $this->hasOneof(10);
}
/**
* Telegram configuration.
*
* Generated from protobuf field .openstatus.notification.v1.TelegramData telegram = 10 [json_name = "telegram"];
* @param \Openstatus\Notification\V1\TelegramData $var
* @return $this
*/
public function setTelegram(\Openstatus\Notification\V1\TelegramData|null $var)
{
$this->writeOneof(10, $var);
return $this;
}
/**
* Webhook configuration.
*
* Generated from protobuf field .openstatus.notification.v1.WebhookData webhook = 11 [json_name = "webhook"];
* @return \Openstatus\Notification\V1\WebhookData|null
*/
public function getWebhook()
{
return $this->readOneof(11);
}
public function hasWebhook()
{
return $this->hasOneof(11);
}
/**
* Webhook configuration.
*
* Generated from protobuf field .openstatus.notification.v1.WebhookData webhook = 11 [json_name = "webhook"];
* @param \Openstatus\Notification\V1\WebhookData $var
* @return $this
*/
public function setWebhook(\Openstatus\Notification\V1\WebhookData|null $var)
{
$this->writeOneof(11, $var);
return $this;
}
/**
* WhatsApp configuration.
*
* Generated from protobuf field .openstatus.notification.v1.WhatsappData whatsapp = 12 [json_name = "whatsapp"];
* @return \Openstatus\Notification\V1\WhatsappData|null
*/
public function getWhatsapp()
{
return $this->readOneof(12);
}
public function hasWhatsapp()
{
return $this->hasOneof(12);
}
/**
* WhatsApp configuration.
*
* Generated from protobuf field .openstatus.notification.v1.WhatsappData whatsapp = 12 [json_name = "whatsapp"];
* @param \Openstatus\Notification\V1\WhatsappData $var
* @return $this
*/
public function setWhatsapp(\Openstatus\Notification\V1\WhatsappData|null $var)
{
$this->writeOneof(12, $var);
return $this;
}
/**
* Microsoft Teams configuration.
*
* Generated from protobuf field .openstatus.notification.v1.MsTeamsData ms_teams = 13 [json_name = "msTeams"];
* @return \Openstatus\Notification\V1\MsTeamsData|null
*/
public function getMsTeams()
{
return $this->readOneof(13);
}
public function hasMsTeams()
{
return $this->hasOneof(13);
}
/**
* Microsoft Teams configuration.
*
* Generated from protobuf field .openstatus.notification.v1.MsTeamsData ms_teams = 13 [json_name = "msTeams"];
* @param \Openstatus\Notification\V1\MsTeamsData $var
* @return $this
*/
public function setMsTeams(\Openstatus\Notification\V1\MsTeamsData|null $var)
{
$this->writeOneof(13, $var);
return $this;
}
/**
* @return string
*/
public function getData()
{
return $this->whichOneof("data");
}
}