{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ScoringTemplate",
  "type": "object",
  "properties": {
    "name": {
      "description": "The name of the scoring template",
      "type": "string"
    },
    "referenceEntities": {
      "description": "Entities used to derive reference values in other parts of this template. These can be\ninternal entities (i.e. from the same recording as the one being scored) or from one or\nmore external files. The keys of this object are used as identifiers in the rest of the template.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/TemplateEntity"
      },
      "default": {}
    },
    "dimensions": {
      "description": "Definitions of what dimensions are being used for the scoring. Dimensions are based on\nentity properties (e.g. roll angle, altitude etc.) with some optional processing (like taking\nthe absolute value).  The keys of this object are used as identifiers in the rest of the template.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/TemplateDimension"
      }
    },
    "segments": {
      "description": "Definitions of the segments used for scoring. Each segment definition will be used to divide\nthe data into contiguous subsections that can be scored by the assessments defined in this\ntemplate. The keys of this object are used as identifiers in the rest of the template.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/TemplateSegment"
      }
    },
    "assessments": {
      "description": "The set of assessments, each containing multiple rubrics, that will be used to score each\nsegment.  The keys of this object are used as identifiers in the rest of the template.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/TemplateAssessment"
      }
    }
  },
  "required": [
    "name",
    "dimensions",
    "segments",
    "assessments"
  ],
  "definitions": {
    "TemplateEntity": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "external": {
              "$ref": "#/definitions/ExternalEntity"
            }
          },
          "required": [
            "external"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "internal": {
              "$ref": "#/definitions/InternalEntity"
            }
          },
          "required": [
            "internal"
          ],
          "additionalProperties": false
        }
      ]
    },
    "ExternalEntity": {
      "type": "object",
      "properties": {
        "path": {
          "description": "The path to the file containing the reference entity, relative to Performaar's media storage\nroot directory (i.e. the same place recordings are stored). This must be in a format Performaar\nsupports.",
          "type": "string"
        },
        "kind": {
          "$ref": "#/definitions/FileKind"
        },
        "entity": {
          "description": "A filter to find the entity in the external file. If multiple entities matching the filter\nare found, then one will be chosen non-deterministically.",
          "allOf": [
            {
              "$ref": "#/definitions/EntityFilterInput"
            }
          ]
        }
      },
      "required": [
        "path",
        "kind",
        "entity"
      ]
    },
    "FileKind": {
      "type": "string",
      "enum": [
        "Media",
        "Dis",
        "Fit",
        "VarjoGaze",
        "MavLink",
        "Jsbsim",
        "Json",
        "MakLogger",
        "XPlane",
        "Transcript",
        "Other"
      ]
    },
    "EntityFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/EntityFilterInput"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/EntityFilterInput"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "file": {
              "$ref": "#/definitions/StringFilterOperationInput"
            }
          },
          "required": [
            "file"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/definitions/StringFilterOperationInput"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "displayName": {
              "$ref": "#/definitions/StringFilterOperationInput"
            }
          },
          "required": [
            "displayName"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "position": {
              "$ref": "#/definitions/PipelineInput"
            }
          },
          "required": [
            "position"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "distance": {
              "$ref": "#/definitions/PipelineInput2"
            }
          },
          "required": [
            "distance"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "orientation": {
              "$ref": "#/definitions/PipelineInput3"
            }
          },
          "required": [
            "orientation"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "linearVelocity": {
              "$ref": "#/definitions/PipelineInput4"
            }
          },
          "required": [
            "linearVelocity"
          ],
          "additionalProperties": false
        }
      ]
    },
    "StringFilterOperationInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            }
          },
          "required": [
            "eq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "notEq": {
              "type": "string"
            }
          },
          "required": [
            "notEq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "fuzzyEq": {
              "type": "string"
            }
          },
          "required": [
            "fuzzyEq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "fuzzyNotEq": {
              "type": "string"
            }
          },
          "required": [
            "fuzzyNotEq"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineInput": {
      "type": "object",
      "properties": {
        "operations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OperationInput"
          }
        }
      },
      "required": [
        "operations"
      ]
    },
    "OperationInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "aggregate": {
              "$ref": "#/definitions/PipelineOperationAggregateInput"
            }
          },
          "required": [
            "aggregate"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "filter": {
              "$ref": "#/definitions/PipelineOperationFilterInput"
            }
          },
          "required": [
            "filter"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "check": {
              "$ref": "#/definitions/PipelineOperationCheckInput"
            }
          },
          "required": [
            "check"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "$ref": "#/definitions/PipelineOperationCountInput"
            }
          },
          "required": [
            "count"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationAggregateInput": {
      "type": "object",
      "properties": {
        "method": {
          "$ref": "#/definitions/AggregationMethod"
        }
      },
      "required": [
        "method"
      ]
    },
    "AggregationMethod": {
      "type": "string",
      "enum": [
        "sum",
        "mean",
        "minimum",
        "maximum",
        "first",
        "last"
      ]
    },
    "PipelineOperationFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "relativeTimestamp": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "relativeTimestamp"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/PositionValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "NumberFilterOperationInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "eq": {
              "$ref": "#/definitions/TimeInput"
            }
          },
          "required": [
            "eq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "notEq": {
              "$ref": "#/definitions/TimeInput"
            }
          },
          "required": [
            "notEq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lt": {
              "$ref": "#/definitions/TimeInput"
            }
          },
          "required": [
            "lt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lte": {
              "$ref": "#/definitions/TimeInput"
            }
          },
          "required": [
            "lte"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gt": {
              "$ref": "#/definitions/TimeInput"
            }
          },
          "required": [
            "gt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gte": {
              "$ref": "#/definitions/TimeInput"
            }
          },
          "required": [
            "gte"
          ],
          "additionalProperties": false
        }
      ]
    },
    "TimeInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "milliseconds": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "milliseconds"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "seconds": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "seconds"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PositionValueFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "time": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "time"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "geodetic": {
              "$ref": "#/definitions/PositionGeodeticFilterInput"
            }
          },
          "required": [
            "geodetic"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ecef": {
              "$ref": "#/definitions/PositionEcefFilterInput"
            }
          },
          "required": [
            "ecef"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PositionGeodeticFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "latitude": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "latitude"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "longitude": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "longitude"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "altitudeMeanSeaLevel": {
              "$ref": "#/definitions/NumberFilterOperationInput3"
            }
          },
          "required": [
            "altitudeMeanSeaLevel"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "altitudeHeightAboveEllipsoid": {
              "$ref": "#/definitions/NumberFilterOperationInput3"
            }
          },
          "required": [
            "altitudeHeightAboveEllipsoid"
          ],
          "additionalProperties": false
        }
      ]
    },
    "NumberFilterOperationInput2": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "eq": {
              "$ref": "#/definitions/AngleInput"
            }
          },
          "required": [
            "eq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "notEq": {
              "$ref": "#/definitions/AngleInput"
            }
          },
          "required": [
            "notEq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lt": {
              "$ref": "#/definitions/AngleInput"
            }
          },
          "required": [
            "lt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lte": {
              "$ref": "#/definitions/AngleInput"
            }
          },
          "required": [
            "lte"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gt": {
              "$ref": "#/definitions/AngleInput"
            }
          },
          "required": [
            "gt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gte": {
              "$ref": "#/definitions/AngleInput"
            }
          },
          "required": [
            "gte"
          ],
          "additionalProperties": false
        }
      ]
    },
    "AngleInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "degrees": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "degrees"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "radians": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "radians"
          ],
          "additionalProperties": false
        }
      ]
    },
    "NumberFilterOperationInput3": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "eq": {
              "$ref": "#/definitions/LengthInput"
            }
          },
          "required": [
            "eq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "notEq": {
              "$ref": "#/definitions/LengthInput"
            }
          },
          "required": [
            "notEq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lt": {
              "$ref": "#/definitions/LengthInput"
            }
          },
          "required": [
            "lt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lte": {
              "$ref": "#/definitions/LengthInput"
            }
          },
          "required": [
            "lte"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gt": {
              "$ref": "#/definitions/LengthInput"
            }
          },
          "required": [
            "gt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gte": {
              "$ref": "#/definitions/LengthInput"
            }
          },
          "required": [
            "gte"
          ],
          "additionalProperties": false
        }
      ]
    },
    "LengthInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "meters": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "meters"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "millimeters": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "millimeters"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kilometers": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "kilometers"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "miles": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "miles"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "feet": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "feet"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "nauticalMiles": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "nauticalMiles"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PositionEcefFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "x": {
              "$ref": "#/definitions/NumberFilterOperationInput3"
            }
          },
          "required": [
            "x"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "y": {
              "$ref": "#/definitions/NumberFilterOperationInput3"
            }
          },
          "required": [
            "y"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "z": {
              "$ref": "#/definitions/NumberFilterOperationInput3"
            }
          },
          "required": [
            "z"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationCheckInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "all": {
              "$ref": "#/definitions/PipelineOperationCheckInput"
            }
          },
          "required": [
            "all"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "any": {
              "$ref": "#/definitions/PipelineOperationCheckInput"
            }
          },
          "required": [
            "any"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/PositionValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationCountInput": {
      "type": "object",
      "properties": {
        "noOp": {
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "PipelineInput2": {
      "type": "object",
      "properties": {
        "operations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OperationInput2"
          }
        }
      },
      "required": [
        "operations"
      ]
    },
    "OperationInput2": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "aggregate": {
              "$ref": "#/definitions/PipelineOperationAggregateInput"
            }
          },
          "required": [
            "aggregate"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "filter": {
              "$ref": "#/definitions/PipelineOperationFilterInput2"
            }
          },
          "required": [
            "filter"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "check": {
              "$ref": "#/definitions/PipelineOperationCheckInput2"
            }
          },
          "required": [
            "check"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "$ref": "#/definitions/PipelineOperationCountInput"
            }
          },
          "required": [
            "count"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationFilterInput2": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput2"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput2"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "relativeTimestamp": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "relativeTimestamp"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/DistanceValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "DistanceValueFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "time": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "time"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "distance": {
              "$ref": "#/definitions/NumberFilterOperationInput3"
            }
          },
          "required": [
            "distance"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationCheckInput2": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput2"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput2"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "all": {
              "$ref": "#/definitions/PipelineOperationCheckInput2"
            }
          },
          "required": [
            "all"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "any": {
              "$ref": "#/definitions/PipelineOperationCheckInput2"
            }
          },
          "required": [
            "any"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/DistanceValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineInput3": {
      "type": "object",
      "properties": {
        "operations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OperationInput3"
          }
        }
      },
      "required": [
        "operations"
      ]
    },
    "OperationInput3": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "aggregate": {
              "$ref": "#/definitions/PipelineOperationAggregateInput"
            }
          },
          "required": [
            "aggregate"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "filter": {
              "$ref": "#/definitions/PipelineOperationFilterInput3"
            }
          },
          "required": [
            "filter"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "check": {
              "$ref": "#/definitions/PipelineOperationCheckInput3"
            }
          },
          "required": [
            "check"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "$ref": "#/definitions/PipelineOperationCountInput"
            }
          },
          "required": [
            "count"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationFilterInput3": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput3"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput3"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "relativeTimestamp": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "relativeTimestamp"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/OrientationValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "OrientationValueFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "time": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "time"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ned": {
              "$ref": "#/definitions/OrientationNedFilterInput"
            }
          },
          "required": [
            "ned"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ecef": {
              "$ref": "#/definitions/OrientationEcefFilterInput"
            }
          },
          "required": [
            "ecef"
          ],
          "additionalProperties": false
        }
      ]
    },
    "OrientationNedFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "yaw": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "yaw"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "pitch": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "pitch"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "roll": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "roll"
          ],
          "additionalProperties": false
        }
      ]
    },
    "OrientationEcefFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "yaw": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "yaw"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "pitch": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "pitch"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "roll": {
              "$ref": "#/definitions/NumberFilterOperationInput2"
            }
          },
          "required": [
            "roll"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationCheckInput3": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput3"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput3"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "all": {
              "$ref": "#/definitions/PipelineOperationCheckInput3"
            }
          },
          "required": [
            "all"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "any": {
              "$ref": "#/definitions/PipelineOperationCheckInput3"
            }
          },
          "required": [
            "any"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/OrientationValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineInput4": {
      "type": "object",
      "properties": {
        "operations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OperationInput4"
          }
        }
      },
      "required": [
        "operations"
      ]
    },
    "OperationInput4": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "aggregate": {
              "$ref": "#/definitions/PipelineOperationAggregateInput"
            }
          },
          "required": [
            "aggregate"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "filter": {
              "$ref": "#/definitions/PipelineOperationFilterInput4"
            }
          },
          "required": [
            "filter"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "check": {
              "$ref": "#/definitions/PipelineOperationCheckInput4"
            }
          },
          "required": [
            "check"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "count": {
              "$ref": "#/definitions/PipelineOperationCountInput"
            }
          },
          "required": [
            "count"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationFilterInput4": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput4"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationFilterInput4"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "relativeTimestamp": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "relativeTimestamp"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/LinearVelocityValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "LinearVelocityValueFilterInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "time": {
              "$ref": "#/definitions/NumberFilterOperationInput"
            }
          },
          "required": [
            "time"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "groundSpeed": {
              "$ref": "#/definitions/NumberFilterOperationInput4"
            }
          },
          "required": [
            "groundSpeed"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "verticalSpeed": {
              "$ref": "#/definitions/NumberFilterOperationInput4"
            }
          },
          "required": [
            "verticalSpeed"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "airSpeed": {
              "$ref": "#/definitions/NumberFilterOperationInput4"
            }
          },
          "required": [
            "airSpeed"
          ],
          "additionalProperties": false
        }
      ]
    },
    "NumberFilterOperationInput4": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "eq": {
              "$ref": "#/definitions/SpeedInput"
            }
          },
          "required": [
            "eq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "notEq": {
              "$ref": "#/definitions/SpeedInput"
            }
          },
          "required": [
            "notEq"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lt": {
              "$ref": "#/definitions/SpeedInput"
            }
          },
          "required": [
            "lt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lte": {
              "$ref": "#/definitions/SpeedInput"
            }
          },
          "required": [
            "lte"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gt": {
              "$ref": "#/definitions/SpeedInput"
            }
          },
          "required": [
            "gt"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gte": {
              "$ref": "#/definitions/SpeedInput"
            }
          },
          "required": [
            "gte"
          ],
          "additionalProperties": false
        }
      ]
    },
    "SpeedInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "metersPerSecond": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "metersPerSecond"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kilometersPerHour": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "kilometersPerHour"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "milesPerHour": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "milesPerHour"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "feetPerSecond": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "feetPerSecond"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "feetPerMinute": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "feetPerMinute"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "knots": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "knots"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PipelineOperationCheckInput4": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput4"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PipelineOperationCheckInput4"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "all": {
              "$ref": "#/definitions/PipelineOperationCheckInput4"
            }
          },
          "required": [
            "all"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "any": {
              "$ref": "#/definitions/PipelineOperationCheckInput4"
            }
          },
          "required": [
            "any"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/definitions/LinearVelocityValueFilterInput"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false
        }
      ]
    },
    "InternalEntity": {
      "type": "object",
      "properties": {
        "entity": {
          "description": "A filter to find the entity in the current recording. If multiple entities matching the filter\nare found, then one will be chosen non-deterministically.",
          "allOf": [
            {
              "$ref": "#/definitions/EntityFilterInput"
            }
          ]
        }
      },
      "required": [
        "entity"
      ]
    },
    "TemplateDimension": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "property": {
          "description": "The actual property used to derive data for this dimension.",
          "allOf": [
            {
              "$ref": "#/definitions/Property"
            }
          ]
        },
        "partition": {
          "description": "The particular partition of a segment (start, steadyState or end) this dimension references.",
          "anyOf": [
            {
              "$ref": "#/definitions/DimensionSegmentPartition"
            },
            {
              "type": "null"
            }
          ]
        },
        "operations": {
          "description": "A list of operations to alter and aggregate this dimension for a segment or partition. These\nwill be carried out in order. This list can be empty if no modification or aggregation is\ndesired.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DimensionOperation"
          }
        },
        "unit": {
          "description": "The canonical unit for this dimension.",
          "anyOf": [
            {
              "$ref": "#/definitions/TemplateDimensionUnit"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "name",
        "property"
      ]
    },
    "Property": {
      "type": "string",
      "enum": [
        "entityOrientationYaw",
        "entityOrientationPitch",
        "entityOrientationRoll",
        "entityPosition",
        "entityPositionLongitude",
        "entityPositionLatitude",
        "entityPositionAltitudeMsl",
        "entityLinearVelocityAirSpeed",
        "entityLinearVelocityGroundSpeed",
        "entityLinearVelocityVerticalSpeed",
        "entityAccelerationLocalX",
        "entityAccelerationLocalY",
        "entityAccelerationLocalZ"
      ]
    },
    "DimensionSegmentPartition": {
      "type": "string",
      "enum": [
        "entry",
        "steadyState",
        "exit"
      ]
    },
    "DimensionOperation": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "mean",
            "median",
            "max",
            "min",
            "abs",
            "count"
          ]
        },
        {
          "description": "Divide the segment for this dimension into contiguous non-overlapping \"chunks\" using the\n`by` property, and then derive the `get` value for each chunk.",
          "type": "object",
          "properties": {
            "chunk": {
              "type": "object",
              "properties": {
                "by": {
                  "$ref": "#/definitions/DimensionOperationChunkBy"
                },
                "get": {
                  "$ref": "#/definitions/DimensionOperationChunkProperty"
                }
              },
              "required": [
                "by",
                "get"
              ]
            }
          },
          "required": [
            "chunk"
          ],
          "additionalProperties": false
        },
        {
          "description": "Calculate the rate of change per second of this dimension.",
          "type": "string",
          "const": "rateOfChange"
        },
        {
          "description": "The difference between the first and last data point in the segment.",
          "type": "string",
          "const": "netChange"
        },
        {
          "description": "The difference between the minimum and maximum value of data points in the segment.",
          "type": "string",
          "const": "range"
        }
      ]
    },
    "DimensionOperationChunkBy": {
      "oneOf": [
        {
          "description": "Each chunk contains the data points that deviate from the mean. New chunks are created every\ntime the data points go from being below the mean to above, or vice versa. The total number\nof chunks will be one greater than the number of times the segment crosses the mean.",
          "type": "string",
          "const": "mean"
        },
        {
          "description": "Each chunk contains the data points that deviate from the median. New chunks are created every\ntime the data points go from being below the median to above, or vice versa. The total number\nof chunks will be one greater than the number of times the segment crosses the median.",
          "type": "string",
          "const": "median"
        }
      ]
    },
    "DimensionOperationChunkProperty": {
      "oneOf": [
        {
          "description": "The temporal duration of the chunk",
          "type": "string",
          "const": "duration"
        }
      ]
    },
    "TemplateDimensionUnit": {
      "anyOf": [
        {
          "$ref": "#/definitions/AngleUnit"
        },
        {
          "$ref": "#/definitions/LengthUnit"
        },
        {
          "$ref": "#/definitions/SpeedUnit"
        },
        {
          "$ref": "#/definitions/TimeUnit"
        },
        {
          "$ref": "#/definitions/AccelerationUnit"
        },
        {
          "type": "object",
          "properties": {
            "latitude": {
              "$ref": "#/definitions/AngleUnit"
            },
            "longitude": {
              "$ref": "#/definitions/AngleUnit"
            },
            "altitude": {
              "$ref": "#/definitions/LengthUnit"
            }
          },
          "required": [
            "latitude",
            "longitude",
            "altitude"
          ]
        }
      ]
    },
    "AngleUnit": {
      "description": "Auto-generated discriminant enum variants",
      "type": "string",
      "enum": [
        "degrees",
        "radians"
      ]
    },
    "LengthUnit": {
      "description": "Auto-generated discriminant enum variants",
      "type": "string",
      "enum": [
        "meters",
        "millimeters",
        "kilometers",
        "miles",
        "feet",
        "nauticalMiles"
      ]
    },
    "SpeedUnit": {
      "description": "Auto-generated discriminant enum variants",
      "type": "string",
      "enum": [
        "metersPerSecond",
        "kilometersPerHour",
        "milesPerHour",
        "feetPerSecond",
        "feetPerMinute",
        "knots"
      ]
    },
    "TimeUnit": {
      "description": "Auto-generated discriminant enum variants",
      "type": "string",
      "enum": [
        "milliseconds",
        "seconds"
      ]
    },
    "AccelerationUnit": {
      "description": "Auto-generated discriminant enum variants",
      "type": "string",
      "enum": [
        "metersPerSecondSquared",
        "feetPerSecondSquared",
        "gForce",
        "ballWidth"
      ]
    },
    "TemplateSegment": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of this segment type.",
          "type": "string"
        },
        "condition": {
          "description": "The condition used to determine which parts of the entire dataset belong to this segment type.\nIf no condition is provided then the entire dataset will be part of one segment of this type.",
          "anyOf": [
            {
              "$ref": "#/definitions/SegmentCondition"
            },
            {
              "type": "null"
            }
          ]
        },
        "partitioning": {
          "description": "The mechanism used to separate the data in this segment into \"Entry\", \"Steady State\" and \"Exit\"\npartitions. If null, then the segment won't be partitioned and all the data will be considered to\nbe in the \"Steady State\".",
          "anyOf": [
            {
              "$ref": "#/definitions/SegmentPartitioning"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "name"
      ]
    },
    "SegmentCondition": {
      "anyOf": [
        {
          "description": "All contiguous data points that satisfy the `when` condition will be part of segment of this type.",
          "type": "object",
          "properties": {
            "when": {
              "$ref": "#/definitions/Condition"
            }
          },
          "required": [
            "when"
          ]
        },
        {
          "description": "All contiguous data points that satisfy the `start` condition and not the `end` condition will\nbe part of segment of this type.",
          "type": "object",
          "properties": {
            "start": {
              "$ref": "#/definitions/Condition"
            },
            "end": {
              "$ref": "#/definitions/Condition"
            }
          },
          "required": [
            "start",
            "end"
          ]
        }
      ]
    },
    "Condition": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "check": {
              "type": "object",
              "properties": {
                "dimension": {
                  "type": "string"
                },
                "operation": {
                  "$ref": "#/definitions/ConditionOperation"
                }
              },
              "required": [
                "dimension",
                "operation"
              ]
            }
          },
          "required": [
            "check"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Condition"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Condition"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "not": {
              "$ref": "#/definitions/Condition"
            }
          },
          "required": [
            "not"
          ],
          "additionalProperties": false
        }
      ]
    },
    "ConditionOperation": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ConditionOperation"
              }
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ConditionOperation"
              }
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "not": {
              "$ref": "#/definitions/ConditionOperation"
            }
          },
          "required": [
            "not"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the dimension is strictly less than the target.",
          "type": "object",
          "properties": {
            "lt": {
              "$ref": "#/definitions/ConditionFragment"
            }
          },
          "required": [
            "lt"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the dimension is less than or equal to the target.",
          "type": "object",
          "properties": {
            "lte": {
              "$ref": "#/definitions/ConditionFragment"
            }
          },
          "required": [
            "lte"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the dimension is strictly greater than the target.",
          "type": "object",
          "properties": {
            "gt": {
              "$ref": "#/definitions/ConditionFragment"
            }
          },
          "required": [
            "gt"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the dimension is greater than or equal to the target.",
          "type": "object",
          "properties": {
            "gte": {
              "$ref": "#/definitions/ConditionFragment"
            }
          },
          "required": [
            "gte"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the dimension is exactly equal to the target.",
          "type": "object",
          "properties": {
            "eq": {
              "$ref": "#/definitions/ConditionFragment"
            }
          },
          "required": [
            "eq"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the dimension is between a range around a given target.",
          "type": "object",
          "properties": {
            "near": {
              "$ref": "#/definitions/ConditionFragmentNear"
            }
          },
          "required": [
            "near"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the dimension contains the target within it.",
          "type": "object",
          "properties": {
            "contains": {
              "$ref": "#/definitions/ConditionFragment"
            }
          },
          "required": [
            "contains"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the distance to the target satisfied the given condition. If the dimension being\nchecked and the target are positions, this will compare the straight-line distance between\nthe two. Otherwise, it's the absolute value of the difference between the two.",
          "type": "object",
          "properties": {
            "distance": {
              "type": "object",
              "properties": {
                "to": {
                  "$ref": "#/definitions/Target"
                },
                "condition": {
                  "$ref": "#/definitions/ConditionOperation"
                }
              },
              "required": [
                "to",
                "condition"
              ]
            }
          },
          "required": [
            "distance"
          ],
          "additionalProperties": false
        },
        {
          "description": "Check if the time at which point `when` is true matches the given condition. Note that it's\npossible for the dimension to never match `when`, in which case the evaluation of this operation\nwill return a `null` instead of `true` or `false`.",
          "type": "object",
          "properties": {
            "time": {
              "type": "object",
              "properties": {
                "when": {
                  "$ref": "#/definitions/ConditionOperation"
                },
                "condition": {
                  "$ref": "#/definitions/ConditionOperation"
                }
              },
              "required": [
                "when",
                "condition"
              ]
            }
          },
          "required": [
            "time"
          ],
          "additionalProperties": false
        }
      ]
    },
    "ConditionFragment": {
      "type": "object",
      "properties": {
        "target": {
          "$ref": "#/definitions/Target"
        }
      },
      "required": [
        "target"
      ]
    },
    "Target": {
      "oneOf": [
        {
          "description": "The target is a literal value.",
          "type": "object",
          "properties": {
            "literal": {
              "$ref": "#/definitions/LiteralInput"
            }
          },
          "required": [
            "literal"
          ],
          "additionalProperties": false
        },
        {
          "description": "The target is the same dimension in the reference entity.",
          "type": "object",
          "properties": {
            "entity": {
              "type": "object",
              "properties": {
                "reference": {
                  "description": "The key in the top-level `referenceEntities` object that describes the entity.",
                  "type": "string"
                },
                "at": {
                  "description": "An optional time at which to get the entity's value for comparison. If this is `null`\nthen the target value will be evaluated at the same point in time as the one being\ncompared.",
                  "anyOf": [
                    {
                      "$ref": "#/definitions/TimeInput"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "reference"
              ]
            }
          },
          "required": [
            "entity"
          ],
          "additionalProperties": false
        }
      ]
    },
    "LiteralInput": {
      "anyOf": [
        {
          "$ref": "#/definitions/AngleInput"
        },
        {
          "$ref": "#/definitions/LengthInput"
        },
        {
          "$ref": "#/definitions/SpeedInput"
        },
        {
          "$ref": "#/definitions/TimeInput"
        },
        {
          "$ref": "#/definitions/AccelerationInput"
        },
        {
          "$ref": "#/definitions/StringLiteral"
        },
        {
          "$ref": "#/definitions/PositionGeodeticInput"
        },
        {
          "$ref": "#/definitions/CardinalLiteral"
        }
      ]
    },
    "AccelerationInput": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "metersPerSecondSquared": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "metersPerSecondSquared"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "feetPerSecondSquared": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "feetPerSecondSquared"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "gForce": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "gForce"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ballWidth": {
              "type": "number",
              "format": "double"
            }
          },
          "required": [
            "ballWidth"
          ],
          "additionalProperties": false
        }
      ]
    },
    "StringLiteral": {
      "type": "object",
      "properties": {
        "string": {
          "type": "string"
        }
      },
      "required": [
        "string"
      ]
    },
    "PositionGeodeticInput": {
      "type": "object",
      "properties": {
        "latitude": {
          "$ref": "#/definitions/AngleInput"
        },
        "longitude": {
          "$ref": "#/definitions/AngleInput"
        },
        "altitude": {
          "$ref": "#/definitions/PositionGeodeticAltitudeInput"
        }
      },
      "required": [
        "latitude",
        "longitude",
        "altitude"
      ]
    },
    "PositionGeodeticAltitudeInput": {
      "type": "object",
      "properties": {
        "meanSeaLevel": {
          "$ref": "#/definitions/LengthInput"
        },
        "heightAboveEllipsoid": {
          "$ref": "#/definitions/LengthInput"
        }
      },
      "required": [
        "meanSeaLevel",
        "heightAboveEllipsoid"
      ]
    },
    "CardinalLiteral": {
      "type": "object",
      "properties": {
        "value": {
          "type": "integer",
          "format": "int32"
        }
      },
      "required": [
        "value"
      ]
    },
    "ConditionFragmentNear": {
      "type": "object",
      "properties": {
        "target": {
          "$ref": "#/definitions/Target"
        },
        "within": {
          "description": "The acceptable range around the target. These are provided as deltas from the target itself\nso the actual range will be between `target - startDelta` and `target + endDelta`.",
          "allOf": [
            {
              "$ref": "#/definitions/NearWithin"
            }
          ]
        }
      },
      "required": [
        "target",
        "within"
      ]
    },
    "NearWithin": {
      "type": "object",
      "properties": {
        "startDelta": {
          "$ref": "#/definitions/WithinTarget"
        },
        "endDelta": {
          "$ref": "#/definitions/WithinTarget"
        }
      },
      "required": [
        "startDelta",
        "endDelta"
      ]
    },
    "WithinTarget": {
      "oneOf": [
        {
          "description": "This end of the `within` range includes the exact value (i.e. `>= target + startDelta` or\n`<= target + endDelta`)",
          "type": "object",
          "properties": {
            "inclusive": {
              "$ref": "#/definitions/LiteralInput"
            }
          },
          "required": [
            "inclusive"
          ],
          "additionalProperties": false
        },
        {
          "description": "This end of the `within` range excludes the exact value (i.e. `> target + startDelta` or\n`< target + endDelta`)",
          "type": "object",
          "properties": {
            "exclusive": {
              "$ref": "#/definitions/LiteralInput"
            }
          },
          "required": [
            "exclusive"
          ],
          "additionalProperties": false
        }
      ]
    },
    "SegmentPartitioning": {
      "type": "object",
      "properties": {
        "dimension": {
          "description": "The dimension on which to base the segment partitioning.",
          "type": "string"
        }
      },
      "required": [
        "dimension"
      ]
    },
    "TemplateAssessment": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of this assessment.",
          "type": "string"
        },
        "segment": {
          "description": "The segment this assessment will grade.",
          "type": "string"
        },
        "rubric": {
          "description": "A collection of rubrics and variations relevant to this assessment.",
          "allOf": [
            {
              "$ref": "#/definitions/TemplateRubric"
            }
          ]
        },
        "gradeAggregation": {
          "description": "How the grade for this assessment is aggregated for each relevant dimension, and across\ndimensions for each segment.",
          "allOf": [
            {
              "$ref": "#/definitions/AssessmentGradeAggregation"
            }
          ]
        }
      },
      "required": [
        "name",
        "segment",
        "rubric",
        "gradeAggregation"
      ]
    },
    "TemplateRubric": {
      "type": "object",
      "properties": {
        "base": {
          "description": "A list of base rubrics, in order from the highest grade to the lowest grade. The last rubric in\nthis list must be a catch-all for dimension values that don't fall into any of the previous rubrics.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RubricBase"
          }
        },
        "variations": {
          "description": "A list of variations which can be applied to the base rubrics.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RubricVariation"
          }
        }
      },
      "required": [
        "base"
      ]
    },
    "RubricBase": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the rubric.",
          "type": "string"
        },
        "value": {
          "description": "A numerical value for the rubric.",
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "color": {
          "description": "The color used for this rubric in the UI.",
          "type": "string"
        },
        "condition": {
          "description": "The conditions each relevant dimension must fulfill to satisfy this rubric.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/ConditionOperation"
          }
        }
      },
      "required": [
        "name",
        "color"
      ]
    },
    "RubricVariation": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of this variation.",
          "type": "string"
        },
        "dimensions": {
          "description": "How the condition will be altered for each dimension when this variation is active.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/ConditionVariation"
          }
        }
      },
      "required": [
        "name",
        "dimensions"
      ]
    },
    "ConditionVariation": {
      "oneOf": [
        {
          "description": "Modify the target value by some delta. A positive delta will make the rubric condition\nmore inclusive while a negative delta will make it less inclusive.",
          "type": "object",
          "properties": {
            "delta": {
              "$ref": "#/definitions/LiteralInput"
            }
          },
          "required": [
            "delta"
          ],
          "additionalProperties": false
        },
        {
          "description": "Override the target check with this one instead.",
          "type": "object",
          "properties": {
            "override": {
              "$ref": "#/definitions/ConditionOperation"
            }
          },
          "required": [
            "override"
          ],
          "additionalProperties": false
        }
      ]
    },
    "AssessmentGradeAggregation": {
      "type": "object",
      "properties": {
        "dimension": {
          "description": "How the value for each dimension is calculated across all the grades.",
          "allOf": [
            {
              "$ref": "#/definitions/DimensionGradeAggregation"
            }
          ]
        },
        "segment": {
          "description": "How the value for each segment is calculated across all the dimensions.",
          "allOf": [
            {
              "$ref": "#/definitions/SegmentGradeAggregation"
            }
          ]
        }
      },
      "required": [
        "dimension",
        "segment"
      ]
    },
    "DimensionGradeAggregation": {
      "oneOf": [
        {
          "description": "The exact value of the highest grade for which the condition was satisfied",
          "type": "string",
          "const": "exact"
        },
        {
          "description": "Linear interpolation between the highest grade where the condition was satisfied and the\nnext best grade. This will only apply if all grades in the rubric have a numerical value.\nOtherwise, this behaves the same as Exact.",
          "type": "string",
          "const": "lerp"
        }
      ]
    },
    "SegmentGradeAggregation": {
      "oneOf": [
        {
          "description": "The grade of the entire segment will be the lowest/worst grade any of the dimensions\nwithin it scored.",
          "type": "string",
          "const": "lowest"
        },
        {
          "description": "The grade of the entire segment will be the highest/best grade any of the dimensions\nwithin it scored.",
          "type": "string",
          "const": "highest"
        },
        {
          "description": "The grade of the entire segment will be the mean of the grades of all dimensions within\nit. This only applies if all the rubrics have a numerical value.",
          "type": "string",
          "const": "mean"
        }
      ]
    }
  }
}