/** * 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; ListFacesRequest::ListFacesRequest() : m_collectionIdHasBeenSet(false), m_nextTokenHasBeenSet(false), m_maxResults(0), m_maxResultsHasBeenSet(false), m_userIdHasBeenSet(false), m_faceIdsHasBeenSet(false) { } Aws::String ListFacesRequest::SerializePayload() const { JsonValue payload; if(m_collectionIdHasBeenSet) { payload.WithString("CollectionId", m_collectionId); } if(m_nextTokenHasBeenSet) { payload.WithString("NextToken", m_nextToken); } if(m_maxResultsHasBeenSet) { payload.WithInteger("MaxResults", m_maxResults); } if(m_userIdHasBeenSet) { payload.WithString("UserId", m_userId); } if(m_faceIdsHasBeenSet) { Aws::Utils::Array faceIdsJsonList(m_faceIds.size()); for(unsigned faceIdsIndex = 0; faceIdsIndex < faceIdsJsonList.GetLength(); ++faceIdsIndex) { faceIdsJsonList[faceIdsIndex].AsString(m_faceIds[faceIdsIndex]); } payload.WithArray("FaceIds", std::move(faceIdsJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection ListFacesRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "RekognitionService.ListFaces")); return headers; }