/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::IoT::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateStreamRequest::CreateStreamRequest() : m_streamIdHasBeenSet(false), m_descriptionHasBeenSet(false), m_filesHasBeenSet(false), m_roleArnHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateStreamRequest::SerializePayload() const { JsonValue payload; if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_filesHasBeenSet) { Aws::Utils::Array filesJsonList(m_files.size()); for(unsigned filesIndex = 0; filesIndex < filesJsonList.GetLength(); ++filesIndex) { filesJsonList[filesIndex].AsObject(m_files[filesIndex].Jsonize()); } payload.WithArray("files", std::move(filesJsonList)); } if(m_roleArnHasBeenSet) { payload.WithString("roleArn", m_roleArn); } if(m_tagsHasBeenSet) { Aws::Utils::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(); }