/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/connect/model/CreateContactFlowRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Connect::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateContactFlowRequest::CreateContactFlowRequest() : m_instanceIdHasBeenSet(false), m_nameHasBeenSet(false), m_type(ContactFlowType::NOT_SET), m_typeHasBeenSet(false), m_descriptionHasBeenSet(false), m_contentHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateContactFlowRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_typeHasBeenSet) { payload.WithString("Type", ContactFlowTypeMapper::GetNameForContactFlowType(m_type)); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_contentHasBeenSet) { payload.WithString("Content", m_content); } 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(); }