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

namespace Google\Cloud\MigrationCenter\V1\VmwareDiskConfig;

use UnexpectedValueException;

/**
 * VMDK disk mode.
 *
 * Protobuf type <code>google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode</code>
 */
class VmdkMode
{
    /**
     * VMDK disk mode unspecified or unknown.
     *
     * Generated from protobuf enum <code>VMDK_MODE_UNSPECIFIED = 0;</code>
     */
    const VMDK_MODE_UNSPECIFIED = 0;
    /**
     * Dependent disk mode.
     *
     * Generated from protobuf enum <code>DEPENDENT = 1;</code>
     */
    const DEPENDENT = 1;
    /**
     * Independent - Persistent disk mode.
     *
     * Generated from protobuf enum <code>INDEPENDENT_PERSISTENT = 2;</code>
     */
    const INDEPENDENT_PERSISTENT = 2;
    /**
     * Independent - Nonpersistent disk mode.
     *
     * Generated from protobuf enum <code>INDEPENDENT_NONPERSISTENT = 3;</code>
     */
    const INDEPENDENT_NONPERSISTENT = 3;

    private static $valueToName = [
        self::VMDK_MODE_UNSPECIFIED => 'VMDK_MODE_UNSPECIFIED',
        self::DEPENDENT => 'DEPENDENT',
        self::INDEPENDENT_PERSISTENT => 'INDEPENDENT_PERSISTENT',
        self::INDEPENDENT_NONPERSISTENT => 'INDEPENDENT_NONPERSISTENT',
    ];

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


