{
    "title": "order object in history collection",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.OrderHistoryStateItem",
    "type": "object",
    "required": [
        "state",
        "stateTime"
    ],
    "properties": {
        "state": {
            "javaType": "com.sos.joc.model.order.OrderState",
            "type": "object",
            "required": [
                "severity",
                "_text"
            ],
            "properties": {
                "severity": {
                    "type": "integer"
                },
                "_text": {
                    "javaType": "com.sos.joc.model.order.OrderStateText",
                    "type": "string",
                    "enum": [
                        "PLANNED",
                        "PENDING",
                        "SCHEDULED",
                        "RUNNING",
                        "INPROGRESS",
                        "PROMPTING",
                        "SUSPENDED",
                        "FAILED",
                        "WAITING",
                        "BLOCKED",
                        "CANCELLED",
                        "FINISHED",
                        "BROKEN",
                        "UNKNOWN"
                    ]
                },
                "_reason": {
                    "javaType": "com.sos.joc.model.order.OrderWaitingReason",
                    "type": "string",
                    "enum": [
                        "DELAYED_AFTER_ERROR",
                        "FORKED",
                        "EXPECTING_NOTICES",
                        "WAITING_FOR_LOCK",
                        "WAITING_FOR_ADMISSION",
                        "BETWEEN_CYCLES"
                    ]
                }
            },
            "additionalProperties": false
        },
        "stateTime": {
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "stateText": {
            "type": "string"
        }
    }
}