{
    "title": "orders filter",
    "id": "schemas/order/ordersFilter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.OrdersFilter",
    "type": "object",
    "required": [
        "jobschedulerId"
    ],
    "properties": {
        "jobschedulerId": {
            "type": "string"
        },
        "orders": {
            "type": "array",
            "items": {
                "id": "schemas/order/orderPath",
                "javaType": "com.sos.joc.model.order.OrderPath",
                "type": "object",
                "required": [
                    "jobChain"
                ],
                "properties": {
                    "jobChain": {
                        "id": "schemas/common/path",
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "/([^/]+/)*[^/]+"
                    },
                    "orderId": {
                        "description": "if orderId undefined or empty then all orders of specified job chain are requested",
                        "type": "string"
                    }
                }
            }
        },
        "excludeOrders": {
            "type": "array",
            "items": {
                "id": "schemas/order/orderPath",
                "javaType": "com.sos.joc.model.order.OrderPath",
                "type": "object",
                "required": [
                    "jobChain"
                ],
                "properties": {
                    "jobChain": {
                        "id": "schemas/common/path",
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "/([^/]+/)*[^/]+"
                    },
                    "orderId": {
                        "description": "if orderId undefined or empty then all orders of specified job chain are requested",
                        "type": "string"
                    }
                }
            }
        },
        "compact": {
            "id": "schemas/common/compactParam",
            "description": "controls if the object view is compact or detailed",
            "type": "boolean",
            "default": false
        },
        "regex": {
            "id": "schemas/common/regexFilter",
            "description": "regular expression to filter JobScheduler objects by matching the path",
            "type": "string"
        },
        "processingStates": {
            "type": "array",
            "items": {
                "id": "schemas/order/orderProcessingStateFilter",
                "javaType": "com.sos.joc.model.order.OrderStateFilter",
                "type": "string",
                "enum": [
                    "PENDING",
                    "RUNNING",
                    "SUSPENDED",
                    "SETBACK",
                    "BLACKLIST",
                    "WAITINGFORRESOURCE"
                ]
            }
        },
        "types": {
            "type": "array",
            "items": {
                "id": "schemas/order/orderType",
                "javaType": "com.sos.joc.model.order.OrderType",
                "type": "string",
                "description": "the type of the order",
                "enum": [
                    "PERMANENT",
                    "AD_HOC",
                    "FILE_ORDER"
                ]
            }
        },
        "dateFrom": {
            "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": {
            "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": {
            "description": "see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones",
            "type": "string"
        },
        "folders": {
            "id": "schemas/common/folders",
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.common.Folder",
                "type": "object",
                "required": [
                    "folder"
                ],
                "properties": {
                    "folder": {
                        "id": "schemas/common/path",
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "/([^/]+/)*[^/]+"
                    },
                    "recursive": {
                        "type": "boolean",
                        "default": true
                    }
                }
            }
        },
        "limit": {
            "description": "only for db history urls to restrict the number of responsed records; -1=unlimited",
            "type": "integer",
            "default": 10000
        },
        "historyStates": {
            "type": "array",
            "items": {
                "id": "schemas/common/historyStateText",
                "javaType": "com.sos.joc.model.common.HistoryStateText",
                "type": "string",
                "enum": [
                    "SUCCESSFUL",
                    "INCOMPLETE",
                    "FAILED"
                ]
            }
        },
        "runTimeIsTemporary": {
            "type": "boolean"
        }
    }
}