/** * 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::tnb::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; PutSolNetworkPackageContentResult::PutSolNetworkPackageContentResult() { } PutSolNetworkPackageContentResult::PutSolNetworkPackageContentResult(const Aws::AmazonWebServiceResult& result) { *this = result; } PutSolNetworkPackageContentResult& PutSolNetworkPackageContentResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); } if(jsonValue.ValueExists("id")) { m_id = jsonValue.GetString("id"); } if(jsonValue.ValueExists("metadata")) { m_metadata = jsonValue.GetObject("metadata"); } if(jsonValue.ValueExists("nsdId")) { m_nsdId = jsonValue.GetString("nsdId"); } if(jsonValue.ValueExists("nsdName")) { m_nsdName = jsonValue.GetString("nsdName"); } if(jsonValue.ValueExists("nsdVersion")) { m_nsdVersion = jsonValue.GetString("nsdVersion"); } if(jsonValue.ValueExists("vnfPkgIds")) { Aws::Utils::Array vnfPkgIdsJsonList = jsonValue.GetArray("vnfPkgIds"); for(unsigned vnfPkgIdsIndex = 0; vnfPkgIdsIndex < vnfPkgIdsJsonList.GetLength(); ++vnfPkgIdsIndex) { m_vnfPkgIds.push_back(vnfPkgIdsJsonList[vnfPkgIdsIndex].AsString()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }