/** * 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::ServiceCatalog::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListBudgetsForResourceResult::ListBudgetsForResourceResult() { } ListBudgetsForResourceResult::ListBudgetsForResourceResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListBudgetsForResourceResult& ListBudgetsForResourceResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Budgets")) { Aws::Utils::Array budgetsJsonList = jsonValue.GetArray("Budgets"); for(unsigned budgetsIndex = 0; budgetsIndex < budgetsJsonList.GetLength(); ++budgetsIndex) { m_budgets.push_back(budgetsJsonList[budgetsIndex].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; }