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