<?php

declare(strict_types=1);

namespace App\Framework\Waf\MachineLearning;

use App\Framework\Waf\Analysis\ValueObjects\RequestAnalysisData;
use App\Framework\Waf\MachineLearning\ValueObjects\BehaviorFeature;

/**
 * Interface for extracting behavioral features from request data
 */
interface FeatureExtractorInterface
{
    /**
     * Get the behavior type this extractor handles
     */
    public function getBehaviorType(): BehaviorType;

    /**
     * Check if extractor can process the given request data
     */
    public function canExtract(RequestAnalysisData $requestData): bool;

    /**
     * Extract behavioral features from request data
     *
     * @return BehaviorFeature[]
     */
    public function extractFeatures(RequestAnalysisData $requestData, array $context = []): array;

    /**
     * Get feature names this extractor produces
     */
    public function getFeatureNames(): array;

    /**
     * Get extractor configuration
     */
    public function getConfiguration(): array;

    /**
     * Check if extractor is enabled
     */
    public function isEnabled(): bool;

    /**
     * Get processing priority (higher = runs earlier)
     */
    public function getPriority(): int;

    /**
     * Get expected processing time in milliseconds
     */
    public function getExpectedProcessingTime(): int;

    /**
     * Check if extractor supports parallel execution
     */
    public function supportsParallelExecution(): bool;

    /**
     * Get extractor dependencies (extractors that must run before this one)
     */
    public function getDependencies(): array;
}
