/** * 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; BatchDeleteBuildsResult::BatchDeleteBuildsResult() { } BatchDeleteBuildsResult::BatchDeleteBuildsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchDeleteBuildsResult& BatchDeleteBuildsResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("buildsDeleted")) { Aws::Utils::Array buildsDeletedJsonList = jsonValue.GetArray("buildsDeleted"); for(unsigned buildsDeletedIndex = 0; buildsDeletedIndex < buildsDeletedJsonList.GetLength(); ++buildsDeletedIndex) { m_buildsDeleted.push_back(buildsDeletedJsonList[buildsDeletedIndex].AsString()); } } if(jsonValue.ValueExists("buildsNotDeleted")) { Aws::Utils::Array buildsNotDeletedJsonList = jsonValue.GetArray("buildsNotDeleted"); for(unsigned buildsNotDeletedIndex = 0; buildsNotDeletedIndex < buildsNotDeletedJsonList.GetLength(); ++buildsNotDeletedIndex) { m_buildsNotDeleted.push_back(buildsNotDeletedJsonList[buildsNotDeletedIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }