/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include #include using namespace Aws::Rekognition::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListFacesResult::ListFacesResult() { } ListFacesResult::ListFacesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListFacesResult& ListFacesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Faces")) { Aws::Utils::Array facesJsonList = jsonValue.GetArray("Faces"); for(unsigned facesIndex = 0; facesIndex < facesJsonList.GetLength(); ++facesIndex) { m_faces.push_back(facesJsonList[facesIndex].AsObject()); } } if(jsonValue.ValueExists("NextToken")) { m_nextToken = jsonValue.GetString("NextToken"); } if(jsonValue.ValueExists("FaceModelVersion")) { m_faceModelVersion = jsonValue.GetString("FaceModelVersion"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }