AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreateApiRequest.h
1
6#pragma once
7#include <aws/apigatewayv2/ApiGatewayV2Request.h>
8#include <aws/apigatewayv2/ApiGatewayV2_EXPORTS.h>
9#include <aws/apigatewayv2/model/Cors.h>
10#include <aws/apigatewayv2/model/IpAddressType.h>
11#include <aws/apigatewayv2/model/ProtocolType.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14
15#include <utility>
16
17namespace Aws {
18namespace ApiGatewayV2 {
19namespace Model {
20
27 public:
28 AWS_APIGATEWAYV2_API CreateApiRequest() = 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 "CreateApi"; }
35
36 AWS_APIGATEWAYV2_API Aws::String SerializePayload() const override;
37
39
44 inline const Aws::String& GetApiKeySelectionExpression() const { return m_apiKeySelectionExpression; }
45 inline bool ApiKeySelectionExpressionHasBeenSet() const { return m_apiKeySelectionExpressionHasBeenSet; }
46 template <typename ApiKeySelectionExpressionT = Aws::String>
47 void SetApiKeySelectionExpression(ApiKeySelectionExpressionT&& value) {
48 m_apiKeySelectionExpressionHasBeenSet = true;
49 m_apiKeySelectionExpression = std::forward<ApiKeySelectionExpressionT>(value);
50 }
51 template <typename ApiKeySelectionExpressionT = Aws::String>
52 CreateApiRequest& WithApiKeySelectionExpression(ApiKeySelectionExpressionT&& value) {
53 SetApiKeySelectionExpression(std::forward<ApiKeySelectionExpressionT>(value));
54 return *this;
55 }
57
59
64 inline const Cors& GetCorsConfiguration() const { return m_corsConfiguration; }
65 inline bool CorsConfigurationHasBeenSet() const { return m_corsConfigurationHasBeenSet; }
66 template <typename CorsConfigurationT = Cors>
67 void SetCorsConfiguration(CorsConfigurationT&& value) {
68 m_corsConfigurationHasBeenSet = true;
69 m_corsConfiguration = std::forward<CorsConfigurationT>(value);
70 }
71 template <typename CorsConfigurationT = Cors>
72 CreateApiRequest& WithCorsConfiguration(CorsConfigurationT&& value) {
73 SetCorsConfiguration(std::forward<CorsConfigurationT>(value));
74 return *this;
75 }
77
79
88 inline const Aws::String& GetCredentialsArn() const { return m_credentialsArn; }
89 inline bool CredentialsArnHasBeenSet() const { return m_credentialsArnHasBeenSet; }
90 template <typename CredentialsArnT = Aws::String>
91 void SetCredentialsArn(CredentialsArnT&& value) {
92 m_credentialsArnHasBeenSet = true;
93 m_credentialsArn = std::forward<CredentialsArnT>(value);
94 }
95 template <typename CredentialsArnT = Aws::String>
96 CreateApiRequest& WithCredentialsArn(CredentialsArnT&& value) {
97 SetCredentialsArn(std::forward<CredentialsArnT>(value));
98 return *this;
99 }
101
103
106 inline const Aws::String& GetDescription() const { return m_description; }
107 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
108 template <typename DescriptionT = Aws::String>
109 void SetDescription(DescriptionT&& value) {
110 m_descriptionHasBeenSet = true;
111 m_description = std::forward<DescriptionT>(value);
112 }
113 template <typename DescriptionT = Aws::String>
114 CreateApiRequest& WithDescription(DescriptionT&& value) {
115 SetDescription(std::forward<DescriptionT>(value));
116 return *this;
117 }
119
121
125 inline bool GetDisableSchemaValidation() const { return m_disableSchemaValidation; }
126 inline bool DisableSchemaValidationHasBeenSet() const { return m_disableSchemaValidationHasBeenSet; }
127 inline void SetDisableSchemaValidation(bool value) {
128 m_disableSchemaValidationHasBeenSet = true;
129 m_disableSchemaValidation = value;
130 }
133 return *this;
134 }
136
138
145 inline bool GetDisableExecuteApiEndpoint() const { return m_disableExecuteApiEndpoint; }
146 inline bool DisableExecuteApiEndpointHasBeenSet() const { return m_disableExecuteApiEndpointHasBeenSet; }
147 inline void SetDisableExecuteApiEndpoint(bool value) {
148 m_disableExecuteApiEndpointHasBeenSet = true;
149 m_disableExecuteApiEndpoint = value;
150 }
153 return *this;
154 }
156
158
161 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
162 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
163 inline void SetIpAddressType(IpAddressType value) {
164 m_ipAddressTypeHasBeenSet = true;
165 m_ipAddressType = value;
166 }
168 SetIpAddressType(value);
169 return *this;
170 }
172
174
177 inline const Aws::String& GetName() const { return m_name; }
178 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
179 template <typename NameT = Aws::String>
180 void SetName(NameT&& value) {
181 m_nameHasBeenSet = true;
182 m_name = std::forward<NameT>(value);
183 }
184 template <typename NameT = Aws::String>
185 CreateApiRequest& WithName(NameT&& value) {
186 SetName(std::forward<NameT>(value));
187 return *this;
188 }
190
192
195 inline ProtocolType GetProtocolType() const { return m_protocolType; }
196 inline bool ProtocolTypeHasBeenSet() const { return m_protocolTypeHasBeenSet; }
197 inline void SetProtocolType(ProtocolType value) {
198 m_protocolTypeHasBeenSet = true;
199 m_protocolType = value;
200 }
202 SetProtocolType(value);
203 return *this;
204 }
206
208
215 inline const Aws::String& GetRouteKey() const { return m_routeKey; }
216 inline bool RouteKeyHasBeenSet() const { return m_routeKeyHasBeenSet; }
217 template <typename RouteKeyT = Aws::String>
218 void SetRouteKey(RouteKeyT&& value) {
219 m_routeKeyHasBeenSet = true;
220 m_routeKey = std::forward<RouteKeyT>(value);
221 }
222 template <typename RouteKeyT = Aws::String>
223 CreateApiRequest& WithRouteKey(RouteKeyT&& value) {
224 SetRouteKey(std::forward<RouteKeyT>(value));
225 return *this;
226 }
228
230
236 inline const Aws::String& GetRouteSelectionExpression() const { return m_routeSelectionExpression; }
237 inline bool RouteSelectionExpressionHasBeenSet() const { return m_routeSelectionExpressionHasBeenSet; }
238 template <typename RouteSelectionExpressionT = Aws::String>
239 void SetRouteSelectionExpression(RouteSelectionExpressionT&& value) {
240 m_routeSelectionExpressionHasBeenSet = true;
241 m_routeSelectionExpression = std::forward<RouteSelectionExpressionT>(value);
242 }
243 template <typename RouteSelectionExpressionT = Aws::String>
244 CreateApiRequest& WithRouteSelectionExpression(RouteSelectionExpressionT&& value) {
245 SetRouteSelectionExpression(std::forward<RouteSelectionExpressionT>(value));
246 return *this;
247 }
249
251
255 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
256 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
257 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
258 void SetTags(TagsT&& value) {
259 m_tagsHasBeenSet = true;
260 m_tags = std::forward<TagsT>(value);
261 }
262 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
263 CreateApiRequest& WithTags(TagsT&& value) {
264 SetTags(std::forward<TagsT>(value));
265 return *this;
266 }
267 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
268 CreateApiRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
269 m_tagsHasBeenSet = true;
270 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
271 return *this;
272 }
274
276
284 inline const Aws::String& GetTarget() const { return m_target; }
285 inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; }
286 template <typename TargetT = Aws::String>
287 void SetTarget(TargetT&& value) {
288 m_targetHasBeenSet = true;
289 m_target = std::forward<TargetT>(value);
290 }
291 template <typename TargetT = Aws::String>
292 CreateApiRequest& WithTarget(TargetT&& value) {
293 SetTarget(std::forward<TargetT>(value));
294 return *this;
295 }
297
299
302 inline const Aws::String& GetVersion() const { return m_version; }
303 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
304 template <typename VersionT = Aws::String>
305 void SetVersion(VersionT&& value) {
306 m_versionHasBeenSet = true;
307 m_version = std::forward<VersionT>(value);
308 }
309 template <typename VersionT = Aws::String>
310 CreateApiRequest& WithVersion(VersionT&& value) {
311 SetVersion(std::forward<VersionT>(value));
312 return *this;
313 }
315 private:
316 Aws::String m_apiKeySelectionExpression;
317
318 Cors m_corsConfiguration;
319
320 Aws::String m_credentialsArn;
321
322 Aws::String m_description;
323
324 bool m_disableSchemaValidation{false};
325
326 bool m_disableExecuteApiEndpoint{false};
327
328 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
329
330 Aws::String m_name;
331
332 ProtocolType m_protocolType{ProtocolType::NOT_SET};
333
334 Aws::String m_routeKey;
335
336 Aws::String m_routeSelectionExpression;
337
339
340 Aws::String m_target;
341
342 Aws::String m_version;
343 bool m_apiKeySelectionExpressionHasBeenSet = false;
344 bool m_corsConfigurationHasBeenSet = false;
345 bool m_credentialsArnHasBeenSet = false;
346 bool m_descriptionHasBeenSet = false;
347 bool m_disableSchemaValidationHasBeenSet = false;
348 bool m_disableExecuteApiEndpointHasBeenSet = false;
349 bool m_ipAddressTypeHasBeenSet = false;
350 bool m_nameHasBeenSet = false;
351 bool m_protocolTypeHasBeenSet = false;
352 bool m_routeKeyHasBeenSet = false;
353 bool m_routeSelectionExpressionHasBeenSet = false;
354 bool m_tagsHasBeenSet = false;
355 bool m_targetHasBeenSet = false;
356 bool m_versionHasBeenSet = false;
357};
358
359} // namespace Model
360} // namespace ApiGatewayV2
361} // namespace Aws
virtual const char * GetServiceRequestName() const override
AWS_APIGATEWAYV2_API Aws::String SerializePayload() const override
const Aws::String & GetRouteSelectionExpression() const
CreateApiRequest & WithTarget(TargetT &&value)
CreateApiRequest & WithIpAddressType(IpAddressType value)
CreateApiRequest & WithRouteSelectionExpression(RouteSelectionExpressionT &&value)
CreateApiRequest & WithVersion(VersionT &&value)
CreateApiRequest & WithApiKeySelectionExpression(ApiKeySelectionExpressionT &&value)
void SetApiKeySelectionExpression(ApiKeySelectionExpressionT &&value)
const Aws::String & GetApiKeySelectionExpression() const
const Aws::String & GetCredentialsArn() const
CreateApiRequest & WithDescription(DescriptionT &&value)
CreateApiRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateApiRequest & WithDisableSchemaValidation(bool value)
CreateApiRequest & WithTags(TagsT &&value)
CreateApiRequest & WithCredentialsArn(CredentialsArnT &&value)
CreateApiRequest & WithCorsConfiguration(CorsConfigurationT &&value)
void SetCorsConfiguration(CorsConfigurationT &&value)
CreateApiRequest & WithDisableExecuteApiEndpoint(bool value)
AWS_APIGATEWAYV2_API CreateApiRequest()=default
void SetRouteSelectionExpression(RouteSelectionExpressionT &&value)
CreateApiRequest & WithProtocolType(ProtocolType value)
CreateApiRequest & WithRouteKey(RouteKeyT &&value)
CreateApiRequest & WithName(NameT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
void SetCredentialsArn(CredentialsArnT &&value)
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