{
    "title": "workflowsFilter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.workflow.WorkflowsFilter",
    "type": "object",
    "required": [
        "controllerId"
    ],
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "workflowIds": {
            "type": "array",
            "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
            }
        },
        "compact": {
            "description": "controls if the object's data is compact or detailed",
            "type": "boolean",
            "default": 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
            }
        },
        "tags": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "states": {
            "type": "array",
            "items": {
                "javaType": "com.sos.controller.model.common.SyncStateText",
                "description": "SUSPENDED, OUTSTANDING only for Workflows",
                "type": "string",
                "enum": [
                    "IN_SYNC",
                    "NOT_IN_SYNC",
                    "NOT_DEPLOYED",
                    "SUSPENDED",
                    "OUTSTANDING",
                    "UNKNOWN"
                ]
            }
        },
        "instructionStates": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.workflow.search.InstructionStateText",
                "type": "string",
                "enum": [
                    "SKIPPED",
                    "STOPPED"
                ]
            }
        },
        "regex": {
            "description": "regular expression to filter Controller objects by matching the path",
            "type": "string"
        },
        "agentNames": {
            "type": "array",
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255,
                "minLength": 1
            }
        }
    }
}