{
    "$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": "iqrfLight_SetPower-request",
        "format": "jsonschema",
        "version": "1-0-0"
    },
    "type": "object",
    "properties": {
        "mType": {
            "type": "string",
            "description": "Standard peripheral Light - Set Power request.",
            "enum": [
                "iqrfLight_SetPower"
            ]
        },
        "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": {
								"lights": {
									"type": "array",
									"description": "Array of objects with the following fields.",
									"items": {
										"type": "object",
										"properties": {
											"index": {
												"type": "integer",
												"description": "Zero based index of the light to set."
											},
											"power": {
												"type": "integer",
												"description": "Power level of the light from range <0;100>. Value 127 keeps current power level allowing to only report power level."
											},
											"time": {
												"type": "integer",
												"description": "Time in seconds. Allowed values are <1;127> or 60*<1;127>."
											}
										},
										"required": [
											"index",
											"power"
										]
									}
								}
                            }
                        }
                    },
                    "required": [
                        "nAdr",
                        "param"
                    ]
                },
                "returnVerbose": {
                    "type": "boolean",
                    "description": "Flag that includes additional parameters in the response."
                }
            },
            "required": [
                "msgId",
                "req"
            ]
        }
    },
    "required": [
        "mType",
        "data"
    ]
}
