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

namespace Google\Cloud\VMMigration\V1\AwsVmDetails;

use UnexpectedValueException;

/**
 * Possible values for the virtualization types of the VM.
 *
 * Protobuf type <code>google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType</code>
 */
class VmVirtualizationType
{
    /**
     * The virtualization type is unknown.
     *
     * Generated from protobuf enum <code>VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0;</code>
     */
    const VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0;
    /**
     * The virtualziation type is HVM.
     *
     * Generated from protobuf enum <code>HVM = 1;</code>
     */
    const HVM = 1;
    /**
     * The virtualziation type is PARAVIRTUAL.
     *
     * Generated from protobuf enum <code>PARAVIRTUAL = 2;</code>
     */
    const PARAVIRTUAL = 2;

    private static $valueToName = [
        self::VM_VIRTUALIZATION_TYPE_UNSPECIFIED => 'VM_VIRTUALIZATION_TYPE_UNSPECIFIED',
        self::HVM => 'HVM',
        self::PARAVIRTUAL => 'PARAVIRTUAL',
    ];

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


