{
    "title": "orders filter for volatile information",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.OrdersFilterV",
    "type": "object",
    "extends": {
        "javaType": "com.sos.joc.model.order.OrdersFilterVBase",
        "type": "object",
        "required": [
            "controllerId"
        ],
        "properties": {
            "controllerId": {
                "type": "string",
                "pattern": "^[^/\\<>?:\"|*]*$",
                "maxLength": 100,
                "minLength": 1
            },
            "workflowIds": {
                "type": "array",
                "uniqueItems": true,
                "items": {
                    "javaType": "com.sos.controller.model.workflow.WorkflowId",
                    "type": "object",
                    "required": [
                        "path"
                    ],
                    "properties": {
                        "path": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255,
                            "minLength": 1
                        },
                        "versionId": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        }
                    },
                    "additionalProperties": false
                }
            },
            "folders": {
                "type": "array",
                "items": {
                    "type": "object",
                    "javaType": "com.sos.joc.model.common.Folder",
                    "required": [
                        "folder"
                    ],
                    "properties": {
                        "folder": {
                            "description": "absolute path of an object.",
                            "type": "string",
                            "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                            "maxLength": 255,
                            "minLength": 1
                        },
                        "recursive": {
                            "type": "boolean",
                            "default": true
                        }
                    },
                    "additionalProperties": false
                }
            },
            "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": {
                "description": "see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones",
                "type": "string"
            }
        },
        "additionalProperties": false
    },
    "required": [
        "controllerId"
    ],
    "properties": {
        "orderIds": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "compact": {
            "description": "controls if the object's data is compact or detailed",
            "type": "boolean",
            "default": false
        },
        "regex": {
            "description": "regular expression to filter Controller objects by matching the path",
            "type": "string"
        },
        "states": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.order.OrderStateText",
                "type": "string",
                "enum": [
                    "PLANNED",
                    "PENDING",
                    "SCHEDULED",
                    "RUNNING",
                    "INPROGRESS",
                    "PROMPTING",
                    "SUSPENDED",
                    "FAILED",
                    "WAITING",
                    "BLOCKED",
                    "CANCELLED",
                    "FINISHED",
                    "BROKEN",
                    "UNKNOWN"
                ]
            }
        },
        "orderTags": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "workflowTags": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "stateDateFrom": {
            "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})?)?$"
        },
        "stateDateTo": {
            "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})?)?$"
        },
        "limit": {
            "description": "-1=unlimited",
            "type": "integer",
            "default": 10000
        },
        "withoutWorkflowTags": {
            "description": "if true then response doesn't contain 'workflowsTagPerWorkflow'",
            "type": "boolean",
            "default": false
        }
    }
}