package at.procon.eventhub.processing.dto;

import java.util.List;

public record RuntimeDriverPartitionDebugDto(
        String driverKey,
        int directDriverEventCount,
        int vehicleUsageIntervalCount,
        int candidateVehicleEvidenceEventCount,
        int attachedVehicleEvidenceEventCount,
        int ignoredVehicleEvidenceEventCount,
        int mergedEventCount,
        List<RuntimeVehicleUsageIntervalDebugDto> vehicleUsageIntervals,
        List<RuntimeVehicleEvidenceAttachmentDecisionDto> vehicleEvidenceDecisions,
        List<String> notes,
        List<String> warnings
) {
    public RuntimeDriverPartitionDebugDto {
        vehicleUsageIntervals = vehicleUsageIntervals == null ? List.of() : List.copyOf(vehicleUsageIntervals);
        vehicleEvidenceDecisions = vehicleEvidenceDecisions == null ? List.of() : List.copyOf(vehicleEvidenceDecisions);
        notes = notes == null ? List.of() : List.copyOf(notes);
        warnings = warnings == null ? List.of() : List.copyOf(warnings);
    }
}
