/** * 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::CostExplorer::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListSavingsPlansPurchaseRecommendationGenerationResult::ListSavingsPlansPurchaseRecommendationGenerationResult() { } ListSavingsPlansPurchaseRecommendationGenerationResult::ListSavingsPlansPurchaseRecommendationGenerationResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListSavingsPlansPurchaseRecommendationGenerationResult& ListSavingsPlansPurchaseRecommendationGenerationResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("GenerationSummaryList")) { Aws::Utils::Array generationSummaryListJsonList = jsonValue.GetArray("GenerationSummaryList"); for(unsigned generationSummaryListIndex = 0; generationSummaryListIndex < generationSummaryListJsonList.GetLength(); ++generationSummaryListIndex) { m_generationSummaryList.push_back(generationSummaryListJsonList[generationSummaryListIndex].AsObject()); } } if(jsonValue.ValueExists("NextPageToken")) { m_nextPageToken = jsonValue.GetString("NextPageToken"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }