openstatus.status_page.v1.SubscriberSource
*/
class SubscriberSource
{
/**
* Generated from protobuf enum SUBSCRIBER_SOURCE_UNSPECIFIED = 0;
*/
const SUBSCRIBER_SOURCE_UNSPECIFIED = 0;
/**
* Created by the user themselves via the status-page subscribe form.
*
* Generated from protobuf enum SUBSCRIBER_SOURCE_SELF_SIGNUP = 1;
*/
const SUBSCRIBER_SOURCE_SELF_SIGNUP = 1;
/**
* Created by the page vendor (dashboard user), skipping verification.
*
* Generated from protobuf enum SUBSCRIBER_SOURCE_VENDOR = 2;
*/
const SUBSCRIBER_SOURCE_VENDOR = 2;
/**
* Imported from a third-party provider (Atlassian Statuspage, Better Stack, Instatus).
*
* Generated from protobuf enum SUBSCRIBER_SOURCE_IMPORT = 3;
*/
const SUBSCRIBER_SOURCE_IMPORT = 3;
private static $valueToName = [
self::SUBSCRIBER_SOURCE_UNSPECIFIED => 'SUBSCRIBER_SOURCE_UNSPECIFIED',
self::SUBSCRIBER_SOURCE_SELF_SIGNUP => 'SUBSCRIBER_SOURCE_SELF_SIGNUP',
self::SUBSCRIBER_SOURCE_VENDOR => 'SUBSCRIBER_SOURCE_VENDOR',
self::SUBSCRIBER_SOURCE_IMPORT => 'SUBSCRIBER_SOURCE_IMPORT',
];
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);
}
}