{
    "title": "job chains with delivery date (permanent part)",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.jobChain.JobChainsP",
    "type": "object",
    "required": [
        "deliveryDate",
        "jobChains"
    ],
    "properties": {
        "deliveryDate": {
            "description": "Date time. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
            "type": "string",
            "format": "date-time"
        },
        "jobChains": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.jobChain.JobChainP",
                "type": "object",
                "oneOf": [
                    {
                        "description": "compact=true then ONLY required fields are responded and optional title, maxOrders, distributed, processClass, fileWatchingProcessClass",
                        "required": [
                            "surveyDate",
                            "path",
                            "name",
                            "numOfNodes"
                        ]
                    },
                    {
                        "description": "parameter compact=false or unset, all other fields are optional",
                        "required": [
                            "surveyDate",
                            "path",
                            "name",
                            "numOfNodes",
                            "nodes"
                        ]
                    }
                ],
                "properties": {
                    "surveyDate": {
                        "description": "Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
                        "type": "string",
                        "format": "date-time"
                    },
                    "path": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    },
                    "name": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "maxOrders": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "distributed": {
                        "type": "boolean"
                    },
                    "processClass": {
                        "type": "string"
                    },
                    "fileWatchingProcessClass": {
                        "type": "string"
                    },
                    "numOfNodes": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "nodes": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                            "javaType": "com.sos.joc.model.jobChain.JobChainNodeP",
                            "type": "object",
                            "oneOf": [
                                {
                                    "description": "job chain node object with assigned a job",
                                    "required": [
                                        "name",
                                        "nextNode",
                                        "errorNode",
                                        "job",
                                        "level"
                                    ]
                                },
                                {
                                    "description": "job chain node object with assigned a job chain",
                                    "required": [
                                        "name",
                                        "nextNode",
                                        "errorNode",
                                        "jobChain"
                                    ]
                                }
                            ],
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "nextNode": {
                                    "type": "string"
                                },
                                "errorNode": {
                                    "type": "string"
                                },
                                "job": {
                                    "javaType": "com.sos.joc.model.jobChain.JobChainNodeJobP",
                                    "type": "object",
                                    "required": [
                                        "path"
                                    ],
                                    "properties": {
                                        "path": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        },
                                        "processClass": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        },
                                        "documentation": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        }
                                    }
                                },
                                "jobChain": {
                                    "description": "job chain object is included in nestedJobChains collection",
                                    "javaType": "com.sos.joc.model.jobChain.JobChainNodeJobChainP",
                                    "type": "object",
                                    "required": [
                                        "path"
                                    ],
                                    "properties": {
                                        "path": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        },
                                        "documentation": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        }
                                    }
                                },
                                "level": {
                                    "description": "Only relevant for job chain with splits and syncs. For example to imagine splits/sync in the job chain list view with different indents",
                                    "type": "integer"
                                },
                                "onError": {
                                    "description": "possible values are 'suspend', 'setback' or it isn't set",
                                    "type": "string"
                                },
                                "delay": {
                                    "type": "integer",
                                    "minimum": 0
                                },
                                "remove": {
                                    "description": "for file order sink",
                                    "type": "boolean"
                                },
                                "move": {
                                    "description": "for file order sink, a directory path is expected",
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "fileOrderSources": {
                        "type": "array",
                        "items": {
                            "javaType": "com.sos.joc.model.jobChain.FileWatchingNodeP",
                            "type": "object",
                            "required": [
                                "directory",
                                "regex"
                            ],
                            "properties": {
                                "directory": {
                                    "type": "string"
                                },
                                "nextNode": {
                                    "type": "string"
                                },
                                "regex": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "endNodes": {
                        "description": "real end nodes or file sink nodes",
                        "type": "array",
                        "items": {
                            "javaType": "com.sos.joc.model.jobChain.EndNode",
                            "type": "object",
                            "required": [
                                "name"
                            ],
                            "properties": {
                                "name": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "configurationDate": {
                        "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                        "type": "string",
                        "format": "date-time"
                    },
                    "documentation": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    }
                }
            }
        },
        "nestedJobChains": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.jobChain.JobChainP",
                "type": "object",
                "oneOf": [
                    {
                        "description": "compact=true then ONLY required fields are responded and optional title, maxOrders, distributed, processClass, fileWatchingProcessClass",
                        "required": [
                            "surveyDate",
                            "path",
                            "name",
                            "numOfNodes"
                        ]
                    },
                    {
                        "description": "parameter compact=false or unset, all other fields are optional",
                        "required": [
                            "surveyDate",
                            "path",
                            "name",
                            "numOfNodes",
                            "nodes"
                        ]
                    }
                ],
                "properties": {
                    "surveyDate": {
                        "description": "Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
                        "type": "string",
                        "format": "date-time"
                    },
                    "path": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    },
                    "name": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "maxOrders": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "distributed": {
                        "type": "boolean"
                    },
                    "processClass": {
                        "type": "string"
                    },
                    "fileWatchingProcessClass": {
                        "type": "string"
                    },
                    "numOfNodes": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "nodes": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                            "javaType": "com.sos.joc.model.jobChain.JobChainNodeP",
                            "type": "object",
                            "oneOf": [
                                {
                                    "description": "job chain node object with assigned a job",
                                    "required": [
                                        "name",
                                        "nextNode",
                                        "errorNode",
                                        "job",
                                        "level"
                                    ]
                                },
                                {
                                    "description": "job chain node object with assigned a job chain",
                                    "required": [
                                        "name",
                                        "nextNode",
                                        "errorNode",
                                        "jobChain"
                                    ]
                                }
                            ],
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "nextNode": {
                                    "type": "string"
                                },
                                "errorNode": {
                                    "type": "string"
                                },
                                "job": {
                                    "javaType": "com.sos.joc.model.jobChain.JobChainNodeJobP",
                                    "type": "object",
                                    "required": [
                                        "path"
                                    ],
                                    "properties": {
                                        "path": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        },
                                        "processClass": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        },
                                        "documentation": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        }
                                    }
                                },
                                "jobChain": {
                                    "description": "job chain object is included in nestedJobChains collection",
                                    "javaType": "com.sos.joc.model.jobChain.JobChainNodeJobChainP",
                                    "type": "object",
                                    "required": [
                                        "path"
                                    ],
                                    "properties": {
                                        "path": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        },
                                        "documentation": {
                                            "description": "absolute path based on live folder of a JobScheduler object.",
                                            "type": "string",
                                            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                            "maxLength": 255
                                        }
                                    }
                                },
                                "level": {
                                    "description": "Only relevant for job chain with splits and syncs. For example to imagine splits/sync in the job chain list view with different indents",
                                    "type": "integer"
                                },
                                "onError": {
                                    "description": "possible values are 'suspend', 'setback' or it isn't set",
                                    "type": "string"
                                },
                                "delay": {
                                    "type": "integer",
                                    "minimum": 0
                                },
                                "remove": {
                                    "description": "for file order sink",
                                    "type": "boolean"
                                },
                                "move": {
                                    "description": "for file order sink, a directory path is expected",
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "fileOrderSources": {
                        "type": "array",
                        "items": {
                            "javaType": "com.sos.joc.model.jobChain.FileWatchingNodeP",
                            "type": "object",
                            "required": [
                                "directory",
                                "regex"
                            ],
                            "properties": {
                                "directory": {
                                    "type": "string"
                                },
                                "nextNode": {
                                    "type": "string"
                                },
                                "regex": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "endNodes": {
                        "description": "real end nodes or file sink nodes",
                        "type": "array",
                        "items": {
                            "javaType": "com.sos.joc.model.jobChain.EndNode",
                            "type": "object",
                            "required": [
                                "name"
                            ],
                            "properties": {
                                "name": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "configurationDate": {
                        "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                        "type": "string",
                        "format": "date-time"
                    },
                    "documentation": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    }
                }
            }
        }
    }
}