package at.procon.eventhub.processing.eventprocessing.validation;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

public record RuntimeTachographParityValidationResultDto(
        String profileKey,
        String status,
        List<UUID> sessionIds,
        int selectedDriverCount,
        Map<String, RuntimeTachographDriverParityResultDto> driverResults,
        List<String> notes,
        List<String> warnings
) {
    public RuntimeTachographParityValidationResultDto {
        sessionIds = sessionIds == null ? List.of() : List.copyOf(sessionIds);
        driverResults = driverResults == null ? Map.of() : Map.copyOf(new LinkedHashMap<>(driverResults));
        notes = notes == null ? List.of() : List.copyOf(notes);
        warnings = warnings == null ? List.of() : List.copyOf(warnings);
    }
}
