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

namespace Google\Cloud\Container\V1\ConfidentialNodes;

use UnexpectedValueException;

/**
 * The type of technology used by the confidential node.
 *
 * Protobuf type <code>google.container.v1.ConfidentialNodes.ConfidentialInstanceType</code>
 */
class ConfidentialInstanceType
{
    /**
     * No type specified. Do not use this value.
     *
     * Generated from protobuf enum <code>CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED = 0;</code>
     */
    const CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED = 0;
    /**
     * AMD Secure Encrypted Virtualization.
     *
     * Generated from protobuf enum <code>SEV = 1;</code>
     */
    const SEV = 1;
    /**
     * AMD Secure Encrypted Virtualization - Secure Nested Paging.
     *
     * Generated from protobuf enum <code>SEV_SNP = 2;</code>
     */
    const SEV_SNP = 2;
    /**
     * Intel Trust Domain eXtension.
     *
     * Generated from protobuf enum <code>TDX = 3;</code>
     */
    const TDX = 3;

    private static $valueToName = [
        self::CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED => 'CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED',
        self::SEV => 'SEV',
        self::SEV_SNP => 'SEV_SNP',
        self::TDX => 'TDX',
    ];

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

