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

namespace Google\Cloud\Ids\V1\Endpoint;

use UnexpectedValueException;

/**
 * Threat severity levels.
 *
 * Protobuf type <code>google.cloud.ids.v1.Endpoint.Severity</code>
 */
class Severity
{
    /**
     * Not set.
     *
     * Generated from protobuf enum <code>SEVERITY_UNSPECIFIED = 0;</code>
     */
    const SEVERITY_UNSPECIFIED = 0;
    /**
     * Informational alerts.
     *
     * Generated from protobuf enum <code>INFORMATIONAL = 1;</code>
     */
    const INFORMATIONAL = 1;
    /**
     * Low severity alerts.
     *
     * Generated from protobuf enum <code>LOW = 2;</code>
     */
    const LOW = 2;
    /**
     * Medium severity alerts.
     *
     * Generated from protobuf enum <code>MEDIUM = 3;</code>
     */
    const MEDIUM = 3;
    /**
     * High severity alerts.
     *
     * Generated from protobuf enum <code>HIGH = 4;</code>
     */
    const HIGH = 4;
    /**
     * Critical severity alerts.
     *
     * Generated from protobuf enum <code>CRITICAL = 5;</code>
     */
    const CRITICAL = 5;

    private static $valueToName = [
        self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED',
        self::INFORMATIONAL => 'INFORMATIONAL',
        self::LOW => 'LOW',
        self::MEDIUM => 'MEDIUM',
        self::HIGH => 'HIGH',
        self::CRITICAL => 'CRITICAL',
    ];

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


