<?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;
    /**
     * Firewall policy rule containing attributes not yet supported in
     * Connectivity tests. Firewall analysis is skipped if such a rule can
     * potentially be matched. Please see the [list of unsupported
     * configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs).
     *
     * Generated from protobuf enum <code>UNSUPPORTED_FIREWALL_POLICY_RULE = 100;</code>
     */
    const UNSUPPORTED_FIREWALL_POLICY_RULE = 100;
    /**
     * Tracking state for response traffic created when request traffic goes
     * through allow firewall rule.
     * For details, see [firewall rules
     * specifications](https://cloud.google.com/firewall/docs/firewalls#specifications)
     *
     * Generated from protobuf enum <code>TRACKING_STATE = 101;</code>
     */
    const TRACKING_STATE = 101;
    /**
     * Firewall analysis was skipped due to executing Connectivity Test in the
     * BypassFirewallChecks mode
     *
     * Generated from protobuf enum <code>ANALYSIS_SKIPPED = 102;</code>
     */
    const ANALYSIS_SKIPPED = 102;

    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',
        self::UNSUPPORTED_FIREWALL_POLICY_RULE => 'UNSUPPORTED_FIREWALL_POLICY_RULE',
        self::TRACKING_STATE => 'TRACKING_STATE',
        self::ANALYSIS_SKIPPED => 'ANALYSIS_SKIPPED',
    ];

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


