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/waf/WAF_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/waf/model/Predicate.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace WAF
24{
25namespace Model
26{
27
51 class Rule
52 {
53 public:
54 AWS_WAF_API Rule();
55 AWS_WAF_API Rule(Aws::Utils::Json::JsonView jsonValue);
56 AWS_WAF_API Rule& operator=(Aws::Utils::Json::JsonView jsonValue);
58
59
61
70 inline const Aws::String& GetRuleId() const{ return m_ruleId; }
71 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
72 inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; }
73 inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); }
74 inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); }
75 inline Rule& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;}
76 inline Rule& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;}
77 inline Rule& WithRuleId(const char* value) { SetRuleId(value); return *this;}
79
81
85 inline const Aws::String& GetName() const{ return m_name; }
86 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
87 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
88 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
89 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
90 inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;}
91 inline Rule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
92 inline Rule& WithName(const char* value) { SetName(value); return *this;}
94
96
103 inline const Aws::String& GetMetricName() const{ return m_metricName; }
104 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
105 inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
106 inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
107 inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
108 inline Rule& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
109 inline Rule& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
110 inline Rule& WithMetricName(const char* value) { SetMetricName(value); return *this;}
112
114
120 inline const Aws::Vector<Predicate>& GetPredicates() const{ return m_predicates; }
121 inline bool PredicatesHasBeenSet() const { return m_predicatesHasBeenSet; }
122 inline void SetPredicates(const Aws::Vector<Predicate>& value) { m_predicatesHasBeenSet = true; m_predicates = value; }
123 inline void SetPredicates(Aws::Vector<Predicate>&& value) { m_predicatesHasBeenSet = true; m_predicates = std::move(value); }
124 inline Rule& WithPredicates(const Aws::Vector<Predicate>& value) { SetPredicates(value); return *this;}
125 inline Rule& WithPredicates(Aws::Vector<Predicate>&& value) { SetPredicates(std::move(value)); return *this;}
126 inline Rule& AddPredicates(const Predicate& value) { m_predicatesHasBeenSet = true; m_predicates.push_back(value); return *this; }
127 inline Rule& AddPredicates(Predicate&& value) { m_predicatesHasBeenSet = true; m_predicates.push_back(std::move(value)); return *this; }
129 private:
130
131 Aws::String m_ruleId;
132 bool m_ruleIdHasBeenSet = false;
133
134 Aws::String m_name;
135 bool m_nameHasBeenSet = false;
136
137 Aws::String m_metricName;
138 bool m_metricNameHasBeenSet = false;
139
140 Aws::Vector<Predicate> m_predicates;
141 bool m_predicatesHasBeenSet = false;
142 };
143
144} // namespace Model
145} // namespace WAF
146} // namespace Aws
Rule & WithName(Aws::String &&value)
Definition Rule.h:91
void SetMetricName(Aws::String &&value)
Definition Rule.h:106
Rule & WithName(const char *value)
Definition Rule.h:92
Rule & WithName(const Aws::String &value)
Definition Rule.h:90
void SetPredicates(const Aws::Vector< Predicate > &value)
Definition Rule.h:122
void SetName(const char *value)
Definition Rule.h:89
Rule & WithMetricName(Aws::String &&value)
Definition Rule.h:109
Rule & WithRuleId(Aws::String &&value)
Definition Rule.h:76
void SetRuleId(const char *value)
Definition Rule.h:74
Rule & WithPredicates(const Aws::Vector< Predicate > &value)
Definition Rule.h:124
bool RuleIdHasBeenSet() const
Definition Rule.h:71
AWS_WAF_API Rule()
bool NameHasBeenSet() const
Definition Rule.h:86
Rule & WithMetricName(const Aws::String &value)
Definition Rule.h:108
const Aws::String & GetRuleId() const
Definition Rule.h:70
Rule & WithRuleId(const char *value)
Definition Rule.h:77
AWS_WAF_API Rule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetMetricName(const char *value)
Definition Rule.h:107
bool PredicatesHasBeenSet() const
Definition Rule.h:121
const Aws::String & GetMetricName() const
Definition Rule.h:103
const Aws::Vector< Predicate > & GetPredicates() const
Definition Rule.h:120
Rule & AddPredicates(Predicate &&value)
Definition Rule.h:127
void SetName(const Aws::String &value)
Definition Rule.h:87
void SetMetricName(const Aws::String &value)
Definition Rule.h:105
AWS_WAF_API Rule(Aws::Utils::Json::JsonView jsonValue)
void SetPredicates(Aws::Vector< Predicate > &&value)
Definition Rule.h:123
AWS_WAF_API Aws::Utils::Json::JsonValue Jsonize() const
Rule & AddPredicates(const Predicate &value)
Definition Rule.h:126
void SetRuleId(const Aws::String &value)
Definition Rule.h:72
Rule & WithRuleId(const Aws::String &value)
Definition Rule.h:75
bool MetricNameHasBeenSet() const
Definition Rule.h:104
void SetName(Aws::String &&value)
Definition Rule.h:88
Rule & WithPredicates(Aws::Vector< Predicate > &&value)
Definition Rule.h:125
const Aws::String & GetName() const
Definition Rule.h:85
Rule & WithMetricName(const char *value)
Definition Rule.h:110
void SetRuleId(Aws::String &&value)
Definition Rule.h:73
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue