{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-validated-maintenance-config-with-status-schema.json",
  "title": "ValidatedMaintenanceConfigWithStatus",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-maintenance-configuration-api-openapi.yml#/components/schemas/ValidatedMaintenanceConfigWithStatus",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "ID of the Maintenance Window Configuration.",
      "maxLength": 64,
      "minLength": 0
    },
    "invalid": {
      "type": "boolean",
      "description": "Boolean flag that tells if the Dynamic Focus Query(DFQ) is invalid."
    },
    "lastUpdated": {
      "type": "integer",
      "format": "int64",
      "minimum": 1
    },
    "name": {
      "type": "string",
      "description": "Name of the Maintenance Window Configuration.",
      "maxLength": 256,
      "minLength": 0
    },
    "query": {
      "type": "string",
      "description": "Dynamic Focus Query that determines the scope of the Maintenance Window configuration.",
      "maxLength": 2048,
      "minLength": 0
    },
    "status": {
      "type": "string",
      "description": "Status of the Maintenance Window Configuration. It can be one of: UNSCHEDULED, SCHEDULED, ACTIVE, FINISHED, PAUSED.",
      "enum": [
        "UNSCHEDULED",
        "SCHEDULED",
        "ACTIVE",
        "FINISHED",
        "PAUSED"
      ]
    },
    "windows": {
      "type": "array",
      "description": "A set of time periods when the Maintenance Window Configuration is active.",
      "items": {
        "$ref": "#/$defs/MaintenanceWindow"
      },
      "maxItems": 1,
      "minItems": 0,
      "uniqueItems": true
    }
  },
  "required": [
    "id",
    "name",
    "query",
    "status"
  ],
  "$defs": {
    "MaintenanceWindow": {
      "type": "object",
      "description": "A set of time periods when the Maintenance Window Configuration is active.",
      "properties": {
        "end": {
          "type": "integer",
          "format": "int64",
          "minimum": 1
        },
        "id": {
          "type": "string",
          "maxLength": 64,
          "minLength": 0
        },
        "start": {
          "type": "integer",
          "format": "int64",
          "minimum": 0
        }
      },
      "required": [
        "id"
      ]
    }
  }
}