<?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>optional bool enable = 311764355;</code>
     */
    private $enable = null;
    /**
     * 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.
     * Check the Metadata enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string metadata = 86866735;</code>
     */
    private $metadata = null;

    /**
     * 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 string $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.
     *           Check the Metadata enum for the list of possible values.
     * }
     */
    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>optional bool enable = 311764355;</code>
     * @return bool
     */
    public function getEnable()
    {
        return isset($this->enable) ? $this->enable : false;
    }

    public function hasEnable()
    {
        return isset($this->enable);
    }

    public function clearEnable()
    {
        unset($this->enable);
    }

    /**
     * This field denotes whether to enable logging for a particular firewall rule.
     *
     * Generated from protobuf field <code>optional bool enable = 311764355;</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.
     * Check the Metadata enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string metadata = 86866735;</code>
     * @return string
     */
    public function getMetadata()
    {
        return isset($this->metadata) ? $this->metadata : '';
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($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.
     * Check the Metadata enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string metadata = 86866735;</code>
     * @param string $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkString($var, True);
        $this->metadata = $var;

        return $this;
    }

}

