// 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.
 */

/**
 * Id of dynamic charging profile to update.
 *
 */
import type { OcppRequest } from '../../../internal-types.js';

export interface UpdateDynamicScheduleRequest extends OcppRequest {
  /**
   * Id of charging profile to update.
   *
   */
  chargingProfileId: number;
  scheduleUpdate: ChargingScheduleUpdateType;
  customData?: CustomDataType | null;
}
/**
 * Updates to a ChargingSchedulePeriodType for dynamic charging profiles.
 *
 *
 */
export interface ChargingScheduleUpdateType {
  /**
   * 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.
   * 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.
   *
   */
  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;
  /**
   * *(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;
  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;
}
