{
    "title": "Daily Plan  Order Selector",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.dailyplan.generate.GenerateRequest",
    "type": "object",
    "description": "To generate orders for the daily plan",
    "anyOf": [
        {
            "required": [
                "controllerId",
                "dailyPlanDates"
            ]
        },
        {
            "required": [
                "controllerId",
                "dailyPlanDate"
            ]
        }
    ],
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100,
            "minLength": 1
        },
        "dailyPlanDate": {
            "description": "deprecated; use dailyPlanDates",
            "type": "string",
            "format": "date"
        },
        "dailyPlanDates": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
                "description": "ISO date YYYY-MM-DD",
                "type": "string",
                "format": "date"
            }
        },
        "schedulePaths": {
            "javaType": "com.sos.joc.model.dailyplan.generate.items.PathItem",
            "type": "object",
            "description": "Define the path item of the selector to generate orders for the daily plan",
            "properties": {
                "folders": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "javaType": "com.sos.joc.model.common.Folder",
                        "required": [
                            "folder"
                        ],
                        "properties": {
                            "folder": {
                                "description": "absolute path of an object.",
                                "type": "string",
                                "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                                "maxLength": 255,
                                "minLength": 1
                            },
                            "recursive": {
                                "type": "boolean",
                                "default": true
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "singles": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                }
            }
        },
        "workflowPaths": {
            "javaType": "com.sos.joc.model.dailyplan.generate.items.PathItem",
            "type": "object",
            "description": "Define the path item of the selector to generate orders for the daily plan",
            "properties": {
                "folders": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "javaType": "com.sos.joc.model.common.Folder",
                        "required": [
                            "folder"
                        ],
                        "properties": {
                            "folder": {
                                "description": "absolute path of an object.",
                                "type": "string",
                                "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                                "maxLength": 255,
                                "minLength": 1
                            },
                            "recursive": {
                                "type": "boolean",
                                "default": true
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "singles": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                }
            }
        },
        "overwrite": {
            "description": "controls if the order should be overwritten",
            "type": "boolean",
            "default": false
        },
        "withSubmit": {
            "description": "controls if the order should be submitted to the controller",
            "type": "boolean",
            "default": false
        },
        "includeNonAutoPlannedOrders": {
            "description": "includes non-automatically planned orders iff true",
            "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
                }
            }
        }
    }
}