/** * 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::ECR::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchGetImageResult::BatchGetImageResult() { } BatchGetImageResult::BatchGetImageResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchGetImageResult& BatchGetImageResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("images")) { Array imagesJsonList = jsonValue.GetArray("images"); for(unsigned imagesIndex = 0; imagesIndex < imagesJsonList.GetLength(); ++imagesIndex) { m_images.push_back(imagesJsonList[imagesIndex].AsObject()); } } if(jsonValue.ValueExists("failures")) { Array failuresJsonList = jsonValue.GetArray("failures"); for(unsigned failuresIndex = 0; failuresIndex < failuresJsonList.GetLength(); ++failuresIndex) { m_failures.push_back(failuresJsonList[failuresIndex].AsObject()); } } return *this; }