{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-vault/json-schema/google-vault-saved-query-schema.json",
  "title": "SavedQuery",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-vault-saved-queries-api-openapi.yml#/components/schemas/SavedQuery",
  "type": "object",
  "properties": {
    "savedQueryId": {
      "type": "string"
    },
    "matterId": {
      "type": "string"
    },
    "displayName": {
      "type": "string"
    },
    "query": {
      "$ref": "#/$defs/Query"
    },
    "createTime": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Query": {
      "type": "object",
      "properties": {
        "corpus": {
          "type": "string",
          "enum": [
            "CORPUS_TYPE_UNSPECIFIED",
            "DRIVE",
            "MAIL",
            "GROUPS",
            "HANGOUTS_CHAT",
            "VOICE",
            "CALENDAR"
          ]
        },
        "dataScope": {
          "type": "string",
          "enum": [
            "DATA_SCOPE_UNSPECIFIED",
            "ALL_DATA",
            "HELD_DATA",
            "UNPROCESSED_DATA"
          ]
        },
        "searchMethod": {
          "type": "string",
          "enum": [
            "SEARCH_METHOD_UNSPECIFIED",
            "ACCOUNT",
            "ORG_UNIT",
            "TEAM_DRIVE",
            "ENTIRE_ORG",
            "ROOM",
            "SITES_URL",
            "SHARED_DRIVE"
          ]
        },
        "terms": {
          "type": "string"
        },
        "startTime": {
          "type": "string",
          "format": "date-time"
        },
        "endTime": {
          "type": "string",
          "format": "date-time"
        },
        "timeZone": {
          "type": "string"
        }
      }
    }
  }
}