AWS SDK for C++  1.9.124
AWS SDK for C++
Rule.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/waf/WAF_EXPORTS.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19  class JsonValue;
20  class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace WAF
24 {
25 namespace Model
26 {
27 
52  {
53  public:
54  Rule();
58 
59 
69  inline const Aws::String& GetRuleId() const{ return m_ruleId; }
70 
80  inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
81 
91  inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; }
92 
102  inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); }
103 
113  inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); }
114 
124  inline Rule& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;}
125 
135  inline Rule& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;}
136 
146  inline Rule& WithRuleId(const char* value) { SetRuleId(value); return *this;}
147 
148 
153  inline const Aws::String& GetName() const{ return m_name; }
154 
159  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
160 
165  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
166 
171  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
172 
177  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
178 
183  inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;}
184 
189  inline Rule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
190 
195  inline Rule& WithName(const char* value) { SetName(value); return *this;}
196 
197 
205  inline const Aws::String& GetMetricName() const{ return m_metricName; }
206 
214  inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
215 
223  inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
224 
232  inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
233 
241  inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
242 
250  inline Rule& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
251 
259  inline Rule& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
260 
268  inline Rule& WithMetricName(const char* value) { SetMetricName(value); return *this;}
269 
270 
277  inline const Aws::Vector<Predicate>& GetPredicates() const{ return m_predicates; }
278 
285  inline bool PredicatesHasBeenSet() const { return m_predicatesHasBeenSet; }
286 
293  inline void SetPredicates(const Aws::Vector<Predicate>& value) { m_predicatesHasBeenSet = true; m_predicates = value; }
294 
301  inline void SetPredicates(Aws::Vector<Predicate>&& value) { m_predicatesHasBeenSet = true; m_predicates = std::move(value); }
302 
309  inline Rule& WithPredicates(const Aws::Vector<Predicate>& value) { SetPredicates(value); return *this;}
310 
317  inline Rule& WithPredicates(Aws::Vector<Predicate>&& value) { SetPredicates(std::move(value)); return *this;}
318 
325  inline Rule& AddPredicates(const Predicate& value) { m_predicatesHasBeenSet = true; m_predicates.push_back(value); return *this; }
326 
333  inline Rule& AddPredicates(Predicate&& value) { m_predicatesHasBeenSet = true; m_predicates.push_back(std::move(value)); return *this; }
334 
335  private:
336 
337  Aws::String m_ruleId;
338  bool m_ruleIdHasBeenSet;
339 
340  Aws::String m_name;
341  bool m_nameHasBeenSet;
342 
343  Aws::String m_metricName;
344  bool m_metricNameHasBeenSet;
345 
346  Aws::Vector<Predicate> m_predicates;
347  bool m_predicatesHasBeenSet;
348  };
349 
350 } // namespace Model
351 } // namespace WAF
352 } // namespace Aws
Aws::WAF::Model::Rule::SetName
void SetName(const Aws::String &value)
Definition: Rule.h:165
Aws::WAF::Model::Predicate
Definition: Predicate.h:46
Aws::WAF::Model::Rule::SetPredicates
void SetPredicates(const Aws::Vector< Predicate > &value)
Definition: Rule.h:293
Aws::WAF::Model::Rule::SetRuleId
void SetRuleId(const char *value)
Definition: Rule.h:113
Aws::WAF::Model::Rule::WithPredicates
Rule & WithPredicates(const Aws::Vector< Predicate > &value)
Definition: Rule.h:309
Aws::WAF::Model::Rule::WithName
Rule & WithName(Aws::String &&value)
Definition: Rule.h:189
Aws::WAF::Model::Rule::SetName
void SetName(const char *value)
Definition: Rule.h:177
Predicate.h
Aws::WAF::Model::Rule::WithName
Rule & WithName(const char *value)
Definition: Rule.h:195
Aws::WAF::Model::Rule::NameHasBeenSet
bool NameHasBeenSet() const
Definition: Rule.h:159
Aws::WAF::Model::Rule::SetRuleId
void SetRuleId(const Aws::String &value)
Definition: Rule.h:91
Aws::WAF::Model::Rule::AddPredicates
Rule & AddPredicates(const Predicate &value)
Definition: Rule.h:325
Aws::WAF::Model::Rule::GetMetricName
const Aws::String & GetMetricName() const
Definition: Rule.h:205
AWS_WAF_API
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:28
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::WAF::Model::Rule::Rule
Rule()
Aws::WAF::Model::Rule::WithRuleId
Rule & WithRuleId(const char *value)
Definition: Rule.h:146
Aws::WAF::Model::Rule::SetPredicates
void SetPredicates(Aws::Vector< Predicate > &&value)
Definition: Rule.h:301
Aws::WAF::Model::Rule
Definition: Rule.h:52
AWSVector.h
Aws::WAF::Model::Rule::operator=
Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::WAF::Model::Rule::Rule
Rule(Aws::Utils::Json::JsonView jsonValue)
Aws::WAF::Model::Rule::SetName
void SetName(Aws::String &&value)
Definition: Rule.h:171
Aws::WAF::Model::Rule::WithMetricName
Rule & WithMetricName(Aws::String &&value)
Definition: Rule.h:259
Aws::WAF::Model::Rule::GetPredicates
const Aws::Vector< Predicate > & GetPredicates() const
Definition: Rule.h:277
Aws::WAF::Model::Rule::WithRuleId
Rule & WithRuleId(Aws::String &&value)
Definition: Rule.h:135
Aws::WAF::Model::Rule::WithPredicates
Rule & WithPredicates(Aws::Vector< Predicate > &&value)
Definition: Rule.h:317
Aws::WAF::Model::Rule::SetRuleId
void SetRuleId(Aws::String &&value)
Definition: Rule.h:102
Aws::WAF::Model::Rule::GetName
const Aws::String & GetName() const
Definition: Rule.h:153
Aws::WAF::Model::Rule::WithRuleId
Rule & WithRuleId(const Aws::String &value)
Definition: Rule.h:124
Aws::WAF::Model::Rule::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
AWSString.h
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::WAF::Model::Rule::RuleIdHasBeenSet
bool RuleIdHasBeenSet() const
Definition: Rule.h:80
Aws::WAF::Model::Rule::SetMetricName
void SetMetricName(Aws::String &&value)
Definition: Rule.h:232
Aws::WAF::Model::Rule::GetRuleId
const Aws::String & GetRuleId() const
Definition: Rule.h:69
WAF_EXPORTS.h
Aws::WAF::Model::Rule::WithMetricName
Rule & WithMetricName(const Aws::String &value)
Definition: Rule.h:250
Aws::WAF::Model::Rule::AddPredicates
Rule & AddPredicates(Predicate &&value)
Definition: Rule.h:333
Aws::WAF::Model::Rule::SetMetricName
void SetMetricName(const char *value)
Definition: Rule.h:241
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::WAF::Model::Rule::SetMetricName
void SetMetricName(const Aws::String &value)
Definition: Rule.h:223
Aws::WAF::Model::Rule::WithMetricName
Rule & WithMetricName(const char *value)
Definition: Rule.h:268
Aws::WAF::Model::Rule::MetricNameHasBeenSet
bool MetricNameHasBeenSet() const
Definition: Rule.h:214
Aws::WAF::Model::Rule::PredicatesHasBeenSet
bool PredicatesHasBeenSet() const
Definition: Rule.h:285
Aws::WAF::Model::Rule::WithName
Rule & WithName(const Aws::String &value)
Definition: Rule.h:183