// 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 { BatterySwapEventEnumType } from '../enums/index.js';
import type { OcppRequest } from '../../../internal-types.js';

export interface BatterySwapRequest extends OcppRequest {
  /**
   * @minItems 1
   */
  batteryData: [BatteryDataType, ...BatteryDataType[]];
  eventType: BatterySwapEventEnumType;
  idToken: IdTokenType;
  /**
   * RequestId to correlate BatteryIn/Out events and optional RequestBatterySwapRequest.
   *
   *
   *
   */
  requestId: number;
  customData?: CustomDataType | null;
}
export interface BatteryDataType {
  /**
   * Slot number where battery is inserted or removed.
   *
   */
  evseId: number;
  /**
   * Serial number of battery.
   *
   */
  serialNumber: string;
  /**
   * State of charge
   *
   */
  soC: number;
  /**
   * State of health
   *
   *
   */
  soH: number;
  /**
   * Production date of battery.
   *
   *
   */
  productionDate?: string | null;
  /**
   * Vendor-specific info from battery in undefined format.
   *
   */
  vendorInfo?: string | null;
  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;
}
/**
 * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
 *
 */
export interface IdTokenType {
  /**
   * @minItems 1
   */
  additionalInfo?: [AdditionalInfoType, ...AdditionalInfoType[]] | null;
  /**
   * *(2.1)* IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
   *
   */
  idToken: string;
  /**
   * *(2.1)* Enumeration of possible idToken types. Values defined in Appendix as IdTokenEnumStringType.
   *
   */
  type: string;
  customData?: CustomDataType | null;
}
/**
 * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
 *
 */
export interface AdditionalInfoType {
  /**
   * *(2.1)* This field specifies the additional IdToken.
   *
   */
  additionalIdToken: string;
  /**
   * _additionalInfo_ can be used to send extra information to CSMS in addition to the regular authorization with _IdToken_. _AdditionalInfo_ contains one or more custom _types_, which need to be agreed upon by all parties involved. When the _type_ is not supported, the CSMS/Charging Station MAY ignore the _additionalInfo_.
   *
   *
   */
  type: string;
  customData?: CustomDataType | null;
}
