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

namespace Google\Cloud\BackupDR\V1\DiskBackupProperties;

use UnexpectedValueException;

/**
 * Architecture of the source disk.
 *
 * Protobuf type <code>google.cloud.backupdr.v1.DiskBackupProperties.Architecture</code>
 */
class Architecture
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>ARCHITECTURE_UNSPECIFIED = 0;</code>
     */
    const ARCHITECTURE_UNSPECIFIED = 0;
    /**
     * Disks with architecture X86_64
     *
     * Generated from protobuf enum <code>X86_64 = 1;</code>
     */
    const X86_64 = 1;
    /**
     * Disks with architecture ARM64
     *
     * Generated from protobuf enum <code>ARM64 = 2;</code>
     */
    const ARM64 = 2;

    private static $valueToName = [
        self::ARCHITECTURE_UNSPECIFIED => 'ARCHITECTURE_UNSPECIFIED',
        self::X86_64 => 'X86_64',
        self::ARM64 => 'ARM64',
    ];

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


