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

namespace Google\Cloud\Compute\V1\NetworkProfileNetworkFeatures;

use UnexpectedValueException;

/**
 * Specifies whether multi-nic in the same subnetwork is allowed.
 *
 * Protobuf type <code>google.cloud.compute.v1.NetworkProfileNetworkFeatures.AllowMultiNicInSameSubnetwork</code>
 */
class AllowMultiNicInSameSubnetwork
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_ALLOW_MULTI_NIC_IN_SAME_SUBNETWORK = 0;</code>
     */
    const UNDEFINED_ALLOW_MULTI_NIC_IN_SAME_SUBNETWORK = 0;
    /**
     * Generated from protobuf enum <code>MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED = 288044595;</code>
     */
    const MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED = 288044595;
    /**
     * Generated from protobuf enum <code>MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED = 104207991;</code>
     */
    const MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED = 104207991;

    private static $valueToName = [
        self::UNDEFINED_ALLOW_MULTI_NIC_IN_SAME_SUBNETWORK => 'UNDEFINED_ALLOW_MULTI_NIC_IN_SAME_SUBNETWORK',
        self::MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED => 'MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED',
        self::MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED => 'MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED',
    ];

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

