/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

contains details about a rate-based rule for Regional resources. A rate-based * rule provides settings to indicate when to allow, block, or count a request. * Rate-based rules include the number of requests that arrive over a specified * period of time.

See Also:

AWS * API Reference

*/ class AwsWafRegionalRateBasedRuleDetails { public: AWS_SECURITYHUB_API AwsWafRegionalRateBasedRuleDetails(); AWS_SECURITYHUB_API AwsWafRegionalRateBasedRuleDetails(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API AwsWafRegionalRateBasedRuleDetails& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the metrics for the rate-based rule.

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

The name of the metrics for the rate-based rule.

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

The name of the metrics for the rate-based rule.

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

The name of the metrics for the rate-based rule.

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

The name of the metrics for the rate-based rule.

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

The name of the metrics for the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

The name of the metrics for the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

The name of the metrics for the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *

The name of the rate-based rule.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the rate-based rule.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the rate-based rule.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the rate-based rule.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the rate-based rule.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithName(const char* value) { SetName(value); return *this;} /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline const Aws::String& GetRateKey() const{ return m_rateKey; } /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; } /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline void SetRateKey(const Aws::String& value) { m_rateKeyHasBeenSet = true; m_rateKey = value; } /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline void SetRateKey(Aws::String&& value) { m_rateKeyHasBeenSet = true; m_rateKey = std::move(value); } /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline void SetRateKey(const char* value) { m_rateKeyHasBeenSet = true; m_rateKey.assign(value); } /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithRateKey(const Aws::String& value) { SetRateKey(value); return *this;} /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithRateKey(Aws::String&& value) { SetRateKey(std::move(value)); return *this;} /** *

The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithRateKey(const char* value) { SetRateKey(value); return *this;} /** *

The maximum number of requests that have an identical value for the field * specified in RateKey that are allowed within a five-minute period. * If the number of requests exceeds RateLimit and the other * predicates specified in the rule are met, WAF triggers the action for the * rule.

*/ inline long long GetRateLimit() const{ return m_rateLimit; } /** *

The maximum number of requests that have an identical value for the field * specified in RateKey that are allowed within a five-minute period. * If the number of requests exceeds RateLimit and the other * predicates specified in the rule are met, WAF triggers the action for the * rule.

*/ inline bool RateLimitHasBeenSet() const { return m_rateLimitHasBeenSet; } /** *

The maximum number of requests that have an identical value for the field * specified in RateKey that are allowed within a five-minute period. * If the number of requests exceeds RateLimit and the other * predicates specified in the rule are met, WAF triggers the action for the * rule.

*/ inline void SetRateLimit(long long value) { m_rateLimitHasBeenSet = true; m_rateLimit = value; } /** *

The maximum number of requests that have an identical value for the field * specified in RateKey that are allowed within a five-minute period. * If the number of requests exceeds RateLimit and the other * predicates specified in the rule are met, WAF triggers the action for the * rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithRateLimit(long long value) { SetRateLimit(value); return *this;} /** *

The unique identifier for the rate-based rule.

*/ inline const Aws::String& GetRuleId() const{ return m_ruleId; } /** *

The unique identifier for the rate-based rule.

*/ inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; } /** *

The unique identifier for the rate-based rule.

*/ inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; } /** *

The unique identifier for the rate-based rule.

*/ inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); } /** *

The unique identifier for the rate-based rule.

*/ inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); } /** *

The unique identifier for the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;} /** *

The unique identifier for the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;} /** *

The unique identifier for the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithRuleId(const char* value) { SetRuleId(value); return *this;} /** *

The predicates to include in the rate-based rule.

*/ inline const Aws::Vector& GetMatchPredicates() const{ return m_matchPredicates; } /** *

The predicates to include in the rate-based rule.

*/ inline bool MatchPredicatesHasBeenSet() const { return m_matchPredicatesHasBeenSet; } /** *

The predicates to include in the rate-based rule.

*/ inline void SetMatchPredicates(const Aws::Vector& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates = value; } /** *

The predicates to include in the rate-based rule.

*/ inline void SetMatchPredicates(Aws::Vector&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates = std::move(value); } /** *

The predicates to include in the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithMatchPredicates(const Aws::Vector& value) { SetMatchPredicates(value); return *this;} /** *

The predicates to include in the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& WithMatchPredicates(Aws::Vector&& value) { SetMatchPredicates(std::move(value)); return *this;} /** *

The predicates to include in the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& AddMatchPredicates(const AwsWafRegionalRateBasedRuleMatchPredicate& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(value); return *this; } /** *

The predicates to include in the rate-based rule.

*/ inline AwsWafRegionalRateBasedRuleDetails& AddMatchPredicates(AwsWafRegionalRateBasedRuleMatchPredicate&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(std::move(value)); return *this; } private: Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_rateKey; bool m_rateKeyHasBeenSet = false; long long m_rateLimit; bool m_rateLimitHasBeenSet = false; Aws::String m_ruleId; bool m_ruleIdHasBeenSet = false; Aws::Vector m_matchPredicates; bool m_matchPredicatesHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws