{
    "title": "order object in history collection",
    "id": "schemas/order/historyItem",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.OrderHistoryItem",
    "type": "object",
    "required": [
        "surveyDate",
        "path",
        "orderId",
        "jobChain",
        "startTime",
        "node",
        "state",
        "historyId"
    ],
    "properties": {
        "surveyDate": {
            "id": "schemas/common/surveyDate_p",
            "description": "Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
            "type": "string",
            "format": "date-time"
        },
        "path": {
            "id": "schemas/common/path",
            "description": "absolute path based on live folder of a JobScheduler object.",
            "type": "string",
            "pattern": "/([^/]+/)*[^/]+"
        },
        "orderId": {
            "type": "string"
        },
        "jobChain": {
            "id": "schemas/common/path",
            "description": "absolute path based on live folder of a JobScheduler object.",
            "type": "string",
            "pattern": "/([^/]+/)*[^/]+"
        },
        "startTime": {
            "id": "schemas/common/timestamp",
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "endTime": {
            "id": "schemas/common/timestamp",
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "node": {
            "type": "string"
        },
        "state": {
            "id": "schemas/common/historyState",
            "javaType": "com.sos.joc.model.common.HistoryState",
            "type": "object",
            "required": [
                "severity",
                "_text"
            ],
            "properties": {
                "severity": {
                    "description": "0=successful, 1=incomplete, 2=failed with a green/yellow/red representation",
                    "type": "integer"
                },
                "_text": {
                    "id": "schemas/common/historyStateText",
                    "javaType": "com.sos.joc.model.common.HistoryStateText",
                    "type": "string",
                    "enum": [
                        "SUCCESSFUL",
                        "INCOMPLETE",
                        "FAILED"
                    ]
                }
            }
        },
        "historyId": {
            "type": "string"
        }
    }
}