AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ActivatedRule.h
1
6#pragma once
7#include <aws/waf-regional/WAFRegional_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/waf-regional/model/WafAction.h>
10#include <aws/waf-regional/model/WafOverrideAction.h>
11#include <aws/waf-regional/model/WafRuleType.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/waf-regional/model/ExcludedRule.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace WAFRegional
27{
28namespace Model
29{
30
52 {
53 public:
54 AWS_WAFREGIONAL_API ActivatedRule();
55 AWS_WAFREGIONAL_API ActivatedRule(Aws::Utils::Json::JsonView jsonValue);
56 AWS_WAFREGIONAL_API ActivatedRule& operator=(Aws::Utils::Json::JsonView jsonValue);
57 AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const;
58
59
61
68 inline int GetPriority() const{ return m_priority; }
69 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
70 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
71 inline ActivatedRule& WithPriority(int value) { SetPriority(value); return *this;}
73
75
84 inline const Aws::String& GetRuleId() const{ return m_ruleId; }
85 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
86 inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; }
87 inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); }
88 inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); }
89 inline ActivatedRule& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;}
90 inline ActivatedRule& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;}
91 inline ActivatedRule& WithRuleId(const char* value) { SetRuleId(value); return *this;}
93
95
110 inline const WafAction& GetAction() const{ return m_action; }
111 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
112 inline void SetAction(const WafAction& value) { m_actionHasBeenSet = true; m_action = value; }
113 inline void SetAction(WafAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); }
114 inline ActivatedRule& WithAction(const WafAction& value) { SetAction(value); return *this;}
115 inline ActivatedRule& WithAction(WafAction&& value) { SetAction(std::move(value)); return *this;}
117
119
137 inline const WafOverrideAction& GetOverrideAction() const{ return m_overrideAction; }
138 inline bool OverrideActionHasBeenSet() const { return m_overrideActionHasBeenSet; }
139 inline void SetOverrideAction(const WafOverrideAction& value) { m_overrideActionHasBeenSet = true; m_overrideAction = value; }
140 inline void SetOverrideAction(WafOverrideAction&& value) { m_overrideActionHasBeenSet = true; m_overrideAction = std::move(value); }
141 inline ActivatedRule& WithOverrideAction(const WafOverrideAction& value) { SetOverrideAction(value); return *this;}
142 inline ActivatedRule& WithOverrideAction(WafOverrideAction&& value) { SetOverrideAction(std::move(value)); return *this;}
144
146
155 inline const WafRuleType& GetType() const{ return m_type; }
156 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
157 inline void SetType(const WafRuleType& value) { m_typeHasBeenSet = true; m_type = value; }
158 inline void SetType(WafRuleType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
159 inline ActivatedRule& WithType(const WafRuleType& value) { SetType(value); return *this;}
160 inline ActivatedRule& WithType(WafRuleType&& value) { SetType(std::move(value)); return *this;}
162
164
194 inline const Aws::Vector<ExcludedRule>& GetExcludedRules() const{ return m_excludedRules; }
195 inline bool ExcludedRulesHasBeenSet() const { return m_excludedRulesHasBeenSet; }
196 inline void SetExcludedRules(const Aws::Vector<ExcludedRule>& value) { m_excludedRulesHasBeenSet = true; m_excludedRules = value; }
197 inline void SetExcludedRules(Aws::Vector<ExcludedRule>&& value) { m_excludedRulesHasBeenSet = true; m_excludedRules = std::move(value); }
198 inline ActivatedRule& WithExcludedRules(const Aws::Vector<ExcludedRule>& value) { SetExcludedRules(value); return *this;}
199 inline ActivatedRule& WithExcludedRules(Aws::Vector<ExcludedRule>&& value) { SetExcludedRules(std::move(value)); return *this;}
200 inline ActivatedRule& AddExcludedRules(const ExcludedRule& value) { m_excludedRulesHasBeenSet = true; m_excludedRules.push_back(value); return *this; }
201 inline ActivatedRule& AddExcludedRules(ExcludedRule&& value) { m_excludedRulesHasBeenSet = true; m_excludedRules.push_back(std::move(value)); return *this; }
203 private:
204
205 int m_priority;
206 bool m_priorityHasBeenSet = false;
207
208 Aws::String m_ruleId;
209 bool m_ruleIdHasBeenSet = false;
210
211 WafAction m_action;
212 bool m_actionHasBeenSet = false;
213
214 WafOverrideAction m_overrideAction;
215 bool m_overrideActionHasBeenSet = false;
216
217 WafRuleType m_type;
218 bool m_typeHasBeenSet = false;
219
220 Aws::Vector<ExcludedRule> m_excludedRules;
221 bool m_excludedRulesHasBeenSet = false;
222 };
223
224} // namespace Model
225} // namespace WAFRegional
226} // namespace Aws
ActivatedRule & WithExcludedRules(const Aws::Vector< ExcludedRule > &value)
void SetAction(const WafAction &value)
const WafOverrideAction & GetOverrideAction() const
ActivatedRule & WithOverrideAction(const WafOverrideAction &value)
ActivatedRule & WithAction(const WafAction &value)
AWS_WAFREGIONAL_API ActivatedRule(Aws::Utils::Json::JsonView jsonValue)
const WafRuleType & GetType() const
void SetExcludedRules(Aws::Vector< ExcludedRule > &&value)
const Aws::Vector< ExcludedRule > & GetExcludedRules() const
ActivatedRule & WithRuleId(const Aws::String &value)
ActivatedRule & WithType(const WafRuleType &value)
ActivatedRule & WithRuleId(const char *value)
void SetType(const WafRuleType &value)
ActivatedRule & WithRuleId(Aws::String &&value)
ActivatedRule & AddExcludedRules(const ExcludedRule &value)
void SetRuleId(const Aws::String &value)
ActivatedRule & WithOverrideAction(WafOverrideAction &&value)
void SetRuleId(Aws::String &&value)
const WafAction & GetAction() const
ActivatedRule & WithExcludedRules(Aws::Vector< ExcludedRule > &&value)
ActivatedRule & WithType(WafRuleType &&value)
void SetOverrideAction(const WafOverrideAction &value)
void SetType(WafRuleType &&value)
ActivatedRule & WithAction(WafAction &&value)
AWS_WAFREGIONAL_API ActivatedRule & operator=(Aws::Utils::Json::JsonView jsonValue)
ActivatedRule & AddExcludedRules(ExcludedRule &&value)
void SetExcludedRules(const Aws::Vector< ExcludedRule > &value)
ActivatedRule & WithPriority(int value)
void SetOverrideAction(WafOverrideAction &&value)
const Aws::String & GetRuleId() const
AWS_WAFREGIONAL_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue