{
  "$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": "^createModflowModel$"
    },
    "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}$"
        },
        "name": {
          "type": "string",
          "minLength": 3,
          "maxLength": 255
        },
        "description": {
          "type": "string"
        },
        "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": {
          "description": "0: undefined, 1: feet, 2: meters, 3: centimeters",
          "enum": [
            0,
            1,
            2,
            3
          ]
        },
        "time_unit": {
          "description": "0: undefined, 1: seconds, 2: minutes, 3: hours, 4: days, 5: years",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5
          ]
        },
        "public": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "name",
        "description",
        "geometry",
        "bounding_box",
        "grid_size",
        "cells",
        "stressperiods",
        "length_unit",
        "time_unit",
        "public"
      ]
    }
  },
  "required": [
    "uuid",
    "message_name",
    "metadata",
    "payload"
  ]
}
