{
    "title": "event snapshot",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.event.EventSnapshot",
    "type": "object",
    "required": [
        "eventId",
        "eventType",
        "objectType"
    ],
    "properties": {
        "eventId": {
            "description": "eventId/1000=milliseconds of UTC time",
            "type": "number",
            "format": "utc-millisec",
            "minimum": 0
        },
        "path": {
            "description": "absolute path of a JobScheduler object.",
            "type": "string",
            "pattern": "^(/|(/[^/\\<>?:\"|*]+)+)$",
            "maxLength": 255,
            "minLength": 1
        },
        "eventType": {
            "description": "e.g. OrderStateChanged, OrderAdded, OrderTerminated, JOCStateChanged, ControllerStateChanged, WorkflowStateChanged, JobStateChanged",
            "type": "string"
        },
        "objectType": {
            "javaType": "com.sos.joc.model.event.EventType",
            "type": "string",
            "enum": [
                "JOCCLUSTER",
                "CONTROLLER",
                "CONTROLLERCLUSTER",
                "AGENT",
                "PROBLEM",
                "WORKFLOW",
                "ORDER",
                "JOB",
                "JUNCTION",
                "JOBCLASS",
                "SCHEDULE",
                "CALENDAR",
                "ORDERHISTORY",
                "TASKHISTORY"
            ]
        },
        "workflow": {
            "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
        },
        "accessToken": {
            "type": "string",
            "pattern": "^[1-9a-fA-F_]{32}$",
            "maxLength": 32,
            "minLength": 32
        },
        "message": {
            "type": "string"
        }
    }
}