﻿{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "$id": "urn:OCPP:Cp:2:2018:4:SetNetworkProfileRequest",
  "comment": "OCPP 2.0 - v1p0",
  "definitions": {
    "APNAuthenticationEnumType": {
      "type": "string",
      "additionalProperties": true,
      "enum": [
        "CHAP",
        "NONE",
        "PAP",
        "AUTO"
      ]
    },
    "OCPPInterfaceEnumType": {
      "type": "string",
      "additionalProperties": true,
      "enum": [
        "Wired0",
        "Wired1",
        "Wired2",
        "Wired3",
        "Wireless0",
        "Wireless1",
        "Wireless2",
        "Wireless3"
      ]
    },
    "OCPPTransportEnumType": {
      "type": "string",
      "additionalProperties": true,
      "enum": [
        "JSON",
        "SOAP"
      ]
    },
    "OCPPVersionEnumType": {
      "type": "string",
      "additionalProperties": true,
      "enum": [
        "OCPP12",
        "OCPP15",
        "OCPP16",
        "OCPP20"
      ]
    },
    "VPNEnumType": {
      "type": "string",
      "additionalProperties": true,
      "enum": [
        "IKEv2",
        "IPSec",
        "L2TP",
        "PPTP"
      ]
    },
    "APNType": {
      "javaType": "APN",
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "apn": {
          "type": "string",
          "maxLength": 512
        },
        "apnUserName": {
          "type": "string",
          "maxLength": 20
        },
        "apnPassword": {
          "type": "string",
          "maxLength": 20
        },
        "simPin": {
          "type": "integer"
        },
        "preferredNetwork": {
          "type": "string",
          "maxLength": 6
        },
        "useOnlyPreferredNetwork": {
          "type": "boolean"
        },
        "apnAuthentication": {
          "$ref": "#/definitions/APNAuthenticationEnumType"
        }
      },
      "required": [
        "apn",
        "apnAuthentication"
      ]
    },
    "NetworkConnectionProfileType": {
      "javaType": "NetworkConnectionProfile",
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "apn": {
          "$ref": "#/definitions/APNType"
        },
        "ocppVersion": {
          "$ref": "#/definitions/OCPPVersionEnumType"
        },
        "ocppTransport": {
          "$ref": "#/definitions/OCPPTransportEnumType"
        },
        "ocppCsmsUrl": {
          "type": "string",
          "maxLength": 512
        },
        "messageTimeout": {
          "type": "integer"
        },
        "ocppInterface": {
          "$ref": "#/definitions/OCPPInterfaceEnumType"
        },
        "vpn": {
          "$ref": "#/definitions/VPNType"
        }
      },
      "required": [
        "ocppVersion",
        "ocppTransport",
        "ocppCsmsUrl",
        "messageTimeout",
        "ocppInterface"
      ]
    },
    "VPNType": {
      "javaType": "VPN",
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "server": {
          "type": "string",
          "maxLength": 512
        },
        "user": {
          "type": "string",
          "maxLength": 20
        },
        "group": {
          "type": "string",
          "maxLength": 20
        },
        "password": {
          "type": "string",
          "maxLength": 20
        },
        "key": {
          "type": "string",
          "maxLength": 255
        },
        "type": {
          "$ref": "#/definitions/VPNEnumType"
        }
      },
      "required": [
        "server",
        "user",
        "password",
        "key",
        "type"
      ]
    }
  },
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "configurationSlot": {
      "type": "integer"
    },
    "connectionData": {
      "$ref": "#/definitions/NetworkConnectionProfileType"
    }
  },
  "required": [
    "configurationSlot",
    "connectionData"
  ]
}