AWS SDK for C++  1.9.71
AWS SDK for C++
Rule.h
Go to the documentation of this file.
1 
6 #pragma once
14 #include <aws/wafv2/model/Label.h>
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace Utils
20 {
21 namespace Json
22 {
23  class JsonValue;
24  class JsonView;
25 } // namespace Json
26 } // namespace Utils
27 namespace WAFV2
28 {
29 namespace Model
30 {
31 
42  {
43  public:
44  Rule();
48 
49 
54  inline const Aws::String& GetName() const{ return m_name; }
55 
60  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
61 
66  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
67 
72  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
73 
78  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
79 
84  inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;}
85 
90  inline Rule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
91 
96  inline Rule& WithName(const char* value) { SetName(value); return *this;}
97 
98 
105  inline int GetPriority() const{ return m_priority; }
106 
113  inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
114 
121  inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
122 
129  inline Rule& WithPriority(int value) { SetPriority(value); return *this;}
130 
131 
136  inline const Statement& GetStatement() const{ return m_statement; }
137 
142  inline bool StatementHasBeenSet() const { return m_statementHasBeenSet; }
143 
148  inline void SetStatement(const Statement& value) { m_statementHasBeenSet = true; m_statement = value; }
149 
154  inline void SetStatement(Statement&& value) { m_statementHasBeenSet = true; m_statement = std::move(value); }
155 
160  inline Rule& WithStatement(const Statement& value) { SetStatement(value); return *this;}
161 
166  inline Rule& WithStatement(Statement&& value) { SetStatement(std::move(value)); return *this;}
167 
168 
182  inline const RuleAction& GetAction() const{ return m_action; }
183 
197  inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
198 
212  inline void SetAction(const RuleAction& value) { m_actionHasBeenSet = true; m_action = value; }
213 
227  inline void SetAction(RuleAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); }
228 
242  inline Rule& WithAction(const RuleAction& value) { SetAction(value); return *this;}
243 
257  inline Rule& WithAction(RuleAction&& value) { SetAction(std::move(value)); return *this;}
258 
259 
274  inline const OverrideAction& GetOverrideAction() const{ return m_overrideAction; }
275 
290  inline bool OverrideActionHasBeenSet() const { return m_overrideActionHasBeenSet; }
291 
306  inline void SetOverrideAction(const OverrideAction& value) { m_overrideActionHasBeenSet = true; m_overrideAction = value; }
307 
322  inline void SetOverrideAction(OverrideAction&& value) { m_overrideActionHasBeenSet = true; m_overrideAction = std::move(value); }
323 
338  inline Rule& WithOverrideAction(const OverrideAction& value) { SetOverrideAction(value); return *this;}
339 
354  inline Rule& WithOverrideAction(OverrideAction&& value) { SetOverrideAction(std::move(value)); return *this;}
355 
356 
374  inline const Aws::Vector<Label>& GetRuleLabels() const{ return m_ruleLabels; }
375 
393  inline bool RuleLabelsHasBeenSet() const { return m_ruleLabelsHasBeenSet; }
394 
412  inline void SetRuleLabels(const Aws::Vector<Label>& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels = value; }
413 
431  inline void SetRuleLabels(Aws::Vector<Label>&& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels = std::move(value); }
432 
450  inline Rule& WithRuleLabels(const Aws::Vector<Label>& value) { SetRuleLabels(value); return *this;}
451 
469  inline Rule& WithRuleLabels(Aws::Vector<Label>&& value) { SetRuleLabels(std::move(value)); return *this;}
470 
488  inline Rule& AddRuleLabels(const Label& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels.push_back(value); return *this; }
489 
507  inline Rule& AddRuleLabels(Label&& value) { m_ruleLabelsHasBeenSet = true; m_ruleLabels.push_back(std::move(value)); return *this; }
508 
509 
514  inline const VisibilityConfig& GetVisibilityConfig() const{ return m_visibilityConfig; }
515 
520  inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
521 
526  inline void SetVisibilityConfig(const VisibilityConfig& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = value; }
527 
532  inline void SetVisibilityConfig(VisibilityConfig&& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = std::move(value); }
533 
538  inline Rule& WithVisibilityConfig(const VisibilityConfig& value) { SetVisibilityConfig(value); return *this;}
539 
544  inline Rule& WithVisibilityConfig(VisibilityConfig&& value) { SetVisibilityConfig(std::move(value)); return *this;}
545 
546  private:
547 
548  Aws::String m_name;
549  bool m_nameHasBeenSet;
550 
551  int m_priority;
552  bool m_priorityHasBeenSet;
553 
554  Statement m_statement;
555  bool m_statementHasBeenSet;
556 
557  RuleAction m_action;
558  bool m_actionHasBeenSet;
559 
560  OverrideAction m_overrideAction;
561  bool m_overrideActionHasBeenSet;
562 
563  Aws::Vector<Label> m_ruleLabels;
564  bool m_ruleLabelsHasBeenSet;
565 
566  VisibilityConfig m_visibilityConfig;
567  bool m_visibilityConfigHasBeenSet;
568  };
569 
570 } // namespace Model
571 } // namespace WAFV2
572 } // namespace Aws
Aws::WAFV2::Model::Rule::WithOverrideAction
Rule & WithOverrideAction(OverrideAction &&value)
Definition: Rule.h:354
Aws::WAFV2::Model::Rule
Definition: Rule.h:42
Aws::WAFV2::Model::Rule::AddRuleLabels
Rule & AddRuleLabels(Label &&value)
Definition: Rule.h:507
Aws::WAFV2::Model::Rule::operator=
Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Statement.h
Aws::WAFV2::Model::Rule::GetAction
const RuleAction & GetAction() const
Definition: Rule.h:182
Aws::WAFV2::Model::Rule::VisibilityConfigHasBeenSet
bool VisibilityConfigHasBeenSet() const
Definition: Rule.h:520
Aws::WAFV2::Model::Rule::StatementHasBeenSet
bool StatementHasBeenSet() const
Definition: Rule.h:142
Aws::WAFV2::Model::Rule::PriorityHasBeenSet
bool PriorityHasBeenSet() const
Definition: Rule.h:113
RuleAction.h
Aws::WAFV2::Model::Rule::Rule
Rule()
Aws::WAFV2::Model::RuleAction
Definition: RuleAction.h:36
Aws::WAFV2::Model::Rule::WithOverrideAction
Rule & WithOverrideAction(const OverrideAction &value)
Definition: Rule.h:338
Aws::WAFV2::Model::Rule::SetStatement
void SetStatement(const Statement &value)
Definition: Rule.h:148
Aws::WAFV2::Model::Rule::WithName
Rule & WithName(const char *value)
Definition: Rule.h:96
Aws::WAFV2::Model::VisibilityConfig
Definition: VisibilityConfig.h:33
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::WAFV2::Model::Rule::SetPriority
void SetPriority(int value)
Definition: Rule.h:121
AWS_WAFV2_API
#define AWS_WAFV2_API
Definition: WAFV2_EXPORTS.h:28
Aws::WAFV2::Model::Rule::SetRuleLabels
void SetRuleLabels(const Aws::Vector< Label > &value)
Definition: Rule.h:412
OverrideAction.h
Aws::WAFV2::Model::Rule::SetAction
void SetAction(RuleAction &&value)
Definition: Rule.h:227
AWSVector.h
Aws::WAFV2::Model::Rule::WithName
Rule & WithName(const Aws::String &value)
Definition: Rule.h:84
Aws::WAFV2::Model::Rule::SetVisibilityConfig
void SetVisibilityConfig(VisibilityConfig &&value)
Definition: Rule.h:532
Aws::WAFV2::Model::Rule::WithVisibilityConfig
Rule & WithVisibilityConfig(VisibilityConfig &&value)
Definition: Rule.h:544
Aws::WAFV2::Model::Rule::GetStatement
const Statement & GetStatement() const
Definition: Rule.h:136
WAFV2_EXPORTS.h
Aws::WAFV2::Model::Rule::GetVisibilityConfig
const VisibilityConfig & GetVisibilityConfig() const
Definition: Rule.h:514
Aws::WAFV2::Model::Label
Definition: Label.h:35
Aws::WAFV2::Model::Rule::ActionHasBeenSet
bool ActionHasBeenSet() const
Definition: Rule.h:197
Aws::WAFV2::Model::Rule::SetOverrideAction
void SetOverrideAction(OverrideAction &&value)
Definition: Rule.h:322
Aws::WAFV2::Model::Rule::SetName
void SetName(const char *value)
Definition: Rule.h:78
Aws::WAFV2::Model::Rule::GetRuleLabels
const Aws::Vector< Label > & GetRuleLabels() const
Definition: Rule.h:374
Label.h
Aws::WAFV2::Model::Rule::WithRuleLabels
Rule & WithRuleLabels(const Aws::Vector< Label > &value)
Definition: Rule.h:450
Aws::WAFV2::Model::Rule::WithVisibilityConfig
Rule & WithVisibilityConfig(const VisibilityConfig &value)
Definition: Rule.h:538
Aws::WAFV2::Model::Rule::WithName
Rule & WithName(Aws::String &&value)
Definition: Rule.h:90
Aws::WAFV2::Model::Rule::WithStatement
Rule & WithStatement(const Statement &value)
Definition: Rule.h:160
Aws::WAFV2::Model::Rule::WithStatement
Rule & WithStatement(Statement &&value)
Definition: Rule.h:166
Aws::WAFV2::Model::Rule::SetRuleLabels
void SetRuleLabels(Aws::Vector< Label > &&value)
Definition: Rule.h:431
Aws::WAFV2::Model::Rule::SetName
void SetName(Aws::String &&value)
Definition: Rule.h:72
Aws::WAFV2::Model::Rule::WithPriority
Rule & WithPriority(int value)
Definition: Rule.h:129
Aws::WAFV2::Model::Rule::WithRuleLabels
Rule & WithRuleLabels(Aws::Vector< Label > &&value)
Definition: Rule.h:469
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:222
AWSString.h
Aws::WAFV2::Model::Rule::GetName
const Aws::String & GetName() const
Definition: Rule.h:54
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:30
Aws::WAFV2::Model::Rule::WithAction
Rule & WithAction(const RuleAction &value)
Definition: Rule.h:242
Aws::WAFV2::Model::Rule::SetStatement
void SetStatement(Statement &&value)
Definition: Rule.h:154
Aws::WAFV2::Model::Rule::NameHasBeenSet
bool NameHasBeenSet() const
Definition: Rule.h:60
Aws::WAFV2::Model::Statement
Definition: Statement.h:47
Aws::WAFV2::Model::Rule::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::WAFV2::Model::Rule::SetName
void SetName(const Aws::String &value)
Definition: Rule.h:66
Aws::WAFV2::Model::Rule::Rule
Rule(Aws::Utils::Json::JsonView jsonValue)
Aws::WAFV2::Model::Rule::GetPriority
int GetPriority() const
Definition: Rule.h:105
Aws
Definition: AccessManagementClient.h:15
Aws::WAFV2::Model::Rule::AddRuleLabels
Rule & AddRuleLabels(const Label &value)
Definition: Rule.h:488
Aws::WAFV2::Model::Rule::RuleLabelsHasBeenSet
bool RuleLabelsHasBeenSet() const
Definition: Rule.h:393
Aws::WAFV2::Model::OverrideAction
Definition: OverrideAction.h:44
Aws::WAFV2::Model::Rule::WithAction
Rule & WithAction(RuleAction &&value)
Definition: Rule.h:257
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::WAFV2::Model::Rule::SetAction
void SetAction(const RuleAction &value)
Definition: Rule.h:212
Aws::WAFV2::Model::Rule::OverrideActionHasBeenSet
bool OverrideActionHasBeenSet() const
Definition: Rule.h:290
Aws::WAFV2::Model::Rule::SetOverrideAction
void SetOverrideAction(const OverrideAction &value)
Definition: Rule.h:306
VisibilityConfig.h
Aws::WAFV2::Model::Rule::GetOverrideAction
const OverrideAction & GetOverrideAction() const
Definition: Rule.h:274
Aws::WAFV2::Model::Rule::SetVisibilityConfig
void SetVisibilityConfig(const VisibilityConfig &value)
Definition: Rule.h:526