{
	"$schema": "http://json-schema.org/draft-07/schema",
	"$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/networkInterfaces.json",
	"type": "array",
	"title": "Network interfaces",
	"additionalItems": false,
	"items": {
		"$id": "#/items",
		"type": "object",
		"title": "Network interface",
		"example": {
			"type": "ethernet",
			"macAddress": "00:00:00:00:00:00",
			"manufacturer": "Intel Corporation",
			"model": "I211 Gigabit Network Connection",
			"name": "eno1",
			"state": "connected",
			"connection": "1a27a6e7-dd9c-49a2-9932-2ed4cd7ac716",
			"availableConnections": [
				{
					"uuid": "1a27a6e7-dd9c-49a2-9932-2ed4cd7ac716",
					"name": "Wired connection 1"
				}
			],
			"connectivity": {
				"ipv4": "full",
				"ipv6": "full"
			}
		},
		"additionalProperties": false,
		"required": [
			"name",
			"macAddress",
			"manufacturer",
			"model",
			"type",
			"state",
			"connection",
			"availableConnections",
			"connectivity"
		],
		"properties": {
			"name": {
				"$id": "#/items/properties/name",
				"type": "string",
				"title": "Interface name",
				"example": "eno1"
			},
			"macAddress": {
				"$id": "#/items/properties/macAddress",
				"oneOf": [
					{
						"type": "string",
						"pattern": "^(?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$"
					},
					{
						"type": "null"
					}
				],
				"title": "MAC address",
				"example": "00:00:00:00:00:00"
			},
			"manufacturer": {
				"$id": "#/items/properties/manufacturer",
				"oneOf": [
					{
						"type": "string"
					},
					{
						"type": "null"
					}
				],
				"title": "Manufacturer",
				"example": "Intel Corporation"
			},
			"model": {
				"$id": "#/items/properties/model",
				"oneOf": [
					{
						"type": "string"
					},
					{
						"type": "null"
					}
				],
				"title": "Model",
				"example": "I211 Gigabit Network Connection"
			},
			"type": {
				"$id": "#/items/properties/type",
				"type": "string",
				"enum": [
					"bond",
					"bt",
					"bridge",
					"dummy",
					"ethernet",
					"gsm",
					"iptunnel",
					"loopback",
					"ppp",
					"tun",
					"vlan",
					"wifi",
					"wifi-p2p",
					"wireguard"
				],
				"title": "Interface type",
				"example": "ethernet"
			},
			"state": {
				"$id": "#/items/properties/state",
				"type": "string",
				"enum": [
					"connected",
					"connecting",
					"connecting (checking IP connectivity)",
					"connecting (configuring)",
					"connecting (getting IP configuration)",
					"connecting (need authentication)",
					"connecting (prepare)",
					"connecting (starting secondary connections)",
					"connection failed",
					"deactivating",
					"disconnected",
					"unavailable",
					"unknown",
					"unmanaged"
				],
				"example": "connected"
			},
			"connection": {
				"$id": "#/items/properties/connection",
				"oneOf": [
					{"type": "null"},
					{"type": "string"}
				],
				"title": "Connection UUID",
				"example": "1a27a6e7-dd9c-49a2-9932-2ed4cd7ac716"
			},
			"availableConnections": {
				"$id": "#/items/properties/availableConnections",
				"type": "array",
				"title": "Available connections",
				"items": {
					"$id": "#/items/properties/availableConnections/items",
					"type": "object",
					"title": "Available connection",
					"additionalProperties": false,
					"required": [
						"uuid",
						"name"
					],
					"properties": {
						"uuid": {
							"$id": "#/items/properties/availableConnections/items/properties/uuid",
							"type": "string",
							"title": "Connection UUID",
							"example": "1a27a6e7-dd9c-49a2-9932-2ed4cd7ac716"
						},
						"name": {
							"$id": "#/items/properties/availableConnections/items/properties/name",
							"type": "string",
							"title": "Connection name",
							"example": "Wired connection 1"
						}
					}
				}
			},
			"connectivity": {
				"$id": "#/items/properties/connectivity",
				"type": "object",
				"title": "Connectivity state",
				"additionalProperties": false,
				"required": [
					"ipv4",
					"ipv6"
				],
				"properties": {
					"ipv4": {
						"$id": "#/items/properties/connectivity/properties/ipv4",
						"type": "string",
						"enum": ["full", "limited", "portal", "none", "unknown"],
						"title": "IPv4 connectivity"
					},
					"ipv6": {
						"$id": "#/items/properties/connectivity/properties/ipv6",
						"type": "string",
						"enum": ["full", "limited", "portal", "none", "unknown"],
						"title": "IPv6 connectivity"
					}
				}
			}
		}
	}
}
