{ "$id":                          "https://schemas.mpai.community/TFA/V1.5/data/VisualQualifier.json",
  "$schema":                      "https://json-schema.org/draft/2020-12/schema",
  "title":                        "Visual Qualifier V1.5",
  "description":                  "Characteristics, structure, formats, and metadata of visual data.",
  "type":                         "object",
  "required":                     [ "Header", "VisualQualifierID", "SubType", "Format" ],
  "additionalProperties":         false,
  "properties":                   {

    "Header":                     { "type": "string", "pattern": "^TFA-VIQ-V[0-9],{1,2},[.][0-9],{1,2}$" },
    "MInstanceID":                { "type": "string" },
    "UEnvironmentID":             { "type": "string" },
    "VisualQualifierID":          { "type": "string" },
    "VisualQualifierTime":        { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },

    "SubType":                    { "type": "object", "additionalProperties": false, "properties": {
      "ColourFormat":             { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/ColourFormats.json" },
      "AlphaChannel":             { "type": "number", "minimum": 0, "maximum": 1 },
      "Brightness":               { "type": "number" },
      "ColourSubsampling":        { "type": "string", "enum": [ "4:4:4", "4:2:2", "4:2:0", "4:1:1" ] },
      "YUV":                      { "type": "string", "enum": [ "Y'UV", "Y'PbPr", "Y'CbCr", "YDbDr", "Y'IQ" ] },
      "CMYK":                     { "type": "string" } } },

    "Format":                     { "type": "object", "additionalProperties": false, "properties": {
      "Content":                  { "type": "object", "additionalProperties": false, "properties": {
        "TimeSampling":           { "type": "object", "additionalProperties": false, "properties": {
          "Precision":            { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": {                                     
            "bits-per-pixel":     { "type": "integer" } } } },
          "Time":                 { "type": "number" },
          "Space":                { "type": "number" } } },
        "2D":                     { "type": "object", "additionalProperties": false, "properties": {
          "Static":               { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/Visual2DStaticFormats.json" },
          "Dynamic":              { "type": "object", "additionalProperties": false, "properties": {
            "OtherContentFormat": { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/Visual2DDynamicFormats.json" } } } } },
        "3D":                     { "type": "object", "additionalProperties": false, "properties": {
          "Static":               { "type": "object", "additionalProperties": false, "properties": {
            "MPAIContentFormat":  { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/BoundingBox.json" },
            "MPAIGeometryFormat": { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/VisualGeometry.json" },
            "OtherContentFormats":{ "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/Visual3DStaticFormats.json" } } },
          "Dynamic":              { "type": "object", "additionalProperties": false, "properties": {
            "OtherContentFormats":{ "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/Visual3DDynamicFormats.json" } } } } } } },
      "Transport":                { "type": "object", "additionalProperties": false, "properties": {
        "FileFormat":             { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/VisualFileFormats.json" },
        "StreamFormat":           { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/VisualStreamFormats.json" } } } } },
    "Attributes":                 { "type": "object", "additionalProperties": false, "properties": {
      "Source":                   { "type": "object", "additionalProperties": false, "properties": {
        "Real":                   { "type": "string", "enum": [ "Raster" ] },
        "Synthetic":              { "type": "string", "enum": [ "Raster", "Vector" ] } } },
      "Metadata":                 { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/VisualMetadataFormats.json" },
      "ObjectID":                 { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/InstanceIdentifier.json" },
      "EntityInternalStatus":     { "$ref": "https://schemas.mpai.community/MMC/V2.5/data/PersonalStatus.json" },
      "Device":                   { "type": "object", "additionalProperties": false, "properties": {
        "DeviceID":               { "type": "string" },
        "DeviceRole":             { "type": "string", "enum": [ "Capture", "Render", "Bidirectional" ] },
        "DeviceType":             { "type": "string", "enum": [ "Camera", "DepthCamera", "Display", "HMD", "WearableCamera", "Other" ] },
        "Manufacturer":           { "type": "string" },
        "Model":                  { "type": "string" },
        "DeviceGeometry":         { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/DeviceSceneGeometry.json" },
        "Optics":                 { "type": "object", "additionalProperties": false, "properties": {
          "FieldOfView":          { "type": "number" },
          "FocalLength":          { "type": "number" },
          "Aperture":             { "type": "number" } } },
        "CaptureConfiguration":   { "type": "object", "additionalProperties": false, "properties": {
          "Resolution":           { "type": "string", "description": "e.g. 1920x1080" },
          "FrameRate":            { "type": "number" },
          "SamplingMode":         { "type": "string", "enum": [ "Progressive", "Interlaced" ] } } },
        "RenderConfiguration":    { "type": "object", "additionalProperties": false, "properties": {
          "Resolution":           { "type": "string" },
          "DisplayType":          { "type": "string", "enum": [ "LCD", "OLED", "MicroLED", "Projection", "HMD", "Other" ] },
          "RefreshRate":          { "type": "number" } } },
        "OperationalParameters":  { "type": "object", "additionalProperties": false, "properties": {
          "Brightness":           { "type": "number" },
          "Contrast":             { "type": "number" },
          "DynamicRange":         { "type": "number" } } },
        "Synchronisation":        { "type": "object", "additionalProperties": false, "properties": {
          "ClockType":            { "type": "string", "enum": [ "Internal", "External", "NetworkSynchronised" ] },
          "Reference":            { "type": "string" } } } } } } },

    "DataXMData":                { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":             { "type": "string", "maxLength": 2048 } } }
