1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/appstream/model/TagResourceRequest.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 9 #include <utility> 10 11 using namespace Aws::AppStream::Model; 12 using namespace Aws::Utils::Json; 13 using namespace Aws::Utils; 14 TagResourceRequest()15TagResourceRequest::TagResourceRequest() : 16 m_resourceArnHasBeenSet(false), 17 m_tagsHasBeenSet(false) 18 { 19 } 20 SerializePayload() const21Aws::String TagResourceRequest::SerializePayload() const 22 { 23 JsonValue payload; 24 25 if(m_resourceArnHasBeenSet) 26 { 27 payload.WithString("ResourceArn", m_resourceArn); 28 29 } 30 31 if(m_tagsHasBeenSet) 32 { 33 JsonValue tagsJsonMap; 34 for(auto& tagsItem : m_tags) 35 { 36 tagsJsonMap.WithString(tagsItem.first, tagsItem.second); 37 } 38 payload.WithObject("Tags", std::move(tagsJsonMap)); 39 40 } 41 42 return payload.View().WriteReadable(); 43 } 44 GetRequestSpecificHeaders() const45Aws::Http::HeaderValueCollection TagResourceRequest::GetRequestSpecificHeaders() const 46 { 47 Aws::Http::HeaderValueCollection headers; 48 headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "PhotonAdminProxyService.TagResource")); 49 return headers; 50 51 } 52 53 54 55 56