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

A single stateless rule. This is used in * StatelessRulesAndCustomActions.

See Also:

AWS * API Reference

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

Defines the stateless 5-tuple packet inspection criteria and the action to * take on a packet that matches the criteria.

*/ inline const RuleDefinition& GetRuleDefinition() const{ return m_ruleDefinition; } /** *

Defines the stateless 5-tuple packet inspection criteria and the action to * take on a packet that matches the criteria.

*/ inline bool RuleDefinitionHasBeenSet() const { return m_ruleDefinitionHasBeenSet; } /** *

Defines the stateless 5-tuple packet inspection criteria and the action to * take on a packet that matches the criteria.

*/ inline void SetRuleDefinition(const RuleDefinition& value) { m_ruleDefinitionHasBeenSet = true; m_ruleDefinition = value; } /** *

Defines the stateless 5-tuple packet inspection criteria and the action to * take on a packet that matches the criteria.

*/ inline void SetRuleDefinition(RuleDefinition&& value) { m_ruleDefinitionHasBeenSet = true; m_ruleDefinition = std::move(value); } /** *

Defines the stateless 5-tuple packet inspection criteria and the action to * take on a packet that matches the criteria.

*/ inline StatelessRule& WithRuleDefinition(const RuleDefinition& value) { SetRuleDefinition(value); return *this;} /** *

Defines the stateless 5-tuple packet inspection criteria and the action to * take on a packet that matches the criteria.

*/ inline StatelessRule& WithRuleDefinition(RuleDefinition&& value) { SetRuleDefinition(std::move(value)); return *this;} /** *

Indicates the order in which to run this rule relative to all of the rules * that are defined for a stateless rule group. Network Firewall evaluates the * rules in a rule group starting with the lowest priority setting. You must ensure * that the priority settings are unique for the rule group.

Each stateless * rule group uses exactly one StatelessRulesAndCustomActions object, * and each StatelessRulesAndCustomActions contains exactly one * StatelessRules object. To ensure unique priority settings for your * rule groups, set unique priorities for the stateless rules that you define * inside any single StatelessRules object.

You can change the * priority settings of your rules at any time. To make it easier to insert rules * later, number them so there's a wide range in between, for example use 100, 200, * and so on.

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

Indicates the order in which to run this rule relative to all of the rules * that are defined for a stateless rule group. Network Firewall evaluates the * rules in a rule group starting with the lowest priority setting. You must ensure * that the priority settings are unique for the rule group.

Each stateless * rule group uses exactly one StatelessRulesAndCustomActions object, * and each StatelessRulesAndCustomActions contains exactly one * StatelessRules object. To ensure unique priority settings for your * rule groups, set unique priorities for the stateless rules that you define * inside any single StatelessRules object.

You can change the * priority settings of your rules at any time. To make it easier to insert rules * later, number them so there's a wide range in between, for example use 100, 200, * and so on.

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

Indicates the order in which to run this rule relative to all of the rules * that are defined for a stateless rule group. Network Firewall evaluates the * rules in a rule group starting with the lowest priority setting. You must ensure * that the priority settings are unique for the rule group.

Each stateless * rule group uses exactly one StatelessRulesAndCustomActions object, * and each StatelessRulesAndCustomActions contains exactly one * StatelessRules object. To ensure unique priority settings for your * rule groups, set unique priorities for the stateless rules that you define * inside any single StatelessRules object.

You can change the * priority settings of your rules at any time. To make it easier to insert rules * later, number them so there's a wide range in between, for example use 100, 200, * and so on.

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

Indicates the order in which to run this rule relative to all of the rules * that are defined for a stateless rule group. Network Firewall evaluates the * rules in a rule group starting with the lowest priority setting. You must ensure * that the priority settings are unique for the rule group.

Each stateless * rule group uses exactly one StatelessRulesAndCustomActions object, * and each StatelessRulesAndCustomActions contains exactly one * StatelessRules object. To ensure unique priority settings for your * rule groups, set unique priorities for the stateless rules that you define * inside any single StatelessRules object.

You can change the * priority settings of your rules at any time. To make it easier to insert rules * later, number them so there's a wide range in between, for example use 100, 200, * and so on.

*/ inline StatelessRule& WithPriority(int value) { SetPriority(value); return *this;} private: RuleDefinition m_ruleDefinition; bool m_ruleDefinitionHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; }; } // namespace Model } // namespace NetworkFirewall } // namespace Aws