AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Statement.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/wafv2/model/ByteMatchStatement.h>
9#include <aws/wafv2/model/SqliMatchStatement.h>
10#include <aws/wafv2/model/XssMatchStatement.h>
11#include <aws/wafv2/model/SizeConstraintStatement.h>
12#include <aws/wafv2/model/GeoMatchStatement.h>
13#include <aws/wafv2/model/RuleGroupReferenceStatement.h>
14#include <aws/wafv2/model/IPSetReferenceStatement.h>
15#include <aws/wafv2/model/RegexPatternSetReferenceStatement.h>
16#include <aws/wafv2/model/LabelMatchStatement.h>
17#include <aws/wafv2/model/RegexMatchStatement.h>
18#include <aws/wafv2/model/AsnMatchStatement.h>
19#include <aws/core/utils/memory/stl/AWSAllocator.h>
20#include <utility>
21
22namespace Aws
23{
24namespace Utils
25{
26namespace Json
27{
28 class JsonValue;
29 class JsonView;
30} // namespace Json
31} // namespace Utils
32namespace WAFV2
33{
34namespace Model
35{
36 class RateBasedStatement;
37 class AndStatement;
38 class OrStatement;
39 class NotStatement;
40 class ManagedRuleGroupStatement;
41
50 {
51 public:
52 AWS_WAFV2_API Statement() = default;
55 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
56
57
59
67 inline const ByteMatchStatement& GetByteMatchStatement() const { return m_byteMatchStatement; }
68 inline bool ByteMatchStatementHasBeenSet() const { return m_byteMatchStatementHasBeenSet; }
69 template<typename ByteMatchStatementT = ByteMatchStatement>
70 void SetByteMatchStatement(ByteMatchStatementT&& value) { m_byteMatchStatementHasBeenSet = true; m_byteMatchStatement = std::forward<ByteMatchStatementT>(value); }
71 template<typename ByteMatchStatementT = ByteMatchStatement>
72 Statement& WithByteMatchStatement(ByteMatchStatementT&& value) { SetByteMatchStatement(std::forward<ByteMatchStatementT>(value)); return *this;}
74
76
81 inline const SqliMatchStatement& GetSqliMatchStatement() const { return m_sqliMatchStatement; }
82 inline bool SqliMatchStatementHasBeenSet() const { return m_sqliMatchStatementHasBeenSet; }
83 template<typename SqliMatchStatementT = SqliMatchStatement>
84 void SetSqliMatchStatement(SqliMatchStatementT&& value) { m_sqliMatchStatementHasBeenSet = true; m_sqliMatchStatement = std::forward<SqliMatchStatementT>(value); }
85 template<typename SqliMatchStatementT = SqliMatchStatement>
86 Statement& WithSqliMatchStatement(SqliMatchStatementT&& value) { SetSqliMatchStatement(std::forward<SqliMatchStatementT>(value)); return *this;}
88
90
95 inline const XssMatchStatement& GetXssMatchStatement() const { return m_xssMatchStatement; }
96 inline bool XssMatchStatementHasBeenSet() const { return m_xssMatchStatementHasBeenSet; }
97 template<typename XssMatchStatementT = XssMatchStatement>
98 void SetXssMatchStatement(XssMatchStatementT&& value) { m_xssMatchStatementHasBeenSet = true; m_xssMatchStatement = std::forward<XssMatchStatementT>(value); }
99 template<typename XssMatchStatementT = XssMatchStatement>
100 Statement& WithXssMatchStatement(XssMatchStatementT&& value) { SetXssMatchStatement(std::forward<XssMatchStatementT>(value)); return *this;}
102
104
120 inline const SizeConstraintStatement& GetSizeConstraintStatement() const { return m_sizeConstraintStatement; }
121 inline bool SizeConstraintStatementHasBeenSet() const { return m_sizeConstraintStatementHasBeenSet; }
122 template<typename SizeConstraintStatementT = SizeConstraintStatement>
123 void SetSizeConstraintStatement(SizeConstraintStatementT&& value) { m_sizeConstraintStatementHasBeenSet = true; m_sizeConstraintStatement = std::forward<SizeConstraintStatementT>(value); }
124 template<typename SizeConstraintStatementT = SizeConstraintStatement>
125 Statement& WithSizeConstraintStatement(SizeConstraintStatementT&& value) { SetSizeConstraintStatement(std::forward<SizeConstraintStatementT>(value)); return *this;}
127
129
155 inline const GeoMatchStatement& GetGeoMatchStatement() const { return m_geoMatchStatement; }
156 inline bool GeoMatchStatementHasBeenSet() const { return m_geoMatchStatementHasBeenSet; }
157 template<typename GeoMatchStatementT = GeoMatchStatement>
158 void SetGeoMatchStatement(GeoMatchStatementT&& value) { m_geoMatchStatementHasBeenSet = true; m_geoMatchStatement = std::forward<GeoMatchStatementT>(value); }
159 template<typename GeoMatchStatementT = GeoMatchStatement>
160 Statement& WithGeoMatchStatement(GeoMatchStatementT&& value) { SetGeoMatchStatement(std::forward<GeoMatchStatementT>(value)); return *this;}
162
164
174 inline const RuleGroupReferenceStatement& GetRuleGroupReferenceStatement() const { return m_ruleGroupReferenceStatement; }
175 inline bool RuleGroupReferenceStatementHasBeenSet() const { return m_ruleGroupReferenceStatementHasBeenSet; }
176 template<typename RuleGroupReferenceStatementT = RuleGroupReferenceStatement>
177 void SetRuleGroupReferenceStatement(RuleGroupReferenceStatementT&& value) { m_ruleGroupReferenceStatementHasBeenSet = true; m_ruleGroupReferenceStatement = std::forward<RuleGroupReferenceStatementT>(value); }
178 template<typename RuleGroupReferenceStatementT = RuleGroupReferenceStatement>
179 Statement& WithRuleGroupReferenceStatement(RuleGroupReferenceStatementT&& value) { SetRuleGroupReferenceStatement(std::forward<RuleGroupReferenceStatementT>(value)); return *this;}
181
183
193 inline const IPSetReferenceStatement& GetIPSetReferenceStatement() const { return m_iPSetReferenceStatement; }
194 inline bool IPSetReferenceStatementHasBeenSet() const { return m_iPSetReferenceStatementHasBeenSet; }
195 template<typename IPSetReferenceStatementT = IPSetReferenceStatement>
196 void SetIPSetReferenceStatement(IPSetReferenceStatementT&& value) { m_iPSetReferenceStatementHasBeenSet = true; m_iPSetReferenceStatement = std::forward<IPSetReferenceStatementT>(value); }
197 template<typename IPSetReferenceStatementT = IPSetReferenceStatement>
198 Statement& WithIPSetReferenceStatement(IPSetReferenceStatementT&& value) { SetIPSetReferenceStatement(std::forward<IPSetReferenceStatementT>(value)); return *this;}
200
202
214 inline const RegexPatternSetReferenceStatement& GetRegexPatternSetReferenceStatement() const { return m_regexPatternSetReferenceStatement; }
215 inline bool RegexPatternSetReferenceStatementHasBeenSet() const { return m_regexPatternSetReferenceStatementHasBeenSet; }
216 template<typename RegexPatternSetReferenceStatementT = RegexPatternSetReferenceStatement>
217 void SetRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT&& value) { m_regexPatternSetReferenceStatementHasBeenSet = true; m_regexPatternSetReferenceStatement = std::forward<RegexPatternSetReferenceStatementT>(value); }
218 template<typename RegexPatternSetReferenceStatementT = RegexPatternSetReferenceStatement>
219 Statement& WithRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT&& value) { SetRegexPatternSetReferenceStatement(std::forward<RegexPatternSetReferenceStatementT>(value)); return *this;}
221
223
286 return *m_rateBasedStatement;
287 }
288 inline bool RateBasedStatementHasBeenSet() const { return m_rateBasedStatementHasBeenSet; }
289 template<typename RateBasedStatementT = RateBasedStatement>
291 m_rateBasedStatementHasBeenSet = true;
292 m_rateBasedStatement = Aws::MakeShared<RateBasedStatement>("Statement", std::forward<RateBasedStatementT>(value));
293 }
294 template<typename RateBasedStatementT = RateBasedStatement>
295 Statement& WithRateBasedStatement(RateBasedStatementT&& value) { SetRateBasedStatement(std::forward<RateBasedStatementT>(value)); return *this;}
297
299
304 inline const AndStatement& GetAndStatement() const{
305 return *m_andStatement;
306 }
307 inline bool AndStatementHasBeenSet() const { return m_andStatementHasBeenSet; }
308 template<typename AndStatementT = AndStatement>
310 m_andStatementHasBeenSet = true;
311 m_andStatement = Aws::MakeShared<AndStatement>("Statement", std::forward<AndStatementT>(value));
312 }
313 template<typename AndStatementT = AndStatement>
314 Statement& WithAndStatement(AndStatementT&& value) { SetAndStatement(std::forward<AndStatementT>(value)); return *this;}
316
318
323 inline const OrStatement& GetOrStatement() const{
324 return *m_orStatement;
325 }
326 inline bool OrStatementHasBeenSet() const { return m_orStatementHasBeenSet; }
327 template<typename OrStatementT = OrStatement>
329 m_orStatementHasBeenSet = true;
330 m_orStatement = Aws::MakeShared<OrStatement>("Statement", std::forward<OrStatementT>(value));
331 }
332 template<typename OrStatementT = OrStatement>
333 Statement& WithOrStatement(OrStatementT&& value) { SetOrStatement(std::forward<OrStatementT>(value)); return *this;}
335
337
342 inline const NotStatement& GetNotStatement() const{
343 return *m_notStatement;
344 }
345 inline bool NotStatementHasBeenSet() const { return m_notStatementHasBeenSet; }
346 template<typename NotStatementT = NotStatement>
348 m_notStatementHasBeenSet = true;
349 m_notStatement = Aws::MakeShared<NotStatement>("Statement", std::forward<NotStatementT>(value));
350 }
351 template<typename NotStatementT = NotStatement>
352 Statement& WithNotStatement(NotStatementT&& value) { SetNotStatement(std::forward<NotStatementT>(value)); return *this;}
354
356
374 return *m_managedRuleGroupStatement;
375 }
376 inline bool ManagedRuleGroupStatementHasBeenSet() const { return m_managedRuleGroupStatementHasBeenSet; }
377 template<typename ManagedRuleGroupStatementT = ManagedRuleGroupStatement>
379 m_managedRuleGroupStatementHasBeenSet = true;
380 m_managedRuleGroupStatement = Aws::MakeShared<ManagedRuleGroupStatement>("Statement", std::forward<ManagedRuleGroupStatementT>(value));
381 }
382 template<typename ManagedRuleGroupStatementT = ManagedRuleGroupStatement>
383 Statement& WithManagedRuleGroupStatement(ManagedRuleGroupStatementT&& value) { SetManagedRuleGroupStatement(std::forward<ManagedRuleGroupStatementT>(value)); return *this;}
385
387
398 inline const LabelMatchStatement& GetLabelMatchStatement() const { return m_labelMatchStatement; }
399 inline bool LabelMatchStatementHasBeenSet() const { return m_labelMatchStatementHasBeenSet; }
400 template<typename LabelMatchStatementT = LabelMatchStatement>
401 void SetLabelMatchStatement(LabelMatchStatementT&& value) { m_labelMatchStatementHasBeenSet = true; m_labelMatchStatement = std::forward<LabelMatchStatementT>(value); }
402 template<typename LabelMatchStatementT = LabelMatchStatement>
403 Statement& WithLabelMatchStatement(LabelMatchStatementT&& value) { SetLabelMatchStatement(std::forward<LabelMatchStatementT>(value)); return *this;}
405
407
411 inline const RegexMatchStatement& GetRegexMatchStatement() const { return m_regexMatchStatement; }
412 inline bool RegexMatchStatementHasBeenSet() const { return m_regexMatchStatementHasBeenSet; }
413 template<typename RegexMatchStatementT = RegexMatchStatement>
414 void SetRegexMatchStatement(RegexMatchStatementT&& value) { m_regexMatchStatementHasBeenSet = true; m_regexMatchStatement = std::forward<RegexMatchStatementT>(value); }
415 template<typename RegexMatchStatementT = RegexMatchStatement>
416 Statement& WithRegexMatchStatement(RegexMatchStatementT&& value) { SetRegexMatchStatement(std::forward<RegexMatchStatementT>(value)); return *this;}
418
420
429 inline const AsnMatchStatement& GetAsnMatchStatement() const { return m_asnMatchStatement; }
430 inline bool AsnMatchStatementHasBeenSet() const { return m_asnMatchStatementHasBeenSet; }
431 template<typename AsnMatchStatementT = AsnMatchStatement>
432 void SetAsnMatchStatement(AsnMatchStatementT&& value) { m_asnMatchStatementHasBeenSet = true; m_asnMatchStatement = std::forward<AsnMatchStatementT>(value); }
433 template<typename AsnMatchStatementT = AsnMatchStatement>
434 Statement& WithAsnMatchStatement(AsnMatchStatementT&& value) { SetAsnMatchStatement(std::forward<AsnMatchStatementT>(value)); return *this;}
436 private:
437
438 ByteMatchStatement m_byteMatchStatement;
439 bool m_byteMatchStatementHasBeenSet = false;
440
441 SqliMatchStatement m_sqliMatchStatement;
442 bool m_sqliMatchStatementHasBeenSet = false;
443
444 XssMatchStatement m_xssMatchStatement;
445 bool m_xssMatchStatementHasBeenSet = false;
446
447 SizeConstraintStatement m_sizeConstraintStatement;
448 bool m_sizeConstraintStatementHasBeenSet = false;
449
450 GeoMatchStatement m_geoMatchStatement;
451 bool m_geoMatchStatementHasBeenSet = false;
452
453 RuleGroupReferenceStatement m_ruleGroupReferenceStatement;
454 bool m_ruleGroupReferenceStatementHasBeenSet = false;
455
456 IPSetReferenceStatement m_iPSetReferenceStatement;
457 bool m_iPSetReferenceStatementHasBeenSet = false;
458
459 RegexPatternSetReferenceStatement m_regexPatternSetReferenceStatement;
460 bool m_regexPatternSetReferenceStatementHasBeenSet = false;
461
462 std::shared_ptr<RateBasedStatement> m_rateBasedStatement;
463 bool m_rateBasedStatementHasBeenSet = false;
464
465 std::shared_ptr<AndStatement> m_andStatement;
466 bool m_andStatementHasBeenSet = false;
467
468 std::shared_ptr<OrStatement> m_orStatement;
469 bool m_orStatementHasBeenSet = false;
470
471 std::shared_ptr<NotStatement> m_notStatement;
472 bool m_notStatementHasBeenSet = false;
473
474 std::shared_ptr<ManagedRuleGroupStatement> m_managedRuleGroupStatement;
475 bool m_managedRuleGroupStatementHasBeenSet = false;
476
477 LabelMatchStatement m_labelMatchStatement;
478 bool m_labelMatchStatementHasBeenSet = false;
479
480 RegexMatchStatement m_regexMatchStatement;
481 bool m_regexMatchStatementHasBeenSet = false;
482
483 AsnMatchStatement m_asnMatchStatement;
484 bool m_asnMatchStatementHasBeenSet = false;
485 };
486
487} // namespace Model
488} // namespace WAFV2
489} // namespace Aws
bool XssMatchStatementHasBeenSet() const
Definition Statement.h:96
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
const LabelMatchStatement & GetLabelMatchStatement() const
Definition Statement.h:398
Statement & WithLabelMatchStatement(LabelMatchStatementT &&value)
Definition Statement.h:403
Statement & WithRuleGroupReferenceStatement(RuleGroupReferenceStatementT &&value)
Definition Statement.h:179
Statement & WithAndStatement(AndStatementT &&value)
Definition Statement.h:314
bool SizeConstraintStatementHasBeenSet() const
Definition Statement.h:121
void SetOrStatement(OrStatementT &&value)
Definition Statement.h:328
void SetGeoMatchStatement(GeoMatchStatementT &&value)
Definition Statement.h:158
void SetLabelMatchStatement(LabelMatchStatementT &&value)
Definition Statement.h:401
bool LabelMatchStatementHasBeenSet() const
Definition Statement.h:399
const RegexMatchStatement & GetRegexMatchStatement() const
Definition Statement.h:411
bool SqliMatchStatementHasBeenSet() const
Definition Statement.h:82
void SetNotStatement(NotStatementT &&value)
Definition Statement.h:347
const OrStatement & GetOrStatement() const
Definition Statement.h:323
void SetManagedRuleGroupStatement(ManagedRuleGroupStatementT &&value)
Definition Statement.h:378
Statement & WithManagedRuleGroupStatement(ManagedRuleGroupStatementT &&value)
Definition Statement.h:383
AWS_WAFV2_API Statement & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetRateBasedStatement(RateBasedStatementT &&value)
Definition Statement.h:290
Statement & WithRateBasedStatement(RateBasedStatementT &&value)
Definition Statement.h:295
bool RuleGroupReferenceStatementHasBeenSet() const
Definition Statement.h:175
const SqliMatchStatement & GetSqliMatchStatement() const
Definition Statement.h:81
const RegexPatternSetReferenceStatement & GetRegexPatternSetReferenceStatement() const
Definition Statement.h:214
void SetAndStatement(AndStatementT &&value)
Definition Statement.h:309
void SetIPSetReferenceStatement(IPSetReferenceStatementT &&value)
Definition Statement.h:196
bool RegexPatternSetReferenceStatementHasBeenSet() const
Definition Statement.h:215
Statement & WithByteMatchStatement(ByteMatchStatementT &&value)
Definition Statement.h:72
const ByteMatchStatement & GetByteMatchStatement() const
Definition Statement.h:67
Statement & WithXssMatchStatement(XssMatchStatementT &&value)
Definition Statement.h:100
Statement & WithAsnMatchStatement(AsnMatchStatementT &&value)
Definition Statement.h:434
const IPSetReferenceStatement & GetIPSetReferenceStatement() const
Definition Statement.h:193
bool RegexMatchStatementHasBeenSet() const
Definition Statement.h:412
bool GeoMatchStatementHasBeenSet() const
Definition Statement.h:156
Statement & WithGeoMatchStatement(GeoMatchStatementT &&value)
Definition Statement.h:160
bool RateBasedStatementHasBeenSet() const
Definition Statement.h:288
const AsnMatchStatement & GetAsnMatchStatement() const
Definition Statement.h:429
Statement & WithNotStatement(NotStatementT &&value)
Definition Statement.h:352
bool OrStatementHasBeenSet() const
Definition Statement.h:326
Statement & WithSizeConstraintStatement(SizeConstraintStatementT &&value)
Definition Statement.h:125
Statement & WithSqliMatchStatement(SqliMatchStatementT &&value)
Definition Statement.h:86
void SetRuleGroupReferenceStatement(RuleGroupReferenceStatementT &&value)
Definition Statement.h:177
void SetSqliMatchStatement(SqliMatchStatementT &&value)
Definition Statement.h:84
void SetAsnMatchStatement(AsnMatchStatementT &&value)
Definition Statement.h:432
bool NotStatementHasBeenSet() const
Definition Statement.h:345
void SetRegexMatchStatement(RegexMatchStatementT &&value)
Definition Statement.h:414
bool ManagedRuleGroupStatementHasBeenSet() const
Definition Statement.h:376
const XssMatchStatement & GetXssMatchStatement() const
Definition Statement.h:95
bool ByteMatchStatementHasBeenSet() const
Definition Statement.h:68
const GeoMatchStatement & GetGeoMatchStatement() const
Definition Statement.h:155
Statement & WithOrStatement(OrStatementT &&value)
Definition Statement.h:333
void SetByteMatchStatement(ByteMatchStatementT &&value)
Definition Statement.h:70
bool AndStatementHasBeenSet() const
Definition Statement.h:307
const SizeConstraintStatement & GetSizeConstraintStatement() const
Definition Statement.h:120
void SetRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT &&value)
Definition Statement.h:217
const RateBasedStatement & GetRateBasedStatement() const
Definition Statement.h:285
const AndStatement & GetAndStatement() const
Definition Statement.h:304
Statement & WithRegexMatchStatement(RegexMatchStatementT &&value)
Definition Statement.h:416
const NotStatement & GetNotStatement() const
Definition Statement.h:342
void SetSizeConstraintStatement(SizeConstraintStatementT &&value)
Definition Statement.h:123
const RuleGroupReferenceStatement & GetRuleGroupReferenceStatement() const
Definition Statement.h:174
const ManagedRuleGroupStatement & GetManagedRuleGroupStatement() const
Definition Statement.h:373
AWS_WAFV2_API Statement(Aws::Utils::Json::JsonView jsonValue)
void SetXssMatchStatement(XssMatchStatementT &&value)
Definition Statement.h:98
bool AsnMatchStatementHasBeenSet() const
Definition Statement.h:430
Statement & WithIPSetReferenceStatement(IPSetReferenceStatementT &&value)
Definition Statement.h:198
AWS_WAFV2_API Statement()=default
Statement & WithRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT &&value)
Definition Statement.h:219
bool IPSetReferenceStatementHasBeenSet() const
Definition Statement.h:194
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue