AWS SDK for C++

AWS SDK for C++ Version 1.11.931

Loading...
Searching...
No Matches
CreateRuleGroupRequest.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/WAFV2Request.h>
11#include <aws/wafv2/WAFV2_EXPORTS.h>
12#include <aws/wafv2/model/CustomResponseBody.h>
13#include <aws/wafv2/model/MonetizationConfig.h>
14#include <aws/wafv2/model/Rule.h>
15#include <aws/wafv2/model/Scope.h>
16#include <aws/wafv2/model/Tag.h>
17#include <aws/wafv2/model/VisibilityConfig.h>
18
19#include <utility>
20
21namespace Aws {
22namespace WAFV2 {
23namespace Model {
24
28 public:
29 AWS_WAFV2_API CreateRuleGroupRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateRuleGroup"; }
36
37 AWS_WAFV2_API Aws::String SerializePayload() const override;
38
40
42
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template <typename NameT = Aws::String>
49 void SetName(NameT&& value) {
50 m_nameHasBeenSet = true;
51 m_name = std::forward<NameT>(value);
52 }
53 template <typename NameT = Aws::String>
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
70 inline Scope GetScope() const { return m_scope; }
71 inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
72 inline void SetScope(Scope value) {
73 m_scopeHasBeenSet = true;
74 m_scope = value;
75 }
77 SetScope(value);
78 return *this;
79 }
81
83
98 inline long long GetCapacity() const { return m_capacity; }
99 inline bool CapacityHasBeenSet() const { return m_capacityHasBeenSet; }
100 inline void SetCapacity(long long value) {
101 m_capacityHasBeenSet = true;
102 m_capacity = value;
103 }
104 inline CreateRuleGroupRequest& WithCapacity(long long value) {
105 SetCapacity(value);
106 return *this;
107 }
109
111
114 inline const Aws::String& GetDescription() const { return m_description; }
115 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
116 template <typename DescriptionT = Aws::String>
117 void SetDescription(DescriptionT&& value) {
118 m_descriptionHasBeenSet = true;
119 m_description = std::forward<DescriptionT>(value);
120 }
121 template <typename DescriptionT = Aws::String>
123 SetDescription(std::forward<DescriptionT>(value));
124 return *this;
125 }
127
129
134 inline const Aws::Vector<Rule>& GetRules() const { return m_rules; }
135 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
136 template <typename RulesT = Aws::Vector<Rule>>
137 void SetRules(RulesT&& value) {
138 m_rulesHasBeenSet = true;
139 m_rules = std::forward<RulesT>(value);
140 }
141 template <typename RulesT = Aws::Vector<Rule>>
143 SetRules(std::forward<RulesT>(value));
144 return *this;
145 }
146 template <typename RulesT = Rule>
148 m_rulesHasBeenSet = true;
149 m_rules.emplace_back(std::forward<RulesT>(value));
150 return *this;
151 }
153
155
159 inline const VisibilityConfig& GetVisibilityConfig() const { return m_visibilityConfig; }
160 inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
161 template <typename VisibilityConfigT = VisibilityConfig>
162 void SetVisibilityConfig(VisibilityConfigT&& value) {
163 m_visibilityConfigHasBeenSet = true;
164 m_visibilityConfig = std::forward<VisibilityConfigT>(value);
165 }
166 template <typename VisibilityConfigT = VisibilityConfig>
167 CreateRuleGroupRequest& WithVisibilityConfig(VisibilityConfigT&& value) {
168 SetVisibilityConfig(std::forward<VisibilityConfigT>(value));
169 return *this;
170 }
172
174
177 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
178 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
179 template <typename TagsT = Aws::Vector<Tag>>
180 void SetTags(TagsT&& value) {
181 m_tagsHasBeenSet = true;
182 m_tags = std::forward<TagsT>(value);
183 }
184 template <typename TagsT = Aws::Vector<Tag>>
186 SetTags(std::forward<TagsT>(value));
187 return *this;
188 }
189 template <typename TagsT = Tag>
191 m_tagsHasBeenSet = true;
192 m_tags.emplace_back(std::forward<TagsT>(value));
193 return *this;
194 }
196
198
211 inline const Aws::Map<Aws::String, CustomResponseBody>& GetCustomResponseBodies() const { return m_customResponseBodies; }
212 inline bool CustomResponseBodiesHasBeenSet() const { return m_customResponseBodiesHasBeenSet; }
213 template <typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
214 void SetCustomResponseBodies(CustomResponseBodiesT&& value) {
215 m_customResponseBodiesHasBeenSet = true;
216 m_customResponseBodies = std::forward<CustomResponseBodiesT>(value);
217 }
218 template <typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
219 CreateRuleGroupRequest& WithCustomResponseBodies(CustomResponseBodiesT&& value) {
220 SetCustomResponseBodies(std::forward<CustomResponseBodiesT>(value));
221 return *this;
222 }
223 template <typename CustomResponseBodiesKeyT = Aws::String, typename CustomResponseBodiesValueT = CustomResponseBody>
224 CreateRuleGroupRequest& AddCustomResponseBodies(CustomResponseBodiesKeyT&& key, CustomResponseBodiesValueT&& value) {
225 m_customResponseBodiesHasBeenSet = true;
226 m_customResponseBodies.emplace(std::forward<CustomResponseBodiesKeyT>(key), std::forward<CustomResponseBodiesValueT>(value));
227 return *this;
228 }
230
232
236 inline const MonetizationConfig& GetMonetizationConfig() const { return m_monetizationConfig; }
237 inline bool MonetizationConfigHasBeenSet() const { return m_monetizationConfigHasBeenSet; }
238 template <typename MonetizationConfigT = MonetizationConfig>
239 void SetMonetizationConfig(MonetizationConfigT&& value) {
240 m_monetizationConfigHasBeenSet = true;
241 m_monetizationConfig = std::forward<MonetizationConfigT>(value);
242 }
243 template <typename MonetizationConfigT = MonetizationConfig>
244 CreateRuleGroupRequest& WithMonetizationConfig(MonetizationConfigT&& value) {
245 SetMonetizationConfig(std::forward<MonetizationConfigT>(value));
246 return *this;
247 }
249 private:
250 Aws::String m_name;
251
252 Scope m_scope{Scope::NOT_SET};
253
254 long long m_capacity{0};
255
256 Aws::String m_description;
257
258 Aws::Vector<Rule> m_rules;
259
260 VisibilityConfig m_visibilityConfig;
261
262 Aws::Vector<Tag> m_tags;
263
264 Aws::Map<Aws::String, CustomResponseBody> m_customResponseBodies;
265
266 MonetizationConfig m_monetizationConfig;
267 bool m_nameHasBeenSet = false;
268 bool m_scopeHasBeenSet = false;
269 bool m_capacityHasBeenSet = false;
270 bool m_descriptionHasBeenSet = false;
271 bool m_rulesHasBeenSet = false;
272 bool m_visibilityConfigHasBeenSet = false;
273 bool m_tagsHasBeenSet = false;
274 bool m_customResponseBodiesHasBeenSet = false;
275 bool m_monetizationConfigHasBeenSet = false;
276};
277
278} // namespace Model
279} // namespace WAFV2
280} // namespace Aws
CreateRuleGroupRequest & WithScope(Scope value)
AWS_WAFV2_API Aws::String SerializePayload() const override
CreateRuleGroupRequest & WithVisibilityConfig(VisibilityConfigT &&value)
void SetVisibilityConfig(VisibilityConfigT &&value)
const VisibilityConfig & GetVisibilityConfig() const
virtual const char * GetServiceRequestName() const override
CreateRuleGroupRequest & AddTags(TagsT &&value)
CreateRuleGroupRequest & WithCapacity(long long value)
CreateRuleGroupRequest & WithRules(RulesT &&value)
void SetMonetizationConfig(MonetizationConfigT &&value)
const Aws::Vector< Rule > & GetRules() const
CreateRuleGroupRequest & AddCustomResponseBodies(CustomResponseBodiesKeyT &&key, CustomResponseBodiesValueT &&value)
const Aws::Map< Aws::String, CustomResponseBody > & GetCustomResponseBodies() const
AWS_WAFV2_API CreateRuleGroupRequest()=default
CreateRuleGroupRequest & WithName(NameT &&value)
void SetCustomResponseBodies(CustomResponseBodiesT &&value)
CreateRuleGroupRequest & WithMonetizationConfig(MonetizationConfigT &&value)
CreateRuleGroupRequest & WithTags(TagsT &&value)
const MonetizationConfig & GetMonetizationConfig() const
AWS_WAFV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateRuleGroupRequest & AddRules(RulesT &&value)
CreateRuleGroupRequest & WithDescription(DescriptionT &&value)
CreateRuleGroupRequest & WithCustomResponseBodies(CustomResponseBodiesT &&value)
const Aws::Vector< Tag > & GetTags() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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