// 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 {
  ChargingLimitSourceEnumType,
  ChargingProfileKindEnumType,
  ChargingProfilePurposeEnumType,
  ChargingRateUnitEnumType,
  CostKindEnumType,
  OperationModeEnumType,
  RecurrencyKindEnumType,
} from '../enums/index.js';
import type { OcppRequest } from '../../../internal-types.js';

export interface ReportChargingProfilesRequest extends OcppRequest {
  /**
   * Id used to match the &lt;&lt;getchargingprofilesrequest, GetChargingProfilesRequest&gt;&gt; message with the resulting ReportChargingProfilesRequest messages. When the CSMS provided a requestId in the &lt;&lt;getchargingprofilesrequest, GetChargingProfilesRequest&gt;&gt;, this field SHALL contain the same value.
   *
   */
  requestId: number;
  /**
   * Source that has installed this charging profile. Values defined in Appendix as ChargingLimitSourceEnumStringType.
   *
   */
  chargingLimitSource: ChargingLimitSourceEnumType;
  /**
   * @minItems 1
   */
  chargingProfile: [ChargingProfileType, ...ChargingProfileType[]];
  /**
   * To Be Continued. Default value when omitted: false. false indicates that there are no further messages as part of this report.
   *
   */
  tbc?: boolean | null;
  /**
   * The evse to which the charging profile applies. If evseId = 0, the message contains an overall limit for the Charging Station.
   *
   */
  evseId: number;
  customData?: CustomDataType | null;
}
/**
 * A ChargingProfile consists of 1 to 3 ChargingSchedules with a list of ChargingSchedulePeriods, describing the amount of power or current that can be delivered per time interval.
 *
 * image::images/ChargingProfile-Simple.png[]
 *
 *
 */
export interface ChargingProfileType {
  /**
   * Id of ChargingProfile. Unique within charging station. Id can have a negative value. This is useful to distinguish charging profiles from an external actor (external constraints) from charging profiles received from CSMS.
   *
   */
  id: number;
  /**
   * Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
   *
   */
  stackLevel: number;
  chargingProfilePurpose: ChargingProfilePurposeEnumType;
  chargingProfileKind: ChargingProfileKindEnumType;
  recurrencyKind?: RecurrencyKindEnumType | null;
  /**
   * Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station.
   *
   */
  validFrom?: string | null;
  /**
   * Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
   *
   */
  validTo?: string | null;
  /**
   * SHALL only be included if ChargingProfilePurpose is set to TxProfile in a SetChargingProfileRequest. The transactionId is used to match the profile to a specific transaction.
   *
   */
  transactionId?: string | null;
  /**
   * *(2.1)* Period in seconds that this charging profile remains valid after the Charging Station has gone offline. After this period the charging profile becomes invalid for as long as it is offline and the Charging Station reverts back to a valid profile with a lower stack level.
   * If _invalidAfterOfflineDuration_ is true, then this charging profile will become permanently invalid.
   * A value of 0 means that the charging profile is immediately invalid while offline. When the field is absent, then  no timeout applies and the charging profile remains valid when offline.
   *
   */
  maxOfflineDuration?: number | null;
  /**
   * @minItems 1
   * @maxItems 3
   */
  chargingSchedule:
    | [ChargingScheduleType]
    | [ChargingScheduleType, ChargingScheduleType]
    | [ChargingScheduleType, ChargingScheduleType, ChargingScheduleType];
  /**
   * *(2.1)* When set to true this charging profile will not be valid anymore after being offline for more than _maxOfflineDuration_. +
   *     When absent defaults to false.
   *
   */
  invalidAfterOfflineDuration?: boolean | null;
  /**
   * *(2.1)*  Interval in seconds after receipt of last update, when to request a profile update by sending a PullDynamicScheduleUpdateRequest message.
   *     A value of 0 or no value means that no update interval applies. +
   *     Only relevant in a dynamic charging profile.
   *
   *
   */
  dynUpdateInterval?: number | null;
  /**
   * *(2.1)* Time at which limits or setpoints in this charging profile were last updated by a PullDynamicScheduleUpdateRequest or UpdateDynamicScheduleRequest or by an external actor. +
   *     Only relevant in a dynamic charging profile.
   *
   *
   */
  dynUpdateTime?: string | null;
  /**
   * *(2.1)* ISO 15118-20 signature for all price schedules in _chargingSchedules_. +
   * Note: for 256-bit elliptic curves (like secp256k1) the ECDSA signature is 512 bits (64 bytes) and for 521-bit curves (like secp521r1) the signature is 1042 bits. This equals 131 bytes, which can be encoded as base64 in 176 bytes.
   *
   */
  priceScheduleSignature?: string | null;
  customData?: CustomDataType | null;
}
/**
 * Charging schedule structure defines a list of charging periods, as used in: NotifyEVChargingScheduleRequest and ChargingProfileType. When used in a NotifyEVChargingScheduleRequest only _duration_ and _chargingSchedulePeriod_ are relevant and _chargingRateUnit_ must be 'W'. +
 * An ISO 15118-20 session may provide either an _absolutePriceSchedule_ or a _priceLevelSchedule_. An ISO 15118-2 session can only provide a_salesTariff_ element. The field _digestValue_ is used when price schedule or sales tariff are signed.
 *
 * image::images/ChargingSchedule-Simple.png[]
 *
 *
 *
 */
export interface ChargingScheduleType {
  id: number;
  limitAtSoC?: LimitAtSoCType | null;
  /**
   * Starting point of an absolute schedule or recurring schedule.
   *
   */
  startSchedule?: string | null;
  /**
   * Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction in case startSchedule is absent.
   *
   */
  duration?: number | null;
  chargingRateUnit: ChargingRateUnitEnumType;
  /**
   * Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates.
   *
   */
  minChargingRate?: number | null;
  /**
   * *(2.1)* Power tolerance when following EVPowerProfile.
   *
   *
   */
  powerTolerance?: number | null;
  /**
   * *(2.1)* Id of this element for referencing in a signature.
   *
   */
  signatureId?: number | null;
  /**
   * *(2.1)* Base64 encoded hash (SHA256 for ISO 15118-2, SHA512 for ISO 15118-20) of the EXI price schedule element. Used in signature.
   *
   */
  digestValue?: string | null;
  /**
   * *(2.1)* Defaults to false. When true, disregard time zone offset in dateTime fields of  _ChargingScheduleType_ and use unqualified local time at Charging Station instead.
   *  This allows the same `Absolute` or `Recurring` charging profile to be used in both summer and winter time.
   *
   *
   */
  useLocalTime?: boolean | null;
  /**
   * @minItems 1
   * @maxItems 1024
   */
  chargingSchedulePeriod: [ChargingSchedulePeriodType, ...ChargingSchedulePeriodType[]];
  /**
   * *(2.1)* Defaults to 0. When _randomizedDelay_ not equals zero, then the start of each &lt;&lt;cmn_chargingscheduleperiodtype,ChargingSchedulePeriodType&gt;&gt; is delayed by a randomly chosen number of seconds between 0 and _randomizedDelay_.  Only allowed for TxProfile and TxDefaultProfile.
   *
   *
   */
  randomizedDelay?: number | null;
  salesTariff?: SalesTariffType | null;
  absolutePriceSchedule?: AbsolutePriceScheduleType | null;
  priceLevelSchedule?: PriceLevelScheduleType | null;
  customData?: CustomDataType | null;
}
export interface LimitAtSoCType {
  /**
   * The SoC value beyond which the charging rate limit should be applied.
   *
   */
  soc: number;
  /**
   * Charging rate limit beyond the SoC value.
   * The unit is defined by _chargingSchedule.chargingRateUnit_.
   *
   *
   */
  limit: number;
  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;
}
/**
 * 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;
}
/**
 * A SalesTariff provided by a Mobility Operator (EMSP) .
 * NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
 *
 */
export interface SalesTariffType {
  /**
   * SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
   *
   */
  id: number;
  /**
   * A human readable title/short description of the sales tariff e.g. for HMI display purposes.
   *
   */
  salesTariffDescription?: string | null;
  /**
   * Defines the overall number of distinct price levels used across all provided SalesTariff elements.
   *
   */
  numEPriceLevels?: number | null;
  /**
   * @minItems 1
   * @maxItems 1024
   */
  salesTariffEntry: [SalesTariffEntryType, ...SalesTariffEntryType[]];
  customData?: CustomDataType | null;
}
export interface SalesTariffEntryType {
  relativeTimeInterval: RelativeTimeIntervalType;
  /**
   * Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry.
   *
   */
  ePriceLevel?: number | null;
  /**
   * @minItems 1
   * @maxItems 3
   */
  consumptionCost?:
    | [ConsumptionCostType]
    | [ConsumptionCostType, ConsumptionCostType]
    | [ConsumptionCostType, ConsumptionCostType, ConsumptionCostType]
    | null;
  customData?: CustomDataType | null;
}
export interface RelativeTimeIntervalType {
  /**
   * Start of the interval, in seconds from NOW.
   *
   */
  start: number;
  /**
   * Duration of the interval, in seconds.
   *
   */
  duration?: number | null;
  customData?: CustomDataType | null;
}
export interface ConsumptionCostType {
  /**
   * The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval.
   *
   */
  startValue: number;
  /**
   * @minItems 1
   * @maxItems 3
   */
  cost: [CostType] | [CostType, CostType] | [CostType, CostType, CostType];
  customData?: CustomDataType | null;
}
export interface CostType {
  costKind: CostKindEnumType;
  /**
   * The estimated or actual cost per kWh
   *
   */
  amount: number;
  /**
   * Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier
   *
   */
  amountMultiplier?: number | null;
  customData?: CustomDataType | null;
}
/**
 * The AbsolutePriceScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
 *
 * image::images/AbsolutePriceSchedule-Simple.png[]
 *
 *
 */
export interface AbsolutePriceScheduleType {
  /**
   * Starting point of price schedule.
   *
   */
  timeAnchor: string;
  /**
   * Unique ID of price schedule
   *
   */
  priceScheduleID: number;
  /**
   * Description of the price schedule.
   *
   */
  priceScheduleDescription?: string | null;
  /**
   * Currency according to ISO 4217.
   *
   */
  currency: string;
  /**
   * String that indicates what language is used for the human readable strings in the price schedule. Based on ISO 639.
   *
   */
  language: string;
  /**
   * A string in URN notation which shall uniquely identify an algorithm that defines how to compute an energy fee sum for a specific power profile based on the EnergyFee information from the PriceRule elements.
   *
   */
  priceAlgorithm: string;
  minimumCost?: RationalNumberType | null;
  maximumCost?: RationalNumberType | null;
  /**
   * @minItems 1
   * @maxItems 1024
   */
  priceRuleStacks: [PriceRuleStackType, ...PriceRuleStackType[]];
  /**
   * @minItems 1
   * @maxItems 10
   */
  taxRules?:
    | [TaxRuleType]
    | [TaxRuleType, TaxRuleType]
    | [TaxRuleType, TaxRuleType, TaxRuleType]
    | [TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType]
    | [TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType]
    | [TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType]
    | [TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType, TaxRuleType]
    | [
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
      ]
    | [
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
      ]
    | [
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
        TaxRuleType,
      ]
    | null;
  overstayRuleList?: OverstayRuleListType | null;
  /**
   * @minItems 1
   * @maxItems 5
   */
  additionalSelectedServices?:
    | [AdditionalSelectedServicesType]
    | [AdditionalSelectedServicesType, AdditionalSelectedServicesType]
    | [
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
      ]
    | [
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
      ]
    | [
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
        AdditionalSelectedServicesType,
      ]
    | null;
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 *
 */
export interface RationalNumberType {
  /**
   * The exponent to base 10 (dec)
   *
   */
  exponent: number;
  /**
   * Value which shall be multiplied.
   *
   */
  value: number;
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 */
export interface PriceRuleStackType {
  /**
   * Duration of the stack of price rules.  he amount of seconds that define the duration of the given PriceRule(s).
   *
   */
  duration: number;
  /**
   * @minItems 1
   * @maxItems 8
   */
  priceRule:
    | [PriceRuleType]
    | [PriceRuleType, PriceRuleType]
    | [PriceRuleType, PriceRuleType, PriceRuleType]
    | [PriceRuleType, PriceRuleType, PriceRuleType, PriceRuleType]
    | [PriceRuleType, PriceRuleType, PriceRuleType, PriceRuleType, PriceRuleType]
    | [PriceRuleType, PriceRuleType, PriceRuleType, PriceRuleType, PriceRuleType, PriceRuleType]
    | [
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
      ]
    | [
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
        PriceRuleType,
      ];
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 *
 */
export interface PriceRuleType {
  /**
   * The duration of the parking fee period (in seconds).
   * When the time enters into a ParkingFeePeriod, the ParkingFee will apply to the session. .
   *
   */
  parkingFeePeriod?: number | null;
  /**
   * Number of grams of CO2 per kWh.
   *
   */
  carbonDioxideEmission?: number | null;
  /**
   * Percentage of the power that is created by renewable resources.
   *
   */
  renewableGenerationPercentage?: number | null;
  energyFee: RationalNumberType;
  parkingFee?: RationalNumberType | null;
  powerRangeStart: RationalNumberType;
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 *
 */
export interface TaxRuleType {
  /**
   * Id for the tax rule.
   *
   */
  taxRuleID: number;
  /**
   * Human readable string to identify the tax rule.
   *
   */
  taxRuleName?: string | null;
  /**
   * Indicates whether the tax is included in any price or not.
   *
   */
  taxIncludedInPrice?: boolean | null;
  /**
   * Indicates whether this tax applies to Energy Fees.
   *
   */
  appliesToEnergyFee: boolean;
  /**
   * Indicates whether this tax applies to Parking Fees.
   *
   *
   */
  appliesToParkingFee: boolean;
  /**
   * Indicates whether this tax applies to Overstay Fees.
   *
   *
   */
  appliesToOverstayFee: boolean;
  /**
   * Indicates whether this tax applies to Minimum/Maximum Cost.
   *
   *
   */
  appliesToMinimumMaximumCost: boolean;
  taxRate: RationalNumberType;
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 *
 */
export interface OverstayRuleListType {
  overstayPowerThreshold?: RationalNumberType | null;
  /**
   * @minItems 1
   * @maxItems 5
   */
  overstayRule:
    | [OverstayRuleType]
    | [OverstayRuleType, OverstayRuleType]
    | [OverstayRuleType, OverstayRuleType, OverstayRuleType]
    | [OverstayRuleType, OverstayRuleType, OverstayRuleType, OverstayRuleType]
    | [OverstayRuleType, OverstayRuleType, OverstayRuleType, OverstayRuleType, OverstayRuleType];
  /**
   * Time till overstay is applied in seconds.
   *
   */
  overstayTimeThreshold?: number | null;
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 *
 */
export interface OverstayRuleType {
  overstayFee: RationalNumberType;
  /**
   * Human readable string to identify the overstay rule.
   *
   */
  overstayRuleDescription?: string | null;
  /**
   * Time in seconds after trigger of the parent Overstay Rules for this particular fee to apply.
   *
   */
  startTime: number;
  /**
   * Time till overstay will be reapplied
   *
   */
  overstayFeePeriod: number;
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 *
 */
export interface AdditionalSelectedServicesType {
  serviceFee: RationalNumberType;
  /**
   * Human readable string to identify this service.
   *
   */
  serviceName: string;
  customData?: CustomDataType | null;
}
/**
 * The PriceLevelScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
 *
 */
export interface PriceLevelScheduleType {
  /**
   * @minItems 1
   * @maxItems 100
   */
  priceLevelScheduleEntries: [PriceLevelScheduleEntryType, ...PriceLevelScheduleEntryType[]];
  /**
   * Starting point of this price schedule.
   *
   */
  timeAnchor: string;
  /**
   * Unique ID of this price schedule.
   *
   */
  priceScheduleId: number;
  /**
   * Description of the price schedule.
   *
   */
  priceScheduleDescription?: string | null;
  /**
   * Defines the overall number of distinct price level elements used across all PriceLevelSchedules.
   *
   */
  numberOfPriceLevels: number;
  customData?: CustomDataType | null;
}
/**
 * Part of ISO 15118-20 price schedule.
 *
 */
export interface PriceLevelScheduleEntryType {
  /**
   * The amount of seconds that define the duration of this given PriceLevelScheduleEntry.
   *
   */
  duration: number;
  /**
   * Defines the price level of this PriceLevelScheduleEntry (referring to NumberOfPriceLevels). Small values for the PriceLevel represent a cheaper PriceLevelScheduleEntry. Large values for the PriceLevel represent a more expensive PriceLevelScheduleEntry.
   *
   */
  priceLevel: number;
  customData?: CustomDataType | null;
}
