{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telenor-sverige/json-schema/telenor-sverige-add-vpn-ncmc-request-schema.json",
  "title": "AddVpnNcmcRequest",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telenor-sverige-product-inventory-openapi.yml#/components/schemas/AddVpnNcmcRequest",
  "required": [
    "luNumber",
    "port",
    "productId",
    "vpnId"
  ],
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "description": "The installed product ID."
    },
    "vpnId": {
      "type": "string",
      "description": "ID of the VPN."
    },
    "port": {
      "type": "string",
      "description": "Which physical port to put the VPN on."
    },
    "luNumber": {
      "type": "string",
      "description": "The LU-Number of the CPE."
    },
    "portMode": {
      "type": "string",
      "enum": [
        "TRUNK",
        "ACCESS"
      ]
    },
    "primaryIpHelper": {
      "type": "string",
      "description": "The primary DHCP server's IP address."
    },
    "secondaryIpHelper": {
      "type": "string",
      "description": "The secondary DHCP server's IP address."
    },
    "portVlan": {
      "type": "string",
      "description": "VLAN for tagging on a LAN port in Telenor's customer placed equipment."
    },
    "telenorIpAddress": {
      "type": "string",
      "description": "The IP on Telenor's network with the subnet mask."
    },
    "staticRoute": {
      "$ref": "#/$defs/StaticRoute"
    },
    "borderGatewayProtocol": {
      "$ref": "#/$defs/BorderGatewayProtocol"
    },
    "notes": {
      "type": "string",
      "description": "Additional information associated to this change request."
    }
  },
  "$defs": {
    "BorderGatewayProtocol": {
      "required": [
        "autonomousSystemNumber",
        "password"
      ],
      "type": "object",
      "properties": {
        "autonomousSystemNumber": {
          "minLength": 1,
          "type": "string",
          "description": "The BGP autonomous system number."
        },
        "password": {
          "minLength": 1,
          "type": "string",
          "description": "The BGP MD5 password."
        }
      },
      "description": "The Border Gateway Protocol (BGP) parameters for CE - PE dynamic route exchange."
    },
    "StaticRoute": {
      "required": [
        "lanAddress",
        "lanMask",
        "nextHop"
      ],
      "type": "object",
      "properties": {
        "lanAddress": {
          "type": "string",
          "description": "The LAN address for the routed subnet behind the LAN equipment."
        },
        "lanMask": {
          "type": "integer",
          "description": "The subnet mask for the routed subnet.",
          "format": "int32"
        },
        "nextHop": {
          "type": "string",
          "description": "The IP address for the routing gateway towards the routed LAN subnet."
        }
      },
      "description": "Network to be routed to the installation address."
    }
  }
}