/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include using namespace Aws::CodeBuild::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchGetReportsResult::BatchGetReportsResult() { } BatchGetReportsResult::BatchGetReportsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchGetReportsResult& BatchGetReportsResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("reports")) { Array reportsJsonList = jsonValue.GetArray("reports"); for(unsigned reportsIndex = 0; reportsIndex < reportsJsonList.GetLength(); ++reportsIndex) { m_reports.push_back(reportsJsonList[reportsIndex].AsObject()); } } if(jsonValue.ValueExists("reportsNotFound")) { Array reportsNotFoundJsonList = jsonValue.GetArray("reportsNotFound"); for(unsigned reportsNotFoundIndex = 0; reportsNotFoundIndex < reportsNotFoundJsonList.GetLength(); ++reportsNotFoundIndex) { m_reportsNotFound.push_back(reportsNotFoundJsonList[reportsNotFoundIndex].AsString()); } } return *this; }