{
    "title": "add order commands",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.AddOrders",
    "type": "object",
    "required": [
        "controllerId",
        "orders"
    ],
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "orders": {
            "type": "array",
            "minLength": 1,
            "items": {
                "javaType": "com.sos.joc.model.order.AddOrder",
                "type": "object",
                "required": [
                    "orderName",
                    "workflowPath"
                ],
                "properties": {
                    "orderName": {
                        "type": "string",
                        "description": "letters without control, connect and punctuation chars (except _ $) and without digits as first letter",
                        "pattern": "^[^\\x00-\\x1F\\x7F\\x20-\\x23\\x25-\\x2F\\x30-\\x40\\x5B-\\x5E\\x60\\x7B-\\x7E\\x80-\\x9F\\xA0\\xA1\\xA6-\\xB4\\xB6-\\xBF\\xD7\\xF7][^\\x00-\\x1F\\x7F\\x20-\\x23\\x25-\\x2F\\x3A-\\x40\\x5B-\\x5E\\x60\\x7B-\\x7E\\x80-\\x9F\\xA0\\xA1\\xA6-\\xB4\\xB6-\\xBF\\xD7\\xF7]*$",
                        "maxLength": 30
                    },
                    "workflowPath": {
                        "description": "absolute path of an object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "scheduledFor": {
                        "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
                    },
                    "arguments": {
                        "description": "a map for arbitrary key-value pairs",
                        "javaType": "com.sos.jobscheduler.model.common.Variables",
                        "type": "object",
                        "returnCode": {
                            "type": "integer"
                        },
                        "additionalProperties": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "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
                }
            }
        }
    }
}