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

namespace Google\Cloud\NetApp\V1;

use UnexpectedValueException;

/**
 * The service level of a storage pool and its volumes.
 *
 * Protobuf type <code>google.cloud.netapp.v1.ServiceLevel</code>
 */
class ServiceLevel
{
    /**
     * Unspecified service level.
     *
     * Generated from protobuf enum <code>SERVICE_LEVEL_UNSPECIFIED = 0;</code>
     */
    const SERVICE_LEVEL_UNSPECIFIED = 0;
    /**
     * Premium service level.
     *
     * Generated from protobuf enum <code>PREMIUM = 1;</code>
     */
    const PREMIUM = 1;
    /**
     * Extreme service level.
     *
     * Generated from protobuf enum <code>EXTREME = 2;</code>
     */
    const EXTREME = 2;
    /**
     * Standard service level.
     *
     * Generated from protobuf enum <code>STANDARD = 3;</code>
     */
    const STANDARD = 3;
    /**
     * Flex service level.
     *
     * Generated from protobuf enum <code>FLEX = 4;</code>
     */
    const FLEX = 4;

    private static $valueToName = [
        self::SERVICE_LEVEL_UNSPECIFIED => 'SERVICE_LEVEL_UNSPECIFIED',
        self::PREMIUM => 'PREMIUM',
        self::EXTREME => 'EXTREME',
        self::STANDARD => 'STANDARD',
        self::FLEX => 'FLEX',
    ];

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

