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

The override action to apply to the rules in a rule group. Used only for rule * statements that reference a rule group, like * RuleGroupReferenceStatement and * ManagedRuleGroupStatement.

Set the override action to none * to leave the rule actions in effect. Set it to count to only count matches, * regardless of the rule action settings.

In a Rule, you must * specify either this OverrideAction setting or the rule * Action setting, but not both:

  • If the rule * statement references a rule group, use this override action setting and not the * action setting.

  • If the rule statement does not reference a * rule group, use the rule action setting and not this rule override action * setting.

See Also:

AWS * API Reference

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

Override the rule action setting to count.

*/ inline const CountAction& GetCount() const{ return m_count; } /** *

Override the rule action setting to count.

*/ inline bool CountHasBeenSet() const { return m_countHasBeenSet; } /** *

Override the rule action setting to count.

*/ inline void SetCount(const CountAction& value) { m_countHasBeenSet = true; m_count = value; } /** *

Override the rule action setting to count.

*/ inline void SetCount(CountAction&& value) { m_countHasBeenSet = true; m_count = std::move(value); } /** *

Override the rule action setting to count.

*/ inline OverrideAction& WithCount(const CountAction& value) { SetCount(value); return *this;} /** *

Override the rule action setting to count.

*/ inline OverrideAction& WithCount(CountAction&& value) { SetCount(std::move(value)); return *this;} /** *

Don't override the rule action setting.

*/ inline const NoneAction& GetNone() const{ return m_none; } /** *

Don't override the rule action setting.

*/ inline bool NoneHasBeenSet() const { return m_noneHasBeenSet; } /** *

Don't override the rule action setting.

*/ inline void SetNone(const NoneAction& value) { m_noneHasBeenSet = true; m_none = value; } /** *

Don't override the rule action setting.

*/ inline void SetNone(NoneAction&& value) { m_noneHasBeenSet = true; m_none = std::move(value); } /** *

Don't override the rule action setting.

*/ inline OverrideAction& WithNone(const NoneAction& value) { SetNone(value); return *this;} /** *

Don't override the rule action setting.

*/ inline OverrideAction& WithNone(NoneAction&& value) { SetNone(std::move(value)); return *this;} private: CountAction m_count; bool m_countHasBeenSet; NoneAction m_none; bool m_noneHasBeenSet; }; } // namespace Model } // namespace WAFV2 } // namespace Aws