/** * 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::CodeBuild::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchGetBuildBatchesResult::BatchGetBuildBatchesResult() { } BatchGetBuildBatchesResult::BatchGetBuildBatchesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchGetBuildBatchesResult& BatchGetBuildBatchesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("buildBatches")) { Aws::Utils::Array buildBatchesJsonList = jsonValue.GetArray("buildBatches"); for(unsigned buildBatchesIndex = 0; buildBatchesIndex < buildBatchesJsonList.GetLength(); ++buildBatchesIndex) { m_buildBatches.push_back(buildBatchesJsonList[buildBatchesIndex].AsObject()); } } if(jsonValue.ValueExists("buildBatchesNotFound")) { Aws::Utils::Array buildBatchesNotFoundJsonList = jsonValue.GetArray("buildBatchesNotFound"); for(unsigned buildBatchesNotFoundIndex = 0; buildBatchesNotFoundIndex < buildBatchesNotFoundJsonList.GetLength(); ++buildBatchesNotFoundIndex) { m_buildBatchesNotFound.push_back(buildBatchesNotFoundJsonList[buildBatchesNotFoundIndex].AsString()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }