1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/apigatewayv2/model/UpdateRouteResponseRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8
9 #include <utility>
10
11 using namespace Aws::ApiGatewayV2::Model;
12 using namespace Aws::Utils::Json;
13 using namespace Aws::Utils;
14
UpdateRouteResponseRequest()15 UpdateRouteResponseRequest::UpdateRouteResponseRequest() :
16 m_apiIdHasBeenSet(false),
17 m_modelSelectionExpressionHasBeenSet(false),
18 m_responseModelsHasBeenSet(false),
19 m_responseParametersHasBeenSet(false),
20 m_routeIdHasBeenSet(false),
21 m_routeResponseIdHasBeenSet(false),
22 m_routeResponseKeyHasBeenSet(false)
23 {
24 }
25
SerializePayload() const26 Aws::String UpdateRouteResponseRequest::SerializePayload() const
27 {
28 JsonValue payload;
29
30 if(m_modelSelectionExpressionHasBeenSet)
31 {
32 payload.WithString("modelSelectionExpression", m_modelSelectionExpression);
33
34 }
35
36 if(m_responseModelsHasBeenSet)
37 {
38 JsonValue responseModelsJsonMap;
39 for(auto& responseModelsItem : m_responseModels)
40 {
41 responseModelsJsonMap.WithString(responseModelsItem.first, responseModelsItem.second);
42 }
43 payload.WithObject("responseModels", std::move(responseModelsJsonMap));
44
45 }
46
47 if(m_responseParametersHasBeenSet)
48 {
49 JsonValue responseParametersJsonMap;
50 for(auto& responseParametersItem : m_responseParameters)
51 {
52 responseParametersJsonMap.WithObject(responseParametersItem.first, responseParametersItem.second.Jsonize());
53 }
54 payload.WithObject("responseParameters", std::move(responseParametersJsonMap));
55
56 }
57
58 if(m_routeResponseKeyHasBeenSet)
59 {
60 payload.WithString("routeResponseKey", m_routeResponseKey);
61
62 }
63
64 return payload.View().WriteReadable();
65 }
66
67
68
69
70