/** * 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; DescribePortfolioSharesResult::DescribePortfolioSharesResult() { } DescribePortfolioSharesResult::DescribePortfolioSharesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DescribePortfolioSharesResult& DescribePortfolioSharesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("NextPageToken")) { m_nextPageToken = jsonValue.GetString("NextPageToken"); } if(jsonValue.ValueExists("PortfolioShareDetails")) { Aws::Utils::Array portfolioShareDetailsJsonList = jsonValue.GetArray("PortfolioShareDetails"); for(unsigned portfolioShareDetailsIndex = 0; portfolioShareDetailsIndex < portfolioShareDetailsJsonList.GetLength(); ++portfolioShareDetailsIndex) { m_portfolioShareDetails.push_back(portfolioShareDetailsJsonList[portfolioShareDetailsIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }