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

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

public record RuntimeMixedSourceEvidenceValidationResultDto(
        String profileKey,
        String status,
        int partitionCount,
        int totalAttachedVehicleEvidenceEventCount,
        int totalIgnoredVehicleEvidenceEventCount,
        int totalNormalizedSupportEvidenceEventCount,
        int totalSupportGeoEventCount,
        Map<String, RuntimeMixedSourceEvidencePartitionValidationDto> partitions,
        List<String> notes,
        List<String> warnings
) {
    public RuntimeMixedSourceEvidenceValidationResultDto {
        partitions = partitions == null ? Map.of() : Collections.unmodifiableMap(new LinkedHashMap<>(partitions));
        notes = notes == null ? List.of() : List.copyOf(notes);
        warnings = warnings == null ? List.of() : List.copyOf(warnings);
    }
}
