{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://golfsga.com/sga-ois/schema/0.1/notice-response.schema.json",
  "title": "SGA-OIS notice response",
  "description": "A player's answer to a notice that carried choices, routed back to whoever asked. Always optional: nothing in a round ever waits on one.",
  "type": "object",
  "required": [
    "type",
    "notice_id",
    "choice"
  ],
  "additionalProperties": false,
  "properties": {
    "sga_kind": {
      "const": "notice-response",
      "description": "Document type discriminator. Always notice-response. Optional on the wire -- a consumer that already knows what it asked for does not need it -- but present in stored and exchanged documents so a file on its own can say what it is."
    },
    "type": {
      "const": "notice.response",
      "description": "Message type discriminator. Always notice.response."
    },
    "notice_id": {
      "type": "string",
      "maxLength": 64,
      "description": "The notice_id this answers."
    },
    "choice": {
      "type": "string",
      "maxLength": 32,
      "description": "The id of the option chosen, taken verbatim from that notice's choices. An id the notice did not offer MUST be rejected."
    },
    "slot": {
      "$ref": "common.schema.json#/$defs/slot",
      "description": "Who answered, by slot. The asking device learns a slot number, never a name."
    },
    "t_ms": {
      "$ref": "common.schema.json#/$defs/monotonicMs"
    },
    "session_epoch": {
      "$ref": "common.schema.json#/$defs/sessionEpoch"
    }
  },
  "patternProperties": {
    "^x-[a-z0-9_-]+\\.": {}
  }
}
