{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-global-search-response-body-schema.json",
  "title": "_global.search.ResponseBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-search-api-openapi.yml#/components/schemas/_global.search.ResponseBody",
  "type": "object",
  "properties": {
    "took": {
      "description": "The number of milliseconds it took Elasticsearch to run the request.\nThis value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response.\nIt includes:\n\n* Communication time between the coordinating node and data nodes\n* Time the request spends in the search thread pool, queued for execution\n* Actual run time\n\nIt does not include:\n\n* Time needed to send the request to Elasticsearch\n* Time needed to serialize the JSON response\n* Time needed to send the response to a client",
      "type": "number"
    },
    "timed_out": {
      "description": "If `true`, the request timed out before completion; returned results may be partial or empty.",
      "type": "boolean"
    },
    "_shards": {
      "description": "A count of shards used for the request.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.ShardStatistics"
        }
      ]
    },
    "hits": {
      "description": "The returned documents and metadata.",
      "allOf": [
        {
          "$ref": "#/$defs/_global.search._types.HitsMetadata"
        }
      ]
    },
    "aggregations": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/_types.aggregations.Aggregate"
      }
    },
    "_clusters": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.ClusterStatistics"
        }
      ]
    },
    "fields": {
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    },
    "max_score": {
      "type": "number"
    },
    "num_reduce_phases": {
      "type": "number"
    },
    "profile": {
      "allOf": [
        {
          "$ref": "#/$defs/_global.search._types.Profile"
        }
      ]
    },
    "pit_id": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.Id"
        }
      ]
    },
    "_scroll_id": {
      "description": "The identifier for the search and its search context.\nYou can use this scroll ID with the scroll API to retrieve the next batch of search results for the request.\nThis property is returned only if the `scroll` query parameter is specified in the request.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.ScrollId"
        }
      ]
    },
    "suggest": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/_global.search._types.Suggest"
        }
      }
    },
    "terminated_early": {
      "type": "boolean"
    }
  },
  "required": [
    "took",
    "timed_out",
    "_shards",
    "hits"
  ],
  "$defs": {
    "_global.explain.Explanation": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.explain.ExplanationDetail"
          }
        },
        "value": {
          "type": "number"
        }
      },
      "required": [
        "description",
        "details",
        "value"
      ]
    },
    "_global.explain.ExplanationDetail": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.explain.ExplanationDetail"
          }
        },
        "value": {
          "type": "number"
        }
      },
      "required": [
        "description",
        "value"
      ]
    },
    "_global.search._types.AggregationBreakdown": {
      "type": "object",
      "properties": {
        "build_aggregation": {
          "type": "number"
        },
        "build_aggregation_count": {
          "type": "number"
        },
        "build_leaf_collector": {
          "type": "number"
        },
        "build_leaf_collector_count": {
          "type": "number"
        },
        "collect": {
          "type": "number"
        },
        "collect_count": {
          "type": "number"
        },
        "initialize": {
          "type": "number"
        },
        "initialize_count": {
          "type": "number"
        },
        "post_collection": {
          "type": "number"
        },
        "post_collection_count": {
          "type": "number"
        },
        "reduce": {
          "type": "number"
        },
        "reduce_count": {
          "type": "number"
        }
      },
      "required": [
        "build_aggregation",
        "build_aggregation_count",
        "build_leaf_collector",
        "build_leaf_collector_count",
        "collect",
        "collect_count",
        "initialize",
        "initialize_count",
        "reduce",
        "reduce_count"
      ]
    },
    "_global.search._types.AggregationProfile": {
      "type": "object",
      "properties": {
        "breakdown": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.AggregationBreakdown"
            }
          ]
        },
        "description": {
          "type": "string"
        },
        "time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "type": {
          "type": "string"
        },
        "debug": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.AggregationProfileDebug"
            }
          ]
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.AggregationProfile"
          }
        }
      },
      "required": [
        "breakdown",
        "description",
        "time_in_nanos",
        "type"
      ]
    },
    "_global.search._types.AggregationProfileDebug": {
      "type": "object",
      "properties": {
        "segments_with_multi_valued_ords": {
          "type": "number"
        },
        "collection_strategy": {
          "type": "string"
        },
        "segments_with_single_valued_ords": {
          "type": "number"
        },
        "total_buckets": {
          "type": "number"
        },
        "built_buckets": {
          "type": "number"
        },
        "result_strategy": {
          "type": "string"
        },
        "has_filter": {
          "type": "boolean"
        },
        "delegate": {
          "type": "string"
        },
        "delegate_debug": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.AggregationProfileDebug"
            }
          ]
        },
        "chars_fetched": {
          "type": "number"
        },
        "extract_count": {
          "type": "number"
        },
        "extract_ns": {
          "type": "number"
        },
        "values_fetched": {
          "type": "number"
        },
        "collect_analyzed_ns": {
          "type": "number"
        },
        "collect_analyzed_count": {
          "type": "number"
        },
        "surviving_buckets": {
          "type": "number"
        },
        "ordinals_collectors_used": {
          "type": "number"
        },
        "ordinals_collectors_overhead_too_high": {
          "type": "number"
        },
        "string_hashing_collectors_used": {
          "type": "number"
        },
        "numeric_collectors_used": {
          "type": "number"
        },
        "empty_collectors_used": {
          "type": "number"
        },
        "deferred_aggregators": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "segments_with_doc_count_field": {
          "type": "number"
        },
        "segments_with_deleted_docs": {
          "type": "number"
        },
        "filters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.AggregationProfileDelegateDebugFilter"
          }
        },
        "segments_counted": {
          "type": "number"
        },
        "segments_collected": {
          "type": "number"
        },
        "map_reducer": {
          "type": "string"
        },
        "brute_force_used": {
          "type": "number"
        },
        "dynamic_pruning_attempted": {
          "type": "number"
        },
        "dynamic_pruning_used": {
          "type": "number"
        },
        "skipped_due_to_no_data": {
          "type": "number"
        }
      }
    },
    "_global.search._types.AggregationProfileDelegateDebugFilter": {
      "type": "object",
      "properties": {
        "results_from_metadata": {
          "type": "number"
        },
        "query": {
          "type": "string"
        },
        "specialized_for": {
          "type": "string"
        },
        "segments_counted_in_constant_time": {
          "type": "number"
        }
      }
    },
    "_global.search._types.Collector": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.Collector"
          }
        }
      },
      "required": [
        "name",
        "reason",
        "time_in_nanos"
      ]
    },
    "_global.search._types.CompletionSuggest": {
      "allOf": [
        {
          "$ref": "#/$defs/_global.search._types.SuggestBase"
        },
        {
          "type": "object",
          "properties": {
            "options": {
              "oneOf": [
                {
                  "$ref": "#/$defs/_global.search._types.CompletionSuggestOption"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/_global.search._types.CompletionSuggestOption"
                  }
                }
              ]
            }
          },
          "required": [
            "options"
          ]
        }
      ]
    },
    "_global.search._types.CompletionSuggestOption": {
      "type": "object",
      "properties": {
        "collate_match": {
          "type": "boolean"
        },
        "contexts": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/_global.search._types.Context"
            }
          }
        },
        "fields": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "_id": {
          "type": "string"
        },
        "_index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "_routing": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Routing"
            }
          ]
        },
        "_score": {
          "type": "number"
        },
        "_source": {
          "type": "object"
        },
        "text": {
          "type": "string"
        },
        "score": {
          "type": "number"
        }
      },
      "required": [
        "text"
      ]
    },
    "_global.search._types.Context": {
      "description": "Text or location that we want similar documents for or a lookup to a document's field for the text.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/_types.GeoLocation"
        }
      ]
    },
    "_global.search._types.DfsKnnProfile": {
      "type": "object",
      "properties": {
        "vector_operations_count": {
          "type": "number"
        },
        "query": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.KnnQueryProfileResult"
          }
        },
        "rewrite_time": {
          "type": "number"
        },
        "collector": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.KnnCollectorResult"
          }
        }
      },
      "required": [
        "query",
        "rewrite_time",
        "collector"
      ]
    },
    "_global.search._types.DfsProfile": {
      "type": "object",
      "properties": {
        "statistics": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.DfsStatisticsProfile"
            }
          ]
        },
        "knn": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.DfsKnnProfile"
          }
        }
      }
    },
    "_global.search._types.DfsStatisticsBreakdown": {
      "type": "object",
      "properties": {
        "collection_statistics": {
          "type": "number"
        },
        "collection_statistics_count": {
          "type": "number"
        },
        "create_weight": {
          "type": "number"
        },
        "create_weight_count": {
          "type": "number"
        },
        "rewrite": {
          "type": "number"
        },
        "rewrite_count": {
          "type": "number"
        },
        "term_statistics": {
          "type": "number"
        },
        "term_statistics_count": {
          "type": "number"
        }
      },
      "required": [
        "collection_statistics",
        "collection_statistics_count",
        "create_weight",
        "create_weight_count",
        "rewrite",
        "rewrite_count",
        "term_statistics",
        "term_statistics_count"
      ]
    },
    "_global.search._types.DfsStatisticsProfile": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "time": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Duration"
            }
          ]
        },
        "time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "breakdown": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.DfsStatisticsBreakdown"
            }
          ]
        },
        "debug": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.DfsStatisticsProfile"
          }
        }
      },
      "required": [
        "type",
        "description",
        "time_in_nanos",
        "breakdown"
      ]
    },
    "_global.search._types.FetchProfile": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "breakdown": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.FetchProfileBreakdown"
            }
          ]
        },
        "debug": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.FetchProfileDebug"
            }
          ]
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.FetchProfile"
          }
        }
      },
      "required": [
        "type",
        "description",
        "time_in_nanos",
        "breakdown"
      ]
    },
    "_global.search._types.FetchProfileBreakdown": {
      "type": "object",
      "properties": {
        "load_source": {
          "type": "number"
        },
        "load_source_count": {
          "type": "number"
        },
        "load_stored_fields": {
          "type": "number"
        },
        "load_stored_fields_count": {
          "type": "number"
        },
        "next_reader": {
          "type": "number"
        },
        "next_reader_count": {
          "type": "number"
        },
        "process_count": {
          "type": "number"
        },
        "process": {
          "type": "number"
        }
      }
    },
    "_global.search._types.FetchProfileDebug": {
      "type": "object",
      "properties": {
        "stored_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "fast_path": {
          "type": "number"
        }
      }
    },
    "_global.search._types.Hit": {
      "type": "object",
      "properties": {
        "_index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "_id": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Id"
            }
          ]
        },
        "_score": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "_explanation": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.explain.Explanation"
            }
          ]
        },
        "fields": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "highlight": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "inner_hits": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_global.search._types.InnerHitsResult"
          }
        },
        "matched_queries": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "object",
              "additionalProperties": {
                "type": "number"
              }
            }
          ]
        },
        "_nested": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.NestedIdentity"
            }
          ]
        },
        "_ignored": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ignored_field_values": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "_shard": {
          "type": "string"
        },
        "_node": {
          "type": "string"
        },
        "_routing": {
          "type": "string"
        },
        "_source": {
          "type": "object"
        },
        "_rank": {
          "type": "number"
        },
        "_seq_no": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.SequenceNumber"
            }
          ]
        },
        "_primary_term": {
          "type": "number"
        },
        "_version": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.VersionNumber"
            }
          ]
        },
        "sort": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.SortResults"
            }
          ]
        }
      },
      "required": [
        "_index"
      ]
    },
    "_global.search._types.HitsMetadata": {
      "type": "object",
      "properties": {
        "total": {
          "description": "Total hit count information, present only if `track_total_hits` wasn't `false` in the search request.",
          "oneOf": [
            {
              "$ref": "#/$defs/_global.search._types.TotalHits"
            },
            {
              "type": "number"
            }
          ]
        },
        "hits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.Hit"
          }
        },
        "max_score": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        }
      },
      "required": [
        "hits"
      ]
    },
    "_global.search._types.InnerHitsResult": {
      "type": "object",
      "properties": {
        "hits": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.HitsMetadata"
            }
          ]
        }
      },
      "required": [
        "hits"
      ]
    },
    "_global.search._types.KnnCollectorResult": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "time": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Duration"
            }
          ]
        },
        "time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.KnnCollectorResult"
          }
        }
      },
      "required": [
        "name",
        "reason",
        "time_in_nanos"
      ]
    },
    "_global.search._types.KnnQueryProfileBreakdown": {
      "type": "object",
      "properties": {
        "advance": {
          "type": "number"
        },
        "advance_count": {
          "type": "number"
        },
        "build_scorer": {
          "type": "number"
        },
        "build_scorer_count": {
          "type": "number"
        },
        "compute_max_score": {
          "type": "number"
        },
        "compute_max_score_count": {
          "type": "number"
        },
        "count_weight": {
          "type": "number"
        },
        "count_weight_count": {
          "type": "number"
        },
        "create_weight": {
          "type": "number"
        },
        "create_weight_count": {
          "type": "number"
        },
        "match": {
          "type": "number"
        },
        "match_count": {
          "type": "number"
        },
        "next_doc": {
          "type": "number"
        },
        "next_doc_count": {
          "type": "number"
        },
        "score": {
          "type": "number"
        },
        "score_count": {
          "type": "number"
        },
        "set_min_competitive_score": {
          "type": "number"
        },
        "set_min_competitive_score_count": {
          "type": "number"
        },
        "shallow_advance": {
          "type": "number"
        },
        "shallow_advance_count": {
          "type": "number"
        }
      },
      "required": [
        "advance",
        "advance_count",
        "build_scorer",
        "build_scorer_count",
        "compute_max_score",
        "compute_max_score_count",
        "count_weight",
        "count_weight_count",
        "create_weight",
        "create_weight_count",
        "match",
        "match_count",
        "next_doc",
        "next_doc_count",
        "score",
        "score_count",
        "set_min_competitive_score",
        "set_min_competitive_score_count",
        "shallow_advance",
        "shallow_advance_count"
      ]
    },
    "_global.search._types.KnnQueryProfileResult": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "time": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Duration"
            }
          ]
        },
        "time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "breakdown": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.KnnQueryProfileBreakdown"
            }
          ]
        },
        "debug": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.KnnQueryProfileResult"
          }
        }
      },
      "required": [
        "type",
        "description",
        "time_in_nanos",
        "breakdown"
      ]
    },
    "_global.search._types.NestedIdentity": {
      "type": "object",
      "properties": {
        "field": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Field"
            }
          ]
        },
        "offset": {
          "type": "number"
        },
        "_nested": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.NestedIdentity"
            }
          ]
        }
      },
      "required": [
        "field",
        "offset"
      ]
    },
    "_global.search._types.PhraseSuggest": {
      "allOf": [
        {
          "$ref": "#/$defs/_global.search._types.SuggestBase"
        },
        {
          "type": "object",
          "properties": {
            "options": {
              "oneOf": [
                {
                  "$ref": "#/$defs/_global.search._types.PhraseSuggestOption"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/_global.search._types.PhraseSuggestOption"
                  }
                }
              ]
            }
          },
          "required": [
            "options"
          ]
        }
      ]
    },
    "_global.search._types.PhraseSuggestOption": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "score": {
          "type": "number"
        },
        "highlighted": {
          "type": "string"
        },
        "collate_match": {
          "type": "boolean"
        }
      },
      "required": [
        "text",
        "score"
      ]
    },
    "_global.search._types.Profile": {
      "type": "object",
      "properties": {
        "shards": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.ShardProfile"
          }
        }
      },
      "required": [
        "shards"
      ]
    },
    "_global.search._types.QueryBreakdown": {
      "type": "object",
      "properties": {
        "advance": {
          "type": "number"
        },
        "advance_count": {
          "type": "number"
        },
        "build_scorer": {
          "type": "number"
        },
        "build_scorer_count": {
          "type": "number"
        },
        "create_weight": {
          "type": "number"
        },
        "create_weight_count": {
          "type": "number"
        },
        "match": {
          "type": "number"
        },
        "match_count": {
          "type": "number"
        },
        "shallow_advance": {
          "type": "number"
        },
        "shallow_advance_count": {
          "type": "number"
        },
        "next_doc": {
          "type": "number"
        },
        "next_doc_count": {
          "type": "number"
        },
        "score": {
          "type": "number"
        },
        "score_count": {
          "type": "number"
        },
        "compute_max_score": {
          "type": "number"
        },
        "compute_max_score_count": {
          "type": "number"
        },
        "count_weight": {
          "type": "number"
        },
        "count_weight_count": {
          "type": "number"
        },
        "set_min_competitive_score": {
          "type": "number"
        },
        "set_min_competitive_score_count": {
          "type": "number"
        }
      },
      "required": [
        "advance",
        "advance_count",
        "build_scorer",
        "build_scorer_count",
        "create_weight",
        "create_weight_count",
        "match",
        "match_count",
        "shallow_advance",
        "shallow_advance_count",
        "next_doc",
        "next_doc_count",
        "score",
        "score_count",
        "compute_max_score",
        "compute_max_score_count",
        "count_weight",
        "count_weight_count",
        "set_min_competitive_score",
        "set_min_competitive_score_count"
      ]
    },
    "_global.search._types.QueryProfile": {
      "type": "object",
      "properties": {
        "breakdown": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.QueryBreakdown"
            }
          ]
        },
        "description": {
          "type": "string"
        },
        "time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "type": {
          "type": "string"
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.QueryProfile"
          }
        }
      },
      "required": [
        "breakdown",
        "description",
        "time_in_nanos",
        "type"
      ]
    },
    "_global.search._types.SearchProfile": {
      "type": "object",
      "properties": {
        "collector": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.Collector"
          }
        },
        "query": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.QueryProfile"
          }
        },
        "rewrite_time": {
          "type": "number"
        }
      },
      "required": [
        "collector",
        "query",
        "rewrite_time"
      ]
    },
    "_global.search._types.ShardProfile": {
      "type": "object",
      "properties": {
        "aggregations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.AggregationProfile"
          }
        },
        "cluster": {
          "type": "string"
        },
        "dfs": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.DfsProfile"
            }
          ]
        },
        "fetch": {
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.FetchProfile"
            }
          ]
        },
        "id": {
          "type": "string"
        },
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "node_id": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.NodeId"
            }
          ]
        },
        "searches": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_global.search._types.SearchProfile"
          }
        },
        "shard_id": {
          "type": "number"
        }
      },
      "required": [
        "aggregations",
        "cluster",
        "id",
        "index",
        "node_id",
        "searches",
        "shard_id"
      ]
    },
    "_global.search._types.Suggest": {
      "oneOf": [
        {
          "$ref": "#/$defs/_global.search._types.CompletionSuggest"
        },
        {
          "$ref": "#/$defs/_global.search._types.PhraseSuggest"
        },
        {
          "$ref": "#/$defs/_global.search._types.TermSuggest"
        }
      ]
    },
    "_global.search._types.SuggestBase": {
      "type": "object",
      "properties": {
        "length": {
          "type": "number"
        },
        "offset": {
          "type": "number"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "length",
        "offset",
        "text"
      ]
    },
    "_global.search._types.TermSuggest": {
      "allOf": [
        {
          "$ref": "#/$defs/_global.search._types.SuggestBase"
        },
        {
          "type": "object",
          "properties": {
            "options": {
              "oneOf": [
                {
                  "$ref": "#/$defs/_global.search._types.TermSuggestOption"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/_global.search._types.TermSuggestOption"
                  }
                }
              ]
            }
          },
          "required": [
            "options"
          ]
        }
      ]
    },
    "_global.search._types.TermSuggestOption": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "score": {
          "type": "number"
        },
        "freq": {
          "type": "number"
        },
        "highlighted": {
          "type": "string"
        },
        "collate_match": {
          "type": "boolean"
        }
      },
      "required": [
        "text",
        "score",
        "freq"
      ]
    },
    "_global.search._types.TotalHits": {
      "type": "object",
      "properties": {
        "relation": {
          "description": "\n\nSupported values include:\n  - `eq`: Accurate\n  - `gte`: Lower bound, including returned events or sequences\n\n",
          "allOf": [
            {
              "$ref": "#/$defs/_global.search._types.TotalHitsRelation"
            }
          ]
        },
        "value": {
          "type": "number"
        }
      },
      "required": [
        "relation",
        "value"
      ]
    },
    "_global.search._types.TotalHitsRelation": {
      "type": "string",
      "enum": [
        "eq",
        "gte"
      ]
    },
    "_spec_utils.Void": {
      "description": "The absence of any type. This is commonly used in APIs that don't return a body.\n\nAlthough \"void\" is generally used for the unit type that has only one value, this is to be interpreted as\nthe bottom type that has no value at all. Most languages have a unit type, but few have a bottom type.\n\nSee https://en.m.wikipedia.org/wiki/Unit_type and https://en.m.wikipedia.org/wiki/Bottom_type",
      "type": "object"
    },
    "_types.CartesianPoint": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "required": [
        "x",
        "y"
      ]
    },
    "_types.ClusterDetails": {
      "type": "object",
      "properties": {
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ClusterSearchStatus"
            }
          ]
        },
        "indices": {
          "type": "string"
        },
        "took": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitMillis"
            }
          ]
        },
        "timed_out": {
          "type": "boolean"
        },
        "_shards": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ShardStatistics"
            }
          ]
        },
        "failures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ShardFailure"
          }
        }
      },
      "required": [
        "status",
        "indices",
        "timed_out"
      ]
    },
    "_types.ClusterSearchStatus": {
      "type": "string",
      "enum": [
        "running",
        "successful",
        "partial",
        "skipped",
        "failed"
      ]
    },
    "_types.ClusterStatistics": {
      "type": "object",
      "properties": {
        "skipped": {
          "type": "number"
        },
        "successful": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "running": {
          "type": "number"
        },
        "partial": {
          "type": "number"
        },
        "failed": {
          "type": "number"
        },
        "details": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.ClusterDetails"
          }
        }
      },
      "required": [
        "skipped",
        "successful",
        "total",
        "running",
        "partial",
        "failed"
      ]
    },
    "_types.CoordsGeoBounds": {
      "type": "object",
      "properties": {
        "top": {
          "type": "number"
        },
        "bottom": {
          "type": "number"
        },
        "left": {
          "type": "number"
        },
        "right": {
          "type": "number"
        }
      },
      "required": [
        "top",
        "bottom",
        "left",
        "right"
      ]
    },
    "_types.Duration": {
      "description": "A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and\n`d` (days). Also accepts \"0\" without a unit and \"-1\" to indicate an unspecified value.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "enum": [
            "-1"
          ]
        },
        {
          "type": "string",
          "enum": [
            "0"
          ]
        }
      ]
    },
    "_types.DurationLarge": {
      "description": "A date histogram interval. Similar to `Duration` with additional units: `w` (week), `M` (month), `q` (quarter) and\n`y` (year)",
      "type": "string"
    },
    "_types.DurationValueUnitMillis": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.UnitMillis"
        }
      ]
    },
    "_types.DurationValueUnitNanos": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.UnitNanos"
        }
      ]
    },
    "_types.EpochTimeUnitMillis": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.UnitMillis"
        }
      ]
    },
    "_types.ErrorCause": {
      "description": "Cause and details about a request failure. This class defines the properties common to all error types.\nAdditional details are also provided, that depend on the error type.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of error",
          "type": "string"
        },
        "reason": {
          "description": "A human-readable explanation of the error, in English.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "stack_trace": {
          "description": "The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.",
          "type": "string"
        },
        "caused_by": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ErrorCause"
            }
          ]
        },
        "root_cause": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ErrorCause"
          }
        },
        "suppressed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ErrorCause"
          }
        }
      },
      "required": [
        "type"
      ]
    },
    "_types.Field": {
      "description": "Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.",
      "type": "string"
    },
    "_types.FieldValue": {
      "description": "A field value.",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "boolean"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "_types.GeoBounds": {
      "description": "A geo bounding box. It can be represented in various ways:\n- as 4 top/bottom/left/right coordinates\n- as 2 top_left / bottom_right points\n- as 2 top_right / bottom_left points\n- as a WKT bounding box",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.CoordsGeoBounds"
        },
        {
          "$ref": "#/$defs/_types.TopLeftBottomRightGeoBounds"
        },
        {
          "$ref": "#/$defs/_types.TopRightBottomLeftGeoBounds"
        },
        {
          "$ref": "#/$defs/_types.WktGeoBounds"
        }
      ]
    },
    "_types.GeoHash": {
      "type": "string"
    },
    "_types.GeoHashLocation": {
      "type": "object",
      "properties": {
        "geohash": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.GeoHash"
            }
          ]
        }
      },
      "required": [
        "geohash"
      ]
    },
    "_types.GeoHexCell": {
      "description": "A map hex cell (H3) reference",
      "type": "string"
    },
    "_types.GeoLine": {
      "description": "A GeoJson GeoLine.",
      "type": "object",
      "properties": {
        "type": {
          "description": "Always `\"LineString\"`",
          "type": "string"
        },
        "coordinates": {
          "description": "Array of `[lon, lat]` coordinates",
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      },
      "required": [
        "type",
        "coordinates"
      ]
    },
    "_types.GeoLocation": {
      "description": "A latitude/longitude as a 2 dimensional point. It can be represented in various ways:\n- as a `{lat, long}` object\n- as a geo hash value\n- as a `[lon, lat]` array\n- as a string in `\"<lat>, <lon>\"` or WKT point formats",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.LatLonGeoLocation"
        },
        {
          "$ref": "#/$defs/_types.GeoHashLocation"
        },
        {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        {
          "type": "string"
        }
      ]
    },
    "_types.GeoTile": {
      "description": "A map tile reference, represented as `{zoom}/{x}/{y}`",
      "type": "string"
    },
    "_types.Id": {
      "type": "string"
    },
    "_types.IndexName": {
      "type": "string"
    },
    "_types.LatLonGeoLocation": {
      "type": "object",
      "properties": {
        "lat": {
          "description": "Latitude",
          "type": "number"
        },
        "lon": {
          "description": "Longitude",
          "type": "number"
        }
      },
      "required": [
        "lat",
        "lon"
      ]
    },
    "_types.Metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    },
    "_types.NodeId": {
      "type": "string"
    },
    "_types.Routing": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "_types.ScrollId": {
      "type": "string"
    },
    "_types.SequenceNumber": {
      "type": "number"
    },
    "_types.ShardFailure": {
      "type": "object",
      "properties": {
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "node": {
          "type": "string"
        },
        "reason": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ErrorCause"
            }
          ]
        },
        "shard": {
          "type": "number"
        },
        "status": {
          "type": "string"
        },
        "primary": {
          "type": "boolean"
        }
      },
      "required": [
        "reason"
      ]
    },
    "_types.ShardStatistics": {
      "type": "object",
      "properties": {
        "failed": {
          "description": "The number of shards the operation or search attempted to run on but failed.",
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        },
        "successful": {
          "description": "The number of shards the operation or search succeeded on.",
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        },
        "total": {
          "description": "The number of shards the operation or search will run on overall.",
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        },
        "failures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ShardFailure"
          }
        },
        "skipped": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        }
      },
      "required": [
        "failed",
        "successful",
        "total"
      ]
    },
    "_types.SortResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/_types.FieldValue"
      }
    },
    "_types.TopLeftBottomRightGeoBounds": {
      "type": "object",
      "properties": {
        "top_left": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.GeoLocation"
            }
          ]
        },
        "bottom_right": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.GeoLocation"
            }
          ]
        }
      },
      "required": [
        "top_left",
        "bottom_right"
      ]
    },
    "_types.TopRightBottomLeftGeoBounds": {
      "type": "object",
      "properties": {
        "top_right": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.GeoLocation"
            }
          ]
        },
        "bottom_left": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.GeoLocation"
            }
          ]
        }
      },
      "required": [
        "top_right",
        "bottom_left"
      ]
    },
    "_types.UnitMillis": {
      "description": "Time unit for milliseconds",
      "type": "number"
    },
    "_types.UnitNanos": {
      "description": "Time unit for nanoseconds",
      "type": "number"
    },
    "_types.VersionNumber": {
      "type": "number"
    },
    "_types.WktGeoBounds": {
      "type": "object",
      "properties": {
        "wkt": {
          "type": "string"
        }
      },
      "required": [
        "wkt"
      ]
    },
    "_types.aggregations.AbstractChangePoint": {
      "type": "object",
      "properties": {
        "p_value": {
          "type": "number"
        },
        "change_point": {
          "type": "number"
        }
      },
      "required": [
        "p_value",
        "change_point"
      ]
    },
    "_types.aggregations.AdjacencyMatrixAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseAdjacencyMatrixBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.AdjacencyMatrixBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.Aggregate": {
      "oneOf": [
        {
          "$ref": "#/$defs/_types.aggregations.CardinalityAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.HdrPercentilesAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.HdrPercentileRanksAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.TDigestPercentilesAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.TDigestPercentileRanksAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.PercentilesBucketAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.MedianAbsoluteDeviationAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.MinAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.MaxAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.SumAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.AvgAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.WeightedAvgAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ValueCountAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.SimpleValueAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.DerivativeAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.BucketMetricValueAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ChangePointAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.StatsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.StatsBucketAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ExtendedStatsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ExtendedStatsBucketAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.CartesianBoundsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.CartesianCentroidAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GeoBoundsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GeoCentroidAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.HistogramAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.DateHistogramAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.AutoDateHistogramAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.VariableWidthHistogramAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.StringTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.LongTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.DoubleTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.UnmappedTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.LongRareTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.StringRareTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.UnmappedRareTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.MultiTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.MissingAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.NestedAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ReverseNestedAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GlobalAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.FilterAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ChildrenAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ParentAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.SamplerAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.UnmappedSamplerAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GeoHashGridAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GeoTileGridAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GeoHexGridAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.RangeAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.DateRangeAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GeoDistanceAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.IpRangeAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.IpPrefixAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.FiltersAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.AdjacencyMatrixAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.SignificantLongTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.SignificantStringTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.UnmappedSignificantTermsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.CompositeAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.FrequentItemSetsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.TimeSeriesAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.ScriptedMetricAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.TopHitsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.InferenceAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.StringStatsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.BoxPlotAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.TopMetricsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.TTestAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.RateAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.CumulativeCardinalityAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.MatrixStatsAggregate"
        },
        {
          "$ref": "#/$defs/_types.aggregations.GeoLineAggregate"
        }
      ]
    },
    "_types.aggregations.AggregateBase": {
      "type": "object",
      "properties": {
        "meta": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Metadata"
            }
          ]
        }
      }
    },
    "_types.aggregations.ArrayPercentilesItem": {
      "type": "object",
      "properties": {
        "key": {
          "type": "number"
        },
        "value": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "value_as_string": {
          "type": "string"
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "_types.aggregations.AutoDateHistogramAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket"
        },
        {
          "type": "object",
          "properties": {
            "interval": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.DurationLarge"
                }
              ]
            }
          },
          "required": [
            "interval"
          ]
        }
      ]
    },
    "_types.aggregations.AvgAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.BoxPlotAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "min": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "q1": {
              "type": "number"
            },
            "q2": {
              "type": "number"
            },
            "q3": {
              "type": "number"
            },
            "lower": {
              "type": "number"
            },
            "upper": {
              "type": "number"
            },
            "min_as_string": {
              "type": "string"
            },
            "max_as_string": {
              "type": "string"
            },
            "q1_as_string": {
              "type": "string"
            },
            "q2_as_string": {
              "type": "string"
            },
            "q3_as_string": {
              "type": "string"
            },
            "lower_as_string": {
              "type": "string"
            },
            "upper_as_string": {
              "type": "string"
            }
          },
          "required": [
            "min",
            "max",
            "q1",
            "q2",
            "q3",
            "lower",
            "upper"
          ]
        }
      ]
    },
    "_types.aggregations.BucketMetricValueAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "keys": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "keys"
          ]
        }
      ]
    },
    "_types.aggregations.BucketsAdjacencyMatrixBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.AdjacencyMatrixBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.AdjacencyMatrixBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsCompositeBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.CompositeBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.CompositeBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsDateHistogramBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.DateHistogramBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.DateHistogramBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsDoubleTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.DoubleTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.DoubleTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsFiltersBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.FiltersBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.FiltersBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsFrequentItemSetsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.FrequentItemSetsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.FrequentItemSetsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsGeoHashGridBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.GeoHashGridBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.GeoHashGridBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsGeoHexGridBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.GeoHexGridBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.GeoHexGridBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsGeoTileGridBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.GeoTileGridBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.GeoTileGridBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsHistogramBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.HistogramBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.HistogramBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsIpPrefixBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.IpPrefixBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.IpPrefixBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsIpRangeBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.IpRangeBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.IpRangeBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsLongRareTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.LongRareTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.LongRareTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsLongTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.LongTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.LongTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsMultiTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.MultiTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.MultiTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsRangeBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.RangeBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.RangeBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsSignificantLongTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.SignificantLongTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.SignificantLongTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsSignificantStringTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.SignificantStringTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.SignificantStringTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsStringRareTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.StringRareTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.StringRareTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsStringTermsBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.StringTermsBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.StringTermsBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsTimeSeriesBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.TimeSeriesBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.TimeSeriesBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsVariableWidthHistogramBucket": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_types.aggregations.VariableWidthHistogramBucket"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.VariableWidthHistogramBucket"
          }
        }
      ]
    },
    "_types.aggregations.BucketsVoid": {
      "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/_spec_utils.Void"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_spec_utils.Void"
          }
        }
      ]
    },
    "_types.aggregations.CardinalityAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "type": "number"
            }
          },
          "required": [
            "value"
          ]
        }
      ]
    },
    "_types.aggregations.CartesianBoundsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "bounds": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.TopLeftBottomRightGeoBounds"
                }
              ]
            }
          }
        }
      ]
    },
    "_types.aggregations.CartesianCentroidAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "type": "number"
            },
            "location": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.CartesianPoint"
                }
              ]
            }
          },
          "required": [
            "count"
          ]
        }
      ]
    },
    "_types.aggregations.ChangePointAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.ChangeType"
                }
              ]
            },
            "bucket": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.ChangePointBucket"
                }
              ]
            }
          },
          "required": [
            "type"
          ]
        }
      ]
    },
    "_types.aggregations.ChangePointBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.FieldValue"
                }
              ]
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.ChangeType": {
      "type": "object",
      "properties": {
        "dip": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.Dip"
            }
          ]
        },
        "distribution_change": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.DistributionChange"
            }
          ]
        },
        "indeterminable": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.Indeterminable"
            }
          ]
        },
        "non_stationary": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.NonStationary"
            }
          ]
        },
        "spike": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.Spike"
            }
          ]
        },
        "stationary": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.Stationary"
            }
          ]
        },
        "step_change": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.StepChange"
            }
          ]
        },
        "trend_change": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.aggregations.TrendChange"
            }
          ]
        }
      },
      "minProperties": 1,
      "maxProperties": 1
    },
    "_types.aggregations.ChildrenAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.CompositeAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseCompositeBucket"
        },
        {
          "type": "object",
          "properties": {
            "after_key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.CompositeAggregateKey"
                }
              ]
            }
          }
        }
      ]
    },
    "_types.aggregations.CompositeAggregateKey": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/_types.FieldValue"
      }
    },
    "_types.aggregations.CompositeBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.CompositeAggregateKey"
                }
              ]
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.CumulativeCardinalityAggregate": {
      "description": "Result of the `cumulative_cardinality` aggregation",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "type": "number"
            },
            "value_as_string": {
              "type": "string"
            }
          },
          "required": [
            "value"
          ]
        }
      ]
    },
    "_types.aggregations.DateHistogramAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.DateHistogramBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key_as_string": {
              "type": "string"
            },
            "key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.EpochTimeUnitMillis"
                }
              ]
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.DateRangeAggregate": {
      "description": "Result of a `date_range` aggregation. Same format as a for a `range` aggregation: `from` and `to`\nin `buckets` are milliseconds since the Epoch, represented as a floating point number.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.RangeAggregate"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.DerivativeAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "normalized_value": {
              "type": "number"
            },
            "normalized_value_as_string": {
              "type": "string"
            }
          }
        }
      ]
    },
    "_types.aggregations.Dip": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AbstractChangePoint"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.DistributionChange": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AbstractChangePoint"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.DoubleTermsAggregate": {
      "description": "Result of a `terms` aggregation when the field is some kind of decimal number like a float, double, or distance.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsAggregateBaseDoubleTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.DoubleTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "number"
            },
            "key_as_string": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.ExtendedStatsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.StatsAggregate"
        },
        {
          "type": "object",
          "properties": {
            "sum_of_squares": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "variance": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "variance_population": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "variance_sampling": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "std_deviation": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "std_deviation_population": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "std_deviation_sampling": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "std_deviation_bounds": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.StandardDeviationBounds"
                }
              ]
            },
            "sum_of_squares_as_string": {
              "type": "string"
            },
            "variance_as_string": {
              "type": "string"
            },
            "variance_population_as_string": {
              "type": "string"
            },
            "variance_sampling_as_string": {
              "type": "string"
            },
            "std_deviation_as_string": {
              "type": "string"
            },
            "std_deviation_bounds_as_string": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.StandardDeviationBoundsAsString"
                }
              ]
            }
          },
          "required": [
            "sum_of_squares",
            "variance",
            "variance_population",
            "variance_sampling",
            "std_deviation",
            "std_deviation_population",
            "std_deviation_sampling"
          ]
        }
      ]
    },
    "_types.aggregations.ExtendedStatsBucketAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.ExtendedStatsAggregate"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.FilterAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.FiltersAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseFiltersBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.FiltersBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            }
          }
        }
      ]
    },
    "_types.aggregations.FrequentItemSetsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseFrequentItemSetsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.FrequentItemSetsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "support": {
              "type": "number"
            }
          },
          "required": [
            "key",
            "support"
          ]
        }
      ]
    },
    "_types.aggregations.GeoBoundsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "bounds": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.GeoBounds"
                }
              ]
            }
          }
        }
      ]
    },
    "_types.aggregations.GeoCentroidAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "type": "number"
            },
            "location": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.GeoLocation"
                }
              ]
            }
          },
          "required": [
            "count"
          ]
        }
      ]
    },
    "_types.aggregations.GeoDistanceAggregate": {
      "description": "Result of a `geo_distance` aggregation. The unit for `from` and `to` is meters by default.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.RangeAggregate"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.GeoHashGridAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseGeoHashGridBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.GeoHashGridBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.GeoHash"
                }
              ]
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.GeoHexGridAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseGeoHexGridBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.GeoHexGridBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.GeoHexCell"
                }
              ]
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.GeoLineAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "geometry": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.GeoLine"
                }
              ]
            },
            "properties": {
              "type": "object"
            }
          },
          "required": [
            "type",
            "geometry",
            "properties"
          ]
        }
      ]
    },
    "_types.aggregations.GeoTileGridAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseGeoTileGridBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.GeoTileGridBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.GeoTile"
                }
              ]
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.GlobalAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.HdrPercentileRanksAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.PercentilesAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.HdrPercentilesAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.PercentilesAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.HistogramAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseHistogramBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.HistogramBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key_as_string": {
              "type": "string"
            },
            "key": {
              "type": "number"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.Indeterminable": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "reason"
      ]
    },
    "_types.aggregations.InferenceAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.FieldValue"
                }
              ]
            },
            "feature_importance": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/_types.aggregations.InferenceFeatureImportance"
              }
            },
            "top_classes": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/_types.aggregations.InferenceTopClassEntry"
              }
            },
            "warning": {
              "type": "string"
            }
          }
        }
      ]
    },
    "_types.aggregations.InferenceClassImportance": {
      "type": "object",
      "properties": {
        "class_name": {
          "type": "string"
        },
        "importance": {
          "type": "number"
        }
      },
      "required": [
        "class_name",
        "importance"
      ]
    },
    "_types.aggregations.InferenceFeatureImportance": {
      "type": "object",
      "properties": {
        "feature_name": {
          "type": "string"
        },
        "importance": {
          "type": "number"
        },
        "classes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.InferenceClassImportance"
          }
        }
      },
      "required": [
        "feature_name"
      ]
    },
    "_types.aggregations.InferenceTopClassEntry": {
      "type": "object",
      "properties": {
        "class_name": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.FieldValue"
            }
          ]
        },
        "class_probability": {
          "type": "number"
        },
        "class_score": {
          "type": "number"
        }
      },
      "required": [
        "class_name",
        "class_probability",
        "class_score"
      ]
    },
    "_types.aggregations.IpPrefixAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseIpPrefixBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.IpPrefixBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "is_ipv6": {
              "type": "boolean"
            },
            "key": {
              "type": "string"
            },
            "prefix_length": {
              "type": "number"
            },
            "netmask": {
              "type": "string"
            }
          },
          "required": [
            "is_ipv6",
            "key",
            "prefix_length"
          ]
        }
      ]
    },
    "_types.aggregations.IpRangeAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseIpRangeBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.IpRangeBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            },
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            }
          }
        }
      ]
    },
    "_types.aggregations.KeyedPercentiles": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": [
              "string",
              "null"
            ]
          }
        ]
      }
    },
    "_types.aggregations.LongRareTermsAggregate": {
      "description": "Result of the `rare_terms` aggregation when the field is some kind of whole number like a integer, long, or a date.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseLongRareTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.LongRareTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "number"
            },
            "key_as_string": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.LongTermsAggregate": {
      "description": "Result of a `terms` aggregation when the field is some kind of whole number like a integer, long, or a date.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsAggregateBaseLongTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.LongTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "number"
            },
            "key_as_string": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.MatrixStatsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "doc_count": {
              "type": "number"
            },
            "fields": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/_types.aggregations.MatrixStatsFields"
              }
            }
          },
          "required": [
            "doc_count"
          ]
        }
      ]
    },
    "_types.aggregations.MatrixStatsFields": {
      "type": "object",
      "properties": {
        "name": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Field"
            }
          ]
        },
        "count": {
          "type": "number"
        },
        "mean": {
          "type": "number"
        },
        "variance": {
          "type": "number"
        },
        "skewness": {
          "type": "number"
        },
        "kurtosis": {
          "type": "number"
        },
        "covariance": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        },
        "correlation": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        }
      },
      "required": [
        "name",
        "count",
        "mean",
        "variance",
        "skewness",
        "kurtosis",
        "covariance",
        "correlation"
      ]
    },
    "_types.aggregations.MaxAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.MedianAbsoluteDeviationAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.MinAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.MissingAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseAdjacencyMatrixBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsAdjacencyMatrixBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseCompositeBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsCompositeBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseDateHistogramBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsDateHistogramBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseDoubleTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsDoubleTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseFiltersBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsFiltersBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseFrequentItemSetsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsFrequentItemSetsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseGeoHashGridBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsGeoHashGridBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseGeoHexGridBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsGeoHexGridBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseGeoTileGridBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsGeoTileGridBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseHistogramBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsHistogramBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseIpPrefixBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsIpPrefixBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseIpRangeBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsIpRangeBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseLongRareTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsLongRareTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseLongTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsLongTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseMultiTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsMultiTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseRangeBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsRangeBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseSignificantLongTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsSignificantLongTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseSignificantStringTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsSignificantStringTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseStringRareTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsStringRareTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseStringTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsStringTermsBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseTimeSeriesBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsTimeSeriesBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseVariableWidthHistogramBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsVariableWidthHistogramBucket"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketAggregateBaseVoid": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "buckets": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.BucketsVoid"
                }
              ]
            }
          },
          "required": [
            "buckets"
          ]
        }
      ]
    },
    "_types.aggregations.MultiBucketBase": {
      "description": "Base type for multi-bucket aggregation results that can hold sub-aggregations results.",
      "type": "object",
      "properties": {
        "doc_count": {
          "type": "number"
        }
      },
      "required": [
        "doc_count"
      ]
    },
    "_types.aggregations.MultiTermsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsAggregateBaseMultiTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.MultiTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/_types.FieldValue"
              }
            },
            "key_as_string": {
              "type": "string"
            },
            "doc_count_error_upper_bound": {
              "type": "number"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.NestedAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.NonStationary": {
      "type": "object",
      "properties": {
        "p_value": {
          "type": "number"
        },
        "r_value": {
          "type": "number"
        },
        "trend": {
          "type": "string"
        }
      },
      "required": [
        "p_value",
        "r_value",
        "trend"
      ]
    },
    "_types.aggregations.ParentAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.Percentiles": {
      "oneOf": [
        {
          "$ref": "#/$defs/_types.aggregations.KeyedPercentiles"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.aggregations.ArrayPercentilesItem"
          }
        }
      ]
    },
    "_types.aggregations.PercentilesAggregateBase": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "values": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.aggregations.Percentiles"
                }
              ]
            }
          },
          "required": [
            "values"
          ]
        }
      ]
    },
    "_types.aggregations.PercentilesBucketAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.PercentilesAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.RangeAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseRangeBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.RangeBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "from": {
              "type": "number"
            },
            "to": {
              "type": "number"
            },
            "from_as_string": {
              "type": "string"
            },
            "to_as_string": {
              "type": "string"
            },
            "key": {
              "description": "The bucket key. Present if the aggregation is _not_ keyed",
              "type": "string"
            }
          }
        }
      ]
    },
    "_types.aggregations.RateAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "type": "number"
            },
            "value_as_string": {
              "type": "string"
            }
          },
          "required": [
            "value"
          ]
        }
      ]
    },
    "_types.aggregations.ReverseNestedAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.SamplerAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.ScriptedMetricAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "type": "object"
            }
          },
          "required": [
            "value"
          ]
        }
      ]
    },
    "_types.aggregations.SignificantLongTermsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SignificantTermsAggregateBaseSignificantLongTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.SignificantLongTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SignificantTermsBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "number"
            },
            "key_as_string": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.SignificantStringTermsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SignificantTermsAggregateBaseSignificantStringTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.SignificantStringTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SignificantTermsBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.SignificantTermsAggregateBaseSignificantLongTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseSignificantLongTermsBucket"
        },
        {
          "type": "object",
          "properties": {
            "bg_count": {
              "type": "number"
            },
            "doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.SignificantTermsAggregateBaseSignificantStringTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseSignificantStringTermsBucket"
        },
        {
          "type": "object",
          "properties": {
            "bg_count": {
              "type": "number"
            },
            "doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.SignificantTermsAggregateBaseVoid": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseVoid"
        },
        {
          "type": "object",
          "properties": {
            "bg_count": {
              "type": "number"
            },
            "doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.SignificantTermsBucketBase": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "score": {
              "type": "number"
            },
            "bg_count": {
              "type": "number"
            }
          },
          "required": [
            "score",
            "bg_count"
          ]
        }
      ]
    },
    "_types.aggregations.SimpleValueAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.SingleBucketAggregateBase": {
      "description": "Base type for single-bucket aggregation results that can hold sub-aggregations results.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "doc_count": {
              "type": "number"
            }
          },
          "required": [
            "doc_count"
          ]
        }
      ]
    },
    "_types.aggregations.SingleMetricAggregateBase": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "description": "The metric value. A missing value generally means that there was no data to aggregate,\nunless specified otherwise.",
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "value_as_string": {
              "type": "string"
            }
          },
          "required": [
            "value"
          ]
        }
      ]
    },
    "_types.aggregations.Spike": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AbstractChangePoint"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.StandardDeviationBounds": {
      "type": "object",
      "properties": {
        "upper": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "lower": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "upper_population": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "lower_population": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "upper_sampling": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "lower_sampling": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        }
      },
      "required": [
        "upper",
        "lower",
        "upper_population",
        "lower_population",
        "upper_sampling",
        "lower_sampling"
      ]
    },
    "_types.aggregations.StandardDeviationBoundsAsString": {
      "type": "object",
      "properties": {
        "upper": {
          "type": "string"
        },
        "lower": {
          "type": "string"
        },
        "upper_population": {
          "type": "string"
        },
        "lower_population": {
          "type": "string"
        },
        "upper_sampling": {
          "type": "string"
        },
        "lower_sampling": {
          "type": "string"
        }
      },
      "required": [
        "upper",
        "lower",
        "upper_population",
        "lower_population",
        "upper_sampling",
        "lower_sampling"
      ]
    },
    "_types.aggregations.Stationary": {
      "type": "object"
    },
    "_types.aggregations.StatsAggregate": {
      "description": "Statistics aggregation result. `min`, `max` and `avg` are missing if there were no values to process\n(`count` is zero).",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "type": "number"
            },
            "min": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "max": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "avg": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "sum": {
              "type": "number"
            },
            "min_as_string": {
              "type": "string"
            },
            "max_as_string": {
              "type": "string"
            },
            "avg_as_string": {
              "type": "string"
            },
            "sum_as_string": {
              "type": "string"
            }
          },
          "required": [
            "count",
            "min",
            "max",
            "avg",
            "sum"
          ]
        }
      ]
    },
    "_types.aggregations.StatsBucketAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.StatsAggregate"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.StepChange": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AbstractChangePoint"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.StringRareTermsAggregate": {
      "description": "Result of the `rare_terms` aggregation when the field is a string.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseStringRareTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.StringRareTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.StringStatsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "type": "number"
            },
            "min_length": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "max_length": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "avg_length": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "entropy": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "distribution": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "min_length_as_string": {
              "type": "string"
            },
            "max_length_as_string": {
              "type": "string"
            },
            "avg_length_as_string": {
              "type": "string"
            }
          },
          "required": [
            "count",
            "min_length",
            "max_length",
            "avg_length",
            "entropy"
          ]
        }
      ]
    },
    "_types.aggregations.StringTermsAggregate": {
      "description": "Result of a `terms` aggregation when the field is a string.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsAggregateBaseStringTermsBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.StringTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "allOf": [
                {
                  "$ref": "#/$defs/_types.FieldValue"
                }
              ]
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.SumAggregate": {
      "description": "Sum aggregation result. `value` is always present and is zero if there were no values to process.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.TDigestPercentileRanksAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.PercentilesAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.TDigestPercentilesAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.PercentilesAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.TTestAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              ]
            },
            "value_as_string": {
              "type": "string"
            }
          },
          "required": [
            "value"
          ]
        }
      ]
    },
    "_types.aggregations.TermsAggregateBaseDoubleTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseDoubleTermsBucket"
        },
        {
          "type": "object",
          "properties": {
            "doc_count_error_upper_bound": {
              "type": "number"
            },
            "sum_other_doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.TermsAggregateBaseLongTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseLongTermsBucket"
        },
        {
          "type": "object",
          "properties": {
            "doc_count_error_upper_bound": {
              "type": "number"
            },
            "sum_other_doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.TermsAggregateBaseMultiTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseMultiTermsBucket"
        },
        {
          "type": "object",
          "properties": {
            "doc_count_error_upper_bound": {
              "type": "number"
            },
            "sum_other_doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.TermsAggregateBaseStringTermsBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseStringTermsBucket"
        },
        {
          "type": "object",
          "properties": {
            "doc_count_error_upper_bound": {
              "type": "number"
            },
            "sum_other_doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.TermsAggregateBaseVoid": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseVoid"
        },
        {
          "type": "object",
          "properties": {
            "doc_count_error_upper_bound": {
              "type": "number"
            },
            "sum_other_doc_count": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.TermsBucketBase": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "doc_count_error_upper_bound": {
              "type": "number"
            }
          }
        }
      ]
    },
    "_types.aggregations.TimeSeriesAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseTimeSeriesBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.TimeSeriesBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/$defs/_types.FieldValue"
              }
            }
          },
          "required": [
            "key"
          ]
        }
      ]
    },
    "_types.aggregations.TopHitsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "hits": {
              "allOf": [
                {
                  "$ref": "#/$defs/_global.search._types.HitsMetadata"
                }
              ]
            }
          },
          "required": [
            "hits"
          ]
        }
      ]
    },
    "_types.aggregations.TopMetrics": {
      "type": "object",
      "properties": {
        "sort": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/_types.FieldValue"
              },
              {
                "type": [
                  "string",
                  "null"
                ]
              }
            ]
          }
        },
        "metrics": {
          "type": "object",
          "additionalProperties": {
            "oneOf": [
              {
                "$ref": "#/$defs/_types.FieldValue"
              },
              {
                "type": [
                  "string",
                  "null"
                ]
              }
            ]
          }
        }
      },
      "required": [
        "sort",
        "metrics"
      ]
    },
    "_types.aggregations.TopMetricsAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.AggregateBase"
        },
        {
          "type": "object",
          "properties": {
            "top": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/_types.aggregations.TopMetrics"
              }
            }
          },
          "required": [
            "top"
          ]
        }
      ]
    },
    "_types.aggregations.TrendChange": {
      "type": "object",
      "properties": {
        "p_value": {
          "type": "number"
        },
        "r_value": {
          "type": "number"
        },
        "change_point": {
          "type": "number"
        }
      },
      "required": [
        "p_value",
        "r_value",
        "change_point"
      ]
    },
    "_types.aggregations.UnmappedRareTermsAggregate": {
      "description": "Result of a `rare_terms` aggregation when the field is unmapped. `buckets` is always empty.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseVoid"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.UnmappedSamplerAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleBucketAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.UnmappedSignificantTermsAggregate": {
      "description": "Result of the `significant_terms` aggregation on an unmapped field. `buckets` is always empty.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SignificantTermsAggregateBaseVoid"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.UnmappedTermsAggregate": {
      "description": "Result of a `terms` aggregation when the field is unmapped. `buckets` is always empty.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.TermsAggregateBaseVoid"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.ValueCountAggregate": {
      "description": "Value count aggregation result. `value` is always present.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.VariableWidthHistogramAggregate": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketAggregateBaseVariableWidthHistogramBucket"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.aggregations.VariableWidthHistogramBucket": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.MultiBucketBase"
        },
        {
          "type": "object",
          "properties": {
            "min": {
              "type": "number"
            },
            "key": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "min_as_string": {
              "type": "string"
            },
            "key_as_string": {
              "type": "string"
            },
            "max_as_string": {
              "type": "string"
            }
          },
          "required": [
            "min",
            "key",
            "max"
          ]
        }
      ]
    },
    "_types.aggregations.WeightedAvgAggregate": {
      "description": "Weighted average aggregation result. `value` is missing if the weight was set to zero.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.aggregations.SingleMetricAggregateBase"
        },
        {
          "type": "object"
        }
      ]
    },
    "_types.uint": {
      "type": "number"
    }
  }
}