/** * 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 { /** *

Provides information about a WAF rule. This rule specifies the web requests * that you want to allow, block, or count.

See Also:

AWS * API Reference

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

The name of the metrics for this rule.

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

The name of the metrics for this rule.

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

The name of the metrics for this rule.

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

The name of the metrics for this rule.

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

The name of the metrics for this rule.

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

The name of the metrics for this rule.

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

The name of the metrics for this rule.

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

The name of the metrics for this rule.

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

A descriptive name for the rule.

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

A descriptive name for the rule.

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

A descriptive name for the rule.

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

A descriptive name for the rule.

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

A descriptive name for the rule.

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

A descriptive name for the rule.

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

A descriptive name for the rule.

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

A descriptive name for the rule.

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

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline const Aws::Vector& GetPredicateList() const{ return m_predicateList; } /** *

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline bool PredicateListHasBeenSet() const { return m_predicateListHasBeenSet; } /** *

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline void SetPredicateList(const Aws::Vector& value) { m_predicateListHasBeenSet = true; m_predicateList = value; } /** *

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline void SetPredicateList(Aws::Vector&& value) { m_predicateListHasBeenSet = true; m_predicateList = std::move(value); } /** *

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline AwsWafRuleDetails& WithPredicateList(const Aws::Vector& value) { SetPredicateList(value); return *this;} /** *

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline AwsWafRuleDetails& WithPredicateList(Aws::Vector&& value) { SetPredicateList(std::move(value)); return *this;} /** *

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline AwsWafRuleDetails& AddPredicateList(const AwsWafRulePredicateListDetails& value) { m_predicateListHasBeenSet = true; m_predicateList.push_back(value); return *this; } /** *

Specifies the ByteMatchSet, IPSet, * SqlInjectionMatchSet, XssMatchSet, * RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for * each object, indicates whether you want to negate the settings.

*/ inline AwsWafRuleDetails& AddPredicateList(AwsWafRulePredicateListDetails&& value) { m_predicateListHasBeenSet = true; m_predicateList.push_back(std::move(value)); return *this; } /** *

The ID of the WAF rule.

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

The ID of the WAF rule.

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

The ID of the WAF rule.

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

The ID of the WAF rule.

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

The ID of the WAF rule.

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

The ID of the WAF rule.

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

The ID of the WAF rule.

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

The ID of the WAF rule.

*/ inline AwsWafRuleDetails& WithRuleId(const char* value) { SetRuleId(value); return *this;} private: Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_predicateList; bool m_predicateListHasBeenSet = false; Aws::String m_ruleId; bool m_ruleIdHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws