/** * 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; CreateRecipeRequest::CreateRecipeRequest() : m_descriptionHasBeenSet(false), m_nameHasBeenSet(false), m_stepsHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateRecipeRequest::SerializePayload() const { JsonValue payload; if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_stepsHasBeenSet) { Aws::Utils::Array stepsJsonList(m_steps.size()); for(unsigned stepsIndex = 0; stepsIndex < stepsJsonList.GetLength(); ++stepsIndex) { stepsJsonList[stepsIndex].AsObject(m_steps[stepsIndex].Jsonize()); } payload.WithArray("Steps", std::move(stepsJsonList)); } 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(); }