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

export interface UpdateFirmwareRequest extends OcppRequest {
  /**
   * This specifies how many times Charging Station must retry to download the firmware before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry.
   * If the value is 0, it means: no retries.
   *
   */
  retries?: number | null;
  /**
   * The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts.
   *
   */
  retryInterval?: number | null;
  /**
   * The Id of this request
   *
   */
  requestId: number;
  firmware: FirmwareType;
  customData?: CustomDataType | null;
}
/**
 * Represents a copy of the firmware that can be loaded/updated on the Charging Station.
 *
 */
export interface FirmwareType {
  /**
   * URI defining the origin of the firmware.
   *
   */
  location: string;
  /**
   * Date and time at which the firmware shall be retrieved.
   *
   */
  retrieveDateTime: string;
  /**
   * Date and time at which the firmware shall be installed.
   *
   */
  installDateTime?: string | null;
  /**
   * Certificate with which the firmware was signed.
   * PEM encoded X.509 certificate.
   *
   */
  signingCertificate?: string | null;
  /**
   * Base64 encoded firmware signature.
   *
   */
  signature?: 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;
}
