{
    "title": "ExportFolderFilter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.publish.folder.ExportFolderFilter",
    "type": "object",
    "oneOf": [
        {
            "required": [
                "forSigning",
                "exportFile"
            ]
        },
        {
            "required": [
                "shallowCopy",
                "exportFile"
            ]
        }
    ],
    "properties": {
        "forSigning": {
            "javaType": "com.sos.joc.model.publish.folder.ExportFolderForSigning",
            "type": "object",
            "required": [
                "controllerId",
                "objectTypes",
                "folders"
            ],
            "properties": {
                "controllerId": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "objectTypes": {
                    "type": "array",
                    "items": {
                        "javaType": "com.sos.joc.model.inventory.common.ConfigurationType",
                        "type": "string",
                        "enum": [
                            "FOLDER",
                            "WORKFLOW",
                            "JOBCLASS",
                            "JOBRESOURCE",
                            "LOCK",
                            "NOTICEBOARD",
                            "FILEORDERSOURCE",
                            "WORKINGDAYSCALENDAR",
                            "NONWORKINGDAYSCALENDAR",
                            "SCHEDULE",
                            "INCLUDESCRIPT",
                            "JOB"
                        ]
                    }
                },
                "folders": {
                    "type": "array",
                    "items": {
                        "description": "absolute path of an object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                        "maxLength": 255,
                        "minLength": 1
                    }
                },
                "recursive": {
                    "type": "boolean",
                    "default": false
                },
                "withoutDrafts": {
                    "type": "boolean",
                    "default": false
                },
                "withoutDeployed": {
                    "type": "boolean",
                    "default": false
                }
            }
        },
        "shallowCopy": {
            "javaType": "com.sos.joc.model.publish.folder.ExportFolderShallowCopy",
            "type": "object",
            "required": [
                "objectTypes",
                "folders"
            ],
            "properties": {
                "objectTypes": {
                    "type": "array",
                    "items": {
                        "javaType": "com.sos.joc.model.inventory.common.ConfigurationType",
                        "type": "string",
                        "enum": [
                            "FOLDER",
                            "WORKFLOW",
                            "JOBCLASS",
                            "JOBRESOURCE",
                            "LOCK",
                            "NOTICEBOARD",
                            "FILEORDERSOURCE",
                            "WORKINGDAYSCALENDAR",
                            "NONWORKINGDAYSCALENDAR",
                            "SCHEDULE",
                            "INCLUDESCRIPT",
                            "JOB"
                        ]
                    }
                },
                "folders": {
                    "type": "array",
                    "items": {
                        "description": "absolute path of an object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                        "maxLength": 255,
                        "minLength": 1
                    }
                },
                "recursive": {
                    "type": "boolean",
                    "default": false
                },
                "onlyValidObjects": {
                    "type": "boolean",
                    "default": false
                },
                "withoutDrafts": {
                    "type": "boolean",
                    "default": false
                },
                "withoutDeployed": {
                    "type": "boolean",
                    "default": false
                },
                "withoutReleased": {
                    "type": "boolean",
                    "default": false
                }
            }
        },
        "exportFile": {
            "javaType": "com.sos.joc.model.publish.ExportFile",
            "type": "object",
            "required": [
                "filename",
                "format"
            ],
            "properties": {
                "filename": {
                    "type": "string",
                    "pattern": "^[^/\\<>?:\"|*]*$",
                    "maxLength": 255
                },
                "format": {
                    "javaType": "com.sos.joc.model.publish.ArchiveFormat",
                    "type": "string",
                    "enum": [
                        "ZIP",
                        "TAR_GZ"
                    ],
                    "default": "ZIP"
                }
            }
        },
        "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
                }
            }
        }
    }
}