<?php

declare(strict_types=1);

namespace App\Framework\Waf\MachineLearning;

use App\Framework\Core\ValueObjects\Percentage;

/**
 * Interface for anomaly detectors that support confidence adjustments
 */
interface ConfidenceAdjustableInterface
{
    /**
     * Adjust the confidence calculation by the specified percentage
     *
     * Positive adjustment: Increase confidence (more certain about detections)
     * Negative adjustment: Decrease confidence (less certain about detections)
     *
     * @param Percentage $adjustment The percentage to adjust the confidence by
     * @return bool True if adjustment was successful
     */
    public function adjustConfidence(Percentage $adjustment): bool;

    /**
     * Get the current confidence multiplier
     *
     * @return float The current confidence multiplier
     */
    public function getConfidenceMultiplier(): float;

    /**
     * Set the confidence multiplier to a specific value
     *
     * @param float $multiplier The new confidence multiplier
     * @return bool True if setting was successful
     */
    public function setConfidenceMultiplier(float $multiplier): bool;
}
