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

namespace Google\Cloud\ConfidentialComputing\V1;

use UnexpectedValueException;

/**
 * TokenProfile enumerates the supported token claims profiles.
 *
 * Protobuf type <code>google.cloud.confidentialcomputing.v1.TokenProfile</code>
 */
class TokenProfile
{
    /**
     * Unspecified token profile.
     *
     * Generated from protobuf enum <code>TOKEN_PROFILE_UNSPECIFIED = 0;</code>
     */
    const TOKEN_PROFILE_UNSPECIFIED = 0;
    /**
     * EAT claims.
     *
     * Generated from protobuf enum <code>TOKEN_PROFILE_DEFAULT_EAT = 1;</code>
     */
    const TOKEN_PROFILE_DEFAULT_EAT = 1;
    /**
     * AWS Principal Tags claims.
     *
     * Generated from protobuf enum <code>TOKEN_PROFILE_AWS = 2;</code>
     */
    const TOKEN_PROFILE_AWS = 2;

    private static $valueToName = [
        self::TOKEN_PROFILE_UNSPECIFIED => 'TOKEN_PROFILE_UNSPECIFIED',
        self::TOKEN_PROFILE_DEFAULT_EAT => 'TOKEN_PROFILE_DEFAULT_EAT',
        self::TOKEN_PROFILE_AWS => 'TOKEN_PROFILE_AWS',
    ];

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

