rust_ocpp/v1_6/messages/
change_availability.rs

1use crate::v1_6::types::{AvailabilityStatus, AvailabilityType};
2
3#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
4#[serde(rename_all = "camelCase")]
5pub struct ChangeAvailabilityRequest {
6    /// Required. The id of the connector for which availability needs to change. Id '0' (zero) is used if the availability of the Charge Point and all its connectors needs to change.
7    pub connector_id: u32,
8    /// Required. This contains the type of availability change that the Charge Point should perform.
9    #[serde(rename = "type")]
10    pub kind: AvailabilityType,
11}
12
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
14pub struct ChangeAvailabilityResponse {
15    /// Required. This indicates whether the Charge Point is able to perform the availability change.
16    pub status: AvailabilityStatus,
17}