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

namespace Google\Cloud\NetApp\V1;

use UnexpectedValueException;

/**
 * QoS (Quality of Service) Types of the storage pool
 *
 * Protobuf type <code>google.cloud.netapp.v1.QosType</code>
 */
class QosType
{
    /**
     * Unspecified QoS Type
     *
     * Generated from protobuf enum <code>QOS_TYPE_UNSPECIFIED = 0;</code>
     */
    const QOS_TYPE_UNSPECIFIED = 0;
    /**
     * QoS Type is Auto
     *
     * Generated from protobuf enum <code>AUTO = 1;</code>
     */
    const AUTO = 1;
    /**
     * QoS Type is Manual
     *
     * Generated from protobuf enum <code>MANUAL = 2;</code>
     */
    const MANUAL = 2;

    private static $valueToName = [
        self::QOS_TYPE_UNSPECIFIED => 'QOS_TYPE_UNSPECIFIED',
        self::AUTO => 'AUTO',
        self::MANUAL => 'MANUAL',
    ];

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

