/** * 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; DescribeCustomerMetadataResult::DescribeCustomerMetadataResult() : m_nniPartnerType(NniPartnerType::NOT_SET) { } DescribeCustomerMetadataResult::DescribeCustomerMetadataResult(const Aws::AmazonWebServiceResult& result) : m_nniPartnerType(NniPartnerType::NOT_SET) { *this = result; } DescribeCustomerMetadataResult& DescribeCustomerMetadataResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("agreements")) { Aws::Utils::Array agreementsJsonList = jsonValue.GetArray("agreements"); for(unsigned agreementsIndex = 0; agreementsIndex < agreementsJsonList.GetLength(); ++agreementsIndex) { m_agreements.push_back(agreementsJsonList[agreementsIndex].AsObject()); } } if(jsonValue.ValueExists("nniPartnerType")) { m_nniPartnerType = NniPartnerTypeMapper::GetNniPartnerTypeForName(jsonValue.GetString("nniPartnerType")); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }