{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "applicationId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "deviceId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "deviceClass": {
            "type": "string",
            "enum": [
                "standalone",
                "gateway",
                "peripheral",
                "floating",
                "edgeCompute",
                "system"
            ]
        },
        "token": {
            "type": "string",
            "minLength": 1
        },
        "ownerType": {
            "type": "string",
            "enum": [
                "user",
                "organization"
            ]
        },
        "filterType": {
            "oneOf": [
                {
                    "type": "string",
                    "enum": [
                        "all",
                        "whitelist",
                        "blacklist"
                    ]
                },
                {
                    "type": "string",
                    "enum": [
                        "none"
                    ]
                }
            ]
        },
        "pubTopics": {
            "type": "array",
            "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
            }
        },
        "subTopics": {
            "type": "array",
            "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
            }
        }
    },
    "required": [
        "applicationId",
        "deviceId",
        "deviceClass",
        "token"
    ]
}