// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache-2.0

/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */

import {
  APNAuthenticationEnumType,
  OCPPInterfaceEnumType,
  OCPPTransportEnumType,
  OCPPVersionEnumType,
  VPNEnumType,
} from '../enums/index.js';
import type { OcppRequest } from '../../../internal-types.js';

export interface SetNetworkProfileRequest extends OcppRequest {
  /**
   * Slot in which the configuration should be stored.
   *
   */
  configurationSlot: number;
  connectionData: NetworkConnectionProfileType;
  customData?: CustomDataType | null;
}
/**
 * The NetworkConnectionProfile defines the functional and technical parameters of a communication link.
 *
 */
export interface NetworkConnectionProfileType {
  apn?: APNType | null;
  ocppVersion?: OCPPVersionEnumType | null;
  ocppInterface: OCPPInterfaceEnumType;
  ocppTransport: OCPPTransportEnumType;
  /**
   * Duration in seconds before a message send by the Charging Station via this network connection times-out.
   * The best setting depends on the underlying network and response times of the CSMS.
   * If you are looking for a some guideline: use 30 seconds as a starting point.
   *
   */
  messageTimeout: number;
  /**
   * URL of the CSMS(s) that this Charging Station communicates with, without the Charging Station identity part. +
   * The SecurityCtrlr.Identity field is appended to _ocppCsmsUrl_ to provide the full websocket URL.
   *
   */
  ocppCsmsUrl: string;
  /**
   * This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile.
   *
   */
  securityProfile: number;
  /**
   * *(2.1)* Charging Station identity to be used as the basic authentication username.
   *
   */
  identity?: string | null;
  /**
   * *(2.1)* BasicAuthPassword to use for security profile 1 or 2.
   *
   */
  basicAuthPassword?: string | null;
  vpn?: VPNType | null;
  customData?: CustomDataType | null;
}
/**
 * Collection of configuration data needed to make a data-connection over a cellular network.
 *
 * NOTE: When asking a GSM modem to dial in, it is possible to specify which mobile operator should be used. This can be done with the mobile country code (MCC) in combination with a mobile network code (MNC). Example: If your preferred network is Vodafone Netherlands, the MCC=204 and the MNC=04 which means the key PreferredNetwork = 20404 Some modems allows to specify a preferred network, which means, if this network is not available, a different network is used. If you specify UseOnlyPreferredNetwork and this network is not available, the modem will not dial in.
 *
 */
export interface APNType {
  /**
   * The Access Point Name as an URL.
   *
   */
  apn: string;
  /**
   * APN username.
   *
   */
  apnUserName?: string | null;
  /**
   * *(2.1)* APN Password.
   *
   */
  apnPassword?: string | null;
  /**
   * SIM card pin code.
   *
   */
  simPin?: number | null;
  /**
   * Preferred network, written as MCC and MNC concatenated. See note.
   *
   */
  preferredNetwork?: string | null;
  /**
   * Default: false. Use only the preferred Network, do
   * not dial in when not available. See Note.
   *
   */
  useOnlyPreferredNetwork?: boolean | null;
  apnAuthentication: APNAuthenticationEnumType;
  customData?: CustomDataType | null;
}
/**
 * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.
 */
export interface CustomDataType {
  vendorId: string;
  [k: string]: unknown;
}
/**
 * VPN Configuration settings
 *
 */
export interface VPNType {
  /**
   * VPN Server Address
   *
   */
  server: string;
  /**
   * VPN User
   *
   */
  user: string;
  /**
   * VPN group.
   *
   */
  group?: string | null;
  /**
   * *(2.1)* VPN Password.
   *
   */
  password: string;
  /**
   * VPN shared secret.
   *
   */
  key: string;
  type: VPNEnumType;
  customData?: CustomDataType | null;
}
