/** * 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::IoTSiteWise::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchGetAssetPropertyValueHistoryResult::BatchGetAssetPropertyValueHistoryResult() { } BatchGetAssetPropertyValueHistoryResult::BatchGetAssetPropertyValueHistoryResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchGetAssetPropertyValueHistoryResult& BatchGetAssetPropertyValueHistoryResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("errorEntries")) { Aws::Utils::Array errorEntriesJsonList = jsonValue.GetArray("errorEntries"); for(unsigned errorEntriesIndex = 0; errorEntriesIndex < errorEntriesJsonList.GetLength(); ++errorEntriesIndex) { m_errorEntries.push_back(errorEntriesJsonList[errorEntriesIndex].AsObject()); } } if(jsonValue.ValueExists("successEntries")) { Aws::Utils::Array successEntriesJsonList = jsonValue.GetArray("successEntries"); for(unsigned successEntriesIndex = 0; successEntriesIndex < successEntriesJsonList.GetLength(); ++successEntriesIndex) { m_successEntries.push_back(successEntriesJsonList[successEntriesIndex].AsObject()); } } if(jsonValue.ValueExists("skippedEntries")) { Aws::Utils::Array skippedEntriesJsonList = jsonValue.GetArray("skippedEntries"); for(unsigned skippedEntriesIndex = 0; skippedEntriesIndex < skippedEntriesJsonList.GetLength(); ++skippedEntriesIndex) { m_skippedEntries.push_back(skippedEntriesJsonList[skippedEntriesIndex].AsObject()); } } if(jsonValue.ValueExists("nextToken")) { m_nextToken = jsonValue.GetString("nextToken"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }