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

namespace Google\Cloud\Compute\V1\Condition;

use UnexpectedValueException;

/**
 * This is deprecated and has no effect. Do not use.
 * Additional supported values which may be not listed in the enum directly due to technical reasons:
 * NO_ATTR
 *
 * Protobuf type <code>google.cloud.compute.v1.Condition.Iam</code>
 */
class Iam
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_IAM = 0;</code>
     */
    const UNDEFINED_IAM = 0;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf enum <code>APPROVER = 357258949;</code>
     */
    const APPROVER = 357258949;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf enum <code>ATTRIBUTION = 232465503;</code>
     */
    const ATTRIBUTION = 232465503;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf enum <code>AUTHORITY = 504108835;</code>
     */
    const AUTHORITY = 504108835;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf enum <code>CREDENTIALS_TYPE = 348222141;</code>
     */
    const CREDENTIALS_TYPE = 348222141;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf enum <code>CREDS_ASSERTION = 332343272;</code>
     */
    const CREDS_ASSERTION = 332343272;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf enum <code>JUSTIFICATION_TYPE = 206147719;</code>
     */
    const JUSTIFICATION_TYPE = 206147719;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf enum <code>SECURITY_REALM = 526269616;</code>
     */
    const SECURITY_REALM = 526269616;

    private static $valueToName = [
        self::UNDEFINED_IAM => 'UNDEFINED_IAM',
        self::APPROVER => 'APPROVER',
        self::ATTRIBUTION => 'ATTRIBUTION',
        self::AUTHORITY => 'AUTHORITY',
        self::CREDENTIALS_TYPE => 'CREDENTIALS_TYPE',
        self::CREDS_ASSERTION => 'CREDS_ASSERTION',
        self::JUSTIFICATION_TYPE => 'JUSTIFICATION_TYPE',
        self::SECURITY_REALM => 'SECURITY_REALM',
    ];

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


