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

namespace Google\Cloud\Container\V1\NodeNetworkConfig\NetworkPerformanceConfig;

use UnexpectedValueException;

/**
 * Node network tier
 *
 * Protobuf type <code>google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig.Tier</code>
 */
class Tier
{
    /**
     * Default value
     *
     * Generated from protobuf enum <code>TIER_UNSPECIFIED = 0;</code>
     */
    const TIER_UNSPECIFIED = 0;
    /**
     * Higher bandwidth, actual values based on VM size.
     *
     * Generated from protobuf enum <code>TIER_1 = 1;</code>
     */
    const TIER_1 = 1;

    private static $valueToName = [
        self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED',
        self::TIER_1 => 'TIER_1',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Tier::class, \Google\Cloud\Container\V1\NodeNetworkConfig_NetworkPerformanceConfig_Tier::class);

