{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "create_vlan_interface",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^\\S+$",
      "description": "Name for the new VLAN interface, e.g. 'vlan100'"
    },
    "vlan_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4094,
      "description": "802.1Q VLAN ID (1-4094)"
    },
    "interface": {
      "type": "string",
      "description": "Parent interface, e.g. 'ether1' or 'bridge'"
    },
    "comment": {
      "type": "string"
    },
    "disabled": {
      "default": false,
      "type": "boolean"
    },
    "mtu": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "forced_mac_address": {
      "description": "RouterOS 7.25+ forced VLAN interface MAC address",
      "type": "string"
    },
    "use_service_tag": {
      "default": false,
      "description": "Use 802.1ad service tag (QinQ)",
      "type": "boolean"
    },
    "arp": {
      "default": "enabled",
      "type": "string",
      "enum": ["enabled", "disabled", "proxy-arp", "reply-only"]
    },
    "arp_timeout": {
      "type": "string"
    },
    "loop_protect": {
      "description": "Loop protection: default, on, off",
      "type": "string",
      "enum": ["default", "on", "off"]
    },
    "loop_protect_disable_time": {
      "description": "Time to disable interface on loop detection, e.g. '5m' (0 = forever)",
      "type": "string"
    },
    "loop_protect_send_interval": {
      "description": "Interval between loop-protect probe packets, e.g. '5s'",
      "type": "string"
    }
  },
  "required": ["name", "vlan_id", "interface", "disabled", "use_service_tag", "arp"],
  "additionalProperties": false
}
