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

namespace Google\Cloud\Compute\V1\Network;

use UnexpectedValueException;

/**
 * The network firewall policy enforcement order. Can be either
 * AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to
 * AFTER_CLASSIC_FIREWALL if the field is not specified.
 *
 * Protobuf type <code>google.cloud.compute.v1.Network.NetworkFirewallPolicyEnforcementOrder</code>
 */
class NetworkFirewallPolicyEnforcementOrder
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER = 0;</code>
     */
    const UNDEFINED_NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER = 0;
    /**
     * Generated from protobuf enum <code>AFTER_CLASSIC_FIREWALL = 154582608;</code>
     */
    const AFTER_CLASSIC_FIREWALL = 154582608;
    /**
     * Generated from protobuf enum <code>BEFORE_CLASSIC_FIREWALL = 338458349;</code>
     */
    const BEFORE_CLASSIC_FIREWALL = 338458349;

    private static $valueToName = [
        self::UNDEFINED_NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER => 'UNDEFINED_NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER',
        self::AFTER_CLASSIC_FIREWALL => 'AFTER_CLASSIC_FIREWALL',
        self::BEFORE_CLASSIC_FIREWALL => 'BEFORE_CLASSIC_FIREWALL',
    ];

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

