/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Rekognition::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateCollectionRequest::CreateCollectionRequest() : m_collectionIdHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateCollectionRequest::SerializePayload() const { JsonValue payload; if(m_collectionIdHasBeenSet) { payload.WithString("CollectionId", m_collectionId); } 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 CreateCollectionRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "RekognitionService.CreateCollection")); return headers; }