package at.procon.eventhub.processing.model;

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

public record UnifiedRuntimeEventBundle(
        UnifiedRuntimeProcessingRequest request,
        List<EventHubEventDto> driverSeedEvents,
        List<UnifiedDiscoveredVehicleRef> discoveredVehicles,
        List<EventHubEventDto> expandedVehicleEvents,
        List<EventHubEventDto> mergedEvents,
        List<String> notes
) {
    public UnifiedRuntimeEventBundle {
        driverSeedEvents = driverSeedEvents == null ? List.of() : List.copyOf(driverSeedEvents);
        discoveredVehicles = discoveredVehicles == null ? List.of() : List.copyOf(discoveredVehicles);
        expandedVehicleEvents = expandedVehicleEvents == null ? List.of() : List.copyOf(expandedVehicleEvents);
        mergedEvents = mergedEvents == null ? List.of() : List.copyOf(mergedEvents);
        notes = notes == null ? List.of() : List.copyOf(notes);
    }
}
