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

namespace Google\Cloud\NetworkManagement\V1\FirewallInfo;

use UnexpectedValueException;

/**
 * The firewall rule's type.
 *
 * Protobuf type <code>google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType</code>
 */
class FirewallRuleType
{
    /**
     * Unspecified type.
     *
     * Generated from protobuf enum <code>FIREWALL_RULE_TYPE_UNSPECIFIED = 0;</code>
     */
    const FIREWALL_RULE_TYPE_UNSPECIFIED = 0;
    /**
     * Hierarchical firewall policy rule. For details, see
     * [Hierarchical firewall policies
     * overview](https://cloud.google.com/vpc/docs/firewall-policies).
     *
     * Generated from protobuf enum <code>HIERARCHICAL_FIREWALL_POLICY_RULE = 1;</code>
     */
    const HIERARCHICAL_FIREWALL_POLICY_RULE = 1;
    /**
     * VPC firewall rule. For details, see
     * [VPC firewall rules
     * overview](https://cloud.google.com/vpc/docs/firewalls).
     *
     * Generated from protobuf enum <code>VPC_FIREWALL_RULE = 2;</code>
     */
    const VPC_FIREWALL_RULE = 2;
    /**
     * Implied VPC firewall rule. For details, see
     * [Implied
     * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
     *
     * Generated from protobuf enum <code>IMPLIED_VPC_FIREWALL_RULE = 3;</code>
     */
    const IMPLIED_VPC_FIREWALL_RULE = 3;
    /**
     * Implicit firewall rules that are managed by serverless VPC access to
     * allow ingress access. They are not visible in the Google Cloud console.
     * For details, see [VPC connector's implicit
     * rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).
     *
     * Generated from protobuf enum <code>SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4;</code>
     */
    const SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4;
    /**
     * Global network firewall policy rule.
     * For details, see [Network firewall
     * policies](https://cloud.google.com/vpc/docs/network-firewall-policies).
     *
     * Generated from protobuf enum <code>NETWORK_FIREWALL_POLICY_RULE = 5;</code>
     */
    const NETWORK_FIREWALL_POLICY_RULE = 5;
    /**
     * Regional network firewall policy rule.
     * For details, see [Regional network firewall
     * policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).
     *
     * Generated from protobuf enum <code>NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6;</code>
     */
    const NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6;

    private static $valueToName = [
        self::FIREWALL_RULE_TYPE_UNSPECIFIED => 'FIREWALL_RULE_TYPE_UNSPECIFIED',
        self::HIERARCHICAL_FIREWALL_POLICY_RULE => 'HIERARCHICAL_FIREWALL_POLICY_RULE',
        self::VPC_FIREWALL_RULE => 'VPC_FIREWALL_RULE',
        self::IMPLIED_VPC_FIREWALL_RULE => 'IMPLIED_VPC_FIREWALL_RULE',
        self::SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE => 'SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE',
        self::NETWORK_FIREWALL_POLICY_RULE => 'NETWORK_FIREWALL_POLICY_RULE',
        self::NETWORK_REGIONAL_FIREWALL_POLICY_RULE => 'NETWORK_REGIONAL_FIREWALL_POLICY_RULE',
    ];

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


