ocpp-types 0.3.0

Strongly typed OCPP 1.6J, 2.0.1, and 2.1 message types for Rust. no_std, no alloc, embedded-friendly.
Documentation
// @generated by ocpp-codegen from schemas/. Do not edit by hand -- run
// `scripts/generate.sh` to regenerate; manual changes will be overwritten.

#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct HeartbeatResponse<CustomDataType = crate::NoCustomData> {
    /// Contains the current time of the CSMS.
    #[cfg_attr(feature = "serde", serde(rename = "currentTime"))]
    pub current_time: crate::OcppTimestamp,
    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
    pub custom_data: Option<CustomDataType>,
}
impl<CustomDataType> crate::Action for HeartbeatResponse<CustomDataType> {
    const ACTION: &'static str = "Heartbeat";
}
#[cfg(feature = "validate")]
impl<CustomDataType> crate::validate::Validate for HeartbeatResponse<CustomDataType> {
    fn validate(&self) -> Result<(), crate::validate::ValidationError> {
        Ok(())
    }
}