{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "level": {
            "type": "string",
            "enum": [
                "info",
                "warning",
                "error",
                "critical"
            ]
        },
        "state": {
            "type": "string",
            "enum": [
                "new",
                "acknowledged",
                "resolved"
            ]
        },
        "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
        },
        "message": {
            "type": "string",
            "maxLength": 32767
        },
        "data": {},
        "deviceId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "eventTags": {
            "type": "object",
            "patternProperties": {
                "^[0-9a-zA-Z_-]{1,255}$": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                }
            },
            "additionalProperties": false
        }
    },
    "required": [
        "level",
        "subject"
    ],
    "additionalProperties": false
}