/** * 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::CodeCommit::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; TestRepositoryTriggersResult::TestRepositoryTriggersResult() { } TestRepositoryTriggersResult::TestRepositoryTriggersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TestRepositoryTriggersResult& TestRepositoryTriggersResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("successfulExecutions")) { Array successfulExecutionsJsonList = jsonValue.GetArray("successfulExecutions"); for(unsigned successfulExecutionsIndex = 0; successfulExecutionsIndex < successfulExecutionsJsonList.GetLength(); ++successfulExecutionsIndex) { m_successfulExecutions.push_back(successfulExecutionsJsonList[successfulExecutionsIndex].AsString()); } } if(jsonValue.ValueExists("failedExecutions")) { Array failedExecutionsJsonList = jsonValue.GetArray("failedExecutions"); for(unsigned failedExecutionsIndex = 0; failedExecutionsIndex < failedExecutionsJsonList.GetLength(); ++failedExecutionsIndex) { m_failedExecutions.push_back(failedExecutionsJsonList[failedExecutionsIndex].AsObject()); } } return *this; }