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

A rule group that's defined for an Firewall Manager WAF policy.

See * Also:

AWS * API Reference

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

The name of the rule group. You cannot change the name of a rule group after * you create it.

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

If you define more than one rule group in the first or last Firewall Manager * rule groups, WAF evaluates each request against the rule groups in order, * starting from the lowest priority setting. The priorities don't need to be * consecutive, but they must all be different.

*/ inline int GetPriority() const{ return m_priority; } /** *

If you define more than one rule group in the first or last Firewall Manager * rule groups, WAF evaluates each request against the rule groups in order, * starting from the lowest priority setting. The priorities don't need to be * consecutive, but they must all be different.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

If you define more than one rule group in the first or last Firewall Manager * rule groups, WAF evaluates each request against the rule groups in order, * starting from the lowest priority setting. The priorities don't need to be * consecutive, but they must all be different.

*/ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

If you define more than one rule group in the first or last Firewall Manager * rule groups, WAF evaluates each request against the rule groups in order, * starting from the lowest priority setting. The priorities don't need to be * consecutive, but they must all be different.

*/ inline FirewallManagerRuleGroup& WithPriority(int value) { SetPriority(value); return *this;} /** *

The processing guidance for an Firewall Manager rule. This is like a regular * rule Statement, but it can only contain a rule group reference.

*/ inline const FirewallManagerStatement& GetFirewallManagerStatement() const{ return m_firewallManagerStatement; } /** *

The processing guidance for an Firewall Manager rule. This is like a regular * rule Statement, but it can only contain a rule group reference.

*/ inline bool FirewallManagerStatementHasBeenSet() const { return m_firewallManagerStatementHasBeenSet; } /** *

The processing guidance for an Firewall Manager rule. This is like a regular * rule Statement, but it can only contain a rule group reference.

*/ inline void SetFirewallManagerStatement(const FirewallManagerStatement& value) { m_firewallManagerStatementHasBeenSet = true; m_firewallManagerStatement = value; } /** *

The processing guidance for an Firewall Manager rule. This is like a regular * rule Statement, but it can only contain a rule group reference.

*/ inline void SetFirewallManagerStatement(FirewallManagerStatement&& value) { m_firewallManagerStatementHasBeenSet = true; m_firewallManagerStatement = std::move(value); } /** *

The processing guidance for an Firewall Manager rule. This is like a regular * rule Statement, but it can only contain a rule group reference.

*/ inline FirewallManagerRuleGroup& WithFirewallManagerStatement(const FirewallManagerStatement& value) { SetFirewallManagerStatement(value); return *this;} /** *

The processing guidance for an Firewall Manager rule. This is like a regular * rule Statement, but it can only contain a rule group reference.

*/ inline FirewallManagerRuleGroup& WithFirewallManagerStatement(FirewallManagerStatement&& value) { SetFirewallManagerStatement(std::move(value)); return *this;} /** *

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.

*/ inline const OverrideAction& GetOverrideAction() const{ return m_overrideAction; } /** *

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.

*/ inline bool OverrideActionHasBeenSet() const { return m_overrideActionHasBeenSet; } /** *

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.

*/ inline void SetOverrideAction(const OverrideAction& value) { m_overrideActionHasBeenSet = true; m_overrideAction = value; } /** *

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.

*/ inline void SetOverrideAction(OverrideAction&& value) { m_overrideActionHasBeenSet = true; m_overrideAction = std::move(value); } /** *

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.

*/ inline FirewallManagerRuleGroup& WithOverrideAction(const OverrideAction& value) { SetOverrideAction(value); return *this;} /** *

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.

*/ inline FirewallManagerRuleGroup& WithOverrideAction(OverrideAction&& value) { SetOverrideAction(std::move(value)); return *this;} /** *

Defines and enables Amazon CloudWatch metrics and web request sample * collection.

*/ inline const VisibilityConfig& GetVisibilityConfig() const{ return m_visibilityConfig; } /** *

Defines and enables Amazon CloudWatch metrics and web request sample * collection.

*/ inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; } /** *

Defines and enables Amazon CloudWatch metrics and web request sample * collection.

*/ inline void SetVisibilityConfig(const VisibilityConfig& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = value; } /** *

Defines and enables Amazon CloudWatch metrics and web request sample * collection.

*/ inline void SetVisibilityConfig(VisibilityConfig&& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = std::move(value); } /** *

Defines and enables Amazon CloudWatch metrics and web request sample * collection.

*/ inline FirewallManagerRuleGroup& WithVisibilityConfig(const VisibilityConfig& value) { SetVisibilityConfig(value); return *this;} /** *

Defines and enables Amazon CloudWatch metrics and web request sample * collection.

*/ inline FirewallManagerRuleGroup& WithVisibilityConfig(VisibilityConfig&& value) { SetVisibilityConfig(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; FirewallManagerStatement m_firewallManagerStatement; bool m_firewallManagerStatementHasBeenSet = false; OverrideAction m_overrideAction; bool m_overrideActionHasBeenSet = false; VisibilityConfig m_visibilityConfig; bool m_visibilityConfigHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws