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

import at.procon.eventhub.processing.eventprocessing.dto.RuntimeEventProcessingApiRequest;
import at.procon.eventhub.processing.eventprocessing.dto.RuntimeEventProcessingResultDto;
import at.procon.eventhub.processing.eventprocessing.partition.RuntimeEventPartitioningStrategy;
import java.util.List;
import java.util.Set;

public interface RuntimeEventProcessingProfile {

    String profileKey();

    RuntimeEventPartitioningStrategy defaultPartitioningStrategy();

    default String displayName() {
        return profileKey();
    }

    default String description() {
        return "";
    }

    default List<RuntimeEventPartitioningStrategy> supportedPartitioningStrategies() {
        RuntimeEventPartitioningStrategy defaultStrategy = defaultPartitioningStrategy();
        return defaultStrategy == null ? List.of() : List.of(defaultStrategy);
    }

    default Set<String> requiredParameters() {
        return Set.of();
    }

    default Set<String> optionalParameters() {
        return Set.of();
    }

    RuntimeEventProcessingResultDto process(RuntimeEventProcessingApiRequest request);
}
