{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AlertSimulateResponse",
  "title": "AlertSimulateResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "number",
        "format": "double"
      },
      "description": "Data values for each point."
    },
    "dates": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Date labels for each point."
    },
    "scores": {
      "type": "array",
      "items": {
        "type": "number",
        "format": "double",
        "nullable": true
      },
      "description": "Anomaly score for each point (null if insufficient data)."
    },
    "triggered_indices": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Indices of points flagged as anomalies."
    },
    "triggered_dates": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dates of points flagged as anomalies."
    },
    "interval": {
      "type": "string",
      "nullable": true,
      "description": "Interval of the trends query (hour, day, week, month)."
    },
    "total_points": {
      "type": "integer",
      "description": "Total number of data points analyzed."
    },
    "anomaly_count": {
      "type": "integer",
      "description": "Number of anomalies detected."
    },
    "sub_detector_scores": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Per-sub-detector scores for ensemble detectors. Each entry has 'type' and 'scores' fields."
    },
    "breakdown_results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/BreakdownSimulationResult"
      },
      "description": "Per-breakdown-value simulation results. Present only when the insight has breakdowns (up to 25 values)."
    }
  },
  "required": [
    "anomaly_count",
    "data",
    "dates",
    "interval",
    "scores",
    "total_points",
    "triggered_dates",
    "triggered_indices"
  ]
}