AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
RuleGroup.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/wafv2/model/VisibilityConfig.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/wafv2/model/Rule.h>
13#include <aws/wafv2/model/CustomResponseBody.h>
14#include <aws/wafv2/model/LabelSummary.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Json
22{
23 class JsonValue;
24 class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace WAFV2
28{
29namespace Model
30{
31
42 {
43 public:
44 AWS_WAFV2_API RuleGroup() = default;
47 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
48
49
51
55 inline const Aws::String& GetName() const { return m_name; }
56 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
57 template<typename NameT = Aws::String>
58 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
59 template<typename NameT = Aws::String>
60 RuleGroup& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
62
64
69 inline const Aws::String& GetId() const { return m_id; }
70 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
71 template<typename IdT = Aws::String>
72 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
73 template<typename IdT = Aws::String>
74 RuleGroup& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
76
78
93 inline long long GetCapacity() const { return m_capacity; }
94 inline bool CapacityHasBeenSet() const { return m_capacityHasBeenSet; }
95 inline void SetCapacity(long long value) { m_capacityHasBeenSet = true; m_capacity = value; }
96 inline RuleGroup& WithCapacity(long long value) { SetCapacity(value); return *this;}
98
100
103 inline const Aws::String& GetARN() const { return m_aRN; }
104 inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; }
105 template<typename ARNT = Aws::String>
106 void SetARN(ARNT&& value) { m_aRNHasBeenSet = true; m_aRN = std::forward<ARNT>(value); }
107 template<typename ARNT = Aws::String>
108 RuleGroup& WithARN(ARNT&& value) { SetARN(std::forward<ARNT>(value)); return *this;}
110
112
115 inline const Aws::String& GetDescription() const { return m_description; }
116 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
117 template<typename DescriptionT = Aws::String>
118 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
119 template<typename DescriptionT = Aws::String>
120 RuleGroup& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
122
124
129 inline const Aws::Vector<Rule>& GetRules() const { return m_rules; }
130 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
131 template<typename RulesT = Aws::Vector<Rule>>
132 void SetRules(RulesT&& value) { m_rulesHasBeenSet = true; m_rules = std::forward<RulesT>(value); }
133 template<typename RulesT = Aws::Vector<Rule>>
134 RuleGroup& WithRules(RulesT&& value) { SetRules(std::forward<RulesT>(value)); return *this;}
135 template<typename RulesT = Rule>
136 RuleGroup& AddRules(RulesT&& value) { m_rulesHasBeenSet = true; m_rules.emplace_back(std::forward<RulesT>(value)); return *this; }
138
140
144 inline const VisibilityConfig& GetVisibilityConfig() const { return m_visibilityConfig; }
145 inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
146 template<typename VisibilityConfigT = VisibilityConfig>
147 void SetVisibilityConfig(VisibilityConfigT&& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = std::forward<VisibilityConfigT>(value); }
148 template<typename VisibilityConfigT = VisibilityConfig>
149 RuleGroup& WithVisibilityConfig(VisibilityConfigT&& value) { SetVisibilityConfig(std::forward<VisibilityConfigT>(value)); return *this;}
151
153
164 inline const Aws::String& GetLabelNamespace() const { return m_labelNamespace; }
165 inline bool LabelNamespaceHasBeenSet() const { return m_labelNamespaceHasBeenSet; }
166 template<typename LabelNamespaceT = Aws::String>
167 void SetLabelNamespace(LabelNamespaceT&& value) { m_labelNamespaceHasBeenSet = true; m_labelNamespace = std::forward<LabelNamespaceT>(value); }
168 template<typename LabelNamespaceT = Aws::String>
169 RuleGroup& WithLabelNamespace(LabelNamespaceT&& value) { SetLabelNamespace(std::forward<LabelNamespaceT>(value)); return *this;}
171
173
186 inline const Aws::Map<Aws::String, CustomResponseBody>& GetCustomResponseBodies() const { return m_customResponseBodies; }
187 inline bool CustomResponseBodiesHasBeenSet() const { return m_customResponseBodiesHasBeenSet; }
188 template<typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
189 void SetCustomResponseBodies(CustomResponseBodiesT&& value) { m_customResponseBodiesHasBeenSet = true; m_customResponseBodies = std::forward<CustomResponseBodiesT>(value); }
190 template<typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
191 RuleGroup& WithCustomResponseBodies(CustomResponseBodiesT&& value) { SetCustomResponseBodies(std::forward<CustomResponseBodiesT>(value)); return *this;}
192 template<typename CustomResponseBodiesKeyT = Aws::String, typename CustomResponseBodiesValueT = CustomResponseBody>
194 m_customResponseBodiesHasBeenSet = true; m_customResponseBodies.emplace(std::forward<CustomResponseBodiesKeyT>(key), std::forward<CustomResponseBodiesValueT>(value)); return *this;
195 }
197
199
204 inline const Aws::Vector<LabelSummary>& GetAvailableLabels() const { return m_availableLabels; }
205 inline bool AvailableLabelsHasBeenSet() const { return m_availableLabelsHasBeenSet; }
206 template<typename AvailableLabelsT = Aws::Vector<LabelSummary>>
207 void SetAvailableLabels(AvailableLabelsT&& value) { m_availableLabelsHasBeenSet = true; m_availableLabels = std::forward<AvailableLabelsT>(value); }
208 template<typename AvailableLabelsT = Aws::Vector<LabelSummary>>
209 RuleGroup& WithAvailableLabels(AvailableLabelsT&& value) { SetAvailableLabels(std::forward<AvailableLabelsT>(value)); return *this;}
210 template<typename AvailableLabelsT = LabelSummary>
211 RuleGroup& AddAvailableLabels(AvailableLabelsT&& value) { m_availableLabelsHasBeenSet = true; m_availableLabels.emplace_back(std::forward<AvailableLabelsT>(value)); return *this; }
213
215
220 inline const Aws::Vector<LabelSummary>& GetConsumedLabels() const { return m_consumedLabels; }
221 inline bool ConsumedLabelsHasBeenSet() const { return m_consumedLabelsHasBeenSet; }
222 template<typename ConsumedLabelsT = Aws::Vector<LabelSummary>>
223 void SetConsumedLabels(ConsumedLabelsT&& value) { m_consumedLabelsHasBeenSet = true; m_consumedLabels = std::forward<ConsumedLabelsT>(value); }
224 template<typename ConsumedLabelsT = Aws::Vector<LabelSummary>>
225 RuleGroup& WithConsumedLabels(ConsumedLabelsT&& value) { SetConsumedLabels(std::forward<ConsumedLabelsT>(value)); return *this;}
226 template<typename ConsumedLabelsT = LabelSummary>
227 RuleGroup& AddConsumedLabels(ConsumedLabelsT&& value) { m_consumedLabelsHasBeenSet = true; m_consumedLabels.emplace_back(std::forward<ConsumedLabelsT>(value)); return *this; }
229 private:
230
231 Aws::String m_name;
232 bool m_nameHasBeenSet = false;
233
234 Aws::String m_id;
235 bool m_idHasBeenSet = false;
236
237 long long m_capacity{0};
238 bool m_capacityHasBeenSet = false;
239
240 Aws::String m_aRN;
241 bool m_aRNHasBeenSet = false;
242
243 Aws::String m_description;
244 bool m_descriptionHasBeenSet = false;
245
246 Aws::Vector<Rule> m_rules;
247 bool m_rulesHasBeenSet = false;
248
249 VisibilityConfig m_visibilityConfig;
250 bool m_visibilityConfigHasBeenSet = false;
251
252 Aws::String m_labelNamespace;
253 bool m_labelNamespaceHasBeenSet = false;
254
255 Aws::Map<Aws::String, CustomResponseBody> m_customResponseBodies;
256 bool m_customResponseBodiesHasBeenSet = false;
257
258 Aws::Vector<LabelSummary> m_availableLabels;
259 bool m_availableLabelsHasBeenSet = false;
260
261 Aws::Vector<LabelSummary> m_consumedLabels;
262 bool m_consumedLabelsHasBeenSet = false;
263 };
264
265} // namespace Model
266} // namespace WAFV2
267} // namespace Aws
void SetRules(RulesT &&value)
Definition RuleGroup.h:132
RuleGroup & WithAvailableLabels(AvailableLabelsT &&value)
Definition RuleGroup.h:209
void SetDescription(DescriptionT &&value)
Definition RuleGroup.h:118
void SetId(IdT &&value)
Definition RuleGroup.h:72
RuleGroup & WithDescription(DescriptionT &&value)
Definition RuleGroup.h:120
RuleGroup & WithVisibilityConfig(VisibilityConfigT &&value)
Definition RuleGroup.h:149
RuleGroup & WithRules(RulesT &&value)
Definition RuleGroup.h:134
void SetAvailableLabels(AvailableLabelsT &&value)
Definition RuleGroup.h:207
AWS_WAFV2_API RuleGroup(Aws::Utils::Json::JsonView jsonValue)
RuleGroup & AddCustomResponseBodies(CustomResponseBodiesKeyT &&key, CustomResponseBodiesValueT &&value)
Definition RuleGroup.h:193
const Aws::String & GetARN() const
Definition RuleGroup.h:103
AWS_WAFV2_API RuleGroup()=default
const Aws::String & GetName() const
Definition RuleGroup.h:55
const VisibilityConfig & GetVisibilityConfig() const
Definition RuleGroup.h:144
void SetConsumedLabels(ConsumedLabelsT &&value)
Definition RuleGroup.h:223
RuleGroup & AddRules(RulesT &&value)
Definition RuleGroup.h:136
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
RuleGroup & AddAvailableLabels(AvailableLabelsT &&value)
Definition RuleGroup.h:211
const Aws::Vector< Rule > & GetRules() const
Definition RuleGroup.h:129
const Aws::String & GetId() const
Definition RuleGroup.h:69
RuleGroup & WithLabelNamespace(LabelNamespaceT &&value)
Definition RuleGroup.h:169
const Aws::Map< Aws::String, CustomResponseBody > & GetCustomResponseBodies() const
Definition RuleGroup.h:186
const Aws::Vector< LabelSummary > & GetConsumedLabels() const
Definition RuleGroup.h:220
bool LabelNamespaceHasBeenSet() const
Definition RuleGroup.h:165
bool DescriptionHasBeenSet() const
Definition RuleGroup.h:116
long long GetCapacity() const
Definition RuleGroup.h:93
const Aws::String & GetDescription() const
Definition RuleGroup.h:115
RuleGroup & WithCapacity(long long value)
Definition RuleGroup.h:96
AWS_WAFV2_API RuleGroup & operator=(Aws::Utils::Json::JsonView jsonValue)
RuleGroup & WithConsumedLabels(ConsumedLabelsT &&value)
Definition RuleGroup.h:225
bool CapacityHasBeenSet() const
Definition RuleGroup.h:94
void SetName(NameT &&value)
Definition RuleGroup.h:58
bool CustomResponseBodiesHasBeenSet() const
Definition RuleGroup.h:187
const Aws::String & GetLabelNamespace() const
Definition RuleGroup.h:164
void SetCapacity(long long value)
Definition RuleGroup.h:95
const Aws::Vector< LabelSummary > & GetAvailableLabels() const
Definition RuleGroup.h:204
RuleGroup & WithId(IdT &&value)
Definition RuleGroup.h:74
void SetARN(ARNT &&value)
Definition RuleGroup.h:106
void SetCustomResponseBodies(CustomResponseBodiesT &&value)
Definition RuleGroup.h:189
RuleGroup & AddConsumedLabels(ConsumedLabelsT &&value)
Definition RuleGroup.h:227
bool AvailableLabelsHasBeenSet() const
Definition RuleGroup.h:205
RuleGroup & WithCustomResponseBodies(CustomResponseBodiesT &&value)
Definition RuleGroup.h:191
void SetLabelNamespace(LabelNamespaceT &&value)
Definition RuleGroup.h:167
bool ConsumedLabelsHasBeenSet() const
Definition RuleGroup.h:221
RuleGroup & WithARN(ARNT &&value)
Definition RuleGroup.h:108
bool VisibilityConfigHasBeenSet() const
Definition RuleGroup.h:145
void SetVisibilityConfig(VisibilityConfigT &&value)
Definition RuleGroup.h:147
RuleGroup & WithName(NameT &&value)
Definition RuleGroup.h:60
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
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