AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
CreateWebACLRequest.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/wafv2/WAFV2Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/wafv2/model/Scope.h>
11#include <aws/wafv2/model/DefaultAction.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/wafv2/model/VisibilityConfig.h>
14#include <aws/wafv2/model/DataProtectionConfig.h>
15#include <aws/core/utils/memory/stl/AWSMap.h>
16#include <aws/wafv2/model/CaptchaConfig.h>
17#include <aws/wafv2/model/ChallengeConfig.h>
18#include <aws/wafv2/model/AssociationConfig.h>
19#include <aws/wafv2/model/OnSourceDDoSProtectionConfig.h>
20#include <aws/wafv2/model/ApplicationConfig.h>
21#include <aws/wafv2/model/Rule.h>
22#include <aws/wafv2/model/Tag.h>
23#include <aws/wafv2/model/CustomResponseBody.h>
24#include <utility>
25
26namespace Aws
27{
28namespace WAFV2
29{
30namespace Model
31{
32
36 {
37 public:
38 AWS_WAFV2_API CreateWebACLRequest() = default;
39
40 // Service request name is the Operation name which will send this request out,
41 // each operation should has unique request name, so that we can get operation's name from this request.
42 // Note: this is not true for response, multiple operations may have the same response name,
43 // so we can not get operation's name from response.
44 inline virtual const char* GetServiceRequestName() const override { return "CreateWebACL"; }
45
46 AWS_WAFV2_API Aws::String SerializePayload() const override;
47
49
50
52
56 inline const Aws::String& GetName() const { return m_name; }
57 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
58 template<typename NameT = Aws::String>
59 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
60 template<typename NameT = Aws::String>
61 CreateWebACLRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
63
65
74 inline Scope GetScope() const { return m_scope; }
75 inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
76 inline void SetScope(Scope value) { m_scopeHasBeenSet = true; m_scope = value; }
77 inline CreateWebACLRequest& WithScope(Scope value) { SetScope(value); return *this;}
79
81
85 inline const DefaultAction& GetDefaultAction() const { return m_defaultAction; }
86 inline bool DefaultActionHasBeenSet() const { return m_defaultActionHasBeenSet; }
87 template<typename DefaultActionT = DefaultAction>
88 void SetDefaultAction(DefaultActionT&& value) { m_defaultActionHasBeenSet = true; m_defaultAction = std::forward<DefaultActionT>(value); }
89 template<typename DefaultActionT = DefaultAction>
90 CreateWebACLRequest& WithDefaultAction(DefaultActionT&& value) { SetDefaultAction(std::forward<DefaultActionT>(value)); return *this;}
92
94
97 inline const Aws::String& GetDescription() const { return m_description; }
98 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
99 template<typename DescriptionT = Aws::String>
100 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
101 template<typename DescriptionT = Aws::String>
102 CreateWebACLRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
104
106
111 inline const Aws::Vector<Rule>& GetRules() const { return m_rules; }
112 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
113 template<typename RulesT = Aws::Vector<Rule>>
114 void SetRules(RulesT&& value) { m_rulesHasBeenSet = true; m_rules = std::forward<RulesT>(value); }
115 template<typename RulesT = Aws::Vector<Rule>>
116 CreateWebACLRequest& WithRules(RulesT&& value) { SetRules(std::forward<RulesT>(value)); return *this;}
117 template<typename RulesT = Rule>
118 CreateWebACLRequest& AddRules(RulesT&& value) { m_rulesHasBeenSet = true; m_rules.emplace_back(std::forward<RulesT>(value)); return *this; }
120
122
126 inline const VisibilityConfig& GetVisibilityConfig() const { return m_visibilityConfig; }
127 inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
128 template<typename VisibilityConfigT = VisibilityConfig>
129 void SetVisibilityConfig(VisibilityConfigT&& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = std::forward<VisibilityConfigT>(value); }
130 template<typename VisibilityConfigT = VisibilityConfig>
131 CreateWebACLRequest& WithVisibilityConfig(VisibilityConfigT&& value) { SetVisibilityConfig(std::forward<VisibilityConfigT>(value)); return *this;}
133
135
144 inline const DataProtectionConfig& GetDataProtectionConfig() const { return m_dataProtectionConfig; }
145 inline bool DataProtectionConfigHasBeenSet() const { return m_dataProtectionConfigHasBeenSet; }
146 template<typename DataProtectionConfigT = DataProtectionConfig>
147 void SetDataProtectionConfig(DataProtectionConfigT&& value) { m_dataProtectionConfigHasBeenSet = true; m_dataProtectionConfig = std::forward<DataProtectionConfigT>(value); }
148 template<typename DataProtectionConfigT = DataProtectionConfig>
149 CreateWebACLRequest& WithDataProtectionConfig(DataProtectionConfigT&& value) { SetDataProtectionConfig(std::forward<DataProtectionConfigT>(value)); return *this;}
151
153
156 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
157 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
158 template<typename TagsT = Aws::Vector<Tag>>
159 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
160 template<typename TagsT = Aws::Vector<Tag>>
161 CreateWebACLRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
162 template<typename TagsT = Tag>
163 CreateWebACLRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
165
167
180 inline const Aws::Map<Aws::String, CustomResponseBody>& GetCustomResponseBodies() const { return m_customResponseBodies; }
181 inline bool CustomResponseBodiesHasBeenSet() const { return m_customResponseBodiesHasBeenSet; }
182 template<typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
183 void SetCustomResponseBodies(CustomResponseBodiesT&& value) { m_customResponseBodiesHasBeenSet = true; m_customResponseBodies = std::forward<CustomResponseBodiesT>(value); }
184 template<typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
185 CreateWebACLRequest& WithCustomResponseBodies(CustomResponseBodiesT&& value) { SetCustomResponseBodies(std::forward<CustomResponseBodiesT>(value)); return *this;}
186 template<typename CustomResponseBodiesKeyT = Aws::String, typename CustomResponseBodiesValueT = CustomResponseBody>
187 CreateWebACLRequest& AddCustomResponseBodies(CustomResponseBodiesKeyT&& key, CustomResponseBodiesValueT&& value) {
188 m_customResponseBodiesHasBeenSet = true; m_customResponseBodies.emplace(std::forward<CustomResponseBodiesKeyT>(key), std::forward<CustomResponseBodiesValueT>(value)); return *this;
189 }
191
193
198 inline const CaptchaConfig& GetCaptchaConfig() const { return m_captchaConfig; }
199 inline bool CaptchaConfigHasBeenSet() const { return m_captchaConfigHasBeenSet; }
200 template<typename CaptchaConfigT = CaptchaConfig>
201 void SetCaptchaConfig(CaptchaConfigT&& value) { m_captchaConfigHasBeenSet = true; m_captchaConfig = std::forward<CaptchaConfigT>(value); }
202 template<typename CaptchaConfigT = CaptchaConfig>
203 CreateWebACLRequest& WithCaptchaConfig(CaptchaConfigT&& value) { SetCaptchaConfig(std::forward<CaptchaConfigT>(value)); return *this;}
205
207
212 inline const ChallengeConfig& GetChallengeConfig() const { return m_challengeConfig; }
213 inline bool ChallengeConfigHasBeenSet() const { return m_challengeConfigHasBeenSet; }
214 template<typename ChallengeConfigT = ChallengeConfig>
215 void SetChallengeConfig(ChallengeConfigT&& value) { m_challengeConfigHasBeenSet = true; m_challengeConfig = std::forward<ChallengeConfigT>(value); }
216 template<typename ChallengeConfigT = ChallengeConfig>
217 CreateWebACLRequest& WithChallengeConfig(ChallengeConfigT&& value) { SetChallengeConfig(std::forward<ChallengeConfigT>(value)); return *this;}
219
221
233 inline const Aws::Vector<Aws::String>& GetTokenDomains() const { return m_tokenDomains; }
234 inline bool TokenDomainsHasBeenSet() const { return m_tokenDomainsHasBeenSet; }
235 template<typename TokenDomainsT = Aws::Vector<Aws::String>>
236 void SetTokenDomains(TokenDomainsT&& value) { m_tokenDomainsHasBeenSet = true; m_tokenDomains = std::forward<TokenDomainsT>(value); }
237 template<typename TokenDomainsT = Aws::Vector<Aws::String>>
238 CreateWebACLRequest& WithTokenDomains(TokenDomainsT&& value) { SetTokenDomains(std::forward<TokenDomainsT>(value)); return *this;}
239 template<typename TokenDomainsT = Aws::String>
240 CreateWebACLRequest& AddTokenDomains(TokenDomainsT&& value) { m_tokenDomainsHasBeenSet = true; m_tokenDomains.emplace_back(std::forward<TokenDomainsT>(value)); return *this; }
242
244
256 inline const AssociationConfig& GetAssociationConfig() const { return m_associationConfig; }
257 inline bool AssociationConfigHasBeenSet() const { return m_associationConfigHasBeenSet; }
258 template<typename AssociationConfigT = AssociationConfig>
259 void SetAssociationConfig(AssociationConfigT&& value) { m_associationConfigHasBeenSet = true; m_associationConfig = std::forward<AssociationConfigT>(value); }
260 template<typename AssociationConfigT = AssociationConfig>
261 CreateWebACLRequest& WithAssociationConfig(AssociationConfigT&& value) { SetAssociationConfig(std::forward<AssociationConfigT>(value)); return *this;}
263
265
272 inline const OnSourceDDoSProtectionConfig& GetOnSourceDDoSProtectionConfig() const { return m_onSourceDDoSProtectionConfig; }
273 inline bool OnSourceDDoSProtectionConfigHasBeenSet() const { return m_onSourceDDoSProtectionConfigHasBeenSet; }
274 template<typename OnSourceDDoSProtectionConfigT = OnSourceDDoSProtectionConfig>
275 void SetOnSourceDDoSProtectionConfig(OnSourceDDoSProtectionConfigT&& value) { m_onSourceDDoSProtectionConfigHasBeenSet = true; m_onSourceDDoSProtectionConfig = std::forward<OnSourceDDoSProtectionConfigT>(value); }
276 template<typename OnSourceDDoSProtectionConfigT = OnSourceDDoSProtectionConfig>
277 CreateWebACLRequest& WithOnSourceDDoSProtectionConfig(OnSourceDDoSProtectionConfigT&& value) { SetOnSourceDDoSProtectionConfig(std::forward<OnSourceDDoSProtectionConfigT>(value)); return *this;}
279
281
286 inline const ApplicationConfig& GetApplicationConfig() const { return m_applicationConfig; }
287 inline bool ApplicationConfigHasBeenSet() const { return m_applicationConfigHasBeenSet; }
288 template<typename ApplicationConfigT = ApplicationConfig>
289 void SetApplicationConfig(ApplicationConfigT&& value) { m_applicationConfigHasBeenSet = true; m_applicationConfig = std::forward<ApplicationConfigT>(value); }
290 template<typename ApplicationConfigT = ApplicationConfig>
291 CreateWebACLRequest& WithApplicationConfig(ApplicationConfigT&& value) { SetApplicationConfig(std::forward<ApplicationConfigT>(value)); return *this;}
293 private:
294
295 Aws::String m_name;
296 bool m_nameHasBeenSet = false;
297
298 Scope m_scope{Scope::NOT_SET};
299 bool m_scopeHasBeenSet = false;
300
301 DefaultAction m_defaultAction;
302 bool m_defaultActionHasBeenSet = false;
303
304 Aws::String m_description;
305 bool m_descriptionHasBeenSet = false;
306
307 Aws::Vector<Rule> m_rules;
308 bool m_rulesHasBeenSet = false;
309
310 VisibilityConfig m_visibilityConfig;
311 bool m_visibilityConfigHasBeenSet = false;
312
313 DataProtectionConfig m_dataProtectionConfig;
314 bool m_dataProtectionConfigHasBeenSet = false;
315
316 Aws::Vector<Tag> m_tags;
317 bool m_tagsHasBeenSet = false;
318
319 Aws::Map<Aws::String, CustomResponseBody> m_customResponseBodies;
320 bool m_customResponseBodiesHasBeenSet = false;
321
322 CaptchaConfig m_captchaConfig;
323 bool m_captchaConfigHasBeenSet = false;
324
325 ChallengeConfig m_challengeConfig;
326 bool m_challengeConfigHasBeenSet = false;
327
328 Aws::Vector<Aws::String> m_tokenDomains;
329 bool m_tokenDomainsHasBeenSet = false;
330
331 AssociationConfig m_associationConfig;
332 bool m_associationConfigHasBeenSet = false;
333
334 OnSourceDDoSProtectionConfig m_onSourceDDoSProtectionConfig;
335 bool m_onSourceDDoSProtectionConfigHasBeenSet = false;
336
337 ApplicationConfig m_applicationConfig;
338 bool m_applicationConfigHasBeenSet = false;
339 };
340
341} // namespace Model
342} // namespace WAFV2
343} // namespace Aws
CreateWebACLRequest & WithCaptchaConfig(CaptchaConfigT &&value)
CreateWebACLRequest & WithAssociationConfig(AssociationConfigT &&value)
void SetCaptchaConfig(CaptchaConfigT &&value)
CreateWebACLRequest & WithVisibilityConfig(VisibilityConfigT &&value)
void SetChallengeConfig(ChallengeConfigT &&value)
void SetCustomResponseBodies(CustomResponseBodiesT &&value)
const Aws::String & GetDescription() const
const VisibilityConfig & GetVisibilityConfig() const
const Aws::Vector< Rule > & GetRules() const
CreateWebACLRequest & WithRules(RulesT &&value)
CreateWebACLRequest & WithScope(Scope value)
CreateWebACLRequest & WithCustomResponseBodies(CustomResponseBodiesT &&value)
virtual const char * GetServiceRequestName() const override
const ChallengeConfig & GetChallengeConfig() const
void SetVisibilityConfig(VisibilityConfigT &&value)
CreateWebACLRequest & AddCustomResponseBodies(CustomResponseBodiesKeyT &&key, CustomResponseBodiesValueT &&value)
const Aws::Map< Aws::String, CustomResponseBody > & GetCustomResponseBodies() const
void SetDataProtectionConfig(DataProtectionConfigT &&value)
AWS_WAFV2_API Aws::String SerializePayload() const override
AWS_WAFV2_API CreateWebACLRequest()=default
void SetAssociationConfig(AssociationConfigT &&value)
CreateWebACLRequest & WithDefaultAction(DefaultActionT &&value)
CreateWebACLRequest & WithTokenDomains(TokenDomainsT &&value)
void SetTokenDomains(TokenDomainsT &&value)
void SetDefaultAction(DefaultActionT &&value)
CreateWebACLRequest & WithChallengeConfig(ChallengeConfigT &&value)
CreateWebACLRequest & WithName(NameT &&value)
const OnSourceDDoSProtectionConfig & GetOnSourceDDoSProtectionConfig() const
CreateWebACLRequest & WithDataProtectionConfig(DataProtectionConfigT &&value)
CreateWebACLRequest & AddTags(TagsT &&value)
const AssociationConfig & GetAssociationConfig() const
const CaptchaConfig & GetCaptchaConfig() const
const DataProtectionConfig & GetDataProtectionConfig() const
CreateWebACLRequest & WithTags(TagsT &&value)
CreateWebACLRequest & AddTokenDomains(TokenDomainsT &&value)
CreateWebACLRequest & AddRules(RulesT &&value)
CreateWebACLRequest & WithOnSourceDDoSProtectionConfig(OnSourceDDoSProtectionConfigT &&value)
void SetApplicationConfig(ApplicationConfigT &&value)
const Aws::Vector< Tag > & GetTags() const
CreateWebACLRequest & WithDescription(DescriptionT &&value)
CreateWebACLRequest & WithApplicationConfig(ApplicationConfigT &&value)
const DefaultAction & GetDefaultAction() const
const Aws::Vector< Aws::String > & GetTokenDomains() const
void SetOnSourceDDoSProtectionConfig(OnSourceDDoSProtectionConfigT &&value)
AWS_WAFV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const ApplicationConfig & GetApplicationConfig() 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