{
    "title": "customEventsFilter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.event.custom.EventsFilter",
    "type": "object",
    "required": [
        "jobschedulerId"
    ],
    "properties": {
        "jobschedulerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "eventIds": {
            "type": "array",
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "eventClasses": {
            "type": "array",
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "exitCodes": {
            "type": "array",
            "items": {
                "type": "integer",
                "minimum": 0
            }
        },
        "jobs": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.job.JobPath",
                "type": "object",
                "required": [
                    "job"
                ],
                "properties": {
                    "job": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    }
                }
            }
        },
        "orders": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.order.OrderPath",
                "type": "object",
                "required": [
                    "jobChain"
                ],
                "properties": {
                    "jobChain": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    },
                    "orderId": {
                        "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
                    }
                }
            }
        },
        "regex": {
            "description": "regular expression to filter JobScheduler objects by matching the path",
            "type": "string",
            "pattern": "^((?!<script( |>)|<svg/on).)*$"
        },
        "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
        },
        "limit": {
            "description": "restricts the number of responsed records; -1=unlimited",
            "type": "integer",
            "default": 10000
        }
    }
}