AWS SDK for C++

AWS SDK for C++ Version 1.11.932

Loading...
Searching...
No Matches
UpdateRuleGroupRequest.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/VisibilityConfig.h>
17
18#include <utility>
19
20namespace Aws {
21namespace WAFV2 {
22namespace Model {
23
27 public:
28 AWS_WAFV2_API UpdateRuleGroupRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "UpdateRuleGroup"; }
35
36 AWS_WAFV2_API Aws::String SerializePayload() const override;
37
39
41
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template <typename NameT = Aws::String>
48 void SetName(NameT&& value) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
69 inline Scope GetScope() const { return m_scope; }
70 inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
71 inline void SetScope(Scope value) {
72 m_scopeHasBeenSet = true;
73 m_scope = value;
74 }
76 SetScope(value);
77 return *this;
78 }
80
82
87 inline const Aws::String& GetId() const { return m_id; }
88 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
89 template <typename IdT = Aws::String>
90 void SetId(IdT&& value) {
91 m_idHasBeenSet = true;
92 m_id = std::forward<IdT>(value);
93 }
94 template <typename IdT = Aws::String>
96 SetId(std::forward<IdT>(value));
97 return *this;
98 }
100
102
105 inline const Aws::String& GetDescription() const { return m_description; }
106 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
107 template <typename DescriptionT = Aws::String>
108 void SetDescription(DescriptionT&& value) {
109 m_descriptionHasBeenSet = true;
110 m_description = std::forward<DescriptionT>(value);
111 }
112 template <typename DescriptionT = Aws::String>
114 SetDescription(std::forward<DescriptionT>(value));
115 return *this;
116 }
118
120
125 inline const Aws::Vector<Rule>& GetRules() const { return m_rules; }
126 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
127 template <typename RulesT = Aws::Vector<Rule>>
128 void SetRules(RulesT&& value) {
129 m_rulesHasBeenSet = true;
130 m_rules = std::forward<RulesT>(value);
131 }
132 template <typename RulesT = Aws::Vector<Rule>>
134 SetRules(std::forward<RulesT>(value));
135 return *this;
136 }
137 template <typename RulesT = Rule>
139 m_rulesHasBeenSet = true;
140 m_rules.emplace_back(std::forward<RulesT>(value));
141 return *this;
142 }
144
146
150 inline const VisibilityConfig& GetVisibilityConfig() const { return m_visibilityConfig; }
151 inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
152 template <typename VisibilityConfigT = VisibilityConfig>
153 void SetVisibilityConfig(VisibilityConfigT&& value) {
154 m_visibilityConfigHasBeenSet = true;
155 m_visibilityConfig = std::forward<VisibilityConfigT>(value);
156 }
157 template <typename VisibilityConfigT = VisibilityConfig>
158 UpdateRuleGroupRequest& WithVisibilityConfig(VisibilityConfigT&& value) {
159 SetVisibilityConfig(std::forward<VisibilityConfigT>(value));
160 return *this;
161 }
163
165
175 inline const Aws::String& GetLockToken() const { return m_lockToken; }
176 inline bool LockTokenHasBeenSet() const { return m_lockTokenHasBeenSet; }
177 template <typename LockTokenT = Aws::String>
178 void SetLockToken(LockTokenT&& value) {
179 m_lockTokenHasBeenSet = true;
180 m_lockToken = std::forward<LockTokenT>(value);
181 }
182 template <typename LockTokenT = Aws::String>
184 SetLockToken(std::forward<LockTokenT>(value));
185 return *this;
186 }
188
190
203 inline const Aws::Map<Aws::String, CustomResponseBody>& GetCustomResponseBodies() const { return m_customResponseBodies; }
204 inline bool CustomResponseBodiesHasBeenSet() const { return m_customResponseBodiesHasBeenSet; }
205 template <typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
206 void SetCustomResponseBodies(CustomResponseBodiesT&& value) {
207 m_customResponseBodiesHasBeenSet = true;
208 m_customResponseBodies = std::forward<CustomResponseBodiesT>(value);
209 }
210 template <typename CustomResponseBodiesT = Aws::Map<Aws::String, CustomResponseBody>>
211 UpdateRuleGroupRequest& WithCustomResponseBodies(CustomResponseBodiesT&& value) {
212 SetCustomResponseBodies(std::forward<CustomResponseBodiesT>(value));
213 return *this;
214 }
215 template <typename CustomResponseBodiesKeyT = Aws::String, typename CustomResponseBodiesValueT = CustomResponseBody>
216 UpdateRuleGroupRequest& AddCustomResponseBodies(CustomResponseBodiesKeyT&& key, CustomResponseBodiesValueT&& value) {
217 m_customResponseBodiesHasBeenSet = true;
218 m_customResponseBodies.emplace(std::forward<CustomResponseBodiesKeyT>(key), std::forward<CustomResponseBodiesValueT>(value));
219 return *this;
220 }
222
224
228 inline const MonetizationConfig& GetMonetizationConfig() const { return m_monetizationConfig; }
229 inline bool MonetizationConfigHasBeenSet() const { return m_monetizationConfigHasBeenSet; }
230 template <typename MonetizationConfigT = MonetizationConfig>
231 void SetMonetizationConfig(MonetizationConfigT&& value) {
232 m_monetizationConfigHasBeenSet = true;
233 m_monetizationConfig = std::forward<MonetizationConfigT>(value);
234 }
235 template <typename MonetizationConfigT = MonetizationConfig>
236 UpdateRuleGroupRequest& WithMonetizationConfig(MonetizationConfigT&& value) {
237 SetMonetizationConfig(std::forward<MonetizationConfigT>(value));
238 return *this;
239 }
241 private:
242 Aws::String m_name;
243
244 Scope m_scope{Scope::NOT_SET};
245
246 Aws::String m_id;
247
248 Aws::String m_description;
249
250 Aws::Vector<Rule> m_rules;
251
252 VisibilityConfig m_visibilityConfig;
253
254 Aws::String m_lockToken;
255
256 Aws::Map<Aws::String, CustomResponseBody> m_customResponseBodies;
257
258 MonetizationConfig m_monetizationConfig;
259 bool m_nameHasBeenSet = false;
260 bool m_scopeHasBeenSet = false;
261 bool m_idHasBeenSet = false;
262 bool m_descriptionHasBeenSet = false;
263 bool m_rulesHasBeenSet = false;
264 bool m_visibilityConfigHasBeenSet = false;
265 bool m_lockTokenHasBeenSet = false;
266 bool m_customResponseBodiesHasBeenSet = false;
267 bool m_monetizationConfigHasBeenSet = false;
268};
269
270} // namespace Model
271} // namespace WAFV2
272} // namespace Aws
UpdateRuleGroupRequest & WithId(IdT &&value)
AWS_WAFV2_API UpdateRuleGroupRequest()=default
UpdateRuleGroupRequest & AddCustomResponseBodies(CustomResponseBodiesKeyT &&key, CustomResponseBodiesValueT &&value)
UpdateRuleGroupRequest & WithDescription(DescriptionT &&value)
const VisibilityConfig & GetVisibilityConfig() const
UpdateRuleGroupRequest & WithScope(Scope value)
AWS_WAFV2_API Aws::String SerializePayload() const override
void SetMonetizationConfig(MonetizationConfigT &&value)
const Aws::Map< Aws::String, CustomResponseBody > & GetCustomResponseBodies() const
void SetCustomResponseBodies(CustomResponseBodiesT &&value)
UpdateRuleGroupRequest & WithRules(RulesT &&value)
void SetVisibilityConfig(VisibilityConfigT &&value)
AWS_WAFV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::Vector< Rule > & GetRules() const
UpdateRuleGroupRequest & WithMonetizationConfig(MonetizationConfigT &&value)
UpdateRuleGroupRequest & WithVisibilityConfig(VisibilityConfigT &&value)
virtual const char * GetServiceRequestName() const override
const MonetizationConfig & GetMonetizationConfig() const
UpdateRuleGroupRequest & AddRules(RulesT &&value)
UpdateRuleGroupRequest & WithLockToken(LockTokenT &&value)
UpdateRuleGroupRequest & WithName(NameT &&value)
UpdateRuleGroupRequest & WithCustomResponseBodies(CustomResponseBodiesT &&value)
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