{
    "title": "ExportFilter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.publish.ExportFilter",
    "type": "object",
    "oneOf": [
        {
            "required": [
                "forSigning",
                "exportFile"
            ]
        },
        {
            "required": [
                "shallowCopy",
                "exportFile"
            ]
        }
    ],
    "properties": {
        "useShortPath": {
            "type": "boolean",
            "default": false
        },
        "startFolder": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "forSigning": {
            "javaType": "com.sos.joc.model.publish.ExportForSigning",
            "type": "object",
            "required": [
                "controllerId",
                "deployables"
            ],
            "properties": {
                "controllerId": {
                    "type": "string",
                    "pattern": "^[^/\\<>?:\"|*]*$",
                    "maxLength": 100,
                    "minLength": 1
                },
                "deployables": {
                    "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": [
                                                    "FOLDER",
                                                    "WORKFLOW",
                                                    "JOBCLASS",
                                                    "JOBRESOURCE",
                                                    "LOCK",
                                                    "NOTICEBOARD",
                                                    "FILEORDERSOURCE",
                                                    "WORKINGDAYSCALENDAR",
                                                    "NONWORKINGDAYSCALENDAR",
                                                    "SCHEDULE",
                                                    "JOB"
                                                ]
                                            },
                                            "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": [
                                                    "FOLDER",
                                                    "WORKFLOW",
                                                    "JOBCLASS",
                                                    "JOBRESOURCE",
                                                    "LOCK",
                                                    "NOTICEBOARD",
                                                    "FILEORDERSOURCE",
                                                    "WORKINGDAYSCALENDAR",
                                                    "NONWORKINGDAYSCALENDAR",
                                                    "SCHEDULE",
                                                    "JOB"
                                                ]
                                            },
                                            "commitId": {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255
                                            },
                                            "recursive": {
                                                "type": "boolean",
                                                "default": false
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "shallowCopy": {
            "javaType": "com.sos.joc.model.publish.ExportShallowCopy",
            "type": "object",
            "anyOf": [
                {
                    "required": [
                        "deployables"
                    ]
                },
                {
                    "required": [
                        "releasables"
                    ]
                }
            ],
            "properties": {
                "deployables": {
                    "javaType": "com.sos.joc.model.publish.DeployablesFilter",
                    "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": [
                                                    "FOLDER",
                                                    "WORKFLOW",
                                                    "JOBCLASS",
                                                    "JOBRESOURCE",
                                                    "LOCK",
                                                    "NOTICEBOARD",
                                                    "FILEORDERSOURCE",
                                                    "WORKINGDAYSCALENDAR",
                                                    "NONWORKINGDAYSCALENDAR",
                                                    "SCHEDULE",
                                                    "JOB"
                                                ]
                                            },
                                            "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": [
                                                    "FOLDER",
                                                    "WORKFLOW",
                                                    "JOBCLASS",
                                                    "JOBRESOURCE",
                                                    "LOCK",
                                                    "NOTICEBOARD",
                                                    "FILEORDERSOURCE",
                                                    "WORKINGDAYSCALENDAR",
                                                    "NONWORKINGDAYSCALENDAR",
                                                    "SCHEDULE",
                                                    "JOB"
                                                ]
                                            },
                                            "commitId": {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255
                                            },
                                            "recursive": {
                                                "type": "boolean",
                                                "default": false
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "withoutInvalid": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                },
                "releasables": {
                    "javaType": "com.sos.joc.model.publish.ReleasablesFilter",
                    "type": "object",
                    "anyOf": [
                        {
                            "required": [
                                "draftConfigurations"
                            ]
                        },
                        {
                            "required": [
                                "releasedConfigurations"
                            ]
                        }
                    ],
                    "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": [
                                                    "FOLDER",
                                                    "WORKFLOW",
                                                    "JOBCLASS",
                                                    "JOBRESOURCE",
                                                    "LOCK",
                                                    "NOTICEBOARD",
                                                    "FILEORDERSOURCE",
                                                    "WORKINGDAYSCALENDAR",
                                                    "NONWORKINGDAYSCALENDAR",
                                                    "SCHEDULE",
                                                    "JOB"
                                                ]
                                            },
                                            "commitId": {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255
                                            },
                                            "recursive": {
                                                "type": "boolean",
                                                "default": false
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "releasedConfigurations": {
                            "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": [
                                                    "FOLDER",
                                                    "WORKFLOW",
                                                    "JOBCLASS",
                                                    "JOBRESOURCE",
                                                    "LOCK",
                                                    "NOTICEBOARD",
                                                    "FILEORDERSOURCE",
                                                    "WORKINGDAYSCALENDAR",
                                                    "NONWORKINGDAYSCALENDAR",
                                                    "SCHEDULE",
                                                    "JOB"
                                                ]
                                            },
                                            "commitId": {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255
                                            },
                                            "recursive": {
                                                "type": "boolean",
                                                "default": false
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "withoutInvalid": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                }
            }
        },
        "exportFile": {
            "javaType": "com.sos.joc.model.publish.ExportFile",
            "type": "object",
            "required": [
                "filename"
            ],
            "properties": {
                "filename": {
                    "type": "string",
                    "pattern": "^[^/\\<>?:\"|*]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "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
                }
            }
        }
    }
}