open_ocpp 0.1.2

OCPP Library
Documentation
use crate::v16::types::id_tag_info::IdTagInfo;
use crate::v16::types::id_token::IdToken;
use serde::{Deserialize, Serialize};

/// Authorize.req PDU sent by the ChargePoint to the Central System.
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AuthorizeReq {
    /// Identifier that needs to be authorized.
    pub id_tag: IdToken,
}

/// Authorize.conf PDU sent by the Central System to the Charge Point in response to a
/// [Authorize.req](crate::v16::messages::authorize::AuthorizeReq) PDU.
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AuthorizeConf {
    /// Information about authorization status, expiry and parent id.
    pub id_tag_info: IdTagInfo,
}