package at.procon.eventhub.processing.model;

import at.procon.eventhub.dto.EventHubEventDto;
import java.util.List;

public record RuntimeDriverVehicleEvidenceAttachmentResult(
        String driverKey,
        List<EventHubEventDto> directDriverEvents,
        List<EventHubEventDto> attachedVehicleEvidenceEvents,
        List<EventHubEventDto> mergedEvents,
        int vehicleUsageIntervalCount,
        int candidateVehicleEvidenceEventCount,
        int ignoredVehicleEvidenceEventCount,
        List<String> notes,
        List<String> warnings
) {
    public RuntimeDriverVehicleEvidenceAttachmentResult {
        directDriverEvents = directDriverEvents == null ? List.of() : List.copyOf(directDriverEvents);
        attachedVehicleEvidenceEvents = attachedVehicleEvidenceEvents == null ? List.of() : List.copyOf(attachedVehicleEvidenceEvents);
        mergedEvents = mergedEvents == null ? List.of() : List.copyOf(mergedEvents);
        notes = notes == null ? List.of() : List.copyOf(notes);
        warnings = warnings == null ? List.of() : List.copyOf(warnings);
    }
}
