{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "default": 3,
      "type": "number",
      "const": 3
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "minLength": 1
    },
    "inputs": {
      "$ref": "#/$defs/__schema0"
    },
    "decisions": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
      },
      "additionalProperties": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "real"
              },
              "lower": {
                "type": "number"
              },
              "upper": {
                "type": "number"
              },
              "baseline": {
                "type": "number"
              }
            },
            "required": [
              "kind",
              "lower",
              "upper",
              "baseline"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "integer"
              },
              "lower": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "upper": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "step": {
                "default": 1,
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "baseline": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "kind",
              "lower",
              "upper",
              "step",
              "baseline"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "boolean"
              },
              "baseline": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "baseline"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "categorical"
              },
              "choices": {
                "minItems": 2,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "baseline": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "choices",
              "baseline"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "objectives": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "metric": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
          },
          "direction": {
            "type": "string",
            "enum": [
              "minimize",
              "maximize"
            ]
          },
          "label": {
            "type": "string"
          },
          "unit": {
            "default": "value",
            "type": "string"
          }
        },
        "required": [
          "metric",
          "direction",
          "unit"
        ],
        "additionalProperties": false
      }
    },
    "constraints": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "metric": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
          },
          "operator": {
            "type": "string",
            "enum": [
              "<=",
              ">="
            ]
          },
          "bound": {
            "type": "number"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "metric",
          "operator",
          "bound"
        ],
        "additionalProperties": false
      }
    },
    "searchSeeds": {
      "default": [
        42,
        43,
        44
      ],
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 4294967295
      }
    },
    "validationSeeds": {
      "default": [
        142,
        143,
        144
      ],
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 4294967295
      }
    }
  },
  "required": [
    "schemaVersion",
    "name",
    "version",
    "inputs",
    "decisions",
    "objectives",
    "constraints",
    "searchSeeds",
    "validationSeeds"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}
