{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "id": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "applicationCertificateId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "applicationId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "creationDate": {
            "type": "string",
            "format": "date-time"
        },
        "lastUpdated": {
            "type": "string",
            "format": "date-time"
        },
        "status": {
            "type": "string",
            "enum": [
                "active",
                "inactive"
            ]
        },
        "description": {
            "type": "string",
            "maxLength": 32767
        },
        "deviceIds": {
            "type": "array",
            "items": {
                "type": "string",
                "pattern": "^[A-Fa-f\\d]{24}$"
            },
            "maxItems": 1000
        },
        "deviceTags": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string",
                        "pattern": "^[0-9a-zA-Z_-]{1,255}$"
                    },
                    "value": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                    }
                },
                "additionalProperties": false
            },
            "maxItems": 100
        },
        "certificateInfo": {
            "type": "object",
            "properties": {
                "serialNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                },
                "fingerprint": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                },
                "commonName": {
                    "type": "string",
                    "maxLength": 1024
                },
                "issuerName": {
                    "type": "string",
                    "maxLength": 1024
                },
                "notValidBefore": {
                    "type": "string",
                    "format": "date-time"
                },
                "notValidAfter": {
                    "type": "string",
                    "format": "date-time"
                }
            }
        },
        "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
            }
        }
    }
}