AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Rule.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/wafv2/model/Statement.h>
10#include <aws/wafv2/model/RuleAction.h>
11#include <aws/wafv2/model/OverrideAction.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/wafv2/model/VisibilityConfig.h>
14#include <aws/wafv2/model/CaptchaConfig.h>
15#include <aws/wafv2/model/ChallengeConfig.h>
16#include <aws/wafv2/model/Label.h>
17#include <utility>
18
19namespace Aws
20{
21namespace Utils
22{
23namespace Json
24{
25 class JsonValue;
26 class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace WAFV2
30{
31namespace Model
32{
33
42 class Rule
43 {
44 public:
45 AWS_WAFV2_API Rule();
46 AWS_WAFV2_API Rule(Aws::Utils::Json::JsonView jsonValue);
47 AWS_WAFV2_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
48 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
49
50
52
58 inline const Aws::String& GetName() const{ return m_name; }
59 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
60 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
61 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
62 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
63 inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;}
64 inline Rule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
65 inline Rule& WithName(const char* value) { SetName(value); return *this;}
67
69
75 inline int GetPriority() const{ return m_priority; }
76 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
77 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
78 inline Rule& WithPriority(int value) { SetPriority(value); return *this;}
80
82
86 inline const Statement& GetStatement() const{ return m_statement; }
87 inline bool StatementHasBeenSet() const { return m_statementHasBeenSet; }
88 inline void SetStatement(const Statement& value) { m_statementHasBeenSet = true; m_statement = value; }
89 inline void SetStatement(Statement&& value) { m_statementHasBeenSet = true; m_statement = std::move(value); }
90 inline Rule& WithStatement(const Statement& value) { SetStatement(value); return *this;}
91 inline Rule& WithStatement(Statement&& value) { SetStatement(std::move(value)); return *this;}
93
95
108 inline const RuleAction& GetAction() const{ return m_action; }
109 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
110 inline void SetAction(const RuleAction& value) { m_actionHasBeenSet = true; m_action = value; }
111 inline void SetAction(RuleAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); }
112 inline Rule& WithAction(const RuleAction& value) { SetAction(value); return *this;}
113 inline Rule& WithAction(RuleAction&& value) { SetAction(std::move(value)); return *this;}
115
117
129 inline const OverrideAction& GetOverrideAction() const{ return m_overrideAction; }
130 inline bool OverrideActionHasBeenSet() const { return m_overrideActionHasBeenSet; }
131 inline void SetOverrideAction(const OverrideAction& value) { m_overrideActionHasBeenSet = true; m_overrideAction = value; }
132 inline void SetOverrideAction(OverrideAction&& value) { m_overrideActionHasBeenSet = true; m_overrideAction = std::move(value); }
133 inline Rule& WithOverrideAction(const OverrideAction& value) { SetOverrideAction(value); return *this;}
134 inline Rule& WithOverrideAction(OverrideAction&& value) { SetOverrideAction(std::move(value)); return *this;}
136
138
155 inline const Aws::Vector<Label>& GetRuleLabels() const{ return m_ruleLabels; }
156 inline bool RuleLabelsHasBeenSet() const { return m_ruleLabelsHasBeenSet; }
157 inline void SetRuleLabels(const Aws::Vector<Label>& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels = value; }
158 inline void SetRuleLabels(Aws::Vector<Label>&& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels = std::move(value); }
159 inline Rule& WithRuleLabels(const Aws::Vector<Label>& value) { SetRuleLabels(value); return *this;}
160 inline Rule& WithRuleLabels(Aws::Vector<Label>&& value) { SetRuleLabels(std::move(value)); return *this;}
161 inline Rule& AddRuleLabels(const Label& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels.push_back(value); return *this; }
162 inline Rule& AddRuleLabels(Label&& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels.push_back(std::move(value)); return *this; }
164
166
172 inline const VisibilityConfig& GetVisibilityConfig() const{ return m_visibilityConfig; }
173 inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
174 inline void SetVisibilityConfig(const VisibilityConfig& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = value; }
175 inline void SetVisibilityConfig(VisibilityConfig&& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = std::move(value); }
176 inline Rule& WithVisibilityConfig(const VisibilityConfig& value) { SetVisibilityConfig(value); return *this;}
177 inline Rule& WithVisibilityConfig(VisibilityConfig&& value) { SetVisibilityConfig(std::move(value)); return *this;}
179
181
186 inline const CaptchaConfig& GetCaptchaConfig() const{ return m_captchaConfig; }
187 inline bool CaptchaConfigHasBeenSet() const { return m_captchaConfigHasBeenSet; }
188 inline void SetCaptchaConfig(const CaptchaConfig& value) { m_captchaConfigHasBeenSet = true; m_captchaConfig = value; }
189 inline void SetCaptchaConfig(CaptchaConfig&& value) { m_captchaConfigHasBeenSet = true; m_captchaConfig = std::move(value); }
190 inline Rule& WithCaptchaConfig(const CaptchaConfig& value) { SetCaptchaConfig(value); return *this;}
191 inline Rule& WithCaptchaConfig(CaptchaConfig&& value) { SetCaptchaConfig(std::move(value)); return *this;}
193
195
200 inline const ChallengeConfig& GetChallengeConfig() const{ return m_challengeConfig; }
201 inline bool ChallengeConfigHasBeenSet() const { return m_challengeConfigHasBeenSet; }
202 inline void SetChallengeConfig(const ChallengeConfig& value) { m_challengeConfigHasBeenSet = true; m_challengeConfig = value; }
203 inline void SetChallengeConfig(ChallengeConfig&& value) { m_challengeConfigHasBeenSet = true; m_challengeConfig = std::move(value); }
204 inline Rule& WithChallengeConfig(const ChallengeConfig& value) { SetChallengeConfig(value); return *this;}
205 inline Rule& WithChallengeConfig(ChallengeConfig&& value) { SetChallengeConfig(std::move(value)); return *this;}
207 private:
208
209 Aws::String m_name;
210 bool m_nameHasBeenSet = false;
211
212 int m_priority;
213 bool m_priorityHasBeenSet = false;
214
215 Statement m_statement;
216 bool m_statementHasBeenSet = false;
217
218 RuleAction m_action;
219 bool m_actionHasBeenSet = false;
220
221 OverrideAction m_overrideAction;
222 bool m_overrideActionHasBeenSet = false;
223
224 Aws::Vector<Label> m_ruleLabels;
225 bool m_ruleLabelsHasBeenSet = false;
226
227 VisibilityConfig m_visibilityConfig;
228 bool m_visibilityConfigHasBeenSet = false;
229
230 CaptchaConfig m_captchaConfig;
231 bool m_captchaConfigHasBeenSet = false;
232
233 ChallengeConfig m_challengeConfig;
234 bool m_challengeConfigHasBeenSet = false;
235 };
236
237} // namespace Model
238} // namespace WAFV2
239} // namespace Aws
Rule & WithCaptchaConfig(CaptchaConfig &&value)
Definition Rule.h:191
void SetRuleLabels(Aws::Vector< Label > &&value)
Definition Rule.h:158
Rule & WithCaptchaConfig(const CaptchaConfig &value)
Definition Rule.h:190
const Aws::String & GetName() const
Definition Rule.h:58
bool NameHasBeenSet() const
Definition Rule.h:59
const Aws::Vector< Label > & GetRuleLabels() const
Definition Rule.h:155
void SetOverrideAction(const OverrideAction &value)
Definition Rule.h:131
Rule & WithRuleLabels(const Aws::Vector< Label > &value)
Definition Rule.h:159
void SetOverrideAction(OverrideAction &&value)
Definition Rule.h:132
const ChallengeConfig & GetChallengeConfig() const
Definition Rule.h:200
Rule & WithStatement(const Statement &value)
Definition Rule.h:90
Rule & WithChallengeConfig(const ChallengeConfig &value)
Definition Rule.h:204
void SetRuleLabels(const Aws::Vector< Label > &value)
Definition Rule.h:157
bool RuleLabelsHasBeenSet() const
Definition Rule.h:156
AWS_WAFV2_API Rule(Aws::Utils::Json::JsonView jsonValue)
Rule & WithAction(const RuleAction &value)
Definition Rule.h:112
const OverrideAction & GetOverrideAction() const
Definition Rule.h:129
int GetPriority() const
Definition Rule.h:75
void SetCaptchaConfig(CaptchaConfig &&value)
Definition Rule.h:189
const Statement & GetStatement() const
Definition Rule.h:86
Rule & WithOverrideAction(OverrideAction &&value)
Definition Rule.h:134
Rule & WithStatement(Statement &&value)
Definition Rule.h:91
Rule & WithPriority(int value)
Definition Rule.h:78
void SetName(const Aws::String &value)
Definition Rule.h:60
void SetName(const char *value)
Definition Rule.h:62
Rule & AddRuleLabels(const Label &value)
Definition Rule.h:161
void SetChallengeConfig(ChallengeConfig &&value)
Definition Rule.h:203
Rule & WithVisibilityConfig(VisibilityConfig &&value)
Definition Rule.h:177
Rule & AddRuleLabels(Label &&value)
Definition Rule.h:162
bool StatementHasBeenSet() const
Definition Rule.h:87
bool VisibilityConfigHasBeenSet() const
Definition Rule.h:173
Rule & WithVisibilityConfig(const VisibilityConfig &value)
Definition Rule.h:176
bool CaptchaConfigHasBeenSet() const
Definition Rule.h:187
bool PriorityHasBeenSet() const
Definition Rule.h:76
AWS_WAFV2_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Rule & WithAction(RuleAction &&value)
Definition Rule.h:113
void SetPriority(int value)
Definition Rule.h:77
void SetVisibilityConfig(const VisibilityConfig &value)
Definition Rule.h:174
const VisibilityConfig & GetVisibilityConfig() const
Definition Rule.h:172
void SetName(Aws::String &&value)
Definition Rule.h:61
Rule & WithRuleLabels(Aws::Vector< Label > &&value)
Definition Rule.h:160
void SetStatement(Statement &&value)
Definition Rule.h:89
Rule & WithName(Aws::String &&value)
Definition Rule.h:64
const RuleAction & GetAction() const
Definition Rule.h:108
Rule & WithName(const Aws::String &value)
Definition Rule.h:63
const CaptchaConfig & GetCaptchaConfig() const
Definition Rule.h:186
bool ActionHasBeenSet() const
Definition Rule.h:109
void SetCaptchaConfig(const CaptchaConfig &value)
Definition Rule.h:188
Rule & WithChallengeConfig(ChallengeConfig &&value)
Definition Rule.h:205
Rule & WithName(const char *value)
Definition Rule.h:65
bool OverrideActionHasBeenSet() const
Definition Rule.h:130
AWS_WAFV2_API Rule()
void SetAction(RuleAction &&value)
Definition Rule.h:111
void SetAction(const RuleAction &value)
Definition Rule.h:110
bool ChallengeConfigHasBeenSet() const
Definition Rule.h:201
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
void SetVisibilityConfig(VisibilityConfig &&value)
Definition Rule.h:175
void SetStatement(const Statement &value)
Definition Rule.h:88
Rule & WithOverrideAction(const OverrideAction &value)
Definition Rule.h:133
void SetChallengeConfig(const ChallengeConfig &value)
Definition Rule.h:202
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue