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

namespace Google\Cloud\Container\V1;

use UnexpectedValueException;

/**
 * Possible values for IPv6 access type
 *
 * Protobuf type <code>google.container.v1.IPv6AccessType</code>
 */
class IPv6AccessType
{
    /**
     * Default value, will be defaulted as type external.
     *
     * Generated from protobuf enum <code>IPV6_ACCESS_TYPE_UNSPECIFIED = 0;</code>
     */
    const IPV6_ACCESS_TYPE_UNSPECIFIED = 0;
    /**
     * Access type internal (all v6 addresses are internal IPs)
     *
     * Generated from protobuf enum <code>INTERNAL = 1;</code>
     */
    const INTERNAL = 1;
    /**
     * Access type external (all v6 addresses are external IPs)
     *
     * Generated from protobuf enum <code>EXTERNAL = 2;</code>
     */
    const EXTERNAL = 2;

    private static $valueToName = [
        self::IPV6_ACCESS_TYPE_UNSPECIFIED => 'IPV6_ACCESS_TYPE_UNSPECIFIED',
        self::INTERNAL => 'INTERNAL',
        self::EXTERNAL => 'EXTERNAL',
    ];

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

