{ "$schema":                   "https://json-schema.org/draft/2020-12/schema",
  "$id":                       "https://schemas.mpai.community/OSD/V1.5/data/UltrasoundDescriptors.json",
  "title":                     "Ultrasound Scene Descriptors V1.5", "type": "object", "required": [ "Header", 
                               "USDescriptorsID", "USDescriptorsSpaceTime" ], "additionalProperties": false, "properties": {

    "Header":                  { "type": "string", "pattern": "^OSD-USD-V[0-9]{1,2}[.][0-9]{1,2}$" },
    "MInstanceID":             { "type": "string" },
    "USDescriptorsID":         { "type": "string" },
    "USDescriptorsSpaceTime":  { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },

    "ObjectCount":             { "type": "integer" },
    "Objects":                 { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": {
      "ObjectSpaceTime":       { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },
      "ObjectIDOrObject":      { "$ref": "#/$defs/ObjectIDOrObject" } } } },

    "SubUSCount":              { "type": "integer" },
    "SubUSs":                  { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": {
      "SubUSSpaceTime":        { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },
      "SubUSIDOrSubUS":        { "$ref": "#/$defs/SubUSIDOrSubUS" } } } },

    "BasicUSOrUS":             { "$ref": "#/$defs/BasicUSOrUS" },

    "DataXMData":              { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":           { "type": "string", "maxLength": 2048 } },

  "$defs":                     {

    "ObjectIDOrObject":        { "type": "array", "minItems": 1, "maxItems": 1, "items": { "oneOf": [
                                 { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/OfflineMapObject.json" },
                                 { "type": "string" } ] } },

    "SubUSIDOrSubUS":          { "type": "array", "minItems": 1, "maxItems": 1, "items": { "oneOf": [
                                 { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/UltrasoundDescriptors.json" },
                                 { "type": "string" } ] } },

    "BasicUSOrUS":             { "type": "array", "items": { "oneOf": [
                                 { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/BasicUltrasoundDescriptors.json" },
                                 { "$ref": "#/$defs/BasicUSOrUS" } ] } } } }