Skip to main content

ocpp_types/v201/
common.rs

1// @generated by ocpp-codegen from schemas/. Do not edit by hand -- run
2// `scripts/generate.sh` to regenerate; manual changes will be overwritten.
3
4/// This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.
5#[derive(Debug, Clone, PartialEq, Eq)]
6#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7pub struct CustomData {
8    #[cfg_attr(feature = "serde", serde(rename = "vendorId"))]
9    pub vendor_id: heapless::String<255usize>,
10}
11/// Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
12#[derive(Debug, Clone, PartialEq, Eq)]
13#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
14pub struct AdditionalInfo {
15    /// This field specifies the additional IdToken.
16    #[cfg_attr(feature = "serde", serde(rename = "additionalIdToken"))]
17    pub additional_id_token: heapless::String<36usize>,
18    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
19    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
20    pub custom_data: Option<CustomData>,
21    /// This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.
22    pub r#type: heapless::String<50usize>,
23}
24/// Enumeration of possible idToken types.
25#[derive(Debug, Clone, PartialEq, Eq)]
26#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
27pub enum IdTokenEnum {
28    Central,
29    #[cfg_attr(feature = "serde", serde(rename = "eMAID"))]
30    EMAID,
31    ISO14443,
32    ISO15693,
33    KeyCode,
34    Local,
35    MacAddress,
36    NoAuthorization,
37}
38#[cfg(feature = "alloc")]
39/// Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
40#[derive(Debug, Clone, PartialEq, Eq)]
41#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
42pub struct IdToken {
43    #[cfg_attr(feature = "serde", serde(rename = "additionalInfo"))]
44    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
45    pub additional_info: Option<alloc::vec::Vec<AdditionalInfo>>,
46    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
47    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
48    pub custom_data: Option<CustomData>,
49    /// IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
50    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
51    pub id_token: heapless::String<36usize>,
52    pub r#type: IdTokenEnum,
53}
54#[cfg(not(feature = "alloc"))]
55/// Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
56#[derive(Debug, Clone, PartialEq, Eq)]
57#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
58pub struct IdToken<const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 16usize> {
59    #[cfg_attr(feature = "serde", serde(rename = "additionalInfo"))]
60    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
61    pub additional_info: Option<
62        heapless::Vec<AdditionalInfo, ID_TOKEN_ADDITIONAL_INFO_CAP>,
63    >,
64    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
65    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
66    pub custom_data: Option<CustomData>,
67    /// IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
68    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
69    pub id_token: heapless::String<36usize>,
70    pub r#type: IdTokenEnum,
71}
72/// Used algorithms for the hashes provided.
73#[derive(Debug, Clone, PartialEq, Eq)]
74#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
75pub enum HashAlgorithmEnum {
76    SHA256,
77    SHA384,
78    SHA512,
79}
80#[derive(Debug, Clone, PartialEq, Eq)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
82pub struct OCSPRequestData {
83    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
84    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
85    pub custom_data: Option<CustomData>,
86    #[cfg_attr(feature = "serde", serde(rename = "hashAlgorithm"))]
87    pub hash_algorithm: HashAlgorithmEnum,
88    /// Hashed value of the issuers public key
89    #[cfg_attr(feature = "serde", serde(rename = "issuerKeyHash"))]
90    pub issuer_key_hash: heapless::String<128usize>,
91    /// Hashed value of the Issuer DN (Distinguished Name).
92    #[cfg_attr(feature = "serde", serde(rename = "issuerNameHash"))]
93    pub issuer_name_hash: heapless::String<128usize>,
94    /// This contains the responder URL (Case insensitive).
95    #[cfg_attr(feature = "serde", serde(rename = "responderURL"))]
96    pub responder_u_r_l: heapless::String<512usize>,
97    /// The serial number of the certificate.
98    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
99    pub serial_number: heapless::String<40usize>,
100}
101/// Certificate status information.
102/// - if all certificates are valid: return 'Accepted'.
103/// - if one of the certificates was revoked, return 'CertificateRevoked'.
104#[derive(Debug, Clone, PartialEq, Eq)]
105#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
106pub enum AuthorizeCertificateStatusEnum {
107    Accepted,
108    SignatureError,
109    CertificateExpired,
110    CertificateRevoked,
111    NoCertificateAvailable,
112    CertChainError,
113    ContractCancelled,
114}
115/// Message_ Content. Format. Message_ Format_ Code
116/// urn:x-enexis:ecdm:uid:1:570848
117/// Format of the message.
118#[derive(Debug, Clone, PartialEq, Eq)]
119#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
120pub enum MessageFormatEnum {
121    ASCII,
122    HTML,
123    URI,
124    UTF8,
125}
126/// Message_ Content
127/// urn:x-enexis:ecdm:uid:2:234490
128/// Contains message details, for a message to be displayed on a Charging Station.
129#[derive(Debug, Clone, PartialEq, Eq)]
130#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
131pub struct MessageContent {
132    /// Message_ Content. Content. Message
133    /// urn:x-enexis:ecdm:uid:1:570852
134    /// Message contents.
135    pub content: heapless::String<512usize>,
136    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
137    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
138    pub custom_data: Option<CustomData>,
139    pub format: MessageFormatEnum,
140    /// Message_ Content. Language. Language_ Code
141    /// urn:x-enexis:ecdm:uid:1:570849
142    /// Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
143    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
144    pub language: Option<heapless::String<8usize>>,
145}
146/// ID_ Token. Status. Authorization_ Status
147/// urn:x-oca:ocpp:uid:1:569372
148/// Current status of the ID Token.
149#[derive(Debug, Clone, PartialEq, Eq)]
150#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
151pub enum AuthorizationStatusEnum {
152    Accepted,
153    Blocked,
154    ConcurrentTx,
155    Expired,
156    Invalid,
157    NoCredit,
158    NotAllowedTypeEVSE,
159    NotAtThisLocation,
160    NotAtThisTime,
161    Unknown,
162}
163#[cfg(feature = "alloc")]
164/// ID_ Token
165/// urn:x-oca:ocpp:uid:2:233247
166/// Contains status information about an identifier.
167/// It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date.
168#[derive(Debug, Clone, PartialEq, Eq)]
169#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
170pub struct IdTokenInfo {
171    /// ID_ Token. Expiry. Date_ Time
172    /// urn:x-oca:ocpp:uid:1:569373
173    /// Date and Time after which the token must be considered invalid.
174    #[cfg_attr(feature = "serde", serde(rename = "cacheExpiryDateTime"))]
175    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
176    pub cache_expiry_date_time: Option<alloc::string::String>,
177    /// Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; overrules this one.
178    #[cfg_attr(feature = "serde", serde(rename = "chargingPriority"))]
179    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
180    pub charging_priority: Option<i64>,
181    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
182    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
183    pub custom_data: Option<CustomData>,
184    /// Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
185    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
186    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
187    pub evse_id: Option<alloc::vec::Vec<i64>>,
188    #[cfg_attr(feature = "serde", serde(rename = "groupIdToken"))]
189    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
190    pub group_id_token: Option<IdToken>,
191    /// ID_ Token. Language1. Language_ Code
192    /// urn:x-oca:ocpp:uid:1:569374
193    /// Preferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
194    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
195    pub language1: Option<heapless::String<8usize>>,
196    /// ID_ Token. Language2. Language_ Code
197    /// urn:x-oca:ocpp:uid:1:569375
198    /// Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
199    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
200    pub language2: Option<heapless::String<8usize>>,
201    #[cfg_attr(feature = "serde", serde(rename = "personalMessage"))]
202    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
203    pub personal_message: Option<MessageContent>,
204    pub status: AuthorizationStatusEnum,
205}
206#[cfg(not(feature = "alloc"))]
207/// ID_ Token
208/// urn:x-oca:ocpp:uid:2:233247
209/// Contains status information about an identifier.
210/// It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date.
211#[derive(Debug, Clone, PartialEq, Eq)]
212#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
213pub struct IdTokenInfo<
214    const ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP: usize = 1024usize,
215    const ID_TOKEN_INFO_EVSE_ID_CAP: usize = 16usize,
216    const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 16usize,
217> {
218    /// ID_ Token. Expiry. Date_ Time
219    /// urn:x-oca:ocpp:uid:1:569373
220    /// Date and Time after which the token must be considered invalid.
221    #[cfg_attr(feature = "serde", serde(rename = "cacheExpiryDateTime"))]
222    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
223    pub cache_expiry_date_time: Option<
224        heapless::String<ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP>,
225    >,
226    /// Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; overrules this one.
227    #[cfg_attr(feature = "serde", serde(rename = "chargingPriority"))]
228    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
229    pub charging_priority: Option<i64>,
230    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
231    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
232    pub custom_data: Option<CustomData>,
233    /// Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
234    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
235    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
236    pub evse_id: Option<heapless::Vec<i64, ID_TOKEN_INFO_EVSE_ID_CAP>>,
237    #[cfg_attr(feature = "serde", serde(rename = "groupIdToken"))]
238    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
239    pub group_id_token: Option<IdToken<ID_TOKEN_ADDITIONAL_INFO_CAP>>,
240    /// ID_ Token. Language1. Language_ Code
241    /// urn:x-oca:ocpp:uid:1:569374
242    /// Preferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
243    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
244    pub language1: Option<heapless::String<8usize>>,
245    /// ID_ Token. Language2. Language_ Code
246    /// urn:x-oca:ocpp:uid:1:569375
247    /// Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
248    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
249    pub language2: Option<heapless::String<8usize>>,
250    #[cfg_attr(feature = "serde", serde(rename = "personalMessage"))]
251    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
252    pub personal_message: Option<MessageContent>,
253    pub status: AuthorizationStatusEnum,
254}
255/// Wireless_ Communication_ Module
256/// urn:x-oca:ocpp:uid:2:233306
257/// Defines parameters required for initiating and maintaining wireless communication with other devices.
258#[derive(Debug, Clone, PartialEq, Eq)]
259#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
260pub struct Modem {
261    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
262    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
263    pub custom_data: Option<CustomData>,
264    /// Wireless_ Communication_ Module. ICCID. CI20_ Text
265    /// urn:x-oca:ocpp:uid:1:569327
266    /// This contains the ICCID of the modem’s SIM card.
267    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
268    pub iccid: Option<heapless::String<20usize>>,
269    /// Wireless_ Communication_ Module. IMSI. CI20_ Text
270    /// urn:x-oca:ocpp:uid:1:569328
271    /// This contains the IMSI of the modem’s SIM card.
272    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
273    pub imsi: Option<heapless::String<20usize>>,
274}
275/// Charge_ Point
276/// urn:x-oca:ocpp:uid:2:233122
277/// The physical system where an Electrical Vehicle (EV) can be charged.
278#[derive(Debug, Clone, PartialEq, Eq)]
279#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
280pub struct ChargingStation {
281    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
282    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
283    pub custom_data: Option<CustomData>,
284    /// This contains the firmware version of the Charging Station.
285    #[cfg_attr(feature = "serde", serde(rename = "firmwareVersion"))]
286    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
287    pub firmware_version: Option<heapless::String<50usize>>,
288    /// Device. Model. CI20_ Text
289    /// urn:x-oca:ocpp:uid:1:569325
290    /// Defines the model of the device.
291    pub model: heapless::String<20usize>,
292    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
293    pub modem: Option<Modem>,
294    /// Device. Serial_ Number. Serial_ Number
295    /// urn:x-oca:ocpp:uid:1:569324
296    /// Vendor-specific device identifier.
297    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
298    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
299    pub serial_number: Option<heapless::String<25usize>>,
300    /// Identifies the vendor (not necessarily in a unique manner).
301    #[cfg_attr(feature = "serde", serde(rename = "vendorName"))]
302    pub vendor_name: heapless::String<50usize>,
303}
304/// This contains the reason for sending this message to the CSMS.
305#[derive(Debug, Clone, PartialEq, Eq)]
306#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
307pub enum BootReasonEnum {
308    ApplicationReset,
309    FirmwareUpdate,
310    LocalReset,
311    PowerUp,
312    RemoteReset,
313    ScheduledReset,
314    Triggered,
315    Unknown,
316    Watchdog,
317}
318/// This contains whether the Charging Station has been registered
319/// within the CSMS.
320#[derive(Debug, Clone, PartialEq, Eq)]
321#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
322pub enum RegistrationStatusEnum {
323    Accepted,
324    Pending,
325    Rejected,
326}
327/// Element providing more information about the status.
328#[derive(Debug, Clone, PartialEq, Eq)]
329#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
330pub struct StatusInfo {
331    /// Additional text to provide detailed information.
332    #[cfg_attr(feature = "serde", serde(rename = "additionalInfo"))]
333    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
334    pub additional_info: Option<heapless::String<512usize>>,
335    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
336    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
337    pub custom_data: Option<CustomData>,
338    /// A predefined code for the reason why the status is returned in this response. The string is case-insensitive.
339    #[cfg_attr(feature = "serde", serde(rename = "reasonCode"))]
340    pub reason_code: heapless::String<20usize>,
341}
342/// This indicates the success or failure of the canceling of a reservation by CSMS.
343#[derive(Debug, Clone, PartialEq, Eq)]
344#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
345pub enum CancelReservationStatusEnum {
346    Accepted,
347    Rejected,
348}
349/// Indicates the type of the signed certificate that is returned. When omitted the certificate is used for both the 15118 connection (if implemented) and the Charging Station to CSMS connection. This field is required when a typeOfCertificate was included in the &lt;&lt;signcertificaterequest,SignCertificateRequest&gt;&gt; that requested this certificate to be signed AND both the 15118 connection and the Charging Station connection are implemented.
350#[derive(Debug, Clone, PartialEq, Eq)]
351#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
352pub enum CertificateSigningUseEnum {
353    ChargingStationCertificate,
354    V2GCertificate,
355}
356/// Returns whether certificate signing has been accepted, otherwise rejected.
357#[derive(Debug, Clone, PartialEq, Eq)]
358#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
359pub enum CertificateSignedStatusEnum {
360    Accepted,
361    Rejected,
362}
363/// EVSE
364/// urn:x-oca:ocpp:uid:2:233123
365/// Electric Vehicle Supply Equipment
366#[derive(Debug, Clone, PartialEq, Eq)]
367#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
368pub struct EVSE {
369    /// An id to designate a specific connector (on an EVSE) by connector index number.
370    #[cfg_attr(feature = "serde", serde(rename = "connectorId"))]
371    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
372    pub connector_id: Option<i64>,
373    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
374    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
375    pub custom_data: Option<CustomData>,
376    /// Identified_ Object. MRID. Numeric_ Identifier
377    /// urn:x-enexis:ecdm:uid:1:569198
378    /// EVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.
379    pub id: i64,
380}
381/// This contains the type of availability change that the Charging Station should perform.
382#[derive(Debug, Clone, PartialEq, Eq)]
383#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
384pub enum OperationalStatusEnum {
385    Inoperative,
386    Operative,
387}
388/// This indicates whether the Charging Station is able to perform the availability change.
389#[derive(Debug, Clone, PartialEq, Eq)]
390#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
391pub enum ChangeAvailabilityStatusEnum {
392    Accepted,
393    Rejected,
394    Scheduled,
395}
396/// Accepted if the Charging Station has executed the request, otherwise rejected.
397#[derive(Debug, Clone, PartialEq, Eq)]
398#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
399pub enum ClearCacheStatusEnum {
400    Accepted,
401    Rejected,
402}
403/// Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code
404/// urn:x-oca:ocpp:uid:1:569231
405/// Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request.
406#[derive(Debug, Clone, PartialEq, Eq)]
407#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
408pub enum ChargingProfilePurposeEnum {
409    ChargingStationExternalConstraints,
410    ChargingStationMaxProfile,
411    TxDefaultProfile,
412    TxProfile,
413}
414/// Charging_ Profile
415/// urn:x-oca:ocpp:uid:2:233255
416/// A ChargingProfile consists of a ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
417#[derive(Debug, Clone, PartialEq, Eq)]
418#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
419pub struct ClearChargingProfile {
420    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
421    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
422    pub charging_profile_purpose: Option<ChargingProfilePurposeEnum>,
423    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
424    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
425    pub custom_data: Option<CustomData>,
426    /// Identified_ Object. MRID. Numeric_ Identifier
427    /// urn:x-enexis:ecdm:uid:1:569198
428    /// Specifies the id of the EVSE for which to clear charging profiles. An evseId of zero (0) specifies the charging profile for the overall Charging Station. Absence of this parameter means the clearing applies to all charging profiles that match the other criteria in the request.
429    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
430    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
431    pub evse_id: Option<i64>,
432    /// Charging_ Profile. Stack_ Level. Counter
433    /// urn:x-oca:ocpp:uid:1:569230
434    /// Specifies the stackLevel for which charging profiles will be cleared, if they meet the other criteria in the request.
435    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
436    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
437    pub stack_level: Option<i64>,
438}
439/// Indicates if the Charging Station was able to execute the request.
440#[derive(Debug, Clone, PartialEq, Eq)]
441#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
442pub enum ClearChargingProfileStatusEnum {
443    Accepted,
444    Unknown,
445}
446/// Returns whether the Charging Station has been able to remove the message.
447#[derive(Debug, Clone, PartialEq, Eq)]
448#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
449pub enum ClearMessageStatusEnum {
450    Accepted,
451    Unknown,
452}
453/// Result of the clear request for this monitor, identified by its Id.
454#[derive(Debug, Clone, PartialEq, Eq)]
455#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
456pub enum ClearMonitoringStatusEnum {
457    Accepted,
458    Rejected,
459    NotFound,
460}
461#[derive(Debug, Clone, PartialEq, Eq)]
462#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
463pub struct ClearMonitoringResult {
464    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
465    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
466    pub custom_data: Option<CustomData>,
467    /// Id of the monitor of which a clear was requested.
468    pub id: i64,
469    pub status: ClearMonitoringStatusEnum,
470    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
471    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
472    pub status_info: Option<StatusInfo>,
473}
474/// Source of the charging limit.
475#[derive(Debug, Clone, PartialEq, Eq)]
476#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
477pub enum ChargingLimitSourceEnum {
478    EMS,
479    Other,
480    SO,
481    CSO,
482}
483#[derive(Debug, Clone, PartialEq, Eq)]
484#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
485pub struct CertificateHashData {
486    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
487    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
488    pub custom_data: Option<CustomData>,
489    #[cfg_attr(feature = "serde", serde(rename = "hashAlgorithm"))]
490    pub hash_algorithm: HashAlgorithmEnum,
491    /// Hashed value of the issuers public key
492    #[cfg_attr(feature = "serde", serde(rename = "issuerKeyHash"))]
493    pub issuer_key_hash: heapless::String<128usize>,
494    /// Hashed value of the Issuer DN (Distinguished Name).
495    #[cfg_attr(feature = "serde", serde(rename = "issuerNameHash"))]
496    pub issuer_name_hash: heapless::String<128usize>,
497    /// The serial number of the certificate.
498    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
499    pub serial_number: heapless::String<40usize>,
500}
501/// Indicates whether the request was accepted.
502#[derive(Debug, Clone, PartialEq, Eq)]
503#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
504pub enum CustomerInformationStatusEnum {
505    Accepted,
506    Rejected,
507    Invalid,
508}
509/// This indicates the success or failure of the data transfer.
510#[derive(Debug, Clone, PartialEq, Eq)]
511#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
512pub enum DataTransferStatusEnum {
513    Accepted,
514    Rejected,
515    UnknownMessageId,
516    UnknownVendorId,
517}
518/// Charging Station indicates if it can process the request.
519#[derive(Debug, Clone, PartialEq, Eq)]
520#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
521pub enum DeleteCertificateStatusEnum {
522    Accepted,
523    Failed,
524    NotFound,
525}
526/// This contains the progress status of the firmware installation.
527#[derive(Debug, Clone, PartialEq, Eq)]
528#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
529pub enum FirmwareStatusEnum {
530    Downloaded,
531    DownloadFailed,
532    Downloading,
533    DownloadScheduled,
534    DownloadPaused,
535    Idle,
536    InstallationFailed,
537    Installing,
538    Installed,
539    InstallRebooting,
540    InstallScheduled,
541    InstallVerificationFailed,
542    InvalidSignature,
543    SignatureVerified,
544}
545/// Defines whether certificate needs to be installed or updated.
546#[derive(Debug, Clone, PartialEq, Eq)]
547#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
548pub enum CertificateActionEnum {
549    Install,
550    Update,
551}
552/// Indicates whether the message was processed properly.
553#[derive(Debug, Clone, PartialEq, Eq)]
554#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
555pub enum Iso15118EVCertificateStatusEnum {
556    Accepted,
557    Failed,
558}
559/// This field specifies the report base.
560#[derive(Debug, Clone, PartialEq, Eq)]
561#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
562pub enum ReportBaseEnum {
563    ConfigurationInventory,
564    FullInventory,
565    SummaryInventory,
566}
567/// This indicates whether the Charging Station is able to accept this request.
568#[derive(Debug, Clone, PartialEq, Eq)]
569#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
570pub enum GenericDeviceModelStatusEnum {
571    Accepted,
572    Rejected,
573    NotSupported,
574    EmptyResultSet,
575}
576/// This indicates whether the charging station was able to retrieve the OCSP certificate status.
577#[derive(Debug, Clone, PartialEq, Eq)]
578#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
579pub enum GetCertificateStatusEnum {
580    Accepted,
581    Failed,
582}
583#[cfg(feature = "alloc")]
584/// Charging_ Profile
585/// urn:x-oca:ocpp:uid:2:233255
586/// A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
587#[derive(Debug, Clone, PartialEq, Eq)]
588#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
589pub struct ChargingProfileCriterion {
590    /// For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource.
591    #[cfg_attr(feature = "serde", serde(rename = "chargingLimitSource"))]
592    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
593    pub charging_limit_source: Option<heapless::Vec<ChargingLimitSourceEnum, 4usize>>,
594    /// List of all the chargingProfileIds requested. Any ChargingProfile that matches one of these profiles will be reported. If omitted, the Charging Station SHALL not filter on chargingProfileId. This field SHALL NOT contain more ids than set in &lt;&lt;configkey-charging-profile-entries,ChargingProfileEntries.maxLimit&gt;&gt;
595    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileId"))]
596    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
597    pub charging_profile_id: Option<alloc::vec::Vec<i64>>,
598    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
599    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
600    pub charging_profile_purpose: Option<ChargingProfilePurposeEnum>,
601    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
602    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
603    pub custom_data: Option<CustomData>,
604    /// Charging_ Profile. Stack_ Level. Counter
605    /// urn:x-oca:ocpp:uid:1:569230
606    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
607    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
608    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
609    pub stack_level: Option<i64>,
610}
611#[cfg(not(feature = "alloc"))]
612/// Charging_ Profile
613/// urn:x-oca:ocpp:uid:2:233255
614/// A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
615#[derive(Debug, Clone, PartialEq, Eq)]
616#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
617pub struct ChargingProfileCriterion<
618    const CHARGING_PROFILE_CRITERION_CHARGING_PROFILE_ID_CAP: usize = 16usize,
619> {
620    /// For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource.
621    #[cfg_attr(feature = "serde", serde(rename = "chargingLimitSource"))]
622    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
623    pub charging_limit_source: Option<heapless::Vec<ChargingLimitSourceEnum, 4usize>>,
624    /// List of all the chargingProfileIds requested. Any ChargingProfile that matches one of these profiles will be reported. If omitted, the Charging Station SHALL not filter on chargingProfileId. This field SHALL NOT contain more ids than set in &lt;&lt;configkey-charging-profile-entries,ChargingProfileEntries.maxLimit&gt;&gt;
625    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileId"))]
626    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
627    pub charging_profile_id: Option<
628        heapless::Vec<i64, CHARGING_PROFILE_CRITERION_CHARGING_PROFILE_ID_CAP>,
629    >,
630    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
631    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
632    pub charging_profile_purpose: Option<ChargingProfilePurposeEnum>,
633    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
634    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
635    pub custom_data: Option<CustomData>,
636    /// Charging_ Profile. Stack_ Level. Counter
637    /// urn:x-oca:ocpp:uid:1:569230
638    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
639    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
640    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
641    pub stack_level: Option<i64>,
642}
643/// This indicates whether the Charging Station is able to process this request and will send &lt;&lt;reportchargingprofilesrequest, ReportChargingProfilesRequest&gt;&gt; messages.
644#[derive(Debug, Clone, PartialEq, Eq)]
645#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
646pub enum GetChargingProfileStatusEnum {
647    Accepted,
648    NoProfiles,
649}
650/// Can be used to force a power or current profile.
651#[derive(Debug, Clone, PartialEq, Eq)]
652#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
653pub enum ChargingRateUnitEnum {
654    W,
655    A,
656}
657/// Charging_ Schedule_ Period
658/// urn:x-oca:ocpp:uid:2:233257
659/// Charging schedule period structure defines a time period in a charging schedule.
660#[derive(Debug, Clone, PartialEq)]
661#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
662pub struct ChargingSchedulePeriod {
663    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
664    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
665    pub custom_data: Option<CustomData>,
666    /// Charging_ Schedule_ Period. Limit. Measure
667    /// urn:x-oca:ocpp:uid:1:569241
668    /// Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1).
669    pub limit: f64,
670    /// Charging_ Schedule_ Period. Number_ Phases. Counter
671    /// urn:x-oca:ocpp:uid:1:569242
672    /// The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given.
673    #[cfg_attr(feature = "serde", serde(rename = "numberPhases"))]
674    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
675    pub number_phases: Option<i64>,
676    /// Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own.
677    #[cfg_attr(feature = "serde", serde(rename = "phaseToUse"))]
678    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
679    pub phase_to_use: Option<i64>,
680    /// Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time
681    /// urn:x-oca:ocpp:uid:1:569240
682    /// Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period.
683    #[cfg_attr(feature = "serde", serde(rename = "startPeriod"))]
684    pub start_period: i64,
685}
686#[cfg(feature = "alloc")]
687/// Composite_ Schedule
688/// urn:x-oca:ocpp:uid:2:233362
689#[derive(Debug, Clone, PartialEq)]
690#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
691pub struct CompositeSchedule {
692    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
693    pub charging_rate_unit: ChargingRateUnitEnum,
694    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
695    pub charging_schedule_period: alloc::vec::Vec<ChargingSchedulePeriod>,
696    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
697    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
698    pub custom_data: Option<CustomData>,
699    /// Duration of the schedule in seconds.
700    pub duration: i64,
701    /// The ID of the EVSE for which the
702    /// schedule is requested. When evseid=0, the
703    /// Charging Station calculated the expected
704    /// consumption for the grid connection.
705    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
706    pub evse_id: i64,
707    /// Composite_ Schedule. Start. Date_ Time
708    /// urn:x-oca:ocpp:uid:1:569456
709    /// Date and time at which the schedule becomes active. All time measurements within the schedule are relative to this timestamp.
710    #[cfg_attr(feature = "serde", serde(rename = "scheduleStart"))]
711    pub schedule_start: alloc::string::String,
712}
713#[cfg(not(feature = "alloc"))]
714/// Composite_ Schedule
715/// urn:x-oca:ocpp:uid:2:233362
716#[derive(Debug, Clone, PartialEq)]
717#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
718pub struct CompositeSchedule<
719    const COMPOSITE_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP: usize = 16usize,
720    const COMPOSITE_SCHEDULE_SCHEDULE_START_CAP: usize = 1024usize,
721> {
722    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
723    pub charging_rate_unit: ChargingRateUnitEnum,
724    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
725    pub charging_schedule_period: heapless::Vec<
726        ChargingSchedulePeriod,
727        COMPOSITE_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP,
728    >,
729    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
730    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
731    pub custom_data: Option<CustomData>,
732    /// Duration of the schedule in seconds.
733    pub duration: i64,
734    /// The ID of the EVSE for which the
735    /// schedule is requested. When evseid=0, the
736    /// Charging Station calculated the expected
737    /// consumption for the grid connection.
738    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
739    pub evse_id: i64,
740    /// Composite_ Schedule. Start. Date_ Time
741    /// urn:x-oca:ocpp:uid:1:569456
742    /// Date and time at which the schedule becomes active. All time measurements within the schedule are relative to this timestamp.
743    #[cfg_attr(feature = "serde", serde(rename = "scheduleStart"))]
744    pub schedule_start: heapless::String<COMPOSITE_SCHEDULE_SCHEDULE_START_CAP>,
745}
746/// The Charging Station will indicate if it was
747/// able to process the request
748#[derive(Debug, Clone, PartialEq, Eq)]
749#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
750pub enum GenericStatusEnum {
751    Accepted,
752    Rejected,
753}
754/// If provided the Charging Station shall return Display Messages with the given priority only.
755#[derive(Debug, Clone, PartialEq, Eq)]
756#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
757pub enum MessagePriorityEnum {
758    AlwaysFront,
759    InFront,
760    NormalCycle,
761}
762/// If provided the Charging Station shall return Display Messages with the given state only.
763#[derive(Debug, Clone, PartialEq, Eq)]
764#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
765pub enum MessageStateEnum {
766    Charging,
767    Faulted,
768    Idle,
769    Unavailable,
770}
771/// Indicates if the Charging Station has Display Messages that match the request criteria in the &lt;&lt;getdisplaymessagesrequest,GetDisplayMessagesRequest&gt;&gt;
772#[derive(Debug, Clone, PartialEq, Eq)]
773#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
774pub enum GetDisplayMessagesStatusEnum {
775    Accepted,
776    Unknown,
777}
778#[derive(Debug, Clone, PartialEq, Eq)]
779#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
780pub enum GetCertificateIdUseEnum {
781    V2GRootCertificate,
782    MORootCertificate,
783    CSMSRootCertificate,
784    V2GCertificateChain,
785    ManufacturerRootCertificate,
786}
787#[derive(Debug, Clone, PartialEq, Eq)]
788#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
789pub struct CertificateHashDataChain {
790    #[cfg_attr(feature = "serde", serde(rename = "certificateHashData"))]
791    pub certificate_hash_data: CertificateHashData,
792    #[cfg_attr(feature = "serde", serde(rename = "certificateType"))]
793    pub certificate_type: GetCertificateIdUseEnum,
794    #[cfg_attr(feature = "serde", serde(rename = "childCertificateHashData"))]
795    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
796    pub child_certificate_hash_data: Option<heapless::Vec<CertificateHashData, 4usize>>,
797    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
798    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
799    pub custom_data: Option<CustomData>,
800}
801/// Charging Station indicates if it can process the request.
802#[derive(Debug, Clone, PartialEq, Eq)]
803#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
804pub enum GetInstalledCertificateStatusEnum {
805    Accepted,
806    NotFound,
807}
808#[cfg(feature = "alloc")]
809/// Log
810/// urn:x-enexis:ecdm:uid:2:233373
811/// Generic class for the configuration of logging entries.
812#[derive(Debug, Clone, PartialEq, Eq)]
813#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
814pub struct LogParameters {
815    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
816    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
817    pub custom_data: Option<CustomData>,
818    /// Log. Latest_ Timestamp. Date_ Time
819    /// urn:x-enexis:ecdm:uid:1:569482
820    /// This contains the date and time of the latest logging information to include in the diagnostics.
821    #[cfg_attr(feature = "serde", serde(rename = "latestTimestamp"))]
822    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
823    pub latest_timestamp: Option<alloc::string::String>,
824    /// Log. Oldest_ Timestamp. Date_ Time
825    /// urn:x-enexis:ecdm:uid:1:569477
826    /// This contains the date and time of the oldest logging information to include in the diagnostics.
827    #[cfg_attr(feature = "serde", serde(rename = "oldestTimestamp"))]
828    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
829    pub oldest_timestamp: Option<alloc::string::String>,
830    /// Log. Remote_ Location. URI
831    /// urn:x-enexis:ecdm:uid:1:569484
832    /// The URL of the location at the remote system where the log should be stored.
833    #[cfg_attr(feature = "serde", serde(rename = "remoteLocation"))]
834    pub remote_location: heapless::String<512usize>,
835}
836#[cfg(not(feature = "alloc"))]
837/// Log
838/// urn:x-enexis:ecdm:uid:2:233373
839/// Generic class for the configuration of logging entries.
840#[derive(Debug, Clone, PartialEq, Eq)]
841#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
842pub struct LogParameters<
843    const LOG_PARAMETERS_LATEST_TIMESTAMP_CAP: usize = 1024usize,
844    const LOG_PARAMETERS_OLDEST_TIMESTAMP_CAP: usize = 1024usize,
845> {
846    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
847    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
848    pub custom_data: Option<CustomData>,
849    /// Log. Latest_ Timestamp. Date_ Time
850    /// urn:x-enexis:ecdm:uid:1:569482
851    /// This contains the date and time of the latest logging information to include in the diagnostics.
852    #[cfg_attr(feature = "serde", serde(rename = "latestTimestamp"))]
853    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
854    pub latest_timestamp: Option<heapless::String<LOG_PARAMETERS_LATEST_TIMESTAMP_CAP>>,
855    /// Log. Oldest_ Timestamp. Date_ Time
856    /// urn:x-enexis:ecdm:uid:1:569477
857    /// This contains the date and time of the oldest logging information to include in the diagnostics.
858    #[cfg_attr(feature = "serde", serde(rename = "oldestTimestamp"))]
859    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
860    pub oldest_timestamp: Option<heapless::String<LOG_PARAMETERS_OLDEST_TIMESTAMP_CAP>>,
861    /// Log. Remote_ Location. URI
862    /// urn:x-enexis:ecdm:uid:1:569484
863    /// The URL of the location at the remote system where the log should be stored.
864    #[cfg_attr(feature = "serde", serde(rename = "remoteLocation"))]
865    pub remote_location: heapless::String<512usize>,
866}
867/// This contains the type of log file that the Charging Station
868/// should send.
869#[derive(Debug, Clone, PartialEq, Eq)]
870#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
871pub enum LogEnum {
872    DiagnosticsLog,
873    SecurityLog,
874}
875/// This field indicates whether the Charging Station was able to accept the request.
876#[derive(Debug, Clone, PartialEq, Eq)]
877#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
878pub enum LogStatusEnum {
879    Accepted,
880    Rejected,
881    AcceptedCanceled,
882}
883/// A physical or logical component
884#[derive(Debug, Clone, PartialEq, Eq)]
885#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
886pub struct Component {
887    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
888    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
889    pub custom_data: Option<CustomData>,
890    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
891    pub evse: Option<EVSE>,
892    /// Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
893    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
894    pub instance: Option<heapless::String<50usize>>,
895    /// Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case.
896    pub name: heapless::String<50usize>,
897}
898/// Reference key to a component-variable.
899#[derive(Debug, Clone, PartialEq, Eq)]
900#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
901pub struct Variable {
902    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
903    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
904    pub custom_data: Option<CustomData>,
905    /// Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
906    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
907    pub instance: Option<heapless::String<50usize>>,
908    /// Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case.
909    pub name: heapless::String<50usize>,
910}
911/// Class to report components, variables and variable attributes and characteristics.
912#[derive(Debug, Clone, PartialEq, Eq)]
913#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
914pub struct ComponentVariable {
915    pub component: Component,
916    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
917    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
918    pub custom_data: Option<CustomData>,
919    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
920    pub variable: Option<Variable>,
921}
922#[derive(Debug, Clone, PartialEq, Eq)]
923#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
924pub enum MonitoringCriterionEnum {
925    ThresholdMonitoring,
926    DeltaMonitoring,
927    PeriodicMonitoring,
928}
929#[derive(Debug, Clone, PartialEq, Eq)]
930#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
931pub enum ComponentCriterionEnum {
932    Active,
933    Available,
934    Enabled,
935    Problem,
936}
937/// Attribute type for which value is requested. When absent, default Actual is assumed.
938#[derive(Debug, Clone, PartialEq, Eq)]
939#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
940pub enum AttributeEnum {
941    Actual,
942    Target,
943    MinSet,
944    MaxSet,
945}
946/// Class to hold parameters for GetVariables request.
947#[derive(Debug, Clone, PartialEq, Eq)]
948#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
949pub struct GetVariableData {
950    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
951    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
952    pub attribute_type: Option<AttributeEnum>,
953    pub component: Component,
954    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
955    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
956    pub custom_data: Option<CustomData>,
957    pub variable: Variable,
958}
959/// Result status of getting the variable.
960#[derive(Debug, Clone, PartialEq, Eq)]
961#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
962pub enum GetVariableStatusEnum {
963    Accepted,
964    Rejected,
965    UnknownComponent,
966    UnknownVariable,
967    NotSupportedAttributeType,
968}
969/// Class to hold results of GetVariables request.
970#[derive(Debug, Clone, PartialEq, Eq)]
971#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
972pub struct GetVariableResult {
973    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
974    pub attribute_status: GetVariableStatusEnum,
975    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
976    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
977    pub attribute_status_info: Option<StatusInfo>,
978    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
979    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
980    pub attribute_type: Option<AttributeEnum>,
981    /// Value of requested attribute type of component-variable. This field can only be empty when the given status is NOT accepted.
982    ///
983    /// The Configuration Variable &lt;&lt;configkey-reporting-value-size,ReportingValueSize&gt;&gt; can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal.
984    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
985    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
986    pub attribute_value: Option<heapless::String<2500usize>>,
987    pub component: Component,
988    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
989    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
990    pub custom_data: Option<CustomData>,
991    pub variable: Variable,
992}
993/// Indicates the certificate type that is sent.
994#[derive(Debug, Clone, PartialEq, Eq)]
995#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
996pub enum InstallCertificateUseEnum {
997    V2GRootCertificate,
998    MORootCertificate,
999    CSMSRootCertificate,
1000    ManufacturerRootCertificate,
1001}
1002/// Charging Station indicates if installation was successful.
1003#[derive(Debug, Clone, PartialEq, Eq)]
1004#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1005pub enum InstallCertificateStatusEnum {
1006    Accepted,
1007    Rejected,
1008    Failed,
1009}
1010/// This contains the status of the log upload.
1011#[derive(Debug, Clone, PartialEq, Eq)]
1012#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1013pub enum UploadLogStatusEnum {
1014    BadMessage,
1015    Idle,
1016    NotSupportedOperation,
1017    PermissionDenied,
1018    Uploaded,
1019    UploadFailure,
1020    Uploading,
1021    AcceptedCanceled,
1022}
1023/// Sampled_ Value. Context. Reading_ Context_ Code
1024/// urn:x-oca:ocpp:uid:1:569261
1025/// Type of detail value: start, end or sample. Default = "Sample.Periodic"
1026#[derive(Debug, Clone, PartialEq, Eq)]
1027#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1028pub enum ReadingContextEnum {
1029    #[cfg_attr(feature = "serde", serde(rename = "Interruption.Begin"))]
1030    InterruptionBegin,
1031    #[cfg_attr(feature = "serde", serde(rename = "Interruption.End"))]
1032    InterruptionEnd,
1033    Other,
1034    #[cfg_attr(feature = "serde", serde(rename = "Sample.Clock"))]
1035    SampleClock,
1036    #[cfg_attr(feature = "serde", serde(rename = "Sample.Periodic"))]
1037    SamplePeriodic,
1038    #[cfg_attr(feature = "serde", serde(rename = "Transaction.Begin"))]
1039    TransactionBegin,
1040    #[cfg_attr(feature = "serde", serde(rename = "Transaction.End"))]
1041    TransactionEnd,
1042    Trigger,
1043}
1044/// Sampled_ Value. Location. Location_ Code
1045/// urn:x-oca:ocpp:uid:1:569265
1046/// Indicates where the measured value has been sampled. Default =  "Outlet"
1047#[derive(Debug, Clone, PartialEq, Eq)]
1048#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1049pub enum LocationEnum {
1050    Body,
1051    Cable,
1052    EV,
1053    Inlet,
1054    Outlet,
1055}
1056/// Sampled_ Value. Measurand. Measurand_ Code
1057/// urn:x-oca:ocpp:uid:1:569263
1058/// Type of measurement. Default = "Energy.Active.Import.Register"
1059#[derive(Debug, Clone, PartialEq, Eq)]
1060#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1061pub enum MeasurandEnum {
1062    #[cfg_attr(feature = "serde", serde(rename = "Current.Export"))]
1063    CurrentExport,
1064    #[cfg_attr(feature = "serde", serde(rename = "Current.Import"))]
1065    CurrentImport,
1066    #[cfg_attr(feature = "serde", serde(rename = "Current.Offered"))]
1067    CurrentOffered,
1068    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Export.Register"))]
1069    EnergyActiveExportRegister,
1070    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Import.Register"))]
1071    EnergyActiveImportRegister,
1072    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Export.Register"))]
1073    EnergyReactiveExportRegister,
1074    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Import.Register"))]
1075    EnergyReactiveImportRegister,
1076    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Export.Interval"))]
1077    EnergyActiveExportInterval,
1078    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Import.Interval"))]
1079    EnergyActiveImportInterval,
1080    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Net"))]
1081    EnergyActiveNet,
1082    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Export.Interval"))]
1083    EnergyReactiveExportInterval,
1084    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Import.Interval"))]
1085    EnergyReactiveImportInterval,
1086    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Net"))]
1087    EnergyReactiveNet,
1088    #[cfg_attr(feature = "serde", serde(rename = "Energy.Apparent.Net"))]
1089    EnergyApparentNet,
1090    #[cfg_attr(feature = "serde", serde(rename = "Energy.Apparent.Import"))]
1091    EnergyApparentImport,
1092    #[cfg_attr(feature = "serde", serde(rename = "Energy.Apparent.Export"))]
1093    EnergyApparentExport,
1094    Frequency,
1095    #[cfg_attr(feature = "serde", serde(rename = "Power.Active.Export"))]
1096    PowerActiveExport,
1097    #[cfg_attr(feature = "serde", serde(rename = "Power.Active.Import"))]
1098    PowerActiveImport,
1099    #[cfg_attr(feature = "serde", serde(rename = "Power.Factor"))]
1100    PowerFactor,
1101    #[cfg_attr(feature = "serde", serde(rename = "Power.Offered"))]
1102    PowerOffered,
1103    #[cfg_attr(feature = "serde", serde(rename = "Power.Reactive.Export"))]
1104    PowerReactiveExport,
1105    #[cfg_attr(feature = "serde", serde(rename = "Power.Reactive.Import"))]
1106    PowerReactiveImport,
1107    SoC,
1108    Voltage,
1109}
1110/// Sampled_ Value. Phase. Phase_ Code
1111/// urn:x-oca:ocpp:uid:1:569264
1112/// Indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value.
1113#[derive(Debug, Clone, PartialEq, Eq)]
1114#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1115pub enum PhaseEnum {
1116    L1,
1117    L2,
1118    L3,
1119    N,
1120    #[cfg_attr(feature = "serde", serde(rename = "L1-N"))]
1121    L1N,
1122    #[cfg_attr(feature = "serde", serde(rename = "L2-N"))]
1123    L2N,
1124    #[cfg_attr(feature = "serde", serde(rename = "L3-N"))]
1125    L3N,
1126    #[cfg_attr(feature = "serde", serde(rename = "L1-L2"))]
1127    L1L2,
1128    #[cfg_attr(feature = "serde", serde(rename = "L2-L3"))]
1129    L2L3,
1130    #[cfg_attr(feature = "serde", serde(rename = "L3-L1"))]
1131    L3L1,
1132}
1133/// Represent a signed version of the meter value.
1134#[derive(Debug, Clone, PartialEq, Eq)]
1135#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1136pub struct SignedMeterValue {
1137    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1138    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1139    pub custom_data: Option<CustomData>,
1140    /// Method used to encode the meter values before applying the digital signature algorithm.
1141    #[cfg_attr(feature = "serde", serde(rename = "encodingMethod"))]
1142    pub encoding_method: heapless::String<50usize>,
1143    /// Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_.
1144    #[cfg_attr(feature = "serde", serde(rename = "publicKey"))]
1145    pub public_key: heapless::String<2500usize>,
1146    /// Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.
1147    #[cfg_attr(feature = "serde", serde(rename = "signedMeterData"))]
1148    pub signed_meter_data: heapless::String<2500usize>,
1149    /// Method used to create the digital signature.
1150    #[cfg_attr(feature = "serde", serde(rename = "signingMethod"))]
1151    pub signing_method: heapless::String<50usize>,
1152}
1153/// Represents a UnitOfMeasure with a multiplier
1154#[derive(Debug, Clone, PartialEq, Eq)]
1155#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1156pub struct UnitOfMeasure {
1157    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1158    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1159    pub custom_data: Option<CustomData>,
1160    /// Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0.
1161    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1162    pub multiplier: Option<i64>,
1163    /// Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type.
1164    /// This field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices.
1165    /// If an applicable unit is available in that list, otherwise a "custom" unit might be used.
1166    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1167    pub unit: Option<heapless::String<20usize>>,
1168}
1169/// Sampled_ Value
1170/// urn:x-oca:ocpp:uid:2:233266
1171/// Single sampled value in MeterValues. Each value can be accompanied by optional fields.
1172///
1173/// To save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units.
1174#[derive(Debug, Clone, PartialEq)]
1175#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1176pub struct SampledValue {
1177    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1178    pub context: Option<ReadingContextEnum>,
1179    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1180    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1181    pub custom_data: Option<CustomData>,
1182    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1183    pub location: Option<LocationEnum>,
1184    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1185    pub measurand: Option<MeasurandEnum>,
1186    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1187    pub phase: Option<PhaseEnum>,
1188    #[cfg_attr(feature = "serde", serde(rename = "signedMeterValue"))]
1189    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1190    pub signed_meter_value: Option<SignedMeterValue>,
1191    #[cfg_attr(feature = "serde", serde(rename = "unitOfMeasure"))]
1192    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1193    pub unit_of_measure: Option<UnitOfMeasure>,
1194    /// Sampled_ Value. Value. Measure
1195    /// urn:x-oca:ocpp:uid:1:569260
1196    /// Indicates the measured value.
1197    pub value: f64,
1198}
1199#[cfg(feature = "alloc")]
1200/// Meter_ Value
1201/// urn:x-oca:ocpp:uid:2:233265
1202/// Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time.
1203#[derive(Debug, Clone, PartialEq)]
1204#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1205pub struct MeterValue {
1206    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1207    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1208    pub custom_data: Option<CustomData>,
1209    #[cfg_attr(feature = "serde", serde(rename = "sampledValue"))]
1210    pub sampled_value: alloc::vec::Vec<SampledValue>,
1211    /// Meter_ Value. Timestamp. Date_ Time
1212    /// urn:x-oca:ocpp:uid:1:569259
1213    /// Timestamp for measured value(s).
1214    pub timestamp: alloc::string::String,
1215}
1216#[cfg(not(feature = "alloc"))]
1217/// Meter_ Value
1218/// urn:x-oca:ocpp:uid:2:233265
1219/// Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time.
1220#[derive(Debug, Clone, PartialEq)]
1221#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1222pub struct MeterValue<
1223    const METER_VALUE_SAMPLED_VALUE_CAP: usize = 16usize,
1224    const METER_VALUE_TIMESTAMP_CAP: usize = 1024usize,
1225> {
1226    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1227    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1228    pub custom_data: Option<CustomData>,
1229    #[cfg_attr(feature = "serde", serde(rename = "sampledValue"))]
1230    pub sampled_value: heapless::Vec<SampledValue, METER_VALUE_SAMPLED_VALUE_CAP>,
1231    /// Meter_ Value. Timestamp. Date_ Time
1232    /// urn:x-oca:ocpp:uid:1:569259
1233    /// Timestamp for measured value(s).
1234    pub timestamp: heapless::String<METER_VALUE_TIMESTAMP_CAP>,
1235}
1236/// Charging_ Limit
1237/// urn:x-enexis:ecdm:uid:2:234489
1238#[derive(Debug, Clone, PartialEq, Eq)]
1239#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1240pub struct ChargingLimit {
1241    #[cfg_attr(feature = "serde", serde(rename = "chargingLimitSource"))]
1242    pub charging_limit_source: ChargingLimitSourceEnum,
1243    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1244    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1245    pub custom_data: Option<CustomData>,
1246    /// Charging_ Limit. Is_ Grid_ Critical. Indicator
1247    /// urn:x-enexis:ecdm:uid:1:570847
1248    /// Indicates whether the charging limit is critical for the grid.
1249    #[cfg_attr(feature = "serde", serde(rename = "isGridCritical"))]
1250    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1251    pub is_grid_critical: Option<bool>,
1252}
1253/// Cost. Cost_ Kind. Cost_ Kind_ Code
1254/// urn:x-oca:ocpp:uid:1:569243
1255/// The kind of cost referred to in the message element amount
1256#[derive(Debug, Clone, PartialEq, Eq)]
1257#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1258pub enum CostKindEnum {
1259    CarbonDioxideEmission,
1260    RelativePricePercentage,
1261    RenewableGenerationPercentage,
1262}
1263/// Cost
1264/// urn:x-oca:ocpp:uid:2:233258
1265#[derive(Debug, Clone, PartialEq, Eq)]
1266#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1267pub struct Cost {
1268    /// Cost. Amount. Amount
1269    /// urn:x-oca:ocpp:uid:1:569244
1270    /// The estimated or actual cost per kWh
1271    pub amount: i64,
1272    /// Cost. Amount_ Multiplier. Integer
1273    /// urn:x-oca:ocpp:uid:1:569245
1274    /// Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier
1275    #[cfg_attr(feature = "serde", serde(rename = "amountMultiplier"))]
1276    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1277    pub amount_multiplier: Option<i64>,
1278    #[cfg_attr(feature = "serde", serde(rename = "costKind"))]
1279    pub cost_kind: CostKindEnum,
1280    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1281    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1282    pub custom_data: Option<CustomData>,
1283}
1284/// Consumption_ Cost
1285/// urn:x-oca:ocpp:uid:2:233259
1286#[derive(Debug, Clone, PartialEq)]
1287#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1288pub struct ConsumptionCost {
1289    pub cost: heapless::Vec<Cost, 3usize>,
1290    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1291    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1292    pub custom_data: Option<CustomData>,
1293    /// Consumption_ Cost. Start_ Value. Numeric
1294    /// urn:x-oca:ocpp:uid:1:569246
1295    /// The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval.
1296    #[cfg_attr(feature = "serde", serde(rename = "startValue"))]
1297    pub start_value: f64,
1298}
1299/// Relative_ Timer_ Interval
1300/// urn:x-oca:ocpp:uid:2:233270
1301#[derive(Debug, Clone, PartialEq, Eq)]
1302#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1303pub struct RelativeTimeInterval {
1304    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1305    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1306    pub custom_data: Option<CustomData>,
1307    /// Relative_ Timer_ Interval. Duration. Elapsed_ Time
1308    /// urn:x-oca:ocpp:uid:1:569280
1309    /// Duration of the interval, in seconds.
1310    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1311    pub duration: Option<i64>,
1312    /// Relative_ Timer_ Interval. Start. Elapsed_ Time
1313    /// urn:x-oca:ocpp:uid:1:569279
1314    /// Start of the interval, in seconds from NOW.
1315    pub start: i64,
1316}
1317/// Sales_ Tariff_ Entry
1318/// urn:x-oca:ocpp:uid:2:233271
1319#[derive(Debug, Clone, PartialEq)]
1320#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1321pub struct SalesTariffEntry {
1322    #[cfg_attr(feature = "serde", serde(rename = "consumptionCost"))]
1323    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1324    pub consumption_cost: Option<heapless::Vec<ConsumptionCost, 3usize>>,
1325    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1326    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1327    pub custom_data: Option<CustomData>,
1328    /// Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer
1329    /// urn:x-oca:ocpp:uid:1:569281
1330    /// Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry.
1331    #[cfg_attr(feature = "serde", serde(rename = "ePriceLevel"))]
1332    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1333    pub e_price_level: Option<i64>,
1334    #[cfg_attr(feature = "serde", serde(rename = "relativeTimeInterval"))]
1335    pub relative_time_interval: RelativeTimeInterval,
1336}
1337#[cfg(feature = "alloc")]
1338/// Sales_ Tariff
1339/// urn:x-oca:ocpp:uid:2:233272
1340/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
1341#[derive(Debug, Clone, PartialEq)]
1342#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1343pub struct SalesTariff {
1344    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1345    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1346    pub custom_data: Option<CustomData>,
1347    /// Identified_ Object. MRID. Numeric_ Identifier
1348    /// urn:x-enexis:ecdm:uid:1:569198
1349    /// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
1350    pub id: i64,
1351    /// Sales_ Tariff. Num_ E_ Price_ Levels. Counter
1352    /// urn:x-oca:ocpp:uid:1:569284
1353    /// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
1354    #[cfg_attr(feature = "serde", serde(rename = "numEPriceLevels"))]
1355    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1356    pub num_e_price_levels: Option<i64>,
1357    /// Sales_ Tariff. Sales. Tariff_ Description
1358    /// urn:x-oca:ocpp:uid:1:569283
1359    /// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
1360    #[cfg_attr(feature = "serde", serde(rename = "salesTariffDescription"))]
1361    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1362    pub sales_tariff_description: Option<heapless::String<32usize>>,
1363    #[cfg_attr(feature = "serde", serde(rename = "salesTariffEntry"))]
1364    pub sales_tariff_entry: alloc::vec::Vec<SalesTariffEntry>,
1365}
1366#[cfg(not(feature = "alloc"))]
1367/// Sales_ Tariff
1368/// urn:x-oca:ocpp:uid:2:233272
1369/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
1370#[derive(Debug, Clone, PartialEq)]
1371#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1372pub struct SalesTariff {
1373    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1374    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1375    pub custom_data: Option<CustomData>,
1376    /// Identified_ Object. MRID. Numeric_ Identifier
1377    /// urn:x-enexis:ecdm:uid:1:569198
1378    /// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
1379    pub id: i64,
1380    /// Sales_ Tariff. Num_ E_ Price_ Levels. Counter
1381    /// urn:x-oca:ocpp:uid:1:569284
1382    /// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
1383    #[cfg_attr(feature = "serde", serde(rename = "numEPriceLevels"))]
1384    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1385    pub num_e_price_levels: Option<i64>,
1386    /// Sales_ Tariff. Sales. Tariff_ Description
1387    /// urn:x-oca:ocpp:uid:1:569283
1388    /// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
1389    #[cfg_attr(feature = "serde", serde(rename = "salesTariffDescription"))]
1390    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1391    pub sales_tariff_description: Option<heapless::String<32usize>>,
1392    #[cfg_attr(feature = "serde", serde(rename = "salesTariffEntry"))]
1393    pub sales_tariff_entry: heapless::Vec<SalesTariffEntry, 1024usize>,
1394}
1395#[cfg(feature = "alloc")]
1396/// Charging_ Schedule
1397/// urn:x-oca:ocpp:uid:2:233256
1398/// Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile.
1399#[derive(Debug, Clone, PartialEq)]
1400#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1401pub struct ChargingSchedule {
1402    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
1403    pub charging_rate_unit: ChargingRateUnitEnum,
1404    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
1405    pub charging_schedule_period: alloc::vec::Vec<ChargingSchedulePeriod>,
1406    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1407    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1408    pub custom_data: Option<CustomData>,
1409    /// Charging_ Schedule. Duration. Elapsed_ Time
1410    /// urn:x-oca:ocpp:uid:1:569236
1411    /// Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile.
1412    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1413    pub duration: Option<i64>,
1414    /// Identifies the ChargingSchedule.
1415    pub id: i64,
1416    /// Charging_ Schedule. Min_ Charging_ Rate. Numeric
1417    /// urn:x-oca:ocpp:uid:1:569239
1418    /// Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1)
1419    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
1420    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1421    pub min_charging_rate: Option<f64>,
1422    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
1423    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1424    pub sales_tariff: Option<SalesTariff>,
1425    /// Charging_ Schedule. Start_ Schedule. Date_ Time
1426    /// urn:x-oca:ocpp:uid:1:569237
1427    /// Starting point of an absolute schedule. If absent the schedule will be relative to start of charging.
1428    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
1429    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1430    pub start_schedule: Option<alloc::string::String>,
1431}
1432#[cfg(not(feature = "alloc"))]
1433/// Charging_ Schedule
1434/// urn:x-oca:ocpp:uid:2:233256
1435/// Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile.
1436#[derive(Debug, Clone, PartialEq)]
1437#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1438pub struct ChargingSchedule<
1439    const CHARGING_SCHEDULE_START_SCHEDULE_CAP: usize = 1024usize,
1440> {
1441    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
1442    pub charging_rate_unit: ChargingRateUnitEnum,
1443    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
1444    pub charging_schedule_period: heapless::Vec<ChargingSchedulePeriod, 1024usize>,
1445    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1446    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1447    pub custom_data: Option<CustomData>,
1448    /// Charging_ Schedule. Duration. Elapsed_ Time
1449    /// urn:x-oca:ocpp:uid:1:569236
1450    /// Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile.
1451    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1452    pub duration: Option<i64>,
1453    /// Identifies the ChargingSchedule.
1454    pub id: i64,
1455    /// Charging_ Schedule. Min_ Charging_ Rate. Numeric
1456    /// urn:x-oca:ocpp:uid:1:569239
1457    /// Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1)
1458    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
1459    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1460    pub min_charging_rate: Option<f64>,
1461    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
1462    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1463    pub sales_tariff: Option<SalesTariff>,
1464    /// Charging_ Schedule. Start_ Schedule. Date_ Time
1465    /// urn:x-oca:ocpp:uid:1:569237
1466    /// Starting point of an absolute schedule. If absent the schedule will be relative to start of charging.
1467    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
1468    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1469    pub start_schedule: Option<heapless::String<CHARGING_SCHEDULE_START_SCHEDULE_CAP>>,
1470}
1471#[cfg(feature = "alloc")]
1472/// Message_ Info
1473/// urn:x-enexis:ecdm:uid:2:233264
1474/// Contains message details, for a message to be displayed on a Charging Station.
1475#[derive(Debug, Clone, PartialEq, Eq)]
1476#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1477pub struct MessageInfo {
1478    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1479    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1480    pub custom_data: Option<CustomData>,
1481    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1482    pub display: Option<Component>,
1483    /// Message_ Info. End. Date_ Time
1484    /// urn:x-enexis:ecdm:uid:1:569257
1485    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
1486    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
1487    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1488    pub end_date_time: Option<alloc::string::String>,
1489    /// Identified_ Object. MRID. Numeric_ Identifier
1490    /// urn:x-enexis:ecdm:uid:1:569198
1491    /// Master resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
1492    pub id: i64,
1493    pub message: MessageContent,
1494    pub priority: MessagePriorityEnum,
1495    /// Message_ Info. Start. Date_ Time
1496    /// urn:x-enexis:ecdm:uid:1:569256
1497    /// From what date-time should this message be shown. If omitted: directly.
1498    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
1499    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1500    pub start_date_time: Option<alloc::string::String>,
1501    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1502    pub state: Option<MessageStateEnum>,
1503    /// During which transaction shall this message be shown.
1504    /// Message SHALL be removed by the Charging Station after transaction has
1505    /// ended.
1506    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1507    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1508    pub transaction_id: Option<heapless::String<36usize>>,
1509}
1510#[cfg(not(feature = "alloc"))]
1511/// Message_ Info
1512/// urn:x-enexis:ecdm:uid:2:233264
1513/// Contains message details, for a message to be displayed on a Charging Station.
1514#[derive(Debug, Clone, PartialEq, Eq)]
1515#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1516pub struct MessageInfo<
1517    const MESSAGE_INFO_END_DATE_TIME_CAP: usize = 1024usize,
1518    const MESSAGE_INFO_START_DATE_TIME_CAP: usize = 1024usize,
1519> {
1520    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1521    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1522    pub custom_data: Option<CustomData>,
1523    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1524    pub display: Option<Component>,
1525    /// Message_ Info. End. Date_ Time
1526    /// urn:x-enexis:ecdm:uid:1:569257
1527    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
1528    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
1529    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1530    pub end_date_time: Option<heapless::String<MESSAGE_INFO_END_DATE_TIME_CAP>>,
1531    /// Identified_ Object. MRID. Numeric_ Identifier
1532    /// urn:x-enexis:ecdm:uid:1:569198
1533    /// Master resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
1534    pub id: i64,
1535    pub message: MessageContent,
1536    pub priority: MessagePriorityEnum,
1537    /// Message_ Info. Start. Date_ Time
1538    /// urn:x-enexis:ecdm:uid:1:569256
1539    /// From what date-time should this message be shown. If omitted: directly.
1540    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
1541    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1542    pub start_date_time: Option<heapless::String<MESSAGE_INFO_START_DATE_TIME_CAP>>,
1543    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1544    pub state: Option<MessageStateEnum>,
1545    /// During which transaction shall this message be shown.
1546    /// Message SHALL be removed by the Charging Station after transaction has
1547    /// ended.
1548    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1549    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1550    pub transaction_id: Option<heapless::String<36usize>>,
1551}
1552/// AC_ Charging_ Parameters
1553/// urn:x-oca:ocpp:uid:2:233250
1554/// EV AC charging parameters.
1555#[derive(Debug, Clone, PartialEq, Eq)]
1556#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1557pub struct ACChargingParameters {
1558    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1559    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1560    pub custom_data: Option<CustomData>,
1561    /// AC_ Charging_ Parameters. Energy_ Amount. Energy_ Amount
1562    /// urn:x-oca:ocpp:uid:1:569211
1563    /// Amount of energy requested (in Wh). This includes energy required for preconditioning.
1564    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
1565    pub energy_amount: i64,
1566    /// AC_ Charging_ Parameters. EV_ Max. Current
1567    /// urn:x-oca:ocpp:uid:1:569213
1568    /// Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity.
1569    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
1570    pub ev_max_current: i64,
1571    /// AC_ Charging_ Parameters. EV_ Max. Voltage
1572    /// urn:x-oca:ocpp:uid:1:569214
1573    /// Maximum voltage supported by the electric vehicle
1574    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
1575    pub ev_max_voltage: i64,
1576    /// AC_ Charging_ Parameters. EV_ Min. Current
1577    /// urn:x-oca:ocpp:uid:1:569212
1578    /// Minimum current (amps) supported by the electric vehicle (per phase).
1579    #[cfg_attr(feature = "serde", serde(rename = "evMinCurrent"))]
1580    pub ev_min_current: i64,
1581}
1582/// DC_ Charging_ Parameters
1583/// urn:x-oca:ocpp:uid:2:233251
1584/// EV DC charging parameters
1585#[derive(Debug, Clone, PartialEq, Eq)]
1586#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1587pub struct DCChargingParameters {
1588    /// DC_ Charging_ Parameters. Bulk_ SOC. Percentage
1589    /// urn:x-oca:ocpp:uid:1:569222
1590    /// Percentage of SoC at which the EV considers a fast charging process to end. (possible values: 0 - 100)
1591    #[cfg_attr(feature = "serde", serde(rename = "bulkSoC"))]
1592    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1593    pub bulk_so_c: Option<i64>,
1594    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1595    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1596    pub custom_data: Option<CustomData>,
1597    /// DC_ Charging_ Parameters. Energy_ Amount. Energy_ Amount
1598    /// urn:x-oca:ocpp:uid:1:569217
1599    /// Amount of energy requested (in Wh). This inludes energy required for preconditioning.
1600    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
1601    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1602    pub energy_amount: Option<i64>,
1603    /// DC_ Charging_ Parameters. EV_ Energy_ Capacity. Numeric
1604    /// urn:x-oca:ocpp:uid:1:569220
1605    /// Capacity of the electric vehicle battery (in Wh)
1606    #[cfg_attr(feature = "serde", serde(rename = "evEnergyCapacity"))]
1607    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1608    pub ev_energy_capacity: Option<i64>,
1609    /// DC_ Charging_ Parameters. EV_ Max. Current
1610    /// urn:x-oca:ocpp:uid:1:569215
1611    /// Maximum current (amps) supported by the electric vehicle. Includes cable capacity.
1612    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
1613    pub ev_max_current: i64,
1614    /// DC_ Charging_ Parameters. EV_ Max. Power
1615    /// urn:x-oca:ocpp:uid:1:569218
1616    /// Maximum power (in W) supported by the electric vehicle. Required for DC charging.
1617    #[cfg_attr(feature = "serde", serde(rename = "evMaxPower"))]
1618    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1619    pub ev_max_power: Option<i64>,
1620    /// DC_ Charging_ Parameters. EV_ Max. Voltage
1621    /// urn:x-oca:ocpp:uid:1:569216
1622    /// Maximum voltage supported by the electric vehicle
1623    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
1624    pub ev_max_voltage: i64,
1625    /// DC_ Charging_ Parameters. Full_ SOC. Percentage
1626    /// urn:x-oca:ocpp:uid:1:569221
1627    /// Percentage of SoC at which the EV considers the battery fully charged. (possible values: 0 - 100)
1628    #[cfg_attr(feature = "serde", serde(rename = "fullSoC"))]
1629    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1630    pub full_so_c: Option<i64>,
1631    /// DC_ Charging_ Parameters. State_ Of_ Charge. Numeric
1632    /// urn:x-oca:ocpp:uid:1:569219
1633    /// Energy available in the battery (in percent of the battery capacity)
1634    #[cfg_attr(feature = "serde", serde(rename = "stateOfCharge"))]
1635    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1636    pub state_of_charge: Option<i64>,
1637}
1638/// Charging_ Needs. Requested. Energy_ Transfer_ Mode_ Code
1639/// urn:x-oca:ocpp:uid:1:569209
1640/// Mode of energy transfer requested by the EV.
1641#[derive(Debug, Clone, PartialEq, Eq)]
1642#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1643pub enum EnergyTransferModeEnum {
1644    DC,
1645    #[cfg_attr(feature = "serde", serde(rename = "AC_single_phase"))]
1646    ACsinglephase,
1647    #[cfg_attr(feature = "serde", serde(rename = "AC_two_phase"))]
1648    ACtwophase,
1649    #[cfg_attr(feature = "serde", serde(rename = "AC_three_phase"))]
1650    ACthreephase,
1651}
1652#[cfg(feature = "alloc")]
1653/// Charging_ Needs
1654/// urn:x-oca:ocpp:uid:2:233249
1655#[derive(Debug, Clone, PartialEq, Eq)]
1656#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1657pub struct ChargingNeeds {
1658    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
1659    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1660    pub ac_charging_parameters: Option<ACChargingParameters>,
1661    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1662    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1663    pub custom_data: Option<CustomData>,
1664    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
1665    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1666    pub dc_charging_parameters: Option<DCChargingParameters>,
1667    /// Charging_ Needs. Departure_ Time. Date_ Time
1668    /// urn:x-oca:ocpp:uid:1:569223
1669    /// Estimated departure time of the EV.
1670    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
1671    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1672    pub departure_time: Option<alloc::string::String>,
1673    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
1674    pub requested_energy_transfer: EnergyTransferModeEnum,
1675}
1676#[cfg(not(feature = "alloc"))]
1677/// Charging_ Needs
1678/// urn:x-oca:ocpp:uid:2:233249
1679#[derive(Debug, Clone, PartialEq, Eq)]
1680#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1681pub struct ChargingNeeds<const CHARGING_NEEDS_DEPARTURE_TIME_CAP: usize = 1024usize> {
1682    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
1683    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1684    pub ac_charging_parameters: Option<ACChargingParameters>,
1685    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1686    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1687    pub custom_data: Option<CustomData>,
1688    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
1689    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1690    pub dc_charging_parameters: Option<DCChargingParameters>,
1691    /// Charging_ Needs. Departure_ Time. Date_ Time
1692    /// urn:x-oca:ocpp:uid:1:569223
1693    /// Estimated departure time of the EV.
1694    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
1695    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1696    pub departure_time: Option<heapless::String<CHARGING_NEEDS_DEPARTURE_TIME_CAP>>,
1697    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
1698    pub requested_energy_transfer: EnergyTransferModeEnum,
1699}
1700/// Returns whether the CSMS has been able to process the message successfully. It does not imply that the evChargingNeeds can be met with the current charging profile.
1701#[derive(Debug, Clone, PartialEq, Eq)]
1702#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1703pub enum NotifyEVChargingNeedsStatusEnum {
1704    Accepted,
1705    Rejected,
1706    Processing,
1707}
1708/// Specifies the event notification type of the message.
1709#[derive(Debug, Clone, PartialEq, Eq)]
1710#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1711pub enum EventNotificationEnum {
1712    HardWiredNotification,
1713    HardWiredMonitor,
1714    PreconfiguredMonitor,
1715    CustomMonitor,
1716}
1717/// Type of monitor that triggered this event, e.g. exceeding a threshold value.
1718#[derive(Debug, Clone, PartialEq, Eq)]
1719#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1720pub enum EventTriggerEnum {
1721    Alerting,
1722    Delta,
1723    Periodic,
1724}
1725#[cfg(feature = "alloc")]
1726/// Class to report an event notification for a component-variable.
1727#[derive(Debug, Clone, PartialEq, Eq)]
1728#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1729pub struct EventData {
1730    /// Actual value (_attributeType_ Actual) of the variable.
1731    ///
1732    /// The Configuration Variable &lt;&lt;configkey-reporting-value-size,ReportingValueSize&gt;&gt; can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal.
1733    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
1734    pub actual_value: heapless::String<2500usize>,
1735    /// Refers to the Id of an event that is considered to be the cause for this event.
1736    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1737    pub cause: Option<i64>,
1738    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
1739    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1740    pub cleared: Option<bool>,
1741    pub component: Component,
1742    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1743    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1744    pub custom_data: Option<CustomData>,
1745    /// Identifies the event. This field can be referred to as a cause by other events.
1746    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
1747    pub event_id: i64,
1748    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
1749    pub event_notification_type: EventNotificationEnum,
1750    /// Technical (error) code as reported by component.
1751    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
1752    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1753    pub tech_code: Option<heapless::String<50usize>>,
1754    /// Technical detail information as reported by component.
1755    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
1756    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1757    pub tech_info: Option<heapless::String<500usize>>,
1758    /// Timestamp of the moment the report was generated.
1759    pub timestamp: alloc::string::String,
1760    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
1761    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1762    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1763    pub transaction_id: Option<heapless::String<36usize>>,
1764    pub trigger: EventTriggerEnum,
1765    pub variable: Variable,
1766    /// Identifies the VariableMonitoring which triggered the event.
1767    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
1768    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1769    pub variable_monitoring_id: Option<i64>,
1770}
1771#[cfg(not(feature = "alloc"))]
1772/// Class to report an event notification for a component-variable.
1773#[derive(Debug, Clone, PartialEq, Eq)]
1774#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1775pub struct EventData<const EVENT_DATA_TIMESTAMP_CAP: usize = 1024usize> {
1776    /// Actual value (_attributeType_ Actual) of the variable.
1777    ///
1778    /// The Configuration Variable &lt;&lt;configkey-reporting-value-size,ReportingValueSize&gt;&gt; can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal.
1779    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
1780    pub actual_value: heapless::String<2500usize>,
1781    /// Refers to the Id of an event that is considered to be the cause for this event.
1782    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1783    pub cause: Option<i64>,
1784    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
1785    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1786    pub cleared: Option<bool>,
1787    pub component: Component,
1788    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1789    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1790    pub custom_data: Option<CustomData>,
1791    /// Identifies the event. This field can be referred to as a cause by other events.
1792    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
1793    pub event_id: i64,
1794    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
1795    pub event_notification_type: EventNotificationEnum,
1796    /// Technical (error) code as reported by component.
1797    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
1798    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1799    pub tech_code: Option<heapless::String<50usize>>,
1800    /// Technical detail information as reported by component.
1801    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
1802    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1803    pub tech_info: Option<heapless::String<500usize>>,
1804    /// Timestamp of the moment the report was generated.
1805    pub timestamp: heapless::String<EVENT_DATA_TIMESTAMP_CAP>,
1806    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
1807    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1808    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1809    pub transaction_id: Option<heapless::String<36usize>>,
1810    pub trigger: EventTriggerEnum,
1811    pub variable: Variable,
1812    /// Identifies the VariableMonitoring which triggered the event.
1813    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
1814    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1815    pub variable_monitoring_id: Option<i64>,
1816}
1817/// The type of this monitor, e.g. a threshold, delta or periodic monitor.
1818#[derive(Debug, Clone, PartialEq, Eq)]
1819#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1820pub enum MonitorEnum {
1821    UpperThreshold,
1822    LowerThreshold,
1823    Delta,
1824    Periodic,
1825    PeriodicClockAligned,
1826}
1827/// A monitoring setting for a variable.
1828#[derive(Debug, Clone, PartialEq)]
1829#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1830pub struct VariableMonitoring {
1831    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1832    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1833    pub custom_data: Option<CustomData>,
1834    /// Identifies the monitor.
1835    pub id: i64,
1836    /// The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level.
1837    ///
1838    /// The severity levels have the following meaning: +
1839    /// *0-Danger* +
1840    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
1841    /// *1-Hardware Failure* +
1842    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
1843    /// *2-System Failure* +
1844    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
1845    /// *3-Critical* +
1846    /// Indicates a critical error. Action is required. +
1847    /// *4-Error* +
1848    /// Indicates a non-urgent error. Action is required. +
1849    /// *5-Alert* +
1850    /// Indicates an alert event. Default severity for any type of monitoring event.  +
1851    /// *6-Warning* +
1852    /// Indicates a warning event. Action may be required. +
1853    /// *7-Notice* +
1854    /// Indicates an unusual event. No immediate action is required. +
1855    /// *8-Informational* +
1856    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
1857    /// *9-Debug* +
1858    /// Indicates information useful to developers for debugging, not useful during operations.
1859    pub severity: i64,
1860    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction.
1861    pub transaction: bool,
1862    pub r#type: MonitorEnum,
1863    /// Value for threshold or delta monitoring.
1864    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
1865    pub value: f64,
1866}
1867#[cfg(feature = "alloc")]
1868/// Class to hold parameters of SetVariableMonitoring request.
1869#[derive(Debug, Clone, PartialEq)]
1870#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1871pub struct MonitoringData {
1872    pub component: Component,
1873    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1874    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1875    pub custom_data: Option<CustomData>,
1876    pub variable: Variable,
1877    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
1878    pub variable_monitoring: alloc::vec::Vec<VariableMonitoring>,
1879}
1880#[cfg(not(feature = "alloc"))]
1881/// Class to hold parameters of SetVariableMonitoring request.
1882#[derive(Debug, Clone, PartialEq)]
1883#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1884pub struct MonitoringData<
1885    const MONITORING_DATA_VARIABLE_MONITORING_CAP: usize = 16usize,
1886> {
1887    pub component: Component,
1888    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1889    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1890    pub custom_data: Option<CustomData>,
1891    pub variable: Variable,
1892    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
1893    pub variable_monitoring: heapless::Vec<
1894        VariableMonitoring,
1895        MONITORING_DATA_VARIABLE_MONITORING_CAP,
1896    >,
1897}
1898/// Defines the mutability of this attribute. Default is ReadWrite when omitted.
1899#[derive(Debug, Clone, PartialEq, Eq)]
1900#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1901pub enum MutabilityEnum {
1902    ReadOnly,
1903    WriteOnly,
1904    ReadWrite,
1905}
1906/// Attribute data of a variable.
1907#[derive(Debug, Clone, PartialEq, Eq)]
1908#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1909pub struct VariableAttribute {
1910    /// If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
1911    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1912    pub constant: Option<bool>,
1913    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1914    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1915    pub custom_data: Option<CustomData>,
1916    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1917    pub mutability: Option<MutabilityEnum>,
1918    /// If true, value will be persistent across system reboots or power down. Default when omitted is false.
1919    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1920    pub persistent: Option<bool>,
1921    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1922    pub r#type: Option<AttributeEnum>,
1923    /// Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'.
1924    ///
1925    /// The Configuration Variable &lt;&lt;configkey-reporting-value-size,ReportingValueSize&gt;&gt; can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal.
1926    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1927    pub value: Option<heapless::String<2500usize>>,
1928}
1929/// Data type of this variable.
1930#[derive(Debug, Clone, PartialEq, Eq)]
1931#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1932pub enum DataEnum {
1933    #[cfg_attr(feature = "serde", serde(rename = "string"))]
1934    String,
1935    #[cfg_attr(feature = "serde", serde(rename = "decimal"))]
1936    Decimal,
1937    #[cfg_attr(feature = "serde", serde(rename = "integer"))]
1938    Integer,
1939    #[cfg_attr(feature = "serde", serde(rename = "dateTime"))]
1940    DateTime,
1941    #[cfg_attr(feature = "serde", serde(rename = "boolean"))]
1942    Boolean,
1943    OptionList,
1944    SequenceList,
1945    MemberList,
1946}
1947/// Fixed read-only parameters of a variable.
1948#[derive(Debug, Clone, PartialEq)]
1949#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1950pub struct VariableCharacteristics {
1951    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1952    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1953    pub custom_data: Option<CustomData>,
1954    #[cfg_attr(feature = "serde", serde(rename = "dataType"))]
1955    pub data_type: DataEnum,
1956    /// Maximum possible value of this variable. When the datatype of this Variable is String, OptionList, SequenceList or MemberList, this field defines the maximum length of the (CSV) string.
1957    #[cfg_attr(feature = "serde", serde(rename = "maxLimit"))]
1958    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1959    pub max_limit: Option<f64>,
1960    /// Minimum possible value of this variable.
1961    #[cfg_attr(feature = "serde", serde(rename = "minLimit"))]
1962    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1963    pub min_limit: Option<f64>,
1964    /// Flag indicating if this variable supports monitoring.
1965    #[cfg_attr(feature = "serde", serde(rename = "supportsMonitoring"))]
1966    pub supports_monitoring: bool,
1967    /// Unit of the variable. When the transmitted value has a unit, this field SHALL be included.
1968    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1969    pub unit: Option<heapless::String<16usize>>,
1970    /// Allowed values when variable is Option/Member/SequenceList.
1971    ///
1972    /// * OptionList: The (Actual) Variable value must be a single value from the reported (CSV) enumeration list.
1973    ///
1974    /// * MemberList: The (Actual) Variable value  may be an (unordered) (sub-)set of the reported (CSV) valid values list.
1975    ///
1976    /// * SequenceList: The (Actual) Variable value  may be an ordered (priority, etc)  (sub-)set of the reported (CSV) valid values.
1977    ///
1978    /// This is a comma separated list.
1979    ///
1980    /// The Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal.
1981    #[cfg_attr(feature = "serde", serde(rename = "valuesList"))]
1982    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1983    pub values_list: Option<heapless::String<1000usize>>,
1984}
1985/// Class to report components, variables and variable attributes and characteristics.
1986#[derive(Debug, Clone, PartialEq)]
1987#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1988pub struct ReportData {
1989    pub component: Component,
1990    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1991    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1992    pub custom_data: Option<CustomData>,
1993    pub variable: Variable,
1994    #[cfg_attr(feature = "serde", serde(rename = "variableAttribute"))]
1995    pub variable_attribute: heapless::Vec<VariableAttribute, 4usize>,
1996    #[cfg_attr(feature = "serde", serde(rename = "variableCharacteristics"))]
1997    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1998    pub variable_characteristics: Option<VariableCharacteristics>,
1999}
2000/// This contains the progress status of the publishfirmware
2001/// installation.
2002#[derive(Debug, Clone, PartialEq, Eq)]
2003#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2004pub enum PublishFirmwareStatusEnum {
2005    Idle,
2006    DownloadScheduled,
2007    Downloading,
2008    Downloaded,
2009    Published,
2010    DownloadFailed,
2011    DownloadPaused,
2012    InvalidChecksum,
2013    ChecksumVerified,
2014    PublishFailed,
2015}
2016/// Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code
2017/// urn:x-oca:ocpp:uid:1:569232
2018/// Indicates the kind of schedule.
2019#[derive(Debug, Clone, PartialEq, Eq)]
2020#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2021pub enum ChargingProfileKindEnum {
2022    Absolute,
2023    Recurring,
2024    Relative,
2025}
2026/// Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code
2027/// urn:x-oca:ocpp:uid:1:569233
2028/// Indicates the start point of a recurrence.
2029#[derive(Debug, Clone, PartialEq, Eq)]
2030#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2031pub enum RecurrencyKindEnum {
2032    Daily,
2033    Weekly,
2034}
2035#[cfg(feature = "alloc")]
2036/// Charging_ Profile
2037/// urn:x-oca:ocpp:uid:2:233255
2038/// A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
2039#[derive(Debug, Clone, PartialEq)]
2040#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2041pub struct ChargingProfile {
2042    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
2043    pub charging_profile_kind: ChargingProfileKindEnum,
2044    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
2045    pub charging_profile_purpose: ChargingProfilePurposeEnum,
2046    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
2047    pub charging_schedule: heapless::Vec<ChargingSchedule, 3usize>,
2048    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2049    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2050    pub custom_data: Option<CustomData>,
2051    /// Identified_ Object. MRID. Numeric_ Identifier
2052    /// urn:x-enexis:ecdm:uid:1:569198
2053    /// Id of ChargingProfile.
2054    pub id: i64,
2055    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
2056    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2057    pub recurrency_kind: Option<RecurrencyKindEnum>,
2058    /// Charging_ Profile. Stack_ Level. Counter
2059    /// urn:x-oca:ocpp:uid:1:569230
2060    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
2061    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
2062    pub stack_level: i64,
2063    /// SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction.
2064    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
2065    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2066    pub transaction_id: Option<heapless::String<36usize>>,
2067    /// Charging_ Profile. Valid_ From. Date_ Time
2068    /// urn:x-oca:ocpp:uid:1:569234
2069    /// Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station.
2070    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
2071    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2072    pub valid_from: Option<alloc::string::String>,
2073    /// Charging_ Profile. Valid_ To. Date_ Time
2074    /// urn:x-oca:ocpp:uid:1:569235
2075    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
2076    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
2077    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2078    pub valid_to: Option<alloc::string::String>,
2079}
2080#[cfg(not(feature = "alloc"))]
2081/// Charging_ Profile
2082/// urn:x-oca:ocpp:uid:2:233255
2083/// A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
2084#[derive(Debug, Clone, PartialEq)]
2085#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2086pub struct ChargingProfile<
2087    const CHARGING_SCHEDULE_START_SCHEDULE_CAP: usize = 1024usize,
2088    const CHARGING_PROFILE_VALID_FROM_CAP: usize = 1024usize,
2089    const CHARGING_PROFILE_VALID_TO_CAP: usize = 1024usize,
2090> {
2091    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
2092    pub charging_profile_kind: ChargingProfileKindEnum,
2093    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
2094    pub charging_profile_purpose: ChargingProfilePurposeEnum,
2095    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
2096    pub charging_schedule: heapless::Vec<
2097        ChargingSchedule<CHARGING_SCHEDULE_START_SCHEDULE_CAP>,
2098        3usize,
2099    >,
2100    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2101    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2102    pub custom_data: Option<CustomData>,
2103    /// Identified_ Object. MRID. Numeric_ Identifier
2104    /// urn:x-enexis:ecdm:uid:1:569198
2105    /// Id of ChargingProfile.
2106    pub id: i64,
2107    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
2108    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2109    pub recurrency_kind: Option<RecurrencyKindEnum>,
2110    /// Charging_ Profile. Stack_ Level. Counter
2111    /// urn:x-oca:ocpp:uid:1:569230
2112    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
2113    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
2114    pub stack_level: i64,
2115    /// SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction.
2116    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
2117    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2118    pub transaction_id: Option<heapless::String<36usize>>,
2119    /// Charging_ Profile. Valid_ From. Date_ Time
2120    /// urn:x-oca:ocpp:uid:1:569234
2121    /// Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station.
2122    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
2123    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2124    pub valid_from: Option<heapless::String<CHARGING_PROFILE_VALID_FROM_CAP>>,
2125    /// Charging_ Profile. Valid_ To. Date_ Time
2126    /// urn:x-oca:ocpp:uid:1:569235
2127    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
2128    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
2129    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2130    pub valid_to: Option<heapless::String<CHARGING_PROFILE_VALID_TO_CAP>>,
2131}
2132/// Status indicating whether the Charging Station accepts the request to start a transaction.
2133#[derive(Debug, Clone, PartialEq, Eq)]
2134#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2135pub enum RequestStartStopStatusEnum {
2136    Accepted,
2137    Rejected,
2138}
2139/// The updated reservation status.
2140#[derive(Debug, Clone, PartialEq, Eq)]
2141#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2142pub enum ReservationUpdateStatusEnum {
2143    Expired,
2144    Removed,
2145}
2146/// This field specifies the connector type.
2147#[derive(Debug, Clone, PartialEq, Eq)]
2148#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2149pub enum ConnectorEnum {
2150    #[cfg_attr(feature = "serde", serde(rename = "cCCS1"))]
2151    CCCS1,
2152    #[cfg_attr(feature = "serde", serde(rename = "cCCS2"))]
2153    CCCS2,
2154    #[cfg_attr(feature = "serde", serde(rename = "cG105"))]
2155    CG105,
2156    #[cfg_attr(feature = "serde", serde(rename = "cTesla"))]
2157    CTesla,
2158    #[cfg_attr(feature = "serde", serde(rename = "cType1"))]
2159    CType1,
2160    #[cfg_attr(feature = "serde", serde(rename = "cType2"))]
2161    CType2,
2162    #[cfg_attr(feature = "serde", serde(rename = "s309-1P-16A"))]
2163    S3091P16A,
2164    #[cfg_attr(feature = "serde", serde(rename = "s309-1P-32A"))]
2165    S3091P32A,
2166    #[cfg_attr(feature = "serde", serde(rename = "s309-3P-16A"))]
2167    S3093P16A,
2168    #[cfg_attr(feature = "serde", serde(rename = "s309-3P-32A"))]
2169    S3093P32A,
2170    #[cfg_attr(feature = "serde", serde(rename = "sBS1361"))]
2171    SBS1361,
2172    #[cfg_attr(feature = "serde", serde(rename = "sCEE-7-7"))]
2173    SCEE77,
2174    #[cfg_attr(feature = "serde", serde(rename = "sType2"))]
2175    SType2,
2176    #[cfg_attr(feature = "serde", serde(rename = "sType3"))]
2177    SType3,
2178    Other1PhMax16A,
2179    Other1PhOver16A,
2180    Other3Ph,
2181    Pan,
2182    #[cfg_attr(feature = "serde", serde(rename = "wInductive"))]
2183    WInductive,
2184    #[cfg_attr(feature = "serde", serde(rename = "wResonant"))]
2185    WResonant,
2186    Undetermined,
2187    Unknown,
2188}
2189/// This indicates the success or failure of the reservation.
2190#[derive(Debug, Clone, PartialEq, Eq)]
2191#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2192pub enum ReserveNowStatusEnum {
2193    Accepted,
2194    Faulted,
2195    Occupied,
2196    Rejected,
2197    Unavailable,
2198}
2199/// This contains the type of reset that the Charging Station or EVSE should perform.
2200#[derive(Debug, Clone, PartialEq, Eq)]
2201#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2202pub enum ResetEnum {
2203    Immediate,
2204    OnIdle,
2205}
2206/// This indicates whether the Charging Station is able to perform the reset.
2207#[derive(Debug, Clone, PartialEq, Eq)]
2208#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2209pub enum ResetStatusEnum {
2210    Accepted,
2211    Rejected,
2212    Scheduled,
2213}
2214#[cfg(feature = "alloc")]
2215/// Contains the identifier to use for authorization.
2216#[derive(Debug, Clone, PartialEq, Eq)]
2217#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2218pub struct AuthorizationData {
2219    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2220    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2221    pub custom_data: Option<CustomData>,
2222    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
2223    pub id_token: IdToken,
2224    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
2225    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2226    pub id_token_info: Option<IdTokenInfo>,
2227}
2228#[cfg(not(feature = "alloc"))]
2229/// Contains the identifier to use for authorization.
2230#[derive(Debug, Clone, PartialEq, Eq)]
2231#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2232pub struct AuthorizationData<
2233    const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 16usize,
2234    const ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP: usize = 1024usize,
2235    const ID_TOKEN_INFO_EVSE_ID_CAP: usize = 16usize,
2236> {
2237    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2238    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2239    pub custom_data: Option<CustomData>,
2240    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
2241    pub id_token: IdToken<ID_TOKEN_ADDITIONAL_INFO_CAP>,
2242    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
2243    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2244    pub id_token_info: Option<
2245        IdTokenInfo<
2246            ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP,
2247            ID_TOKEN_INFO_EVSE_ID_CAP,
2248            ID_TOKEN_ADDITIONAL_INFO_CAP,
2249        >,
2250    >,
2251}
2252/// This contains the type of update (full or differential) of this request.
2253#[derive(Debug, Clone, PartialEq, Eq)]
2254#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2255pub enum UpdateEnum {
2256    Differential,
2257    Full,
2258}
2259/// This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
2260#[derive(Debug, Clone, PartialEq, Eq)]
2261#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2262pub enum SendLocalListStatusEnum {
2263    Accepted,
2264    Failed,
2265    VersionMismatch,
2266}
2267/// Returns whether the Charging Station has been able to process the message successfully. This does not guarantee the schedule will be followed to the letter. There might be other constraints the Charging Station may need to take into account.
2268#[derive(Debug, Clone, PartialEq, Eq)]
2269#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2270pub enum ChargingProfileStatusEnum {
2271    Accepted,
2272    Rejected,
2273}
2274/// This indicates whether the Charging Station is able to display the message.
2275#[derive(Debug, Clone, PartialEq, Eq)]
2276#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2277pub enum DisplayMessageStatusEnum {
2278    Accepted,
2279    NotSupportedMessageFormat,
2280    Rejected,
2281    NotSupportedPriority,
2282    NotSupportedState,
2283    UnknownTransaction,
2284}
2285/// Specify which monitoring base will be set
2286#[derive(Debug, Clone, PartialEq, Eq)]
2287#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2288pub enum MonitoringBaseEnum {
2289    All,
2290    FactoryDefault,
2291    HardWiredOnly,
2292}
2293/// APN. APN_ Authentication. APN_ Authentication_ Code
2294/// urn:x-oca:ocpp:uid:1:568828
2295/// Authentication method.
2296#[derive(Debug, Clone, PartialEq, Eq)]
2297#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2298pub enum APNAuthenticationEnum {
2299    CHAP,
2300    NONE,
2301    PAP,
2302    AUTO,
2303}
2304/// APN
2305/// urn:x-oca:ocpp:uid:2:233134
2306/// Collection of configuration data needed to make a data-connection over a cellular network.
2307///
2308/// NOTE: When asking a GSM modem to dial in, it is possible to specify which mobile operator should be used. This can be done with the mobile country code (MCC) in combination with a mobile network code (MNC). Example: If your preferred network is Vodafone Netherlands, the MCC=204 and the MNC=04 which means the key PreferredNetwork = 20404 Some modems allows to specify a preferred network, which means, if this network is not available, a different network is used. If you specify UseOnlyPreferredNetwork and this network is not available, the modem will not dial in.
2309#[derive(Debug, Clone, PartialEq, Eq)]
2310#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2311pub struct APN {
2312    /// APN. APN. URI
2313    /// urn:x-oca:ocpp:uid:1:568814
2314    /// The Access Point Name as an URL.
2315    pub apn: heapless::String<512usize>,
2316    #[cfg_attr(feature = "serde", serde(rename = "apnAuthentication"))]
2317    pub apn_authentication: APNAuthenticationEnum,
2318    /// APN. APN. Password
2319    /// urn:x-oca:ocpp:uid:1:568819
2320    /// APN Password.
2321    #[cfg_attr(feature = "serde", serde(rename = "apnPassword"))]
2322    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2323    pub apn_password: Option<heapless::String<20usize>>,
2324    /// APN. APN. User_ Name
2325    /// urn:x-oca:ocpp:uid:1:568818
2326    /// APN username.
2327    #[cfg_attr(feature = "serde", serde(rename = "apnUserName"))]
2328    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2329    pub apn_user_name: Option<heapless::String<20usize>>,
2330    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2331    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2332    pub custom_data: Option<CustomData>,
2333    /// APN. Preferred_ Network. Mobile_ Network_ ID
2334    /// urn:x-oca:ocpp:uid:1:568822
2335    /// Preferred network, written as MCC and MNC concatenated. See note.
2336    #[cfg_attr(feature = "serde", serde(rename = "preferredNetwork"))]
2337    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2338    pub preferred_network: Option<heapless::String<6usize>>,
2339    /// APN. SIMPIN. PIN_ Code
2340    /// urn:x-oca:ocpp:uid:1:568821
2341    /// SIM card pin code.
2342    #[cfg_attr(feature = "serde", serde(rename = "simPin"))]
2343    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2344    pub sim_pin: Option<i64>,
2345    /// APN. Use_ Only_ Preferred_ Network. Indicator
2346    /// urn:x-oca:ocpp:uid:1:568824
2347    /// Default: false. Use only the preferred Network, do
2348    /// not dial in when not available. See Note.
2349    #[cfg_attr(feature = "serde", serde(rename = "useOnlyPreferredNetwork"))]
2350    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2351    pub use_only_preferred_network: Option<bool>,
2352}
2353/// Applicable Network Interface.
2354#[derive(Debug, Clone, PartialEq, Eq)]
2355#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2356pub enum OCPPInterfaceEnum {
2357    Wired0,
2358    Wired1,
2359    Wired2,
2360    Wired3,
2361    Wireless0,
2362    Wireless1,
2363    Wireless2,
2364    Wireless3,
2365}
2366/// Communication_ Function. OCPP_ Transport. OCPP_ Transport_ Code
2367/// urn:x-oca:ocpp:uid:1:569356
2368/// Defines the transport protocol (e.g. SOAP or JSON). Note: SOAP is not supported in OCPP 2.0, but is supported by other versions of OCPP.
2369#[derive(Debug, Clone, PartialEq, Eq)]
2370#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2371pub enum OCPPTransportEnum {
2372    JSON,
2373    SOAP,
2374}
2375/// Communication_ Function. OCPP_ Version. OCPP_ Version_ Code
2376/// urn:x-oca:ocpp:uid:1:569355
2377/// Defines the OCPP version used for this communication function.
2378#[derive(Debug, Clone, PartialEq, Eq)]
2379#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2380pub enum OCPPVersionEnum {
2381    OCPP12,
2382    OCPP15,
2383    OCPP16,
2384    OCPP20,
2385}
2386/// VPN. Type. VPN_ Code
2387/// urn:x-oca:ocpp:uid:1:569277
2388/// Type of VPN
2389#[derive(Debug, Clone, PartialEq, Eq)]
2390#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2391pub enum VPNEnum {
2392    IKEv2,
2393    IPSec,
2394    L2TP,
2395    PPTP,
2396}
2397/// VPN
2398/// urn:x-oca:ocpp:uid:2:233268
2399/// VPN Configuration settings
2400#[derive(Debug, Clone, PartialEq, Eq)]
2401#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2402pub struct VPN {
2403    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2404    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2405    pub custom_data: Option<CustomData>,
2406    /// VPN. Group. Group_ Name
2407    /// urn:x-oca:ocpp:uid:1:569274
2408    /// VPN group.
2409    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2410    pub group: Option<heapless::String<20usize>>,
2411    /// VPN. Key. VPN_ Key
2412    /// urn:x-oca:ocpp:uid:1:569276
2413    /// VPN shared secret.
2414    pub key: heapless::String<255usize>,
2415    /// VPN. Password. Password
2416    /// urn:x-oca:ocpp:uid:1:569275
2417    /// VPN Password.
2418    pub password: heapless::String<20usize>,
2419    /// VPN. Server. URI
2420    /// urn:x-oca:ocpp:uid:1:569272
2421    /// VPN Server Address
2422    pub server: heapless::String<512usize>,
2423    pub r#type: VPNEnum,
2424    /// VPN. User. User_ Name
2425    /// urn:x-oca:ocpp:uid:1:569273
2426    /// VPN User
2427    pub user: heapless::String<20usize>,
2428}
2429/// Communication_ Function
2430/// urn:x-oca:ocpp:uid:2:233304
2431/// The NetworkConnectionProfile defines the functional and technical parameters of a communication link.
2432#[derive(Debug, Clone, PartialEq, Eq)]
2433#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2434pub struct NetworkConnectionProfile {
2435    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2436    pub apn: Option<APN>,
2437    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2438    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2439    pub custom_data: Option<CustomData>,
2440    /// Duration in seconds before a message send by the Charging Station via this network connection times-out.
2441    /// The best setting depends on the underlying network and response times of the CSMS.
2442    /// If you are looking for a some guideline: use 30 seconds as a starting point.
2443    #[cfg_attr(feature = "serde", serde(rename = "messageTimeout"))]
2444    pub message_timeout: i64,
2445    /// Communication_ Function. OCPP_ Central_ System_ URL. URI
2446    /// urn:x-oca:ocpp:uid:1:569357
2447    /// URL of the CSMS(s) that this Charging Station  communicates with.
2448    #[cfg_attr(feature = "serde", serde(rename = "ocppCsmsUrl"))]
2449    pub ocpp_csms_url: heapless::String<512usize>,
2450    #[cfg_attr(feature = "serde", serde(rename = "ocppInterface"))]
2451    pub ocpp_interface: OCPPInterfaceEnum,
2452    #[cfg_attr(feature = "serde", serde(rename = "ocppTransport"))]
2453    pub ocpp_transport: OCPPTransportEnum,
2454    #[cfg_attr(feature = "serde", serde(rename = "ocppVersion"))]
2455    pub ocpp_version: OCPPVersionEnum,
2456    /// This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile.
2457    #[cfg_attr(feature = "serde", serde(rename = "securityProfile"))]
2458    pub security_profile: i64,
2459    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2460    pub vpn: Option<VPN>,
2461}
2462/// Result of operation.
2463#[derive(Debug, Clone, PartialEq, Eq)]
2464#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2465pub enum SetNetworkProfileStatusEnum {
2466    Accepted,
2467    Rejected,
2468    Failed,
2469}
2470/// Class to hold parameters of SetVariableMonitoring request.
2471#[derive(Debug, Clone, PartialEq)]
2472#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2473pub struct SetMonitoringData {
2474    pub component: Component,
2475    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2476    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2477    pub custom_data: Option<CustomData>,
2478    /// An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id's for new monitors.
2479    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2480    pub id: Option<i64>,
2481    /// The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level.
2482    ///
2483    /// The severity levels have the following meaning: +
2484    /// *0-Danger* +
2485    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
2486    /// *1-Hardware Failure* +
2487    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
2488    /// *2-System Failure* +
2489    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
2490    /// *3-Critical* +
2491    /// Indicates a critical error. Action is required. +
2492    /// *4-Error* +
2493    /// Indicates a non-urgent error. Action is required. +
2494    /// *5-Alert* +
2495    /// Indicates an alert event. Default severity for any type of monitoring event.  +
2496    /// *6-Warning* +
2497    /// Indicates a warning event. Action may be required. +
2498    /// *7-Notice* +
2499    /// Indicates an unusual event. No immediate action is required. +
2500    /// *8-Informational* +
2501    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
2502    /// *9-Debug* +
2503    /// Indicates information useful to developers for debugging, not useful during operations.
2504    pub severity: i64,
2505    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false.
2506    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2507    pub transaction: Option<bool>,
2508    pub r#type: MonitorEnum,
2509    /// Value for threshold or delta monitoring.
2510    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
2511    pub value: f64,
2512    pub variable: Variable,
2513}
2514/// Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
2515#[derive(Debug, Clone, PartialEq, Eq)]
2516#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2517pub enum SetMonitoringStatusEnum {
2518    Accepted,
2519    UnknownComponent,
2520    UnknownVariable,
2521    UnsupportedMonitorType,
2522    Rejected,
2523    Duplicate,
2524}
2525/// Class to hold result of SetVariableMonitoring request.
2526#[derive(Debug, Clone, PartialEq, Eq)]
2527#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2528pub struct SetMonitoringResult {
2529    pub component: Component,
2530    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2531    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2532    pub custom_data: Option<CustomData>,
2533    /// Id given to the VariableMonitor by the Charging Station. The Id is only returned when status is accepted. Installed VariableMonitors should have unique id's but the id's of removed Installed monitors should have unique id's but the id's of removed monitors MAY be reused.
2534    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2535    pub id: Option<i64>,
2536    /// The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level.
2537    ///
2538    /// The severity levels have the following meaning: +
2539    /// *0-Danger* +
2540    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
2541    /// *1-Hardware Failure* +
2542    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
2543    /// *2-System Failure* +
2544    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
2545    /// *3-Critical* +
2546    /// Indicates a critical error. Action is required. +
2547    /// *4-Error* +
2548    /// Indicates a non-urgent error. Action is required. +
2549    /// *5-Alert* +
2550    /// Indicates an alert event. Default severity for any type of monitoring event.  +
2551    /// *6-Warning* +
2552    /// Indicates a warning event. Action may be required. +
2553    /// *7-Notice* +
2554    /// Indicates an unusual event. No immediate action is required. +
2555    /// *8-Informational* +
2556    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
2557    /// *9-Debug* +
2558    /// Indicates information useful to developers for debugging, not useful during operations.
2559    pub severity: i64,
2560    pub status: SetMonitoringStatusEnum,
2561    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
2562    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2563    pub status_info: Option<StatusInfo>,
2564    pub r#type: MonitorEnum,
2565    pub variable: Variable,
2566}
2567#[derive(Debug, Clone, PartialEq, Eq)]
2568#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2569pub struct SetVariableData {
2570    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
2571    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2572    pub attribute_type: Option<AttributeEnum>,
2573    /// Value to be assigned to attribute of variable.
2574    ///
2575    /// The Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal.
2576    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
2577    pub attribute_value: heapless::String<1000usize>,
2578    pub component: Component,
2579    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2580    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2581    pub custom_data: Option<CustomData>,
2582    pub variable: Variable,
2583}
2584/// Result status of setting the variable.
2585#[derive(Debug, Clone, PartialEq, Eq)]
2586#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2587pub enum SetVariableStatusEnum {
2588    Accepted,
2589    Rejected,
2590    UnknownComponent,
2591    UnknownVariable,
2592    NotSupportedAttributeType,
2593    RebootRequired,
2594}
2595#[derive(Debug, Clone, PartialEq, Eq)]
2596#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2597pub struct SetVariableResult {
2598    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
2599    pub attribute_status: SetVariableStatusEnum,
2600    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
2601    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2602    pub attribute_status_info: Option<StatusInfo>,
2603    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
2604    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2605    pub attribute_type: Option<AttributeEnum>,
2606    pub component: Component,
2607    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2608    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2609    pub custom_data: Option<CustomData>,
2610    pub variable: Variable,
2611}
2612/// This contains the current status of the Connector.
2613#[derive(Debug, Clone, PartialEq, Eq)]
2614#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2615pub enum ConnectorStatusEnum {
2616    Available,
2617    Occupied,
2618    Reserved,
2619    Unavailable,
2620    Faulted,
2621}
2622/// This contains the type of this event.
2623/// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
2624#[derive(Debug, Clone, PartialEq, Eq)]
2625#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2626pub enum TransactionEventEnum {
2627    Ended,
2628    Started,
2629    Updated,
2630}
2631/// Transaction. State. Transaction_ State_ Code
2632/// urn:x-oca:ocpp:uid:1:569419
2633/// Current charging state, is required when state
2634/// has changed.
2635#[derive(Debug, Clone, PartialEq, Eq)]
2636#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2637pub enum ChargingStateEnum {
2638    Charging,
2639    EVConnected,
2640    SuspendedEV,
2641    SuspendedEVSE,
2642    Idle,
2643}
2644/// Transaction. Stopped_ Reason. EOT_ Reason_ Code
2645/// urn:x-oca:ocpp:uid:1:569413
2646/// This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local".
2647#[derive(Debug, Clone, PartialEq, Eq)]
2648#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2649pub enum ReasonEnum {
2650    DeAuthorized,
2651    EmergencyStop,
2652    EnergyLimitReached,
2653    EVDisconnected,
2654    GroundFault,
2655    ImmediateReset,
2656    Local,
2657    LocalOutOfCredit,
2658    MasterPass,
2659    Other,
2660    OvercurrentFault,
2661    PowerLoss,
2662    PowerQuality,
2663    Reboot,
2664    Remote,
2665    SOCLimitReached,
2666    StoppedByEV,
2667    TimeLimitReached,
2668    Timeout,
2669}
2670/// Transaction
2671/// urn:x-oca:ocpp:uid:2:233318
2672#[derive(Debug, Clone, PartialEq, Eq)]
2673#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2674pub struct Transaction {
2675    #[cfg_attr(feature = "serde", serde(rename = "chargingState"))]
2676    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2677    pub charging_state: Option<ChargingStateEnum>,
2678    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2679    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2680    pub custom_data: Option<CustomData>,
2681    /// The ID given to remote start request (&lt;&lt;requeststarttransactionrequest, RequestStartTransactionRequest&gt;&gt;. This enables to CSMS to match the started transaction to the given start request.
2682    #[cfg_attr(feature = "serde", serde(rename = "remoteStartId"))]
2683    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2684    pub remote_start_id: Option<i64>,
2685    #[cfg_attr(feature = "serde", serde(rename = "stoppedReason"))]
2686    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2687    pub stopped_reason: Option<ReasonEnum>,
2688    /// Transaction. Time_ Spent_ Charging. Elapsed_ Time
2689    /// urn:x-oca:ocpp:uid:1:569415
2690    /// Contains the total time that energy flowed from EVSE to EV during the transaction (in seconds). Note that timeSpentCharging is smaller or equal to the duration of the transaction.
2691    #[cfg_attr(feature = "serde", serde(rename = "timeSpentCharging"))]
2692    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2693    pub time_spent_charging: Option<i64>,
2694    /// This contains the Id of the transaction.
2695    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
2696    pub transaction_id: heapless::String<36usize>,
2697}
2698/// Reason the Charging Station sends this message to the CSMS
2699#[derive(Debug, Clone, PartialEq, Eq)]
2700#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2701pub enum TriggerReasonEnum {
2702    Authorized,
2703    CablePluggedIn,
2704    ChargingRateChanged,
2705    ChargingStateChanged,
2706    Deauthorized,
2707    EnergyLimitReached,
2708    EVCommunicationLost,
2709    EVConnectTimeout,
2710    MeterValueClock,
2711    MeterValuePeriodic,
2712    TimeLimitReached,
2713    Trigger,
2714    UnlockCommand,
2715    StopAuthorized,
2716    EVDeparted,
2717    EVDetected,
2718    RemoteStop,
2719    RemoteStart,
2720    AbnormalCondition,
2721    SignedDataReceived,
2722    ResetCommand,
2723}
2724/// Type of message to be triggered.
2725#[derive(Debug, Clone, PartialEq, Eq)]
2726#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2727pub enum MessageTriggerEnum {
2728    BootNotification,
2729    LogStatusNotification,
2730    FirmwareStatusNotification,
2731    Heartbeat,
2732    MeterValues,
2733    SignChargingStationCertificate,
2734    SignV2GCertificate,
2735    StatusNotification,
2736    TransactionEvent,
2737    SignCombinedCertificate,
2738    PublishFirmwareStatusNotification,
2739}
2740/// Indicates whether the Charging Station will send the requested notification or not.
2741#[derive(Debug, Clone, PartialEq, Eq)]
2742#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2743pub enum TriggerMessageStatusEnum {
2744    Accepted,
2745    Rejected,
2746    NotImplemented,
2747}
2748/// This indicates whether the Charging Station has unlocked the connector.
2749#[derive(Debug, Clone, PartialEq, Eq)]
2750#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2751pub enum UnlockStatusEnum {
2752    Unlocked,
2753    UnlockFailed,
2754    OngoingAuthorizedTransaction,
2755    UnknownConnector,
2756}
2757/// Indicates whether the Local Controller succeeded in unpublishing the firmware.
2758#[derive(Debug, Clone, PartialEq, Eq)]
2759#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2760pub enum UnpublishFirmwareStatusEnum {
2761    DownloadOngoing,
2762    NoFirmware,
2763    Unpublished,
2764}
2765#[cfg(feature = "alloc")]
2766/// Firmware
2767/// urn:x-enexis:ecdm:uid:2:233291
2768/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
2769#[derive(Debug, Clone, PartialEq, Eq)]
2770#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2771pub struct Firmware {
2772    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2773    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2774    pub custom_data: Option<CustomData>,
2775    /// Firmware. Install. Date_ Time
2776    /// urn:x-enexis:ecdm:uid:1:569462
2777    /// Date and time at which the firmware shall be installed.
2778    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
2779    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2780    pub install_date_time: Option<alloc::string::String>,
2781    /// Firmware. Location. URI
2782    /// urn:x-enexis:ecdm:uid:1:569460
2783    /// URI defining the origin of the firmware.
2784    pub location: heapless::String<512usize>,
2785    /// Firmware. Retrieve. Date_ Time
2786    /// urn:x-enexis:ecdm:uid:1:569461
2787    /// Date and time at which the firmware shall be retrieved.
2788    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
2789    pub retrieve_date_time: alloc::string::String,
2790    /// Firmware. Signature. Signature
2791    /// urn:x-enexis:ecdm:uid:1:569464
2792    /// Base64 encoded firmware signature.
2793    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2794    pub signature: Option<heapless::String<800usize>>,
2795    /// Certificate with which the firmware was signed.
2796    /// PEM encoded X.509 certificate.
2797    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
2798    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2799    pub signing_certificate: Option<heapless::String<5500usize>>,
2800}
2801#[cfg(not(feature = "alloc"))]
2802/// Firmware
2803/// urn:x-enexis:ecdm:uid:2:233291
2804/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
2805#[derive(Debug, Clone, PartialEq, Eq)]
2806#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2807pub struct Firmware<
2808    const FIRMWARE_INSTALL_DATE_TIME_CAP: usize = 1024usize,
2809    const FIRMWARE_RETRIEVE_DATE_TIME_CAP: usize = 1024usize,
2810> {
2811    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2812    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2813    pub custom_data: Option<CustomData>,
2814    /// Firmware. Install. Date_ Time
2815    /// urn:x-enexis:ecdm:uid:1:569462
2816    /// Date and time at which the firmware shall be installed.
2817    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
2818    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2819    pub install_date_time: Option<heapless::String<FIRMWARE_INSTALL_DATE_TIME_CAP>>,
2820    /// Firmware. Location. URI
2821    /// urn:x-enexis:ecdm:uid:1:569460
2822    /// URI defining the origin of the firmware.
2823    pub location: heapless::String<512usize>,
2824    /// Firmware. Retrieve. Date_ Time
2825    /// urn:x-enexis:ecdm:uid:1:569461
2826    /// Date and time at which the firmware shall be retrieved.
2827    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
2828    pub retrieve_date_time: heapless::String<FIRMWARE_RETRIEVE_DATE_TIME_CAP>,
2829    /// Firmware. Signature. Signature
2830    /// urn:x-enexis:ecdm:uid:1:569464
2831    /// Base64 encoded firmware signature.
2832    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2833    pub signature: Option<heapless::String<800usize>>,
2834    /// Certificate with which the firmware was signed.
2835    /// PEM encoded X.509 certificate.
2836    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
2837    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2838    pub signing_certificate: Option<heapless::String<5500usize>>,
2839}
2840/// This field indicates whether the Charging Station was able to accept the request.
2841#[derive(Debug, Clone, PartialEq, Eq)]
2842#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2843pub enum UpdateFirmwareStatusEnum {
2844    Accepted,
2845    Rejected,
2846    AcceptedCanceled,
2847    InvalidCertificate,
2848    RevokedCertificate,
2849}