/** * 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::RoboMaker::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchDescribeSimulationJobResult::BatchDescribeSimulationJobResult() { } BatchDescribeSimulationJobResult::BatchDescribeSimulationJobResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchDescribeSimulationJobResult& BatchDescribeSimulationJobResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("jobs")) { Aws::Utils::Array jobsJsonList = jsonValue.GetArray("jobs"); for(unsigned jobsIndex = 0; jobsIndex < jobsJsonList.GetLength(); ++jobsIndex) { m_jobs.push_back(jobsJsonList[jobsIndex].AsObject()); } } if(jsonValue.ValueExists("unprocessedJobs")) { Aws::Utils::Array unprocessedJobsJsonList = jsonValue.GetArray("unprocessedJobs"); for(unsigned unprocessedJobsIndex = 0; unprocessedJobsIndex < unprocessedJobsJsonList.GetLength(); ++unprocessedJobsIndex) { m_unprocessedJobs.push_back(unprocessedJobsJsonList[unprocessedJobsIndex].AsString()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }