{ "$schema":                  "https://json-schema.org/draft/2020-12/schema",
  "$id":                      "https://schemas.mpai.community/MMM4/V3.0/actions/PropertyChangePA.json",
  "title":                    "Property Change PA V3.0",
  "type":                     "object",
  "required":                 [ "Header", "Time" ],
  "properties":               {

    "Header":                 { "type": "string", "const": "MMM-PCP-V3.0" },
    "MInstanceID":            { "type": "string" },
    "UEnvironmentID":         { "type": "string" },
    "PropertyChangePAID":     { "type": "string" },
    "PropertyChangePATime":   { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SimpleTime.json" },

    "Time":                   { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SimpleTime.json" },

    "PropertyChangePARQ":     { "type": "object", "properties": {
      "RQ1":                  { "type": "object", "required": [ "Complement", "ItemID" ],               "properties": { "Complement": { "type": "string", "const": "Nil" },  "ItemID":               { "type": "string" } } },
      "RQ2":                  { "type": "object", "required": [ "Complement", "PerceptibilityStatus" ], "properties": { "Complement": { "type": "string", "const": "With" }, "PerceptibilityStatus": { "type": "boolean" } } },
      "RQ3":                  { "type": "object", "required": [ "Complement", "Resize" ],               "properties": { "Complement": { "type": "string", "const": "With" }, "Resize": { "type": "object", "required": [ "Rx", "Ry", "Rz" ], "properties": { "Rx": { "type": "number" }, "Ry": { "type": "number" }, "Rz": { "type": "number" } } } } },
      "RQ4":                  { "type": "object", "required": [ "Complement", "ThreeDModelObject" ],    "properties": { "Complement": { "type": "string", "const": "With" }, "ThreeDModelObject": { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/3DModelObject.json" } } },
      "RQ5":                  { "type": "object", "required": [ "Complement", "VisualObject" ],         "properties": { "Complement": { "type": "string", "const": "With" }, "VisualObject":    { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/VisualObject.json" } } },
      "RQ6":                  { "type": "object", "required": [ "Complement", "AcousticProfile" ],      "properties": { "Complement": { "type": "string", "const": "With" }, "AcousticProfile": { "$ref": "https://schemas.mpai.community/CAE3/V1.0/data/AcousticProfile.json#/$defs/Object" } } },
      "RQ7":                  { "type": "object", "required": [ "Complement", "LightSource" ],          "properties": { "Complement": { "type": "string", "const": "With" }, "LightSource":     { "$ref": "https://schemas.mpai.community/CVE/V1.0/data/LightSource.json" } } },
      "RQ8":                  { "type": "object", "required": [ "Complement", "AudioSource" ],          "properties": { "Complement": { "type": "string", "const": "With" }, "AudioSource":     { "$ref": "https://schemas.mpai.community/CAE3/V1.0/data/AudioSource.json" } } },
      "RQ9":                  { "type": "object", "required": [ "Complement", "PersonalStatus" ],       "properties": { "Complement": { "type": "string", "const": "With" }, "PersonalStatus":  { "$ref": "https://schemas.mpai.community/MMC/V2.5/data/PersonalStatus.json" } } },
      "RQ10":                 { "type": "object", "required": [ "Complement", "Rights" ],               "properties": { "Complement": { "type": "string", "const": "With" }, "Rights":          { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Rights.json" } } },
      "RQ11":                 { "type": "object", "required": [ "Complement", "SPM" ],                  "properties": { "Complement": { "type": "string", "const": "With" }, "SPM":             { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/ServicePricingModel.json" } } },
      "RQ12":                 { "type": "object", "required": [ "Complement", "Properties" ],           "properties": { "Complement": { "type": "string", "const": "With" }, "Properties":      { "type": "array", "minItems": 1, "items": { "$ref": "https://schemas.mpai.community/MMM4/V3.0/data/ItemProperty.json#/$defs/Property" } } } } } },

    "PropertyChangePARS":     { "type": "object", "properties": {
      "RS1":                  { "type": "object", "required": [ "Complement", "Rights" ], "properties": { "Complement": { "type": "string", "const": "With" }, "Rights": { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/Rights.json" } } },
      "RS2":                  { "type": "object", "required": [ "Complement", "SPM" ],    "properties": { "Complement": { "type": "string", "const": "With" }, "SPM":    { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/ServicePricingModel.json" } } },
      "RS3":                  { "type": "object", "properties": { "Complement": { "type": "string", "const": "With" }, "PAStatus": { "type": "array", "items": { "oneOf": [
                              { "type": "object", "properties": { "Ack": { "type": "string", "enum": [ "Ack" ] } } },
                              { "type": "object", "properties": { "Err": { "type": "string", "enum": [ "FaultyPA", "IncID", "MLocOOR", "InsRights", "InsValue" ] } } } ] } } } } } },

    "DataXMData":             { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":          { "type": "string", "maxLength": 2048 } },

  "oneOf": [                  { "required": [ "PropertyChangePARQ" ], "not": { "required": [ "PropertyChangePARS" ] } },
                              { "required": [ "PropertyChangePARS" ], "not": { "required": [ "PropertyChangePARQ" ] } } ] }