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