﻿{ "$schema":                  "https://json-schema.org/draft/2020-12/schema",
  "$id":                      "https://schemas.mpai.community/PAF/V1.6/data/PortableAvatar.json",
  "title":                    "Portable Avatar V1.6", "type": "object", "properties": {

    "Header":                 { "type": "string", "pattern": "^PAF-PAV-V[0-9]{1,2}[.][0-9]{1,2}$" },
    "MInstanceID":            { "type": "string" },
    "PortableAvatarID":       { "type": "string" },

    "AVSceneSpaceTime":       { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },

    "AVSceneDescriptors":     { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/AudioVisualSceneDescriptors.json" },

    "AvatarSpaceTime":        { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },

    "AvatarOrAvatarID":       { "type": "array", "items": { "anyOf": [

                                  { "type": "object", "properties": { "Avatar": { "$ref": "https://schemas.mpai.community/PAF/V1.6/data/3DModelObject.json" } } },

                                  { "type": "object", "properties": { "AvatarID": { "type": "string" } } } ] } },

    "LanguageSelector":       { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Selector.json" },

    "TextObject":             { "$ref": "https://schemas.mpai.community/MMC/V2.4/data/TextObject.json" },

    "MLModelOrMLModelID":     { "type": "array", "items": { "anyOf": [

                                  { "type": "object", "properties": { "SpeechModel": { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/MLModel.json" } } },
                                  { "type": "object", "properties": { "SpeechModelID": { "type": "string" } } } ] } },

    "SpeechObjectOrObjectID": { "type": "array", "items": { "anyOf": [

                                  { "type": "object", "properties": { "SpeechObject": { "$ref": "https://schemas.mpai.community/MMC/V2.4/data/SpeechObject.json" } } },

                                  { "type": "object", "properties": { "SpeechObjectID": { "type": "string" } } } ] } },

    "PersonalStatus":         { "$ref": "https://schemas.mpai.community/MMC/V2.4/data/PersonalStatus.json" },

    "Accessories":            { "type": "array", "items": { "type": "object", "properties": { 
                                    "ClothID":  { "type": "string" },
                                    "Necklace": { "type": "string" },
                                    "Earrings": { "type": "string" } } } },

    "DescrMetadata":          { "type": "string", "maxLength": 2048 } } }