{
    "$schema": "https://apidocs.iqrf.org/iqrf-gateway-daemon/latest/com.iqrftech.self-desc/schema/jsonschema/1-0-0#",
    "self": {
        "vendor": "com.iqrftech.self-desc",
        "name": "iqrfEmbedIo_Direction-request",
        "format": "jsonschema",
        "version": "1-0-0"
    },
    "type": "object",
    "properties": {
        "mType": {
            "type": "string",
            "description": "Embedded peripheral IO - Direction request.",
            "enum": [
                "iqrfEmbedIo_Direction"
            ]
        },
        "data": {
            "type": "object",
            "properties": {
                "msgId": {
                    "type": "string",
                    "description": "Message identification for binding request with response."
                },
                "timeout": {
                    "type": "integer",
                    "description": "Timeout to wait for IQRF DPA response."
                },
                "req": {
                    "type": "object",
                    "properties": {
                        "nAdr": {
                            "type": "integer",
                            "description": "Network device address."
                        },
                        "hwpId": {
                            "type": "integer",
                            "description": "Hardware profile identification."
                        },
                        "param": {
                            "type": "object",
                            "properties": {
                                "ports": {
                                    "type": "array",
                                    "description": "Array of ports.",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "port": {
                                                "type": "integer",
                                                "description": " Specifies port to setup a direction."
                                            },
                                            "mask": {
                                                "type": "integer",
                                                "description": "Masks pins of the port."
                                            },
                                            "value": {
                                                "type": "integer",
                                                "description": "Actual direction."
                                            }
                                        },
                                        "required": [
                                            "port",
                                            "mask",
                                            "value"
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "required": [
                        "nAdr",
                        "param"
                    ]
                },
                "returnVerbose": {
                    "type": "boolean",
                    "description": "Flag that includes additional parameters in the response."
                }
            },
            "required": [
                "msgId",
                "req"
            ]
        }
    },
    "required": [
        "mType",
        "data"
    ]
}
