/** * 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::ApplicationInsights::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeComponentResult::DescribeComponentResult() { } DescribeComponentResult::DescribeComponentResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DescribeComponentResult& DescribeComponentResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ApplicationComponent")) { m_applicationComponent = jsonValue.GetObject("ApplicationComponent"); } if(jsonValue.ValueExists("ResourceList")) { Aws::Utils::Array resourceListJsonList = jsonValue.GetArray("ResourceList"); for(unsigned resourceListIndex = 0; resourceListIndex < resourceListJsonList.GetLength(); ++resourceListIndex) { m_resourceList.push_back(resourceListJsonList[resourceListIndex].AsString()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }