{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nao1215.github.io/jsonize/schemas/ip/link.json",
  "title": "ip/link",
  "description": "ip link, one block per interface",
  "x-jsonize": {
    "definition": "ip/link",
    "version": 3
  },
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "interface": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "peer": {
            "type": "string"
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mtu": {
            "type": "integer"
          },
          "qdisc": {
            "type": "string"
          },
          "master": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "qlen": {
            "type": "integer"
          }
        },
        "required": [
          "index",
          "name",
          "flags",
          "mtu",
          "qdisc"
        ]
      },
      "link": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "broadcast": {
            "type": [
              "string",
              "null"
            ]
          },
          "permanent_address": {
            "type": "string"
          },
          "netnsid": {
            "type": "integer"
          },
          "settings": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "address",
          "broadcast"
        ]
      },
      "details": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "alias",
                "altname",
                "settings"
              ]
            },
            "name": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "kind"
          ]
        }
      }
    },
    "required": [
      "interface",
      "link",
      "details"
    ]
  }
}
