1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/events/model/CreateConnectionRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8
9 #include <utility>
10
11 using namespace Aws::CloudWatchEvents::Model;
12 using namespace Aws::Utils::Json;
13 using namespace Aws::Utils;
14
CreateConnectionRequest()15 CreateConnectionRequest::CreateConnectionRequest() :
16 m_nameHasBeenSet(false),
17 m_descriptionHasBeenSet(false),
18 m_authorizationType(ConnectionAuthorizationType::NOT_SET),
19 m_authorizationTypeHasBeenSet(false),
20 m_authParametersHasBeenSet(false)
21 {
22 }
23
SerializePayload() const24 Aws::String CreateConnectionRequest::SerializePayload() const
25 {
26 JsonValue payload;
27
28 if(m_nameHasBeenSet)
29 {
30 payload.WithString("Name", m_name);
31
32 }
33
34 if(m_descriptionHasBeenSet)
35 {
36 payload.WithString("Description", m_description);
37
38 }
39
40 if(m_authorizationTypeHasBeenSet)
41 {
42 payload.WithString("AuthorizationType", ConnectionAuthorizationTypeMapper::GetNameForConnectionAuthorizationType(m_authorizationType));
43 }
44
45 if(m_authParametersHasBeenSet)
46 {
47 payload.WithObject("AuthParameters", m_authParameters.Jsonize());
48
49 }
50
51 return payload.View().WriteReadable();
52 }
53
GetRequestSpecificHeaders() const54 Aws::Http::HeaderValueCollection CreateConnectionRequest::GetRequestSpecificHeaders() const
55 {
56 Aws::Http::HeaderValueCollection headers;
57 headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSEvents.CreateConnection"));
58 return headers;
59
60 }
61
62
63
64
65