<?php

namespace Drupal\api_monitor_client\Plugin;

use Drupal\Component\Plugin\PluginInspectionInterface;

/**
 * Interface for API monitor probe plugins.
 */
interface ApiMonitorProbeInterface extends PluginInspectionInterface {

  /**
   * Retrieves the payload associated with the current instance.
   *
   * @return mixed
   *   The payload data, which can be of any type.
   */
  public function getPayload();

  /**
   * Validates the given response to ensure it meets the expected criteria.
   *
   * @param mixed $response
   *   The response to be validated. It can be of any type.
   *
   * @return bool
   *   True if the response is valid, false otherwise.
   */
  public function validateResponse($response);

  /**
   * Retrieves the parameters associated with the current route.
   *
   * @return array
   *   An associative array of route parameters.
   */
  public function getRouteParameters();

  /**
   * Retrieves the query options configured for the current instance.
   *
   * @return array
   *   An associative array containing key-value pairs of query options.
   */
  public function getQueryOptions();

  /**
   * Gets the uptime threshold value.
   *
   * @return int
   *   The uptime threshold in seconds.
   */
  public function getUptimeThreshold();

  /**
   * Retrieves the count of critical alerts.
   *
   * @return int
   *   The number of critical alerts.
   */
  public function getCriticalAlertCount();

  /**
   * Checks if the probe is authorized to return PII (Personally Identifiable Information).
   *
   * @return bool
   *   True if PII is authorized, false otherwise.
   */
  public function isPiiAuthorized(): bool;

}
