<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/essentialcontacts/v1/enums.proto

namespace Google\Cloud\EssentialContacts\V1;

use UnexpectedValueException;

/**
 * The notification categories that an essential contact can be subscribed to.
 * Each notification will be categorized by the sender into one of the following
 * categories. All contacts that are subscribed to that category will receive
 * the notification.
 *
 * Protobuf type <code>google.cloud.essentialcontacts.v1.NotificationCategory</code>
 */
class NotificationCategory
{
    /**
     * Notification category is unrecognized or unspecified.
     *
     * Generated from protobuf enum <code>NOTIFICATION_CATEGORY_UNSPECIFIED = 0;</code>
     */
    const NOTIFICATION_CATEGORY_UNSPECIFIED = 0;
    /**
     * All notifications related to the resource, including notifications
     * pertaining to categories added in the future.
     *
     * Generated from protobuf enum <code>ALL = 2;</code>
     */
    const ALL = 2;
    /**
     * Notifications related to imminent account suspension.
     *
     * Generated from protobuf enum <code>SUSPENSION = 3;</code>
     */
    const SUSPENSION = 3;
    /**
     * Notifications related to security/privacy incidents, notifications, and
     * vulnerabilities.
     *
     * Generated from protobuf enum <code>SECURITY = 5;</code>
     */
    const SECURITY = 5;
    /**
     * Notifications related to technical events and issues such as outages,
     * errors, or bugs.
     *
     * Generated from protobuf enum <code>TECHNICAL = 6;</code>
     */
    const TECHNICAL = 6;
    /**
     * Notifications related to billing and payments notifications, price updates,
     * errors, or credits.
     *
     * Generated from protobuf enum <code>BILLING = 7;</code>
     */
    const BILLING = 7;
    /**
     * Notifications related to enforcement actions, regulatory compliance, or
     * government notices.
     *
     * Generated from protobuf enum <code>LEGAL = 8;</code>
     */
    const LEGAL = 8;
    /**
     * Notifications related to new versions, product terms updates, or
     * deprecations.
     *
     * Generated from protobuf enum <code>PRODUCT_UPDATES = 9;</code>
     */
    const PRODUCT_UPDATES = 9;
    /**
     * Child category of TECHNICAL. If assigned, technical incident notifications
     * will go to these contacts instead of TECHNICAL.
     *
     * Generated from protobuf enum <code>TECHNICAL_INCIDENTS = 10;</code>
     */
    const TECHNICAL_INCIDENTS = 10;

    private static $valueToName = [
        self::NOTIFICATION_CATEGORY_UNSPECIFIED => 'NOTIFICATION_CATEGORY_UNSPECIFIED',
        self::ALL => 'ALL',
        self::SUSPENSION => 'SUSPENSION',
        self::SECURITY => 'SECURITY',
        self::TECHNICAL => 'TECHNICAL',
        self::BILLING => 'BILLING',
        self::LEGAL => 'LEGAL',
        self::PRODUCT_UPDATES => 'PRODUCT_UPDATES',
        self::TECHNICAL_INCIDENTS => 'TECHNICAL_INCIDENTS',
    ];

    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);
    }
}

