{
    "title": "plan filter",
    "id": "schemas/order/planFilter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.plan.PlanFilter",
    "type": "object",
    "required": [
        "jobschedulerId"
    ],
    "properties": {
        "jobschedulerId": {
            "type": "string"
        },
        "regex": {
            "id": "schemas/common/regexFilter",
            "description": "regular expression to filter JobScheduler objects by matching the path",
            "type": "string"
        },
        "states": {
            "type": "array",
            "items": {
                "id": "schemas/plan/planStateText",
                "javaType": "com.sos.joc.model.plan.PlanStateText",
                "type": "string",
                "enum": [
                    "PLANNED",
                    "SUCCESSFUL",
                    "INCOMPLETE",
                    "FAILED"
                ]
            }
        },
        "late": {
            "type": "boolean"
        },
        "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
                    }
                }
            }
        },
        "job": {
            "id": "schemas/common/path",
            "description": "absolute path based on live folder of a JobScheduler object.",
            "type": "string",
            "pattern": "/([^/]+/)*[^/]+"
        },
        "jobChain": {
            "id": "schemas/common/path",
            "description": "absolute path based on live folder of a JobScheduler object.",
            "type": "string",
            "pattern": "/([^/]+/)*[^/]+"
        },
        "orderId": {
            "type": "string"
        }
    }
}