/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { SerializationFactory, guaranteeNonNullable, isNonNullable, } from '@finos/legend-shared';
import { SKIP, createModelSchema, custom, list } from 'serializr';
import { V1_deserializeDebugTestResult } from '../../transformation/pureProtocol/serializationHelpers/V1_TestSerializationHelper.js';
import { V1_buildDebugTestResult } from '../../transformation/pureGraph/to/helpers/V1_TestResultBuilderHelper.js';
export class V1_TestDebug {
    testable;
    atomicTestId;
    testSuiteId;
    error;
}
export class V1_UnknownTestDebug extends V1_TestDebug {
    value;
}
export class V1_TestExecutionPlanDebug extends V1_TestDebug {
    executionPlan;
    debug;
}
export class V1_DebugTestsResult {
    results = [];
    static serialization = new SerializationFactory(createModelSchema(V1_DebugTestsResult, {
        results: list(custom((value) => SKIP, V1_deserializeDebugTestResult)),
    }));
}
export const V1_buildDebugTestsResult = (results, testableFinder) => results.results
    .map((r) => V1_buildDebugTestResult(r, guaranteeNonNullable(testableFinder(r.testable))))
    .filter(isNonNullable);
//# sourceMappingURL=V1_DebugTestsResult.js.map