<?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 architectures of the VM.
 *
 * Protobuf type <code>google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture</code>
 */
class VmArchitecture
{
    /**
     * The architecture is unknown.
     *
     * Generated from protobuf enum <code>VM_ARCHITECTURE_UNSPECIFIED = 0;</code>
     */
    const VM_ARCHITECTURE_UNSPECIFIED = 0;
    /**
     * The architecture is I386.
     *
     * Generated from protobuf enum <code>I386 = 1;</code>
     */
    const I386 = 1;
    /**
     * The architecture is X86_64.
     *
     * Generated from protobuf enum <code>X86_64 = 2;</code>
     */
    const X86_64 = 2;
    /**
     * The architecture is ARM64.
     *
     * Generated from protobuf enum <code>ARM64 = 3;</code>
     */
    const ARM64 = 3;
    /**
     * The architecture is X86_64_MAC.
     *
     * Generated from protobuf enum <code>X86_64_MAC = 4;</code>
     */
    const X86_64_MAC = 4;

    private static $valueToName = [
        self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED',
        self::I386 => 'I386',
        self::X86_64 => 'X86_64',
        self::ARM64 => 'ARM64',
        self::X86_64_MAC => 'X86_64_MAC',
    ];

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


