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

namespace Google\Cloud\NetApp\V1;

use UnexpectedValueException;

/**
 * Type of directory service
 *
 * Protobuf type <code>google.cloud.netapp.v1.DirectoryServiceType</code>
 */
class DirectoryServiceType
{
    /**
     * Directory service type is not specified.
     *
     * Generated from protobuf enum <code>DIRECTORY_SERVICE_TYPE_UNSPECIFIED = 0;</code>
     */
    const DIRECTORY_SERVICE_TYPE_UNSPECIFIED = 0;
    /**
     * Active directory policy attached to the storage pool.
     *
     * Generated from protobuf enum <code>ACTIVE_DIRECTORY = 1;</code>
     */
    const ACTIVE_DIRECTORY = 1;

    private static $valueToName = [
        self::DIRECTORY_SERVICE_TYPE_UNSPECIFIED => 'DIRECTORY_SERVICE_TYPE_UNSPECIFIED',
        self::ACTIVE_DIRECTORY => 'ACTIVE_DIRECTORY',
    ];

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

