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

namespace Google\Cloud\VMMigration\V1;

use UnexpectedValueException;

/**
 * Controls the level of details of a Migrating VM.
 *
 * Protobuf type <code>google.cloud.vmmigration.v1.MigratingVmView</code>
 */
class MigratingVmView
{
    /**
     * View is unspecified. The API will fallback to the default value.
     *
     * Generated from protobuf enum <code>MIGRATING_VM_VIEW_UNSPECIFIED = 0;</code>
     */
    const MIGRATING_VM_VIEW_UNSPECIFIED = 0;
    /**
     * Get the migrating VM basic details.
     * The basic details do not include the recent clone jobs and recent cutover
     * jobs lists.
     *
     * Generated from protobuf enum <code>MIGRATING_VM_VIEW_BASIC = 1;</code>
     */
    const MIGRATING_VM_VIEW_BASIC = 1;
    /**
     * Include everything.
     *
     * Generated from protobuf enum <code>MIGRATING_VM_VIEW_FULL = 2;</code>
     */
    const MIGRATING_VM_VIEW_FULL = 2;

    private static $valueToName = [
        self::MIGRATING_VM_VIEW_UNSPECIFIED => 'MIGRATING_VM_VIEW_UNSPECIFIED',
        self::MIGRATING_VM_VIEW_BASIC => 'MIGRATING_VM_VIEW_BASIC',
        self::MIGRATING_VM_VIEW_FULL => 'MIGRATING_VM_VIEW_FULL',
    ];

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

