{
    "title": "schedule",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.controller.model.schedule.Schedule",
    "type": "object",
    "extends": {
        "javaType": "com.sos.inventory.model.schedule.Schedule",
        "type": "object",
        "description": "The order template for scheduling orders to Controller. workflowName is deprecated",
        "javaInterfaces": [
            "com.sos.joc.model.common.IConfigurationObject",
            "com.sos.joc.model.common.IReleaseObject",
            "com.sos.inventory.model.common.IInventoryObject"
        ],
        "anyOf": [
            {
                "required": [
                    "workflowName",
                    "calendars"
                ]
            },
            {
                "required": [
                    "workflowNames",
                    "calendars"
                ]
            }
        ],
        "properties": {
            "version": {
                "description": "inventory repository version",
                "type": "string",
                "pattern": "[0-9]+\\.[0-9]+\\.[0-9]+",
                "default": "1.5.2",
                "maxLength": 20
            },
            "path": {
                "description": "absolute path of an object.",
                "type": "string",
                "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                "maxLength": 255,
                "minLength": 1
            },
            "workflowName": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            },
            "workflowNames": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                }
            },
            "title": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            },
            "documentationName": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            },
            "submitOrderToControllerWhenPlanned": {
                "type": "boolean",
                "default": false
            },
            "planOrderAutomatically": {
                "type": "boolean",
                "default": false
            },
            "calendars": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "javaType": "com.sos.inventory.model.calendar.AssignedCalendars",
                    "type": "object",
                    "required": [
                        "calendarName",
                        "periods"
                    ],
                    "properties": {
                        "calendarName": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "calendarPath": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "timeZone": {
                            "type": "string",
                            "default": "Etc/UTC"
                        },
                        "includes": {
                            "javaType": "com.sos.inventory.model.calendar.Frequencies",
                            "type": "object",
                            "anyOf": [
                                {
                                    "required": [
                                        "dates"
                                    ]
                                },
                                {
                                    "required": [
                                        "weekdays"
                                    ]
                                },
                                {
                                    "required": [
                                        "monthdays"
                                    ]
                                },
                                {
                                    "required": [
                                        "ultimos"
                                    ]
                                },
                                {
                                    "required": [
                                        "months"
                                    ]
                                },
                                {
                                    "required": [
                                        "holidays"
                                    ]
                                },
                                {
                                    "required": [
                                        "repetitions"
                                    ]
                                }
                            ],
                            "properties": {
                                "dates": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "description": "ISO date YYYY-MM-DD",
                                        "type": "string",
                                        "minLength": 1,
                                        "format": "date"
                                    }
                                },
                                "weekdays": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.WeekDays",
                                        "type": "object",
                                        "required": [
                                            "days"
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "days": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                    "type": "integer",
                                                    "minimum": 0,
                                                    "maximum": 6
                                                }
                                            }
                                        }
                                    }
                                },
                                "monthdays": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                        "type": "object",
                                        "anyOf": [
                                            {
                                                "required": [
                                                    "days"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "weeklyDays"
                                                ]
                                            }
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "days": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "digit from 1-31",
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 31
                                                }
                                            },
                                            "weeklyDays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                    "type": "object",
                                                    "required": [
                                                        "day",
                                                        "weekOfMonth"
                                                    ],
                                                    "properties": {
                                                        "day": {
                                                            "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                            "type": "integer",
                                                            "minimum": 0,
                                                            "maximum": 6
                                                        },
                                                        "weekOfMonth": {
                                                            "type": "integer",
                                                            "minimum": 1,
                                                            "maximum": 5
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "ultimos": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                        "type": "object",
                                        "anyOf": [
                                            {
                                                "required": [
                                                    "days"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "weeklyDays"
                                                ]
                                            }
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "days": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "digit from 1-31",
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 31
                                                }
                                            },
                                            "weeklyDays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                    "type": "object",
                                                    "required": [
                                                        "day",
                                                        "weekOfMonth"
                                                    ],
                                                    "properties": {
                                                        "day": {
                                                            "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                            "type": "integer",
                                                            "minimum": 0,
                                                            "maximum": 6
                                                        },
                                                        "weekOfMonth": {
                                                            "type": "integer",
                                                            "minimum": 1,
                                                            "maximum": 5
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "months": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.Months",
                                        "type": "object",
                                        "anyOf": [
                                            {
                                                "required": [
                                                    "months",
                                                    "weekdays"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "months",
                                                    "monthdays"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "months",
                                                    "ultimos"
                                                ]
                                            }
                                        ],
                                        "properties": {
                                            "months": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 12
                                                }
                                            },
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "weekdays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.WeekDays",
                                                    "type": "object",
                                                    "required": [
                                                        "days"
                                                    ],
                                                    "properties": {
                                                        "from": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "to": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "days": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                                "type": "integer",
                                                                "minimum": 0,
                                                                "maximum": 6
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "monthdays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                                    "type": "object",
                                                    "anyOf": [
                                                        {
                                                            "required": [
                                                                "days"
                                                            ]
                                                        },
                                                        {
                                                            "required": [
                                                                "weeklyDays"
                                                            ]
                                                        }
                                                    ],
                                                    "properties": {
                                                        "from": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "to": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "days": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "description": "digit from 1-31",
                                                                "type": "integer",
                                                                "minimum": 1,
                                                                "maximum": 31
                                                            }
                                                        },
                                                        "weeklyDays": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                                "type": "object",
                                                                "required": [
                                                                    "day",
                                                                    "weekOfMonth"
                                                                ],
                                                                "properties": {
                                                                    "day": {
                                                                        "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                                        "type": "integer",
                                                                        "minimum": 0,
                                                                        "maximum": 6
                                                                    },
                                                                    "weekOfMonth": {
                                                                        "type": "integer",
                                                                        "minimum": 1,
                                                                        "maximum": 5
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "ultimos": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                                    "type": "object",
                                                    "anyOf": [
                                                        {
                                                            "required": [
                                                                "days"
                                                            ]
                                                        },
                                                        {
                                                            "required": [
                                                                "weeklyDays"
                                                            ]
                                                        }
                                                    ],
                                                    "properties": {
                                                        "from": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "to": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "days": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "description": "digit from 1-31",
                                                                "type": "integer",
                                                                "minimum": 1,
                                                                "maximum": 31
                                                            }
                                                        },
                                                        "weeklyDays": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                                "type": "object",
                                                                "required": [
                                                                    "day",
                                                                    "weekOfMonth"
                                                                ],
                                                                "properties": {
                                                                    "day": {
                                                                        "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                                        "type": "integer",
                                                                        "minimum": 0,
                                                                        "maximum": 6
                                                                    },
                                                                    "weekOfMonth": {
                                                                        "type": "integer",
                                                                        "minimum": 1,
                                                                        "maximum": 5
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "holidays": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.Holidays",
                                        "type": "object",
                                        "required": [
                                            "dates"
                                        ],
                                        "properties": {
                                            "nationalCalendar": {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255
                                            },
                                            "dates": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "ISO date YYYY-MM-DD",
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "format": "date"
                                                }
                                            }
                                        }
                                    }
                                },
                                "repetitions": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.Repetition",
                                        "type": "object",
                                        "required": [
                                            "repetition",
                                            "step",
                                            "from"
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "repetition": {
                                                "javaType": "com.sos.inventory.model.calendar.RepetitionText",
                                                "type": "string",
                                                "enum": [
                                                    "DAILY",
                                                    "WEEKLY",
                                                    "MONTHLY",
                                                    "YEARLY"
                                                ]
                                            },
                                            "step": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "default": 1
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "excludes": {
                            "javaType": "com.sos.inventory.model.calendar.Frequencies",
                            "type": "object",
                            "anyOf": [
                                {
                                    "required": [
                                        "dates"
                                    ]
                                },
                                {
                                    "required": [
                                        "weekdays"
                                    ]
                                },
                                {
                                    "required": [
                                        "monthdays"
                                    ]
                                },
                                {
                                    "required": [
                                        "ultimos"
                                    ]
                                },
                                {
                                    "required": [
                                        "months"
                                    ]
                                },
                                {
                                    "required": [
                                        "holidays"
                                    ]
                                },
                                {
                                    "required": [
                                        "repetitions"
                                    ]
                                }
                            ],
                            "properties": {
                                "dates": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "description": "ISO date YYYY-MM-DD",
                                        "type": "string",
                                        "minLength": 1,
                                        "format": "date"
                                    }
                                },
                                "weekdays": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.WeekDays",
                                        "type": "object",
                                        "required": [
                                            "days"
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "days": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                    "type": "integer",
                                                    "minimum": 0,
                                                    "maximum": 6
                                                }
                                            }
                                        }
                                    }
                                },
                                "monthdays": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                        "type": "object",
                                        "anyOf": [
                                            {
                                                "required": [
                                                    "days"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "weeklyDays"
                                                ]
                                            }
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "days": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "digit from 1-31",
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 31
                                                }
                                            },
                                            "weeklyDays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                    "type": "object",
                                                    "required": [
                                                        "day",
                                                        "weekOfMonth"
                                                    ],
                                                    "properties": {
                                                        "day": {
                                                            "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                            "type": "integer",
                                                            "minimum": 0,
                                                            "maximum": 6
                                                        },
                                                        "weekOfMonth": {
                                                            "type": "integer",
                                                            "minimum": 1,
                                                            "maximum": 5
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "ultimos": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                        "type": "object",
                                        "anyOf": [
                                            {
                                                "required": [
                                                    "days"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "weeklyDays"
                                                ]
                                            }
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "days": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "digit from 1-31",
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 31
                                                }
                                            },
                                            "weeklyDays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                    "type": "object",
                                                    "required": [
                                                        "day",
                                                        "weekOfMonth"
                                                    ],
                                                    "properties": {
                                                        "day": {
                                                            "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                            "type": "integer",
                                                            "minimum": 0,
                                                            "maximum": 6
                                                        },
                                                        "weekOfMonth": {
                                                            "type": "integer",
                                                            "minimum": 1,
                                                            "maximum": 5
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "months": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.Months",
                                        "type": "object",
                                        "anyOf": [
                                            {
                                                "required": [
                                                    "months",
                                                    "weekdays"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "months",
                                                    "monthdays"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "months",
                                                    "ultimos"
                                                ]
                                            }
                                        ],
                                        "properties": {
                                            "months": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 12
                                                }
                                            },
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "weekdays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.WeekDays",
                                                    "type": "object",
                                                    "required": [
                                                        "days"
                                                    ],
                                                    "properties": {
                                                        "from": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "to": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "days": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                                "type": "integer",
                                                                "minimum": 0,
                                                                "maximum": 6
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "monthdays": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                                    "type": "object",
                                                    "anyOf": [
                                                        {
                                                            "required": [
                                                                "days"
                                                            ]
                                                        },
                                                        {
                                                            "required": [
                                                                "weeklyDays"
                                                            ]
                                                        }
                                                    ],
                                                    "properties": {
                                                        "from": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "to": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "days": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "description": "digit from 1-31",
                                                                "type": "integer",
                                                                "minimum": 1,
                                                                "maximum": 31
                                                            }
                                                        },
                                                        "weeklyDays": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                                "type": "object",
                                                                "required": [
                                                                    "day",
                                                                    "weekOfMonth"
                                                                ],
                                                                "properties": {
                                                                    "day": {
                                                                        "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                                        "type": "integer",
                                                                        "minimum": 0,
                                                                        "maximum": 6
                                                                    },
                                                                    "weekOfMonth": {
                                                                        "type": "integer",
                                                                        "minimum": 1,
                                                                        "maximum": 5
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "ultimos": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "javaType": "com.sos.inventory.model.calendar.MonthDays",
                                                    "type": "object",
                                                    "anyOf": [
                                                        {
                                                            "required": [
                                                                "days"
                                                            ]
                                                        },
                                                        {
                                                            "required": [
                                                                "weeklyDays"
                                                            ]
                                                        }
                                                    ],
                                                    "properties": {
                                                        "from": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "to": {
                                                            "description": "ISO date YYYY-MM-DD",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "format": "date"
                                                        },
                                                        "days": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "description": "digit from 1-31",
                                                                "type": "integer",
                                                                "minimum": 1,
                                                                "maximum": 31
                                                            }
                                                        },
                                                        "weeklyDays": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "items": {
                                                                "javaType": "com.sos.inventory.model.calendar.WeeklyDay",
                                                                "type": "object",
                                                                "required": [
                                                                    "day",
                                                                    "weekOfMonth"
                                                                ],
                                                                "properties": {
                                                                    "day": {
                                                                        "description": "digit from 0-6, 0=Sunday, 1=Monday, ..., 6=Saturday",
                                                                        "type": "integer",
                                                                        "minimum": 0,
                                                                        "maximum": 6
                                                                    },
                                                                    "weekOfMonth": {
                                                                        "type": "integer",
                                                                        "minimum": 1,
                                                                        "maximum": 5
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "holidays": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.Holidays",
                                        "type": "object",
                                        "required": [
                                            "dates"
                                        ],
                                        "properties": {
                                            "nationalCalendar": {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255
                                            },
                                            "dates": {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "description": "ISO date YYYY-MM-DD",
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "format": "date"
                                                }
                                            }
                                        }
                                    }
                                },
                                "repetitions": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "javaType": "com.sos.inventory.model.calendar.Repetition",
                                        "type": "object",
                                        "required": [
                                            "repetition",
                                            "step",
                                            "from"
                                        ],
                                        "properties": {
                                            "from": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "to": {
                                                "description": "ISO date YYYY-MM-DD",
                                                "type": "string",
                                                "minLength": 1,
                                                "format": "date"
                                            },
                                            "repetition": {
                                                "javaType": "com.sos.inventory.model.calendar.RepetitionText",
                                                "type": "string",
                                                "enum": [
                                                    "DAILY",
                                                    "WEEKLY",
                                                    "MONTHLY",
                                                    "YEARLY"
                                                ]
                                            },
                                            "step": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "default": 1
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "periods": {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                                "javaType": "com.sos.inventory.model.calendar.Period",
                                "type": "object",
                                "properties": {
                                    "singleStart": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "begin": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "end": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "repeat": {
                                        "type": "string",
                                        "pattern": "^([0-1][0-9]|2[0-4])(:[0-5][0-9]){1,2}$"
                                    },
                                    "whenHoliday": {
                                        "javaType": "com.sos.inventory.model.calendar.WhenHolidayType",
                                        "description": "default: SUPPRESS",
                                        "type": "string",
                                        "enum": [
                                            "SUPPRESS",
                                            "IGNORE",
                                            "PREVIOUSNONWORKINGDAY",
                                            "NEXTNONWORKINGDAY"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "nonWorkingDayCalendars": {
                "type": "array",
                "items": {
                    "javaType": "com.sos.inventory.model.calendar.AssignedNonWorkingDayCalendars",
                    "type": "object",
                    "required": [
                        "calendarName"
                    ],
                    "properties": {
                        "calendarName": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "calendarPath": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        }
                    }
                }
            },
            "orderParameterisations": {
                "alias": "variableSets",
                "type": "array",
                "items": {
                    "javaType": "com.sos.inventory.model.schedule.OrderParameterisation",
                    "type": "object",
                    "description": "Parameterisation with variable set for a schedule and optional start and end position",
                    "properties": {
                        "orderName": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 30
                        },
                        "variables": {
                            "description": "a map for arbitrary key-value pairs",
                            "javaType": "com.sos.inventory.model.common.Variables",
                            "type": "object",
                            "additionalProperties": true
                        },
                        "positions": {
                            "javaType": "com.sos.inventory.model.schedule.OrderPositions",
                            "type": "object",
                            "description": "start and end position",
                            "properties": {
                                "startPosition": {
                                    "anyOf": [
                                        {
                                            "description": "Actually, each even item is a string, each odd item is an integer",
                                            "type": "array",
                                            "minItems": 1,
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "type": "integer"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            }
                                        },
                                        {
                                            "type": "string",
                                            "pattern": "^[^<>]*$",
                                            "maxLength": 255,
                                            "minLength": 1
                                        }
                                    ]
                                },
                                "endPositions": {
                                    "type": "array",
                                    "items": {
                                        "anyOf": [
                                            {
                                                "description": "Actually, each even item is a string, each odd item is an integer",
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "anyOf": [
                                                        {
                                                            "type": "integer"
                                                        },
                                                        {
                                                            "type": "string"
                                                        }
                                                    ]
                                                }
                                            },
                                            {
                                                "type": "string",
                                                "pattern": "^[^<>]*$",
                                                "maxLength": 255,
                                                "minLength": 1
                                            }
                                        ]
                                    }
                                },
                                "blockPosition": {
                                    "anyOf": [
                                        {
                                            "description": "Actually, each even item is a string, each odd item is an integer",
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "type": "integer"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            }
                                        },
                                        {
                                            "type": "string",
                                            "pattern": "^[^<>]*$",
                                            "maxLength": 255,
                                            "minLength": 1
                                        }
                                    ]
                                }
                            },
                            "additionalProperties": false
                        },
                        "forceJobAdmission": {
                            "type": "boolean"
                        }
                    },
                    "additionalProperties": false
                }
            }
        }
    },
    "properties": {
        "valid": {
            "type": "boolean"
        }
    },
    "additionalProperties": false
}