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

namespace Google\Cloud\HypercomputeCluster\V1beta\NewFilestoreConfig;

use UnexpectedValueException;

/**
 * File access protocol for Filestore instances.
 *
 * Protobuf type <code>google.cloud.hypercomputecluster.v1beta.NewFilestoreConfig.Protocol</code>
 */
class Protocol
{
    /**
     * Not set.
     *
     * Generated from protobuf enum <code>PROTOCOL_UNSPECIFIED = 0;</code>
     */
    const PROTOCOL_UNSPECIFIED = 0;
    /**
     * NFS 3.0.
     *
     * Generated from protobuf enum <code>NFSV3 = 1;</code>
     */
    const NFSV3 = 1;
    /**
     * NFS 4.1.
     *
     * Generated from protobuf enum <code>NFSV41 = 2;</code>
     */
    const NFSV41 = 2;

    private static $valueToName = [
        self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED',
        self::NFSV3 => 'NFSV3',
        self::NFSV41 => 'NFSV41',
    ];

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


