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

namespace Google\Cloud\VMMigration\V1;

use UnexpectedValueException;

/**
 * Possible values for vm boot option.
 *
 * Protobuf type <code>google.cloud.vmmigration.v1.ComputeEngineBootOption</code>
 */
class ComputeEngineBootOption
{
    /**
     * The boot option is unknown.
     *
     * Generated from protobuf enum <code>COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0;</code>
     */
    const COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0;
    /**
     * The boot option is EFI.
     *
     * Generated from protobuf enum <code>COMPUTE_ENGINE_BOOT_OPTION_EFI = 1;</code>
     */
    const COMPUTE_ENGINE_BOOT_OPTION_EFI = 1;
    /**
     * The boot option is BIOS.
     *
     * Generated from protobuf enum <code>COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2;</code>
     */
    const COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2;

    private static $valueToName = [
        self::COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED => 'COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED',
        self::COMPUTE_ENGINE_BOOT_OPTION_EFI => 'COMPUTE_ENGINE_BOOT_OPTION_EFI',
        self::COMPUTE_ENGINE_BOOT_OPTION_BIOS => 'COMPUTE_ENGINE_BOOT_OPTION_BIOS',
    ];

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

