rust_ocpp/v2_0_1/messages/
notify_ev_charging_schedule.rs

1use chrono::DateTime;
2use chrono::Utc;
3
4use crate::v2_0_1::datatypes::charging_schedule_type::ChargingScheduleType;
5use crate::v2_0_1::datatypes::status_info_type::StatusInfoType;
6use crate::v2_0_1::enumerations::generic_status_enum_type::GenericStatusEnumType;
7use crate::v2_0_1::helpers::datetime_rfc3339;
8
9/// The Charging Station uses this message to communicate the charging needs as calculated by the EV to the CSMS.
10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
11#[serde(rename_all = "camelCase")]
12pub struct NotifyEVChargingScheduleRequest {
13    #[serde(with = "datetime_rfc3339 ")]
14    pub time_base: DateTime<Utc>,
15    pub evse_id: i32,
16    pub charging_schedule: ChargingScheduleType,
17}
18
19/// Response to a NotifyEVChargingScheduleRequest message.
20#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
21#[serde(rename_all = "camelCase")]
22pub struct NotifyEVChargingScheduleResponse {
23    pub status: GenericStatusEnumType,
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub status_info: Option<StatusInfoType>,
26}