// 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 {
  ChargingRateUnitEnumType,
  GenericStatusEnumType,
  OperationModeEnumType,
} from '../enums/index.js';
import type { OcppResponse } from '../../../internal-types.js';

export interface GetCompositeScheduleResponse extends OcppResponse {
  status: GenericStatusEnumType;
  statusInfo?: StatusInfoType | null;
  schedule?: CompositeScheduleType | null;
  customData?: CustomDataType | null;
}
/**
 * Element providing more information about the status.
 *
 */
export interface StatusInfoType {
  /**
   * A predefined code for the reason why the status is returned in this response. The string is case-insensitive.
   *
   */
  reasonCode: string;
  /**
   * Additional text to provide detailed information.
   *
   */
  additionalInfo?: 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;
}
export interface CompositeScheduleType {
  evseId: number;
  duration: number;
  scheduleStart: string;
  chargingRateUnit: ChargingRateUnitEnumType;
  /**
   * @minItems 1
   */
  chargingSchedulePeriod: [ChargingSchedulePeriodType, ...ChargingSchedulePeriodType[]];
  customData?: CustomDataType | null;
}
/**
 * Charging schedule period structure defines a time period in a charging schedule. It is used in: CompositeScheduleType and in ChargingScheduleType. When used in a NotifyEVChargingScheduleRequest only _startPeriod_, _limit_, _limit_L2_, _limit_L3_ are relevant.
 *
 */
export interface ChargingSchedulePeriodType {
  /**
   * Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period.
   *
   */
  startPeriod: number;
  /**
   * Optional only when not required by the _operationMode_, as in CentralSetpoint, ExternalSetpoint, ExternalLimits, LocalFrequency,  LocalLoadBalancing. +
   * Charging rate limit during the schedule period, in the applicable _chargingRateUnit_.
   * This SHOULD be a non-negative value; a negative value is only supported for backwards compatibility with older systems that use a negative value to specify a discharging limit.
   * When using _chargingRateUnit_ = `W`, this field represents the sum of the power of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
   *
   */
  limit?: number | null;
  /**
   * *(2.1)* Charging rate limit on phase L2  in the applicable _chargingRateUnit_.
   *
   */
  limit_L2?: number | null;
  /**
   * *(2.1)* Charging rate limit on phase L3  in the applicable _chargingRateUnit_.
   *
   */
  limit_L3?: number | null;
  /**
   * The number of phases that can be used for charging. +
   * For a DC EVSE this field should be omitted. +
   * For an AC EVSE a default value of _numberPhases_ = 3 will be assumed if the field is absent.
   *
   */
  numberPhases?: number | null;
  /**
   * Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own.
   *
   *
   */
  phaseToUse?: number | null;
  /**
   * *(2.1)* Limit in _chargingRateUnit_ that the EV is allowed to discharge with. Note, these are negative values in order to be consistent with _setpoint_, which can be positive and negative.  +
   * For AC this field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
   *
   */
  dischargeLimit?: number | null;
  /**
   * *(2.1)* Limit in _chargingRateUnit_ on phase L2 that the EV is allowed to discharge with.
   *
   */
  dischargeLimit_L2?: number | null;
  /**
   * *(2.1)* Limit in _chargingRateUnit_ on phase L3 that the EV is allowed to discharge with.
   *
   */
  dischargeLimit_L3?: number | null;
  /**
   * *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow as close as possible. Use negative values for discharging. +
   * When a limit and/or _dischargeLimit_ are given the overshoot when following _setpoint_ must remain within these values.
   * This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
   *
   */
  setpoint?: number | null;
  /**
   * *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L2 as close as possible.
   *
   */
  setpoint_L2?: number | null;
  /**
   * *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L3 as close as possible.
   *
   */
  setpoint_L3?: number | null;
  /**
   * *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow as closely as possible. Positive values for inductive, negative for capacitive reactive power or current.  +
   * This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
   *
   */
  setpointReactive?: number | null;
  /**
   * *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L2 as closely as possible.
   *
   */
  setpointReactive_L2?: number | null;
  /**
   * *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L3 as closely as possible.
   *
   */
  setpointReactive_L3?: number | null;
  /**
   * *(2.1)* If  true, the EV should attempt to keep the BMS preconditioned for this time interval.
   *
   */
  preconditioningRequest?: boolean | null;
  /**
   * *(2.1)* If true, the EVSE must turn off power electronics/modules associated with this transaction. Default value when absent is false.
   *
   */
  evseSleep?: boolean | null;
  /**
   * *(2.1)* Power value that, when present, is used as a baseline on top of which values from _v2xFreqWattCurve_ and _v2xSignalWattCurve_ are added.
   *
   *
   */
  v2xBaseline?: number | null;
  operationMode?: OperationModeEnumType | null;
  /**
   * @minItems 1
   * @maxItems 20
   */
  v2xFreqWattCurve?:
    | [V2XFreqWattPointType]
    | [V2XFreqWattPointType, V2XFreqWattPointType]
    | [V2XFreqWattPointType, V2XFreqWattPointType, V2XFreqWattPointType]
    | [V2XFreqWattPointType, V2XFreqWattPointType, V2XFreqWattPointType, V2XFreqWattPointType]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | [
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
        V2XFreqWattPointType,
      ]
    | null;
  /**
   * @minItems 1
   * @maxItems 20
   */
  v2xSignalWattCurve?:
    | [V2XSignalWattPointType]
    | [V2XSignalWattPointType, V2XSignalWattPointType]
    | [V2XSignalWattPointType, V2XSignalWattPointType, V2XSignalWattPointType]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | [
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
        V2XSignalWattPointType,
      ]
    | null;
  customData?: CustomDataType | null;
}
/**
 * *(2.1)* A point of a frequency-watt curve.
 *
 */
export interface V2XFreqWattPointType {
  /**
   * Net frequency in Hz.
   *
   */
  frequency: number;
  /**
   * Power in W to charge (positive) or discharge (negative) at specified frequency.
   *
   */
  power: number;
  customData?: CustomDataType | null;
}
/**
 * *(2.1)* A point of a signal-watt curve.
 *
 */
export interface V2XSignalWattPointType {
  /**
   * Signal value from an AFRRSignalRequest.
   *
   */
  signal: number;
  /**
   * Power in W to charge (positive) or discharge (negative) at specified frequency.
   *
   */
  power: number;
  customData?: CustomDataType | null;
}
