{
    "title": "start job commands",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.job.StartJobs",
    "type": "object",
    "required": [
        "jobschedulerId"
    ],
    "properties": {
        "jobschedulerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "jobs": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.job.StartJob",
                "type": "object",
                "required": [
                    "job"
                ],
                "properties": {
                    "job": {
                        "description": "absolute path based on live folder of a JobScheduler object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255
                    },
                    "at": {
                        "description": "ISO format yyyy-mm-dd HH:MM[:SS] or now or now + HH:MM[:SS] or now + SECONDS",
                        "type": "string",
                        "pattern": "^(now(\\s*\\+\\s*(\\d{1,2}:\\d{1,2}(:\\d{1,2})?|\\d+)?)?|\\d{4}-\\d{2}-\\d{2}\\s\\d{1,2}:\\d{1,2}(:\\d{1,2})?)$"
                    },
                    "timeZone": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "params": {
                        "type": "array",
                        "items": {
                            "javaType": "com.sos.joc.model.common.NameValuePair",
                            "type": "object",
                            "required": [
                                "name",
                                "value"
                            ],
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "pattern": "^[^<>]*$",
                                    "maxLength": 255
                                },
                                "value": {
                                    "type": "string",
                                    "pattern": "^(?s)((?!<script( |>)|<svg/on).)*$"
                                }
                            }
                        }
                    },
                    "environment": {
                        "type": "array",
                        "items": {
                            "javaType": "com.sos.joc.model.common.NameValuePair",
                            "type": "object",
                            "required": [
                                "name",
                                "value"
                            ],
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "pattern": "^[^<>]*$",
                                    "maxLength": 255
                                },
                                "value": {
                                    "type": "string",
                                    "pattern": "^(?s)((?!<script( |>)|<svg/on).)*$"
                                }
                            }
                        }
                    }
                }
            }
        },
        "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
                }
            }
        }
    }
}