/** * 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; DescribeProvisionedProductResult::DescribeProvisionedProductResult() { } DescribeProvisionedProductResult::DescribeProvisionedProductResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DescribeProvisionedProductResult& DescribeProvisionedProductResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ProvisionedProductDetail")) { m_provisionedProductDetail = jsonValue.GetObject("ProvisionedProductDetail"); } if(jsonValue.ValueExists("CloudWatchDashboards")) { Aws::Utils::Array cloudWatchDashboardsJsonList = jsonValue.GetArray("CloudWatchDashboards"); for(unsigned cloudWatchDashboardsIndex = 0; cloudWatchDashboardsIndex < cloudWatchDashboardsJsonList.GetLength(); ++cloudWatchDashboardsIndex) { m_cloudWatchDashboards.push_back(cloudWatchDashboardsJsonList[cloudWatchDashboardsIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }