{
  "$schema": "https://json-schema.org/draft-04/schema#",
  "additionalProperties": true,
  "description": "Generic query properties",
  "properties": {
    "datasource": {
      "additionalProperties": false,
      "description": "The datasource",
      "properties": {
        "type": {
          "description": "The datasource plugin type",
          "type": "string"
        },
        "uid": {
          "description": "Datasource UID",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "hide": {
      "description": "true if query is disabled (ie should not be returned to the dashboard)\nNOTE: this does not always imply that the query should not be executed since\nthe results from a hidden query may be used as the input to other queries (SSE etc)",
      "type": "boolean"
    },
    "intervalMs": {
      "description": "Interval is the suggested duration between time points in a time series query.\nNOTE: the values for intervalMs is not saved in the query model.  It is typically calculated\nfrom the interval required to fill a pixels in the visualization",
      "type": "number"
    },
    "maxDataPoints": {
      "description": "MaxDataPoints is the maximum number of data points that should be returned from a time series query.\nNOTE: the values for maxDataPoints is not saved in the query model.  It is typically calculated\nfrom the number of pixels visible in a visualization",
      "type": "integer"
    },
    "queryType": {
      "description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries.",
      "type": "string"
    },
    "refId": {
      "description": "RefID is the unique identifier of the query, set by the frontend call.",
      "type": "string"
    },
    "resultAssertions": {
      "additionalProperties": false,
      "description": "Optionally define expected query result behavior",
      "properties": {
        "maxFrames": {
          "description": "Maximum frame count",
          "type": "integer"
        },
        "type": {
          "description": "Type asserts that the frame matches a known type structure.\n\n\nPossible enum values:\n - `\"\"` \n - `\"timeseries-wide\"` \n - `\"timeseries-long\"` \n - `\"timeseries-many\"` \n - `\"timeseries-multi\"` \n - `\"directory-listing\"` \n - `\"table\"` \n - `\"numeric-wide\"` \n - `\"numeric-multi\"` \n - `\"numeric-long\"` \n - `\"log-lines\"` ",
          "enum": [
            "",
            "timeseries-wide",
            "timeseries-long",
            "timeseries-many",
            "timeseries-multi",
            "directory-listing",
            "table",
            "numeric-wide",
            "numeric-multi",
            "numeric-long",
            "log-lines"
          ],
          "type": "string",
          "x-enum-description": {}
        },
        "typeVersion": {
          "description": "TypeVersion is the version of the Type property. Versions greater than 0.0 correspond to the dataplane\ncontract documentation https://grafana.github.io/dataplane/contract/.",
          "items": {
            "type": "integer"
          },
          "maxItems": 2,
          "minItems": 2,
          "type": "array"
        }
      },
      "required": [
        "typeVersion"
      ],
      "type": "object"
    },
    "timeRange": {
      "additionalProperties": false,
      "description": "TimeRange represents the query range\nNOTE: unlike generic /ds/query, we can now send explicit time values in each query\nNOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly",
      "properties": {
        "from": {
          "default": "now-6h",
          "description": "From is the start time of the query.",
          "examples": [
            "now-1h"
          ],
          "type": "string"
        },
        "to": {
          "default": "now",
          "description": "To is the end time of the query.",
          "examples": [
            "now"
          ],
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "type": "object"
    }
  },
  "type": "object"
}