{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://golfsga.com/sga-ois/schema/0.1/notice-result.schema.json",
  "title": "SGA-OIS notice delivery result",
  "description": "The engine telling a device what became of a notice it raised (12 section 7).",
  "type": "object",
  "required": [
    "type",
    "notice_id",
    "delivered"
  ],
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "notice.result",
      "description": "Message type discriminator. Always notice.result."
    },
    "notice_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The id the engine gave the notice."
    },
    "delivered": {
      "type": "boolean"
    },
    "reason": {
      "enum": [
        "player_disabled",
        "vendor_blocked",
        "not_permitted"
      ],
      "description": "Why it was not delivered: the player switched this device off, SGA blocked the vendor's notices, or the notice broke the limits of 12 section 7 (audience, urgency, severity or code). Absent when delivered."
    },
    "detail": {
      "type": "string",
      "maxLength": 200,
      "description": "For a log or a support call. Never parse it."
    }
  },
  "patternProperties": {
    "^x-[a-z0-9_-]+\\.": {}
  }
}
