/** * 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::Inspector2::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListFindingAggregationsResult::ListFindingAggregationsResult() : m_aggregationType(AggregationType::NOT_SET) { } ListFindingAggregationsResult::ListFindingAggregationsResult(const Aws::AmazonWebServiceResult& result) : m_aggregationType(AggregationType::NOT_SET) { *this = result; } ListFindingAggregationsResult& ListFindingAggregationsResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("aggregationType")) { m_aggregationType = AggregationTypeMapper::GetAggregationTypeForName(jsonValue.GetString("aggregationType")); } if(jsonValue.ValueExists("nextToken")) { m_nextToken = jsonValue.GetString("nextToken"); } if(jsonValue.ValueExists("responses")) { Aws::Utils::Array responsesJsonList = jsonValue.GetArray("responses"); for(unsigned responsesIndex = 0; responsesIndex < responsesJsonList.GetLength(); ++responsesIndex) { m_responses.push_back(responsesJsonList[responsesIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }