/** * 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; ExecuteBudgetActionResult::ExecuteBudgetActionResult() : m_executionType(ExecutionType::NOT_SET) { } ExecuteBudgetActionResult::ExecuteBudgetActionResult(const Aws::AmazonWebServiceResult& result) : m_executionType(ExecutionType::NOT_SET) { *this = result; } ExecuteBudgetActionResult& ExecuteBudgetActionResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("AccountId")) { m_accountId = jsonValue.GetString("AccountId"); } if(jsonValue.ValueExists("BudgetName")) { m_budgetName = jsonValue.GetString("BudgetName"); } if(jsonValue.ValueExists("ActionId")) { m_actionId = jsonValue.GetString("ActionId"); } if(jsonValue.ValueExists("ExecutionType")) { m_executionType = ExecutionTypeMapper::GetExecutionTypeForName(jsonValue.GetString("ExecutionType")); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }