{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://jsonschema.net#",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "title": {
            "id": "http://jsonschema.net/title#",
            "type": "string",
            "default": "",
            "additionalProperties": false
        },
        "description": {
            "id": "http://jsonschema.net/description#",
            "type": "string",
            "default": "",
            "additionalProperties": false
        },
        "domainType": {
            "id": "http://jsonschema.net/domainType#",
            "type": "string",
            "default": "",
            "additionalProperties": false
        },
        "data": {
            "id": "http://jsonschema.net/data#",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "message": {
                    "id": "http://jsonschema.net/data/message#",
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "node": {
                            "id": "http://jsonschema.net/data/message/node#",
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "actsAs": {
                                    "id": "http://jsonschema.net/data/message/node/actsAs#",
                                    "type": "string",
                                    "default": "DEVICE",
                                    "additionalProperties": false
                                },
                                "nodeId": {
                                    "id": "http://jsonschema.net/data/message/node/nodeId#",
                                    "type": "string",
                                    "default": "0x55590148.gateway",
                                    "additionalProperties": false
                                },
                                "location": {
                                    "id": "http://jsonschema.net/data/message/node/location#",
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                        "latitude": {
                                            "id": "http://jsonschema.net/data/message/node/location/latitude#",
                                            "type": "integer",
                                            "default": 59,
                                            "additionalProperties": false
                                        },
                                        "longitude": {
                                            "id": "http://jsonschema.net/data/message/node/location/longitude#",
                                            "type": "integer",
                                            "default": 329,
                                            "additionalProperties": false
                                        },
                                        "altitude": {
                                            "id": "http://jsonschema.net/data/message/node/location/altitude#",
                                            "type": "integer",
                                            "default": 329,
                                            "additionalProperties": false
                                        }
                                    },
                                    "required": [
                                        "latitude",
                                        "longitude",
                                        "altitude"
                                    ]
                                },
                                "api": {
                                    "id": "http://jsonschema.net/data/message/node/api#",
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                        "getLocation": {
                                            "id": "http://jsonschema.net/data/message/node/api/getLocation#",
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                                "name": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getLocation/name#",
                                                    "type": "string",
                                                    "default": "",
                                                    "additionalProperties": false
                                                },
                                                "description": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getLocation/description#",
                                                    "type": "string",
                                                    "default": "",
                                                    "additionalProperties": false
                                                },
                                                "parameters": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getLocation/parameters#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {}
                                                },
                                                "returns": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getLocation/returns#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {}
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "description",
                                                "parameters",
                                                "returns"
                                            ]
                                        },
                                        "getStatus": {
                                            "id": "http://jsonschema.net/data/message/node/api/getStatus#",
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                                "name": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getStatus/name#",
                                                    "type": "string",
                                                    "default": "",
                                                    "additionalProperties": false
                                                },
                                                "description": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getStatus/description#",
                                                    "type": "string",
                                                    "default": "",
                                                    "additionalProperties": false
                                                },
                                                "parameters": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getStatus/parameters#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {}
                                                },
                                                "returns": {
                                                    "id": "http://jsonschema.net/data/message/node/api/getStatus/returns#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {}
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "description",
                                                "parameters",
                                                "returns"
                                            ]
                                        },
                                        "setLocation": {
                                            "id": "http://jsonschema.net/data/message/node/api/setLocation#",
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                                "name": {
                                                    "id": "http://jsonschema.net/data/message/node/api/setLocation/name#",
                                                    "type": "string",
                                                    "default": "",
                                                    "additionalProperties": false
                                                },
                                                "description": {
                                                    "id": "http://jsonschema.net/data/message/node/api/setLocation/description#",
                                                    "type": "string",
                                                    "default": "",
                                                    "additionalProperties": false
                                                },
                                                "parameters": {
                                                    "id": "http://jsonschema.net/data/message/node/api/setLocation/parameters#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "latitude": {
                                                            "id": "http://jsonschema.net/data/message/node/api/setLocation/parameters/latitude#",
                                                            "type": "integer",
                                                            "default": 0,
                                                            "additionalProperties": false
                                                        },
                                                        "longitude": {
                                                            "id": "http://jsonschema.net/data/message/node/api/setLocation/parameters/longitude#",
                                                            "type": "integer",
                                                            "default": 0,
                                                            "additionalProperties": false
                                                        },
                                                        "altitude": {
                                                            "id": "http://jsonschema.net/data/message/node/api/setLocation/parameters/altitude#",
                                                            "type": "integer",
                                                            "default": 0,
                                                            "additionalProperties": false
                                                        }
                                                    },
                                                    "required": [
                                                        "latitude",
                                                        "longitude",
                                                        "altitude"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "description",
                                                "parameters"
                                            ]
                                        },
                                        "setStatus": {
                                            "id": "http://jsonschema.net/data/message/node/api/setStatus#",
                                            "type": "string",
                                            "default": "",
                                            "additionalProperties": false
                                        },
                                        "description": {
                                            "id": "http://jsonschema.net/data/message/node/api/description#",
                                            "type": "string",
                                            "default": "",
                                            "additionalProperties": false
                                        },
                                        "parameters": {
                                            "id": "http://jsonschema.net/data/message/node/api/parameters#",
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                                "status": {
                                                    "id": "http://jsonschema.net/data/message/node/api/parameters/status#",
                                                    "type": "string",
                                                    "default": "",
                                                    "additionalProperties": false
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        },
                                        "returns": {
                                            "id": "http://jsonschema.net/data/message/node/api/returns#",
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {}
                                        }
                                    },
                                    "required": [
                                        "getLocation",
                                        "getStatus",
                                        "setLocation",
                                        "setStatus",
                                        "description",
                                        "parameters",
                                        "returns"
                                    ]
                                },
                                "status": {
                                    "id": "http://jsonschema.net/data/message/node/status#",
                                    "type": "string",
                                    "default": "YELLOW",
                                    "additionalProperties": false
                                },
                                "protocol": {
                                    "id": "http://jsonschema.net/data/message/node/protocol#",
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                        "rest": {
                                            "id": "http://jsonschema.net/data/message/node/protocol/rest#",
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                                "Mirror": {
                                                    "id": "http://jsonschema.net/data/message/node/protocol/rest/Mirror#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "domain": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/rest/Mirror/domain#",
                                                            "type": "string",
                                                            "default": "192.168.1.44",
                                                            "additionalProperties": false
                                                        },
                                                        "port": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/rest/Mirror/port#",
                                                            "type": "integer",
                                                            "default": 3000,
                                                            "additionalProperties": false
                                                        },
                                                        "endpoint": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/rest/Mirror/endpoint#",
                                                            "type": "string",
                                                            "default": "/json-mirror",
                                                            "additionalProperties": false
                                                        }
                                                    },
                                                    "required": [
                                                        "domain",
                                                        "port",
                                                        "endpoint"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "Mirror"
                                            ]
                                        },
                                        "messenger": {
                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger#",
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {
                                                "on_publish": {
                                                    "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_publish#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "exchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_publish/exchange#",
                                                            "type": "string",
                                                            "default": "deviceExchange.0x55590148",
                                                            "additionalProperties": false
                                                        },
                                                        "routing_key": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_publish/routing_key#",
                                                            "type": "string",
                                                            "default": "routing.on_publish",
                                                            "additionalProperties": false
                                                        },
                                                        "manageExchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_publish/manageExchange#",
                                                            "type": "boolean",
                                                            "default": true,
                                                            "additionalProperties": false
                                                        }
                                                    },
                                                    "required": [
                                                        "exchange",
                                                        "routing_key",
                                                        "manageExchange"
                                                    ]
                                                },
                                                "heartbeat": {
                                                    "id": "http://jsonschema.net/data/message/node/protocol/messenger/heartbeat#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "exchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/heartbeat/exchange#",
                                                            "type": "string",
                                                            "default": "deviceExchange.0x55590148",
                                                            "additionalProperties": false
                                                        },
                                                        "routing_key": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/heartbeat/routing_key#",
                                                            "type": "string",
                                                            "default": "routing.heartbeat",
                                                            "additionalProperties": false
                                                        },
                                                        "manageExchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/heartbeat/manageExchange#",
                                                            "type": "boolean",
                                                            "default": true,
                                                            "additionalProperties": false
                                                        }
                                                    },
                                                    "required": [
                                                        "exchange",
                                                        "routing_key",
                                                        "manageExchange"
                                                    ]
                                                },
                                                "on_ack": {
                                                    "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_ack#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "exchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_ack/exchange#",
                                                            "type": "string",
                                                            "default": "deviceExchange.0x55590148",
                                                            "additionalProperties": false
                                                        },
                                                        "routing_key": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_ack/routing_key#",
                                                            "type": "string",
                                                            "default": "routing.acks",
                                                            "additionalProperties": false
                                                        },
                                                        "manageExchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/on_ack/manageExchange#",
                                                            "type": "boolean",
                                                            "default": true,
                                                            "additionalProperties": false
                                                        }
                                                    },
                                                    "required": [
                                                        "exchange",
                                                        "routing_key",
                                                        "manageExchange"
                                                    ]
                                                },
                                                "command_server": {
                                                    "id": "http://jsonschema.net/data/message/node/protocol/messenger/command_server#",
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "exchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/command_server/exchange#",
                                                            "type": "string",
                                                            "default": "deviceExchange.0x55590148",
                                                            "additionalProperties": false
                                                        },
                                                        "routing_key": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/command_server/routing_key#",
                                                            "type": "string",
                                                            "default": "routing.commands",
                                                            "additionalProperties": false
                                                        },
                                                        "manageExchange": {
                                                            "id": "http://jsonschema.net/data/message/node/protocol/messenger/command_server/manageExchange#",
                                                            "type": "boolean",
                                                            "default": false,
                                                            "additionalProperties": false
                                                        }
                                                    },
                                                    "required": [
                                                        "exchange",
                                                        "routing_key",
                                                        "manageExchange"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "on_publish",
                                                "heartbeat",
                                                "on_ack",
                                                "command_server"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "rest",
                                        "messenger"
                                    ]
                                },
                                "description": {
                                    "id": "http://jsonschema.net/data/message/node/description#",
                                    "type": "string",
                                    "default": "Test Device 328",
                                    "additionalProperties": false
                                }
                            },
                            "required": [
                                "actsAs",
                                "nodeId",
                                "location",
                                "api",
                                "status",
                                "protocol",
                                "description"
                            ]
                        },
                        "originTimestamp": {
                            "id": "http://jsonschema.net/data/message/originTimestamp#",
                            "type": "string",
                            "default": "Apr 24, 2014 11:35:25 AM",
                            "additionalProperties": false
                        },
                        "seqId": {
                            "id": "http://jsonschema.net/data/message/seqId#",
                            "type": "integer",
                            "default": 2467,
                            "additionalProperties": false
                        },
                        "requestAck": {
                            "id": "http://jsonschema.net/data/message/requestAck#",
                            "type": "boolean",
                            "default": true,
                            "additionalProperties": false
                        },
                        "timestamp": {
                            "id": "http://jsonschema.net/data/message/timestamp#",
                            "type": "string",
                            "default": "2014-04-24T07:35:25.761Z",
                            "additionalProperties": false
                        },
                        "updated": {
                            "id": "http://jsonschema.net/data/message/updated#",
                            "type": "string",
                            "default": "2014-04-24T07:35:25.761Z",
                            "additionalProperties": false
                        }
                    },
                    "required": [
                        "node",
                        "originTimestamp",
                        "seqId",
                        "requestAck",
                        "timestamp",
                        "updated"
                    ]
                }
            },
            "required": [
                "message"
            ]
        }
    },
    "required": [
        "title",
        "description",
        "domainType",
        "data"
    ]
}