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

namespace Google\Cloud\Container\V1\NetworkTierConfig;

use UnexpectedValueException;

/**
 * Network tier configuration.
 *
 * Protobuf type <code>google.container.v1.NetworkTierConfig.NetworkTier</code>
 */
class NetworkTier
{
    /**
     * By default, use project-level configuration. When unspecified, the
     * behavior defaults to NETWORK_TIER_DEFAULT. For cluster updates, this
     * implies no action (no-op).
     *
     * Generated from protobuf enum <code>NETWORK_TIER_UNSPECIFIED = 0;</code>
     */
    const NETWORK_TIER_UNSPECIFIED = 0;
    /**
     * Default network tier. Use project-level configuration. User can specify
     * this value, meaning they want to keep the same behaviour as before
     * cluster level network tier configuration is introduced. This field
     * ensures backward compatibility for the network tier of cluster resources,
     * such as node pools and load balancers, for their external IP addresses.
     *
     * Generated from protobuf enum <code>NETWORK_TIER_DEFAULT = 1;</code>
     */
    const NETWORK_TIER_DEFAULT = 1;
    /**
     * Premium network tier.
     *
     * Generated from protobuf enum <code>NETWORK_TIER_PREMIUM = 2;</code>
     */
    const NETWORK_TIER_PREMIUM = 2;
    /**
     * Standard network tier.
     *
     * Generated from protobuf enum <code>NETWORK_TIER_STANDARD = 3;</code>
     */
    const NETWORK_TIER_STANDARD = 3;

    private static $valueToName = [
        self::NETWORK_TIER_UNSPECIFIED => 'NETWORK_TIER_UNSPECIFIED',
        self::NETWORK_TIER_DEFAULT => 'NETWORK_TIER_DEFAULT',
        self::NETWORK_TIER_PREMIUM => 'NETWORK_TIER_PREMIUM',
        self::NETWORK_TIER_STANDARD => 'NETWORK_TIER_STANDARD',
    ];

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

