{
    "title": "plan filter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.plan.PlanFilter",
    "type": "object",
    "required": [
        "jobschedulerId"
    ],
    "properties": {
        "jobschedulerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "regex": {
            "description": "regular expression to filter JobScheduler objects by matching the path",
            "type": "string",
            "pattern": "^((?!<script( |>)|<svg/on).)*$"
        },
        "states": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.plan.PlanStateText",
                "type": "string",
                "enum": [
                    "PLANNED",
                    "SUCCESSFUL",
                    "INCOMPLETE",
                    "FAILED"
                ]
            }
        },
        "late": {
            "type": "boolean"
        },
        "dateFrom": {
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "dateTo": {
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "timeZone": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "folders": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.common.Folder",
                "type": "object",
                "required": [
                    "folder"
                ],
                "properties": {
                    "folder": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    },
                    "recursive": {
                        "type": "boolean",
                        "default": true
                    }
                }
            }
        },
        "job": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "jobChain": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "jobStream": {
            "type": "string"
        },
        "isJobStream": {
            "type": "boolean"
        },
        "orderId": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        }
    }
}