/** * 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::SecurityHub::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchUpdateFindingsResult::BatchUpdateFindingsResult() { } BatchUpdateFindingsResult::BatchUpdateFindingsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchUpdateFindingsResult& BatchUpdateFindingsResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ProcessedFindings")) { Aws::Utils::Array processedFindingsJsonList = jsonValue.GetArray("ProcessedFindings"); for(unsigned processedFindingsIndex = 0; processedFindingsIndex < processedFindingsJsonList.GetLength(); ++processedFindingsIndex) { m_processedFindings.push_back(processedFindingsJsonList[processedFindingsIndex].AsObject()); } } if(jsonValue.ValueExists("UnprocessedFindings")) { Aws::Utils::Array unprocessedFindingsJsonList = jsonValue.GetArray("UnprocessedFindings"); for(unsigned unprocessedFindingsIndex = 0; unprocessedFindingsIndex < unprocessedFindingsJsonList.GetLength(); ++unprocessedFindingsIndex) { m_unprocessedFindings.push_back(unprocessedFindingsJsonList[unprocessedFindingsIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }