{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://golfsga.com/sga-ois/schema/0.1/player-up.schema.json",
  "title": "SGA-OIS player up",
  "description": "The record an engine writes when the player at the ball changes (06 section 9.7). The standing field round.player_up says whose stroke a shot was; this record says whose turn it is, so a consumer can tell a member it is their turn without replaying the bay's standing fields. Written on a CHANGE of player only: a repeat of the same slot is not a new turn.",
  "type": "object",
  "required": [
    "sga_kind",
    "round_ref",
    "slot",
    "at"
  ],
  "additionalProperties": false,
  "properties": {
    "sga_kind": {
      "const": "player_up",
      "description": "Document type discriminator."
    },
    "round_ref": {
      "$ref": "round-boundary.schema.json#/$defs/roundRef",
      "description": "The round this turn falls in. The first player_up of a round is the assertion that opened it, so round_started with the same reference precedes it."
    },
    "slot": {
      "$ref": "common.schema.json#/$defs/slot",
      "description": "The playing position now at the ball. What binds to a person, in the cloud, through the check-in that holds the slot."
    },
    "display_label": {
      "$ref": "common.schema.json#/$defs/displayLabel"
    },
    "at": {
      "$ref": "round-boundary.schema.json#/$defs/at"
    }
  },
  "patternProperties": {
    "^x-[a-z0-9_-]+\\.": {}
  }
}
