package at.procon.eventhub.processing.dto;

import at.procon.eventhub.processing.eventprocessing.partition.RuntimeEventScopeType;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Set;

public record RuntimeVehicleEvidenceAttachmentDecisionDto(
        String decision,
        String reason,
        String eventKey,
        String externalSourceEventId,
        OffsetDateTime occurredAt,
        String eventDomain,
        String eventType,
        String lifecycle,
        RuntimeEventScopeType scopeType,
        Set<String> vehicleKeys,
        List<String> matchingVehicleUsageIntervalIds
) {
    public RuntimeVehicleEvidenceAttachmentDecisionDto {
        vehicleKeys = vehicleKeys == null ? Set.of() : Set.copyOf(vehicleKeys);
        matchingVehicleUsageIntervalIds = matchingVehicleUsageIntervalIds == null ? List.of() : List.copyOf(matchingVehicleUsageIntervalIds);
    }
}
