{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:phc:experimental:exchange:0.1.0",
  "title": "PHC experimental quarantine exchange 0.1.0",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "format",
    "format_version",
    "bundle_ref",
    "exporter_ref",
    "intended_recipient_ref",
    "issued_at",
    "expires_at",
    "export_purpose",
    "required_capabilities",
    "identity_mappings",
    "records",
    "personas",
    "relationships",
    "restrictions",
    "tombstones",
    "lifecycle_checkpoint",
    "migration_map",
    "proof_refs"
  ],
  "properties": {
    "format": {
      "const": "phc-exchange-experimental"
    },
    "format_version": {
      "const": "0.1.0-draft"
    },
    "bundle_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    },
    "exporter_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    },
    "intended_recipient_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    },
    "issued_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
    },
    "expires_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
    },
    "export_purpose": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    },
    "required_capabilities": {
      "type": "array",
      "items": {
        "enum": [
          "experimental:provenance:1",
          "experimental:temporal:1",
          "experimental:lifecycle:1",
          "experimental:persona-association:1",
          "experimental:restriction-purposes-subset:1",
          "experimental:restriction-processing-routes-subset:1",
          "experimental:restriction-operations-subset:1",
          "experimental:restriction-recipients-subset:1",
          "experimental:restriction-not-after:1",
          "experimental:restriction-review-required:1",
          "experimental:restriction-export-forbidden:1",
          "experimental:restriction-delegation-forbidden:1",
          "experimental:restriction-qualification-required:1"
        ]
      },
      "maxItems": 32,
      "minItems": 4,
      "uniqueItems": true
    },
    "identity_mappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/identity"
      },
      "maxItems": 32,
      "minItems": 1
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/record"
      },
      "maxItems": 256,
      "minItems": 0
    },
    "personas": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/persona"
      },
      "maxItems": 32,
      "minItems": 0
    },
    "relationships": {
      "type": "array",
      "items": {},
      "maxItems": 0,
      "minItems": 0
    },
    "restrictions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/rule"
      },
      "maxItems": 256,
      "minItems": 0
    },
    "tombstones": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "record_ref",
          "version",
          "deleted_at",
          "safety_sequence"
        ],
        "properties": {
          "record_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "deleted_at": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
          },
          "safety_sequence": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        }
      },
      "maxItems": 256,
      "minItems": 0
    },
    "lifecycle_checkpoint": {
      "$ref": "#/$defs/checkpoint"
    },
    "migration_map": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/mapping"
      },
      "maxItems": 256,
      "minItems": 0
    },
    "proof_refs": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 160,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
      },
      "maxItems": 16,
      "minItems": 0,
      "uniqueItems": true
    }
  },
  "$defs": {
    "parent": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "record_ref",
        "version"
      ],
      "properties": {
        "record_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        }
      }
    },
    "provenance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "authenticated_producer_ref",
        "reported_run_ref",
        "reported_release",
        "source_namespace",
        "source_ref",
        "source_version",
        "evidence_ref",
        "evidence_status",
        "confirmation_evidence"
      ],
      "properties": {
        "authenticated_producer_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "reported_run_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "reported_release": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "source_namespace": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "source_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "source_version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "evidence_ref": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "evidence_status": {
          "enum": [
            "unverified",
            "unavailable"
          ]
        },
        "confirmation_evidence": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "reviewer_ref",
                "reviewed_record_version",
                "confirmed_at"
              ],
              "properties": {
                "reviewer_ref": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                },
                "reviewed_record_version": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "confirmed_at": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
                }
              }
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "identity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_namespace",
        "source_subject_ref",
        "source_custodian_ref",
        "source_tenant_ref",
        "destination_binding_status"
      ],
      "properties": {
        "source_namespace": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "source_subject_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "source_custodian_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "source_tenant_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "destination_binding_status": {
          "const": "unresolved-quarantine-required"
        }
      }
    },
    "record": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "record_ref",
        "version",
        "subject_ref",
        "custodian_ref",
        "tenant_ref",
        "kind",
        "assertion_type",
        "lifecycle_state",
        "content",
        "provenance",
        "observed_at",
        "effective_from",
        "effective_until",
        "review_after",
        "classification",
        "allowed_purposes",
        "policy_version",
        "restriction_refs",
        "derivation_parents"
      ],
      "properties": {
        "record_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "subject_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "custodian_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "tenant_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "kind": {
          "enum": [
            "fact",
            "goal",
            "preference",
            "episode"
          ]
        },
        "assertion_type": {
          "enum": [
            "user_stated",
            "reported_user_statement",
            "observed",
            "inferred"
          ]
        },
        "lifecycle_state": {
          "enum": [
            "proposed",
            "confirmed",
            "disputed",
            "stale",
            "superseded"
          ]
        },
        "content": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "statement"
          ],
          "properties": {
            "statement": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          }
        },
        "provenance": {
          "$ref": "#/$defs/provenance"
        },
        "observed_at": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
        },
        "effective_from": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
        },
        "effective_until": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
            },
            {
              "type": "null"
            }
          ]
        },
        "review_after": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
        },
        "classification": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "vocabulary",
            "version",
            "label"
          ],
          "properties": {
            "vocabulary": {
              "const": "experimental:classification"
            },
            "version": {
              "const": "1"
            },
            "label": {
              "enum": [
                "ordinary",
                "sensitive",
                "restricted"
              ]
            }
          }
        },
        "allowed_purposes": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
          },
          "maxItems": 256,
          "minItems": 1,
          "uniqueItems": true
        },
        "policy_version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "restriction_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
          },
          "maxItems": 256,
          "minItems": 0,
          "uniqueItems": true
        },
        "derivation_parents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/parent"
          },
          "maxItems": 256,
          "minItems": 0,
          "uniqueItems": true
        }
      }
    },
    "persona": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "persona_profile_ref",
        "custodian_ref",
        "version",
        "label",
        "record_associations",
        "restriction_refs",
        "preferences"
      ],
      "properties": {
        "persona_profile_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "custodian_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "record_associations": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
          },
          "maxItems": 256,
          "minItems": 0,
          "uniqueItems": true
        },
        "restriction_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
          },
          "maxItems": 256,
          "minItems": 0,
          "uniqueItems": true
        },
        "preferences": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "value",
              "advisory"
            ],
            "properties": {
              "type": {
                "enum": [
                  "response_length",
                  "tone"
                ]
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "advisory": {
                "const": true
              }
            }
          },
          "maxItems": 16,
          "minItems": 0
        }
      }
    },
    "rule": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-purposes-subset:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "purposes"
              ],
              "properties": {
                "purposes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                  },
                  "maxItems": 256,
                  "minItems": 1,
                  "uniqueItems": true
                }
              }
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-processing-routes-subset:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "route_refs"
              ],
              "properties": {
                "route_refs": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                  },
                  "maxItems": 256,
                  "minItems": 1,
                  "uniqueItems": true
                }
              }
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-operations-subset:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "operations"
              ],
              "properties": {
                "operations": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "read",
                      "contribute",
                      "confirm",
                      "share",
                      "export"
                    ]
                  },
                  "maxItems": 256,
                  "minItems": 1,
                  "uniqueItems": true
                }
              }
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-recipients-subset:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "recipient_refs"
              ],
              "properties": {
                "recipient_refs": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                  },
                  "maxItems": 256,
                  "minItems": 1,
                  "uniqueItems": true
                }
              }
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-not-after:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "deadline"
              ],
              "properties": {
                "deadline": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
                }
              }
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-review-required:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "operation",
                "review_scope"
              ],
              "properties": {
                "operation": {
                  "enum": [
                    "share",
                    "export"
                  ]
                },
                "review_scope": {
                  "const": "recipient-and-record-version"
                }
              }
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-export-forbidden:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [],
              "properties": {}
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-delegation-forbidden:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [],
              "properties": {}
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "rule_ref",
            "version",
            "controlling_origin",
            "scope",
            "mandatory",
            "capability",
            "operands"
          ],
          "properties": {
            "rule_ref": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "version": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "controlling_origin": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
            },
            "scope": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
              },
              "maxItems": 256,
              "minItems": 1,
              "uniqueItems": true
            },
            "mandatory": {
              "const": true
            },
            "capability": {
              "const": "experimental:restriction-qualification-required:1"
            },
            "operands": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "profile_ref"
              ],
              "properties": {
                "profile_ref": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                }
              }
            }
          }
        }
      ]
    },
    "checkpoint": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "issuer_ref",
        "collection_ref",
        "sequence",
        "completeness_status"
      ],
      "properties": {
        "issuer_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "collection_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "sequence": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "completeness_status": {
          "const": "claim-requires-verification"
        }
      }
    },
    "mapping": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_record_ref",
        "source_version",
        "destination_record_ref",
        "status"
      ],
      "properties": {
        "source_record_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
        },
        "source_version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "destination_record_ref": {
          "type": "null"
        },
        "status": {
          "const": "pending-reviewed-binding"
        }
      }
    }
  }
}
