AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
WebACL.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/waf/WAF_EXPORTS.h>
10#include <aws/waf/model/ActivatedRule.h>
11#include <aws/waf/model/WafAction.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace WAF {
23namespace Model {
24
47class WebACL {
48 public:
49 AWS_WAF_API WebACL() = default;
50 AWS_WAF_API WebACL(Aws::Utils::Json::JsonView jsonValue);
53
55
62 inline const Aws::String& GetWebACLId() const { return m_webACLId; }
63 inline bool WebACLIdHasBeenSet() const { return m_webACLIdHasBeenSet; }
64 template <typename WebACLIdT = Aws::String>
65 void SetWebACLId(WebACLIdT&& value) {
66 m_webACLIdHasBeenSet = true;
67 m_webACLId = std::forward<WebACLIdT>(value);
68 }
69 template <typename WebACLIdT = Aws::String>
70 WebACL& WithWebACLId(WebACLIdT&& value) {
71 SetWebACLId(std::forward<WebACLIdT>(value));
72 return *this;
73 }
75
77
81 inline const Aws::String& GetName() const { return m_name; }
82 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
83 template <typename NameT = Aws::String>
84 void SetName(NameT&& value) {
85 m_nameHasBeenSet = true;
86 m_name = std::forward<NameT>(value);
87 }
88 template <typename NameT = Aws::String>
89 WebACL& WithName(NameT&& value) {
90 SetName(std::forward<NameT>(value));
91 return *this;
92 }
94
96
103 inline const Aws::String& GetMetricName() const { return m_metricName; }
104 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
105 template <typename MetricNameT = Aws::String>
106 void SetMetricName(MetricNameT&& value) {
107 m_metricNameHasBeenSet = true;
108 m_metricName = std::forward<MetricNameT>(value);
109 }
110 template <typename MetricNameT = Aws::String>
111 WebACL& WithMetricName(MetricNameT&& value) {
112 SetMetricName(std::forward<MetricNameT>(value));
113 return *this;
114 }
116
118
123 inline const WafAction& GetDefaultAction() const { return m_defaultAction; }
124 inline bool DefaultActionHasBeenSet() const { return m_defaultActionHasBeenSet; }
125 template <typename DefaultActionT = WafAction>
126 void SetDefaultAction(DefaultActionT&& value) {
127 m_defaultActionHasBeenSet = true;
128 m_defaultAction = std::forward<DefaultActionT>(value);
129 }
130 template <typename DefaultActionT = WafAction>
131 WebACL& WithDefaultAction(DefaultActionT&& value) {
132 SetDefaultAction(std::forward<DefaultActionT>(value));
133 return *this;
134 }
136
138
143 inline const Aws::Vector<ActivatedRule>& GetRules() const { return m_rules; }
144 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
145 template <typename RulesT = Aws::Vector<ActivatedRule>>
146 void SetRules(RulesT&& value) {
147 m_rulesHasBeenSet = true;
148 m_rules = std::forward<RulesT>(value);
149 }
150 template <typename RulesT = Aws::Vector<ActivatedRule>>
151 WebACL& WithRules(RulesT&& value) {
152 SetRules(std::forward<RulesT>(value));
153 return *this;
154 }
155 template <typename RulesT = ActivatedRule>
156 WebACL& AddRules(RulesT&& value) {
157 m_rulesHasBeenSet = true;
158 m_rules.emplace_back(std::forward<RulesT>(value));
159 return *this;
160 }
162
164
167 inline const Aws::String& GetWebACLArn() const { return m_webACLArn; }
168 inline bool WebACLArnHasBeenSet() const { return m_webACLArnHasBeenSet; }
169 template <typename WebACLArnT = Aws::String>
170 void SetWebACLArn(WebACLArnT&& value) {
171 m_webACLArnHasBeenSet = true;
172 m_webACLArn = std::forward<WebACLArnT>(value);
173 }
174 template <typename WebACLArnT = Aws::String>
175 WebACL& WithWebACLArn(WebACLArnT&& value) {
176 SetWebACLArn(std::forward<WebACLArnT>(value));
177 return *this;
178 }
180 private:
181 Aws::String m_webACLId;
182
183 Aws::String m_name;
184
185 Aws::String m_metricName;
186
187 WafAction m_defaultAction;
188
190
191 Aws::String m_webACLArn;
192 bool m_webACLIdHasBeenSet = false;
193 bool m_nameHasBeenSet = false;
194 bool m_metricNameHasBeenSet = false;
195 bool m_defaultActionHasBeenSet = false;
196 bool m_rulesHasBeenSet = false;
197 bool m_webACLArnHasBeenSet = false;
198};
199
200} // namespace Model
201} // namespace WAF
202} // namespace Aws
WebACL & WithMetricName(MetricNameT &&value)
Definition WebACL.h:111
const Aws::String & GetName() const
Definition WebACL.h:81
bool NameHasBeenSet() const
Definition WebACL.h:82
AWS_WAF_API WebACL & operator=(Aws::Utils::Json::JsonView jsonValue)
WebACL & WithDefaultAction(DefaultActionT &&value)
Definition WebACL.h:131
WebACL & WithName(NameT &&value)
Definition WebACL.h:89
bool WebACLIdHasBeenSet() const
Definition WebACL.h:63
const WafAction & GetDefaultAction() const
Definition WebACL.h:123
void SetMetricName(MetricNameT &&value)
Definition WebACL.h:106
const Aws::String & GetWebACLArn() const
Definition WebACL.h:167
WebACL & WithWebACLArn(WebACLArnT &&value)
Definition WebACL.h:175
WebACL & WithRules(RulesT &&value)
Definition WebACL.h:151
bool RulesHasBeenSet() const
Definition WebACL.h:144
AWS_WAF_API Aws::Utils::Json::JsonValue Jsonize() const
void SetDefaultAction(DefaultActionT &&value)
Definition WebACL.h:126
void SetWebACLArn(WebACLArnT &&value)
Definition WebACL.h:170
void SetName(NameT &&value)
Definition WebACL.h:84
bool WebACLArnHasBeenSet() const
Definition WebACL.h:168
bool DefaultActionHasBeenSet() const
Definition WebACL.h:124
const Aws::String & GetMetricName() const
Definition WebACL.h:103
bool MetricNameHasBeenSet() const
Definition WebACL.h:104
AWS_WAF_API WebACL()=default
void SetRules(RulesT &&value)
Definition WebACL.h:146
WebACL & AddRules(RulesT &&value)
Definition WebACL.h:156
const Aws::String & GetWebACLId() const
Definition WebACL.h:62
const Aws::Vector< ActivatedRule > & GetRules() const
Definition WebACL.h:143
void SetWebACLId(WebACLIdT &&value)
Definition WebACL.h:65
WebACL & WithWebACLId(WebACLIdT &&value)
Definition WebACL.h:70
AWS_WAF_API WebACL(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue