rust_ocpp/v2_0_1/messages/
clear_charging_profile.rs

1//! ClearChargingProfile
2use crate::v2_0_1::datatypes::clear_charging_profile_type::ClearChargingProfileType;
3use crate::v2_0_1::datatypes::status_info_type::StatusInfoType;
4use crate::v2_0_1::enumerations::clear_charging_profile_status_enum_type::ClearChargingProfileStatusEnumType;
5
6/// `ClearChargingProfileRequest`, sent by the CSMS to the Charging Station.
7///
8/// The CSMS can use this message to clear (remove) either a specific charging
9/// profile (denoted by id) or a selection of charging profiles that match
10///  with the values of the optional evse, stackLevel and ChargingProfilePurpose fields.
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
12#[serde(rename_all = "camelCase")]
13pub struct ClearChargingProfileRequest {
14    /// The Id of the charging profile to clear.
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub charging_profile_id: Option<i32>,
17    /// Specifies the charging profile.
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub charging_profile_criteria: Option<ClearChargingProfileType>,
20}
21
22/// `ClearChargingProfileResponse`, sent by the Charging Station to the CSMS
23///  in response to a [`ClearChargingProfileRequest`].
24#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
25#[serde(rename_all = "camelCase")]
26pub struct ClearChargingProfileResponse {
27    /// Indicates if the Charging Station was able to execute the request.
28    pub status: ClearChargingProfileStatusEnumType,
29    /// Detailed status information.
30    #[serde(skip_serializing_if = "Option::is_none")]
31    pub status_info: Option<StatusInfoType>,
32}