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

namespace Google\Cloud\Dataproc\V1\GceClusterConfig;

use UnexpectedValueException;

/**
 * `PrivateIpv6GoogleAccess` controls whether and how Dataproc cluster nodes
 * can communicate with Google Services through gRPC over IPv6.
 * These values are directly mapped to corresponding values in the
 * [Compute Engine Instance
 * fields](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
 *
 * Protobuf type <code>google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess</code>
 */
class PrivateIpv6GoogleAccess
{
    /**
     * If unspecified, Compute Engine default behavior will apply, which
     * is the same as
     * [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
     *
     * Generated from protobuf enum <code>PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0;</code>
     */
    const PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0;
    /**
     * Private access to and from Google Services configuration
     * inherited from the subnetwork configuration. This is the
     * default Compute Engine behavior.
     *
     * Generated from protobuf enum <code>INHERIT_FROM_SUBNETWORK = 1;</code>
     */
    const INHERIT_FROM_SUBNETWORK = 1;
    /**
     * Enables outbound private IPv6 access to Google Services from the Dataproc
     * cluster.
     *
     * Generated from protobuf enum <code>OUTBOUND = 2;</code>
     */
    const OUTBOUND = 2;
    /**
     * Enables bidirectional private IPv6 access between Google Services and the
     * Dataproc cluster.
     *
     * Generated from protobuf enum <code>BIDIRECTIONAL = 3;</code>
     */
    const BIDIRECTIONAL = 3;

    private static $valueToName = [
        self::PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED => 'PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED',
        self::INHERIT_FROM_SUBNETWORK => 'INHERIT_FROM_SUBNETWORK',
        self::OUTBOUND => 'OUTBOUND',
        self::BIDIRECTIONAL => 'BIDIRECTIONAL',
    ];

    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(PrivateIpv6GoogleAccess::class, \Google\Cloud\Dataproc\V1\GceClusterConfig_PrivateIpv6GoogleAccess::class);

