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

namespace Google\Cloud\Compute\V1\GuestOsFeature;

use UnexpectedValueException;

/**
 * The ID of a supported feature. To add multiple values, use commas to
 * separate values. Set to one or more of the following values:
 *    - VIRTIO_SCSI_MULTIQUEUE
 *    - WINDOWS
 *    - MULTI_IP_SUBNET
 *    - UEFI_COMPATIBLE
 *    - GVNIC
 *    - SEV_CAPABLE
 *    - SUSPEND_RESUME_COMPATIBLE
 *    - SEV_LIVE_MIGRATABLE_V2
 *    - SEV_SNP_CAPABLE
 *    - TDX_CAPABLE
 *    - IDPF
 *    - SNP_SVSM_CAPABLE
 * For more information, see
 * Enabling guest operating system features.
 *
 * Protobuf type <code>google.cloud.compute.v1.GuestOsFeature.Type</code>
 */
class Type
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_TYPE = 0;</code>
     */
    const UNDEFINED_TYPE = 0;
    /**
     * Generated from protobuf enum <code>BARE_METAL_LINUX_COMPATIBLE = 354232740;</code>
     */
    const BARE_METAL_LINUX_COMPATIBLE = 354232740;
    /**
     * Generated from protobuf enum <code>FEATURE_TYPE_UNSPECIFIED = 531767259;</code>
     */
    const FEATURE_TYPE_UNSPECIFIED = 531767259;
    /**
     * Generated from protobuf enum <code>GVNIC = 68209305;</code>
     */
    const GVNIC = 68209305;
    /**
     * Generated from protobuf enum <code>IDPF = 2242641;</code>
     */
    const IDPF = 2242641;
    /**
     * Generated from protobuf enum <code>MULTI_IP_SUBNET = 151776719;</code>
     */
    const MULTI_IP_SUBNET = 151776719;
    /**
     * Generated from protobuf enum <code>SECURE_BOOT = 376811194;</code>
     */
    const SECURE_BOOT = 376811194;
    /**
     * Generated from protobuf enum <code>SEV_CAPABLE = 87083793;</code>
     */
    const SEV_CAPABLE = 87083793;
    /**
     * Generated from protobuf enum <code>SEV_LIVE_MIGRATABLE = 392039820;</code>
     */
    const SEV_LIVE_MIGRATABLE = 392039820;
    /**
     * Generated from protobuf enum <code>SEV_LIVE_MIGRATABLE_V2 = 168551983;</code>
     */
    const SEV_LIVE_MIGRATABLE_V2 = 168551983;
    /**
     * Generated from protobuf enum <code>SEV_SNP_CAPABLE = 426919;</code>
     */
    const SEV_SNP_CAPABLE = 426919;
    /**
     * Generated from protobuf enum <code>SNP_SVSM_CAPABLE = 52921460;</code>
     */
    const SNP_SVSM_CAPABLE = 52921460;
    /**
     * Generated from protobuf enum <code>TDX_CAPABLE = 240446133;</code>
     */
    const TDX_CAPABLE = 240446133;
    /**
     * Generated from protobuf enum <code>UEFI_COMPATIBLE = 195865408;</code>
     */
    const UEFI_COMPATIBLE = 195865408;
    /**
     * Generated from protobuf enum <code>VIRTIO_SCSI_MULTIQUEUE = 201597069;</code>
     */
    const VIRTIO_SCSI_MULTIQUEUE = 201597069;
    /**
     * Generated from protobuf enum <code>WINDOWS = 456863331;</code>
     */
    const WINDOWS = 456863331;

    private static $valueToName = [
        self::UNDEFINED_TYPE => 'UNDEFINED_TYPE',
        self::BARE_METAL_LINUX_COMPATIBLE => 'BARE_METAL_LINUX_COMPATIBLE',
        self::FEATURE_TYPE_UNSPECIFIED => 'FEATURE_TYPE_UNSPECIFIED',
        self::GVNIC => 'GVNIC',
        self::IDPF => 'IDPF',
        self::MULTI_IP_SUBNET => 'MULTI_IP_SUBNET',
        self::SECURE_BOOT => 'SECURE_BOOT',
        self::SEV_CAPABLE => 'SEV_CAPABLE',
        self::SEV_LIVE_MIGRATABLE => 'SEV_LIVE_MIGRATABLE',
        self::SEV_LIVE_MIGRATABLE_V2 => 'SEV_LIVE_MIGRATABLE_V2',
        self::SEV_SNP_CAPABLE => 'SEV_SNP_CAPABLE',
        self::SNP_SVSM_CAPABLE => 'SNP_SVSM_CAPABLE',
        self::TDX_CAPABLE => 'TDX_CAPABLE',
        self::UEFI_COMPATIBLE => 'UEFI_COMPATIBLE',
        self::VIRTIO_SCSI_MULTIQUEUE => 'VIRTIO_SCSI_MULTIQUEUE',
        self::WINDOWS => 'WINDOWS',
    ];

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


