{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    },
    "message_name": {
      "type": "string",
      "pattern": "^updateModflowModelDiscretization$"
    },
    "metadata": {
      "type": "object"
    },
    "payload": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        },
        "geometry": {
          "$ref": "../geojson/polygon.json"
        },
        "bounding_box": {
          "$ref": "../modflow/boundingBox.json"
        },
        "grid_size": {
          "$ref": "../modflow/gridSize.json"
        },
        "cells": {
          "$ref": "../modflow/cells.json"
        },
        "intersection": {
          "type": "number"
        },
        "rotation": {
          "type": "number"
        },
        "stressperiods": {
          "$ref": "../modflow/stressperiods.json"
        },
        "length_unit": {
          "$ref": "../modflow/lengthUnit.json"
        },
        "time_unit": {
          "$ref": "../modflow/timeUnit.json"
        }
      },
      "required": [
        "id",
        "geometry",
        "bounding_box",
        "grid_size",
        "cells",
        "stressperiods",
        "length_unit",
        "time_unit"
      ]
    }
  },
  "required": [
    "uuid",
    "message_name",
    "metadata",
    "payload"
  ]
}
