rust_ocpp/v2_0_1/messages/
set_charging_profile.rs

1use crate::v2_0_1::datatypes::charging_profile_type::ChargingProfileType;
2use crate::v2_0_1::datatypes::status_info_type::StatusInfoType;
3use crate::v2_0_1::enumerations::charging_profile_status_enum_type::ChargingProfileStatusEnumType;
4
5/// This contains the field definition of the SetChargingProfileRequest PDU sent by the CSMS to the Charging Station. The CSMS uses this message to send charging profiles to a Charging Station.
6#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
7#[serde(rename_all = "camelCase")]
8pub struct SetChargingProfileRequest {
9    pub evse_id: i32,
10    pub charging_profile: ChargingProfileType,
11}
12
13/// This contains the field definition of the SetChargingProfileResponse PDU sent by the Charging Station to the CSMS in response to SetChargingProfileRequest PDU.
14#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
15#[serde(rename_all = "camelCase")]
16pub struct SetChargingProfileResponse {
17    pub status: ChargingProfileStatusEnumType,
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub status_info: Option<StatusInfoType>,
20}