rust_ocpp/v2_0_1/messages/
security_event_notification.rs

1use chrono::DateTime;
2use chrono::Utc;
3
4use crate::v2_0_1::helpers::datetime_rfc3339;
5
6/// Sent by the Charging Station to the CSMS in case of a security event.
7#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
8#[serde(rename_all = "camelCase")]
9pub struct SecurityEventNotificationRequest {
10    #[serde(rename = "type")]
11    pub kind: String,
12    #[serde(with = "datetime_rfc3339 ")]
13    pub timestamp: DateTime<Utc>,
14    #[serde(skip_serializing_if = "Option::is_none")]
15    pub tech_info: Option<String>,
16}
17
18/// Sent by the CSMS to the Charging Station to confirm the receipt of a SecurityEventNotificationRequest message. No fields are defined.
19#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
20#[serde(rename_all = "camelCase")]
21pub struct SecurityEventNotificationResponse {}