/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::GlueDataBrew::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateDatasetRequest::CreateDatasetRequest() : m_nameHasBeenSet(false), m_format(InputFormat::NOT_SET), m_formatHasBeenSet(false), m_formatOptionsHasBeenSet(false), m_inputHasBeenSet(false), m_pathOptionsHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateDatasetRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_formatHasBeenSet) { payload.WithString("Format", InputFormatMapper::GetNameForInputFormat(m_format)); } if(m_formatOptionsHasBeenSet) { payload.WithObject("FormatOptions", m_formatOptions.Jsonize()); } if(m_inputHasBeenSet) { payload.WithObject("Input", m_input.Jsonize()); } if(m_pathOptionsHasBeenSet) { payload.WithObject("PathOptions", m_pathOptions.Jsonize()); } if(m_tagsHasBeenSet) { JsonValue tagsJsonMap; for(auto& tagsItem : m_tags) { tagsJsonMap.WithString(tagsItem.first, tagsItem.second); } payload.WithObject("Tags", std::move(tagsJsonMap)); } return payload.View().WriteReadable(); }