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

namespace Google\Cloud\NetApp\V1;

use UnexpectedValueException;

/**
 * Flex Storage Pool performance.
 *
 * Protobuf type <code>google.cloud.netapp.v1.FlexPerformance</code>
 */
class FlexPerformance
{
    /**
     * Unspecified flex performance.
     *
     * Generated from protobuf enum <code>FLEX_PERFORMANCE_UNSPECIFIED = 0;</code>
     */
    const FLEX_PERFORMANCE_UNSPECIFIED = 0;
    /**
     * Flex Storage Pool with default performance.
     *
     * Generated from protobuf enum <code>FLEX_PERFORMANCE_DEFAULT = 1;</code>
     */
    const FLEX_PERFORMANCE_DEFAULT = 1;
    /**
     * Flex Storage Pool with custom performance.
     *
     * Generated from protobuf enum <code>FLEX_PERFORMANCE_CUSTOM = 2;</code>
     */
    const FLEX_PERFORMANCE_CUSTOM = 2;

    private static $valueToName = [
        self::FLEX_PERFORMANCE_UNSPECIFIED => 'FLEX_PERFORMANCE_UNSPECIFIED',
        self::FLEX_PERFORMANCE_DEFAULT => 'FLEX_PERFORMANCE_DEFAULT',
        self::FLEX_PERFORMANCE_CUSTOM => 'FLEX_PERFORMANCE_CUSTOM',
    ];

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

