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.
4.8 kB · 139 lines
PHP
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140<?php# Generated by the protocol buffer compiler. DO NOT EDIT!# NO CHECKED-IN PROTOBUF GENCODE# source: openstatus/notification/v1/providers.proto
namespace Openstatus\Notification\V1;
use UnexpectedValueException;
/** * NotificationProvider represents the supported notification channel types. * * Protobuf type <code>openstatus.notification.v1.NotificationProvider</code> */class NotificationProvider{ /** * Unspecified provider. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_UNSPECIFIED = 0;</code> */ const NOTIFICATION_PROVIDER_UNSPECIFIED = 0; /** * Discord webhook. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_DISCORD = 1;</code> */ const NOTIFICATION_PROVIDER_DISCORD = 1; /** * Email notification. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_EMAIL = 2;</code> */ const NOTIFICATION_PROVIDER_EMAIL = 2; /** * Google Chat webhook. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_GOOGLE_CHAT = 3;</code> */ const NOTIFICATION_PROVIDER_GOOGLE_CHAT = 3; /** * Grafana OnCall webhook. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_GRAFANA_ONCALL = 4;</code> */ const NOTIFICATION_PROVIDER_GRAFANA_ONCALL = 4; /** * Ntfy notification service. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_NTFY = 5;</code> */ const NOTIFICATION_PROVIDER_NTFY = 5; /** * PagerDuty integration. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_PAGERDUTY = 6;</code> */ const NOTIFICATION_PROVIDER_PAGERDUTY = 6; /** * Opsgenie integration. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_OPSGENIE = 7;</code> */ const NOTIFICATION_PROVIDER_OPSGENIE = 7; /** * Slack webhook. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_SLACK = 8;</code> */ const NOTIFICATION_PROVIDER_SLACK = 8; /** * SMS notification. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_SMS = 9;</code> */ const NOTIFICATION_PROVIDER_SMS = 9; /** * Telegram bot. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_TELEGRAM = 10;</code> */ const NOTIFICATION_PROVIDER_TELEGRAM = 10; /** * Custom webhook. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_WEBHOOK = 11;</code> */ const NOTIFICATION_PROVIDER_WEBHOOK = 11; /** * WhatsApp notification. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_WHATSAPP = 12;</code> */ const NOTIFICATION_PROVIDER_WHATSAPP = 12; /** * Microsoft Teams notification. * * Generated from protobuf enum <code>NOTIFICATION_PROVIDER_MS_TEAMS = 13;</code> */ const NOTIFICATION_PROVIDER_MS_TEAMS = 13;
private static $valueToName = [ self::NOTIFICATION_PROVIDER_UNSPECIFIED => 'NOTIFICATION_PROVIDER_UNSPECIFIED', self::NOTIFICATION_PROVIDER_DISCORD => 'NOTIFICATION_PROVIDER_DISCORD', self::NOTIFICATION_PROVIDER_EMAIL => 'NOTIFICATION_PROVIDER_EMAIL', self::NOTIFICATION_PROVIDER_GOOGLE_CHAT => 'NOTIFICATION_PROVIDER_GOOGLE_CHAT', self::NOTIFICATION_PROVIDER_GRAFANA_ONCALL => 'NOTIFICATION_PROVIDER_GRAFANA_ONCALL', self::NOTIFICATION_PROVIDER_NTFY => 'NOTIFICATION_PROVIDER_NTFY', self::NOTIFICATION_PROVIDER_PAGERDUTY => 'NOTIFICATION_PROVIDER_PAGERDUTY', self::NOTIFICATION_PROVIDER_OPSGENIE => 'NOTIFICATION_PROVIDER_OPSGENIE', self::NOTIFICATION_PROVIDER_SLACK => 'NOTIFICATION_PROVIDER_SLACK', self::NOTIFICATION_PROVIDER_SMS => 'NOTIFICATION_PROVIDER_SMS', self::NOTIFICATION_PROVIDER_TELEGRAM => 'NOTIFICATION_PROVIDER_TELEGRAM', self::NOTIFICATION_PROVIDER_WEBHOOK => 'NOTIFICATION_PROVIDER_WEBHOOK', self::NOTIFICATION_PROVIDER_WHATSAPP => 'NOTIFICATION_PROVIDER_WHATSAPP', self::NOTIFICATION_PROVIDER_MS_TEAMS => 'NOTIFICATION_PROVIDER_MS_TEAMS', ];
public static function name($value) { if (!isset(self::$valueToName[$value])) { throw new UnexpectedValueException(sprintf( 'Enum %s has no name defined for value %s', __CLASS__, $value)); } return self::$valueToName[$value]; }
public static function value($name) { $const = __CLASS__ . '::' . strtoupper($name); if (!defined($const)) { throw new UnexpectedValueException(sprintf( 'Enum %s has no value defined for name %s', __CLASS__, $name)); } return constant($const); }}