/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::AppMesh::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateMeshRequest::CreateMeshRequest() : m_clientToken(Aws::Utils::UUID::RandomUUID()), m_clientTokenHasBeenSet(true), m_meshNameHasBeenSet(false), m_specHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateMeshRequest::SerializePayload() const { JsonValue payload; if(m_clientTokenHasBeenSet) { payload.WithString("clientToken", m_clientToken); } if(m_meshNameHasBeenSet) { payload.WithString("meshName", m_meshName); } if(m_specHasBeenSet) { payload.WithObject("spec", m_spec.Jsonize()); } if(m_tagsHasBeenSet) { Array tagsJsonList(m_tags.size()); for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex) { tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize()); } payload.WithArray("tags", std::move(tagsJsonList)); } return payload.View().WriteReadable(); }