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