{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "update_switch",
  "type": "object",
  "properties": {
    "unset": {
      "description": "Properties to UNSET (RouterOS `!prop`), so they no longer apply — e.g. ['dst-address'] removes the destination-address match. snake_case or kebab-case. Not for setting a value.",
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9_-]*$"
      }
    },
    "switch_id": {
      "type": "string",
      "description": "Switch name (e.g. 'switch1') or RouterOS '.id'"
    },
    "name": {
      "description": "Rename the switch",
      "type": "string"
    },
    "cpu_flow_control": {
      "type": "boolean"
    },
    "mirror_source": {
      "description": "Source port to mirror, or 'none'",
      "type": "string"
    },
    "mirror_target": {
      "description": "Monitor port, 'cpu', or 'none'",
      "type": "string"
    },
    "mirror_egress": {
      "description": "Egress mirror source port (newer chips), or 'none'",
      "type": "string"
    },
    "mirror_egress_target": {
      "description": "Egress mirror target port (88E6393X/88E6191X/88E6190 chips), or 'none'",
      "type": "string"
    },
    "switch_all_ports": {
      "description": "Switch all ports together (RB450G/RB435G/RB850Gx2 only)",
      "type": "boolean"
    }
  },
  "required": ["switch_id"],
  "additionalProperties": false
}
