{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "description": "Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema.",
    "patternProperties": {
        "^ext_[a-zA-Z0-9_]+$": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "Describes external Receiver transport parameters defined in other AMWA specifications. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint.",
            "title": "External Receiver Transport Parameters",
            "type": [
                "string",
                "boolean",
                "null",
                "number"
            ]
        }
    },
    "properties": {
        "broker_authorization": {
            "description": "Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration.",
            "enum": [
                "auto",
                true,
                false
            ],
            "type": [
                "string",
                "boolean"
            ]
        },
        "broker_protocol": {
            "description": "Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration.",
            "enum": [
                "auto",
                "mqtt",
                "secure-mqtt"
            ],
            "type": "string"
        },
        "broker_topic": {
            "description": "The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.",
            "type": [
                "string",
                "null"
            ]
        },
        "connection_status_broker_topic": {
            "description": "The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.",
            "type": [
                "string",
                "null"
            ]
        },
        "source_host": {
            "anyOf": [
                {
                    "pattern": "^auto$"
                },
                {
                    "format": "hostname"
                },
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured.",
            "type": [
                "string",
                "null"
            ]
        },
        "source_port": {
            "description": "Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration.",
            "maximum": 65535,
            "minimum": 1,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        }
    },
    "title": "MQTT Receiver Transport Parameters",
    "type": "object"
}
