/** * 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::ResilienceHub::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListTestRecommendationsResult::ListTestRecommendationsResult() { } ListTestRecommendationsResult::ListTestRecommendationsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListTestRecommendationsResult& ListTestRecommendationsResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("nextToken")) { m_nextToken = jsonValue.GetString("nextToken"); } if(jsonValue.ValueExists("testRecommendations")) { Aws::Utils::Array testRecommendationsJsonList = jsonValue.GetArray("testRecommendations"); for(unsigned testRecommendationsIndex = 0; testRecommendationsIndex < testRecommendationsJsonList.GetLength(); ++testRecommendationsIndex) { m_testRecommendations.push_back(testRecommendationsJsonList[testRecommendationsIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }