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/// Sales_ Tariff
1338/// urn:x-oca:ocpp:uid:2:233272
1339/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
1340#[derive(Debug, Clone, PartialEq)]
1341#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1342pub struct SalesTariff {
1343    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1344    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1345    pub custom_data: Option<CustomData>,
1346    /// Identified_ Object. MRID. Numeric_ Identifier
1347    /// urn:x-enexis:ecdm:uid:1:569198
1348    /// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
1349    pub id: i64,
1350    /// Sales_ Tariff. Num_ E_ Price_ Levels. Counter
1351    /// urn:x-oca:ocpp:uid:1:569284
1352    /// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
1353    #[cfg_attr(feature = "serde", serde(rename = "numEPriceLevels"))]
1354    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1355    pub num_e_price_levels: Option<i64>,
1356    /// Sales_ Tariff. Sales. Tariff_ Description
1357    /// urn:x-oca:ocpp:uid:1:569283
1358    /// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
1359    #[cfg_attr(feature = "serde", serde(rename = "salesTariffDescription"))]
1360    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1361    pub sales_tariff_description: Option<heapless::String<32usize>>,
1362    #[cfg_attr(feature = "serde", serde(rename = "salesTariffEntry"))]
1363    pub sales_tariff_entry: heapless::Vec<SalesTariffEntry, 1024usize>,
1364}
1365#[cfg(feature = "alloc")]
1366/// Charging_ Schedule
1367/// urn:x-oca:ocpp:uid:2:233256
1368/// Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile.
1369#[derive(Debug, Clone, PartialEq)]
1370#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1371pub struct ChargingSchedule {
1372    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
1373    pub charging_rate_unit: ChargingRateUnitEnum,
1374    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
1375    pub charging_schedule_period: heapless::Vec<ChargingSchedulePeriod, 1024usize>,
1376    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1377    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1378    pub custom_data: Option<CustomData>,
1379    /// Charging_ Schedule. Duration. Elapsed_ Time
1380    /// urn:x-oca:ocpp:uid:1:569236
1381    /// 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.
1382    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1383    pub duration: Option<i64>,
1384    /// Identifies the ChargingSchedule.
1385    pub id: i64,
1386    /// Charging_ Schedule. Min_ Charging_ Rate. Numeric
1387    /// urn:x-oca:ocpp:uid:1:569239
1388    /// 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)
1389    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
1390    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1391    pub min_charging_rate: Option<f64>,
1392    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
1393    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1394    pub sales_tariff: Option<SalesTariff>,
1395    /// Charging_ Schedule. Start_ Schedule. Date_ Time
1396    /// urn:x-oca:ocpp:uid:1:569237
1397    /// Starting point of an absolute schedule. If absent the schedule will be relative to start of charging.
1398    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
1399    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1400    pub start_schedule: Option<alloc::string::String>,
1401}
1402#[cfg(not(feature = "alloc"))]
1403/// Charging_ Schedule
1404/// urn:x-oca:ocpp:uid:2:233256
1405/// Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile.
1406#[derive(Debug, Clone, PartialEq)]
1407#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1408pub struct ChargingSchedule<
1409    const CHARGING_SCHEDULE_START_SCHEDULE_CAP: usize = 1024usize,
1410> {
1411    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
1412    pub charging_rate_unit: ChargingRateUnitEnum,
1413    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
1414    pub charging_schedule_period: heapless::Vec<ChargingSchedulePeriod, 1024usize>,
1415    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1416    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1417    pub custom_data: Option<CustomData>,
1418    /// Charging_ Schedule. Duration. Elapsed_ Time
1419    /// urn:x-oca:ocpp:uid:1:569236
1420    /// 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.
1421    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1422    pub duration: Option<i64>,
1423    /// Identifies the ChargingSchedule.
1424    pub id: i64,
1425    /// Charging_ Schedule. Min_ Charging_ Rate. Numeric
1426    /// urn:x-oca:ocpp:uid:1:569239
1427    /// 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)
1428    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
1429    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1430    pub min_charging_rate: Option<f64>,
1431    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
1432    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1433    pub sales_tariff: Option<SalesTariff>,
1434    /// Charging_ Schedule. Start_ Schedule. Date_ Time
1435    /// urn:x-oca:ocpp:uid:1:569237
1436    /// Starting point of an absolute schedule. If absent the schedule will be relative to start of charging.
1437    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
1438    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1439    pub start_schedule: Option<heapless::String<CHARGING_SCHEDULE_START_SCHEDULE_CAP>>,
1440}
1441#[cfg(feature = "alloc")]
1442/// Message_ Info
1443/// urn:x-enexis:ecdm:uid:2:233264
1444/// Contains message details, for a message to be displayed on a Charging Station.
1445#[derive(Debug, Clone, PartialEq, Eq)]
1446#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1447pub struct MessageInfo {
1448    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1449    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1450    pub custom_data: Option<CustomData>,
1451    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1452    pub display: Option<Component>,
1453    /// Message_ Info. End. Date_ Time
1454    /// urn:x-enexis:ecdm:uid:1:569257
1455    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
1456    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
1457    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1458    pub end_date_time: Option<alloc::string::String>,
1459    /// Identified_ Object. MRID. Numeric_ Identifier
1460    /// urn:x-enexis:ecdm:uid:1:569198
1461    /// 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).
1462    pub id: i64,
1463    pub message: MessageContent,
1464    pub priority: MessagePriorityEnum,
1465    /// Message_ Info. Start. Date_ Time
1466    /// urn:x-enexis:ecdm:uid:1:569256
1467    /// From what date-time should this message be shown. If omitted: directly.
1468    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
1469    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1470    pub start_date_time: Option<alloc::string::String>,
1471    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1472    pub state: Option<MessageStateEnum>,
1473    /// During which transaction shall this message be shown.
1474    /// Message SHALL be removed by the Charging Station after transaction has
1475    /// ended.
1476    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1477    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1478    pub transaction_id: Option<heapless::String<36usize>>,
1479}
1480#[cfg(not(feature = "alloc"))]
1481/// Message_ Info
1482/// urn:x-enexis:ecdm:uid:2:233264
1483/// Contains message details, for a message to be displayed on a Charging Station.
1484#[derive(Debug, Clone, PartialEq, Eq)]
1485#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1486pub struct MessageInfo<
1487    const MESSAGE_INFO_END_DATE_TIME_CAP: usize = 1024usize,
1488    const MESSAGE_INFO_START_DATE_TIME_CAP: usize = 1024usize,
1489> {
1490    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1491    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1492    pub custom_data: Option<CustomData>,
1493    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1494    pub display: Option<Component>,
1495    /// Message_ Info. End. Date_ Time
1496    /// urn:x-enexis:ecdm:uid:1:569257
1497    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
1498    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
1499    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1500    pub end_date_time: Option<heapless::String<MESSAGE_INFO_END_DATE_TIME_CAP>>,
1501    /// Identified_ Object. MRID. Numeric_ Identifier
1502    /// urn:x-enexis:ecdm:uid:1:569198
1503    /// 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).
1504    pub id: i64,
1505    pub message: MessageContent,
1506    pub priority: MessagePriorityEnum,
1507    /// Message_ Info. Start. Date_ Time
1508    /// urn:x-enexis:ecdm:uid:1:569256
1509    /// From what date-time should this message be shown. If omitted: directly.
1510    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
1511    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1512    pub start_date_time: Option<heapless::String<MESSAGE_INFO_START_DATE_TIME_CAP>>,
1513    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1514    pub state: Option<MessageStateEnum>,
1515    /// During which transaction shall this message be shown.
1516    /// Message SHALL be removed by the Charging Station after transaction has
1517    /// ended.
1518    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1519    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1520    pub transaction_id: Option<heapless::String<36usize>>,
1521}
1522/// AC_ Charging_ Parameters
1523/// urn:x-oca:ocpp:uid:2:233250
1524/// EV AC charging parameters.
1525#[derive(Debug, Clone, PartialEq, Eq)]
1526#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1527pub struct ACChargingParameters {
1528    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1529    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1530    pub custom_data: Option<CustomData>,
1531    /// AC_ Charging_ Parameters. Energy_ Amount. Energy_ Amount
1532    /// urn:x-oca:ocpp:uid:1:569211
1533    /// Amount of energy requested (in Wh). This includes energy required for preconditioning.
1534    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
1535    pub energy_amount: i64,
1536    /// AC_ Charging_ Parameters. EV_ Max. Current
1537    /// urn:x-oca:ocpp:uid:1:569213
1538    /// Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity.
1539    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
1540    pub ev_max_current: i64,
1541    /// AC_ Charging_ Parameters. EV_ Max. Voltage
1542    /// urn:x-oca:ocpp:uid:1:569214
1543    /// Maximum voltage supported by the electric vehicle
1544    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
1545    pub ev_max_voltage: i64,
1546    /// AC_ Charging_ Parameters. EV_ Min. Current
1547    /// urn:x-oca:ocpp:uid:1:569212
1548    /// Minimum current (amps) supported by the electric vehicle (per phase).
1549    #[cfg_attr(feature = "serde", serde(rename = "evMinCurrent"))]
1550    pub ev_min_current: i64,
1551}
1552/// DC_ Charging_ Parameters
1553/// urn:x-oca:ocpp:uid:2:233251
1554/// EV DC charging parameters
1555#[derive(Debug, Clone, PartialEq, Eq)]
1556#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1557pub struct DCChargingParameters {
1558    /// DC_ Charging_ Parameters. Bulk_ SOC. Percentage
1559    /// urn:x-oca:ocpp:uid:1:569222
1560    /// Percentage of SoC at which the EV considers a fast charging process to end. (possible values: 0 - 100)
1561    #[cfg_attr(feature = "serde", serde(rename = "bulkSoC"))]
1562    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1563    pub bulk_so_c: Option<i64>,
1564    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1565    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1566    pub custom_data: Option<CustomData>,
1567    /// DC_ Charging_ Parameters. Energy_ Amount. Energy_ Amount
1568    /// urn:x-oca:ocpp:uid:1:569217
1569    /// Amount of energy requested (in Wh). This inludes energy required for preconditioning.
1570    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
1571    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1572    pub energy_amount: Option<i64>,
1573    /// DC_ Charging_ Parameters. EV_ Energy_ Capacity. Numeric
1574    /// urn:x-oca:ocpp:uid:1:569220
1575    /// Capacity of the electric vehicle battery (in Wh)
1576    #[cfg_attr(feature = "serde", serde(rename = "evEnergyCapacity"))]
1577    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1578    pub ev_energy_capacity: Option<i64>,
1579    /// DC_ Charging_ Parameters. EV_ Max. Current
1580    /// urn:x-oca:ocpp:uid:1:569215
1581    /// Maximum current (amps) supported by the electric vehicle. Includes cable capacity.
1582    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
1583    pub ev_max_current: i64,
1584    /// DC_ Charging_ Parameters. EV_ Max. Power
1585    /// urn:x-oca:ocpp:uid:1:569218
1586    /// Maximum power (in W) supported by the electric vehicle. Required for DC charging.
1587    #[cfg_attr(feature = "serde", serde(rename = "evMaxPower"))]
1588    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1589    pub ev_max_power: Option<i64>,
1590    /// DC_ Charging_ Parameters. EV_ Max. Voltage
1591    /// urn:x-oca:ocpp:uid:1:569216
1592    /// Maximum voltage supported by the electric vehicle
1593    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
1594    pub ev_max_voltage: i64,
1595    /// DC_ Charging_ Parameters. Full_ SOC. Percentage
1596    /// urn:x-oca:ocpp:uid:1:569221
1597    /// Percentage of SoC at which the EV considers the battery fully charged. (possible values: 0 - 100)
1598    #[cfg_attr(feature = "serde", serde(rename = "fullSoC"))]
1599    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1600    pub full_so_c: Option<i64>,
1601    /// DC_ Charging_ Parameters. State_ Of_ Charge. Numeric
1602    /// urn:x-oca:ocpp:uid:1:569219
1603    /// Energy available in the battery (in percent of the battery capacity)
1604    #[cfg_attr(feature = "serde", serde(rename = "stateOfCharge"))]
1605    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1606    pub state_of_charge: Option<i64>,
1607}
1608/// Charging_ Needs. Requested. Energy_ Transfer_ Mode_ Code
1609/// urn:x-oca:ocpp:uid:1:569209
1610/// Mode of energy transfer requested by the EV.
1611#[derive(Debug, Clone, PartialEq, Eq)]
1612#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1613pub enum EnergyTransferModeEnum {
1614    DC,
1615    #[cfg_attr(feature = "serde", serde(rename = "AC_single_phase"))]
1616    ACsinglephase,
1617    #[cfg_attr(feature = "serde", serde(rename = "AC_two_phase"))]
1618    ACtwophase,
1619    #[cfg_attr(feature = "serde", serde(rename = "AC_three_phase"))]
1620    ACthreephase,
1621}
1622#[cfg(feature = "alloc")]
1623/// Charging_ Needs
1624/// urn:x-oca:ocpp:uid:2:233249
1625#[derive(Debug, Clone, PartialEq, Eq)]
1626#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1627pub struct ChargingNeeds {
1628    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
1629    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1630    pub ac_charging_parameters: Option<ACChargingParameters>,
1631    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1632    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1633    pub custom_data: Option<CustomData>,
1634    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
1635    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1636    pub dc_charging_parameters: Option<DCChargingParameters>,
1637    /// Charging_ Needs. Departure_ Time. Date_ Time
1638    /// urn:x-oca:ocpp:uid:1:569223
1639    /// Estimated departure time of the EV.
1640    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
1641    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1642    pub departure_time: Option<alloc::string::String>,
1643    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
1644    pub requested_energy_transfer: EnergyTransferModeEnum,
1645}
1646#[cfg(not(feature = "alloc"))]
1647/// Charging_ Needs
1648/// urn:x-oca:ocpp:uid:2:233249
1649#[derive(Debug, Clone, PartialEq, Eq)]
1650#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1651pub struct ChargingNeeds<const CHARGING_NEEDS_DEPARTURE_TIME_CAP: usize = 1024usize> {
1652    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
1653    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1654    pub ac_charging_parameters: Option<ACChargingParameters>,
1655    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1656    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1657    pub custom_data: Option<CustomData>,
1658    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
1659    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1660    pub dc_charging_parameters: Option<DCChargingParameters>,
1661    /// Charging_ Needs. Departure_ Time. Date_ Time
1662    /// urn:x-oca:ocpp:uid:1:569223
1663    /// Estimated departure time of the EV.
1664    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
1665    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1666    pub departure_time: Option<heapless::String<CHARGING_NEEDS_DEPARTURE_TIME_CAP>>,
1667    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
1668    pub requested_energy_transfer: EnergyTransferModeEnum,
1669}
1670/// 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.
1671#[derive(Debug, Clone, PartialEq, Eq)]
1672#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1673pub enum NotifyEVChargingNeedsStatusEnum {
1674    Accepted,
1675    Rejected,
1676    Processing,
1677}
1678/// Specifies the event notification type of the message.
1679#[derive(Debug, Clone, PartialEq, Eq)]
1680#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1681pub enum EventNotificationEnum {
1682    HardWiredNotification,
1683    HardWiredMonitor,
1684    PreconfiguredMonitor,
1685    CustomMonitor,
1686}
1687/// Type of monitor that triggered this event, e.g. exceeding a threshold value.
1688#[derive(Debug, Clone, PartialEq, Eq)]
1689#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1690pub enum EventTriggerEnum {
1691    Alerting,
1692    Delta,
1693    Periodic,
1694}
1695#[cfg(feature = "alloc")]
1696/// Class to report an event notification for a component-variable.
1697#[derive(Debug, Clone, PartialEq, Eq)]
1698#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1699pub struct EventData {
1700    /// Actual value (_attributeType_ Actual) of the variable.
1701    ///
1702    /// 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.
1703    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
1704    pub actual_value: heapless::String<2500usize>,
1705    /// Refers to the Id of an event that is considered to be the cause for this event.
1706    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1707    pub cause: Option<i64>,
1708    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
1709    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1710    pub cleared: Option<bool>,
1711    pub component: Component,
1712    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1713    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1714    pub custom_data: Option<CustomData>,
1715    /// Identifies the event. This field can be referred to as a cause by other events.
1716    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
1717    pub event_id: i64,
1718    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
1719    pub event_notification_type: EventNotificationEnum,
1720    /// Technical (error) code as reported by component.
1721    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
1722    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1723    pub tech_code: Option<heapless::String<50usize>>,
1724    /// Technical detail information as reported by component.
1725    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
1726    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1727    pub tech_info: Option<heapless::String<500usize>>,
1728    /// Timestamp of the moment the report was generated.
1729    pub timestamp: alloc::string::String,
1730    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
1731    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1732    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1733    pub transaction_id: Option<heapless::String<36usize>>,
1734    pub trigger: EventTriggerEnum,
1735    pub variable: Variable,
1736    /// Identifies the VariableMonitoring which triggered the event.
1737    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
1738    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1739    pub variable_monitoring_id: Option<i64>,
1740}
1741#[cfg(not(feature = "alloc"))]
1742/// Class to report an event notification for a component-variable.
1743#[derive(Debug, Clone, PartialEq, Eq)]
1744#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1745pub struct EventData<const EVENT_DATA_TIMESTAMP_CAP: usize = 1024usize> {
1746    /// Actual value (_attributeType_ Actual) of the variable.
1747    ///
1748    /// 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.
1749    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
1750    pub actual_value: heapless::String<2500usize>,
1751    /// Refers to the Id of an event that is considered to be the cause for this event.
1752    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1753    pub cause: Option<i64>,
1754    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
1755    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1756    pub cleared: Option<bool>,
1757    pub component: Component,
1758    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1759    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1760    pub custom_data: Option<CustomData>,
1761    /// Identifies the event. This field can be referred to as a cause by other events.
1762    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
1763    pub event_id: i64,
1764    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
1765    pub event_notification_type: EventNotificationEnum,
1766    /// Technical (error) code as reported by component.
1767    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
1768    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1769    pub tech_code: Option<heapless::String<50usize>>,
1770    /// Technical detail information as reported by component.
1771    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
1772    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1773    pub tech_info: Option<heapless::String<500usize>>,
1774    /// Timestamp of the moment the report was generated.
1775    pub timestamp: heapless::String<EVENT_DATA_TIMESTAMP_CAP>,
1776    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
1777    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
1778    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1779    pub transaction_id: Option<heapless::String<36usize>>,
1780    pub trigger: EventTriggerEnum,
1781    pub variable: Variable,
1782    /// Identifies the VariableMonitoring which triggered the event.
1783    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
1784    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1785    pub variable_monitoring_id: Option<i64>,
1786}
1787/// The type of this monitor, e.g. a threshold, delta or periodic monitor.
1788#[derive(Debug, Clone, PartialEq, Eq)]
1789#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1790pub enum MonitorEnum {
1791    UpperThreshold,
1792    LowerThreshold,
1793    Delta,
1794    Periodic,
1795    PeriodicClockAligned,
1796}
1797/// A monitoring setting for a variable.
1798#[derive(Debug, Clone, PartialEq)]
1799#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1800pub struct VariableMonitoring {
1801    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1802    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1803    pub custom_data: Option<CustomData>,
1804    /// Identifies the monitor.
1805    pub id: i64,
1806    /// 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.
1807    ///
1808    /// The severity levels have the following meaning: +
1809    /// *0-Danger* +
1810    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
1811    /// *1-Hardware Failure* +
1812    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
1813    /// *2-System Failure* +
1814    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
1815    /// *3-Critical* +
1816    /// Indicates a critical error. Action is required. +
1817    /// *4-Error* +
1818    /// Indicates a non-urgent error. Action is required. +
1819    /// *5-Alert* +
1820    /// Indicates an alert event. Default severity for any type of monitoring event.  +
1821    /// *6-Warning* +
1822    /// Indicates a warning event. Action may be required. +
1823    /// *7-Notice* +
1824    /// Indicates an unusual event. No immediate action is required. +
1825    /// *8-Informational* +
1826    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
1827    /// *9-Debug* +
1828    /// Indicates information useful to developers for debugging, not useful during operations.
1829    pub severity: i64,
1830    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction.
1831    pub transaction: bool,
1832    pub r#type: MonitorEnum,
1833    /// Value for threshold or delta monitoring.
1834    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
1835    pub value: f64,
1836}
1837#[cfg(feature = "alloc")]
1838/// Class to hold parameters of SetVariableMonitoring request.
1839#[derive(Debug, Clone, PartialEq)]
1840#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1841pub struct MonitoringData {
1842    pub component: Component,
1843    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1844    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1845    pub custom_data: Option<CustomData>,
1846    pub variable: Variable,
1847    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
1848    pub variable_monitoring: alloc::vec::Vec<VariableMonitoring>,
1849}
1850#[cfg(not(feature = "alloc"))]
1851/// Class to hold parameters of SetVariableMonitoring request.
1852#[derive(Debug, Clone, PartialEq)]
1853#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1854pub struct MonitoringData<
1855    const MONITORING_DATA_VARIABLE_MONITORING_CAP: usize = 16usize,
1856> {
1857    pub component: Component,
1858    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1859    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1860    pub custom_data: Option<CustomData>,
1861    pub variable: Variable,
1862    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
1863    pub variable_monitoring: heapless::Vec<
1864        VariableMonitoring,
1865        MONITORING_DATA_VARIABLE_MONITORING_CAP,
1866    >,
1867}
1868/// Defines the mutability of this attribute. Default is ReadWrite when omitted.
1869#[derive(Debug, Clone, PartialEq, Eq)]
1870#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1871pub enum MutabilityEnum {
1872    ReadOnly,
1873    WriteOnly,
1874    ReadWrite,
1875}
1876/// Attribute data of a variable.
1877#[derive(Debug, Clone, PartialEq, Eq)]
1878#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1879pub struct VariableAttribute {
1880    /// If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
1881    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1882    pub constant: Option<bool>,
1883    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1884    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1885    pub custom_data: Option<CustomData>,
1886    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1887    pub mutability: Option<MutabilityEnum>,
1888    /// If true, value will be persistent across system reboots or power down. Default when omitted is false.
1889    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1890    pub persistent: Option<bool>,
1891    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1892    pub r#type: Option<AttributeEnum>,
1893    /// Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'.
1894    ///
1895    /// 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.
1896    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1897    pub value: Option<heapless::String<2500usize>>,
1898}
1899/// Data type of this variable.
1900#[derive(Debug, Clone, PartialEq, Eq)]
1901#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1902pub enum DataEnum {
1903    #[cfg_attr(feature = "serde", serde(rename = "string"))]
1904    String,
1905    #[cfg_attr(feature = "serde", serde(rename = "decimal"))]
1906    Decimal,
1907    #[cfg_attr(feature = "serde", serde(rename = "integer"))]
1908    Integer,
1909    #[cfg_attr(feature = "serde", serde(rename = "dateTime"))]
1910    DateTime,
1911    #[cfg_attr(feature = "serde", serde(rename = "boolean"))]
1912    Boolean,
1913    OptionList,
1914    SequenceList,
1915    MemberList,
1916}
1917/// Fixed read-only parameters of a variable.
1918#[derive(Debug, Clone, PartialEq)]
1919#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1920pub struct VariableCharacteristics {
1921    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1922    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1923    pub custom_data: Option<CustomData>,
1924    #[cfg_attr(feature = "serde", serde(rename = "dataType"))]
1925    pub data_type: DataEnum,
1926    /// 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.
1927    #[cfg_attr(feature = "serde", serde(rename = "maxLimit"))]
1928    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1929    pub max_limit: Option<f64>,
1930    /// Minimum possible value of this variable.
1931    #[cfg_attr(feature = "serde", serde(rename = "minLimit"))]
1932    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1933    pub min_limit: Option<f64>,
1934    /// Flag indicating if this variable supports monitoring.
1935    #[cfg_attr(feature = "serde", serde(rename = "supportsMonitoring"))]
1936    pub supports_monitoring: bool,
1937    /// Unit of the variable. When the transmitted value has a unit, this field SHALL be included.
1938    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1939    pub unit: Option<heapless::String<16usize>>,
1940    /// Allowed values when variable is Option/Member/SequenceList.
1941    ///
1942    /// * OptionList: The (Actual) Variable value must be a single value from the reported (CSV) enumeration list.
1943    ///
1944    /// * MemberList: The (Actual) Variable value  may be an (unordered) (sub-)set of the reported (CSV) valid values list.
1945    ///
1946    /// * SequenceList: The (Actual) Variable value  may be an ordered (priority, etc)  (sub-)set of the reported (CSV) valid values.
1947    ///
1948    /// This is a comma separated list.
1949    ///
1950    /// 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.
1951    #[cfg_attr(feature = "serde", serde(rename = "valuesList"))]
1952    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1953    pub values_list: Option<heapless::String<1000usize>>,
1954}
1955/// Class to report components, variables and variable attributes and characteristics.
1956#[derive(Debug, Clone, PartialEq)]
1957#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1958pub struct ReportData {
1959    pub component: Component,
1960    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1961    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1962    pub custom_data: Option<CustomData>,
1963    pub variable: Variable,
1964    #[cfg_attr(feature = "serde", serde(rename = "variableAttribute"))]
1965    pub variable_attribute: heapless::Vec<VariableAttribute, 4usize>,
1966    #[cfg_attr(feature = "serde", serde(rename = "variableCharacteristics"))]
1967    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1968    pub variable_characteristics: Option<VariableCharacteristics>,
1969}
1970/// This contains the progress status of the publishfirmware
1971/// installation.
1972#[derive(Debug, Clone, PartialEq, Eq)]
1973#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1974pub enum PublishFirmwareStatusEnum {
1975    Idle,
1976    DownloadScheduled,
1977    Downloading,
1978    Downloaded,
1979    Published,
1980    DownloadFailed,
1981    DownloadPaused,
1982    InvalidChecksum,
1983    ChecksumVerified,
1984    PublishFailed,
1985}
1986/// Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code
1987/// urn:x-oca:ocpp:uid:1:569232
1988/// Indicates the kind of schedule.
1989#[derive(Debug, Clone, PartialEq, Eq)]
1990#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1991pub enum ChargingProfileKindEnum {
1992    Absolute,
1993    Recurring,
1994    Relative,
1995}
1996/// Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code
1997/// urn:x-oca:ocpp:uid:1:569233
1998/// Indicates the start point of a recurrence.
1999#[derive(Debug, Clone, PartialEq, Eq)]
2000#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2001pub enum RecurrencyKindEnum {
2002    Daily,
2003    Weekly,
2004}
2005#[cfg(feature = "alloc")]
2006/// Charging_ Profile
2007/// urn:x-oca:ocpp:uid:2:233255
2008/// A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
2009#[derive(Debug, Clone, PartialEq)]
2010#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2011pub struct ChargingProfile {
2012    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
2013    pub charging_profile_kind: ChargingProfileKindEnum,
2014    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
2015    pub charging_profile_purpose: ChargingProfilePurposeEnum,
2016    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
2017    pub charging_schedule: heapless::Vec<ChargingSchedule, 3usize>,
2018    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2019    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2020    pub custom_data: Option<CustomData>,
2021    /// Identified_ Object. MRID. Numeric_ Identifier
2022    /// urn:x-enexis:ecdm:uid:1:569198
2023    /// Id of ChargingProfile.
2024    pub id: i64,
2025    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
2026    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2027    pub recurrency_kind: Option<RecurrencyKindEnum>,
2028    /// Charging_ Profile. Stack_ Level. Counter
2029    /// urn:x-oca:ocpp:uid:1:569230
2030    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
2031    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
2032    pub stack_level: i64,
2033    /// SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction.
2034    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
2035    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2036    pub transaction_id: Option<heapless::String<36usize>>,
2037    /// Charging_ Profile. Valid_ From. Date_ Time
2038    /// urn:x-oca:ocpp:uid:1:569234
2039    /// 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.
2040    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
2041    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2042    pub valid_from: Option<alloc::string::String>,
2043    /// Charging_ Profile. Valid_ To. Date_ Time
2044    /// urn:x-oca:ocpp:uid:1:569235
2045    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
2046    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
2047    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2048    pub valid_to: Option<alloc::string::String>,
2049}
2050#[cfg(not(feature = "alloc"))]
2051/// Charging_ Profile
2052/// urn:x-oca:ocpp:uid:2:233255
2053/// A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
2054#[derive(Debug, Clone, PartialEq)]
2055#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2056pub struct ChargingProfile<
2057    const CHARGING_SCHEDULE_START_SCHEDULE_CAP: usize = 1024usize,
2058    const CHARGING_PROFILE_VALID_FROM_CAP: usize = 1024usize,
2059    const CHARGING_PROFILE_VALID_TO_CAP: usize = 1024usize,
2060> {
2061    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
2062    pub charging_profile_kind: ChargingProfileKindEnum,
2063    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
2064    pub charging_profile_purpose: ChargingProfilePurposeEnum,
2065    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
2066    pub charging_schedule: heapless::Vec<
2067        ChargingSchedule<CHARGING_SCHEDULE_START_SCHEDULE_CAP>,
2068        3usize,
2069    >,
2070    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2071    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2072    pub custom_data: Option<CustomData>,
2073    /// Identified_ Object. MRID. Numeric_ Identifier
2074    /// urn:x-enexis:ecdm:uid:1:569198
2075    /// Id of ChargingProfile.
2076    pub id: i64,
2077    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
2078    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2079    pub recurrency_kind: Option<RecurrencyKindEnum>,
2080    /// Charging_ Profile. Stack_ Level. Counter
2081    /// urn:x-oca:ocpp:uid:1:569230
2082    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
2083    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
2084    pub stack_level: i64,
2085    /// SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction.
2086    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
2087    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2088    pub transaction_id: Option<heapless::String<36usize>>,
2089    /// Charging_ Profile. Valid_ From. Date_ Time
2090    /// urn:x-oca:ocpp:uid:1:569234
2091    /// 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.
2092    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
2093    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2094    pub valid_from: Option<heapless::String<CHARGING_PROFILE_VALID_FROM_CAP>>,
2095    /// Charging_ Profile. Valid_ To. Date_ Time
2096    /// urn:x-oca:ocpp:uid:1:569235
2097    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
2098    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
2099    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2100    pub valid_to: Option<heapless::String<CHARGING_PROFILE_VALID_TO_CAP>>,
2101}
2102/// Status indicating whether the Charging Station accepts the request to start a transaction.
2103#[derive(Debug, Clone, PartialEq, Eq)]
2104#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2105pub enum RequestStartStopStatusEnum {
2106    Accepted,
2107    Rejected,
2108}
2109/// The updated reservation status.
2110#[derive(Debug, Clone, PartialEq, Eq)]
2111#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2112pub enum ReservationUpdateStatusEnum {
2113    Expired,
2114    Removed,
2115}
2116/// This field specifies the connector type.
2117#[derive(Debug, Clone, PartialEq, Eq)]
2118#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2119pub enum ConnectorEnum {
2120    #[cfg_attr(feature = "serde", serde(rename = "cCCS1"))]
2121    CCCS1,
2122    #[cfg_attr(feature = "serde", serde(rename = "cCCS2"))]
2123    CCCS2,
2124    #[cfg_attr(feature = "serde", serde(rename = "cG105"))]
2125    CG105,
2126    #[cfg_attr(feature = "serde", serde(rename = "cTesla"))]
2127    CTesla,
2128    #[cfg_attr(feature = "serde", serde(rename = "cType1"))]
2129    CType1,
2130    #[cfg_attr(feature = "serde", serde(rename = "cType2"))]
2131    CType2,
2132    #[cfg_attr(feature = "serde", serde(rename = "s309-1P-16A"))]
2133    S3091P16A,
2134    #[cfg_attr(feature = "serde", serde(rename = "s309-1P-32A"))]
2135    S3091P32A,
2136    #[cfg_attr(feature = "serde", serde(rename = "s309-3P-16A"))]
2137    S3093P16A,
2138    #[cfg_attr(feature = "serde", serde(rename = "s309-3P-32A"))]
2139    S3093P32A,
2140    #[cfg_attr(feature = "serde", serde(rename = "sBS1361"))]
2141    SBS1361,
2142    #[cfg_attr(feature = "serde", serde(rename = "sCEE-7-7"))]
2143    SCEE77,
2144    #[cfg_attr(feature = "serde", serde(rename = "sType2"))]
2145    SType2,
2146    #[cfg_attr(feature = "serde", serde(rename = "sType3"))]
2147    SType3,
2148    Other1PhMax16A,
2149    Other1PhOver16A,
2150    Other3Ph,
2151    Pan,
2152    #[cfg_attr(feature = "serde", serde(rename = "wInductive"))]
2153    WInductive,
2154    #[cfg_attr(feature = "serde", serde(rename = "wResonant"))]
2155    WResonant,
2156    Undetermined,
2157    Unknown,
2158}
2159/// This indicates the success or failure of the reservation.
2160#[derive(Debug, Clone, PartialEq, Eq)]
2161#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2162pub enum ReserveNowStatusEnum {
2163    Accepted,
2164    Faulted,
2165    Occupied,
2166    Rejected,
2167    Unavailable,
2168}
2169/// This contains the type of reset that the Charging Station or EVSE should perform.
2170#[derive(Debug, Clone, PartialEq, Eq)]
2171#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2172pub enum ResetEnum {
2173    Immediate,
2174    OnIdle,
2175}
2176/// This indicates whether the Charging Station is able to perform the reset.
2177#[derive(Debug, Clone, PartialEq, Eq)]
2178#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2179pub enum ResetStatusEnum {
2180    Accepted,
2181    Rejected,
2182    Scheduled,
2183}
2184#[cfg(feature = "alloc")]
2185/// Contains the identifier to use for authorization.
2186#[derive(Debug, Clone, PartialEq, Eq)]
2187#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2188pub struct AuthorizationData {
2189    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2190    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2191    pub custom_data: Option<CustomData>,
2192    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
2193    pub id_token: IdToken,
2194    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
2195    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2196    pub id_token_info: Option<IdTokenInfo>,
2197}
2198#[cfg(not(feature = "alloc"))]
2199/// Contains the identifier to use for authorization.
2200#[derive(Debug, Clone, PartialEq, Eq)]
2201#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2202pub struct AuthorizationData<
2203    const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 16usize,
2204    const ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP: usize = 1024usize,
2205    const ID_TOKEN_INFO_EVSE_ID_CAP: usize = 16usize,
2206> {
2207    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2208    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2209    pub custom_data: Option<CustomData>,
2210    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
2211    pub id_token: IdToken<ID_TOKEN_ADDITIONAL_INFO_CAP>,
2212    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
2213    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2214    pub id_token_info: Option<
2215        IdTokenInfo<
2216            ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP,
2217            ID_TOKEN_INFO_EVSE_ID_CAP,
2218            ID_TOKEN_ADDITIONAL_INFO_CAP,
2219        >,
2220    >,
2221}
2222/// This contains the type of update (full or differential) of this request.
2223#[derive(Debug, Clone, PartialEq, Eq)]
2224#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2225pub enum UpdateEnum {
2226    Differential,
2227    Full,
2228}
2229/// This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
2230#[derive(Debug, Clone, PartialEq, Eq)]
2231#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2232pub enum SendLocalListStatusEnum {
2233    Accepted,
2234    Failed,
2235    VersionMismatch,
2236}
2237/// 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.
2238#[derive(Debug, Clone, PartialEq, Eq)]
2239#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2240pub enum ChargingProfileStatusEnum {
2241    Accepted,
2242    Rejected,
2243}
2244/// This indicates whether the Charging Station is able to display the message.
2245#[derive(Debug, Clone, PartialEq, Eq)]
2246#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2247pub enum DisplayMessageStatusEnum {
2248    Accepted,
2249    NotSupportedMessageFormat,
2250    Rejected,
2251    NotSupportedPriority,
2252    NotSupportedState,
2253    UnknownTransaction,
2254}
2255/// Specify which monitoring base will be set
2256#[derive(Debug, Clone, PartialEq, Eq)]
2257#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2258pub enum MonitoringBaseEnum {
2259    All,
2260    FactoryDefault,
2261    HardWiredOnly,
2262}
2263/// APN. APN_ Authentication. APN_ Authentication_ Code
2264/// urn:x-oca:ocpp:uid:1:568828
2265/// Authentication method.
2266#[derive(Debug, Clone, PartialEq, Eq)]
2267#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2268pub enum APNAuthenticationEnum {
2269    CHAP,
2270    NONE,
2271    PAP,
2272    AUTO,
2273}
2274/// APN
2275/// urn:x-oca:ocpp:uid:2:233134
2276/// Collection of configuration data needed to make a data-connection over a cellular network.
2277///
2278/// 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.
2279#[derive(Debug, Clone, PartialEq, Eq)]
2280#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2281pub struct APN {
2282    /// APN. APN. URI
2283    /// urn:x-oca:ocpp:uid:1:568814
2284    /// The Access Point Name as an URL.
2285    pub apn: heapless::String<512usize>,
2286    #[cfg_attr(feature = "serde", serde(rename = "apnAuthentication"))]
2287    pub apn_authentication: APNAuthenticationEnum,
2288    /// APN. APN. Password
2289    /// urn:x-oca:ocpp:uid:1:568819
2290    /// APN Password.
2291    #[cfg_attr(feature = "serde", serde(rename = "apnPassword"))]
2292    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2293    pub apn_password: Option<heapless::String<20usize>>,
2294    /// APN. APN. User_ Name
2295    /// urn:x-oca:ocpp:uid:1:568818
2296    /// APN username.
2297    #[cfg_attr(feature = "serde", serde(rename = "apnUserName"))]
2298    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2299    pub apn_user_name: Option<heapless::String<20usize>>,
2300    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2301    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2302    pub custom_data: Option<CustomData>,
2303    /// APN. Preferred_ Network. Mobile_ Network_ ID
2304    /// urn:x-oca:ocpp:uid:1:568822
2305    /// Preferred network, written as MCC and MNC concatenated. See note.
2306    #[cfg_attr(feature = "serde", serde(rename = "preferredNetwork"))]
2307    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2308    pub preferred_network: Option<heapless::String<6usize>>,
2309    /// APN. SIMPIN. PIN_ Code
2310    /// urn:x-oca:ocpp:uid:1:568821
2311    /// SIM card pin code.
2312    #[cfg_attr(feature = "serde", serde(rename = "simPin"))]
2313    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2314    pub sim_pin: Option<i64>,
2315    /// APN. Use_ Only_ Preferred_ Network. Indicator
2316    /// urn:x-oca:ocpp:uid:1:568824
2317    /// Default: false. Use only the preferred Network, do
2318    /// not dial in when not available. See Note.
2319    #[cfg_attr(feature = "serde", serde(rename = "useOnlyPreferredNetwork"))]
2320    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2321    pub use_only_preferred_network: Option<bool>,
2322}
2323/// Applicable Network Interface.
2324#[derive(Debug, Clone, PartialEq, Eq)]
2325#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2326pub enum OCPPInterfaceEnum {
2327    Wired0,
2328    Wired1,
2329    Wired2,
2330    Wired3,
2331    Wireless0,
2332    Wireless1,
2333    Wireless2,
2334    Wireless3,
2335}
2336/// Communication_ Function. OCPP_ Transport. OCPP_ Transport_ Code
2337/// urn:x-oca:ocpp:uid:1:569356
2338/// 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.
2339#[derive(Debug, Clone, PartialEq, Eq)]
2340#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2341pub enum OCPPTransportEnum {
2342    JSON,
2343    SOAP,
2344}
2345/// Communication_ Function. OCPP_ Version. OCPP_ Version_ Code
2346/// urn:x-oca:ocpp:uid:1:569355
2347/// Defines the OCPP version used for this communication function.
2348#[derive(Debug, Clone, PartialEq, Eq)]
2349#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2350pub enum OCPPVersionEnum {
2351    OCPP12,
2352    OCPP15,
2353    OCPP16,
2354    OCPP20,
2355}
2356/// VPN. Type. VPN_ Code
2357/// urn:x-oca:ocpp:uid:1:569277
2358/// Type of VPN
2359#[derive(Debug, Clone, PartialEq, Eq)]
2360#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2361pub enum VPNEnum {
2362    IKEv2,
2363    IPSec,
2364    L2TP,
2365    PPTP,
2366}
2367/// VPN
2368/// urn:x-oca:ocpp:uid:2:233268
2369/// VPN Configuration settings
2370#[derive(Debug, Clone, PartialEq, Eq)]
2371#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2372pub struct VPN {
2373    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2374    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2375    pub custom_data: Option<CustomData>,
2376    /// VPN. Group. Group_ Name
2377    /// urn:x-oca:ocpp:uid:1:569274
2378    /// VPN group.
2379    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2380    pub group: Option<heapless::String<20usize>>,
2381    /// VPN. Key. VPN_ Key
2382    /// urn:x-oca:ocpp:uid:1:569276
2383    /// VPN shared secret.
2384    pub key: heapless::String<255usize>,
2385    /// VPN. Password. Password
2386    /// urn:x-oca:ocpp:uid:1:569275
2387    /// VPN Password.
2388    pub password: heapless::String<20usize>,
2389    /// VPN. Server. URI
2390    /// urn:x-oca:ocpp:uid:1:569272
2391    /// VPN Server Address
2392    pub server: heapless::String<512usize>,
2393    pub r#type: VPNEnum,
2394    /// VPN. User. User_ Name
2395    /// urn:x-oca:ocpp:uid:1:569273
2396    /// VPN User
2397    pub user: heapless::String<20usize>,
2398}
2399/// Communication_ Function
2400/// urn:x-oca:ocpp:uid:2:233304
2401/// The NetworkConnectionProfile defines the functional and technical parameters of a communication link.
2402#[derive(Debug, Clone, PartialEq, Eq)]
2403#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2404pub struct NetworkConnectionProfile {
2405    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2406    pub apn: Option<APN>,
2407    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2408    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2409    pub custom_data: Option<CustomData>,
2410    /// Duration in seconds before a message send by the Charging Station via this network connection times-out.
2411    /// The best setting depends on the underlying network and response times of the CSMS.
2412    /// If you are looking for a some guideline: use 30 seconds as a starting point.
2413    #[cfg_attr(feature = "serde", serde(rename = "messageTimeout"))]
2414    pub message_timeout: i64,
2415    /// Communication_ Function. OCPP_ Central_ System_ URL. URI
2416    /// urn:x-oca:ocpp:uid:1:569357
2417    /// URL of the CSMS(s) that this Charging Station  communicates with.
2418    #[cfg_attr(feature = "serde", serde(rename = "ocppCsmsUrl"))]
2419    pub ocpp_csms_url: heapless::String<512usize>,
2420    #[cfg_attr(feature = "serde", serde(rename = "ocppInterface"))]
2421    pub ocpp_interface: OCPPInterfaceEnum,
2422    #[cfg_attr(feature = "serde", serde(rename = "ocppTransport"))]
2423    pub ocpp_transport: OCPPTransportEnum,
2424    #[cfg_attr(feature = "serde", serde(rename = "ocppVersion"))]
2425    pub ocpp_version: OCPPVersionEnum,
2426    /// This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile.
2427    #[cfg_attr(feature = "serde", serde(rename = "securityProfile"))]
2428    pub security_profile: i64,
2429    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2430    pub vpn: Option<VPN>,
2431}
2432/// Result of operation.
2433#[derive(Debug, Clone, PartialEq, Eq)]
2434#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2435pub enum SetNetworkProfileStatusEnum {
2436    Accepted,
2437    Rejected,
2438    Failed,
2439}
2440/// Class to hold parameters of SetVariableMonitoring request.
2441#[derive(Debug, Clone, PartialEq)]
2442#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2443pub struct SetMonitoringData {
2444    pub component: Component,
2445    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2446    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2447    pub custom_data: Option<CustomData>,
2448    /// An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id's for new monitors.
2449    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2450    pub id: Option<i64>,
2451    /// 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.
2452    ///
2453    /// The severity levels have the following meaning: +
2454    /// *0-Danger* +
2455    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
2456    /// *1-Hardware Failure* +
2457    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
2458    /// *2-System Failure* +
2459    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
2460    /// *3-Critical* +
2461    /// Indicates a critical error. Action is required. +
2462    /// *4-Error* +
2463    /// Indicates a non-urgent error. Action is required. +
2464    /// *5-Alert* +
2465    /// Indicates an alert event. Default severity for any type of monitoring event.  +
2466    /// *6-Warning* +
2467    /// Indicates a warning event. Action may be required. +
2468    /// *7-Notice* +
2469    /// Indicates an unusual event. No immediate action is required. +
2470    /// *8-Informational* +
2471    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
2472    /// *9-Debug* +
2473    /// Indicates information useful to developers for debugging, not useful during operations.
2474    pub severity: i64,
2475    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false.
2476    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2477    pub transaction: Option<bool>,
2478    pub r#type: MonitorEnum,
2479    /// Value for threshold or delta monitoring.
2480    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
2481    pub value: f64,
2482    pub variable: Variable,
2483}
2484/// Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
2485#[derive(Debug, Clone, PartialEq, Eq)]
2486#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2487pub enum SetMonitoringStatusEnum {
2488    Accepted,
2489    UnknownComponent,
2490    UnknownVariable,
2491    UnsupportedMonitorType,
2492    Rejected,
2493    Duplicate,
2494}
2495/// Class to hold result of SetVariableMonitoring request.
2496#[derive(Debug, Clone, PartialEq, Eq)]
2497#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2498pub struct SetMonitoringResult {
2499    pub component: Component,
2500    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2501    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2502    pub custom_data: Option<CustomData>,
2503    /// 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.
2504    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2505    pub id: Option<i64>,
2506    /// 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.
2507    ///
2508    /// The severity levels have the following meaning: +
2509    /// *0-Danger* +
2510    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
2511    /// *1-Hardware Failure* +
2512    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
2513    /// *2-System Failure* +
2514    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
2515    /// *3-Critical* +
2516    /// Indicates a critical error. Action is required. +
2517    /// *4-Error* +
2518    /// Indicates a non-urgent error. Action is required. +
2519    /// *5-Alert* +
2520    /// Indicates an alert event. Default severity for any type of monitoring event.  +
2521    /// *6-Warning* +
2522    /// Indicates a warning event. Action may be required. +
2523    /// *7-Notice* +
2524    /// Indicates an unusual event. No immediate action is required. +
2525    /// *8-Informational* +
2526    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
2527    /// *9-Debug* +
2528    /// Indicates information useful to developers for debugging, not useful during operations.
2529    pub severity: i64,
2530    pub status: SetMonitoringStatusEnum,
2531    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
2532    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2533    pub status_info: Option<StatusInfo>,
2534    pub r#type: MonitorEnum,
2535    pub variable: Variable,
2536}
2537#[derive(Debug, Clone, PartialEq, Eq)]
2538#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2539pub struct SetVariableData {
2540    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
2541    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2542    pub attribute_type: Option<AttributeEnum>,
2543    /// Value to be assigned to attribute of variable.
2544    ///
2545    /// 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.
2546    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
2547    pub attribute_value: heapless::String<1000usize>,
2548    pub component: Component,
2549    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2550    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2551    pub custom_data: Option<CustomData>,
2552    pub variable: Variable,
2553}
2554/// Result status of setting the variable.
2555#[derive(Debug, Clone, PartialEq, Eq)]
2556#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2557pub enum SetVariableStatusEnum {
2558    Accepted,
2559    Rejected,
2560    UnknownComponent,
2561    UnknownVariable,
2562    NotSupportedAttributeType,
2563    RebootRequired,
2564}
2565#[derive(Debug, Clone, PartialEq, Eq)]
2566#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2567pub struct SetVariableResult {
2568    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
2569    pub attribute_status: SetVariableStatusEnum,
2570    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
2571    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2572    pub attribute_status_info: Option<StatusInfo>,
2573    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
2574    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2575    pub attribute_type: Option<AttributeEnum>,
2576    pub component: Component,
2577    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2578    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2579    pub custom_data: Option<CustomData>,
2580    pub variable: Variable,
2581}
2582/// This contains the current status of the Connector.
2583#[derive(Debug, Clone, PartialEq, Eq)]
2584#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2585pub enum ConnectorStatusEnum {
2586    Available,
2587    Occupied,
2588    Reserved,
2589    Unavailable,
2590    Faulted,
2591}
2592/// This contains the type of this event.
2593/// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
2594#[derive(Debug, Clone, PartialEq, Eq)]
2595#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2596pub enum TransactionEventEnum {
2597    Ended,
2598    Started,
2599    Updated,
2600}
2601/// Transaction. State. Transaction_ State_ Code
2602/// urn:x-oca:ocpp:uid:1:569419
2603/// Current charging state, is required when state
2604/// has changed.
2605#[derive(Debug, Clone, PartialEq, Eq)]
2606#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2607pub enum ChargingStateEnum {
2608    Charging,
2609    EVConnected,
2610    SuspendedEV,
2611    SuspendedEVSE,
2612    Idle,
2613}
2614/// Transaction. Stopped_ Reason. EOT_ Reason_ Code
2615/// urn:x-oca:ocpp:uid:1:569413
2616/// This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local".
2617#[derive(Debug, Clone, PartialEq, Eq)]
2618#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2619pub enum ReasonEnum {
2620    DeAuthorized,
2621    EmergencyStop,
2622    EnergyLimitReached,
2623    EVDisconnected,
2624    GroundFault,
2625    ImmediateReset,
2626    Local,
2627    LocalOutOfCredit,
2628    MasterPass,
2629    Other,
2630    OvercurrentFault,
2631    PowerLoss,
2632    PowerQuality,
2633    Reboot,
2634    Remote,
2635    SOCLimitReached,
2636    StoppedByEV,
2637    TimeLimitReached,
2638    Timeout,
2639}
2640/// Transaction
2641/// urn:x-oca:ocpp:uid:2:233318
2642#[derive(Debug, Clone, PartialEq, Eq)]
2643#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2644pub struct Transaction {
2645    #[cfg_attr(feature = "serde", serde(rename = "chargingState"))]
2646    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2647    pub charging_state: Option<ChargingStateEnum>,
2648    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2649    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2650    pub custom_data: Option<CustomData>,
2651    /// 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.
2652    #[cfg_attr(feature = "serde", serde(rename = "remoteStartId"))]
2653    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2654    pub remote_start_id: Option<i64>,
2655    #[cfg_attr(feature = "serde", serde(rename = "stoppedReason"))]
2656    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2657    pub stopped_reason: Option<ReasonEnum>,
2658    /// Transaction. Time_ Spent_ Charging. Elapsed_ Time
2659    /// urn:x-oca:ocpp:uid:1:569415
2660    /// 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.
2661    #[cfg_attr(feature = "serde", serde(rename = "timeSpentCharging"))]
2662    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2663    pub time_spent_charging: Option<i64>,
2664    /// This contains the Id of the transaction.
2665    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
2666    pub transaction_id: heapless::String<36usize>,
2667}
2668/// Reason the Charging Station sends this message to the CSMS
2669#[derive(Debug, Clone, PartialEq, Eq)]
2670#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2671pub enum TriggerReasonEnum {
2672    Authorized,
2673    CablePluggedIn,
2674    ChargingRateChanged,
2675    ChargingStateChanged,
2676    Deauthorized,
2677    EnergyLimitReached,
2678    EVCommunicationLost,
2679    EVConnectTimeout,
2680    MeterValueClock,
2681    MeterValuePeriodic,
2682    TimeLimitReached,
2683    Trigger,
2684    UnlockCommand,
2685    StopAuthorized,
2686    EVDeparted,
2687    EVDetected,
2688    RemoteStop,
2689    RemoteStart,
2690    AbnormalCondition,
2691    SignedDataReceived,
2692    ResetCommand,
2693}
2694/// Type of message to be triggered.
2695#[derive(Debug, Clone, PartialEq, Eq)]
2696#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2697pub enum MessageTriggerEnum {
2698    BootNotification,
2699    LogStatusNotification,
2700    FirmwareStatusNotification,
2701    Heartbeat,
2702    MeterValues,
2703    SignChargingStationCertificate,
2704    SignV2GCertificate,
2705    StatusNotification,
2706    TransactionEvent,
2707    SignCombinedCertificate,
2708    PublishFirmwareStatusNotification,
2709}
2710/// Indicates whether the Charging Station will send the requested notification or not.
2711#[derive(Debug, Clone, PartialEq, Eq)]
2712#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2713pub enum TriggerMessageStatusEnum {
2714    Accepted,
2715    Rejected,
2716    NotImplemented,
2717}
2718/// This indicates whether the Charging Station has unlocked the connector.
2719#[derive(Debug, Clone, PartialEq, Eq)]
2720#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2721pub enum UnlockStatusEnum {
2722    Unlocked,
2723    UnlockFailed,
2724    OngoingAuthorizedTransaction,
2725    UnknownConnector,
2726}
2727/// Indicates whether the Local Controller succeeded in unpublishing the firmware.
2728#[derive(Debug, Clone, PartialEq, Eq)]
2729#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2730pub enum UnpublishFirmwareStatusEnum {
2731    DownloadOngoing,
2732    NoFirmware,
2733    Unpublished,
2734}
2735#[cfg(feature = "alloc")]
2736/// Firmware
2737/// urn:x-enexis:ecdm:uid:2:233291
2738/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
2739#[derive(Debug, Clone, PartialEq, Eq)]
2740#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2741pub struct Firmware {
2742    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2743    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2744    pub custom_data: Option<CustomData>,
2745    /// Firmware. Install. Date_ Time
2746    /// urn:x-enexis:ecdm:uid:1:569462
2747    /// Date and time at which the firmware shall be installed.
2748    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
2749    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2750    pub install_date_time: Option<alloc::string::String>,
2751    /// Firmware. Location. URI
2752    /// urn:x-enexis:ecdm:uid:1:569460
2753    /// URI defining the origin of the firmware.
2754    pub location: heapless::String<512usize>,
2755    /// Firmware. Retrieve. Date_ Time
2756    /// urn:x-enexis:ecdm:uid:1:569461
2757    /// Date and time at which the firmware shall be retrieved.
2758    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
2759    pub retrieve_date_time: alloc::string::String,
2760    /// Firmware. Signature. Signature
2761    /// urn:x-enexis:ecdm:uid:1:569464
2762    /// Base64 encoded firmware signature.
2763    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2764    pub signature: Option<heapless::String<800usize>>,
2765    /// Certificate with which the firmware was signed.
2766    /// PEM encoded X.509 certificate.
2767    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
2768    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2769    pub signing_certificate: Option<heapless::String<5500usize>>,
2770}
2771#[cfg(not(feature = "alloc"))]
2772/// Firmware
2773/// urn:x-enexis:ecdm:uid:2:233291
2774/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
2775#[derive(Debug, Clone, PartialEq, Eq)]
2776#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2777pub struct Firmware<
2778    const FIRMWARE_INSTALL_DATE_TIME_CAP: usize = 1024usize,
2779    const FIRMWARE_RETRIEVE_DATE_TIME_CAP: usize = 1024usize,
2780> {
2781    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2782    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2783    pub custom_data: Option<CustomData>,
2784    /// Firmware. Install. Date_ Time
2785    /// urn:x-enexis:ecdm:uid:1:569462
2786    /// Date and time at which the firmware shall be installed.
2787    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
2788    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2789    pub install_date_time: Option<heapless::String<FIRMWARE_INSTALL_DATE_TIME_CAP>>,
2790    /// Firmware. Location. URI
2791    /// urn:x-enexis:ecdm:uid:1:569460
2792    /// URI defining the origin of the firmware.
2793    pub location: heapless::String<512usize>,
2794    /// Firmware. Retrieve. Date_ Time
2795    /// urn:x-enexis:ecdm:uid:1:569461
2796    /// Date and time at which the firmware shall be retrieved.
2797    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
2798    pub retrieve_date_time: heapless::String<FIRMWARE_RETRIEVE_DATE_TIME_CAP>,
2799    /// Firmware. Signature. Signature
2800    /// urn:x-enexis:ecdm:uid:1:569464
2801    /// Base64 encoded firmware signature.
2802    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2803    pub signature: Option<heapless::String<800usize>>,
2804    /// Certificate with which the firmware was signed.
2805    /// PEM encoded X.509 certificate.
2806    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
2807    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2808    pub signing_certificate: Option<heapless::String<5500usize>>,
2809}
2810/// This field indicates whether the Charging Station was able to accept the request.
2811#[derive(Debug, Clone, PartialEq, Eq)]
2812#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2813pub enum UpdateFirmwareStatusEnum {
2814    Accepted,
2815    Rejected,
2816    AcceptedCanceled,
2817    InvalidCertificate,
2818    RevokedCertificate,
2819}