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

namespace Google\Cloud\RecaptchaEnterprise\V1\WafSettings;

use UnexpectedValueException;

/**
 * Web Application Firewalls supported by reCAPTCHA Enterprise.
 *
 * Protobuf type <code>google.cloud.recaptchaenterprise.v1.WafSettings.WafService</code>
 */
class WafService
{
    /**
     * Undefined WAF
     *
     * Generated from protobuf enum <code>WAF_SERVICE_UNSPECIFIED = 0;</code>
     */
    const WAF_SERVICE_UNSPECIFIED = 0;
    /**
     * Cloud Armor
     *
     * Generated from protobuf enum <code>CA = 1;</code>
     */
    const CA = 1;

    private static $valueToName = [
        self::WAF_SERVICE_UNSPECIFIED => 'WAF_SERVICE_UNSPECIFIED',
        self::CA => 'CA',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(WafService::class, \Google\Cloud\RecaptchaEnterprise\V1\WafSettings_WafService::class);

