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

namespace Google\Cloud\Compute\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The available logging options for a firewall rule.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.FirewallLogConfig</code>
 */
class FirewallLogConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * This field denotes whether to enable logging for a particular firewall rule.
     *
     * Generated from protobuf field <code>bool enable = 43328899;</code>
     */
    private $enable = false;
    /**
     * This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.FirewallLogConfig.Metadata metadata = 86866735;</code>
     */
    private $metadata = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enable
     *           This field denotes whether to enable logging for a particular firewall rule.
     *     @type int $metadata
     *           This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * This field denotes whether to enable logging for a particular firewall rule.
     *
     * Generated from protobuf field <code>bool enable = 43328899;</code>
     * @return bool
     */
    public function getEnable()
    {
        return $this->enable;
    }

    /**
     * This field denotes whether to enable logging for a particular firewall rule.
     *
     * Generated from protobuf field <code>bool enable = 43328899;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnable($var)
    {
        GPBUtil::checkBool($var);
        $this->enable = $var;

        return $this;
    }

    /**
     * This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.FirewallLogConfig.Metadata metadata = 86866735;</code>
     * @return int
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    /**
     * This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.FirewallLogConfig.Metadata metadata = 86866735;</code>
     * @param int $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Compute\V1\FirewallLogConfig\Metadata::class);
        $this->metadata = $var;

        return $this;
    }

}

