AWS SDK for C++

AWS SDK for C++ Version 1.11.931

Loading...
Searching...
No Matches
RuleGroup.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/wafv2/WAFV2_EXPORTS.h>
11#include <aws/wafv2/model/CustomResponseBody.h>
12#include <aws/wafv2/model/LabelSummary.h>
13#include <aws/wafv2/model/MonetizationConfig.h>
14#include <aws/wafv2/model/Rule.h>
15#include <aws/wafv2/model/VisibilityConfig.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace WAFV2 {
27namespace Model {
28
38class RuleGroup {
39 public:
40 AWS_WAFV2_API RuleGroup() = default;
41 AWS_WAFV2_API RuleGroup(Aws::Utils::Json::JsonView jsonValue);
43 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
44
46
50 inline const Aws::String& GetName() const { return m_name; }
51 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
52 template <typename NameT = Aws::String>
53 void SetName(NameT&& value) {
54 m_nameHasBeenSet = true;
55 m_name = std::forward<NameT>(value);
56 }
57 template <typename NameT = Aws::String>
58 RuleGroup& WithName(NameT&& value) {
59 SetName(std::forward<NameT>(value));
60 return *this;
61 }
63
65
70 inline const Aws::String& GetId() const { return m_id; }
71 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
72 template <typename IdT = Aws::String>
73 void SetId(IdT&& value) {
74 m_idHasBeenSet = true;
75 m_id = std::forward<IdT>(value);
76 }
77 template <typename IdT = Aws::String>
78 RuleGroup& WithId(IdT&& value) {
79 SetId(std::forward<IdT>(value));
80 return *this;
81 }
83
85
100 inline long long GetCapacity() const { return m_capacity; }
101 inline bool CapacityHasBeenSet() const { return m_capacityHasBeenSet; }
102 inline void SetCapacity(long long value) {
103 m_capacityHasBeenSet = true;
104 m_capacity = value;
105 }
106 inline RuleGroup& WithCapacity(long long value) {
107 SetCapacity(value);
108 return *this;
109 }
111
113
116 inline const Aws::String& GetARN() const { return m_aRN; }
117 inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; }
118 template <typename ARNT = Aws::String>
119 void SetARN(ARNT&& value) {
120 m_aRNHasBeenSet = true;
121 m_aRN = std::forward<ARNT>(value);
122 }
123 template <typename ARNT = Aws::String>
124 RuleGroup& WithARN(ARNT&& value) {
125 SetARN(std::forward<ARNT>(value));
126 return *this;
127 }
129
131
134 inline const Aws::String& GetDescription() const { return m_description; }
135 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
136 template <typename DescriptionT = Aws::String>
137 void SetDescription(DescriptionT&& value) {
138 m_descriptionHasBeenSet = true;
139 m_description = std::forward<DescriptionT>(value);
140 }
141 template <typename DescriptionT = Aws::String>
142 RuleGroup& WithDescription(DescriptionT&& value) {
143 SetDescription(std::forward<DescriptionT>(value));
144 return *this;
145 }
147
149
154 inline const Aws::Vector<Rule>& GetRules() const { return m_rules; }
155 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
156 template <typename RulesT = Aws::Vector<Rule>>
157 void SetRules(RulesT&& value) {
158 m_rulesHasBeenSet = true;
159 m_rules = std::forward<RulesT>(value);
160 }
161 template <typename RulesT = Aws::Vector<Rule>>
162 RuleGroup& WithRules(RulesT&& value) {
163 SetRules(std::forward<RulesT>(value));
164 return *this;
165 }
166 template <typename RulesT = Rule>
167 RuleGroup& AddRules(RulesT&& value) {
168 m_rulesHasBeenSet = true;
169 m_rules.emplace_back(std::forward<RulesT>(value));
170 return *this;
171 }
173
175
179 inline const VisibilityConfig& GetVisibilityConfig() const { return m_visibilityConfig; }
180 inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
181 template <typename VisibilityConfigT = VisibilityConfig>
182 void SetVisibilityConfig(VisibilityConfigT&& value) {
183 m_visibilityConfigHasBeenSet = true;
184 m_visibilityConfig = std::forward<VisibilityConfigT>(value);
185 }
186 template <typename VisibilityConfigT = VisibilityConfig>
187 RuleGroup& WithVisibilityConfig(VisibilityConfigT&& value) {
188 SetVisibilityConfig(std::forward<VisibilityConfigT>(value));
189 return *this;
190 }
192
194
205 inline const Aws::String& GetLabelNamespace() const { return m_labelNamespace; }
206 inline bool LabelNamespaceHasBeenSet() const { return m_labelNamespaceHasBeenSet; }
207 template <typename LabelNamespaceT = Aws::String>
208 void SetLabelNamespace(LabelNamespaceT&& value) {
209 m_labelNamespaceHasBeenSet = true;
210 m_labelNamespace = std::forward<LabelNamespaceT>(value);
211 }
212 template <typename LabelNamespaceT = Aws::String>
213 RuleGroup& WithLabelNamespace(LabelNamespaceT&& value) {
214 SetLabelNamespace(std::forward<LabelNamespaceT>(value));
215 return *this;
216 }
218
220
233 inline const Aws::Map<Aws::String, CustomResponseBody>& GetCustomResponseBodies() const { return m_customResponseBodies; }
234 inline bool CustomResponseBodiesHasBeenSet() const { return m_customResponseBodiesHasBeenSet; }
235 template <typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
236 void SetCustomResponseBodies(CustomResponseBodiesT&& value) {
237 m_customResponseBodiesHasBeenSet = true;
238 m_customResponseBodies = std::forward<CustomResponseBodiesT>(value);
239 }
240 template <typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
241 RuleGroup& WithCustomResponseBodies(CustomResponseBodiesT&& value) {
242 SetCustomResponseBodies(std::forward<CustomResponseBodiesT>(value));
243 return *this;
244 }
245 template <typename CustomResponseBodiesKeyT = Aws::String, typename CustomResponseBodiesValueT = CustomResponseBody>
246 RuleGroup& AddCustomResponseBodies(CustomResponseBodiesKeyT&& key, CustomResponseBodiesValueT&& value) {
247 m_customResponseBodiesHasBeenSet = true;
248 m_customResponseBodies.emplace(std::forward<CustomResponseBodiesKeyT>(key), std::forward<CustomResponseBodiesValueT>(value));
249 return *this;
250 }
252
254
259 inline const Aws::Vector<LabelSummary>& GetAvailableLabels() const { return m_availableLabels; }
260 inline bool AvailableLabelsHasBeenSet() const { return m_availableLabelsHasBeenSet; }
261 template <typename AvailableLabelsT = Aws::Vector<LabelSummary>>
262 void SetAvailableLabels(AvailableLabelsT&& value) {
263 m_availableLabelsHasBeenSet = true;
264 m_availableLabels = std::forward<AvailableLabelsT>(value);
265 }
266 template <typename AvailableLabelsT = Aws::Vector<LabelSummary>>
267 RuleGroup& WithAvailableLabels(AvailableLabelsT&& value) {
268 SetAvailableLabels(std::forward<AvailableLabelsT>(value));
269 return *this;
270 }
271 template <typename AvailableLabelsT = LabelSummary>
272 RuleGroup& AddAvailableLabels(AvailableLabelsT&& value) {
273 m_availableLabelsHasBeenSet = true;
274 m_availableLabels.emplace_back(std::forward<AvailableLabelsT>(value));
275 return *this;
276 }
278
280
285 inline const Aws::Vector<LabelSummary>& GetConsumedLabels() const { return m_consumedLabels; }
286 inline bool ConsumedLabelsHasBeenSet() const { return m_consumedLabelsHasBeenSet; }
287 template <typename ConsumedLabelsT = Aws::Vector<LabelSummary>>
288 void SetConsumedLabels(ConsumedLabelsT&& value) {
289 m_consumedLabelsHasBeenSet = true;
290 m_consumedLabels = std::forward<ConsumedLabelsT>(value);
291 }
292 template <typename ConsumedLabelsT = Aws::Vector<LabelSummary>>
293 RuleGroup& WithConsumedLabels(ConsumedLabelsT&& value) {
294 SetConsumedLabels(std::forward<ConsumedLabelsT>(value));
295 return *this;
296 }
297 template <typename ConsumedLabelsT = LabelSummary>
298 RuleGroup& AddConsumedLabels(ConsumedLabelsT&& value) {
299 m_consumedLabelsHasBeenSet = true;
300 m_consumedLabels.emplace_back(std::forward<ConsumedLabelsT>(value));
301 return *this;
302 }
304
306
313 inline const MonetizationConfig& GetMonetizationConfig() const { return m_monetizationConfig; }
314 inline bool MonetizationConfigHasBeenSet() const { return m_monetizationConfigHasBeenSet; }
315 template <typename MonetizationConfigT = MonetizationConfig>
316 void SetMonetizationConfig(MonetizationConfigT&& value) {
317 m_monetizationConfigHasBeenSet = true;
318 m_monetizationConfig = std::forward<MonetizationConfigT>(value);
319 }
320 template <typename MonetizationConfigT = MonetizationConfig>
321 RuleGroup& WithMonetizationConfig(MonetizationConfigT&& value) {
322 SetMonetizationConfig(std::forward<MonetizationConfigT>(value));
323 return *this;
324 }
326 private:
327 Aws::String m_name;
328
329 Aws::String m_id;
330
331 long long m_capacity{0};
332
333 Aws::String m_aRN;
334
335 Aws::String m_description;
336
337 Aws::Vector<Rule> m_rules;
338
339 VisibilityConfig m_visibilityConfig;
340
341 Aws::String m_labelNamespace;
342
343 Aws::Map<Aws::String, CustomResponseBody> m_customResponseBodies;
344
345 Aws::Vector<LabelSummary> m_availableLabels;
346
347 Aws::Vector<LabelSummary> m_consumedLabels;
348
349 MonetizationConfig m_monetizationConfig;
350 bool m_nameHasBeenSet = false;
351 bool m_idHasBeenSet = false;
352 bool m_capacityHasBeenSet = false;
353 bool m_aRNHasBeenSet = false;
354 bool m_descriptionHasBeenSet = false;
355 bool m_rulesHasBeenSet = false;
356 bool m_visibilityConfigHasBeenSet = false;
357 bool m_labelNamespaceHasBeenSet = false;
358 bool m_customResponseBodiesHasBeenSet = false;
359 bool m_availableLabelsHasBeenSet = false;
360 bool m_consumedLabelsHasBeenSet = false;
361 bool m_monetizationConfigHasBeenSet = false;
362};
363
364} // namespace Model
365} // namespace WAFV2
366} // namespace Aws
RuleGroup & WithMonetizationConfig(MonetizationConfigT &&value)
Definition RuleGroup.h:321
void SetMonetizationConfig(MonetizationConfigT &&value)
Definition RuleGroup.h:316
void SetRules(RulesT &&value)
Definition RuleGroup.h:157
RuleGroup & WithAvailableLabels(AvailableLabelsT &&value)
Definition RuleGroup.h:267
void SetDescription(DescriptionT &&value)
Definition RuleGroup.h:137
void SetId(IdT &&value)
Definition RuleGroup.h:73
RuleGroup & WithDescription(DescriptionT &&value)
Definition RuleGroup.h:142
RuleGroup & WithVisibilityConfig(VisibilityConfigT &&value)
Definition RuleGroup.h:187
RuleGroup & WithRules(RulesT &&value)
Definition RuleGroup.h:162
void SetAvailableLabels(AvailableLabelsT &&value)
Definition RuleGroup.h:262
AWS_WAFV2_API RuleGroup(Aws::Utils::Json::JsonView jsonValue)
RuleGroup & AddCustomResponseBodies(CustomResponseBodiesKeyT &&key, CustomResponseBodiesValueT &&value)
Definition RuleGroup.h:246
const Aws::String & GetARN() const
Definition RuleGroup.h:116
AWS_WAFV2_API RuleGroup()=default
const Aws::String & GetName() const
Definition RuleGroup.h:50
bool MonetizationConfigHasBeenSet() const
Definition RuleGroup.h:314
const VisibilityConfig & GetVisibilityConfig() const
Definition RuleGroup.h:179
void SetConsumedLabels(ConsumedLabelsT &&value)
Definition RuleGroup.h:288
RuleGroup & AddRules(RulesT &&value)
Definition RuleGroup.h:167
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
RuleGroup & AddAvailableLabels(AvailableLabelsT &&value)
Definition RuleGroup.h:272
const Aws::Vector< Rule > & GetRules() const
Definition RuleGroup.h:154
const Aws::String & GetId() const
Definition RuleGroup.h:70
RuleGroup & WithLabelNamespace(LabelNamespaceT &&value)
Definition RuleGroup.h:213
const Aws::Map< Aws::String, CustomResponseBody > & GetCustomResponseBodies() const
Definition RuleGroup.h:233
const Aws::Vector< LabelSummary > & GetConsumedLabels() const
Definition RuleGroup.h:285
bool LabelNamespaceHasBeenSet() const
Definition RuleGroup.h:206
bool DescriptionHasBeenSet() const
Definition RuleGroup.h:135
long long GetCapacity() const
Definition RuleGroup.h:100
const MonetizationConfig & GetMonetizationConfig() const
Definition RuleGroup.h:313
const Aws::String & GetDescription() const
Definition RuleGroup.h:134
RuleGroup & WithCapacity(long long value)
Definition RuleGroup.h:106
AWS_WAFV2_API RuleGroup & operator=(Aws::Utils::Json::JsonView jsonValue)
RuleGroup & WithConsumedLabels(ConsumedLabelsT &&value)
Definition RuleGroup.h:293
bool CapacityHasBeenSet() const
Definition RuleGroup.h:101
void SetName(NameT &&value)
Definition RuleGroup.h:53
bool CustomResponseBodiesHasBeenSet() const
Definition RuleGroup.h:234
const Aws::String & GetLabelNamespace() const
Definition RuleGroup.h:205
void SetCapacity(long long value)
Definition RuleGroup.h:102
const Aws::Vector< LabelSummary > & GetAvailableLabels() const
Definition RuleGroup.h:259
RuleGroup & WithId(IdT &&value)
Definition RuleGroup.h:78
void SetARN(ARNT &&value)
Definition RuleGroup.h:119
void SetCustomResponseBodies(CustomResponseBodiesT &&value)
Definition RuleGroup.h:236
RuleGroup & AddConsumedLabels(ConsumedLabelsT &&value)
Definition RuleGroup.h:298
bool AvailableLabelsHasBeenSet() const
Definition RuleGroup.h:260
RuleGroup & WithCustomResponseBodies(CustomResponseBodiesT &&value)
Definition RuleGroup.h:241
void SetLabelNamespace(LabelNamespaceT &&value)
Definition RuleGroup.h:208
bool ConsumedLabelsHasBeenSet() const
Definition RuleGroup.h:286
RuleGroup & WithARN(ARNT &&value)
Definition RuleGroup.h:124
bool VisibilityConfigHasBeenSet() const
Definition RuleGroup.h:180
void SetVisibilityConfig(VisibilityConfigT &&value)
Definition RuleGroup.h:182
RuleGroup & WithName(NameT &&value)
Definition RuleGroup.h:58
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue