{
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "Notification",
  "description": "A notification sent by a ledger",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier for this notification",
      "$ref": "Iri.json"
    },
    "event": {
      "description": "Event identifier for the type of event",
      "$ref": "EventId.json"
    },
    "resource": {
      "description": "The subject of the notification",
      "oneOf": [
        { "$ref": "Transfer.json" },
        { "$ref": "Message.json" }
      ]
    },
    "related_resources": {
      "type": "object",
      "description": "Additional resources relevant to the event",
      "properties": {
        "execution_condition_fulfillment": {
          "$ref": "ConditionFulfillment.json"
        },
        "cancellation_condition_fulfillment": {
          "$ref": "ConditionFulfillment.json"
        }
      },
      "additionalProperties": false
    }
  },
  "required": ["event", "resource"],
  "additionalProperties": false
}
