{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/v2.7.0-rc3/schemas/networkInterfaces.json",
    "type": "array",
    "title": "Network interfaces",
    "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": {
                "type": "string",
                "title": "Interface name",
                "example": "eno1"
            },
            "macAddress": {
                "type": [
                    "string",
                    "null"
                ],
                "pattern": "^(?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$",
                "title": "MAC address",
                "example": "00:00:00:00:00:00"
            },
            "manufacturer": {
                "type": [
                    "string",
                    "null"
                ],
                "title": "Manufacturer",
                "example": "Intel Corporation"
            },
            "model": {
                "type": [
                    "string",
                    "null"
                ],
                "title": "Model",
                "example": "I211 Gigabit Network Connection"
            },
            "type": {
                "type": "string",
                "enum": [
                    "6lowpan",
                    "adsl",
                    "bond",
                    "bridge",
                    "bt",
                    "cdma",
                    "dummy",
                    "ethernet",
                    "generic",
                    "geneve",
                    "gsm",
                    "hsr",
                    "infiniband",
                    "iptunnel",
                    "ipvlan",
                    "loopback",
                    "macsec",
                    "macvlan",
                    "modem",
                    "olpcmesh",
                    "ovs-bridge",
                    "ovs-interface",
                    "ovs-port",
                    "ppp",
                    "team",
                    "tun",
                    "vlan",
                    "vrf",
                    "vxlan",
                    "wifi",
                    "wifi-p2p",
                    "wimax",
                    "wireguard",
                    "wpan"
                ],
                "title": "Interface type",
                "example": "ethernet"
            },
            "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": {
                "type": [
                    "string",
                    "null"
                ],
                "title": "Connection UUID",
                "example": "1a27a6e7-dd9c-49a2-9932-2ed4cd7ac716"
            },
            "availableConnections": {
                "type": "array",
                "title": "Available connections",
                "items": {
                    "type": "object",
                    "title": "Available connection",
                    "additionalProperties": false,
                    "required": [
                        "uuid",
                        "name"
                    ],
                    "properties": {
                        "uuid": {
                            "type": "string",
                            "title": "Connection UUID",
                            "example": "1a27a6e7-dd9c-49a2-9932-2ed4cd7ac716"
                        },
                        "name": {
                            "type": "string",
                            "title": "Connection name",
                            "example": "Wired connection 1"
                        }
                    }
                }
            },
            "connectivity": {
                "type": "object",
                "title": "Connectivity state",
                "additionalProperties": false,
                "required": [
                    "ipv4",
                    "ipv6"
                ],
                "properties": {
                    "ipv4": {
                        "type": "string",
                        "enum": [
                            "full",
                            "limited",
                            "portal",
                            "none",
                            "unknown"
                        ],
                        "title": "IPv4 connectivity"
                    },
                    "ipv6": {
                        "type": "string",
                        "enum": [
                            "full",
                            "limited",
                            "portal",
                            "none",
                            "unknown"
                        ],
                        "title": "IPv6 connectivity"
                    }
                }
            }
        }
    }
}
