{
    "title": "deploy",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.publish.DeployFilter",
    "type": "object",
    "anyOf": [
        {
            "required": [
                "controllerIds",
                "store"
            ]
        },
        {
            "required": [
                "controllerIds",
                "delete"
            ]
        }
    ],
    "properties": {
        "controllerIds": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "store": {
            "javaType": "com.sos.joc.model.publish.DeployablesValidFilter",
            "type": "object",
            "anyOf": [
                {
                    "required": [
                        "draftConfigurations"
                    ]
                },
                {
                    "required": [
                        "deployConfigurations"
                    ]
                }
            ],
            "properties": {
                "draftConfigurations": {
                    "type": "array",
                    "items": {
                        "javaType": "com.sos.joc.model.publish.Config",
                        "type": "object",
                        "required": [
                            "configuration"
                        ],
                        "properties": {
                            "configuration": {
                                "javaType": "com.sos.joc.model.publish.Configuration",
                                "type": "object",
                                "required": [
                                    "path",
                                    "objectType"
                                ],
                                "properties": {
                                    "path": {
                                        "description": "absolute path of an object.",
                                        "type": "string",
                                        "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                                        "maxLength": 255,
                                        "minLength": 1
                                    },
                                    "objectType": {
                                        "javaType": "com.sos.joc.model.inventory.common.ConfigurationType",
                                        "type": "string",
                                        "enum": [
                                            "WORKFLOW",
                                            "JOBCLASS",
                                            "JOBRESOURCE",
                                            "LOCK",
                                            "NOTICEBOARD",
                                            "FILEORDERSOURCE",
                                            "FOLDER"
                                        ]
                                    },
                                    "commitId": {
                                        "type": "string",
                                        "pattern": "^[^<>]*$",
                                        "maxLength": 255
                                    },
                                    "recursive": {
                                        "type": "boolean",
                                        "default": false
                                    }
                                }
                            }
                        }
                    }
                },
                "deployConfigurations": {
                    "type": "array",
                    "items": {
                        "javaType": "com.sos.joc.model.publish.Config",
                        "type": "object",
                        "required": [
                            "configuration"
                        ],
                        "properties": {
                            "configuration": {
                                "javaType": "com.sos.joc.model.publish.Configuration",
                                "type": "object",
                                "required": [
                                    "path",
                                    "objectType"
                                ],
                                "properties": {
                                    "path": {
                                        "description": "absolute path of an object.",
                                        "type": "string",
                                        "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                                        "maxLength": 255,
                                        "minLength": 1
                                    },
                                    "objectType": {
                                        "javaType": "com.sos.joc.model.inventory.common.ConfigurationType",
                                        "type": "string",
                                        "enum": [
                                            "WORKFLOW",
                                            "JOBCLASS",
                                            "JOBRESOURCE",
                                            "LOCK",
                                            "NOTICEBOARD",
                                            "FILEORDERSOURCE",
                                            "FOLDER"
                                        ]
                                    },
                                    "commitId": {
                                        "type": "string",
                                        "pattern": "^[^<>]*$",
                                        "maxLength": 255
                                    },
                                    "recursive": {
                                        "type": "boolean",
                                        "default": false
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "delete": {
            "javaType": "com.sos.joc.model.publish.DeployDeleteFilter",
            "type": "object",
            "required": [
                "deployConfigurations"
            ],
            "properties": {
                "deployConfigurations": {
                    "type": "array",
                    "items": {
                        "javaType": "com.sos.joc.model.publish.Config",
                        "type": "object",
                        "required": [
                            "configuration"
                        ],
                        "properties": {
                            "configuration": {
                                "javaType": "com.sos.joc.model.publish.Configuration",
                                "type": "object",
                                "required": [
                                    "path",
                                    "objectType"
                                ],
                                "properties": {
                                    "path": {
                                        "description": "absolute path of an object.",
                                        "type": "string",
                                        "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                                        "maxLength": 255,
                                        "minLength": 1
                                    },
                                    "objectType": {
                                        "javaType": "com.sos.joc.model.inventory.common.ConfigurationType",
                                        "type": "string",
                                        "enum": [
                                            "WORKFLOW",
                                            "JOBCLASS",
                                            "JOBRESOURCE",
                                            "LOCK",
                                            "NOTICEBOARD",
                                            "FILEORDERSOURCE",
                                            "FOLDER"
                                        ]
                                    },
                                    "commitId": {
                                        "type": "string",
                                        "pattern": "^[^<>]*$",
                                        "maxLength": 255
                                    },
                                    "recursive": {
                                        "type": "boolean",
                                        "default": false
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "addOrdersDateFrom": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "includeLate": {
            "type": "boolean",
            "default": false
        },
        "auditLog": {
            "javaType": "com.sos.joc.model.audit.AuditParams",
            "type": "object",
            "properties": {
                "comment": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "timeSpent": {
                    "type": "integer",
                    "minimum": 0
                },
                "ticketLink": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                }
            }
        }
    }
}