{
    "title": "OrderItem",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "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",
            "properties": {
                "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 an 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": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    }
                }
            },
            "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": {
                            "anyOf": [
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "string"
                                }
                            ]
                        }
                    },
                    "outcome": {
                        "javaType": "com.sos.jobscheduler.model.common.Outcome",
                        "type": "object",
                        "properties": {
                            "required": [
                                "TYPE"
                            ],
                            "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",
                                "properties": {
                                    "returnCode": {
                                        "type": "integer"
                                    }
                                },
                                "additionalProperties": {
                                    "type": "string"
                                }
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false
            }
        },
        "isSuspended": {
            "type": "boolean"
        },
        "removeWhenTerminated": {
            "type": "boolean"
        }
    },
    "additionalProperties": false
}