{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "allOf": [
        {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "Base protocol message structure",
            "properties": {
                "messageType": {
                    "description": "Protocol message type",
                    "enum": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                    ],
                    "type": "integer"
                }
            },
            "required": [
                "messageType"
            ],
            "title": "Base protocol message",
            "type": "object"
        },
        {
            "properties": {
                "messageType": {
                    "description": "Protocol message type",
                    "enum": [
                        2
                    ],
                    "type": "integer"
                },
                "notifications": {
                    "description": "Notifications being transmited in this transaction",
                    "items": {
                        "properties": {
                            "eventData": {
                                "$schema": "http://json-schema.org/draft-04/schema#",
                                "description": "Event data structure",
                                "oneOf": [
                                    {
                                        "$schema": "http://json-schema.org/draft-04/schema#",
                                        "description": "Property changed event data structure",
                                        "properties": {
                                            "changeType": {
                                                "description": "Event change type numeric value. Must include the numeric values for NcPropertyChangeType",
                                                "maximum": 65535,
                                                "minimum": 0,
                                                "type": "integer"
                                            },
                                            "propertyId": {
                                                "description": "Property ID structure",
                                                "properties": {
                                                    "index": {
                                                        "description": "Index component of the property ID",
                                                        "minimum": 1,
                                                        "type": "integer"
                                                    },
                                                    "level": {
                                                        "description": "Level component of the property ID",
                                                        "minimum": 1,
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "level",
                                                    "index"
                                                ],
                                                "type": "object"
                                            },
                                            "sequenceItemIndex": {
                                                "description": "Index of sequence item if the property is a sequence",
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "value": {
                                                "description": "Property value as described in the MS-05-02 Class definition or in a private Class definition",
                                                "type": [
                                                    "string",
                                                    "number",
                                                    "object",
                                                    "array",
                                                    "boolean",
                                                    "null"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "propertyId",
                                            "changeType",
                                            "value",
                                            "sequenceItemIndex"
                                        ],
                                        "title": "Property changed event data",
                                        "type": "object"
                                    }
                                ],
                                "title": "Event data",
                                "type": "object"
                            },
                            "eventId": {
                                "description": "Event ID structure",
                                "properties": {
                                    "index": {
                                        "description": "Index component of the event ID",
                                        "minimum": 1,
                                        "type": "integer"
                                    },
                                    "level": {
                                        "description": "Level component of the event ID",
                                        "minimum": 1,
                                        "type": "integer"
                                    }
                                },
                                "required": [
                                    "level",
                                    "index"
                                ],
                                "type": "object"
                            },
                            "oid": {
                                "description": "Emitter object id",
                                "minimum": 1,
                                "type": "integer"
                            }
                        },
                        "required": [
                            "oid",
                            "eventId",
                            "eventData"
                        ],
                        "type": "object"
                    },
                    "type": "array"
                }
            },
            "required": [
                "notifications",
                "messageType"
            ],
            "type": "object"
        }
    ],
    "description": "Notification protocol message structure",
    "title": "Notification protocol message",
    "type": "object"
}
