/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include using namespace Aws::NimbleStudio::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateStreamingImageRequest::CreateStreamingImageRequest() : m_clientToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientTokenHasBeenSet(true), m_descriptionHasBeenSet(false), m_ec2ImageIdHasBeenSet(false), m_nameHasBeenSet(false), m_studioIdHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateStreamingImageRequest::SerializePayload() const { JsonValue payload; if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_ec2ImageIdHasBeenSet) { payload.WithString("ec2ImageId", m_ec2ImageId); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } 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(); } Aws::Http::HeaderValueCollection CreateStreamingImageRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; Aws::StringStream ss; if(m_clientTokenHasBeenSet) { ss << m_clientToken; headers.emplace("x-amz-client-token", ss.str()); ss.str(""); } return headers; }