{
    "title": "Filter Inventory search",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.inventory.search.RequestSearchFilter",
    "type": "object",
    "extends": {
        "javaType": "com.sos.joc.model.inventory.search.RequestBaseSearchFilter",
        "type": "object",
        "properties": {
            "search": {
                "description": "pattern with wildcards '*' and '?' where '*' match zero or more characters and '?' match any single character",
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            },
            "folders": {
                "type": "array",
                "items": {
                    "description": "absolute path of an object.",
                    "type": "string",
                    "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                    "maxLength": 255,
                    "minLength": 1
                }
            },
            "tags": {
                "type": "array",
                "items": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                }
            },
            "advanced": {
                "javaType": "com.sos.joc.model.inventory.search.RequestSearchAdvancedItem",
                "type": "object",
                "properties": {
                    "agentName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "workflow": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "fileOrderSource": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "lock": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "schedule": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "includeScript": {
                        "alias": "includeScripts",
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "calendar": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "noticeBoard": {
                        "alias": "noticeBoards",
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "jobResource": {
                        "alias": "jobResources",
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "jobTemplate": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "jobName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "jobNameExactMatch": {
                        "type": "boolean",
                        "default": false
                    },
                    "jobCriticality": {
                        "javaType": "com.sos.inventory.model.job.JobCriticality",
                        "type": "string",
                        "enum": [
                            "NORMAL",
                            "CRITICAL"
                        ]
                    },
                    "jobCountFrom": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "jobCountTo": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "jobScript": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "argumentName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "argumentValue": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "envName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "envValue": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                },
                "additionalProperties": false
            }
        },
        "additionalProperties": false
    },
    "required": [
        "returnType"
    ],
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "deployedOrReleased": {
            "type": "boolean",
            "default": false
        },
        "undeployedOrUnreleased": {
            "type": "boolean",
            "default": false
        },
        "valid": {
            "description": "considered only if 'undeployedOrUnreleased' is true",
            "type": "boolean"
        },
        "returnType": {
            "javaType": "com.sos.joc.model.inventory.search.RequestSearchReturnType",
            "type": "string",
            "enum": [
                "WORKFLOW",
                "FILEORDERSOURCE",
                "JOBRESOURCE",
                "JOBTEMPLATE",
                "NOTICEBOARD",
                "LOCK",
                "SCHEDULE",
                "INCLUDESCRIPT",
                "CALENDAR"
            ]
        }
    },
    "additionalProperties": false
}