<?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;

/**
 * Configuration options for L7 DDoS detection.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig</code>
 */
class SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * If set to true, enables CAAP for L7 DDoS detection.
     *
     * Generated from protobuf field <code>optional bool enable = 311764355;</code>
     */
    private $enable = null;
    /**
     * Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
     * Check the RuleVisibility enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string rule_visibility = 453258293;</code>
     */
    private $rule_visibility = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enable
     *           If set to true, enables CAAP for L7 DDoS detection.
     *     @type string $rule_visibility
     *           Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
     *           Check the RuleVisibility enum for the list of possible values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * If set to true, enables CAAP for L7 DDoS detection.
     *
     * 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);
    }

    /**
     * If set to true, enables CAAP for L7 DDoS detection.
     *
     * 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;
    }

    /**
     * Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
     * Check the RuleVisibility enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string rule_visibility = 453258293;</code>
     * @return string
     */
    public function getRuleVisibility()
    {
        return isset($this->rule_visibility) ? $this->rule_visibility : '';
    }

    public function hasRuleVisibility()
    {
        return isset($this->rule_visibility);
    }

    public function clearRuleVisibility()
    {
        unset($this->rule_visibility);
    }

    /**
     * Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
     * Check the RuleVisibility enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string rule_visibility = 453258293;</code>
     * @param string $var
     * @return $this
     */
    public function setRuleVisibility($var)
    {
        GPBUtil::checkString($var, True);
        $this->rule_visibility = $var;

        return $this;
    }

}

