{ "$schema":                "https://json-schema.org/draft/2020-12/schema",
  "$id":                    "https://schemas.mpai.community/MMM4/V3.0/actions/MUAnimatePA.json",
  "title":                  "MUAnimatePA",
  "type":                   "object",
  "required":               [ "Header", "Time" ],
  "properties":             {

    "Header":               { "type": "string", "const": "MMM-3AP-V3.0" },
    "MInstanceID":          { "type": "string" },
    "UEnvironmentID":       { "type": "string" },
    "MUAnimatePAID":        { "type": "string" },
    "MUAnimatePATime":      { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SimpleTime.json" },

    "Time":                 { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SimpleTime.json" },

    "MUAnimatePARQ":        { "type": "object", "properties": {
      "RQ1":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "Nil" },
        "RItem":            { "type": "string" } } },
      "RQ2":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "At" },
        "ULocationID":      { "type": "string" } } },
      "RQ3":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "With" },
        "PointOfView":      { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/PointOfView.json" } } },
      "RQ4":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "With" },
        "Stream":           { "type": "string" } } },
      "RQ5":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "With" },
        "Rights":           { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/Rights.json" } } },
      "RQ6":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "With" },
        "SPM":              { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/ServicePricingModel.json" } } } } },

    "MUAnimatePARS":        { "type": "object", "properties": {
      "RS1":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "With" },
        "Rights":           { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/Rights.json" } } },
      "RS2":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "With" },
        "SPM":              { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/ServicePricingModel.json" } } },
      "RS3":                { "type": "object", "properties": {
        "Complement":       { "type": "string", "const": "With" },
        "PAStatus":         { "type": "array", "items": { "oneOf": [
                            { "type": "object", "properties": {
          "Err":            { "type": "string", "enum": [ "Clash", "FaultyPA", "IncID", "ULocOOR", "InsRights", "InsValue" ] } } },
                            { "type": "object", "properties": {
          "Ack":            { "type": "string", "enum": [ "Ack" ] } } } ] } } } } } },

    "DataXMData":         { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":      { "type": "string", "maxLength": 2048 } },

  "oneOf": [              { "required": [ "MUAnimatePARQ" ], "not": { "required": [ "MUAnimatePARS" ] } },
                          { "required": [ "MUAnimatePARS" ], "not": { "required": [ "MUAnimatePARQ" ] } } ] }
