AWS SDK for C++

AWS SDK for C++ Version 1.11.931

Loading...
Searching...
No Matches
Statement.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSAllocator.h>
8#include <aws/wafv2/WAFV2_EXPORTS.h>
9#include <aws/wafv2/model/AsnMatchStatement.h>
10#include <aws/wafv2/model/ByteMatchStatement.h>
11#include <aws/wafv2/model/GeoMatchStatement.h>
12#include <aws/wafv2/model/IPSetReferenceStatement.h>
13#include <aws/wafv2/model/LabelMatchStatement.h>
14#include <aws/wafv2/model/RegexMatchStatement.h>
15#include <aws/wafv2/model/RegexPatternSetReferenceStatement.h>
16#include <aws/wafv2/model/RuleGroupReferenceStatement.h>
17#include <aws/wafv2/model/SizeConstraintStatement.h>
18#include <aws/wafv2/model/SqliMatchStatement.h>
19#include <aws/wafv2/model/XssMatchStatement.h>
20
21#include <utility>
22
23namespace Aws {
24namespace Utils {
25namespace Json {
26class JsonValue;
27class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace WAFV2 {
31namespace Model {
32class RateBasedStatement;
33class AndStatement;
34class OrStatement;
35class NotStatement;
36class ManagedRuleGroupStatement;
37
45class Statement {
46 public:
47 AWS_WAFV2_API Statement() = default;
48 AWS_WAFV2_API Statement(Aws::Utils::Json::JsonView jsonValue);
50 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
51
53
61 inline const ByteMatchStatement& GetByteMatchStatement() const { return m_byteMatchStatement; }
62 inline bool ByteMatchStatementHasBeenSet() const { return m_byteMatchStatementHasBeenSet; }
63 template <typename ByteMatchStatementT = ByteMatchStatement>
64 void SetByteMatchStatement(ByteMatchStatementT&& value) {
65 m_byteMatchStatementHasBeenSet = true;
66 m_byteMatchStatement = std::forward<ByteMatchStatementT>(value);
67 }
68 template <typename ByteMatchStatementT = ByteMatchStatement>
69 Statement& WithByteMatchStatement(ByteMatchStatementT&& value) {
70 SetByteMatchStatement(std::forward<ByteMatchStatementT>(value));
71 return *this;
72 }
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) {
85 m_sqliMatchStatementHasBeenSet = true;
86 m_sqliMatchStatement = std::forward<SqliMatchStatementT>(value);
87 }
88 template <typename SqliMatchStatementT = SqliMatchStatement>
89 Statement& WithSqliMatchStatement(SqliMatchStatementT&& value) {
90 SetSqliMatchStatement(std::forward<SqliMatchStatementT>(value));
91 return *this;
92 }
94
96
101 inline const XssMatchStatement& GetXssMatchStatement() const { return m_xssMatchStatement; }
102 inline bool XssMatchStatementHasBeenSet() const { return m_xssMatchStatementHasBeenSet; }
103 template <typename XssMatchStatementT = XssMatchStatement>
104 void SetXssMatchStatement(XssMatchStatementT&& value) {
105 m_xssMatchStatementHasBeenSet = true;
106 m_xssMatchStatement = std::forward<XssMatchStatementT>(value);
107 }
108 template <typename XssMatchStatementT = XssMatchStatement>
109 Statement& WithXssMatchStatement(XssMatchStatementT&& value) {
110 SetXssMatchStatement(std::forward<XssMatchStatementT>(value));
111 return *this;
112 }
114
116
132 inline const SizeConstraintStatement& GetSizeConstraintStatement() const { return m_sizeConstraintStatement; }
133 inline bool SizeConstraintStatementHasBeenSet() const { return m_sizeConstraintStatementHasBeenSet; }
134 template <typename SizeConstraintStatementT = SizeConstraintStatement>
135 void SetSizeConstraintStatement(SizeConstraintStatementT&& value) {
136 m_sizeConstraintStatementHasBeenSet = true;
137 m_sizeConstraintStatement = std::forward<SizeConstraintStatementT>(value);
138 }
139 template <typename SizeConstraintStatementT = SizeConstraintStatement>
140 Statement& WithSizeConstraintStatement(SizeConstraintStatementT&& value) {
141 SetSizeConstraintStatement(std::forward<SizeConstraintStatementT>(value));
142 return *this;
143 }
145
147
173 inline const GeoMatchStatement& GetGeoMatchStatement() const { return m_geoMatchStatement; }
174 inline bool GeoMatchStatementHasBeenSet() const { return m_geoMatchStatementHasBeenSet; }
175 template <typename GeoMatchStatementT = GeoMatchStatement>
176 void SetGeoMatchStatement(GeoMatchStatementT&& value) {
177 m_geoMatchStatementHasBeenSet = true;
178 m_geoMatchStatement = std::forward<GeoMatchStatementT>(value);
179 }
180 template <typename GeoMatchStatementT = GeoMatchStatement>
181 Statement& WithGeoMatchStatement(GeoMatchStatementT&& value) {
182 SetGeoMatchStatement(std::forward<GeoMatchStatementT>(value));
183 return *this;
184 }
186
188
198 inline const RuleGroupReferenceStatement& GetRuleGroupReferenceStatement() const { return m_ruleGroupReferenceStatement; }
199 inline bool RuleGroupReferenceStatementHasBeenSet() const { return m_ruleGroupReferenceStatementHasBeenSet; }
200 template <typename RuleGroupReferenceStatementT = RuleGroupReferenceStatement>
201 void SetRuleGroupReferenceStatement(RuleGroupReferenceStatementT&& value) {
202 m_ruleGroupReferenceStatementHasBeenSet = true;
203 m_ruleGroupReferenceStatement = std::forward<RuleGroupReferenceStatementT>(value);
204 }
205 template <typename RuleGroupReferenceStatementT = RuleGroupReferenceStatement>
206 Statement& WithRuleGroupReferenceStatement(RuleGroupReferenceStatementT&& value) {
207 SetRuleGroupReferenceStatement(std::forward<RuleGroupReferenceStatementT>(value));
208 return *this;
209 }
211
213
223 inline const IPSetReferenceStatement& GetIPSetReferenceStatement() const { return m_iPSetReferenceStatement; }
224 inline bool IPSetReferenceStatementHasBeenSet() const { return m_iPSetReferenceStatementHasBeenSet; }
225 template <typename IPSetReferenceStatementT = IPSetReferenceStatement>
226 void SetIPSetReferenceStatement(IPSetReferenceStatementT&& value) {
227 m_iPSetReferenceStatementHasBeenSet = true;
228 m_iPSetReferenceStatement = std::forward<IPSetReferenceStatementT>(value);
229 }
230 template <typename IPSetReferenceStatementT = IPSetReferenceStatement>
231 Statement& WithIPSetReferenceStatement(IPSetReferenceStatementT&& value) {
232 SetIPSetReferenceStatement(std::forward<IPSetReferenceStatementT>(value));
233 return *this;
234 }
236
238
251 return m_regexPatternSetReferenceStatement;
252 }
253 inline bool RegexPatternSetReferenceStatementHasBeenSet() const { return m_regexPatternSetReferenceStatementHasBeenSet; }
254 template <typename RegexPatternSetReferenceStatementT = RegexPatternSetReferenceStatement>
255 void SetRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT&& value) {
256 m_regexPatternSetReferenceStatementHasBeenSet = true;
257 m_regexPatternSetReferenceStatement = std::forward<RegexPatternSetReferenceStatementT>(value);
258 }
259 template <typename RegexPatternSetReferenceStatementT = RegexPatternSetReferenceStatement>
260 Statement& WithRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT&& value) {
261 SetRegexPatternSetReferenceStatement(std::forward<RegexPatternSetReferenceStatementT>(value));
262 return *this;
263 }
265
267
329 inline const RateBasedStatement& GetRateBasedStatement() const { return *m_rateBasedStatement; }
330 inline bool RateBasedStatementHasBeenSet() const { return m_rateBasedStatementHasBeenSet; }
331 template <typename RateBasedStatementT = RateBasedStatement>
332 void SetRateBasedStatement(RateBasedStatementT&& value) {
333 m_rateBasedStatementHasBeenSet = true;
334 m_rateBasedStatement = Aws::MakeShared<RateBasedStatement>("Statement", std::forward<RateBasedStatementT>(value));
335 }
336 template <typename RateBasedStatementT = RateBasedStatement>
337 Statement& WithRateBasedStatement(RateBasedStatementT&& value) {
338 SetRateBasedStatement(std::forward<RateBasedStatementT>(value));
339 return *this;
340 }
342
344
349 inline const AndStatement& GetAndStatement() const { return *m_andStatement; }
350 inline bool AndStatementHasBeenSet() const { return m_andStatementHasBeenSet; }
351 template <typename AndStatementT = AndStatement>
352 void SetAndStatement(AndStatementT&& value) {
353 m_andStatementHasBeenSet = true;
354 m_andStatement = Aws::MakeShared<AndStatement>("Statement", std::forward<AndStatementT>(value));
355 }
356 template <typename AndStatementT = AndStatement>
357 Statement& WithAndStatement(AndStatementT&& value) {
358 SetAndStatement(std::forward<AndStatementT>(value));
359 return *this;
360 }
362
364
369 inline const OrStatement& GetOrStatement() const { return *m_orStatement; }
370 inline bool OrStatementHasBeenSet() const { return m_orStatementHasBeenSet; }
371 template <typename OrStatementT = OrStatement>
372 void SetOrStatement(OrStatementT&& value) {
373 m_orStatementHasBeenSet = true;
374 m_orStatement = Aws::MakeShared<OrStatement>("Statement", std::forward<OrStatementT>(value));
375 }
376 template <typename OrStatementT = OrStatement>
377 Statement& WithOrStatement(OrStatementT&& value) {
378 SetOrStatement(std::forward<OrStatementT>(value));
379 return *this;
380 }
382
384
389 inline const NotStatement& GetNotStatement() const { return *m_notStatement; }
390 inline bool NotStatementHasBeenSet() const { return m_notStatementHasBeenSet; }
391 template <typename NotStatementT = NotStatement>
392 void SetNotStatement(NotStatementT&& value) {
393 m_notStatementHasBeenSet = true;
394 m_notStatement = Aws::MakeShared<NotStatement>("Statement", std::forward<NotStatementT>(value));
395 }
396 template <typename NotStatementT = NotStatement>
397 Statement& WithNotStatement(NotStatementT&& value) {
398 SetNotStatement(std::forward<NotStatementT>(value));
399 return *this;
400 }
402
404
421 inline const ManagedRuleGroupStatement& GetManagedRuleGroupStatement() const { return *m_managedRuleGroupStatement; }
422 inline bool ManagedRuleGroupStatementHasBeenSet() const { return m_managedRuleGroupStatementHasBeenSet; }
423 template <typename ManagedRuleGroupStatementT = ManagedRuleGroupStatement>
424 void SetManagedRuleGroupStatement(ManagedRuleGroupStatementT&& value) {
425 m_managedRuleGroupStatementHasBeenSet = true;
426 m_managedRuleGroupStatement = Aws::MakeShared<ManagedRuleGroupStatement>("Statement", std::forward<ManagedRuleGroupStatementT>(value));
427 }
428 template <typename ManagedRuleGroupStatementT = ManagedRuleGroupStatement>
429 Statement& WithManagedRuleGroupStatement(ManagedRuleGroupStatementT&& value) {
430 SetManagedRuleGroupStatement(std::forward<ManagedRuleGroupStatementT>(value));
431 return *this;
432 }
434
436
447 inline const LabelMatchStatement& GetLabelMatchStatement() const { return m_labelMatchStatement; }
448 inline bool LabelMatchStatementHasBeenSet() const { return m_labelMatchStatementHasBeenSet; }
449 template <typename LabelMatchStatementT = LabelMatchStatement>
450 void SetLabelMatchStatement(LabelMatchStatementT&& value) {
451 m_labelMatchStatementHasBeenSet = true;
452 m_labelMatchStatement = std::forward<LabelMatchStatementT>(value);
453 }
454 template <typename LabelMatchStatementT = LabelMatchStatement>
455 Statement& WithLabelMatchStatement(LabelMatchStatementT&& value) {
456 SetLabelMatchStatement(std::forward<LabelMatchStatementT>(value));
457 return *this;
458 }
460
462
466 inline const RegexMatchStatement& GetRegexMatchStatement() const { return m_regexMatchStatement; }
467 inline bool RegexMatchStatementHasBeenSet() const { return m_regexMatchStatementHasBeenSet; }
468 template <typename RegexMatchStatementT = RegexMatchStatement>
469 void SetRegexMatchStatement(RegexMatchStatementT&& value) {
470 m_regexMatchStatementHasBeenSet = true;
471 m_regexMatchStatement = std::forward<RegexMatchStatementT>(value);
472 }
473 template <typename RegexMatchStatementT = RegexMatchStatement>
474 Statement& WithRegexMatchStatement(RegexMatchStatementT&& value) {
475 SetRegexMatchStatement(std::forward<RegexMatchStatementT>(value));
476 return *this;
477 }
479
481
490 inline const AsnMatchStatement& GetAsnMatchStatement() const { return m_asnMatchStatement; }
491 inline bool AsnMatchStatementHasBeenSet() const { return m_asnMatchStatementHasBeenSet; }
492 template <typename AsnMatchStatementT = AsnMatchStatement>
493 void SetAsnMatchStatement(AsnMatchStatementT&& value) {
494 m_asnMatchStatementHasBeenSet = true;
495 m_asnMatchStatement = std::forward<AsnMatchStatementT>(value);
496 }
497 template <typename AsnMatchStatementT = AsnMatchStatement>
498 Statement& WithAsnMatchStatement(AsnMatchStatementT&& value) {
499 SetAsnMatchStatement(std::forward<AsnMatchStatementT>(value));
500 return *this;
501 }
503 private:
504 ByteMatchStatement m_byteMatchStatement;
505
506 SqliMatchStatement m_sqliMatchStatement;
507
508 XssMatchStatement m_xssMatchStatement;
509
510 SizeConstraintStatement m_sizeConstraintStatement;
511
512 GeoMatchStatement m_geoMatchStatement;
513
514 RuleGroupReferenceStatement m_ruleGroupReferenceStatement;
515
516 IPSetReferenceStatement m_iPSetReferenceStatement;
517
518 RegexPatternSetReferenceStatement m_regexPatternSetReferenceStatement;
519
520 std::shared_ptr<RateBasedStatement> m_rateBasedStatement;
521
522 std::shared_ptr<AndStatement> m_andStatement;
523
524 std::shared_ptr<OrStatement> m_orStatement;
525
526 std::shared_ptr<NotStatement> m_notStatement;
527
528 std::shared_ptr<ManagedRuleGroupStatement> m_managedRuleGroupStatement;
529
530 LabelMatchStatement m_labelMatchStatement;
531
532 RegexMatchStatement m_regexMatchStatement;
533
534 AsnMatchStatement m_asnMatchStatement;
535 bool m_byteMatchStatementHasBeenSet = false;
536 bool m_sqliMatchStatementHasBeenSet = false;
537 bool m_xssMatchStatementHasBeenSet = false;
538 bool m_sizeConstraintStatementHasBeenSet = false;
539 bool m_geoMatchStatementHasBeenSet = false;
540 bool m_ruleGroupReferenceStatementHasBeenSet = false;
541 bool m_iPSetReferenceStatementHasBeenSet = false;
542 bool m_regexPatternSetReferenceStatementHasBeenSet = false;
543 bool m_rateBasedStatementHasBeenSet = false;
544 bool m_andStatementHasBeenSet = false;
545 bool m_orStatementHasBeenSet = false;
546 bool m_notStatementHasBeenSet = false;
547 bool m_managedRuleGroupStatementHasBeenSet = false;
548 bool m_labelMatchStatementHasBeenSet = false;
549 bool m_regexMatchStatementHasBeenSet = false;
550 bool m_asnMatchStatementHasBeenSet = false;
551};
552
553} // namespace Model
554} // namespace WAFV2
555} // namespace Aws
bool XssMatchStatementHasBeenSet() const
Definition Statement.h:102
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
const LabelMatchStatement & GetLabelMatchStatement() const
Definition Statement.h:447
Statement & WithLabelMatchStatement(LabelMatchStatementT &&value)
Definition Statement.h:455
Statement & WithRuleGroupReferenceStatement(RuleGroupReferenceStatementT &&value)
Definition Statement.h:206
Statement & WithAndStatement(AndStatementT &&value)
Definition Statement.h:357
bool SizeConstraintStatementHasBeenSet() const
Definition Statement.h:133
void SetOrStatement(OrStatementT &&value)
Definition Statement.h:372
void SetGeoMatchStatement(GeoMatchStatementT &&value)
Definition Statement.h:176
void SetLabelMatchStatement(LabelMatchStatementT &&value)
Definition Statement.h:450
bool LabelMatchStatementHasBeenSet() const
Definition Statement.h:448
const RegexMatchStatement & GetRegexMatchStatement() const
Definition Statement.h:466
bool SqliMatchStatementHasBeenSet() const
Definition Statement.h:82
void SetNotStatement(NotStatementT &&value)
Definition Statement.h:392
const OrStatement & GetOrStatement() const
Definition Statement.h:369
void SetManagedRuleGroupStatement(ManagedRuleGroupStatementT &&value)
Definition Statement.h:424
Statement & WithManagedRuleGroupStatement(ManagedRuleGroupStatementT &&value)
Definition Statement.h:429
AWS_WAFV2_API Statement & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetRateBasedStatement(RateBasedStatementT &&value)
Definition Statement.h:332
Statement & WithRateBasedStatement(RateBasedStatementT &&value)
Definition Statement.h:337
bool RuleGroupReferenceStatementHasBeenSet() const
Definition Statement.h:199
const SqliMatchStatement & GetSqliMatchStatement() const
Definition Statement.h:81
const RegexPatternSetReferenceStatement & GetRegexPatternSetReferenceStatement() const
Definition Statement.h:250
void SetAndStatement(AndStatementT &&value)
Definition Statement.h:352
void SetIPSetReferenceStatement(IPSetReferenceStatementT &&value)
Definition Statement.h:226
bool RegexPatternSetReferenceStatementHasBeenSet() const
Definition Statement.h:253
Statement & WithByteMatchStatement(ByteMatchStatementT &&value)
Definition Statement.h:69
const ByteMatchStatement & GetByteMatchStatement() const
Definition Statement.h:61
Statement & WithXssMatchStatement(XssMatchStatementT &&value)
Definition Statement.h:109
Statement & WithAsnMatchStatement(AsnMatchStatementT &&value)
Definition Statement.h:498
const IPSetReferenceStatement & GetIPSetReferenceStatement() const
Definition Statement.h:223
bool RegexMatchStatementHasBeenSet() const
Definition Statement.h:467
bool GeoMatchStatementHasBeenSet() const
Definition Statement.h:174
Statement & WithGeoMatchStatement(GeoMatchStatementT &&value)
Definition Statement.h:181
bool RateBasedStatementHasBeenSet() const
Definition Statement.h:330
const AsnMatchStatement & GetAsnMatchStatement() const
Definition Statement.h:490
Statement & WithNotStatement(NotStatementT &&value)
Definition Statement.h:397
bool OrStatementHasBeenSet() const
Definition Statement.h:370
Statement & WithSizeConstraintStatement(SizeConstraintStatementT &&value)
Definition Statement.h:140
Statement & WithSqliMatchStatement(SqliMatchStatementT &&value)
Definition Statement.h:89
void SetRuleGroupReferenceStatement(RuleGroupReferenceStatementT &&value)
Definition Statement.h:201
void SetSqliMatchStatement(SqliMatchStatementT &&value)
Definition Statement.h:84
void SetAsnMatchStatement(AsnMatchStatementT &&value)
Definition Statement.h:493
bool NotStatementHasBeenSet() const
Definition Statement.h:390
void SetRegexMatchStatement(RegexMatchStatementT &&value)
Definition Statement.h:469
bool ManagedRuleGroupStatementHasBeenSet() const
Definition Statement.h:422
const XssMatchStatement & GetXssMatchStatement() const
Definition Statement.h:101
bool ByteMatchStatementHasBeenSet() const
Definition Statement.h:62
const GeoMatchStatement & GetGeoMatchStatement() const
Definition Statement.h:173
Statement & WithOrStatement(OrStatementT &&value)
Definition Statement.h:377
void SetByteMatchStatement(ByteMatchStatementT &&value)
Definition Statement.h:64
bool AndStatementHasBeenSet() const
Definition Statement.h:350
const SizeConstraintStatement & GetSizeConstraintStatement() const
Definition Statement.h:132
void SetRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT &&value)
Definition Statement.h:255
const RateBasedStatement & GetRateBasedStatement() const
Definition Statement.h:329
const AndStatement & GetAndStatement() const
Definition Statement.h:349
Statement & WithRegexMatchStatement(RegexMatchStatementT &&value)
Definition Statement.h:474
const NotStatement & GetNotStatement() const
Definition Statement.h:389
void SetSizeConstraintStatement(SizeConstraintStatementT &&value)
Definition Statement.h:135
const RuleGroupReferenceStatement & GetRuleGroupReferenceStatement() const
Definition Statement.h:198
const ManagedRuleGroupStatement & GetManagedRuleGroupStatement() const
Definition Statement.h:421
AWS_WAFV2_API Statement(Aws::Utils::Json::JsonView jsonValue)
void SetXssMatchStatement(XssMatchStatementT &&value)
Definition Statement.h:104
bool AsnMatchStatementHasBeenSet() const
Definition Statement.h:491
Statement & WithIPSetReferenceStatement(IPSetReferenceStatementT &&value)
Definition Statement.h:231
AWS_WAFV2_API Statement()=default
Statement & WithRegexPatternSetReferenceStatement(RegexPatternSetReferenceStatementT &&value)
Definition Statement.h:260
bool IPSetReferenceStatementHasBeenSet() const
Definition Statement.h:224
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue