{
    "title": "Orderlist",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.jobscheduler.model.order.OrderList",
    "type": "object",
    "properties": {
        "eventId": {
            "type": "string"
        },
        "array": {
            "type": "array",
            "items": {
                "javaType": "com.sos.jobscheduler.model.order.OrderItem",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "arguments": {
                        "description": "a map for arbitrary key-value pairs",
                        "javaType": "com.sos.jobscheduler.model.common.Variables",
                        "type": "object",
                        "returnCode": {
                            "type": "integer"
                        },
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "workflowPosition": {
                        "javaType": "com.sos.jobscheduler.model.workflow.WorkflowPosition",
                        "type": "object",
                        "required": [
                            "workflowId",
                            "position"
                        ],
                        "properties": {
                            "workflowId": {
                                "javaType": "com.sos.jobscheduler.model.workflow.WorkflowId",
                                "type": "object",
                                "required": [
                                    "path"
                                ],
                                "properties": {
                                    "path": {
                                        "description": "absolute path of a JobScheduler object.",
                                        "type": "string",
                                        "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
                                        "maxLength": 255,
                                        "minLength": 1
                                    },
                                    "versionId": {
                                        "type": "string",
                                        "pattern": "^[^<>]*$",
                                        "maxLength": 255
                                    }
                                },
                                "additionalProperties": false
                            },
                            "position": {
                                "description": "Actually, each even item is a string, each odd item is an integer",
                                "type": "array",
                                "items": {
                                    "type": "null"
                                }
                            }
                        },
                        "additionalProperties": false
                    },
                    "state": {
                        "javaType": "com.sos.jobscheduler.model.order.OrderState",
                        "type": "object",
                        "properties": {
                            "TYPE": {
                                "type": "string"
                            },
                            "scheduledFor": {
                                "type": "number",
                                "format": "utc-millisec",
                                "minimum": 0
                            }
                        },
                        "additionalProperties": false
                    },
                    "attachedState": {
                        "javaType": "com.sos.jobscheduler.model.order.OrderAttachedState",
                        "type": "object",
                        "properties": {
                            "TYPE": {
                                "description": "Attaching, Attached, ...",
                                "type": "string"
                            },
                            "agentName": {
                                "type": "string"
                            }
                        },
                        "additionalProperties": false
                    },
                    "historicOutcomes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "javaType": "com.sos.jobscheduler.model.workflow.HistoricOutcome",
                            "properties": {
                                "position": {
                                    "description": "Actually, each even item is a string, each odd item is an integer",
                                    "type": "array",
                                    "items": {
                                        "type": "null"
                                    }
                                },
                                "outcome": {
                                    "javaType": "com.sos.jobscheduler.model.common.Outcome",
                                    "type": "object",
                                    "properties": {
                                        "required": [
                                            "TYPE",
                                            "returnCode"
                                        ],
                                        "TYPE": {
                                            "javaType": "com.sos.jobscheduler.model.common.OutcomeType",
                                            "type": "string",
                                            "enum": [
                                                "Succeeded",
                                                "Failed",
                                                "Disrupted",
                                                "Cancelled"
                                            ],
                                            "javaEnumNames": [
                                                "Succeeded",
                                                "Failed",
                                                "Disrupted",
                                                "Cancelled"
                                            ]
                                        },
                                        "namedValues": {
                                            "description": "a map for arbitrary key-value pairs",
                                            "javaType": "com.sos.jobscheduler.model.common.Variables",
                                            "type": "object",
                                            "returnCode": {
                                                "type": "integer"
                                            },
                                            "additionalProperties": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    "isSuspended": {
                        "type": "boolean"
                    },
                    "removeWhenTerminated": {
                        "type": "boolean"
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "additionalProperties": false
}