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