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

namespace Google\Cloud\VMMigration\V1\AwsSourceVmDetails;

use UnexpectedValueException;

/**
 * Possible values for AWS VM firmware.
 *
 * Protobuf type <code>google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware</code>
 */
class Firmware
{
    /**
     * The firmware is unknown.
     *
     * Generated from protobuf enum <code>FIRMWARE_UNSPECIFIED = 0;</code>
     */
    const FIRMWARE_UNSPECIFIED = 0;
    /**
     * The firmware is EFI.
     *
     * Generated from protobuf enum <code>EFI = 1;</code>
     */
    const EFI = 1;
    /**
     * The firmware is BIOS.
     *
     * Generated from protobuf enum <code>BIOS = 2;</code>
     */
    const BIOS = 2;

    private static $valueToName = [
        self::FIRMWARE_UNSPECIFIED => 'FIRMWARE_UNSPECIFIED',
        self::EFI => 'EFI',
        self::BIOS => '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);
    }
}


