{
  "$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__SensorData",
    "format": "jsonschema",
    "version": "1-0-0"
  },
  "type": "object",
  "required": [
    "component",
    "instance",
    "autoRun",
    "period",
    "retryPeriod",
    "asyncReports",
    "messagingList",
    "sendOfflineFrc"
  ],
  "additionalProperties": false,
  "properties": {
    "component": {
      "title": "Component name",
      "description": "Name of component.",
      "type": "string",
      "enum": [
        "iqrf::IqrfSensorData"
      ]
    },
    "instance": {
      "title": "Instance name",
      "description": "Name of component instance.",
      "type": "string",
      "pattern": "^[a-zA-Z0-9-]+$",
      "example": "IqrfSensorData-1"
    },
    "autoRun": {
      "title": "Autorun worker",
      "description": "Run worker on component startup.",
      "type": "boolean"
    },
    "period": {
      "title": "Read period",
      "description": "Time between data reads in minutes.",
      "type": "integer",
      "minimum": 1
    },
    "retryPeriod": {
      "title": "Retry period",
      "description": "Time between retry following a failure.",
      "type": "integer",
      "minimum": 1
    },
    "asyncReports": {
      "title": "Asynchronous reports",
      "description": "Send asynchronous messages when sensor data read concludes.",
      "type": "boolean"
    },
    "messagingList": {
      "title": "Messaging instance list",
      "description": "List of messaging instances to use for asynchronous reporting.",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "title": "Messaging instance",
        "description": "Messaging service instance.",
        "type": "object",
        "required": [
          "type",
          "instance"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "title": "Messaging type",
            "type": "string",
            "enum": [
              "mqtt",
              "ws"
            ],
            "example": "mqtt"
          },
          "instance": {
            "title": "Messaging instance name",
            "description": "Name of messaging component instance.",
            "type": "string",
            "pattern": "^[a-zA-Z0-9-]+$",
            "example": "default"
          }
        }
      }
    },
    "sendOfflineFrc": {
      "title": "Offline FRC",
      "description": "Set offline FRC option before collecting data from sensors.",
      "type": "boolean"
    }
  }
}
