{
  "$schema": "https://apidocs.iqrf.org/iqrf-gateway-daemon/latest/com.iqrftech.self-desc/schema/jsonschema/1-0-0#",
  "properties": {
    "mType": {
      "description": "IQMESH Network management - AutoNetwork request.",
      "enum": [
        "iqmeshNetwork_AutoNetwork"
      ],
      "type": "string"
    },
    "data": {
      "properties": {
        "msgId": {
          "description": "Message identification for binding request with response.",
          "type": "string"
        },
        "req": {
          "properties": {
            "discoveryTxPower": {
              "default": 7,
              "description": "TX power to use in discovery process.",
              "maximum": 7,
              "minimum": 0,
              "type": "integer"
            },
            "discoveryBeforeStart": {
              "default": false,
              "description": "Run discovery before start.",
              "type": "boolean"
            },
            "skipDiscoveryEachWave": {
              "type": "boolean",
              "description": "Skip discovery in each wave.",
              "default": false
            },
            "unbondUnrespondingNodes": {
              "default": true,
              "description": "Unbond Nodes that don't respond.",
              "type": "boolean"
            },
            "skipPrebonding": {
              "default": false,
              "description": "Skip SmartConnect.",
              "type": "boolean"
            },
            "actionRetries": {
              "default": 1,
              "description": "Number of retries DPA transactions.",
              "maximum": 10,
              "minimum": 1,
              "type": "integer"
            },
            "addressSpace": {
              "description": "ToDo - add description.",
              "items": {
                "maximum": 239,
                "minimum": 1,
                "type": "integer"
              },
              "maxItems": 239,
              "type": "array"
            },
            "midList": {
              "description": "Select this option to control MIDs of the Nodes and/or their addresses.",
              "items": {
                "maxItems": 239,
                "properties": {
                  "deviceMID": {
                    "description": "Device MID.",
                    "maxLength": 8,
                    "minLength": 8,
                    "pattern": "^[a-fA-F0-9]{8}$",
                    "type": "string"
                  },
                  "deviceAddr": {
                    "description": "Device address.",
                    "maximum": 239,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "deviceMID"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "midFiltering": {
              "default": false,
              "description": "Bond only Nodes with MIDs listed in midList array).",
              "type": "boolean"
            },
            "overlappingNetworks": {
              "properties": {
                "networks": {
                  "description": "Number of the networks to be built.",
                  "type": "integer"
                },
                "network": {
                  "description": "Network number that will be build.",
                  "type": "integer"
                }
              },
              "required": [
                "networks",
                "network"
              ],
              "type": "object"
            },
            "hwpidFiltering": {
              "description": "Allows to add only nodes with specified HWPID to the network.",
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            "stopConditions": {
              "type": "object",
              "properties": {
                "waves": {
                  "description": "Maximum number of waves.",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                },
                "emptyWaves": {
                  "default": 2,
                  "description": "Number of consecutive waves, in which no new nodes were added into network.",
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                },
                "numberOfTotalNodes": {
                  "description": "Number of total nodes bonded into the network.",
                  "maximum": 239,
                  "minimum": 0,
                  "type": "integer"
                },
                "numberOfNewNodes": {
                  "description": "Number of new nodes bonded into the network.",
                  "maximum": 239,
                  "minimum": 0,
                  "type": "integer"
                },
                "abortOnTooManyNodesFound": {
                  "default": false,
                  "description": "Abort the Autonetwork if too many nodes were found.",
                  "type": "boolean"
                }
              },
              "required": [
                "emptyWaves"
              ]
            }
          },
          "required": [
            "stopConditions"
          ],
          "type": "object"
        },
        "returnVerbose": {
          "type": "boolean",
          "description": "Flag that includes additional parameters in the response."
        }
      },
      "required": [
        "msgId",
        "req"
      ],
      "type": "object"
    }
  },
  "required": [
    "mType",
    "data"
  ],
  "self": {
    "format": "jsonschema",
    "name": "iqmeshNetwork_AutoNetwork-request",
    "vendor": "com.iqrftech.self-desc",
    "version": "1-0-0"
  },
  "type": "object"
}