{
	"$schema": "https://apidocs.iqrf.org/iqrf-gateway-daemon/latest/com.iqrftech.self-desc/schema/jsonschema/1-0-0#",
	"title": "Set device metadata request",
	"description": "Sets metadata to devices at specified addresses.",
	"type": "object",
	"required": [
		"mType",
		"data"
	],
	"additionalProperties": false,
	"properties": {
		"mType": {
			"$id": "#/properties/mType",
			"title": "Message type",
			"description": "IQRF DB - SetDeviceMetadata request.",
			"type": "string",
			"enum": [
				"iqrfDb_SetDeviceMetadata"
			]
		},
		"data": {
			"$id": "#/properties/data",
			"title": "Request data",
			"description": "Request data.",
			"type": "object",
			"required": [
				"msgId",
				"req"
			],
			"additionalProperties": false,
			"properties": {
				"msgId": {
					"$id": "#/properties/data/properties/msgId",
					"title": "Message ID",
					"description": "Message ID used for pairing requests and responses.",
					"type": "string"
				},
				"req": {
					"$id": "#/properties/data/properties/req",
					"title": "Request parameters",
					"description": "Request parameters.",
					"type": "object",
					"required": [
						"devices"
					],
					"properties": {
						"devices": {
							"$id": "#/properties/data/properties/req/properties/devices",
							"title": "Devices",
							"description": "Array of devices and metadata.",
							"type": "array",
							"additionalItems": false,
							"items": {
								"$id": "#/properties/data/properties/req/properties/devices/items",
								"title": "Device object",
								"description": "Device address and corresponding metadata",
								"type": "object",
								"required": [
									"address",
									"metadata"
								],
								"additionalProperties": false,
								"properties": {
									"address": {
										"$id": "#/properties/data/properties/req/properties/devices/items/properties/address",
										"title": "Device address",
										"description": "Address of device in network.",
										"type": "integer",
										"minimum": 0,
										"maximum": 239
									},
									"metadata": {
										"$id": "#/properties/data/properties/req/properties/devices/items/properties/metadata",
										"title": "User metadata",
										"description": "User defined device metadata.",
										"oneOf": [
											{ "type": "object" },
											{ "type": "null" }
										]
									}
								}
							}
						}
					}
				},
				"returnVerbose": {
					"$id": "#/properties/data/properties/returnVerbose",
					"title": "Verbose response",
					"description": "Return more verbose response.",
					"type": "boolean"
				}
			}
		}
	}
}
