{ "$schema":               "https://json-schema.org/draft/2020-12/schema",
  "$id":                   "https://schemas.mpai.community/MMM4/V3.0/actions/MMCapturePA.json",
  "title":                 "MM-Capture PA V3.0",
  "type":                  "object",
  "required":              [ "Header", "Time" ],
  "properties":            {

    "Header":              { "type": "string", "const": "MMM-2CP-V3.0" },
    "MInstanceID":         { "type": "string" },
    "UEnvironmentID":      { "type": "string" },
    "MMCapturePAID":       { "type": "string" },
    "MMCapturePATime":     { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SimpleTime.json" },

    "Time":                { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SimpleTime.json" },

    "MMCapturePARQ":       { "type": "object", "properties": {
      "RQ1":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "Nil" },  "LocationID":  { "type": "string" } } },
      "RQ2":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "With" }, "PointOfView": { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/PointOfView.json" } } },
      "RQ3":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "With" }, "Aperture":    { "type": "number" } } },
      "RQ4":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "With" }, "Rights":      { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/Rights.json" } } },
      "RQ5":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "With" }, "SPM":         { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/ServicePricingModel.json" } } } } },

    "MMCapturePARS":       { "type": "object", "properties": {
      "RS1":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "Nil" },  "Item":     { "type": "string" } } },
      "RS2":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "With" }, "Rights":   { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/Rights.json" } } },
      "RS3":               { "type": "object", "properties": { "Complement": { "type": "string", "const": "With" }, "PAStatus": { "type": "array", "items": { "oneOf": [
                           { "type": "object", "properties": { "Err": { "type": "string", "enum": [ "FaultyPA", "IncID", "MLocOOR", "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": [ "MMCapturePARQ" ], "not": { "required": [ "MMCapturePARS" ] } },
                           { "required": [ "MMCapturePARS" ], "not": { "required": [ "MMCapturePARQ" ] } } ] }