AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
AwsWafWebAclRule.h
1
6#pragma once
7#include <aws/securityhub/SecurityHub_EXPORTS.h>
8#include <aws/securityhub/model/WafAction.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/securityhub/model/WafOverrideAction.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/securityhub/model/WafExcludedRule.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace SecurityHub
26{
27namespace Model
28{
29
36 {
37 public:
38 AWS_SECURITYHUB_API AwsWafWebAclRule() = default;
39 AWS_SECURITYHUB_API AwsWafWebAclRule(Aws::Utils::Json::JsonView jsonValue);
40 AWS_SECURITYHUB_API AwsWafWebAclRule& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
49 inline const WafAction& GetAction() const { return m_action; }
50 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
51 template<typename ActionT = WafAction>
52 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
53 template<typename ActionT = WafAction>
54 AwsWafWebAclRule& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
56
58
61 inline const Aws::Vector<WafExcludedRule>& GetExcludedRules() const { return m_excludedRules; }
62 inline bool ExcludedRulesHasBeenSet() const { return m_excludedRulesHasBeenSet; }
63 template<typename ExcludedRulesT = Aws::Vector<WafExcludedRule>>
64 void SetExcludedRules(ExcludedRulesT&& value) { m_excludedRulesHasBeenSet = true; m_excludedRules = std::forward<ExcludedRulesT>(value); }
65 template<typename ExcludedRulesT = Aws::Vector<WafExcludedRule>>
66 AwsWafWebAclRule& WithExcludedRules(ExcludedRulesT&& value) { SetExcludedRules(std::forward<ExcludedRulesT>(value)); return *this;}
67 template<typename ExcludedRulesT = WafExcludedRule>
68 AwsWafWebAclRule& AddExcludedRules(ExcludedRulesT&& value) { m_excludedRulesHasBeenSet = true; m_excludedRules.emplace_back(std::forward<ExcludedRulesT>(value)); return *this; }
70
72
89 inline const WafOverrideAction& GetOverrideAction() const { return m_overrideAction; }
90 inline bool OverrideActionHasBeenSet() const { return m_overrideActionHasBeenSet; }
91 template<typename OverrideActionT = WafOverrideAction>
92 void SetOverrideAction(OverrideActionT&& value) { m_overrideActionHasBeenSet = true; m_overrideAction = std::forward<OverrideActionT>(value); }
93 template<typename OverrideActionT = WafOverrideAction>
94 AwsWafWebAclRule& WithOverrideAction(OverrideActionT&& value) { SetOverrideAction(std::forward<OverrideActionT>(value)); return *this;}
96
98
104 inline int GetPriority() const { return m_priority; }
105 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
106 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
107 inline AwsWafWebAclRule& WithPriority(int value) { SetPriority(value); return *this;}
109
111
114 inline const Aws::String& GetRuleId() const { return m_ruleId; }
115 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
116 template<typename RuleIdT = Aws::String>
117 void SetRuleId(RuleIdT&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::forward<RuleIdT>(value); }
118 template<typename RuleIdT = Aws::String>
119 AwsWafWebAclRule& WithRuleId(RuleIdT&& value) { SetRuleId(std::forward<RuleIdT>(value)); return *this;}
121
123
128 inline const Aws::String& GetType() const { return m_type; }
129 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
130 template<typename TypeT = Aws::String>
131 void SetType(TypeT&& value) { m_typeHasBeenSet = true; m_type = std::forward<TypeT>(value); }
132 template<typename TypeT = Aws::String>
133 AwsWafWebAclRule& WithType(TypeT&& value) { SetType(std::forward<TypeT>(value)); return *this;}
135 private:
136
137 WafAction m_action;
138 bool m_actionHasBeenSet = false;
139
140 Aws::Vector<WafExcludedRule> m_excludedRules;
141 bool m_excludedRulesHasBeenSet = false;
142
143 WafOverrideAction m_overrideAction;
144 bool m_overrideActionHasBeenSet = false;
145
146 int m_priority{0};
147 bool m_priorityHasBeenSet = false;
148
149 Aws::String m_ruleId;
150 bool m_ruleIdHasBeenSet = false;
151
152 Aws::String m_type;
153 bool m_typeHasBeenSet = false;
154 };
155
156} // namespace Model
157} // namespace SecurityHub
158} // namespace Aws
AWS_SECURITYHUB_API AwsWafWebAclRule & operator=(Aws::Utils::Json::JsonView jsonValue)
AwsWafWebAclRule & WithAction(ActionT &&value)
AwsWafWebAclRule & WithType(TypeT &&value)
const Aws::Vector< WafExcludedRule > & GetExcludedRules() const
AWS_SECURITYHUB_API AwsWafWebAclRule(Aws::Utils::Json::JsonView jsonValue)
AwsWafWebAclRule & WithRuleId(RuleIdT &&value)
const WafOverrideAction & GetOverrideAction() const
AWS_SECURITYHUB_API AwsWafWebAclRule()=default
AwsWafWebAclRule & WithExcludedRules(ExcludedRulesT &&value)
AwsWafWebAclRule & AddExcludedRules(ExcludedRulesT &&value)
AwsWafWebAclRule & WithPriority(int value)
void SetOverrideAction(OverrideActionT &&value)
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
void SetExcludedRules(ExcludedRulesT &&value)
AwsWafWebAclRule & WithOverrideAction(OverrideActionT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue