rust_ocpp/v2_0_1/messages/
get_charging_profiles.rs

1//! The message GetChargingProfilesRequest can be used by the CSMS to request installed
2//! charging profiles from the Charging Station. The charging profiles will then be
3//! reported by the Charging Station via ReportChargingProfilesRequest messages.
4use crate::v2_0_1::datatypes::charging_profile_criterion_type::ChargingProfileCriterionType;
5use crate::v2_0_1::datatypes::status_info_type::StatusInfoType;
6use crate::v2_0_1::enumerations::get_charging_profile_status_enum_type::GetChargingProfileStatusEnumType;
7
8/// The message GetChargingProfilesRequest can be used by the CSMS to request installed
9/// charging profiles from the Charging Station. The charging profiles will then be
10/// reported by the Charging Station via ReportChargingProfilesRequest messages.
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
12#[serde(rename_all = "camelCase")]
13pub struct GetChargingProfilesRequest {
14    /// Reference identification that is to be used bythe Charging Station in theReportChargingProfilesRequest when provided
15    pub request_id: i32,
16    /// For which EVSE installed charging profilesSHALL be reported. If 0, only charging profiles installedon the Charging Station itself (the grid connection)SHALL be reported. If omitted, all installed chargingprofiles SHALL be reported
17    #[serde(skip_serializing_if = "Option::is_none")]
18    pub evse_id: Option<i32>,
19    /// Specifies the charging profile
20    pub charging_profile: ChargingProfileCriterionType,
21}
22
23/// This contains the field definition of the GetChargingProfilesResponse PDU sent by the Charging Station to the CSMS in response to a GetChargingProfilesRequest.
24#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
25#[serde(rename_all = "camelCase")]
26pub struct GetChargingProfilesResponse {
27    /// This indicates whether the Charging Station isable to process this request and will sendReportChargingProfilesRequest messages
28    pub status: GetChargingProfileStatusEnumType,
29    /// Detailed status information
30    #[serde(skip_serializing_if = "Option::is_none")]
31    pub status_info: Option<StatusInfoType>,
32}