{
    "title": "add order command",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.AddOrder",
    "type": "object",
    "required": [
        "workflowPath"
    ],
    "properties": {
        "orderName": {
            "type": "string",
            "maxLength": 30
        },
        "workflowPath": {
            "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 or empty",
            "type": "string",
            "pattern": "^(now(\\s*\\+\\s*(\\d{1,2}:\\d{1,2}(:\\d{1,2})?|\\d+)?)?||never|\\d{4}-\\d{2}-\\d{2}\\s\\d{1,2}:\\d{1,2}(:\\d{1,2})?)$"
        },
        "timeZone": {
            "description": "see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones",
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "arguments": {
            "description": "a map for arbitrary key-value pairs",
            "javaType": "com.sos.inventory.model.common.Variables",
            "type": "object",
            "additionalProperties": true
        },
        "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
                    }
                ]
            }
        }
    }
}