1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/glue/model/CreateConnectionRequest.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 9 #include <utility> 10 11 using namespace Aws::Glue::Model; 12 using namespace Aws::Utils::Json; 13 using namespace Aws::Utils; 14 CreateConnectionRequest()15CreateConnectionRequest::CreateConnectionRequest() : 16 m_catalogIdHasBeenSet(false), 17 m_connectionInputHasBeenSet(false), 18 m_tagsHasBeenSet(false) 19 { 20 } 21 SerializePayload() const22Aws::String CreateConnectionRequest::SerializePayload() const 23 { 24 JsonValue payload; 25 26 if(m_catalogIdHasBeenSet) 27 { 28 payload.WithString("CatalogId", m_catalogId); 29 30 } 31 32 if(m_connectionInputHasBeenSet) 33 { 34 payload.WithObject("ConnectionInput", m_connectionInput.Jsonize()); 35 36 } 37 38 if(m_tagsHasBeenSet) 39 { 40 JsonValue tagsJsonMap; 41 for(auto& tagsItem : m_tags) 42 { 43 tagsJsonMap.WithString(tagsItem.first, tagsItem.second); 44 } 45 payload.WithObject("Tags", std::move(tagsJsonMap)); 46 47 } 48 49 return payload.View().WriteReadable(); 50 } 51 GetRequestSpecificHeaders() const52Aws::Http::HeaderValueCollection CreateConnectionRequest::GetRequestSpecificHeaders() const 53 { 54 Aws::Http::HeaderValueCollection headers; 55 headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSGlue.CreateConnection")); 56 return headers; 57 58 } 59 60 61 62 63