{
    "title": "file transfer filter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.yade.TransferFilter",
    "type": "object",
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "transferIds": {
            "type": "array",
            "items": {
                "type": "number",
                "format": "utc-millisec",
                "minimum": 0
            }
        },
        "compact": {
            "description": "controls if the object's data is compact or detailed",
            "type": "boolean",
            "default": false
        },
        "regex": {
            "description": "regular expression to filter Controller objects by matching the path",
            "type": "string"
        },
        "profiles": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "states": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.yade.TransferStateText",
                "type": "string",
                "enum": [
                    "SUCCESSFUL",
                    "FAILED",
                    "INCOMPLETE"
                ]
            }
        },
        "operations": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.yade.Operation",
                "type": "string",
                "enum": [
                    "COPY",
                    "MOVE",
                    "GETLIST",
                    "RENAME",
                    "COPYTOINTERNET",
                    "COPYFROMINTERNET",
                    "UNKNOWN"
                ]
            }
        },
        "dateFrom": {
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "dateTo": {
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "timeZone": {
            "description": "see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones",
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "limit": {
            "description": "only for db history urls to restrict the number of responsed records; -1=unlimited",
            "type": "integer",
            "default": 10000
        },
        "sources": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.yade.ProtocolFragment",
                "type": "object",
                "properties": {
                    "host": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "protocol": {
                        "javaType": "com.sos.joc.model.yade.Protocol",
                        "type": "string",
                        "enum": [
                            "LOCAL",
                            "FTP",
                            "FTPS",
                            "SFTP",
                            "HTTP",
                            "HTTPS",
                            "WEBDAV",
                            "WEBDAVS",
                            "SMB",
                            "UNKNOWN"
                        ]
                    },
                    "port": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535
                    },
                    "account": {
                        "type": "string",
                        "maxLength": 255
                    }
                }
            }
        },
        "targets": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.yade.ProtocolFragment",
                "type": "object",
                "properties": {
                    "host": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "protocol": {
                        "javaType": "com.sos.joc.model.yade.Protocol",
                        "type": "string",
                        "enum": [
                            "LOCAL",
                            "FTP",
                            "FTPS",
                            "SFTP",
                            "HTTP",
                            "HTTPS",
                            "WEBDAV",
                            "WEBDAVS",
                            "SMB",
                            "UNKNOWN"
                        ]
                    },
                    "port": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535
                    },
                    "account": {
                        "type": "string",
                        "maxLength": 255
                    }
                }
            }
        },
        "sourceFile": {
            "description": "pattern with wildcards '*' and '?' where '*' match zero or more characters and '?' match any single character",
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "targetFile": {
            "description": "pattern with wildcards '*' and '?' where '*' match zero or more characters and '?' match any single character",
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "sourceFiles": {
            "type": "array",
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255,
                "minLength": 1
            }
        },
        "targetFiles": {
            "type": "array",
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255,
                "minLength": 1
            }
        }
    }
}