{
	"$schema": "http://json-schema.org/draft-07/schema",
	"$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/networkWireGuardTunnel.json",
	"type": "object",
	"title": "New WireGuard VPN tunnel configuration",
	"examples": [
		{
			"id": 1,
			"name": "wg0",
			"privateKey": "+DsMmGWks1DawE1yc4UlOI6pbH3XVxdVArj9lLOyD18=",
			"publicKey": "2OGuuIWQLKvtVYGntdHSoRb8MtDyKq6wxKd9vQphzDQ=",
			"port": 58775,
			"ipv4": {
				"address": "10.0.0.35",
				"prefix": 24
			},
			"ipv6": {
				"address": "fd86:ea04:1115::35",
				"prefix": 64
			},
			"peers": [
				{
					"publicKey": "oFfa5w0nSkfYNdggb/Su/MUJQ1ryotfjMo5zfSim7yk=",
					"psk": "Tkyhh13wpqw/ffriFSQtR8TNdxyT9s2MPhqLlT5Z2SA=",
					"persistentKeepalive": 25,
					"endpoint": "vpn.example.org",
					"port": 51820,
					"allowedIps": [
						{
							"address": "10.0.0.0",
							"prefix": 24
						},
						{
							"address": "2001:db8::/48",
							"prefix": 48
						}
					]
				}
			]
		}
	],
	"required": [
		"name",
		"privateKey",
		"peers"
	],
	"anyOf": [
		{
			"required": [
				"ipv4"
			]
		},
		{
			"required": [
				"ipv6"
			]
		},
		{
			"required": [
				"ipv4",
				"ipv6"
			]
		}
	],
	"additionalProperties": false,
	"properties": {
		"id": {
			"$id": "#/properties/id",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/common.json#/definitions/id"
		},
		"mtu": {
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/mtu"
		},
		"name": {
			"$id": "#/properties/name",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/name"
		},
		"privateKey": {
			"$id": "#/properties/privateKey",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/privateKey"
		},
		"publicKey": {
			"$id": "#/properties/publicKey",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/publicKey"
		},
		"port": {
			"$id": "#/properties/port",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/port"
		},
		"ipv4": {
			"$id": "#/properties/ipv4",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/ipv4"
		},
		"ipv6": {
			"$id": "#/properties/ipv6",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/ipv6"
		},
		"peers": {
			"$id": "#/properties/peers",
			"$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/schemas/definitions/wireGuard.json#/definitions/peers"
		}
	}
}
