{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dynamical-org/json-schema/dynamical-org-ensemble-analysis-result-schema.json",
  "title": "EnsembleAnalysisResult",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dynamical-org-openapi.json#/components/schemas/EnsembleAnalysisResult",
  "properties": {
    "queryId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Queryid"
    },
    "dataProduct": {
      "$ref": "#/$defs/DataProductReference"
    },
    "point": {
      "$ref": "#/$defs/Point"
    },
    "analysisTimes": {
      "items": {
        "type": "string",
        "format": "date-time"
      },
      "type": "array",
      "title": "Analysistimes"
    },
    "variables": {
      "additionalProperties": {
        "$ref": "#/$defs/Variable"
      },
      "type": "object",
      "title": "Variables"
    },
    "snapshotId": {
      "type": "string",
      "title": "Snapshotid"
    },
    "links": {
      "$ref": "#/$defs/AnalysisLinks"
    },
    "ensembleMembers": {
      "items": {
        "$ref": "#/$defs/EnsembleMember"
      },
      "type": "array",
      "title": "Ensemblemembers"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "dataProduct",
    "point",
    "analysisTimes",
    "variables",
    "snapshotId",
    "links",
    "ensembleMembers"
  ],
  "$defs": {
    "AnalysisLinks": {
      "properties": {
        "canonical": {
          "type": "string",
          "title": "Canonical"
        },
        "catalog": {
          "type": "string",
          "title": "Catalog"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "canonical",
        "catalog"
      ],
      "title": "AnalysisLinks"
    },
    "Coordinate": {
      "properties": {
        "latitude": {
          "type": "number",
          "title": "Latitude"
        },
        "longitude": {
          "type": "number",
          "title": "Longitude"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "latitude",
        "longitude"
      ],
      "title": "Coordinate"
    },
    "DataProductReference": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "version"
      ],
      "title": "DataProductReference"
    },
    "EnsembleMember": {
      "properties": {
        "member": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            }
          ],
          "title": "Member"
        },
        "data": {
          "additionalProperties": {
            "items": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "array"
          },
          "type": "object",
          "title": "Data"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "member",
        "data"
      ],
      "title": "EnsembleMember"
    },
    "Point": {
      "properties": {
        "requested": {
          "anyOf": [
            {
              "$ref": "#/$defs/Coordinate"
            },
            {
              "type": "null"
            }
          ]
        },
        "selected": {
          "$ref": "#/$defs/SelectedPoint"
        },
        "method": {
          "type": "string",
          "const": "nearest",
          "title": "Method"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "selected",
        "method"
      ],
      "title": "Point"
    },
    "SelectedPoint": {
      "properties": {
        "latitude": {
          "type": "number",
          "title": "Latitude"
        },
        "longitude": {
          "type": "number",
          "title": "Longitude"
        },
        "grid": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object",
          "title": "Grid"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "latitude",
        "longitude",
        "grid"
      ],
      "title": "SelectedPoint"
    },
    "Variable": {
      "properties": {
        "unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Unit"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "unit"
      ],
      "title": "Variable"
    }
  }
}