/** * 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 action to use in the place of the action that results from the rule group * evaluation. Set the override action to none to leave the result of the rule * group alone. Set it to count to override the result to count only.

You * can only use this for rule statements that reference a rule group, like * RuleGroupReferenceStatement and * ManagedRuleGroupStatement.

This option is usually * set to none. It does not affect how the rules in the rule group are evaluated. * If you want the rules in the rule group to only count matches, do not use this * and instead use the rule action override option, with Count action, * in your rule group reference statement settings.

See * Also:

AWS * API Reference

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

Override the rule group evaluation result to count only.

This * option is usually set to none. It does not affect how the rules in the rule * group are evaluated. If you want the rules in the rule group to only count * matches, do not use this and instead use the rule action override option, with * Count action, in your rule group reference statement settings.

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

Override the rule group evaluation result to count only.

This * option is usually set to none. It does not affect how the rules in the rule * group are evaluated. If you want the rules in the rule group to only count * matches, do not use this and instead use the rule action override option, with * Count action, in your rule group reference statement settings.

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

Override the rule group evaluation result to count only.

This * option is usually set to none. It does not affect how the rules in the rule * group are evaluated. If you want the rules in the rule group to only count * matches, do not use this and instead use the rule action override option, with * Count action, in your rule group reference statement settings.

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

Override the rule group evaluation result to count only.

This * option is usually set to none. It does not affect how the rules in the rule * group are evaluated. If you want the rules in the rule group to only count * matches, do not use this and instead use the rule action override option, with * Count action, in your rule group reference statement settings.

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

Override the rule group evaluation result to count only.

This * option is usually set to none. It does not affect how the rules in the rule * group are evaluated. If you want the rules in the rule group to only count * matches, do not use this and instead use the rule action override option, with * Count action, in your rule group reference statement settings.

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

Override the rule group evaluation result to count only.

This * option is usually set to none. It does not affect how the rules in the rule * group are evaluated. If you want the rules in the rule group to only count * matches, do not use this and instead use the rule action override option, with * Count action, in your rule group reference statement settings.

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

Don't override the rule group evaluation result. This is the most common * setting.

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

Don't override the rule group evaluation result. This is the most common * setting.

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

Don't override the rule group evaluation result. This is the most common * setting.

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

Don't override the rule group evaluation result. This is the most common * setting.

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

Don't override the rule group evaluation result. This is the most common * setting.

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

Don't override the rule group evaluation result. This is the most common * setting.

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