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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig</code>
 */
class SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional float auto_deploy_confidence_threshold = 84309694;</code>
     */
    protected $auto_deploy_confidence_threshold = null;
    /**
     * Generated from protobuf field <code>optional int32 auto_deploy_expiration_sec = 69638793;</code>
     */
    protected $auto_deploy_expiration_sec = null;
    /**
     * Generated from protobuf field <code>optional float auto_deploy_impacted_baseline_threshold = 292441667;</code>
     */
    protected $auto_deploy_impacted_baseline_threshold = null;
    /**
     * Generated from protobuf field <code>optional float auto_deploy_load_threshold = 522227738;</code>
     */
    protected $auto_deploy_load_threshold = null;
    /**
     * Generated from protobuf field <code>optional float detection_absolute_qps = 383123174;</code>
     */
    protected $detection_absolute_qps = null;
    /**
     * Generated from protobuf field <code>optional float detection_load_threshold = 430499148;</code>
     */
    protected $detection_load_threshold = null;
    /**
     * Generated from protobuf field <code>optional float detection_relative_to_baseline_qps = 291343749;</code>
     */
    protected $detection_relative_to_baseline_qps = null;
    /**
     * The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the security policy.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     */
    protected $name = null;
    /**
     * Configuration options for enabling Adaptive Protection to operate on specified granular traffic units.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig traffic_granularity_configs = 85367358;</code>
     */
    private $traffic_granularity_configs;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $auto_deploy_confidence_threshold
     *     @type int $auto_deploy_expiration_sec
     *     @type float $auto_deploy_impacted_baseline_threshold
     *     @type float $auto_deploy_load_threshold
     *     @type float $detection_absolute_qps
     *     @type float $detection_load_threshold
     *     @type float $detection_relative_to_baseline_qps
     *     @type string $name
     *           The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the security policy.
     *     @type array<\Google\Cloud\Compute\V1\SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig>|\Google\Protobuf\Internal\RepeatedField $traffic_granularity_configs
     *           Configuration options for enabling Adaptive Protection to operate on specified granular traffic units.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional float auto_deploy_confidence_threshold = 84309694;</code>
     * @return float
     */
    public function getAutoDeployConfidenceThreshold()
    {
        return isset($this->auto_deploy_confidence_threshold) ? $this->auto_deploy_confidence_threshold : 0.0;
    }

    public function hasAutoDeployConfidenceThreshold()
    {
        return isset($this->auto_deploy_confidence_threshold);
    }

    public function clearAutoDeployConfidenceThreshold()
    {
        unset($this->auto_deploy_confidence_threshold);
    }

    /**
     * Generated from protobuf field <code>optional float auto_deploy_confidence_threshold = 84309694;</code>
     * @param float $var
     * @return $this
     */
    public function setAutoDeployConfidenceThreshold($var)
    {
        GPBUtil::checkFloat($var);
        $this->auto_deploy_confidence_threshold = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 auto_deploy_expiration_sec = 69638793;</code>
     * @return int
     */
    public function getAutoDeployExpirationSec()
    {
        return isset($this->auto_deploy_expiration_sec) ? $this->auto_deploy_expiration_sec : 0;
    }

    public function hasAutoDeployExpirationSec()
    {
        return isset($this->auto_deploy_expiration_sec);
    }

    public function clearAutoDeployExpirationSec()
    {
        unset($this->auto_deploy_expiration_sec);
    }

    /**
     * Generated from protobuf field <code>optional int32 auto_deploy_expiration_sec = 69638793;</code>
     * @param int $var
     * @return $this
     */
    public function setAutoDeployExpirationSec($var)
    {
        GPBUtil::checkInt32($var);
        $this->auto_deploy_expiration_sec = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional float auto_deploy_impacted_baseline_threshold = 292441667;</code>
     * @return float
     */
    public function getAutoDeployImpactedBaselineThreshold()
    {
        return isset($this->auto_deploy_impacted_baseline_threshold) ? $this->auto_deploy_impacted_baseline_threshold : 0.0;
    }

    public function hasAutoDeployImpactedBaselineThreshold()
    {
        return isset($this->auto_deploy_impacted_baseline_threshold);
    }

    public function clearAutoDeployImpactedBaselineThreshold()
    {
        unset($this->auto_deploy_impacted_baseline_threshold);
    }

    /**
     * Generated from protobuf field <code>optional float auto_deploy_impacted_baseline_threshold = 292441667;</code>
     * @param float $var
     * @return $this
     */
    public function setAutoDeployImpactedBaselineThreshold($var)
    {
        GPBUtil::checkFloat($var);
        $this->auto_deploy_impacted_baseline_threshold = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional float auto_deploy_load_threshold = 522227738;</code>
     * @return float
     */
    public function getAutoDeployLoadThreshold()
    {
        return isset($this->auto_deploy_load_threshold) ? $this->auto_deploy_load_threshold : 0.0;
    }

    public function hasAutoDeployLoadThreshold()
    {
        return isset($this->auto_deploy_load_threshold);
    }

    public function clearAutoDeployLoadThreshold()
    {
        unset($this->auto_deploy_load_threshold);
    }

    /**
     * Generated from protobuf field <code>optional float auto_deploy_load_threshold = 522227738;</code>
     * @param float $var
     * @return $this
     */
    public function setAutoDeployLoadThreshold($var)
    {
        GPBUtil::checkFloat($var);
        $this->auto_deploy_load_threshold = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional float detection_absolute_qps = 383123174;</code>
     * @return float
     */
    public function getDetectionAbsoluteQps()
    {
        return isset($this->detection_absolute_qps) ? $this->detection_absolute_qps : 0.0;
    }

    public function hasDetectionAbsoluteQps()
    {
        return isset($this->detection_absolute_qps);
    }

    public function clearDetectionAbsoluteQps()
    {
        unset($this->detection_absolute_qps);
    }

    /**
     * Generated from protobuf field <code>optional float detection_absolute_qps = 383123174;</code>
     * @param float $var
     * @return $this
     */
    public function setDetectionAbsoluteQps($var)
    {
        GPBUtil::checkFloat($var);
        $this->detection_absolute_qps = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional float detection_load_threshold = 430499148;</code>
     * @return float
     */
    public function getDetectionLoadThreshold()
    {
        return isset($this->detection_load_threshold) ? $this->detection_load_threshold : 0.0;
    }

    public function hasDetectionLoadThreshold()
    {
        return isset($this->detection_load_threshold);
    }

    public function clearDetectionLoadThreshold()
    {
        unset($this->detection_load_threshold);
    }

    /**
     * Generated from protobuf field <code>optional float detection_load_threshold = 430499148;</code>
     * @param float $var
     * @return $this
     */
    public function setDetectionLoadThreshold($var)
    {
        GPBUtil::checkFloat($var);
        $this->detection_load_threshold = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional float detection_relative_to_baseline_qps = 291343749;</code>
     * @return float
     */
    public function getDetectionRelativeToBaselineQps()
    {
        return isset($this->detection_relative_to_baseline_qps) ? $this->detection_relative_to_baseline_qps : 0.0;
    }

    public function hasDetectionRelativeToBaselineQps()
    {
        return isset($this->detection_relative_to_baseline_qps);
    }

    public function clearDetectionRelativeToBaselineQps()
    {
        unset($this->detection_relative_to_baseline_qps);
    }

    /**
     * Generated from protobuf field <code>optional float detection_relative_to_baseline_qps = 291343749;</code>
     * @param float $var
     * @return $this
     */
    public function setDetectionRelativeToBaselineQps($var)
    {
        GPBUtil::checkFloat($var);
        $this->detection_relative_to_baseline_qps = $var;

        return $this;
    }

    /**
     * The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the security policy.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     * @return string
     */
    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    /**
     * The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the security policy.
     *
     * Generated from protobuf field <code>optional string name = 3373707;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Configuration options for enabling Adaptive Protection to operate on specified granular traffic units.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig traffic_granularity_configs = 85367358;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTrafficGranularityConfigs()
    {
        return $this->traffic_granularity_configs;
    }

    /**
     * Configuration options for enabling Adaptive Protection to operate on specified granular traffic units.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig traffic_granularity_configs = 85367358;</code>
     * @param array<\Google\Cloud\Compute\V1\SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTrafficGranularityConfigs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig::class);
        $this->traffic_granularity_configs = $arr;

        return $this;
    }

}

