{ "$schema":                    "https://json-schema.org/draft/2020-12/schema",
  "$id":                        "https://schemas.mpai.community/MMM4/V2.2/data/Resolution.json",
  "title":                      "Resolution V2.2", "type": "object", "properties": {

    "Header":                   { "type": "string", "pattern": "^MMM-RES-V[0-9]{1,2}[.][0-9]{1,2}$" },

    "MInstanceID":              { "type": "string" },
    "MEnvironmentID":           { "type": "string" },

    "ResolutionID":             { "type": "string" },

    "ProcAToResolARequest":     { "type": "array", "items": { "type": "object", "properties": {

                                  "Rights":   { "type": "array", "items": { "type": "object", "properties": {
                                                    "Right": { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Right.json" } } } },

                                  "Partners": { "type": "array", "items": { "type": "object", "properties": {
                                                    "MInstances": { "type": "object", "properties": { 
                                                      "MInstanceID": { "type": "string" },
                                                       "Processes":  { "type": "array", "items": { "type": "object", "properties": {
                                                         "ProcessID": { "type": "string" } } } } } } } } } },
                                "required": [ "Rights", "Partners" ] } },

    "ResolAToResolBRequest":    { "type": "array", "items": { "type": "object", "properties": { "Processes": 
                                  { "type": "array", "items": { "type": "object", "properties": {
                                        "ProcessID": { "type": "string" } } } } } } },

    "ResolBToProcessBRequest":  { "type": "array", "items": { "type": "object", "properties": { "Processes": 
                                  { "type": "array", "items": { "type": "object", "properties": {
                                        "ProcessID": { "type": "string" } } } } } } },

    "ProcessBToResolBResponse": { "type": "boolean" },

    "ResolBToResolAResponse":   { "type": "array", "items": { "oneOf": [

                                    { "type": "object", "properties": { "Error": { "type": "string", "enum": [ "Error" ] } } },

                                    { "type": "object", "properties": { "Response": 
                                      { "type": "array", "items": { "type": "object", "properties": {
                                            "ProcessID": { "type": "string" },
                                            "JoinYN":    { "type": "boolean" } } } } } } ] } },

    "ResolAToProcessAResponse": { "type": "array", "items": { "oneOf": [

                                  { "type": "object", "properties": { "Error": { "type": "string", "enum": [ "Error" ] } } },

                                  { "type": "object", "properties": { "Response": 
                                    { "type": "array", "items": { "type": "object", "properties": {
                                          "MInstanceID": { "type": "string" },
                                          "ProcessID":   { "type": "string" },
                                          "JoinYN":      { "type": "boolean" } } } } } } ] } },

    "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 } } }