{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "create_l2tp_client",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^\\S+$",
      "description": "Name for the new L2TP client interface"
    },
    "connect_to": {
      "type": "string",
      "description": "Remote L2TP server address"
    },
    "user": {
      "type": "string",
      "description": "Username for authentication"
    },
    "password": {
      "type": "string",
      "description": "Password for authentication"
    },
    "profile": {
      "default": "default-encryption",
      "type": "string"
    },
    "add_default_route": {
      "type": "boolean"
    },
    "default_route_distance": {
      "description": "Distance of the auto-added default route",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "use_ipsec": {
      "type": "string",
      "enum": ["yes", "no"]
    },
    "ipsec_secret": {
      "description": "Pre-shared key for L2TP/IPsec",
      "type": "string"
    },
    "allow": {
      "description": "Allowed auth protocols, comma-separated (pap,chap,mschap1,mschap2)",
      "type": "string"
    },
    "use_peer_dns": {
      "description": "Use DNS servers offered by the remote peer",
      "type": "boolean"
    },
    "dial_on_demand": {
      "description": "Connect only when traffic is present",
      "type": "boolean"
    },
    "keepalive_timeout": {
      "description": "Seconds before an idle tunnel is considered down",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "max_mtu": {
      "description": "Maximum transmission unit",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "max_mru": {
      "description": "Maximum receive unit",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "mrru": {
      "description": "Max receive reconstructed unit for MRRU (multilink)",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "comment": {
      "type": "string"
    },
    "disabled": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": ["name", "connect_to", "user", "password", "profile", "disabled"],
  "additionalProperties": false
}
