{ "$schema":                                    "https://json-schema.org/draft/2020-12/schema",
  "$id":                                        "https://schemas.mpai.community/OSD/V1.5/data/BasicUltrasoundSceneDescriptors.json",
  "title":                                      "Basic Ultrasound Scene Descriptors V1.5", "type": "object", "additionalProperties": false, 
                                                "unevaluatedProperties": false, "required": [ "Header", "MInstanceID", "BasicUltrasoundSceneDescriptorsID", 
                                                "BasicUltrasoundSceneDescriptorsSpaceTime", "ObjectCount", "BasicUltrasoundSceneDescriptors" ], "properties": {
                                      
    "Header":                                   { "type": "string", "pattern": "^OSD-BLD-V[0-9]{1,2}[.][0-9]{1,2}$" },
    "MInstanceID":                              { "type": "string" },
    "BasicUltrasoundSceneDescriptorsID":        { "type": "string" },
    "BasicUltrasoundSceneDescriptorsSpaceTime": { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },
    "ObjectCount":                              { "type": "integer", "minimum": 0 },

    "BasicUltrasoundSceneDescriptors":          { "type": "array", "minItems": 0, "items": { "type": "object", "additionalProperties": false,
                                                  "required": [ "ObjectIDOrObject" ], "properties": {
      
      "ObjectSpaceTime":                        { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" } } } },

      "ObjectIDOrObject":                       { "$ref": "#/$defs/ObjectIDOrObject" },

    "Annotations":                              { "$ref": "#/$defs/Annotations" },
    "Rights":                                   { "$ref": "#/$defs/Rights" },
    "DataExchangeMetadata":                     { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/DataExchangeMetadata.json" },
    "Trace":                                    { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/Trace.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/UltrasoundObject.json" },
      { "type": "string" } ] } },

    "Annotations":                              { "type": "array", "items": { "type": "object", "additionalProperties": false,
                                                  "required": [ "AnnotationIDOrAnnotation", "AnnotationTimeSpace" ], "properties": {
      "AnnotationIDOrAnnotation":               { "type": "array", "minItems": 1, "maxItems": 1, "items": { "oneOf": [
        { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Annotation.json" },
        { "type": "string" } ] } },
      "AnnotationTimeSpace":                    { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },
      "AnnotationRights":                       { "$ref": "#/$defs/Rights" } } } },

    "Rights":                                   { "type": "array", "minItems": 1, "items": { "oneOf": [
      { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Right.json" },
      { "type": "string" } ] } } } }