AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
CreateRouteRequest.h
1
6#pragma once
7#include <aws/apigatewayv2/ApiGatewayV2Request.h>
8#include <aws/apigatewayv2/ApiGatewayV2_EXPORTS.h>
9#include <aws/apigatewayv2/model/AuthorizationType.h>
10#include <aws/apigatewayv2/model/ParameterConstraints.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace ApiGatewayV2 {
19namespace Model {
20
28 public:
29 AWS_APIGATEWAYV2_API CreateRouteRequest() = 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 "CreateRoute"; }
36
37 AWS_APIGATEWAYV2_API Aws::String SerializePayload() const override;
38
40
43 inline const Aws::String& GetApiId() const { return m_apiId; }
44 inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; }
45 template <typename ApiIdT = Aws::String>
46 void SetApiId(ApiIdT&& value) {
47 m_apiIdHasBeenSet = true;
48 m_apiId = std::forward<ApiIdT>(value);
49 }
50 template <typename ApiIdT = Aws::String>
51 CreateRouteRequest& WithApiId(ApiIdT&& value) {
52 SetApiId(std::forward<ApiIdT>(value));
53 return *this;
54 }
56
58
62 inline bool GetApiKeyRequired() const { return m_apiKeyRequired; }
63 inline bool ApiKeyRequiredHasBeenSet() const { return m_apiKeyRequiredHasBeenSet; }
64 inline void SetApiKeyRequired(bool value) {
65 m_apiKeyRequiredHasBeenSet = true;
66 m_apiKeyRequired = value;
67 }
69 SetApiKeyRequired(value);
70 return *this;
71 }
73
75
78 inline const Aws::Vector<Aws::String>& GetAuthorizationScopes() const { return m_authorizationScopes; }
79 inline bool AuthorizationScopesHasBeenSet() const { return m_authorizationScopesHasBeenSet; }
80 template <typename AuthorizationScopesT = Aws::Vector<Aws::String>>
81 void SetAuthorizationScopes(AuthorizationScopesT&& value) {
82 m_authorizationScopesHasBeenSet = true;
83 m_authorizationScopes = std::forward<AuthorizationScopesT>(value);
84 }
85 template <typename AuthorizationScopesT = Aws::Vector<Aws::String>>
86 CreateRouteRequest& WithAuthorizationScopes(AuthorizationScopesT&& value) {
87 SetAuthorizationScopes(std::forward<AuthorizationScopesT>(value));
88 return *this;
89 }
90 template <typename AuthorizationScopesT = Aws::String>
91 CreateRouteRequest& AddAuthorizationScopes(AuthorizationScopesT&& value) {
92 m_authorizationScopesHasBeenSet = true;
93 m_authorizationScopes.emplace_back(std::forward<AuthorizationScopesT>(value));
94 return *this;
95 }
97
99
106 inline AuthorizationType GetAuthorizationType() const { return m_authorizationType; }
107 inline bool AuthorizationTypeHasBeenSet() const { return m_authorizationTypeHasBeenSet; }
109 m_authorizationTypeHasBeenSet = true;
110 m_authorizationType = value;
111 }
114 return *this;
115 }
117
119
124 inline const Aws::String& GetAuthorizerId() const { return m_authorizerId; }
125 inline bool AuthorizerIdHasBeenSet() const { return m_authorizerIdHasBeenSet; }
126 template <typename AuthorizerIdT = Aws::String>
127 void SetAuthorizerId(AuthorizerIdT&& value) {
128 m_authorizerIdHasBeenSet = true;
129 m_authorizerId = std::forward<AuthorizerIdT>(value);
130 }
131 template <typename AuthorizerIdT = Aws::String>
132 CreateRouteRequest& WithAuthorizerId(AuthorizerIdT&& value) {
133 SetAuthorizerId(std::forward<AuthorizerIdT>(value));
134 return *this;
135 }
137
139
143 inline const Aws::String& GetModelSelectionExpression() const { return m_modelSelectionExpression; }
144 inline bool ModelSelectionExpressionHasBeenSet() const { return m_modelSelectionExpressionHasBeenSet; }
145 template <typename ModelSelectionExpressionT = Aws::String>
146 void SetModelSelectionExpression(ModelSelectionExpressionT&& value) {
147 m_modelSelectionExpressionHasBeenSet = true;
148 m_modelSelectionExpression = std::forward<ModelSelectionExpressionT>(value);
149 }
150 template <typename ModelSelectionExpressionT = Aws::String>
151 CreateRouteRequest& WithModelSelectionExpression(ModelSelectionExpressionT&& value) {
152 SetModelSelectionExpression(std::forward<ModelSelectionExpressionT>(value));
153 return *this;
154 }
156
158
161 inline const Aws::String& GetOperationName() const { return m_operationName; }
162 inline bool OperationNameHasBeenSet() const { return m_operationNameHasBeenSet; }
163 template <typename OperationNameT = Aws::String>
164 void SetOperationName(OperationNameT&& value) {
165 m_operationNameHasBeenSet = true;
166 m_operationName = std::forward<OperationNameT>(value);
167 }
168 template <typename OperationNameT = Aws::String>
169 CreateRouteRequest& WithOperationName(OperationNameT&& value) {
170 SetOperationName(std::forward<OperationNameT>(value));
171 return *this;
172 }
174
176
179 inline const Aws::Map<Aws::String, Aws::String>& GetRequestModels() const { return m_requestModels; }
180 inline bool RequestModelsHasBeenSet() const { return m_requestModelsHasBeenSet; }
181 template <typename RequestModelsT = Aws::Map<Aws::String, Aws::String>>
182 void SetRequestModels(RequestModelsT&& value) {
183 m_requestModelsHasBeenSet = true;
184 m_requestModels = std::forward<RequestModelsT>(value);
185 }
186 template <typename RequestModelsT = Aws::Map<Aws::String, Aws::String>>
187 CreateRouteRequest& WithRequestModels(RequestModelsT&& value) {
188 SetRequestModels(std::forward<RequestModelsT>(value));
189 return *this;
190 }
191 template <typename RequestModelsKeyT = Aws::String, typename RequestModelsValueT = Aws::String>
192 CreateRouteRequest& AddRequestModels(RequestModelsKeyT&& key, RequestModelsValueT&& value) {
193 m_requestModelsHasBeenSet = true;
194 m_requestModels.emplace(std::forward<RequestModelsKeyT>(key), std::forward<RequestModelsValueT>(value));
195 return *this;
196 }
198
200
203 inline const Aws::Map<Aws::String, ParameterConstraints>& GetRequestParameters() const { return m_requestParameters; }
204 inline bool RequestParametersHasBeenSet() const { return m_requestParametersHasBeenSet; }
205 template <typename RequestParametersT = Aws::Map<Aws::String, ParameterConstraints>>
206 void SetRequestParameters(RequestParametersT&& value) {
207 m_requestParametersHasBeenSet = true;
208 m_requestParameters = std::forward<RequestParametersT>(value);
209 }
210 template <typename RequestParametersT = Aws::Map<Aws::String, ParameterConstraints>>
211 CreateRouteRequest& WithRequestParameters(RequestParametersT&& value) {
212 SetRequestParameters(std::forward<RequestParametersT>(value));
213 return *this;
214 }
215 template <typename RequestParametersKeyT = Aws::String, typename RequestParametersValueT = ParameterConstraints>
216 CreateRouteRequest& AddRequestParameters(RequestParametersKeyT&& key, RequestParametersValueT&& value) {
217 m_requestParametersHasBeenSet = true;
218 m_requestParameters.emplace(std::forward<RequestParametersKeyT>(key), std::forward<RequestParametersValueT>(value));
219 return *this;
220 }
222
224
227 inline const Aws::String& GetRouteKey() const { return m_routeKey; }
228 inline bool RouteKeyHasBeenSet() const { return m_routeKeyHasBeenSet; }
229 template <typename RouteKeyT = Aws::String>
230 void SetRouteKey(RouteKeyT&& value) {
231 m_routeKeyHasBeenSet = true;
232 m_routeKey = std::forward<RouteKeyT>(value);
233 }
234 template <typename RouteKeyT = Aws::String>
235 CreateRouteRequest& WithRouteKey(RouteKeyT&& value) {
236 SetRouteKey(std::forward<RouteKeyT>(value));
237 return *this;
238 }
240
242
246 inline const Aws::String& GetRouteResponseSelectionExpression() const { return m_routeResponseSelectionExpression; }
247 inline bool RouteResponseSelectionExpressionHasBeenSet() const { return m_routeResponseSelectionExpressionHasBeenSet; }
248 template <typename RouteResponseSelectionExpressionT = Aws::String>
249 void SetRouteResponseSelectionExpression(RouteResponseSelectionExpressionT&& value) {
250 m_routeResponseSelectionExpressionHasBeenSet = true;
251 m_routeResponseSelectionExpression = std::forward<RouteResponseSelectionExpressionT>(value);
252 }
253 template <typename RouteResponseSelectionExpressionT = Aws::String>
254 CreateRouteRequest& WithRouteResponseSelectionExpression(RouteResponseSelectionExpressionT&& value) {
255 SetRouteResponseSelectionExpression(std::forward<RouteResponseSelectionExpressionT>(value));
256 return *this;
257 }
259
261
264 inline const Aws::String& GetTarget() const { return m_target; }
265 inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; }
266 template <typename TargetT = Aws::String>
267 void SetTarget(TargetT&& value) {
268 m_targetHasBeenSet = true;
269 m_target = std::forward<TargetT>(value);
270 }
271 template <typename TargetT = Aws::String>
272 CreateRouteRequest& WithTarget(TargetT&& value) {
273 SetTarget(std::forward<TargetT>(value));
274 return *this;
275 }
277 private:
278 Aws::String m_apiId;
279
280 bool m_apiKeyRequired{false};
281
282 Aws::Vector<Aws::String> m_authorizationScopes;
283
285
286 Aws::String m_authorizerId;
287
288 Aws::String m_modelSelectionExpression;
289
290 Aws::String m_operationName;
291
293
295
296 Aws::String m_routeKey;
297
298 Aws::String m_routeResponseSelectionExpression;
299
300 Aws::String m_target;
301 bool m_apiIdHasBeenSet = false;
302 bool m_apiKeyRequiredHasBeenSet = false;
303 bool m_authorizationScopesHasBeenSet = false;
304 bool m_authorizationTypeHasBeenSet = false;
305 bool m_authorizerIdHasBeenSet = false;
306 bool m_modelSelectionExpressionHasBeenSet = false;
307 bool m_operationNameHasBeenSet = false;
308 bool m_requestModelsHasBeenSet = false;
309 bool m_requestParametersHasBeenSet = false;
310 bool m_routeKeyHasBeenSet = false;
311 bool m_routeResponseSelectionExpressionHasBeenSet = false;
312 bool m_targetHasBeenSet = false;
313};
314
315} // namespace Model
316} // namespace ApiGatewayV2
317} // namespace Aws
const Aws::Map< Aws::String, Aws::String > & GetRequestModels() const
void SetRouteResponseSelectionExpression(RouteResponseSelectionExpressionT &&value)
CreateRouteRequest & WithRequestParameters(RequestParametersT &&value)
CreateRouteRequest & AddRequestModels(RequestModelsKeyT &&key, RequestModelsValueT &&value)
void SetAuthorizationType(AuthorizationType value)
AWS_APIGATEWAYV2_API CreateRouteRequest()=default
CreateRouteRequest & WithRouteResponseSelectionExpression(RouteResponseSelectionExpressionT &&value)
virtual const char * GetServiceRequestName() const override
CreateRouteRequest & AddRequestParameters(RequestParametersKeyT &&key, RequestParametersValueT &&value)
CreateRouteRequest & WithRequestModels(RequestModelsT &&value)
const Aws::String & GetModelSelectionExpression() const
CreateRouteRequest & WithApiId(ApiIdT &&value)
CreateRouteRequest & WithAuthorizationType(AuthorizationType value)
void SetRequestParameters(RequestParametersT &&value)
CreateRouteRequest & WithTarget(TargetT &&value)
CreateRouteRequest & WithApiKeyRequired(bool value)
void SetModelSelectionExpression(ModelSelectionExpressionT &&value)
CreateRouteRequest & AddAuthorizationScopes(AuthorizationScopesT &&value)
CreateRouteRequest & WithAuthorizerId(AuthorizerIdT &&value)
CreateRouteRequest & WithOperationName(OperationNameT &&value)
const Aws::Map< Aws::String, ParameterConstraints > & GetRequestParameters() const
const Aws::String & GetRouteResponseSelectionExpression() const
CreateRouteRequest & WithModelSelectionExpression(ModelSelectionExpressionT &&value)
void SetAuthorizationScopes(AuthorizationScopesT &&value)
AWS_APIGATEWAYV2_API Aws::String SerializePayload() const override
CreateRouteRequest & WithAuthorizationScopes(AuthorizationScopesT &&value)
const Aws::Vector< Aws::String > & GetAuthorizationScopes() const
CreateRouteRequest & WithRouteKey(RouteKeyT &&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
std::vector< T, Aws::Allocator< T > > Vector