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

namespace Google\Cloud\Compute\V1\ProjectsSetCloudArmorTierRequest;

use UnexpectedValueException;

/**
 * Managed protection tier to be set.
 *
 * Protobuf type <code>google.cloud.compute.v1.ProjectsSetCloudArmorTierRequest.CloudArmorTier</code>
 */
class CloudArmorTier
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_CLOUD_ARMOR_TIER = 0;</code>
     */
    const UNDEFINED_CLOUD_ARMOR_TIER = 0;
    /**
     * Enterprise tier protection billed annually.
     *
     * Generated from protobuf enum <code>CA_ENTERPRISE_ANNUAL = 219921116;</code>
     */
    const CA_ENTERPRISE_ANNUAL = 219921116;
    /**
     * Enterprise tier protection billed monthly.
     *
     * Generated from protobuf enum <code>CA_ENTERPRISE_PAYGO = 453530323;</code>
     */
    const CA_ENTERPRISE_PAYGO = 453530323;
    /**
     * Standard protection.
     *
     * Generated from protobuf enum <code>CA_STANDARD = 13156734;</code>
     */
    const CA_STANDARD = 13156734;

    private static $valueToName = [
        self::UNDEFINED_CLOUD_ARMOR_TIER => 'UNDEFINED_CLOUD_ARMOR_TIER',
        self::CA_ENTERPRISE_ANNUAL => 'CA_ENTERPRISE_ANNUAL',
        self::CA_ENTERPRISE_PAYGO => 'CA_ENTERPRISE_PAYGO',
        self::CA_STANDARD => 'CA_STANDARD',
    ];

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


