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

export interface SendLocalListRequest extends OcppRequest {
  /**
   * @minItems 1
   */
  localAuthorizationList?: [AuthorizationData, ...AuthorizationData[]] | null;
  /**
   * In case of a full update this is the version number of the full list. In case of a differential update it is the version number of the list after the update has been applied.
   *
   */
  versionNumber: number;
  updateType: UpdateEnumType;
  customData?: CustomDataType | null;
}
/**
 * Contains the identifier to use for authorization.
 *
 */
export interface AuthorizationData {
  idToken: IdTokenType;
  idTokenInfo?: IdTokenInfoType | null;
  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 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;
}
/**
 * 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 status information about an identifier.
 * It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date.
 *
 */
export interface IdTokenInfoType {
  status: AuthorizationStatusEnumType;
  /**
   * Date and Time after which the token must be considered invalid.
   *
   */
  cacheExpiryDateTime?: string | null;
  /**
   * Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; overrules this one.
   *
   */
  chargingPriority?: number | null;
  groupIdToken?: IdTokenType | null;
  /**
   * Preferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
   *
   *
   */
  language1?: string | null;
  /**
   * Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
   *
   */
  language2?: string | null;
  /**
   * Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
   *
   *
   *
   * @minItems 1
   */
  evseId?: [number, ...number[]] | null;
  personalMessage?: MessageContentType | null;
  customData?: CustomDataType | null;
}
/**
 * Contains message details, for a message to be displayed on a Charging Station.
 *
 *
 */
export interface MessageContentType {
  format: MessageFormatEnumType;
  /**
   * Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
   *
   */
  language?: string | null;
  /**
   * *(2.1)* Required. Message contents. +
   * Maximum length supported by Charging Station is given in OCPPCommCtrlr.FieldLength["MessageContentType.content"].
   *     Maximum length defaults to 1024.
   *
   *
   */
  content: string;
  customData?: CustomDataType | null;
}
