{
  "$schema": "https://apidocs.iqrf.org/iqrf-gateway-daemon/com.iqrftech.self-desc/schema/jsonschema/1-0-0#",
  "self": {
    "vendor": "com.iqrftech.self-desc",
    "name": "schema__iqrf__MqttMessaging",
    "format": "jsonschema",
    "version": "1-0-0"
  },
  "type": "object",
  "required": [
    "component",
    "instance",
    "BrokerAddr",
    "ClientId",
    "Persistence",
    "Qos",
    "TopicRequest",
    "TopicResponse",
    "User",
    "Password",
    "KeepAliveInterval",
    "ConnectTimeout",
    "MinReconnect",
    "MaxReconnect",
    "TrustStore",
    "KeyStore",
    "PrivateKey",
    "PrivateKeyPassword",
    "EnabledCipherSuites",
    "EnableServerCertAuth",
    "acceptAsyncMsg"
  ],
  "additionalProperties": false,
  "properties": {
    "component": {
      "title": "Component name",
      "description": "Name of component.",
      "type": "string",
      "enum": [
        "iqrf::MqttMessaging"
      ]
    },
    "instance": {
      "title": "Instance name",
      "description": "Name of component instance.",
      "type": "string",
      "pattern": "^[a-zA-Z0-9-]+$",
      "example": "MqttMessaging-1"
    },
    "BrokerAddr": {
      "title": "Broker address",
      "description": "Address of MQTT broker server to connect to.",
      "type": "string",
      "minLength": 1,
      "example": "tcp://127.0.0.1:1883"
    },
    "ClientId": {
      "title": "Client ID",
      "description": "Daemon MQTT client identificator.",
      "type": "string",
      "minLength": 1,
      "example": "IqrfDpaMessaging1"
    },
    "Persistence": {
      "title": "Persistence",
      "description": "Persistence mode: 0 - in-memory, 1 - filesystem, 2 - application specific.",
      "type": "integer",
      "enum": [
        0,
        1,
        2
      ],
      "example": 1
    },
    "Qos": {
      "title": "Quality of service",
      "description": "Message delivery reliability: 0 - at most once, 1 - at least once, 2 - exactly once.",
      "type": "integer",
      "enum": [
        0,
        1,
        2
      ],
      "example": 1
    },
    "TopicRequest": {
      "title": "Request topic",
      "description": "MQTT topic client subscribes to for incoming messages.",
      "type": "string",
      "example": "Iqrf/DpaRequest"
    },
    "TopicResponse": {
      "title": "Response topic",
      "description": "MQTT topic client publishes responses to.",
      "type": "string",
      "example": "Iqrf/DpaResponse"
    },
    "User": {
      "title": "Username",
      "description": "Username credential for broker authentication.",
      "type": "string",
      "example": "username"
    },
    "Password": {
      "title": "Password",
      "description": "Password credential for broker authentication.",
      "type": "string",
      "example": "password"
    },
    "KeepAliveInterval": {
      "title": "Keep-alive interval",
      "description": "Maximum time in seconds to wait before sending a ping-like message to keep the connection alive.",
      "type": "integer",
      "minimum": 0,
      "example": 20
    },
    "ConnectTimeout": {
      "title": "Connection timeout",
      "description": "Time in seconds to allow for connection to be established.",
      "type": "integer",
      "minimum": 0,
      "example": 5
    },
    "MinReconnect": {
      "title": "Minimum reconnect delay",
      "description": "Minimum time in seconds to wait before attempting to reconnect. This value doubles up to MaxReconnect with successive failed attempts, and resets on success.",
      "type": "integer",
      "minimum": 1,
      "example": 1
    },
    "MaxReconnect": {
      "title": "Maximum reconnect delay",
      "description": "Maximum time in seconds to wait before attempting to reconnect.",
      "type": "integer",
      "minimum": 1,
      "example": 64
    },
    "TrustStore": {
      "title": "Trust store",
      "description": "Path to server CA certificate file.",
      "type": "string",
      "example": "server_ca.crt"
    },
    "KeyStore": {
      "title": "Certificate",
      "description": "Path to client certificate file.",
      "type": "string",
      "example": "client_cert.pem"
    },
    "PrivateKey": {
      "title": "Private key",
      "description": "Path to client private key file.",
      "type": "string",
      "example": "client_key.pem"
    },
    "PrivateKeyPassword": {
      "title": "Private key password",
      "description": "Password required to load encrypted private key file.",
      "type": "string",
      "example": "password"
    },
    "EnabledCipherSuites": {
      "title": "Cipher suites",
      "description": "List of ciphers to present to the broker during TLS handshake. If empty, ALL available ciphers are used.",
      "type": "string",
      "example": "TLS_SHA256_SHA256"
    },
    "EnableServerCertAuth": {
      "title": "Server certificate verification",
      "description": "Enable or disable server certificate verification.",
      "type": "boolean",
      "example": true
    },
    "acceptAsyncMsg": {
      "title": "Send asynchronous messages",
      "description": "Accept and send asynchronous messages to the broker.",
      "type": "boolean",
      "example": true
    }
  }
}
