/** * 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; DetectProtectiveEquipmentResult::DetectProtectiveEquipmentResult() { } DetectProtectiveEquipmentResult::DetectProtectiveEquipmentResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DetectProtectiveEquipmentResult& DetectProtectiveEquipmentResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ProtectiveEquipmentModelVersion")) { m_protectiveEquipmentModelVersion = jsonValue.GetString("ProtectiveEquipmentModelVersion"); } if(jsonValue.ValueExists("Persons")) { Aws::Utils::Array personsJsonList = jsonValue.GetArray("Persons"); for(unsigned personsIndex = 0; personsIndex < personsJsonList.GetLength(); ++personsIndex) { m_persons.push_back(personsJsonList[personsIndex].AsObject()); } } if(jsonValue.ValueExists("Summary")) { m_summary = jsonValue.GetObject("Summary"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }