{
  "$ref": "#/definitions/deployment",
  "definitions": {
    "deployment": {
      "type": "object",
      "properties": {
        "answerMode": {
          "type": "string",
          "enum": [
            "hub",
            "companion"
          ]
        },
        "operator": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "dataResidency": {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        },
        "retention": {
          "type": "object",
          "properties": {
            "transcripts": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "none"
                },
                {
                  "type": "string",
                  "pattern": "^P(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$"
                }
              ]
            },
            "audit": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "none"
                },
                {
                  "type": "string",
                  "pattern": "^P(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$"
                }
              ]
            }
          },
          "additionalProperties": true
        }
      },
      "required": [
        "answerMode"
      ],
      "additionalProperties": true
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.schwaizer.ch/ocp/schemas/1.0/deployment.json"
}
