{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-functions/json-schema/microsoft-azure-functions-detector-response-schema.json",
  "title": "DetectorResponse",
  "description": "Class representing Response from Detector",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-functions-diagnostics-api-openapi.yml#/components/schemas/DetectorResponse",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/DetectorResponseProperties",
      "description": "DetectorResponse resource specific properties",
      "x-ms-client-flatten": true
    },
    "kind": {
      "type": "string",
      "description": "Kind of resource."
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "DataProviderMetadata": {
      "type": "object",
      "description": "Additional configuration for a data providers",
      "properties": {
        "providerName": {
          "type": "string"
        },
        "propertyBag": {
          "type": "array",
          "description": "Settings for the data provider",
          "items": {
            "$ref": "#/$defs/KeyValuePairStringObject"
          },
          "readOnly": true,
          "x-ms-identifiers": [
            "key"
          ]
        }
      }
    },
    "DataTableResponseColumn": {
      "type": "object",
      "description": "Column definition",
      "properties": {
        "columnName": {
          "type": "string",
          "description": "Name of the column"
        },
        "dataType": {
          "type": "string",
          "description": "Data type which looks like 'String' or 'Int32'."
        },
        "columnType": {
          "type": "string",
          "description": "Column Type"
        }
      }
    },
    "DataTableResponseObject": {
      "type": "object",
      "description": "Data Table which defines columns and raw row values",
      "properties": {
        "tableName": {
          "type": "string",
          "description": "Name of the table"
        },
        "columns": {
          "type": "array",
          "description": "List of columns with data types",
          "items": {
            "$ref": "#/$defs/DataTableResponseColumn"
          },
          "x-ms-identifiers": [
            "columnName"
          ]
        },
        "rows": {
          "type": "array",
          "description": "Raw row values",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "x-ms-identifiers": []
        }
      }
    },
    "DetectorInfo": {
      "type": "object",
      "description": "Definition of Detector",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of detector",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Name of detector",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "description": "Short description of the detector and its purpose.",
          "readOnly": true
        },
        "author": {
          "type": "string",
          "description": "Author of the detector.",
          "readOnly": true
        },
        "category": {
          "type": "string",
          "description": "Problem category. This serves for organizing group for detectors.",
          "readOnly": true
        },
        "supportTopicList": {
          "type": "array",
          "description": "List of Support Topics for which this detector is enabled.",
          "items": {
            "$ref": "#/$defs/SupportTopic"
          },
          "readOnly": true
        },
        "analysisType": {
          "type": "array",
          "description": "Analysis Types for which this detector should apply to.",
          "items": {
            "type": "string"
          },
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/DetectorType",
          "description": "Whether this detector is an Analysis Detector or not.",
          "readOnly": true
        },
        "score": {
          "type": "number",
          "format": "float",
          "description": "Defines score of a detector to power ML based matching.",
          "readOnly": true
        }
      }
    },
    "DetectorResponseProperties": {
      "type": "object",
      "description": "DetectorResponse resource specific properties",
      "properties": {
        "metadata": {
          "$ref": "#/$defs/DetectorInfo",
          "description": "metadata for the detector"
        },
        "dataset": {
          "type": "array",
          "description": "Data Set",
          "items": {
            "$ref": "#/$defs/DiagnosticData"
          },
          "x-ms-identifiers": []
        },
        "status": {
          "$ref": "#/$defs/Status",
          "description": "Indicates status of the most severe insight."
        },
        "dataProvidersMetadata": {
          "type": "array",
          "description": "Additional configuration for different data providers to be used by the UI",
          "items": {
            "$ref": "#/$defs/DataProviderMetadata"
          },
          "x-ms-identifiers": [
            "providerName"
          ]
        },
        "suggestedUtterances": {
          "$ref": "#/$defs/QueryUtterancesResults",
          "description": "Suggested utterances where the detector can be applicable."
        }
      }
    },
    "DetectorType": {
      "type": "string",
      "description": "Whether this detector is an Analysis Detector or not.",
      "enum": [
        "Detector",
        "Analysis",
        "CategoryOverview"
      ],
      "x-ms-enum": {
        "name": "DetectorType",
        "modelAsString": false
      }
    },
    "DiagnosticData": {
      "type": "object",
      "description": "Set of data with rendering instructions",
      "properties": {
        "table": {
          "$ref": "#/$defs/DataTableResponseObject",
          "description": "Data in table form"
        },
        "renderingProperties": {
          "$ref": "#/$defs/Rendering",
          "description": "Properties that describe how the table should be rendered"
        }
      }
    },
    "InsightStatus": {
      "type": "string",
      "description": "Level of the most severe insight generated by the detector.",
      "enum": [
        "Critical",
        "Warning",
        "Info",
        "Success",
        "None"
      ],
      "x-ms-enum": {
        "name": "InsightStatus",
        "modelAsString": false
      }
    },
    "KeyValuePairStringObject": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "readOnly": true
        },
        "value": {
          "description": "Any object",
          "readOnly": true
        }
      }
    },
    "QueryUtterancesResult": {
      "type": "object",
      "description": "Result for utterances query.",
      "properties": {
        "sampleUtterance": {
          "$ref": "#/$defs/SampleUtterance",
          "description": "A sample utterance."
        },
        "score": {
          "type": "number",
          "format": "float",
          "description": "Score of a sample utterance."
        }
      }
    },
    "QueryUtterancesResults": {
      "type": "object",
      "description": "Suggested utterances where the detector can be applicable",
      "properties": {
        "query": {
          "type": "string",
          "description": "Search Query."
        },
        "results": {
          "type": "array",
          "description": "Array of utterance results for search query.",
          "items": {
            "$ref": "#/$defs/QueryUtterancesResult"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "Rendering": {
      "type": "object",
      "description": "Instructions for rendering the data",
      "properties": {
        "type": {
          "$ref": "#/$defs/RenderingType",
          "description": "Rendering Type"
        },
        "title": {
          "type": "string",
          "description": "Title of data"
        },
        "description": {
          "type": "string",
          "description": "Description of the data that will help it be interpreted"
        }
      }
    },
    "RenderingType": {
      "type": "string",
      "description": "Rendering Type",
      "enum": [
        "NoGraph",
        "Table",
        "TimeSeries",
        "TimeSeriesPerInstance",
        "PieChart",
        "DataSummary",
        "Email",
        "Insights",
        "DynamicInsight",
        "Markdown",
        "Detector",
        "DropDown",
        "Card",
        "Solution",
        "Guage",
        "Form",
        "ChangeSets",
        "ChangeAnalysisOnboarding",
        "ChangesView",
        "AppInsight",
        "DependencyGraph",
        "DownTime",
        "SummaryCard",
        "SearchComponent",
        "AppInsightEnablement"
      ],
      "x-ms-enum": {
        "name": "RenderingType",
        "modelAsString": false
      }
    },
    "SampleUtterance": {
      "type": "object",
      "description": "Sample utterance.",
      "properties": {
        "text": {
          "type": "string",
          "description": "Text attribute of sample utterance."
        },
        "links": {
          "type": "array",
          "description": "Links attribute of sample utterance.",
          "items": {
            "type": "string"
          }
        },
        "qid": {
          "type": "string",
          "description": "Question id of sample utterance (for stackoverflow questions titles)."
        }
      }
    },
    "Status": {
      "type": "object",
      "description": "Identify the status of the most severe insight generated by the detector.",
      "properties": {
        "message": {
          "type": "string",
          "description": "Descriptive message."
        },
        "statusId": {
          "$ref": "#/$defs/InsightStatus",
          "description": "Level of the most severe insight generated by the detector."
        }
      }
    },
    "SupportTopic": {
      "type": "object",
      "description": "Defines a unique Support Topic",
      "properties": {
        "id": {
          "type": "string",
          "description": "Support Topic Id",
          "readOnly": true
        },
        "pesId": {
          "type": "string",
          "description": "Unique resource Id",
          "readOnly": true
        }
      }
    }
  }
}