Skip to main content

ocpp_types/v21/
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#[derive(Debug, Clone, PartialEq, Eq)]
12#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
13pub enum GenericStatusEnum {
14    Accepted,
15    Rejected,
16}
17#[cfg(feature = "alloc")]
18/// Element providing more information about the status.
19#[derive(Debug, Clone, PartialEq, Eq)]
20#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
21pub struct StatusInfo<CustomDataType = crate::NoCustomData> {
22    /// Additional text to provide detailed information.
23    #[cfg_attr(feature = "serde", serde(rename = "additionalInfo"))]
24    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
25    pub additional_info: Option<alloc::string::String>,
26    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
27    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
28    pub custom_data: Option<CustomDataType>,
29    /// A predefined code for the reason why the status is returned in this response. The string is case-insensitive.
30    #[cfg_attr(feature = "serde", serde(rename = "reasonCode"))]
31    pub reason_code: heapless::String<20usize>,
32}
33#[cfg(not(feature = "alloc"))]
34/// Element providing more information about the status.
35#[derive(Debug, Clone, PartialEq, Eq)]
36#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
37pub struct StatusInfo<
38    CustomDataType = crate::NoCustomData,
39    const STATUS_INFO_ADDITIONAL_INFO_CAP: usize = 1024usize,
40> {
41    /// Additional text to provide detailed information.
42    #[cfg_attr(feature = "serde", serde(rename = "additionalInfo"))]
43    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
44    pub additional_info: Option<heapless::String<STATUS_INFO_ADDITIONAL_INFO_CAP>>,
45    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
46    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
47    pub custom_data: Option<CustomDataType>,
48    /// A predefined code for the reason why the status is returned in this response. The string is case-insensitive.
49    #[cfg_attr(feature = "serde", serde(rename = "reasonCode"))]
50    pub reason_code: heapless::String<20usize>,
51}
52#[derive(Debug, Clone, PartialEq, Eq)]
53#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
54pub struct PeriodicEventStreamParams<CustomDataType = crate::NoCustomData> {
55    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
56    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
57    pub custom_data: Option<CustomDataType>,
58    /// Time in seconds after which stream data is sent.
59    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
60    pub interval: Option<i64>,
61    /// Number of items to be sent together in stream.
62    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
63    pub values: Option<i64>,
64}
65/// Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
66#[derive(Debug, Clone, PartialEq, Eq)]
67#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
68pub struct AdditionalInfo<CustomDataType = crate::NoCustomData> {
69    /// *(2.1)* This field specifies the additional IdToken.
70    #[cfg_attr(feature = "serde", serde(rename = "additionalIdToken"))]
71    pub additional_id_token: heapless::String<255usize>,
72    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
73    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
74    pub custom_data: Option<CustomDataType>,
75    /// _additionalInfo_ can be used to send extra information to CSMS in addition to the regular authorization with _IdToken_. _AdditionalInfo_ contains one or more custom _types_, which need to be agreed upon by all parties involved. When the _type_ is not supported, the CSMS/Charging Station MAY ignore the _additionalInfo_.
76    pub r#type: heapless::String<50usize>,
77}
78#[cfg(feature = "alloc")]
79/// Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
80#[derive(Debug, Clone, PartialEq, Eq)]
81#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
82pub struct IdToken<CustomDataType = crate::NoCustomData> {
83    #[cfg_attr(feature = "serde", serde(rename = "additionalInfo"))]
84    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
85    pub additional_info: Option<alloc::vec::Vec<AdditionalInfo<CustomDataType>>>,
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    /// *(2.1)* IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
90    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
91    pub id_token: heapless::String<255usize>,
92    /// *(2.1)* Enumeration of possible idToken types. Values defined in Appendix as IdTokenEnumStringType.
93    pub r#type: heapless::String<20usize>,
94}
95#[cfg(not(feature = "alloc"))]
96/// Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
97#[derive(Debug, Clone, PartialEq, Eq)]
98#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
99pub struct IdToken<
100    CustomDataType = crate::NoCustomData,
101    const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 8usize,
102> {
103    #[cfg_attr(feature = "serde", serde(rename = "additionalInfo"))]
104    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
105    pub additional_info: Option<
106        heapless::Vec<AdditionalInfo<CustomDataType>, ID_TOKEN_ADDITIONAL_INFO_CAP>,
107    >,
108    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
109    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
110    pub custom_data: Option<CustomDataType>,
111    /// *(2.1)* IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
112    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
113    pub id_token: heapless::String<255usize>,
114    /// *(2.1)* Enumeration of possible idToken types. Values defined in Appendix as IdTokenEnumStringType.
115    pub r#type: heapless::String<20usize>,
116}
117/// Used algorithms for the hashes provided.
118#[derive(Debug, Clone, PartialEq, Eq)]
119#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
120pub enum HashAlgorithmEnum {
121    SHA256,
122    SHA384,
123    SHA512,
124}
125#[cfg(feature = "alloc")]
126/// Information about a certificate for an OCSP check.
127#[derive(Debug, Clone, PartialEq, Eq)]
128#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
129pub struct OCSPRequestData<CustomDataType = crate::NoCustomData> {
130    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
131    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
132    pub custom_data: Option<CustomDataType>,
133    #[cfg_attr(feature = "serde", serde(rename = "hashAlgorithm"))]
134    pub hash_algorithm: HashAlgorithmEnum,
135    /// The hash of the DER encoded public key:
136    /// the value (excluding tag and length) of the subject
137    /// public key field in the issuer’s certificate.
138    #[cfg_attr(feature = "serde", serde(rename = "issuerKeyHash"))]
139    pub issuer_key_hash: heapless::String<128usize>,
140    /// The hash of the issuer’s distinguished
141    /// name (DN), that must be calculated over the DER
142    /// encoding of the issuer’s name field in the certificate
143    /// being checked.
144    #[cfg_attr(feature = "serde", serde(rename = "issuerNameHash"))]
145    pub issuer_name_hash: heapless::String<128usize>,
146    /// This contains the responder URL (Case insensitive).
147    #[cfg_attr(feature = "serde", serde(rename = "responderURL"))]
148    pub responder_u_r_l: alloc::string::String,
149    /// The string representation of the
150    /// hexadecimal value of the serial number without the
151    /// prefix "0x" and without leading zeroes.
152    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
153    pub serial_number: heapless::String<40usize>,
154}
155#[cfg(not(feature = "alloc"))]
156/// Information about a certificate for an OCSP check.
157#[derive(Debug, Clone, PartialEq, Eq)]
158#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
159pub struct OCSPRequestData<
160    CustomDataType = crate::NoCustomData,
161    const O_C_S_P_REQUEST_DATA_RESPONDER_U_R_L_CAP: usize = 1024usize,
162> {
163    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
164    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
165    pub custom_data: Option<CustomDataType>,
166    #[cfg_attr(feature = "serde", serde(rename = "hashAlgorithm"))]
167    pub hash_algorithm: HashAlgorithmEnum,
168    /// The hash of the DER encoded public key:
169    /// the value (excluding tag and length) of the subject
170    /// public key field in the issuer’s certificate.
171    #[cfg_attr(feature = "serde", serde(rename = "issuerKeyHash"))]
172    pub issuer_key_hash: heapless::String<128usize>,
173    /// The hash of the issuer’s distinguished
174    /// name (DN), that must be calculated over the DER
175    /// encoding of the issuer’s name field in the certificate
176    /// being checked.
177    #[cfg_attr(feature = "serde", serde(rename = "issuerNameHash"))]
178    pub issuer_name_hash: heapless::String<128usize>,
179    /// This contains the responder URL (Case insensitive).
180    #[cfg_attr(feature = "serde", serde(rename = "responderURL"))]
181    pub responder_u_r_l: heapless::String<O_C_S_P_REQUEST_DATA_RESPONDER_U_R_L_CAP>,
182    /// The string representation of the
183    /// hexadecimal value of the serial number without the
184    /// prefix "0x" and without leading zeroes.
185    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
186    pub serial_number: heapless::String<40usize>,
187}
188#[derive(Debug, Clone, PartialEq, Eq)]
189#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
190pub enum EnergyTransferModeEnum {
191    #[cfg_attr(feature = "serde", serde(rename = "AC_single_phase"))]
192    ACsinglephase,
193    #[cfg_attr(feature = "serde", serde(rename = "AC_two_phase"))]
194    ACtwophase,
195    #[cfg_attr(feature = "serde", serde(rename = "AC_three_phase"))]
196    ACthreephase,
197    DC,
198    #[cfg_attr(feature = "serde", serde(rename = "AC_BPT"))]
199    ACBPT,
200    #[cfg_attr(feature = "serde", serde(rename = "AC_BPT_DER"))]
201    ACBPTDER,
202    #[cfg_attr(feature = "serde", serde(rename = "AC_DER"))]
203    ACDER,
204    #[cfg_attr(feature = "serde", serde(rename = "DC_BPT"))]
205    DCBPT,
206    #[cfg_attr(feature = "serde", serde(rename = "DC_ACDP"))]
207    DCACDP,
208    #[cfg_attr(feature = "serde", serde(rename = "DC_ACDP_BPT"))]
209    DCACDPBPT,
210    WPT,
211}
212/// Certificate status information.
213/// - if all certificates are valid: return 'Accepted'.
214/// - if one of the certificates was revoked, return 'CertificateRevoked'.
215#[derive(Debug, Clone, PartialEq, Eq)]
216#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
217pub enum AuthorizeCertificateStatusEnum {
218    Accepted,
219    SignatureError,
220    CertificateExpired,
221    CertificateRevoked,
222    NoCertificateAvailable,
223    CertChainError,
224    ContractCancelled,
225}
226/// Format of the message.
227#[derive(Debug, Clone, PartialEq, Eq)]
228#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
229pub enum MessageFormatEnum {
230    ASCII,
231    HTML,
232    URI,
233    UTF8,
234    QRCODE,
235}
236#[cfg(feature = "alloc")]
237/// Contains message details, for a message to be displayed on a Charging Station.
238#[derive(Debug, Clone, PartialEq, Eq)]
239#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
240pub struct MessageContent<CustomDataType = crate::NoCustomData> {
241    /// *(2.1)* Required. Message contents. +
242    /// Maximum length supported by Charging Station is given in OCPPCommCtrlr.FieldLength\["MessageContentType.content"\].
243    ///     Maximum length defaults to 1024.
244    pub content: alloc::string::String,
245    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
246    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
247    pub custom_data: Option<CustomDataType>,
248    pub format: MessageFormatEnum,
249    /// Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
250    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
251    pub language: Option<heapless::String<8usize>>,
252}
253#[cfg(not(feature = "alloc"))]
254/// Contains message details, for a message to be displayed on a Charging Station.
255#[derive(Debug, Clone, PartialEq, Eq)]
256#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
257pub struct MessageContent<
258    CustomDataType = crate::NoCustomData,
259    const MESSAGE_CONTENT_CONTENT_CAP: usize = 1024usize,
260> {
261    /// *(2.1)* Required. Message contents. +
262    /// Maximum length supported by Charging Station is given in OCPPCommCtrlr.FieldLength\["MessageContentType.content"\].
263    ///     Maximum length defaults to 1024.
264    pub content: heapless::String<MESSAGE_CONTENT_CONTENT_CAP>,
265    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
266    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
267    pub custom_data: Option<CustomDataType>,
268    pub format: MessageFormatEnum,
269    /// Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
270    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
271    pub language: Option<heapless::String<8usize>>,
272}
273/// Current status of the ID Token.
274#[derive(Debug, Clone, PartialEq, Eq)]
275#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
276pub enum AuthorizationStatusEnum {
277    Accepted,
278    Blocked,
279    ConcurrentTx,
280    Expired,
281    Invalid,
282    NoCredit,
283    NotAllowedTypeEVSE,
284    NotAtThisLocation,
285    NotAtThisTime,
286    Unknown,
287}
288#[cfg(feature = "alloc")]
289/// Contains status information about an identifier.
290/// 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.
291#[derive(Debug, Clone, PartialEq, Eq)]
292#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
293pub struct IdTokenInfo<CustomDataType = crate::NoCustomData> {
294    /// Date and Time after which the token must be considered invalid.
295    #[cfg_attr(feature = "serde", serde(rename = "cacheExpiryDateTime"))]
296    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
297    pub cache_expiry_date_time: Option<crate::OcppTimestamp>,
298    /// 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.
299    #[cfg_attr(feature = "serde", serde(rename = "chargingPriority"))]
300    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
301    pub charging_priority: Option<i64>,
302    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
303    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
304    pub custom_data: Option<CustomDataType>,
305    /// Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
306    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
307    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
308    pub evse_id: Option<alloc::vec::Vec<i64>>,
309    #[cfg_attr(feature = "serde", serde(rename = "groupIdToken"))]
310    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
311    pub group_id_token: Option<IdToken<CustomDataType>>,
312    /// Preferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
313    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
314    pub language1: Option<heapless::String<8usize>>,
315    /// 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;.
316    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
317    pub language2: Option<heapless::String<8usize>>,
318    #[cfg_attr(feature = "serde", serde(rename = "personalMessage"))]
319    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
320    pub personal_message: Option<MessageContent<CustomDataType>>,
321    pub status: AuthorizationStatusEnum,
322}
323#[cfg(not(feature = "alloc"))]
324/// Contains status information about an identifier.
325/// 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.
326#[derive(Debug, Clone, PartialEq, Eq)]
327#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
328pub struct IdTokenInfo<
329    CustomDataType = crate::NoCustomData,
330    const ID_TOKEN_INFO_EVSE_ID_CAP: usize = 8usize,
331    const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 8usize,
332    const MESSAGE_CONTENT_CONTENT_CAP: usize = 1024usize,
333> {
334    /// Date and Time after which the token must be considered invalid.
335    #[cfg_attr(feature = "serde", serde(rename = "cacheExpiryDateTime"))]
336    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
337    pub cache_expiry_date_time: Option<crate::OcppTimestamp>,
338    /// 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.
339    #[cfg_attr(feature = "serde", serde(rename = "chargingPriority"))]
340    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
341    pub charging_priority: Option<i64>,
342    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
343    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
344    pub custom_data: Option<CustomDataType>,
345    /// Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
346    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
347    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
348    pub evse_id: Option<heapless::Vec<i64, ID_TOKEN_INFO_EVSE_ID_CAP>>,
349    #[cfg_attr(feature = "serde", serde(rename = "groupIdToken"))]
350    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
351    pub group_id_token: Option<IdToken<CustomDataType, ID_TOKEN_ADDITIONAL_INFO_CAP>>,
352    /// Preferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,\[RFC5646\]&gt;&gt;.
353    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
354    pub language1: Option<heapless::String<8usize>>,
355    /// 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;.
356    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
357    pub language2: Option<heapless::String<8usize>>,
358    #[cfg_attr(feature = "serde", serde(rename = "personalMessage"))]
359    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
360    pub personal_message: Option<
361        MessageContent<CustomDataType, MESSAGE_CONTENT_CONTENT_CAP>,
362    >,
363    pub status: AuthorizationStatusEnum,
364}
365#[derive(Debug, Clone, PartialEq, Eq)]
366#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
367pub enum DayOfWeekEnum {
368    Monday,
369    Tuesday,
370    Wednesday,
371    Thursday,
372    Friday,
373    Saturday,
374    Sunday,
375}
376/// Type of EVSE (AC, DC) this tariff applies to.
377#[derive(Debug, Clone, PartialEq, Eq)]
378#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
379pub enum EvseKindEnum {
380    AC,
381    DC,
382}
383/// These conditions describe if and when a TariffEnergyType or TariffTimeType applies during a transaction.
384///
385/// When more than one restriction is set, they are to be treated as a logical AND. All need to be valid before this price is active.
386///
387/// For reverse energy flow (discharging) negative values of energy, power and current are used.
388///
389/// NOTE: _minXXX_ (where XXX = Kwh/A/Kw) must be read as "closest to zero", and _maxXXX_ as "furthest from zero". For example, a *charging* power range from 10 kW to 50 kWh is given by _minPower_ = 10000 and _maxPower_ = 50000, and a *discharging* power range from -10 kW to -50 kW is given by _minPower_ = -10 and _maxPower_ = -50.
390///
391/// NOTE: _startTimeOfDay_ and _endTimeOfDay_ are in local time, because it is the time in the tariff as it is shown to the EV driver at the Charging Station.
392/// A Charging Station will convert this to the internal time zone that it uses (which is recommended to be UTC, see section Generic chapter 3.1) when performing cost calculation.
393#[derive(Debug, Clone, PartialEq)]
394#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
395pub struct TariffConditions<CustomDataType = crate::NoCustomData> {
396    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
397    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
398    pub custom_data: Option<CustomDataType>,
399    /// Day(s) of the week this is tariff applies.
400    #[cfg_attr(feature = "serde", serde(rename = "dayOfWeek"))]
401    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
402    pub day_of_week: Option<heapless::Vec<DayOfWeekEnum, 7usize>>,
403    /// End time of day in local time. Same syntax as _startTimeOfDay_. +
404    ///     If end time &lt; start time then the period wraps around to the next day. +
405    ///     To stop at end of the day use: 00:00.
406    #[cfg_attr(feature = "serde", serde(rename = "endTimeOfDay"))]
407    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
408    pub end_time_of_day: Option<crate::OcppTimeOfDay>,
409    #[cfg_attr(feature = "serde", serde(rename = "evseKind"))]
410    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
411    pub evse_kind: Option<EvseKindEnum>,
412    /// Maximum duration in seconds the charging MUST last (exclusive).
413    ///       When the duration of a charging is shorter than the defined value, this price is or becomes active.
414    ///       After that moment, this price is no longer active.
415    #[cfg_attr(feature = "serde", serde(rename = "maxChargingTime"))]
416    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
417    pub max_charging_time: Option<i64>,
418    /// Sum of the maximum current (in Amperes) over all phases, for example 20 A.
419    ///       When the EV is charging with less than the defined amount of current, this price becomes/is active. If the charging current is or becomes higher, this price is not or no longer valid and becomes inactive.
420    ///       This is NOT about the maximum current over the entire transaction.
421    #[cfg_attr(feature = "serde", serde(rename = "maxCurrent"))]
422    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
423    pub max_current: Option<f64>,
424    /// Maximum consumed energy in Wh, for example 50000 Wh.
425    ///     Valid until this amount of energy (exclusive) being used.
426    #[cfg_attr(feature = "serde", serde(rename = "maxEnergy"))]
427    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
428    pub max_energy: Option<f64>,
429    /// Maximum duration in seconds the idle period (i.e. not charging) MUST last (exclusive).
430    ///       When the duration of idle time is shorter than the defined value, this price is or becomes active.
431    ///       After that moment, this price is no longer active.
432    #[cfg_attr(feature = "serde", serde(rename = "maxIdleTime"))]
433    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
434    pub max_idle_time: Option<i64>,
435    /// Maximum power in W, for example 20000 W.
436    ///       When the EV is charging with less than the defined amount of power, this price becomes/is active.
437    ///       If the charging power is or becomes higher, this price is not or no longer valid and becomes inactive.
438    ///       This is NOT about the maximum power over the entire transaction.
439    #[cfg_attr(feature = "serde", serde(rename = "maxPower"))]
440    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
441    pub max_power: Option<f64>,
442    /// Maximum duration in seconds the transaction (charging &amp; idle) MUST last (exclusive).
443    ///       When the duration of a transaction is shorter than the defined value, this price is or becomes active.
444    ///       After that moment, this price is no longer active.
445    #[cfg_attr(feature = "serde", serde(rename = "maxTime"))]
446    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
447    pub max_time: Option<i64>,
448    /// Minimum duration in seconds the charging MUST last (inclusive).
449    ///       When the duration of a charging is longer than the defined value, this price is or becomes active.
450    ///       Before that moment, this price is not yet active.
451    #[cfg_attr(feature = "serde", serde(rename = "minChargingTime"))]
452    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
453    pub min_charging_time: Option<i64>,
454    /// Sum of the minimum current (in Amperes) over all phases, for example 5 A.
455    ///     When the EV is charging with more than, or equal to, the defined amount of current, this price is/becomes active. If the charging current is or becomes lower, this price is not or no longer valid and becomes inactive. +
456    ///     This is NOT about the minimum current over the entire transaction.
457    #[cfg_attr(feature = "serde", serde(rename = "minCurrent"))]
458    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
459    pub min_current: Option<f64>,
460    /// Minimum consumed energy in Wh, for example 20000 Wh.
461    ///     Valid from this amount of energy (inclusive) being used.
462    #[cfg_attr(feature = "serde", serde(rename = "minEnergy"))]
463    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
464    pub min_energy: Option<f64>,
465    /// Minimum duration in seconds the idle period (i.e. not charging) MUST last (inclusive).
466    ///       When the duration of the idle time is longer than the defined value, this price is or becomes active.
467    ///       Before that moment, this price is not yet active.
468    #[cfg_attr(feature = "serde", serde(rename = "minIdleTime"))]
469    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
470    pub min_idle_time: Option<i64>,
471    /// Minimum power in W, for example 5000 W.
472    ///       When the EV is charging with more than, or equal to, the defined amount of power, this price is/becomes active.
473    ///       If the charging power is or becomes lower, this price is not or no longer valid and becomes inactive.
474    ///       This is NOT about the minimum power over the entire transaction.
475    #[cfg_attr(feature = "serde", serde(rename = "minPower"))]
476    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
477    pub min_power: Option<f64>,
478    /// Minimum duration in seconds the transaction (charging &amp; idle) MUST last (inclusive).
479    ///       When the duration of a transaction is longer than the defined value, this price is or becomes active.
480    ///       Before that moment, this price is not yet active.
481    #[cfg_attr(feature = "serde", serde(rename = "minTime"))]
482    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
483    pub min_time: Option<i64>,
484    /// Start time of day in local time. +
485    /// Format as per RFC 3339: time-hour ":" time-minute  +
486    /// Must be in 24h format with leading zeros. Hour/Minute separator: ":"
487    /// Regex: (\[0-1\]\[0-9\]\|2\[0-3\]):\[0-5\]\[0-9\]
488    #[cfg_attr(feature = "serde", serde(rename = "startTimeOfDay"))]
489    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
490    pub start_time_of_day: Option<crate::OcppTimeOfDay>,
491    /// Start date in local time, for example: 2015-12-24.
492    /// Valid from this day (inclusive). +
493    /// Format as per RFC 3339: full-date  +
494    ///
495    /// Regex: (\[12\]\[0-9\]{3})-(0\[1-9\]\|1\[0-2\])-(0\[1-9\]\|\[12\]\[0-9\]\|3\[01\])
496    #[cfg_attr(feature = "serde", serde(rename = "validFromDate"))]
497    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
498    pub valid_from_date: Option<crate::OcppDate>,
499    /// End date in local time, for example: 2015-12-27.
500    ///     Valid until this day (exclusive). Same syntax as _validFromDate_.
501    #[cfg_attr(feature = "serde", serde(rename = "validToDate"))]
502    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
503    pub valid_to_date: Option<crate::OcppDate>,
504}
505/// Tariff with optional conditions for a time duration price.
506#[derive(Debug, Clone, PartialEq)]
507#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
508pub struct TariffTimePrice<CustomDataType = crate::NoCustomData> {
509    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
510    pub conditions: Option<TariffConditions<CustomDataType>>,
511    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
512    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
513    pub custom_data: Option<CustomDataType>,
514    /// Price per minute (excl. tax) for this element.
515    #[cfg_attr(feature = "serde", serde(rename = "priceMinute"))]
516    pub price_minute: f64,
517}
518/// Tax percentage
519#[derive(Debug, Clone, PartialEq)]
520#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
521pub struct TaxRate<CustomDataType = crate::NoCustomData> {
522    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
523    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
524    pub custom_data: Option<CustomDataType>,
525    /// Stack level for this type of tax. Default value, when absent, is 0. +
526    /// _stack_ = 0: tax on net price; +
527    /// _stack_ = 1: tax added on top of _stack_ 0; +
528    /// _stack_ = 2: tax added on top of _stack_ 1, etc.
529    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
530    pub stack: Option<i64>,
531    /// Tax percentage
532    pub tax: f64,
533    /// Type of this tax, e.g.  "Federal ",  "State", for information on receipt.
534    pub r#type: heapless::String<20usize>,
535}
536#[cfg(feature = "alloc")]
537/// Price elements and tax for time
538#[derive(Debug, Clone, PartialEq)]
539#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
540pub struct TariffTime<CustomDataType = crate::NoCustomData> {
541    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
542    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
543    pub custom_data: Option<CustomDataType>,
544    pub prices: alloc::vec::Vec<TariffTimePrice<CustomDataType>>,
545    #[cfg_attr(feature = "serde", serde(rename = "taxRates"))]
546    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
547    pub tax_rates: Option<heapless::Vec<TaxRate<CustomDataType>, 5usize>>,
548}
549#[cfg(not(feature = "alloc"))]
550/// Price elements and tax for time
551#[derive(Debug, Clone, PartialEq)]
552#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
553pub struct TariffTime<
554    CustomDataType = crate::NoCustomData,
555    const TARIFF_TIME_PRICES_CAP: usize = 8usize,
556> {
557    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
558    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
559    pub custom_data: Option<CustomDataType>,
560    pub prices: heapless::Vec<TariffTimePrice<CustomDataType>, TARIFF_TIME_PRICES_CAP>,
561    #[cfg_attr(feature = "serde", serde(rename = "taxRates"))]
562    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
563    pub tax_rates: Option<heapless::Vec<TaxRate<CustomDataType>, 5usize>>,
564}
565/// Tariff with optional conditions for an energy price.
566#[derive(Debug, Clone, PartialEq)]
567#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
568pub struct TariffEnergyPrice<CustomDataType = crate::NoCustomData> {
569    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
570    pub conditions: Option<TariffConditions<CustomDataType>>,
571    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
572    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
573    pub custom_data: Option<CustomDataType>,
574    /// Price per kWh (excl. tax) for this element.
575    #[cfg_attr(feature = "serde", serde(rename = "priceKwh"))]
576    pub price_kwh: f64,
577}
578#[cfg(feature = "alloc")]
579/// Price elements and tax for energy
580#[derive(Debug, Clone, PartialEq)]
581#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
582pub struct TariffEnergy<CustomDataType = crate::NoCustomData> {
583    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
584    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
585    pub custom_data: Option<CustomDataType>,
586    pub prices: alloc::vec::Vec<TariffEnergyPrice<CustomDataType>>,
587    #[cfg_attr(feature = "serde", serde(rename = "taxRates"))]
588    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
589    pub tax_rates: Option<heapless::Vec<TaxRate<CustomDataType>, 5usize>>,
590}
591#[cfg(not(feature = "alloc"))]
592/// Price elements and tax for energy
593#[derive(Debug, Clone, PartialEq)]
594#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
595pub struct TariffEnergy<
596    CustomDataType = crate::NoCustomData,
597    const TARIFF_ENERGY_PRICES_CAP: usize = 8usize,
598> {
599    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
600    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
601    pub custom_data: Option<CustomDataType>,
602    pub prices: heapless::Vec<
603        TariffEnergyPrice<CustomDataType>,
604        TARIFF_ENERGY_PRICES_CAP,
605    >,
606    #[cfg_attr(feature = "serde", serde(rename = "taxRates"))]
607    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
608    pub tax_rates: Option<heapless::Vec<TaxRate<CustomDataType>, 5usize>>,
609}
610/// These conditions describe if a FixedPrice applies at start of the transaction.
611///
612/// When more than one restriction is set, they are to be treated as a logical AND. All need to be valid before this price is active.
613///
614/// NOTE: _startTimeOfDay_ and _endTimeOfDay_ are in local time, because it is the time in the tariff as it is shown to the EV driver at the Charging Station.
615/// A Charging Station will convert this to the internal time zone that it uses (which is recommended to be UTC, see section Generic chapter 3.1) when performing cost calculation.
616#[derive(Debug, Clone, PartialEq, Eq)]
617#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
618pub struct TariffConditionsFixed<CustomDataType = crate::NoCustomData> {
619    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
620    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
621    pub custom_data: Option<CustomDataType>,
622    /// Day(s) of the week this is tariff applies.
623    #[cfg_attr(feature = "serde", serde(rename = "dayOfWeek"))]
624    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
625    pub day_of_week: Option<heapless::Vec<DayOfWeekEnum, 7usize>>,
626    /// End time of day in local time. Same syntax as _startTimeOfDay_. +
627    ///     If end time &lt; start time then the period wraps around to the next day. +
628    ///     To stop at end of the day use: 00:00.
629    #[cfg_attr(feature = "serde", serde(rename = "endTimeOfDay"))]
630    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
631    pub end_time_of_day: Option<crate::OcppTimeOfDay>,
632    #[cfg_attr(feature = "serde", serde(rename = "evseKind"))]
633    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
634    pub evse_kind: Option<EvseKindEnum>,
635    /// For which payment brand this (adhoc) tariff applies. Can be used to add a surcharge for certain payment brands.
636    ///     Based on value of _additionalIdToken_ from _idToken.additionalInfo.type_ = "PaymentBrand".
637    #[cfg_attr(feature = "serde", serde(rename = "paymentBrand"))]
638    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
639    pub payment_brand: Option<heapless::String<20usize>>,
640    /// Type of adhoc payment, e.g. CC, Debit.
641    ///     Based on value of _additionalIdToken_ from _idToken.additionalInfo.type_ = "PaymentRecognition".
642    #[cfg_attr(feature = "serde", serde(rename = "paymentRecognition"))]
643    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
644    pub payment_recognition: Option<heapless::String<20usize>>,
645    /// Start time of day in local time. +
646    /// Format as per RFC 3339: time-hour ":" time-minute  +
647    /// Must be in 24h format with leading zeros. Hour/Minute separator: ":"
648    /// Regex: (\[0-1\]\[0-9\]\|2\[0-3\]):\[0-5\]\[0-9\]
649    #[cfg_attr(feature = "serde", serde(rename = "startTimeOfDay"))]
650    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
651    pub start_time_of_day: Option<crate::OcppTimeOfDay>,
652    /// Start date in local time, for example: 2015-12-24.
653    /// Valid from this day (inclusive). +
654    /// Format as per RFC 3339: full-date  +
655    ///
656    /// Regex: (\[12\]\[0-9\]{3})-(0\[1-9\]\|1\[0-2\])-(0\[1-9\]\|\[12\]\[0-9\]\|3\[01\])
657    #[cfg_attr(feature = "serde", serde(rename = "validFromDate"))]
658    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
659    pub valid_from_date: Option<crate::OcppDate>,
660    /// End date in local time, for example: 2015-12-27.
661    ///     Valid until this day (exclusive). Same syntax as _validFromDate_.
662    #[cfg_attr(feature = "serde", serde(rename = "validToDate"))]
663    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
664    pub valid_to_date: Option<crate::OcppDate>,
665}
666/// Tariff with optional conditions for a fixed price.
667#[derive(Debug, Clone, PartialEq)]
668#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
669pub struct TariffFixedPrice<CustomDataType = crate::NoCustomData> {
670    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
671    pub conditions: Option<TariffConditionsFixed<CustomDataType>>,
672    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
673    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
674    pub custom_data: Option<CustomDataType>,
675    /// Fixed price  for this element e.g. a start fee.
676    #[cfg_attr(feature = "serde", serde(rename = "priceFixed"))]
677    pub price_fixed: f64,
678}
679#[cfg(feature = "alloc")]
680#[derive(Debug, Clone, PartialEq)]
681#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
682pub struct TariffFixed<CustomDataType = crate::NoCustomData> {
683    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
684    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
685    pub custom_data: Option<CustomDataType>,
686    pub prices: alloc::vec::Vec<TariffFixedPrice<CustomDataType>>,
687    #[cfg_attr(feature = "serde", serde(rename = "taxRates"))]
688    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
689    pub tax_rates: Option<heapless::Vec<TaxRate<CustomDataType>, 5usize>>,
690}
691#[cfg(not(feature = "alloc"))]
692#[derive(Debug, Clone, PartialEq)]
693#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
694pub struct TariffFixed<
695    CustomDataType = crate::NoCustomData,
696    const TARIFF_FIXED_PRICES_CAP: usize = 8usize,
697> {
698    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
699    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
700    pub custom_data: Option<CustomDataType>,
701    pub prices: heapless::Vec<TariffFixedPrice<CustomDataType>, TARIFF_FIXED_PRICES_CAP>,
702    #[cfg_attr(feature = "serde", serde(rename = "taxRates"))]
703    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
704    pub tax_rates: Option<heapless::Vec<TaxRate<CustomDataType>, 5usize>>,
705}
706/// Price with and without tax. At least one of _exclTax_, _inclTax_ must be present.
707#[derive(Debug, Clone, PartialEq)]
708#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
709pub struct Price<CustomDataType = crate::NoCustomData> {
710    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
711    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
712    pub custom_data: Option<CustomDataType>,
713    /// Price/cost excluding tax. Can be absent if _inclTax_ is present.
714    #[cfg_attr(feature = "serde", serde(rename = "exclTax"))]
715    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
716    pub excl_tax: Option<f64>,
717    /// Price/cost including tax. Can be absent if _exclTax_ is present.
718    #[cfg_attr(feature = "serde", serde(rename = "inclTax"))]
719    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
720    pub incl_tax: Option<f64>,
721    #[cfg_attr(feature = "serde", serde(rename = "taxRates"))]
722    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
723    pub tax_rates: Option<heapless::Vec<TaxRate<CustomDataType>, 5usize>>,
724}
725#[cfg(feature = "alloc")]
726/// A tariff is described by fields with prices for:
727/// energy,
728/// charging time,
729/// idle time,
730/// fixed fee,
731/// reservation time,
732/// reservation fixed fee. +
733/// Each of these fields may have (optional) conditions that specify when a price is applicable. +
734/// The _description_ contains a human-readable explanation of the tariff to be shown to the user. +
735/// The other fields are parameters that define the tariff. These are used by the charging station to calculate the price.
736#[derive(Debug, Clone, PartialEq)]
737#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
738pub struct Tariff<CustomDataType = crate::NoCustomData> {
739    #[cfg_attr(feature = "serde", serde(rename = "chargingTime"))]
740    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
741    pub charging_time: Option<TariffTime<CustomDataType>>,
742    /// Currency code according to ISO 4217
743    pub currency: heapless::String<3usize>,
744    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
745    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
746    pub custom_data: Option<CustomDataType>,
747    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
748    pub description: Option<heapless::Vec<MessageContent<CustomDataType>, 10usize>>,
749    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
750    pub energy: Option<TariffEnergy<CustomDataType>>,
751    #[cfg_attr(feature = "serde", serde(rename = "fixedFee"))]
752    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
753    pub fixed_fee: Option<TariffFixed<CustomDataType>>,
754    #[cfg_attr(feature = "serde", serde(rename = "idleTime"))]
755    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
756    pub idle_time: Option<TariffTime<CustomDataType>>,
757    #[cfg_attr(feature = "serde", serde(rename = "maxCost"))]
758    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
759    pub max_cost: Option<Price<CustomDataType>>,
760    #[cfg_attr(feature = "serde", serde(rename = "minCost"))]
761    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
762    pub min_cost: Option<Price<CustomDataType>>,
763    #[cfg_attr(feature = "serde", serde(rename = "reservationFixed"))]
764    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
765    pub reservation_fixed: Option<TariffFixed<CustomDataType>>,
766    #[cfg_attr(feature = "serde", serde(rename = "reservationTime"))]
767    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
768    pub reservation_time: Option<TariffTime<CustomDataType>>,
769    /// Unique id of tariff
770    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
771    pub tariff_id: heapless::String<60usize>,
772    /// Time when this tariff becomes active. When absent, it is immediately active.
773    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
774    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
775    pub valid_from: Option<crate::OcppTimestamp>,
776}
777#[cfg(not(feature = "alloc"))]
778/// A tariff is described by fields with prices for:
779/// energy,
780/// charging time,
781/// idle time,
782/// fixed fee,
783/// reservation time,
784/// reservation fixed fee. +
785/// Each of these fields may have (optional) conditions that specify when a price is applicable. +
786/// The _description_ contains a human-readable explanation of the tariff to be shown to the user. +
787/// The other fields are parameters that define the tariff. These are used by the charging station to calculate the price.
788#[derive(Debug, Clone, PartialEq)]
789#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
790pub struct Tariff<
791    CustomDataType = crate::NoCustomData,
792    const TARIFF_TIME_PRICES_CAP: usize = 8usize,
793    const MESSAGE_CONTENT_CONTENT_CAP: usize = 1024usize,
794    const TARIFF_ENERGY_PRICES_CAP: usize = 8usize,
795    const TARIFF_FIXED_PRICES_CAP: usize = 8usize,
796> {
797    #[cfg_attr(feature = "serde", serde(rename = "chargingTime"))]
798    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
799    pub charging_time: Option<TariffTime<CustomDataType, TARIFF_TIME_PRICES_CAP>>,
800    /// Currency code according to ISO 4217
801    pub currency: heapless::String<3usize>,
802    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
803    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
804    pub custom_data: Option<CustomDataType>,
805    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
806    pub description: Option<
807        heapless::Vec<
808            MessageContent<CustomDataType, MESSAGE_CONTENT_CONTENT_CAP>,
809            10usize,
810        >,
811    >,
812    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
813    pub energy: Option<TariffEnergy<CustomDataType, TARIFF_ENERGY_PRICES_CAP>>,
814    #[cfg_attr(feature = "serde", serde(rename = "fixedFee"))]
815    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
816    pub fixed_fee: Option<TariffFixed<CustomDataType, TARIFF_FIXED_PRICES_CAP>>,
817    #[cfg_attr(feature = "serde", serde(rename = "idleTime"))]
818    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
819    pub idle_time: Option<TariffTime<CustomDataType, TARIFF_TIME_PRICES_CAP>>,
820    #[cfg_attr(feature = "serde", serde(rename = "maxCost"))]
821    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
822    pub max_cost: Option<Price<CustomDataType>>,
823    #[cfg_attr(feature = "serde", serde(rename = "minCost"))]
824    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
825    pub min_cost: Option<Price<CustomDataType>>,
826    #[cfg_attr(feature = "serde", serde(rename = "reservationFixed"))]
827    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
828    pub reservation_fixed: Option<TariffFixed<CustomDataType, TARIFF_FIXED_PRICES_CAP>>,
829    #[cfg_attr(feature = "serde", serde(rename = "reservationTime"))]
830    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
831    pub reservation_time: Option<TariffTime<CustomDataType, TARIFF_TIME_PRICES_CAP>>,
832    /// Unique id of tariff
833    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
834    pub tariff_id: heapless::String<60usize>,
835    /// Time when this tariff becomes active. When absent, it is immediately active.
836    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
837    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
838    pub valid_from: Option<crate::OcppTimestamp>,
839}
840#[derive(Debug, Clone, PartialEq)]
841#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
842pub struct BatteryData<CustomDataType = crate::NoCustomData> {
843    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
844    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
845    pub custom_data: Option<CustomDataType>,
846    /// Slot number where battery is inserted or removed.
847    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
848    pub evse_id: i64,
849    /// Production date of battery.
850    #[cfg_attr(feature = "serde", serde(rename = "productionDate"))]
851    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
852    pub production_date: Option<crate::OcppTimestamp>,
853    /// Serial number of battery.
854    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
855    pub serial_number: heapless::String<50usize>,
856    /// State of charge
857    #[cfg_attr(feature = "serde", serde(rename = "soC"))]
858    pub so_c: f64,
859    /// State of health
860    #[cfg_attr(feature = "serde", serde(rename = "soH"))]
861    pub so_h: f64,
862    /// Vendor-specific info from battery in undefined format.
863    #[cfg_attr(feature = "serde", serde(rename = "vendorInfo"))]
864    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
865    pub vendor_info: Option<heapless::String<500usize>>,
866}
867/// Battery in/out
868#[derive(Debug, Clone, PartialEq, Eq)]
869#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
870pub enum BatterySwapEventEnum {
871    BatteryIn,
872    BatteryOut,
873    BatteryOutTimeout,
874}
875/// Defines parameters required for initiating and maintaining wireless communication with other devices.
876#[derive(Debug, Clone, PartialEq, Eq)]
877#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
878pub struct Modem<CustomDataType = crate::NoCustomData> {
879    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
880    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
881    pub custom_data: Option<CustomDataType>,
882    /// This contains the ICCID of the modem’s SIM card.
883    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
884    pub iccid: Option<heapless::String<20usize>>,
885    /// This contains the IMSI of the modem’s SIM card.
886    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
887    pub imsi: Option<heapless::String<20usize>>,
888}
889/// The physical system where an Electrical Vehicle (EV) can be charged.
890#[derive(Debug, Clone, PartialEq, Eq)]
891#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
892pub struct ChargingStation<CustomDataType = crate::NoCustomData> {
893    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
894    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
895    pub custom_data: Option<CustomDataType>,
896    /// This contains the firmware version of the Charging Station.
897    #[cfg_attr(feature = "serde", serde(rename = "firmwareVersion"))]
898    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
899    pub firmware_version: Option<heapless::String<50usize>>,
900    /// Defines the model of the device.
901    pub model: heapless::String<20usize>,
902    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
903    pub modem: Option<Modem<CustomDataType>>,
904    /// Vendor-specific device identifier.
905    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
906    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
907    pub serial_number: Option<heapless::String<25usize>>,
908    /// Identifies the vendor (not necessarily in a unique manner).
909    #[cfg_attr(feature = "serde", serde(rename = "vendorName"))]
910    pub vendor_name: heapless::String<50usize>,
911}
912/// This contains the reason for sending this message to the CSMS.
913#[derive(Debug, Clone, PartialEq, Eq)]
914#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
915pub enum BootReasonEnum {
916    ApplicationReset,
917    FirmwareUpdate,
918    LocalReset,
919    PowerUp,
920    RemoteReset,
921    ScheduledReset,
922    Triggered,
923    Unknown,
924    Watchdog,
925}
926/// This contains whether the Charging Station has been registered
927/// within the CSMS.
928#[derive(Debug, Clone, PartialEq, Eq)]
929#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
930pub enum RegistrationStatusEnum {
931    Accepted,
932    Pending,
933    Rejected,
934}
935/// This indicates the success or failure of the canceling of a reservation by CSMS.
936#[derive(Debug, Clone, PartialEq, Eq)]
937#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
938pub enum CancelReservationStatusEnum {
939    Accepted,
940    Rejected,
941}
942/// 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.
943#[derive(Debug, Clone, PartialEq, Eq)]
944#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
945pub enum CertificateSigningUseEnum {
946    ChargingStationCertificate,
947    V2GCertificate,
948    V2G20Certificate,
949}
950/// Returns whether certificate signing has been accepted, otherwise rejected.
951#[derive(Debug, Clone, PartialEq, Eq)]
952#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
953pub enum CertificateSignedStatusEnum {
954    Accepted,
955    Rejected,
956}
957/// Electric Vehicle Supply Equipment
958#[derive(Debug, Clone, PartialEq, Eq)]
959#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
960pub struct EVSE<CustomDataType = crate::NoCustomData> {
961    /// An id to designate a specific connector (on an EVSE) by connector index number.
962    #[cfg_attr(feature = "serde", serde(rename = "connectorId"))]
963    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
964    pub connector_id: Option<i64>,
965    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
966    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
967    pub custom_data: Option<CustomDataType>,
968    /// EVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.
969    pub id: i64,
970}
971/// This contains the type of availability change that the Charging Station should perform.
972#[derive(Debug, Clone, PartialEq, Eq)]
973#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
974pub enum OperationalStatusEnum {
975    Inoperative,
976    Operative,
977}
978/// This indicates whether the Charging Station is able to perform the availability change.
979#[derive(Debug, Clone, PartialEq, Eq)]
980#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
981pub enum ChangeAvailabilityStatusEnum {
982    Accepted,
983    Rejected,
984    Scheduled,
985}
986/// Status of the operation
987#[derive(Debug, Clone, PartialEq, Eq)]
988#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
989pub enum TariffChangeStatusEnum {
990    Accepted,
991    Rejected,
992    TooManyElements,
993    ConditionNotSupported,
994    TxNotFound,
995    NoCurrencyChange,
996}
997/// Accepted if the Charging Station has executed the request, otherwise rejected.
998#[derive(Debug, Clone, PartialEq, Eq)]
999#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1000pub enum ClearCacheStatusEnum {
1001    Accepted,
1002    Rejected,
1003}
1004/// Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request.
1005#[derive(Debug, Clone, PartialEq, Eq)]
1006#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1007pub enum ChargingProfilePurposeEnum {
1008    ChargingStationExternalConstraints,
1009    ChargingStationMaxProfile,
1010    TxDefaultProfile,
1011    TxProfile,
1012    PriorityCharging,
1013    LocalGeneration,
1014}
1015/// A ClearChargingProfileType is a filter for charging profiles to be cleared by ClearChargingProfileRequest.
1016#[derive(Debug, Clone, PartialEq, Eq)]
1017#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1018pub struct ClearChargingProfile<CustomDataType = crate::NoCustomData> {
1019    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
1020    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1021    pub charging_profile_purpose: Option<ChargingProfilePurposeEnum>,
1022    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1023    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1024    pub custom_data: Option<CustomDataType>,
1025    /// 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.
1026    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
1027    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1028    pub evse_id: Option<i64>,
1029    /// Specifies the stackLevel for which charging profiles will be cleared, if they meet the other criteria in the request.
1030    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
1031    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1032    pub stack_level: Option<i64>,
1033}
1034/// Indicates if the Charging Station was able to execute the request.
1035#[derive(Debug, Clone, PartialEq, Eq)]
1036#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1037pub enum ClearChargingProfileStatusEnum {
1038    Accepted,
1039    Unknown,
1040}
1041/// Name of control settings to clear. Not used when _controlId_ is provided.
1042#[derive(Debug, Clone, PartialEq, Eq)]
1043#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1044pub enum DERControlEnum {
1045    EnterService,
1046    FreqDroop,
1047    FreqWatt,
1048    FixedPFAbsorb,
1049    FixedPFInject,
1050    FixedVar,
1051    Gradients,
1052    HFMustTrip,
1053    HFMayTrip,
1054    HVMustTrip,
1055    HVMomCess,
1056    HVMayTrip,
1057    LimitMaxDischarge,
1058    LFMustTrip,
1059    LVMustTrip,
1060    LVMomCess,
1061    LVMayTrip,
1062    PowerMonitoringMustTrip,
1063    VoltVar,
1064    VoltWatt,
1065    WattPF,
1066    WattVar,
1067}
1068/// Result of operation.
1069#[derive(Debug, Clone, PartialEq, Eq)]
1070#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1071pub enum DERControlStatusEnum {
1072    Accepted,
1073    Rejected,
1074    NotSupported,
1075    NotFound,
1076}
1077/// Returns whether the Charging Station has been able to remove the message.
1078#[derive(Debug, Clone, PartialEq, Eq)]
1079#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1080pub enum ClearMessageStatusEnum {
1081    Accepted,
1082    Unknown,
1083    Rejected,
1084}
1085#[derive(Debug, Clone, PartialEq, Eq)]
1086#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1087pub enum TariffClearStatusEnum {
1088    Accepted,
1089    Rejected,
1090    NoTariff,
1091}
1092#[cfg(feature = "alloc")]
1093#[derive(Debug, Clone, PartialEq, Eq)]
1094#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1095pub struct ClearTariffsResult<CustomDataType = crate::NoCustomData> {
1096    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1097    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1098    pub custom_data: Option<CustomDataType>,
1099    pub status: TariffClearStatusEnum,
1100    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
1101    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1102    pub status_info: Option<StatusInfo<CustomDataType>>,
1103    /// Id of tariff for which _status_ is reported. If no tariffs were found, then this field is absent, and _status_ will be `NoTariff`.
1104    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
1105    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1106    pub tariff_id: Option<heapless::String<60usize>>,
1107}
1108#[cfg(not(feature = "alloc"))]
1109#[derive(Debug, Clone, PartialEq, Eq)]
1110#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1111pub struct ClearTariffsResult<
1112    CustomDataType = crate::NoCustomData,
1113    const STATUS_INFO_ADDITIONAL_INFO_CAP: usize = 1024usize,
1114> {
1115    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1116    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1117    pub custom_data: Option<CustomDataType>,
1118    pub status: TariffClearStatusEnum,
1119    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
1120    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1121    pub status_info: Option<StatusInfo<CustomDataType, STATUS_INFO_ADDITIONAL_INFO_CAP>>,
1122    /// Id of tariff for which _status_ is reported. If no tariffs were found, then this field is absent, and _status_ will be `NoTariff`.
1123    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
1124    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1125    pub tariff_id: Option<heapless::String<60usize>>,
1126}
1127/// Result of the clear request for this monitor, identified by its Id.
1128#[derive(Debug, Clone, PartialEq, Eq)]
1129#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1130pub enum ClearMonitoringStatusEnum {
1131    Accepted,
1132    Rejected,
1133    NotFound,
1134}
1135#[cfg(feature = "alloc")]
1136#[derive(Debug, Clone, PartialEq, Eq)]
1137#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1138pub struct ClearMonitoringResult<CustomDataType = crate::NoCustomData> {
1139    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1140    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1141    pub custom_data: Option<CustomDataType>,
1142    /// Id of the monitor of which a clear was requested.
1143    pub id: i64,
1144    pub status: ClearMonitoringStatusEnum,
1145    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
1146    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1147    pub status_info: Option<StatusInfo<CustomDataType>>,
1148}
1149#[cfg(not(feature = "alloc"))]
1150#[derive(Debug, Clone, PartialEq, Eq)]
1151#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1152pub struct ClearMonitoringResult<
1153    CustomDataType = crate::NoCustomData,
1154    const STATUS_INFO_ADDITIONAL_INFO_CAP: usize = 1024usize,
1155> {
1156    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1157    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1158    pub custom_data: Option<CustomDataType>,
1159    /// Id of the monitor of which a clear was requested.
1160    pub id: i64,
1161    pub status: ClearMonitoringStatusEnum,
1162    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
1163    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1164    pub status_info: Option<StatusInfo<CustomDataType, STATUS_INFO_ADDITIONAL_INFO_CAP>>,
1165}
1166#[derive(Debug, Clone, PartialEq, Eq)]
1167#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1168pub struct CertificateHashData<CustomDataType = crate::NoCustomData> {
1169    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1170    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1171    pub custom_data: Option<CustomDataType>,
1172    #[cfg_attr(feature = "serde", serde(rename = "hashAlgorithm"))]
1173    pub hash_algorithm: HashAlgorithmEnum,
1174    /// The hash of the DER encoded public key:
1175    /// the value (excluding tag and length) of the subject
1176    /// public key field in the issuer’s certificate.
1177    #[cfg_attr(feature = "serde", serde(rename = "issuerKeyHash"))]
1178    pub issuer_key_hash: heapless::String<128usize>,
1179    /// The hash of the issuer’s distinguished
1180    /// name (DN), that must be calculated over the DER
1181    /// encoding of the issuer’s name field in the certificate
1182    /// being checked.
1183    #[cfg_attr(feature = "serde", serde(rename = "issuerNameHash"))]
1184    pub issuer_name_hash: heapless::String<128usize>,
1185    /// The string representation of the
1186    /// hexadecimal value of the serial number without the
1187    /// prefix "0x" and without leading zeroes.
1188    #[cfg_attr(feature = "serde", serde(rename = "serialNumber"))]
1189    pub serial_number: heapless::String<40usize>,
1190}
1191/// Indicates whether the request was accepted.
1192#[derive(Debug, Clone, PartialEq, Eq)]
1193#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1194pub enum CustomerInformationStatusEnum {
1195    Accepted,
1196    Rejected,
1197    Invalid,
1198}
1199/// This indicates the success or failure of the data transfer.
1200#[derive(Debug, Clone, PartialEq, Eq)]
1201#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1202pub enum DataTransferStatusEnum {
1203    Accepted,
1204    Rejected,
1205    UnknownMessageId,
1206    UnknownVendorId,
1207}
1208/// Charging Station indicates if it can process the request.
1209#[derive(Debug, Clone, PartialEq, Eq)]
1210#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1211pub enum DeleteCertificateStatusEnum {
1212    Accepted,
1213    Failed,
1214    NotFound,
1215}
1216/// This contains the progress status of the firmware installation.
1217#[derive(Debug, Clone, PartialEq, Eq)]
1218#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1219pub enum FirmwareStatusEnum {
1220    Downloaded,
1221    DownloadFailed,
1222    Downloading,
1223    DownloadScheduled,
1224    DownloadPaused,
1225    Idle,
1226    InstallationFailed,
1227    Installing,
1228    Installed,
1229    InstallRebooting,
1230    InstallScheduled,
1231    InstallVerificationFailed,
1232    InvalidSignature,
1233    SignatureVerified,
1234}
1235/// Defines whether certificate needs to be installed or updated.
1236#[derive(Debug, Clone, PartialEq, Eq)]
1237#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1238pub enum CertificateActionEnum {
1239    Install,
1240    Update,
1241}
1242/// Indicates whether the message was processed properly.
1243#[derive(Debug, Clone, PartialEq, Eq)]
1244#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1245pub enum Iso15118EVCertificateStatusEnum {
1246    Accepted,
1247    Failed,
1248}
1249/// This field specifies the report base.
1250#[derive(Debug, Clone, PartialEq, Eq)]
1251#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1252pub enum ReportBaseEnum {
1253    ConfigurationInventory,
1254    FullInventory,
1255    SummaryInventory,
1256}
1257/// This indicates whether the Charging Station is able to accept this request.
1258#[derive(Debug, Clone, PartialEq, Eq)]
1259#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1260pub enum GenericDeviceModelStatusEnum {
1261    Accepted,
1262    Rejected,
1263    NotSupported,
1264    EmptyResultSet,
1265}
1266/// Source of status: OCSP, CRL
1267#[derive(Debug, Clone, PartialEq, Eq)]
1268#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1269pub enum CertificateStatusSourceEnum {
1270    CRL,
1271    OCSP,
1272}
1273#[cfg(feature = "alloc")]
1274/// Data necessary to request the revocation status of a certificate.
1275#[derive(Debug, Clone, PartialEq, Eq)]
1276#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1277pub struct CertificateStatusRequestInfo<CustomDataType = crate::NoCustomData> {
1278    #[cfg_attr(feature = "serde", serde(rename = "certificateHashData"))]
1279    pub certificate_hash_data: CertificateHashData<CustomDataType>,
1280    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1281    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1282    pub custom_data: Option<CustomDataType>,
1283    pub source: CertificateStatusSourceEnum,
1284    /// URL(s) of _source_.
1285    pub urls: heapless::Vec<alloc::string::String, 5usize>,
1286}
1287#[cfg(not(feature = "alloc"))]
1288/// Data necessary to request the revocation status of a certificate.
1289#[derive(Debug, Clone, PartialEq, Eq)]
1290#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1291pub struct CertificateStatusRequestInfo<
1292    CustomDataType = crate::NoCustomData,
1293    const CERTIFICATE_STATUS_REQUEST_INFO_URLS_ITEM_CAP: usize = 1024usize,
1294> {
1295    #[cfg_attr(feature = "serde", serde(rename = "certificateHashData"))]
1296    pub certificate_hash_data: CertificateHashData<CustomDataType>,
1297    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1298    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1299    pub custom_data: Option<CustomDataType>,
1300    pub source: CertificateStatusSourceEnum,
1301    /// URL(s) of _source_.
1302    pub urls: heapless::Vec<
1303        heapless::String<CERTIFICATE_STATUS_REQUEST_INFO_URLS_ITEM_CAP>,
1304        5usize,
1305    >,
1306}
1307/// Status of certificate: good, revoked or unknown.
1308#[derive(Debug, Clone, PartialEq, Eq)]
1309#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1310pub enum CertificateStatusEnum {
1311    Good,
1312    Revoked,
1313    Unknown,
1314    Failed,
1315}
1316/// Revocation status of certificate
1317#[derive(Debug, Clone, PartialEq, Eq)]
1318#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1319pub struct CertificateStatus<CustomDataType = crate::NoCustomData> {
1320    #[cfg_attr(feature = "serde", serde(rename = "certificateHashData"))]
1321    pub certificate_hash_data: CertificateHashData<CustomDataType>,
1322    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1323    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1324    pub custom_data: Option<CustomDataType>,
1325    #[cfg_attr(feature = "serde", serde(rename = "nextUpdate"))]
1326    pub next_update: crate::OcppTimestamp,
1327    pub source: CertificateStatusSourceEnum,
1328    pub status: CertificateStatusEnum,
1329}
1330/// This indicates whether the charging station was able to retrieve the OCSP certificate status.
1331#[derive(Debug, Clone, PartialEq, Eq)]
1332#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1333pub enum GetCertificateStatusEnum {
1334    Accepted,
1335    Failed,
1336}
1337#[cfg(feature = "alloc")]
1338/// A ChargingProfileCriterionType is a filter for charging profiles to be selected by a GetChargingProfilesRequest.
1339#[derive(Debug, Clone, PartialEq, Eq)]
1340#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1341pub struct ChargingProfileCriterion<CustomDataType = crate::NoCustomData> {
1342    /// For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource. Values defined in Appendix as ChargingLimitSourceEnumStringType.
1343    #[cfg_attr(feature = "serde", serde(rename = "chargingLimitSource"))]
1344    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1345    pub charging_limit_source: Option<heapless::Vec<heapless::String<20usize>, 4usize>>,
1346    /// 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;
1347    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileId"))]
1348    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1349    pub charging_profile_id: Option<alloc::vec::Vec<i64>>,
1350    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
1351    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1352    pub charging_profile_purpose: Option<ChargingProfilePurposeEnum>,
1353    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1354    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1355    pub custom_data: Option<CustomDataType>,
1356    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
1357    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
1358    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1359    pub stack_level: Option<i64>,
1360}
1361#[cfg(not(feature = "alloc"))]
1362/// A ChargingProfileCriterionType is a filter for charging profiles to be selected by a GetChargingProfilesRequest.
1363#[derive(Debug, Clone, PartialEq, Eq)]
1364#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1365pub struct ChargingProfileCriterion<
1366    CustomDataType = crate::NoCustomData,
1367    const CHARGING_PROFILE_CRITERION_CHARGING_PROFILE_ID_CAP: usize = 8usize,
1368> {
1369    /// For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource. Values defined in Appendix as ChargingLimitSourceEnumStringType.
1370    #[cfg_attr(feature = "serde", serde(rename = "chargingLimitSource"))]
1371    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1372    pub charging_limit_source: Option<heapless::Vec<heapless::String<20usize>, 4usize>>,
1373    /// 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;
1374    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileId"))]
1375    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1376    pub charging_profile_id: Option<
1377        heapless::Vec<i64, CHARGING_PROFILE_CRITERION_CHARGING_PROFILE_ID_CAP>,
1378    >,
1379    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
1380    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1381    pub charging_profile_purpose: Option<ChargingProfilePurposeEnum>,
1382    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1383    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1384    pub custom_data: Option<CustomDataType>,
1385    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
1386    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
1387    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1388    pub stack_level: Option<i64>,
1389}
1390/// This indicates whether the Charging Station is able to process this request and will send &lt;&lt;reportchargingprofilesrequest, ReportChargingProfilesRequest&gt;&gt; messages.
1391#[derive(Debug, Clone, PartialEq, Eq)]
1392#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1393pub enum GetChargingProfileStatusEnum {
1394    Accepted,
1395    NoProfiles,
1396}
1397/// Can be used to force a power or current profile.
1398#[derive(Debug, Clone, PartialEq, Eq)]
1399#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1400pub enum ChargingRateUnitEnum {
1401    W,
1402    A,
1403}
1404/// *(2.1)* Charging operation mode to use during this time interval. When absent defaults to `ChargingOnly`.
1405#[derive(Debug, Clone, PartialEq, Eq)]
1406#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1407pub enum OperationModeEnum {
1408    Idle,
1409    ChargingOnly,
1410    CentralSetpoint,
1411    ExternalSetpoint,
1412    ExternalLimits,
1413    CentralFrequency,
1414    LocalFrequency,
1415    LocalLoadBalancing,
1416}
1417/// *(2.1)* A point of a frequency-watt curve.
1418#[derive(Debug, Clone, PartialEq)]
1419#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1420pub struct V2XFreqWattPoint<CustomDataType = crate::NoCustomData> {
1421    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1422    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1423    pub custom_data: Option<CustomDataType>,
1424    /// Net frequency in Hz.
1425    pub frequency: f64,
1426    /// Power in W to charge (positive) or discharge (negative) at specified frequency.
1427    pub power: f64,
1428}
1429/// *(2.1)* A point of a signal-watt curve.
1430#[derive(Debug, Clone, PartialEq)]
1431#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1432pub struct V2XSignalWattPoint<CustomDataType = crate::NoCustomData> {
1433    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1434    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1435    pub custom_data: Option<CustomDataType>,
1436    /// Power in W to charge (positive) or discharge (negative) at specified frequency.
1437    pub power: f64,
1438    /// Signal value from an AFRRSignalRequest.
1439    pub signal: i64,
1440}
1441#[cfg(feature = "alloc")]
1442/// Charging schedule period structure defines a time period in a charging schedule. It is used in: CompositeScheduleType and in ChargingScheduleType. When used in a NotifyEVChargingScheduleRequest only _startPeriod_, _limit_, _limit_L2_, _limit_L3_ are relevant.
1443#[derive(Debug, Clone, PartialEq)]
1444#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1445pub struct ChargingSchedulePeriod<CustomDataType = crate::NoCustomData> {
1446    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1447    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1448    pub custom_data: Option<CustomDataType>,
1449    /// *(2.1)* Limit in _chargingRateUnit_ that the EV is allowed to discharge with. Note, these are negative values in order to be consistent with _setpoint_, which can be positive and negative.  +
1450    /// For AC this field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1451    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit"))]
1452    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1453    pub discharge_limit: Option<f64>,
1454    /// *(2.1)* Limit in _chargingRateUnit_ on phase L2 that the EV is allowed to discharge with.
1455    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L2"))]
1456    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1457    pub discharge_limit_l2: Option<f64>,
1458    /// *(2.1)* Limit in _chargingRateUnit_ on phase L3 that the EV is allowed to discharge with.
1459    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L3"))]
1460    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1461    pub discharge_limit_l3: Option<f64>,
1462    /// *(2.1)* If true, the EVSE must turn off power electronics/modules associated with this transaction. Default value when absent is false.
1463    #[cfg_attr(feature = "serde", serde(rename = "evseSleep"))]
1464    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1465    pub evse_sleep: Option<bool>,
1466    /// Optional only when not required by the _operationMode_, as in CentralSetpoint, ExternalSetpoint, ExternalLimits, LocalFrequency,  LocalLoadBalancing. +
1467    /// Charging rate limit during the schedule period, in the applicable _chargingRateUnit_.
1468    /// This SHOULD be a non-negative value; a negative value is only supported for backwards compatibility with older systems that use a negative value to specify a discharging limit.
1469    /// When using _chargingRateUnit_ = `W`, this field represents the sum of the power of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1470    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1471    pub limit: Option<f64>,
1472    /// *(2.1)* Charging rate limit on phase L2  in the applicable _chargingRateUnit_.
1473    #[cfg_attr(feature = "serde", serde(rename = "limit_L2"))]
1474    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1475    pub limit_l2: Option<f64>,
1476    /// *(2.1)* Charging rate limit on phase L3  in the applicable _chargingRateUnit_.
1477    #[cfg_attr(feature = "serde", serde(rename = "limit_L3"))]
1478    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1479    pub limit_l3: Option<f64>,
1480    /// The number of phases that can be used for charging. +
1481    /// For a DC EVSE this field should be omitted. +
1482    /// For an AC EVSE a default value of _numberPhases_ = 3 will be assumed if the field is absent.
1483    #[cfg_attr(feature = "serde", serde(rename = "numberPhases"))]
1484    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1485    pub number_phases: Option<i64>,
1486    #[cfg_attr(feature = "serde", serde(rename = "operationMode"))]
1487    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1488    pub operation_mode: Option<OperationModeEnum>,
1489    /// 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.
1490    #[cfg_attr(feature = "serde", serde(rename = "phaseToUse"))]
1491    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1492    pub phase_to_use: Option<i64>,
1493    /// *(2.1)* If  true, the EV should attempt to keep the BMS preconditioned for this time interval.
1494    #[cfg_attr(feature = "serde", serde(rename = "preconditioningRequest"))]
1495    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1496    pub preconditioning_request: Option<bool>,
1497    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow as close as possible. Use negative values for discharging. +
1498    /// When a limit and/or _dischargeLimit_ are given the overshoot when following _setpoint_ must remain within these values.
1499    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1500    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1501    pub setpoint: Option<f64>,
1502    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow as closely as possible. Positive values for inductive, negative for capacitive reactive power or current.  +
1503    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1504    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive"))]
1505    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1506    pub setpoint_reactive: Option<f64>,
1507    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L2 as closely as possible.
1508    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L2"))]
1509    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1510    pub setpoint_reactive_l2: Option<f64>,
1511    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L3 as closely as possible.
1512    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L3"))]
1513    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1514    pub setpoint_reactive_l3: Option<f64>,
1515    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L2 as close as possible.
1516    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L2"))]
1517    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1518    pub setpoint_l2: Option<f64>,
1519    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L3 as close as possible.
1520    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L3"))]
1521    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1522    pub setpoint_l3: Option<f64>,
1523    /// Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period.
1524    #[cfg_attr(feature = "serde", serde(rename = "startPeriod"))]
1525    pub start_period: i64,
1526    /// *(2.1)* Power value that, when present, is used as a baseline on top of which values from _v2xFreqWattCurve_ and _v2xSignalWattCurve_ are added.
1527    #[cfg_attr(feature = "serde", serde(rename = "v2xBaseline"))]
1528    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1529    pub v2x_baseline: Option<f64>,
1530    #[cfg_attr(feature = "serde", serde(rename = "v2xFreqWattCurve"))]
1531    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1532    pub v2x_freq_watt_curve: Option<alloc::vec::Vec<V2XFreqWattPoint<CustomDataType>>>,
1533    #[cfg_attr(feature = "serde", serde(rename = "v2xSignalWattCurve"))]
1534    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1535    pub v2x_signal_watt_curve: Option<
1536        alloc::vec::Vec<V2XSignalWattPoint<CustomDataType>>,
1537    >,
1538}
1539#[cfg(not(feature = "alloc"))]
1540/// Charging schedule period structure defines a time period in a charging schedule. It is used in: CompositeScheduleType and in ChargingScheduleType. When used in a NotifyEVChargingScheduleRequest only _startPeriod_, _limit_, _limit_L2_, _limit_L3_ are relevant.
1541#[derive(Debug, Clone, PartialEq)]
1542#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1543pub struct ChargingSchedulePeriod<
1544    CustomDataType = crate::NoCustomData,
1545    const CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP: usize = 8usize,
1546    const CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP: usize = 8usize,
1547> {
1548    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1549    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1550    pub custom_data: Option<CustomDataType>,
1551    /// *(2.1)* Limit in _chargingRateUnit_ that the EV is allowed to discharge with. Note, these are negative values in order to be consistent with _setpoint_, which can be positive and negative.  +
1552    /// For AC this field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1553    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit"))]
1554    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1555    pub discharge_limit: Option<f64>,
1556    /// *(2.1)* Limit in _chargingRateUnit_ on phase L2 that the EV is allowed to discharge with.
1557    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L2"))]
1558    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1559    pub discharge_limit_l2: Option<f64>,
1560    /// *(2.1)* Limit in _chargingRateUnit_ on phase L3 that the EV is allowed to discharge with.
1561    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L3"))]
1562    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1563    pub discharge_limit_l3: Option<f64>,
1564    /// *(2.1)* If true, the EVSE must turn off power electronics/modules associated with this transaction. Default value when absent is false.
1565    #[cfg_attr(feature = "serde", serde(rename = "evseSleep"))]
1566    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1567    pub evse_sleep: Option<bool>,
1568    /// Optional only when not required by the _operationMode_, as in CentralSetpoint, ExternalSetpoint, ExternalLimits, LocalFrequency,  LocalLoadBalancing. +
1569    /// Charging rate limit during the schedule period, in the applicable _chargingRateUnit_.
1570    /// This SHOULD be a non-negative value; a negative value is only supported for backwards compatibility with older systems that use a negative value to specify a discharging limit.
1571    /// When using _chargingRateUnit_ = `W`, this field represents the sum of the power of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1572    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1573    pub limit: Option<f64>,
1574    /// *(2.1)* Charging rate limit on phase L2  in the applicable _chargingRateUnit_.
1575    #[cfg_attr(feature = "serde", serde(rename = "limit_L2"))]
1576    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1577    pub limit_l2: Option<f64>,
1578    /// *(2.1)* Charging rate limit on phase L3  in the applicable _chargingRateUnit_.
1579    #[cfg_attr(feature = "serde", serde(rename = "limit_L3"))]
1580    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1581    pub limit_l3: Option<f64>,
1582    /// The number of phases that can be used for charging. +
1583    /// For a DC EVSE this field should be omitted. +
1584    /// For an AC EVSE a default value of _numberPhases_ = 3 will be assumed if the field is absent.
1585    #[cfg_attr(feature = "serde", serde(rename = "numberPhases"))]
1586    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1587    pub number_phases: Option<i64>,
1588    #[cfg_attr(feature = "serde", serde(rename = "operationMode"))]
1589    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1590    pub operation_mode: Option<OperationModeEnum>,
1591    /// 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.
1592    #[cfg_attr(feature = "serde", serde(rename = "phaseToUse"))]
1593    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1594    pub phase_to_use: Option<i64>,
1595    /// *(2.1)* If  true, the EV should attempt to keep the BMS preconditioned for this time interval.
1596    #[cfg_attr(feature = "serde", serde(rename = "preconditioningRequest"))]
1597    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1598    pub preconditioning_request: Option<bool>,
1599    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow as close as possible. Use negative values for discharging. +
1600    /// When a limit and/or _dischargeLimit_ are given the overshoot when following _setpoint_ must remain within these values.
1601    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1602    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1603    pub setpoint: Option<f64>,
1604    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow as closely as possible. Positive values for inductive, negative for capacitive reactive power or current.  +
1605    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
1606    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive"))]
1607    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1608    pub setpoint_reactive: Option<f64>,
1609    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L2 as closely as possible.
1610    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L2"))]
1611    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1612    pub setpoint_reactive_l2: Option<f64>,
1613    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L3 as closely as possible.
1614    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L3"))]
1615    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1616    pub setpoint_reactive_l3: Option<f64>,
1617    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L2 as close as possible.
1618    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L2"))]
1619    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1620    pub setpoint_l2: Option<f64>,
1621    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L3 as close as possible.
1622    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L3"))]
1623    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1624    pub setpoint_l3: Option<f64>,
1625    /// Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period.
1626    #[cfg_attr(feature = "serde", serde(rename = "startPeriod"))]
1627    pub start_period: i64,
1628    /// *(2.1)* Power value that, when present, is used as a baseline on top of which values from _v2xFreqWattCurve_ and _v2xSignalWattCurve_ are added.
1629    #[cfg_attr(feature = "serde", serde(rename = "v2xBaseline"))]
1630    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1631    pub v2x_baseline: Option<f64>,
1632    #[cfg_attr(feature = "serde", serde(rename = "v2xFreqWattCurve"))]
1633    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1634    pub v2x_freq_watt_curve: Option<
1635        heapless::Vec<
1636            V2XFreqWattPoint<CustomDataType>,
1637            CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP,
1638        >,
1639    >,
1640    #[cfg_attr(feature = "serde", serde(rename = "v2xSignalWattCurve"))]
1641    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1642    pub v2x_signal_watt_curve: Option<
1643        heapless::Vec<
1644            V2XSignalWattPoint<CustomDataType>,
1645            CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP,
1646        >,
1647    >,
1648}
1649#[cfg(feature = "alloc")]
1650#[derive(Debug, Clone, PartialEq)]
1651#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1652pub struct CompositeSchedule<CustomDataType = crate::NoCustomData> {
1653    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
1654    pub charging_rate_unit: ChargingRateUnitEnum,
1655    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
1656    pub charging_schedule_period: alloc::vec::Vec<
1657        ChargingSchedulePeriod<CustomDataType>,
1658    >,
1659    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1660    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1661    pub custom_data: Option<CustomDataType>,
1662    pub duration: i64,
1663    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
1664    pub evse_id: i64,
1665    #[cfg_attr(feature = "serde", serde(rename = "scheduleStart"))]
1666    pub schedule_start: crate::OcppTimestamp,
1667}
1668#[cfg(not(feature = "alloc"))]
1669#[derive(Debug, Clone, PartialEq)]
1670#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1671pub struct CompositeSchedule<
1672    CustomDataType = crate::NoCustomData,
1673    const COMPOSITE_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP: usize = 8usize,
1674    const CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP: usize = 8usize,
1675    const CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP: usize = 8usize,
1676> {
1677    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
1678    pub charging_rate_unit: ChargingRateUnitEnum,
1679    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
1680    pub charging_schedule_period: heapless::Vec<
1681        ChargingSchedulePeriod<
1682            CustomDataType,
1683            CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP,
1684            CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP,
1685        >,
1686        COMPOSITE_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP,
1687    >,
1688    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1689    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1690    pub custom_data: Option<CustomDataType>,
1691    pub duration: i64,
1692    #[cfg_attr(feature = "serde", serde(rename = "evseId"))]
1693    pub evse_id: i64,
1694    #[cfg_attr(feature = "serde", serde(rename = "scheduleStart"))]
1695    pub schedule_start: crate::OcppTimestamp,
1696}
1697/// If provided the Charging Station shall return Display Messages with the given priority only.
1698#[derive(Debug, Clone, PartialEq, Eq)]
1699#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1700pub enum MessagePriorityEnum {
1701    AlwaysFront,
1702    InFront,
1703    NormalCycle,
1704}
1705/// If provided the Charging Station shall return Display Messages with the given state only.
1706#[derive(Debug, Clone, PartialEq, Eq)]
1707#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1708pub enum MessageStateEnum {
1709    Charging,
1710    Faulted,
1711    Idle,
1712    Unavailable,
1713    Suspended,
1714    Discharging,
1715}
1716/// Indicates if the Charging Station has Display Messages that match the request criteria in the &lt;&lt;getdisplaymessagesrequest,GetDisplayMessagesRequest&gt;&gt;
1717#[derive(Debug, Clone, PartialEq, Eq)]
1718#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1719pub enum GetDisplayMessagesStatusEnum {
1720    Accepted,
1721    Unknown,
1722}
1723#[derive(Debug, Clone, PartialEq, Eq)]
1724#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1725pub enum GetCertificateIdUseEnum {
1726    V2GRootCertificate,
1727    MORootCertificate,
1728    CSMSRootCertificate,
1729    V2GCertificateChain,
1730    ManufacturerRootCertificate,
1731    OEMRootCertificate,
1732}
1733#[derive(Debug, Clone, PartialEq, Eq)]
1734#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1735pub struct CertificateHashDataChain<CustomDataType = crate::NoCustomData> {
1736    #[cfg_attr(feature = "serde", serde(rename = "certificateHashData"))]
1737    pub certificate_hash_data: CertificateHashData<CustomDataType>,
1738    #[cfg_attr(feature = "serde", serde(rename = "certificateType"))]
1739    pub certificate_type: GetCertificateIdUseEnum,
1740    #[cfg_attr(feature = "serde", serde(rename = "childCertificateHashData"))]
1741    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1742    pub child_certificate_hash_data: Option<
1743        heapless::Vec<CertificateHashData<CustomDataType>, 4usize>,
1744    >,
1745    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1746    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1747    pub custom_data: Option<CustomDataType>,
1748}
1749/// Charging Station indicates if it can process the request.
1750#[derive(Debug, Clone, PartialEq, Eq)]
1751#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1752pub enum GetInstalledCertificateStatusEnum {
1753    Accepted,
1754    NotFound,
1755}
1756#[cfg(feature = "alloc")]
1757/// Generic class for the configuration of logging entries.
1758#[derive(Debug, Clone, PartialEq, Eq)]
1759#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1760pub struct LogParameters<CustomDataType = crate::NoCustomData> {
1761    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1762    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1763    pub custom_data: Option<CustomDataType>,
1764    /// This contains the date and time of the latest logging information to include in the diagnostics.
1765    #[cfg_attr(feature = "serde", serde(rename = "latestTimestamp"))]
1766    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1767    pub latest_timestamp: Option<crate::OcppTimestamp>,
1768    /// This contains the date and time of the oldest logging information to include in the diagnostics.
1769    #[cfg_attr(feature = "serde", serde(rename = "oldestTimestamp"))]
1770    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1771    pub oldest_timestamp: Option<crate::OcppTimestamp>,
1772    /// The URL of the location at the remote system where the log should be stored.
1773    #[cfg_attr(feature = "serde", serde(rename = "remoteLocation"))]
1774    pub remote_location: alloc::string::String,
1775}
1776#[cfg(not(feature = "alloc"))]
1777/// Generic class for the configuration of logging entries.
1778#[derive(Debug, Clone, PartialEq, Eq)]
1779#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1780pub struct LogParameters<
1781    CustomDataType = crate::NoCustomData,
1782    const LOG_PARAMETERS_REMOTE_LOCATION_CAP: usize = 1024usize,
1783> {
1784    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1785    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1786    pub custom_data: Option<CustomDataType>,
1787    /// This contains the date and time of the latest logging information to include in the diagnostics.
1788    #[cfg_attr(feature = "serde", serde(rename = "latestTimestamp"))]
1789    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1790    pub latest_timestamp: Option<crate::OcppTimestamp>,
1791    /// This contains the date and time of the oldest logging information to include in the diagnostics.
1792    #[cfg_attr(feature = "serde", serde(rename = "oldestTimestamp"))]
1793    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1794    pub oldest_timestamp: Option<crate::OcppTimestamp>,
1795    /// The URL of the location at the remote system where the log should be stored.
1796    #[cfg_attr(feature = "serde", serde(rename = "remoteLocation"))]
1797    pub remote_location: heapless::String<LOG_PARAMETERS_REMOTE_LOCATION_CAP>,
1798}
1799/// This contains the type of log file that the Charging Station
1800/// should send.
1801#[derive(Debug, Clone, PartialEq, Eq)]
1802#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1803pub enum LogEnum {
1804    DiagnosticsLog,
1805    SecurityLog,
1806    DataCollectorLog,
1807}
1808/// This field indicates whether the Charging Station was able to accept the request.
1809#[derive(Debug, Clone, PartialEq, Eq)]
1810#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1811pub enum LogStatusEnum {
1812    Accepted,
1813    Rejected,
1814    AcceptedCanceled,
1815}
1816/// A physical or logical component
1817#[derive(Debug, Clone, PartialEq, Eq)]
1818#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1819pub struct Component<CustomDataType = crate::NoCustomData> {
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    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1824    pub evse: Option<EVSE<CustomDataType>>,
1825    /// Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
1826    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1827    pub instance: Option<heapless::String<50usize>>,
1828    /// 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.
1829    pub name: heapless::String<50usize>,
1830}
1831/// Reference key to a component-variable.
1832#[derive(Debug, Clone, PartialEq, Eq)]
1833#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1834pub struct Variable<CustomDataType = crate::NoCustomData> {
1835    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1836    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1837    pub custom_data: Option<CustomDataType>,
1838    /// Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
1839    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1840    pub instance: Option<heapless::String<50usize>>,
1841    /// 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.
1842    pub name: heapless::String<50usize>,
1843}
1844/// Class to report components, variables and variable attributes and characteristics.
1845#[derive(Debug, Clone, PartialEq, Eq)]
1846#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1847pub struct ComponentVariable<CustomDataType = crate::NoCustomData> {
1848    pub component: Component<CustomDataType>,
1849    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1850    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1851    pub custom_data: Option<CustomDataType>,
1852    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1853    pub variable: Option<Variable<CustomDataType>>,
1854}
1855#[derive(Debug, Clone, PartialEq, Eq)]
1856#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1857pub enum MonitoringCriterionEnum {
1858    ThresholdMonitoring,
1859    DeltaMonitoring,
1860    PeriodicMonitoring,
1861}
1862#[derive(Debug, Clone, PartialEq, Eq)]
1863#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1864pub struct ConstantStreamData<CustomDataType = crate::NoCustomData> {
1865    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1866    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1867    pub custom_data: Option<CustomDataType>,
1868    /// Uniquely identifies the stream
1869    pub id: i64,
1870    pub params: PeriodicEventStreamParams<CustomDataType>,
1871    /// Id of monitor used to report his event. It can be a preconfigured or hardwired monitor.
1872    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
1873    pub variable_monitoring_id: i64,
1874}
1875#[derive(Debug, Clone, PartialEq, Eq)]
1876#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1877pub enum ComponentCriterionEnum {
1878    Active,
1879    Available,
1880    Enabled,
1881    Problem,
1882}
1883/// Status of operation
1884#[derive(Debug, Clone, PartialEq, Eq)]
1885#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1886pub enum TariffGetStatusEnum {
1887    Accepted,
1888    Rejected,
1889    NoTariff,
1890}
1891/// Kind of tariff (driver/default)
1892#[derive(Debug, Clone, PartialEq, Eq)]
1893#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1894pub enum TariffKindEnum {
1895    DefaultTariff,
1896    DriverTariff,
1897}
1898#[cfg(feature = "alloc")]
1899/// Shows assignment of tariffs to EVSE or IdToken.
1900#[derive(Debug, Clone, PartialEq, Eq)]
1901#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1902pub struct TariffAssignment<CustomDataType = crate::NoCustomData> {
1903    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1904    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1905    pub custom_data: Option<CustomDataType>,
1906    #[cfg_attr(feature = "serde", serde(rename = "evseIds"))]
1907    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1908    pub evse_ids: Option<alloc::vec::Vec<i64>>,
1909    /// IdTokens related to tariff
1910    #[cfg_attr(feature = "serde", serde(rename = "idTokens"))]
1911    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1912    pub id_tokens: Option<alloc::vec::Vec<heapless::String<255usize>>>,
1913    /// Tariff id.
1914    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
1915    pub tariff_id: heapless::String<60usize>,
1916    #[cfg_attr(feature = "serde", serde(rename = "tariffKind"))]
1917    pub tariff_kind: TariffKindEnum,
1918    /// Date/time when this tariff become active.
1919    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
1920    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1921    pub valid_from: Option<crate::OcppTimestamp>,
1922}
1923#[cfg(not(feature = "alloc"))]
1924/// Shows assignment of tariffs to EVSE or IdToken.
1925#[derive(Debug, Clone, PartialEq, Eq)]
1926#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1927pub struct TariffAssignment<
1928    CustomDataType = crate::NoCustomData,
1929    const TARIFF_ASSIGNMENT_EVSE_IDS_CAP: usize = 8usize,
1930    const TARIFF_ASSIGNMENT_ID_TOKENS_CAP: usize = 8usize,
1931> {
1932    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1933    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1934    pub custom_data: Option<CustomDataType>,
1935    #[cfg_attr(feature = "serde", serde(rename = "evseIds"))]
1936    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1937    pub evse_ids: Option<heapless::Vec<i64, TARIFF_ASSIGNMENT_EVSE_IDS_CAP>>,
1938    /// IdTokens related to tariff
1939    #[cfg_attr(feature = "serde", serde(rename = "idTokens"))]
1940    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1941    pub id_tokens: Option<
1942        heapless::Vec<heapless::String<255usize>, TARIFF_ASSIGNMENT_ID_TOKENS_CAP>,
1943    >,
1944    /// Tariff id.
1945    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
1946    pub tariff_id: heapless::String<60usize>,
1947    #[cfg_attr(feature = "serde", serde(rename = "tariffKind"))]
1948    pub tariff_kind: TariffKindEnum,
1949    /// Date/time when this tariff become active.
1950    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
1951    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1952    pub valid_from: Option<crate::OcppTimestamp>,
1953}
1954/// Attribute type for which value is requested. When absent, default Actual is assumed.
1955#[derive(Debug, Clone, PartialEq, Eq)]
1956#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1957pub enum AttributeEnum {
1958    Actual,
1959    Target,
1960    MinSet,
1961    MaxSet,
1962}
1963/// Class to hold parameters for GetVariables request.
1964#[derive(Debug, Clone, PartialEq, Eq)]
1965#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1966pub struct GetVariableData<CustomDataType = crate::NoCustomData> {
1967    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
1968    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1969    pub attribute_type: Option<AttributeEnum>,
1970    pub component: Component<CustomDataType>,
1971    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
1972    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1973    pub custom_data: Option<CustomDataType>,
1974    pub variable: Variable<CustomDataType>,
1975}
1976#[derive(Debug, Clone, PartialEq, Eq)]
1977#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1978pub enum GetVariableStatusEnum {
1979    Accepted,
1980    Rejected,
1981    UnknownComponent,
1982    UnknownVariable,
1983    NotSupportedAttributeType,
1984}
1985#[cfg(feature = "alloc")]
1986/// Class to hold results of GetVariables request.
1987#[derive(Debug, Clone, PartialEq, Eq)]
1988#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1989pub struct GetVariableResult<CustomDataType = crate::NoCustomData> {
1990    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
1991    pub attribute_status: GetVariableStatusEnum,
1992    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
1993    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1994    pub attribute_status_info: Option<StatusInfo<CustomDataType>>,
1995    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
1996    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
1997    pub attribute_type: Option<AttributeEnum>,
1998    /// Value of requested attribute type of component-variable. This field can only be empty when the given status is NOT accepted.
1999    ///
2000    /// 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.
2001    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
2002    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2003    pub attribute_value: Option<alloc::string::String>,
2004    pub component: Component<CustomDataType>,
2005    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2006    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2007    pub custom_data: Option<CustomDataType>,
2008    pub variable: Variable<CustomDataType>,
2009}
2010#[cfg(not(feature = "alloc"))]
2011/// Class to hold results of GetVariables request.
2012#[derive(Debug, Clone, PartialEq, Eq)]
2013#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2014pub struct GetVariableResult<
2015    CustomDataType = crate::NoCustomData,
2016    const STATUS_INFO_ADDITIONAL_INFO_CAP: usize = 1024usize,
2017    const GET_VARIABLE_RESULT_ATTRIBUTE_VALUE_CAP: usize = 1024usize,
2018> {
2019    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
2020    pub attribute_status: GetVariableStatusEnum,
2021    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
2022    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2023    pub attribute_status_info: Option<
2024        StatusInfo<CustomDataType, STATUS_INFO_ADDITIONAL_INFO_CAP>,
2025    >,
2026    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
2027    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2028    pub attribute_type: Option<AttributeEnum>,
2029    /// Value of requested attribute type of component-variable. This field can only be empty when the given status is NOT accepted.
2030    ///
2031    /// 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.
2032    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
2033    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2034    pub attribute_value: Option<
2035        heapless::String<GET_VARIABLE_RESULT_ATTRIBUTE_VALUE_CAP>,
2036    >,
2037    pub component: Component<CustomDataType>,
2038    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2039    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2040    pub custom_data: Option<CustomDataType>,
2041    pub variable: Variable<CustomDataType>,
2042}
2043/// Indicates the certificate type that is sent.
2044#[derive(Debug, Clone, PartialEq, Eq)]
2045#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2046pub enum InstallCertificateUseEnum {
2047    V2GRootCertificate,
2048    MORootCertificate,
2049    ManufacturerRootCertificate,
2050    CSMSRootCertificate,
2051    OEMRootCertificate,
2052}
2053/// Charging Station indicates if installation was successful.
2054#[derive(Debug, Clone, PartialEq, Eq)]
2055#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2056pub enum InstallCertificateStatusEnum {
2057    Accepted,
2058    Rejected,
2059    Failed,
2060}
2061/// This contains the status of the log upload.
2062#[derive(Debug, Clone, PartialEq, Eq)]
2063#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2064pub enum UploadLogStatusEnum {
2065    BadMessage,
2066    Idle,
2067    NotSupportedOperation,
2068    PermissionDenied,
2069    Uploaded,
2070    UploadFailure,
2071    Uploading,
2072    AcceptedCanceled,
2073}
2074/// Type of detail value: start, end or sample. Default = "Sample.Periodic"
2075#[derive(Debug, Clone, PartialEq, Eq)]
2076#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2077pub enum ReadingContextEnum {
2078    #[cfg_attr(feature = "serde", serde(rename = "Interruption.Begin"))]
2079    InterruptionBegin,
2080    #[cfg_attr(feature = "serde", serde(rename = "Interruption.End"))]
2081    InterruptionEnd,
2082    Other,
2083    #[cfg_attr(feature = "serde", serde(rename = "Sample.Clock"))]
2084    SampleClock,
2085    #[cfg_attr(feature = "serde", serde(rename = "Sample.Periodic"))]
2086    SamplePeriodic,
2087    #[cfg_attr(feature = "serde", serde(rename = "Transaction.Begin"))]
2088    TransactionBegin,
2089    #[cfg_attr(feature = "serde", serde(rename = "Transaction.End"))]
2090    TransactionEnd,
2091    Trigger,
2092}
2093/// Indicates where the measured value has been sampled. Default =  "Outlet"
2094#[derive(Debug, Clone, PartialEq, Eq)]
2095#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2096pub enum LocationEnum {
2097    Body,
2098    Cable,
2099    EV,
2100    Inlet,
2101    Outlet,
2102    Upstream,
2103}
2104/// Type of measurement. Default = "Energy.Active.Import.Register"
2105#[derive(Debug, Clone, PartialEq, Eq)]
2106#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2107pub enum MeasurandEnum {
2108    #[cfg_attr(feature = "serde", serde(rename = "Current.Export"))]
2109    CurrentExport,
2110    #[cfg_attr(feature = "serde", serde(rename = "Current.Export.Offered"))]
2111    CurrentExportOffered,
2112    #[cfg_attr(feature = "serde", serde(rename = "Current.Export.Minimum"))]
2113    CurrentExportMinimum,
2114    #[cfg_attr(feature = "serde", serde(rename = "Current.Import"))]
2115    CurrentImport,
2116    #[cfg_attr(feature = "serde", serde(rename = "Current.Import.Offered"))]
2117    CurrentImportOffered,
2118    #[cfg_attr(feature = "serde", serde(rename = "Current.Import.Minimum"))]
2119    CurrentImportMinimum,
2120    #[cfg_attr(feature = "serde", serde(rename = "Current.Offered"))]
2121    CurrentOffered,
2122    #[cfg_attr(feature = "serde", serde(rename = "Display.PresentSOC"))]
2123    DisplayPresentSOC,
2124    #[cfg_attr(feature = "serde", serde(rename = "Display.MinimumSOC"))]
2125    DisplayMinimumSOC,
2126    #[cfg_attr(feature = "serde", serde(rename = "Display.TargetSOC"))]
2127    DisplayTargetSOC,
2128    #[cfg_attr(feature = "serde", serde(rename = "Display.MaximumSOC"))]
2129    DisplayMaximumSOC,
2130    #[cfg_attr(feature = "serde", serde(rename = "Display.RemainingTimeToMinimumSOC"))]
2131    DisplayRemainingTimeToMinimumSOC,
2132    #[cfg_attr(feature = "serde", serde(rename = "Display.RemainingTimeToTargetSOC"))]
2133    DisplayRemainingTimeToTargetSOC,
2134    #[cfg_attr(feature = "serde", serde(rename = "Display.RemainingTimeToMaximumSOC"))]
2135    DisplayRemainingTimeToMaximumSOC,
2136    #[cfg_attr(feature = "serde", serde(rename = "Display.ChargingComplete"))]
2137    DisplayChargingComplete,
2138    #[cfg_attr(feature = "serde", serde(rename = "Display.BatteryEnergyCapacity"))]
2139    DisplayBatteryEnergyCapacity,
2140    #[cfg_attr(feature = "serde", serde(rename = "Display.InletHot"))]
2141    DisplayInletHot,
2142    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Export.Interval"))]
2143    EnergyActiveExportInterval,
2144    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Export.Register"))]
2145    EnergyActiveExportRegister,
2146    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Import.Interval"))]
2147    EnergyActiveImportInterval,
2148    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Import.Register"))]
2149    EnergyActiveImportRegister,
2150    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Import.CableLoss"))]
2151    EnergyActiveImportCableLoss,
2152    #[cfg_attr(
2153        feature = "serde",
2154        serde(rename = "Energy.Active.Import.LocalGeneration.Register")
2155    )]
2156    EnergyActiveImportLocalGenerationRegister,
2157    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Net"))]
2158    EnergyActiveNet,
2159    #[cfg_attr(feature = "serde", serde(rename = "Energy.Active.Setpoint.Interval"))]
2160    EnergyActiveSetpointInterval,
2161    #[cfg_attr(feature = "serde", serde(rename = "Energy.Apparent.Export"))]
2162    EnergyApparentExport,
2163    #[cfg_attr(feature = "serde", serde(rename = "Energy.Apparent.Import"))]
2164    EnergyApparentImport,
2165    #[cfg_attr(feature = "serde", serde(rename = "Energy.Apparent.Net"))]
2166    EnergyApparentNet,
2167    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Export.Interval"))]
2168    EnergyReactiveExportInterval,
2169    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Export.Register"))]
2170    EnergyReactiveExportRegister,
2171    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Import.Interval"))]
2172    EnergyReactiveImportInterval,
2173    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Import.Register"))]
2174    EnergyReactiveImportRegister,
2175    #[cfg_attr(feature = "serde", serde(rename = "Energy.Reactive.Net"))]
2176    EnergyReactiveNet,
2177    #[cfg_attr(feature = "serde", serde(rename = "EnergyRequest.Target"))]
2178    EnergyRequestTarget,
2179    #[cfg_attr(feature = "serde", serde(rename = "EnergyRequest.Minimum"))]
2180    EnergyRequestMinimum,
2181    #[cfg_attr(feature = "serde", serde(rename = "EnergyRequest.Maximum"))]
2182    EnergyRequestMaximum,
2183    #[cfg_attr(feature = "serde", serde(rename = "EnergyRequest.Minimum.V2X"))]
2184    EnergyRequestMinimumV2X,
2185    #[cfg_attr(feature = "serde", serde(rename = "EnergyRequest.Maximum.V2X"))]
2186    EnergyRequestMaximumV2X,
2187    #[cfg_attr(feature = "serde", serde(rename = "EnergyRequest.Bulk"))]
2188    EnergyRequestBulk,
2189    Frequency,
2190    #[cfg_attr(feature = "serde", serde(rename = "Power.Active.Export"))]
2191    PowerActiveExport,
2192    #[cfg_attr(feature = "serde", serde(rename = "Power.Active.Import"))]
2193    PowerActiveImport,
2194    #[cfg_attr(feature = "serde", serde(rename = "Power.Active.Setpoint"))]
2195    PowerActiveSetpoint,
2196    #[cfg_attr(feature = "serde", serde(rename = "Power.Active.Residual"))]
2197    PowerActiveResidual,
2198    #[cfg_attr(feature = "serde", serde(rename = "Power.Export.Minimum"))]
2199    PowerExportMinimum,
2200    #[cfg_attr(feature = "serde", serde(rename = "Power.Export.Offered"))]
2201    PowerExportOffered,
2202    #[cfg_attr(feature = "serde", serde(rename = "Power.Factor"))]
2203    PowerFactor,
2204    #[cfg_attr(feature = "serde", serde(rename = "Power.Import.Offered"))]
2205    PowerImportOffered,
2206    #[cfg_attr(feature = "serde", serde(rename = "Power.Import.Minimum"))]
2207    PowerImportMinimum,
2208    #[cfg_attr(feature = "serde", serde(rename = "Power.Offered"))]
2209    PowerOffered,
2210    #[cfg_attr(feature = "serde", serde(rename = "Power.Reactive.Export"))]
2211    PowerReactiveExport,
2212    #[cfg_attr(feature = "serde", serde(rename = "Power.Reactive.Import"))]
2213    PowerReactiveImport,
2214    SoC,
2215    Voltage,
2216    #[cfg_attr(feature = "serde", serde(rename = "Voltage.Minimum"))]
2217    VoltageMinimum,
2218    #[cfg_attr(feature = "serde", serde(rename = "Voltage.Maximum"))]
2219    VoltageMaximum,
2220}
2221/// 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.
2222#[derive(Debug, Clone, PartialEq, Eq)]
2223#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2224pub enum PhaseEnum {
2225    L1,
2226    L2,
2227    L3,
2228    N,
2229    #[cfg_attr(feature = "serde", serde(rename = "L1-N"))]
2230    L1N,
2231    #[cfg_attr(feature = "serde", serde(rename = "L2-N"))]
2232    L2N,
2233    #[cfg_attr(feature = "serde", serde(rename = "L3-N"))]
2234    L3N,
2235    #[cfg_attr(feature = "serde", serde(rename = "L1-L2"))]
2236    L1L2,
2237    #[cfg_attr(feature = "serde", serde(rename = "L2-L3"))]
2238    L2L3,
2239    #[cfg_attr(feature = "serde", serde(rename = "L3-L1"))]
2240    L3L1,
2241}
2242#[cfg(feature = "alloc")]
2243/// Represent a signed version of the meter value.
2244#[derive(Debug, Clone, PartialEq, Eq)]
2245#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2246pub struct SignedMeterValue<CustomDataType = crate::NoCustomData> {
2247    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2248    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2249    pub custom_data: Option<CustomDataType>,
2250    /// Format used by the energy meter to encode the meter data. For example: OCMF or EDL.
2251    #[cfg_attr(feature = "serde", serde(rename = "encodingMethod"))]
2252    pub encoding_method: heapless::String<50usize>,
2253    /// *(2.1)* Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_.
2254    #[cfg_attr(feature = "serde", serde(rename = "publicKey"))]
2255    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2256    pub public_key: Option<alloc::string::String>,
2257    /// Base64 encoded, contains the signed data from the meter in the format specified in _encodingMethod_, which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.
2258    #[cfg_attr(feature = "serde", serde(rename = "signedMeterData"))]
2259    pub signed_meter_data: alloc::string::String,
2260    /// *(2.1)* Method used to create the digital signature. Optional, if already included in _signedMeterData_. Standard values for this are defined in Appendix as SigningMethodEnumStringType.
2261    #[cfg_attr(feature = "serde", serde(rename = "signingMethod"))]
2262    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2263    pub signing_method: Option<heapless::String<50usize>>,
2264}
2265#[cfg(not(feature = "alloc"))]
2266/// Represent a signed version of the meter value.
2267#[derive(Debug, Clone, PartialEq, Eq)]
2268#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2269pub struct SignedMeterValue<
2270    CustomDataType = crate::NoCustomData,
2271    const SIGNED_METER_VALUE_PUBLIC_KEY_CAP: usize = 1024usize,
2272    const SIGNED_METER_VALUE_SIGNED_METER_DATA_CAP: usize = 1024usize,
2273> {
2274    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2275    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2276    pub custom_data: Option<CustomDataType>,
2277    /// Format used by the energy meter to encode the meter data. For example: OCMF or EDL.
2278    #[cfg_attr(feature = "serde", serde(rename = "encodingMethod"))]
2279    pub encoding_method: heapless::String<50usize>,
2280    /// *(2.1)* Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_.
2281    #[cfg_attr(feature = "serde", serde(rename = "publicKey"))]
2282    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2283    pub public_key: Option<heapless::String<SIGNED_METER_VALUE_PUBLIC_KEY_CAP>>,
2284    /// Base64 encoded, contains the signed data from the meter in the format specified in _encodingMethod_, which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.
2285    #[cfg_attr(feature = "serde", serde(rename = "signedMeterData"))]
2286    pub signed_meter_data: heapless::String<SIGNED_METER_VALUE_SIGNED_METER_DATA_CAP>,
2287    /// *(2.1)* Method used to create the digital signature. Optional, if already included in _signedMeterData_. Standard values for this are defined in Appendix as SigningMethodEnumStringType.
2288    #[cfg_attr(feature = "serde", serde(rename = "signingMethod"))]
2289    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2290    pub signing_method: Option<heapless::String<50usize>>,
2291}
2292/// Represents a UnitOfMeasure with a multiplier
2293#[derive(Debug, Clone, PartialEq, Eq)]
2294#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2295pub struct UnitOfMeasure<CustomDataType = crate::NoCustomData> {
2296    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2297    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2298    pub custom_data: Option<CustomDataType>,
2299    /// Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0. +
2300    /// The _multiplier_ only multiplies the value of the measurand. It does not specify a conversion between units, for example, kW and W.
2301    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2302    pub multiplier: Option<i64>,
2303    /// Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type.
2304    /// This field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices.
2305    /// If an applicable unit is available in that list, otherwise a "custom" unit might be used.
2306    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2307    pub unit: Option<heapless::String<20usize>>,
2308}
2309#[cfg(feature = "alloc")]
2310/// Single sampled value in MeterValues. Each value can be accompanied by optional fields.
2311///
2312/// 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.
2313#[derive(Debug, Clone, PartialEq)]
2314#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2315pub struct SampledValue<CustomDataType = crate::NoCustomData> {
2316    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2317    pub context: Option<ReadingContextEnum>,
2318    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2319    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2320    pub custom_data: Option<CustomDataType>,
2321    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2322    pub location: Option<LocationEnum>,
2323    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2324    pub measurand: Option<MeasurandEnum>,
2325    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2326    pub phase: Option<PhaseEnum>,
2327    #[cfg_attr(feature = "serde", serde(rename = "signedMeterValue"))]
2328    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2329    pub signed_meter_value: Option<SignedMeterValue<CustomDataType>>,
2330    #[cfg_attr(feature = "serde", serde(rename = "unitOfMeasure"))]
2331    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2332    pub unit_of_measure: Option<UnitOfMeasure<CustomDataType>>,
2333    /// Indicates the measured value.
2334    pub value: f64,
2335}
2336#[cfg(not(feature = "alloc"))]
2337/// Single sampled value in MeterValues. Each value can be accompanied by optional fields.
2338///
2339/// 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.
2340#[derive(Debug, Clone, PartialEq)]
2341#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2342pub struct SampledValue<
2343    CustomDataType = crate::NoCustomData,
2344    const SIGNED_METER_VALUE_PUBLIC_KEY_CAP: usize = 1024usize,
2345    const SIGNED_METER_VALUE_SIGNED_METER_DATA_CAP: usize = 1024usize,
2346> {
2347    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2348    pub context: Option<ReadingContextEnum>,
2349    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2350    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2351    pub custom_data: Option<CustomDataType>,
2352    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2353    pub location: Option<LocationEnum>,
2354    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2355    pub measurand: Option<MeasurandEnum>,
2356    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2357    pub phase: Option<PhaseEnum>,
2358    #[cfg_attr(feature = "serde", serde(rename = "signedMeterValue"))]
2359    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2360    pub signed_meter_value: Option<
2361        SignedMeterValue<
2362            CustomDataType,
2363            SIGNED_METER_VALUE_PUBLIC_KEY_CAP,
2364            SIGNED_METER_VALUE_SIGNED_METER_DATA_CAP,
2365        >,
2366    >,
2367    #[cfg_attr(feature = "serde", serde(rename = "unitOfMeasure"))]
2368    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2369    pub unit_of_measure: Option<UnitOfMeasure<CustomDataType>>,
2370    /// Indicates the measured value.
2371    pub value: f64,
2372}
2373#[cfg(feature = "alloc")]
2374/// 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.
2375#[derive(Debug, Clone, PartialEq)]
2376#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2377pub struct MeterValue<CustomDataType = crate::NoCustomData> {
2378    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2379    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2380    pub custom_data: Option<CustomDataType>,
2381    #[cfg_attr(feature = "serde", serde(rename = "sampledValue"))]
2382    pub sampled_value: alloc::vec::Vec<SampledValue<CustomDataType>>,
2383    /// Timestamp for measured value(s).
2384    pub timestamp: crate::OcppTimestamp,
2385}
2386#[cfg(not(feature = "alloc"))]
2387/// 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.
2388#[derive(Debug, Clone, PartialEq)]
2389#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2390pub struct MeterValue<
2391    CustomDataType = crate::NoCustomData,
2392    const METER_VALUE_SAMPLED_VALUE_CAP: usize = 8usize,
2393    const SIGNED_METER_VALUE_PUBLIC_KEY_CAP: usize = 1024usize,
2394    const SIGNED_METER_VALUE_SIGNED_METER_DATA_CAP: usize = 1024usize,
2395> {
2396    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2397    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2398    pub custom_data: Option<CustomDataType>,
2399    #[cfg_attr(feature = "serde", serde(rename = "sampledValue"))]
2400    pub sampled_value: heapless::Vec<
2401        SampledValue<
2402            CustomDataType,
2403            SIGNED_METER_VALUE_PUBLIC_KEY_CAP,
2404            SIGNED_METER_VALUE_SIGNED_METER_DATA_CAP,
2405        >,
2406        METER_VALUE_SAMPLED_VALUE_CAP,
2407    >,
2408    /// Timestamp for measured value(s).
2409    pub timestamp: crate::OcppTimestamp,
2410}
2411#[derive(Debug, Clone, PartialEq, Eq)]
2412#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2413pub enum NotifyAllowedEnergyTransferStatusEnum {
2414    Accepted,
2415    Rejected,
2416}
2417#[derive(Debug, Clone, PartialEq, Eq)]
2418#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2419pub struct ChargingLimit<CustomDataType = crate::NoCustomData> {
2420    /// Represents the source of the charging limit. Values defined in appendix as ChargingLimitSourceEnumStringType.
2421    #[cfg_attr(feature = "serde", serde(rename = "chargingLimitSource"))]
2422    pub charging_limit_source: heapless::String<20usize>,
2423    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2424    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2425    pub custom_data: Option<CustomDataType>,
2426    /// Indicates whether the charging limit is critical for the grid.
2427    #[cfg_attr(feature = "serde", serde(rename = "isGridCritical"))]
2428    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2429    pub is_grid_critical: Option<bool>,
2430    /// *(2.1)* True when the reported limit concerns local generation that is providing extra capacity, instead of a limitation.
2431    #[cfg_attr(feature = "serde", serde(rename = "isLocalGeneration"))]
2432    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2433    pub is_local_generation: Option<bool>,
2434}
2435/// Part of ISO 15118-20 price schedule.
2436#[derive(Debug, Clone, PartialEq, Eq)]
2437#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2438pub struct RationalNumber<CustomDataType = crate::NoCustomData> {
2439    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2440    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2441    pub custom_data: Option<CustomDataType>,
2442    /// The exponent to base 10 (dec)
2443    pub exponent: i64,
2444    /// Value which shall be multiplied.
2445    pub value: i64,
2446}
2447/// Part of ISO 15118-20 price schedule.
2448#[derive(Debug, Clone, PartialEq, Eq)]
2449#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2450pub struct AdditionalSelectedServices<CustomDataType = crate::NoCustomData> {
2451    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2452    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2453    pub custom_data: Option<CustomDataType>,
2454    #[cfg_attr(feature = "serde", serde(rename = "serviceFee"))]
2455    pub service_fee: RationalNumber<CustomDataType>,
2456    /// Human readable string to identify this service.
2457    #[cfg_attr(feature = "serde", serde(rename = "serviceName"))]
2458    pub service_name: heapless::String<80usize>,
2459}
2460/// Part of ISO 15118-20 price schedule.
2461#[derive(Debug, Clone, PartialEq, Eq)]
2462#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2463pub struct OverstayRule<CustomDataType = crate::NoCustomData> {
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    #[cfg_attr(feature = "serde", serde(rename = "overstayFee"))]
2468    pub overstay_fee: RationalNumber<CustomDataType>,
2469    /// Time till overstay will be reapplied
2470    #[cfg_attr(feature = "serde", serde(rename = "overstayFeePeriod"))]
2471    pub overstay_fee_period: i64,
2472    /// Human readable string to identify the overstay rule.
2473    #[cfg_attr(feature = "serde", serde(rename = "overstayRuleDescription"))]
2474    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2475    pub overstay_rule_description: Option<heapless::String<32usize>>,
2476    /// Time in seconds after trigger of the parent Overstay Rules for this particular fee to apply.
2477    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
2478    pub start_time: i64,
2479}
2480/// Part of ISO 15118-20 price schedule.
2481#[derive(Debug, Clone, PartialEq, Eq)]
2482#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2483pub struct OverstayRuleList<CustomDataType = crate::NoCustomData> {
2484    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2485    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2486    pub custom_data: Option<CustomDataType>,
2487    #[cfg_attr(feature = "serde", serde(rename = "overstayPowerThreshold"))]
2488    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2489    pub overstay_power_threshold: Option<RationalNumber<CustomDataType>>,
2490    #[cfg_attr(feature = "serde", serde(rename = "overstayRule"))]
2491    pub overstay_rule: heapless::Vec<OverstayRule<CustomDataType>, 5usize>,
2492    /// Time till overstay is applied in seconds.
2493    #[cfg_attr(feature = "serde", serde(rename = "overstayTimeThreshold"))]
2494    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2495    pub overstay_time_threshold: Option<i64>,
2496}
2497/// Part of ISO 15118-20 price schedule.
2498#[derive(Debug, Clone, PartialEq, Eq)]
2499#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2500pub struct PriceRule<CustomDataType = crate::NoCustomData> {
2501    /// Number of grams of CO2 per kWh.
2502    #[cfg_attr(feature = "serde", serde(rename = "carbonDioxideEmission"))]
2503    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2504    pub carbon_dioxide_emission: Option<i64>,
2505    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2506    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2507    pub custom_data: Option<CustomDataType>,
2508    #[cfg_attr(feature = "serde", serde(rename = "energyFee"))]
2509    pub energy_fee: RationalNumber<CustomDataType>,
2510    #[cfg_attr(feature = "serde", serde(rename = "parkingFee"))]
2511    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2512    pub parking_fee: Option<RationalNumber<CustomDataType>>,
2513    /// The duration of the parking fee period (in seconds).
2514    /// When the time enters into a ParkingFeePeriod, the ParkingFee will apply to the session. .
2515    #[cfg_attr(feature = "serde", serde(rename = "parkingFeePeriod"))]
2516    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2517    pub parking_fee_period: Option<i64>,
2518    #[cfg_attr(feature = "serde", serde(rename = "powerRangeStart"))]
2519    pub power_range_start: RationalNumber<CustomDataType>,
2520    /// Percentage of the power that is created by renewable resources.
2521    #[cfg_attr(feature = "serde", serde(rename = "renewableGenerationPercentage"))]
2522    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2523    pub renewable_generation_percentage: Option<i64>,
2524}
2525/// Part of ISO 15118-20 price schedule.
2526#[derive(Debug, Clone, PartialEq, Eq)]
2527#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2528pub struct PriceRuleStack<CustomDataType = crate::NoCustomData> {
2529    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2530    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2531    pub custom_data: Option<CustomDataType>,
2532    /// Duration of the stack of price rules.  he amount of seconds that define the duration of the given PriceRule(s).
2533    pub duration: i64,
2534    #[cfg_attr(feature = "serde", serde(rename = "priceRule"))]
2535    pub price_rule: heapless::Vec<PriceRule<CustomDataType>, 8usize>,
2536}
2537/// Part of ISO 15118-20 price schedule.
2538#[derive(Debug, Clone, PartialEq, Eq)]
2539#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2540pub struct TaxRule<CustomDataType = crate::NoCustomData> {
2541    /// Indicates whether this tax applies to Energy Fees.
2542    #[cfg_attr(feature = "serde", serde(rename = "appliesToEnergyFee"))]
2543    pub applies_to_energy_fee: bool,
2544    /// Indicates whether this tax applies to Minimum/Maximum Cost.
2545    #[cfg_attr(feature = "serde", serde(rename = "appliesToMinimumMaximumCost"))]
2546    pub applies_to_minimum_maximum_cost: bool,
2547    /// Indicates whether this tax applies to Overstay Fees.
2548    #[cfg_attr(feature = "serde", serde(rename = "appliesToOverstayFee"))]
2549    pub applies_to_overstay_fee: bool,
2550    /// Indicates whether this tax applies to Parking Fees.
2551    #[cfg_attr(feature = "serde", serde(rename = "appliesToParkingFee"))]
2552    pub applies_to_parking_fee: bool,
2553    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2554    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2555    pub custom_data: Option<CustomDataType>,
2556    /// Indicates whether the tax is included in any price or not.
2557    #[cfg_attr(feature = "serde", serde(rename = "taxIncludedInPrice"))]
2558    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2559    pub tax_included_in_price: Option<bool>,
2560    #[cfg_attr(feature = "serde", serde(rename = "taxRate"))]
2561    pub tax_rate: RationalNumber<CustomDataType>,
2562    /// Id for the tax rule.
2563    #[cfg_attr(feature = "serde", serde(rename = "taxRuleID"))]
2564    pub tax_rule_i_d: i64,
2565    /// Human readable string to identify the tax rule.
2566    #[cfg_attr(feature = "serde", serde(rename = "taxRuleName"))]
2567    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2568    pub tax_rule_name: Option<heapless::String<100usize>>,
2569}
2570#[cfg(feature = "alloc")]
2571/// The AbsolutePriceScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
2572///
2573/// image::images/AbsolutePriceSchedule-Simple.png\[\]
2574#[derive(Debug, Clone, PartialEq, Eq)]
2575#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2576pub struct AbsolutePriceSchedule<CustomDataType = crate::NoCustomData> {
2577    #[cfg_attr(feature = "serde", serde(rename = "additionalSelectedServices"))]
2578    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2579    pub additional_selected_services: Option<
2580        heapless::Vec<AdditionalSelectedServices<CustomDataType>, 5usize>,
2581    >,
2582    /// Currency according to ISO 4217.
2583    pub currency: heapless::String<3usize>,
2584    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2585    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2586    pub custom_data: Option<CustomDataType>,
2587    /// String that indicates what language is used for the human readable strings in the price schedule. Based on ISO 639.
2588    pub language: heapless::String<8usize>,
2589    #[cfg_attr(feature = "serde", serde(rename = "maximumCost"))]
2590    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2591    pub maximum_cost: Option<RationalNumber<CustomDataType>>,
2592    #[cfg_attr(feature = "serde", serde(rename = "minimumCost"))]
2593    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2594    pub minimum_cost: Option<RationalNumber<CustomDataType>>,
2595    #[cfg_attr(feature = "serde", serde(rename = "overstayRuleList"))]
2596    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2597    pub overstay_rule_list: Option<OverstayRuleList<CustomDataType>>,
2598    /// A string in URN notation which shall uniquely identify an algorithm that defines how to compute an energy fee sum for a specific power profile based on the EnergyFee information from the PriceRule elements.
2599    #[cfg_attr(feature = "serde", serde(rename = "priceAlgorithm"))]
2600    pub price_algorithm: alloc::string::String,
2601    #[cfg_attr(feature = "serde", serde(rename = "priceRuleStacks"))]
2602    pub price_rule_stacks: alloc::vec::Vec<PriceRuleStack<CustomDataType>>,
2603    /// Description of the price schedule.
2604    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleDescription"))]
2605    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2606    pub price_schedule_description: Option<heapless::String<160usize>>,
2607    /// Unique ID of price schedule
2608    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleID"))]
2609    pub price_schedule_i_d: i64,
2610    #[cfg_attr(feature = "serde", serde(rename = "taxRules"))]
2611    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2612    pub tax_rules: Option<heapless::Vec<TaxRule<CustomDataType>, 10usize>>,
2613    /// Starting point of price schedule.
2614    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
2615    pub time_anchor: crate::OcppTimestamp,
2616}
2617#[cfg(not(feature = "alloc"))]
2618/// The AbsolutePriceScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
2619///
2620/// image::images/AbsolutePriceSchedule-Simple.png\[\]
2621#[derive(Debug, Clone, PartialEq, Eq)]
2622#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2623pub struct AbsolutePriceSchedule<
2624    CustomDataType = crate::NoCustomData,
2625    const ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP: usize = 1024usize,
2626    const ABSOLUTE_PRICE_SCHEDULE_PRICE_RULE_STACKS_CAP: usize = 8usize,
2627> {
2628    #[cfg_attr(feature = "serde", serde(rename = "additionalSelectedServices"))]
2629    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2630    pub additional_selected_services: Option<
2631        heapless::Vec<AdditionalSelectedServices<CustomDataType>, 5usize>,
2632    >,
2633    /// Currency according to ISO 4217.
2634    pub currency: heapless::String<3usize>,
2635    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2636    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2637    pub custom_data: Option<CustomDataType>,
2638    /// String that indicates what language is used for the human readable strings in the price schedule. Based on ISO 639.
2639    pub language: heapless::String<8usize>,
2640    #[cfg_attr(feature = "serde", serde(rename = "maximumCost"))]
2641    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2642    pub maximum_cost: Option<RationalNumber<CustomDataType>>,
2643    #[cfg_attr(feature = "serde", serde(rename = "minimumCost"))]
2644    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2645    pub minimum_cost: Option<RationalNumber<CustomDataType>>,
2646    #[cfg_attr(feature = "serde", serde(rename = "overstayRuleList"))]
2647    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2648    pub overstay_rule_list: Option<OverstayRuleList<CustomDataType>>,
2649    /// A string in URN notation which shall uniquely identify an algorithm that defines how to compute an energy fee sum for a specific power profile based on the EnergyFee information from the PriceRule elements.
2650    #[cfg_attr(feature = "serde", serde(rename = "priceAlgorithm"))]
2651    pub price_algorithm: heapless::String<ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP>,
2652    #[cfg_attr(feature = "serde", serde(rename = "priceRuleStacks"))]
2653    pub price_rule_stacks: heapless::Vec<
2654        PriceRuleStack<CustomDataType>,
2655        ABSOLUTE_PRICE_SCHEDULE_PRICE_RULE_STACKS_CAP,
2656    >,
2657    /// Description of the price schedule.
2658    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleDescription"))]
2659    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2660    pub price_schedule_description: Option<heapless::String<160usize>>,
2661    /// Unique ID of price schedule
2662    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleID"))]
2663    pub price_schedule_i_d: i64,
2664    #[cfg_attr(feature = "serde", serde(rename = "taxRules"))]
2665    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2666    pub tax_rules: Option<heapless::Vec<TaxRule<CustomDataType>, 10usize>>,
2667    /// Starting point of price schedule.
2668    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
2669    pub time_anchor: crate::OcppTimestamp,
2670}
2671#[derive(Debug, Clone, PartialEq)]
2672#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2673pub struct LimitAtSoC<CustomDataType = crate::NoCustomData> {
2674    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2675    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2676    pub custom_data: Option<CustomDataType>,
2677    /// Charging rate limit beyond the SoC value.
2678    /// The unit is defined by _chargingSchedule.chargingRateUnit_.
2679    pub limit: f64,
2680    /// The SoC value beyond which the charging rate limit should be applied.
2681    pub soc: i64,
2682}
2683/// Part of ISO 15118-20 price schedule.
2684#[derive(Debug, Clone, PartialEq, Eq)]
2685#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2686pub struct PriceLevelScheduleEntry<CustomDataType = crate::NoCustomData> {
2687    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2688    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2689    pub custom_data: Option<CustomDataType>,
2690    /// The amount of seconds that define the duration of this given PriceLevelScheduleEntry.
2691    pub duration: i64,
2692    /// Defines the price level of this PriceLevelScheduleEntry (referring to NumberOfPriceLevels). Small values for the PriceLevel represent a cheaper PriceLevelScheduleEntry. Large values for the PriceLevel represent a more expensive PriceLevelScheduleEntry.
2693    #[cfg_attr(feature = "serde", serde(rename = "priceLevel"))]
2694    pub price_level: i64,
2695}
2696#[cfg(feature = "alloc")]
2697/// The PriceLevelScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
2698#[derive(Debug, Clone, PartialEq, Eq)]
2699#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2700pub struct PriceLevelSchedule<CustomDataType = crate::NoCustomData> {
2701    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2702    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2703    pub custom_data: Option<CustomDataType>,
2704    /// Defines the overall number of distinct price level elements used across all PriceLevelSchedules.
2705    #[cfg_attr(feature = "serde", serde(rename = "numberOfPriceLevels"))]
2706    pub number_of_price_levels: i64,
2707    #[cfg_attr(feature = "serde", serde(rename = "priceLevelScheduleEntries"))]
2708    pub price_level_schedule_entries: alloc::vec::Vec<
2709        PriceLevelScheduleEntry<CustomDataType>,
2710    >,
2711    /// Description of the price schedule.
2712    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleDescription"))]
2713    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2714    pub price_schedule_description: Option<heapless::String<32usize>>,
2715    /// Unique ID of this price schedule.
2716    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleId"))]
2717    pub price_schedule_id: i64,
2718    /// Starting point of this price schedule.
2719    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
2720    pub time_anchor: crate::OcppTimestamp,
2721}
2722#[cfg(not(feature = "alloc"))]
2723/// The PriceLevelScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
2724#[derive(Debug, Clone, PartialEq, Eq)]
2725#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2726pub struct PriceLevelSchedule<
2727    CustomDataType = crate::NoCustomData,
2728    const PRICE_LEVEL_SCHEDULE_PRICE_LEVEL_SCHEDULE_ENTRIES_CAP: usize = 8usize,
2729> {
2730    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2731    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2732    pub custom_data: Option<CustomDataType>,
2733    /// Defines the overall number of distinct price level elements used across all PriceLevelSchedules.
2734    #[cfg_attr(feature = "serde", serde(rename = "numberOfPriceLevels"))]
2735    pub number_of_price_levels: i64,
2736    #[cfg_attr(feature = "serde", serde(rename = "priceLevelScheduleEntries"))]
2737    pub price_level_schedule_entries: heapless::Vec<
2738        PriceLevelScheduleEntry<CustomDataType>,
2739        PRICE_LEVEL_SCHEDULE_PRICE_LEVEL_SCHEDULE_ENTRIES_CAP,
2740    >,
2741    /// Description of the price schedule.
2742    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleDescription"))]
2743    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2744    pub price_schedule_description: Option<heapless::String<32usize>>,
2745    /// Unique ID of this price schedule.
2746    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleId"))]
2747    pub price_schedule_id: i64,
2748    /// Starting point of this price schedule.
2749    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
2750    pub time_anchor: crate::OcppTimestamp,
2751}
2752/// The kind of cost referred to in the message element amount
2753#[derive(Debug, Clone, PartialEq, Eq)]
2754#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2755pub enum CostKindEnum {
2756    CarbonDioxideEmission,
2757    RelativePricePercentage,
2758    RenewableGenerationPercentage,
2759}
2760#[derive(Debug, Clone, PartialEq, Eq)]
2761#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2762pub struct Cost<CustomDataType = crate::NoCustomData> {
2763    /// The estimated or actual cost per kWh
2764    pub amount: i64,
2765    /// Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier
2766    #[cfg_attr(feature = "serde", serde(rename = "amountMultiplier"))]
2767    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2768    pub amount_multiplier: Option<i64>,
2769    #[cfg_attr(feature = "serde", serde(rename = "costKind"))]
2770    pub cost_kind: CostKindEnum,
2771    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2772    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2773    pub custom_data: Option<CustomDataType>,
2774}
2775#[derive(Debug, Clone, PartialEq)]
2776#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2777pub struct ConsumptionCost<CustomDataType = crate::NoCustomData> {
2778    pub cost: heapless::Vec<Cost<CustomDataType>, 3usize>,
2779    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2780    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2781    pub custom_data: Option<CustomDataType>,
2782    /// 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.
2783    #[cfg_attr(feature = "serde", serde(rename = "startValue"))]
2784    pub start_value: f64,
2785}
2786#[derive(Debug, Clone, PartialEq, Eq)]
2787#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2788pub struct RelativeTimeInterval<CustomDataType = crate::NoCustomData> {
2789    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2790    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2791    pub custom_data: Option<CustomDataType>,
2792    /// Duration of the interval, in seconds.
2793    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2794    pub duration: Option<i64>,
2795    /// Start of the interval, in seconds from NOW.
2796    pub start: i64,
2797}
2798#[derive(Debug, Clone, PartialEq)]
2799#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2800pub struct SalesTariffEntry<CustomDataType = crate::NoCustomData> {
2801    #[cfg_attr(feature = "serde", serde(rename = "consumptionCost"))]
2802    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2803    pub consumption_cost: Option<heapless::Vec<ConsumptionCost<CustomDataType>, 3usize>>,
2804    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2805    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2806    pub custom_data: Option<CustomDataType>,
2807    /// 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.
2808    #[cfg_attr(feature = "serde", serde(rename = "ePriceLevel"))]
2809    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2810    pub e_price_level: Option<i64>,
2811    #[cfg_attr(feature = "serde", serde(rename = "relativeTimeInterval"))]
2812    pub relative_time_interval: RelativeTimeInterval<CustomDataType>,
2813}
2814#[cfg(feature = "alloc")]
2815/// A SalesTariff provided by a Mobility Operator (EMSP) .
2816/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
2817#[derive(Debug, Clone, PartialEq)]
2818#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2819pub struct SalesTariff<CustomDataType = crate::NoCustomData> {
2820    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2821    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2822    pub custom_data: Option<CustomDataType>,
2823    /// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
2824    pub id: i64,
2825    /// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
2826    #[cfg_attr(feature = "serde", serde(rename = "numEPriceLevels"))]
2827    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2828    pub num_e_price_levels: Option<i64>,
2829    /// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
2830    #[cfg_attr(feature = "serde", serde(rename = "salesTariffDescription"))]
2831    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2832    pub sales_tariff_description: Option<heapless::String<32usize>>,
2833    #[cfg_attr(feature = "serde", serde(rename = "salesTariffEntry"))]
2834    pub sales_tariff_entry: alloc::vec::Vec<SalesTariffEntry<CustomDataType>>,
2835}
2836#[cfg(not(feature = "alloc"))]
2837/// A SalesTariff provided by a Mobility Operator (EMSP) .
2838/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
2839#[derive(Debug, Clone, PartialEq)]
2840#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2841pub struct SalesTariff<
2842    CustomDataType = crate::NoCustomData,
2843    const SALES_TARIFF_SALES_TARIFF_ENTRY_CAP: usize = 8usize,
2844> {
2845    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2846    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2847    pub custom_data: Option<CustomDataType>,
2848    /// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
2849    pub id: i64,
2850    /// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
2851    #[cfg_attr(feature = "serde", serde(rename = "numEPriceLevels"))]
2852    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2853    pub num_e_price_levels: Option<i64>,
2854    /// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
2855    #[cfg_attr(feature = "serde", serde(rename = "salesTariffDescription"))]
2856    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2857    pub sales_tariff_description: Option<heapless::String<32usize>>,
2858    #[cfg_attr(feature = "serde", serde(rename = "salesTariffEntry"))]
2859    pub sales_tariff_entry: heapless::Vec<
2860        SalesTariffEntry<CustomDataType>,
2861        SALES_TARIFF_SALES_TARIFF_ENTRY_CAP,
2862    >,
2863}
2864#[cfg(feature = "alloc")]
2865/// Charging schedule structure defines a list of charging periods, as used in: NotifyEVChargingScheduleRequest and ChargingProfileType. When used in a NotifyEVChargingScheduleRequest only _duration_ and _chargingSchedulePeriod_ are relevant and _chargingRateUnit_ must be 'W'. +
2866/// An ISO 15118-20 session may provide either an _absolutePriceSchedule_ or a _priceLevelSchedule_. An ISO 15118-2 session can only provide a_salesTariff_ element. The field _digestValue_ is used when price schedule or sales tariff are signed.
2867///
2868/// image::images/ChargingSchedule-Simple.png\[\]
2869#[derive(Debug, Clone, PartialEq)]
2870#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2871pub struct ChargingSchedule<CustomDataType = crate::NoCustomData> {
2872    #[cfg_attr(feature = "serde", serde(rename = "absolutePriceSchedule"))]
2873    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2874    pub absolute_price_schedule: Option<AbsolutePriceSchedule<CustomDataType>>,
2875    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
2876    pub charging_rate_unit: ChargingRateUnitEnum,
2877    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
2878    pub charging_schedule_period: alloc::vec::Vec<
2879        ChargingSchedulePeriod<CustomDataType>,
2880    >,
2881    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2882    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2883    pub custom_data: Option<CustomDataType>,
2884    /// *(2.1)* Base64 encoded hash (SHA256 for ISO 15118-2, SHA512 for ISO 15118-20) of the EXI price schedule element. Used in signature.
2885    #[cfg_attr(feature = "serde", serde(rename = "digestValue"))]
2886    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2887    pub digest_value: Option<heapless::String<88usize>>,
2888    /// 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 in case startSchedule is absent.
2889    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2890    pub duration: Option<i64>,
2891    pub id: i64,
2892    #[cfg_attr(feature = "serde", serde(rename = "limitAtSoC"))]
2893    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2894    pub limit_at_so_c: Option<LimitAtSoC<CustomDataType>>,
2895    /// 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.
2896    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
2897    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2898    pub min_charging_rate: Option<f64>,
2899    /// *(2.1)* Power tolerance when following EVPowerProfile.
2900    #[cfg_attr(feature = "serde", serde(rename = "powerTolerance"))]
2901    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2902    pub power_tolerance: Option<f64>,
2903    #[cfg_attr(feature = "serde", serde(rename = "priceLevelSchedule"))]
2904    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2905    pub price_level_schedule: Option<PriceLevelSchedule<CustomDataType>>,
2906    /// *(2.1)* Defaults to 0. When _randomizedDelay_ not equals zero, then the start of each &lt;&lt;cmn_chargingscheduleperiodtype,ChargingSchedulePeriodType&gt;&gt; is delayed by a randomly chosen number of seconds between 0 and _randomizedDelay_.  Only allowed for TxProfile and TxDefaultProfile.
2907    #[cfg_attr(feature = "serde", serde(rename = "randomizedDelay"))]
2908    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2909    pub randomized_delay: Option<i64>,
2910    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
2911    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2912    pub sales_tariff: Option<SalesTariff<CustomDataType>>,
2913    /// *(2.1)* Id of this element for referencing in a signature.
2914    #[cfg_attr(feature = "serde", serde(rename = "signatureId"))]
2915    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2916    pub signature_id: Option<i64>,
2917    /// Starting point of an absolute schedule or recurring schedule.
2918    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
2919    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2920    pub start_schedule: Option<crate::OcppTimestamp>,
2921    /// *(2.1)* Defaults to false. When true, disregard time zone offset in dateTime fields of  _ChargingScheduleType_ and use unqualified local time at Charging Station instead.
2922    ///  This allows the same `Absolute` or `Recurring` charging profile to be used in both summer and winter time.
2923    #[cfg_attr(feature = "serde", serde(rename = "useLocalTime"))]
2924    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2925    pub use_local_time: Option<bool>,
2926}
2927#[cfg(not(feature = "alloc"))]
2928/// Charging schedule structure defines a list of charging periods, as used in: NotifyEVChargingScheduleRequest and ChargingProfileType. When used in a NotifyEVChargingScheduleRequest only _duration_ and _chargingSchedulePeriod_ are relevant and _chargingRateUnit_ must be 'W'. +
2929/// An ISO 15118-20 session may provide either an _absolutePriceSchedule_ or a _priceLevelSchedule_. An ISO 15118-2 session can only provide a_salesTariff_ element. The field _digestValue_ is used when price schedule or sales tariff are signed.
2930///
2931/// image::images/ChargingSchedule-Simple.png\[\]
2932#[derive(Debug, Clone, PartialEq)]
2933#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2934pub struct ChargingSchedule<
2935    CustomDataType = crate::NoCustomData,
2936    const ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP: usize = 1024usize,
2937    const ABSOLUTE_PRICE_SCHEDULE_PRICE_RULE_STACKS_CAP: usize = 8usize,
2938    const CHARGING_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP: usize = 8usize,
2939    const CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP: usize = 8usize,
2940    const CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP: usize = 8usize,
2941    const PRICE_LEVEL_SCHEDULE_PRICE_LEVEL_SCHEDULE_ENTRIES_CAP: usize = 8usize,
2942    const SALES_TARIFF_SALES_TARIFF_ENTRY_CAP: usize = 8usize,
2943> {
2944    #[cfg_attr(feature = "serde", serde(rename = "absolutePriceSchedule"))]
2945    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2946    pub absolute_price_schedule: Option<
2947        AbsolutePriceSchedule<
2948            CustomDataType,
2949            ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP,
2950            ABSOLUTE_PRICE_SCHEDULE_PRICE_RULE_STACKS_CAP,
2951        >,
2952    >,
2953    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
2954    pub charging_rate_unit: ChargingRateUnitEnum,
2955    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
2956    pub charging_schedule_period: heapless::Vec<
2957        ChargingSchedulePeriod<
2958            CustomDataType,
2959            CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP,
2960            CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP,
2961        >,
2962        CHARGING_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP,
2963    >,
2964    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2965    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2966    pub custom_data: Option<CustomDataType>,
2967    /// *(2.1)* Base64 encoded hash (SHA256 for ISO 15118-2, SHA512 for ISO 15118-20) of the EXI price schedule element. Used in signature.
2968    #[cfg_attr(feature = "serde", serde(rename = "digestValue"))]
2969    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2970    pub digest_value: Option<heapless::String<88usize>>,
2971    /// 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 in case startSchedule is absent.
2972    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2973    pub duration: Option<i64>,
2974    pub id: i64,
2975    #[cfg_attr(feature = "serde", serde(rename = "limitAtSoC"))]
2976    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2977    pub limit_at_so_c: Option<LimitAtSoC<CustomDataType>>,
2978    /// 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.
2979    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
2980    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2981    pub min_charging_rate: Option<f64>,
2982    /// *(2.1)* Power tolerance when following EVPowerProfile.
2983    #[cfg_attr(feature = "serde", serde(rename = "powerTolerance"))]
2984    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2985    pub power_tolerance: Option<f64>,
2986    #[cfg_attr(feature = "serde", serde(rename = "priceLevelSchedule"))]
2987    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2988    pub price_level_schedule: Option<
2989        PriceLevelSchedule<
2990            CustomDataType,
2991            PRICE_LEVEL_SCHEDULE_PRICE_LEVEL_SCHEDULE_ENTRIES_CAP,
2992        >,
2993    >,
2994    /// *(2.1)* Defaults to 0. When _randomizedDelay_ not equals zero, then the start of each &lt;&lt;cmn_chargingscheduleperiodtype,ChargingSchedulePeriodType&gt;&gt; is delayed by a randomly chosen number of seconds between 0 and _randomizedDelay_.  Only allowed for TxProfile and TxDefaultProfile.
2995    #[cfg_attr(feature = "serde", serde(rename = "randomizedDelay"))]
2996    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2997    pub randomized_delay: Option<i64>,
2998    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
2999    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3000    pub sales_tariff: Option<
3001        SalesTariff<CustomDataType, SALES_TARIFF_SALES_TARIFF_ENTRY_CAP>,
3002    >,
3003    /// *(2.1)* Id of this element for referencing in a signature.
3004    #[cfg_attr(feature = "serde", serde(rename = "signatureId"))]
3005    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3006    pub signature_id: Option<i64>,
3007    /// Starting point of an absolute schedule or recurring schedule.
3008    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
3009    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3010    pub start_schedule: Option<crate::OcppTimestamp>,
3011    /// *(2.1)* Defaults to false. When true, disregard time zone offset in dateTime fields of  _ChargingScheduleType_ and use unqualified local time at Charging Station instead.
3012    ///  This allows the same `Absolute` or `Recurring` charging profile to be used in both summer and winter time.
3013    #[cfg_attr(feature = "serde", serde(rename = "useLocalTime"))]
3014    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3015    pub use_local_time: Option<bool>,
3016}
3017/// Type of grid event that caused this
3018#[derive(Debug, Clone, PartialEq, Eq)]
3019#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3020pub enum GridEventFaultEnum {
3021    CurrentImbalance,
3022    LocalEmergency,
3023    LowInputPower,
3024    OverCurrent,
3025    OverFrequency,
3026    OverVoltage,
3027    PhaseRotation,
3028    RemoteEmergency,
3029    UnderFrequency,
3030    UnderVoltage,
3031    VoltageImbalance,
3032}
3033#[cfg(feature = "alloc")]
3034/// Contains message details, for a message to be displayed on a Charging Station.
3035#[derive(Debug, Clone, PartialEq, Eq)]
3036#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3037pub struct MessageInfo<CustomDataType = crate::NoCustomData> {
3038    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3039    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3040    pub custom_data: Option<CustomDataType>,
3041    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3042    pub display: Option<Component<CustomDataType>>,
3043    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
3044    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
3045    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3046    pub end_date_time: Option<crate::OcppTimestamp>,
3047    /// Unique id within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
3048    pub id: i64,
3049    pub message: MessageContent<CustomDataType>,
3050    #[cfg_attr(feature = "serde", serde(rename = "messageExtra"))]
3051    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3052    pub message_extra: Option<heapless::Vec<MessageContent<CustomDataType>, 4usize>>,
3053    pub priority: MessagePriorityEnum,
3054    /// From what date-time should this message be shown. If omitted: directly.
3055    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
3056    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3057    pub start_date_time: Option<crate::OcppTimestamp>,
3058    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3059    pub state: Option<MessageStateEnum>,
3060    /// During which transaction shall this message be shown.
3061    /// Message SHALL be removed by the Charging Station after transaction has
3062    /// ended.
3063    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
3064    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3065    pub transaction_id: Option<heapless::String<36usize>>,
3066}
3067#[cfg(not(feature = "alloc"))]
3068/// Contains message details, for a message to be displayed on a Charging Station.
3069#[derive(Debug, Clone, PartialEq, Eq)]
3070#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3071pub struct MessageInfo<
3072    CustomDataType = crate::NoCustomData,
3073    const MESSAGE_CONTENT_CONTENT_CAP: usize = 1024usize,
3074> {
3075    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3076    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3077    pub custom_data: Option<CustomDataType>,
3078    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3079    pub display: Option<Component<CustomDataType>>,
3080    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
3081    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
3082    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3083    pub end_date_time: Option<crate::OcppTimestamp>,
3084    /// Unique id within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
3085    pub id: i64,
3086    pub message: MessageContent<CustomDataType, MESSAGE_CONTENT_CONTENT_CAP>,
3087    #[cfg_attr(feature = "serde", serde(rename = "messageExtra"))]
3088    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3089    pub message_extra: Option<
3090        heapless::Vec<
3091            MessageContent<CustomDataType, MESSAGE_CONTENT_CONTENT_CAP>,
3092            4usize,
3093        >,
3094    >,
3095    pub priority: MessagePriorityEnum,
3096    /// From what date-time should this message be shown. If omitted: directly.
3097    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
3098    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3099    pub start_date_time: Option<crate::OcppTimestamp>,
3100    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3101    pub state: Option<MessageStateEnum>,
3102    /// During which transaction shall this message be shown.
3103    /// Message SHALL be removed by the Charging Station after transaction has
3104    /// ended.
3105    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
3106    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3107    pub transaction_id: Option<heapless::String<36usize>>,
3108}
3109/// EV AC charging parameters for ISO 15118-2
3110#[derive(Debug, Clone, PartialEq)]
3111#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3112pub struct ACChargingParameters<CustomDataType = crate::NoCustomData> {
3113    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3114    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3115    pub custom_data: Option<CustomDataType>,
3116    /// Amount of energy requested (in Wh). This includes energy required for preconditioning.
3117    /// Relates to: +
3118    /// *ISO 15118-2*: AC_EVChargeParameterType: EAmount +
3119    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVTargetEnergyRequest
3120    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
3121    pub energy_amount: f64,
3122    /// Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity.
3123    /// Relates to: +
3124    /// *ISO 15118-2*: AC_EVChargeParameterType: EVMaxCurrent
3125    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
3126    pub ev_max_current: f64,
3127    /// Maximum voltage supported by the electric vehicle.
3128    /// Relates to: +
3129    /// *ISO 15118-2*: AC_EVChargeParameterType: EVMaxVoltage
3130    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
3131    pub ev_max_voltage: f64,
3132    /// Minimum current (amps) supported by the electric vehicle (per phase).
3133    /// Relates to: +
3134    /// *ISO 15118-2*: AC_EVChargeParameterType: EVMinCurrent
3135    #[cfg_attr(feature = "serde", serde(rename = "evMinCurrent"))]
3136    pub ev_min_current: f64,
3137}
3138/// *(2.1)* Indicates whether EV wants to operate in Dynamic or Scheduled mode. When absent, Scheduled mode is assumed for backwards compatibility. +
3139/// *ISO 15118-20:* +
3140/// ServiceSelectionReq(SelectedEnergyTransferService)
3141#[derive(Debug, Clone, PartialEq, Eq)]
3142#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3143pub enum ControlModeEnum {
3144    ScheduledControl,
3145    DynamicControl,
3146}
3147/// EV DC charging parameters for ISO 15118-2
3148#[derive(Debug, Clone, PartialEq)]
3149#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3150pub struct DCChargingParameters<CustomDataType = crate::NoCustomData> {
3151    /// Percentage of SoC at which the EV considers a fast charging process to end. (possible values: 0 - 100)
3152    /// Relates to: +
3153    /// *ISO 15118-2*: DC_EVChargeParameterType: BulkSOC
3154    #[cfg_attr(feature = "serde", serde(rename = "bulkSoC"))]
3155    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3156    pub bulk_so_c: Option<i64>,
3157    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3158    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3159    pub custom_data: Option<CustomDataType>,
3160    /// Amount of energy requested (in Wh). This inludes energy required for preconditioning.
3161    /// Relates to: +
3162    /// *ISO 15118-2*: DC_EVChargeParameterType: EVEnergyRequest
3163    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
3164    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3165    pub energy_amount: Option<f64>,
3166    /// Capacity of the electric vehicle battery (in Wh).
3167    /// Relates to: +
3168    /// *ISO 15118-2*: DC_EVChargeParameterType: EVEnergyCapacity
3169    #[cfg_attr(feature = "serde", serde(rename = "evEnergyCapacity"))]
3170    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3171    pub ev_energy_capacity: Option<f64>,
3172    /// Maximum current (in A) supported by the electric vehicle. Includes cable capacity.
3173    /// Relates to: +
3174    /// *ISO 15118-2*: DC_EVChargeParameterType:EVMaximumCurrentLimit
3175    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
3176    pub ev_max_current: f64,
3177    /// Maximum power (in W) supported by the electric vehicle. Required for DC charging.
3178    /// Relates to: +
3179    /// *ISO 15118-2*: DC_EVChargeParameterType: EVMaximumPowerLimit
3180    #[cfg_attr(feature = "serde", serde(rename = "evMaxPower"))]
3181    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3182    pub ev_max_power: Option<f64>,
3183    /// Maximum voltage supported by the electric vehicle.
3184    /// Relates to: +
3185    /// *ISO 15118-2*: DC_EVChargeParameterType: EVMaximumVoltageLimit
3186    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
3187    pub ev_max_voltage: f64,
3188    /// Percentage of SoC at which the EV considers the battery fully charged. (possible values: 0 - 100)
3189    /// Relates to: +
3190    /// *ISO 15118-2*: DC_EVChargeParameterType: FullSOC
3191    #[cfg_attr(feature = "serde", serde(rename = "fullSoC"))]
3192    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3193    pub full_so_c: Option<i64>,
3194    /// Energy available in the battery (in percent of the battery capacity)
3195    /// Relates to: +
3196    /// *ISO 15118-2*: DC_EVChargeParameterType: DC_EVStatus: EVRESSSOC
3197    #[cfg_attr(feature = "serde", serde(rename = "stateOfCharge"))]
3198    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3199    pub state_of_charge: Option<i64>,
3200}
3201#[derive(Debug, Clone, PartialEq, Eq)]
3202#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3203pub enum IslandingDetectionEnum {
3204    NoAntiIslandingSupport,
3205    RoCoF,
3206    #[cfg_attr(feature = "serde", serde(rename = "UVP_OVP"))]
3207    UVPOVP,
3208    #[cfg_attr(feature = "serde", serde(rename = "UFP_OFP"))]
3209    UFPOFP,
3210    VoltageVectorShift,
3211    ZeroCrossingDetection,
3212    OtherPassive,
3213    ImpedanceMeasurement,
3214    ImpedanceAtFrequency,
3215    SlipModeFrequencyShift,
3216    SandiaFrequencyShift,
3217    SandiaVoltageShift,
3218    FrequencyJump,
3219    RCLQFactor,
3220    OtherActive,
3221}
3222#[cfg(feature = "alloc")]
3223/// *(2.1)* DERChargingParametersType is used in ChargingNeedsType during an ISO 15118-20 session for AC_BPT_DER to report the inverter settings related to DER control that were agreed between EVSE and EV.
3224///
3225/// Fields starting with "ev" contain values from the EV.
3226/// Other fields contain a value that is supported by both EV and EVSE.
3227///
3228/// DERChargingParametersType type is only relevant in case of an ISO 15118-20 AC_BPT_DER/AC_DER charging session.
3229///
3230/// NOTE: All these fields have values greater or equal to zero (i.e. are non-negative)
3231#[derive(Debug, Clone, PartialEq)]
3232#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3233pub struct DERChargingParameters<CustomDataType = crate::NoCustomData> {
3234    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3235    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3236    pub custom_data: Option<CustomDataType>,
3237    /// Maximum allowed duration of DC injection at level 1 charging. +
3238    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel1DCInjection
3239    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel1DCInjection"))]
3240    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3241    pub ev_duration_level1_d_c_injection: Option<f64>,
3242    /// Maximum allowed duration of DC injection at level 2 charging. +
3243    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel2DCInjection
3244    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel2DCInjection"))]
3245    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3246    pub ev_duration_level2_d_c_injection: Option<f64>,
3247    /// Hardware version of EV inverter. +
3248    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterHwVersion
3249    #[cfg_attr(feature = "serde", serde(rename = "evInverterHwVersion"))]
3250    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3251    pub ev_inverter_hw_version: Option<heapless::String<50usize>>,
3252    /// Manufacturer of the EV inverter. +
3253    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterManufacturer
3254    #[cfg_attr(feature = "serde", serde(rename = "evInverterManufacturer"))]
3255    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3256    pub ev_inverter_manufacturer: Option<heapless::String<50usize>>,
3257    /// Model name of the EV inverter. +
3258    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterModel
3259    #[cfg_attr(feature = "serde", serde(rename = "evInverterModel"))]
3260    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3261    pub ev_inverter_model: Option<heapless::String<50usize>>,
3262    /// Serial number of the EV inverter. +
3263    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSerialNumber
3264    #[cfg_attr(feature = "serde", serde(rename = "evInverterSerialNumber"))]
3265    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3266    pub ev_inverter_serial_number: Option<heapless::String<50usize>>,
3267    /// Software version of EV inverter. +
3268    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSwVersion
3269    #[cfg_attr(feature = "serde", serde(rename = "evInverterSwVersion"))]
3270    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3271    pub ev_inverter_sw_version: Option<heapless::String<50usize>>,
3272    /// Type of islanding detection method. Only mandatory when islanding detection is required at the site, as set in the ISO 15118 Service Details configuration. +
3273    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingDetectionMethod
3274    #[cfg_attr(feature = "serde", serde(rename = "evIslandingDetectionMethod"))]
3275    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3276    pub ev_islanding_detection_method: Option<alloc::vec::Vec<IslandingDetectionEnum>>,
3277    /// Time after which EV will trip if an island has been detected. +
3278    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingTripTime
3279    #[cfg_attr(feature = "serde", serde(rename = "evIslandingTripTime"))]
3280    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3281    pub ev_islanding_trip_time: Option<f64>,
3282    /// Maximum injected DC current allowed at level 1 charging. +
3283    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel1DCInjection
3284    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel1DCInjection"))]
3285    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3286    pub ev_maximum_level1_d_c_injection: Option<f64>,
3287    /// Maximum injected DC current allowed at level 2 charging. +
3288    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel2DCInjection
3289    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel2DCInjection"))]
3290    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3291    pub ev_maximum_level2_d_c_injection: Option<f64>,
3292    /// Rated maximum injected active power by EV, at specified over-excited power factor (overExcitedPowerFactor). +
3293    /// It can also be defined as the rated maximum discharge power at the rated minimum injected reactive power value. This means that if the EV is providing reactive power support, and it is requested to discharge at max power (e.g. to satisfy an EMS request), the EV may override the request and discharge up to overExcitedMaximumDischargePower to meet the minimum reactive power requirements. +
3294    /// Corresponds to the WOvPF attribute in IEC 61850. +
3295    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedMaximumDischargePower
3296    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedMaxDischargePower"))]
3297    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3298    pub ev_over_excited_max_discharge_power: Option<f64>,
3299    /// EV power factor when injecting (over excited) the minimum reactive power. +
3300    /// Corresponds to the OvPF attribute in IEC 61850. +
3301    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedPowerFactor
3302    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedPowerFactor"))]
3303    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3304    pub ev_over_excited_power_factor: Option<f64>,
3305    /// Measure of the susceptibility of the circuit to reactance, in Siemens (S). +
3306    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVReactiveSusceptance
3307    #[cfg_attr(feature = "serde", serde(rename = "evReactiveSusceptance"))]
3308    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3309    pub ev_reactive_susceptance: Option<f64>,
3310    /// Total energy value, in Wh, that EV is allowed to provide during the entire V2G session. The value is independent of the V2X Cycling area. Once this value reaches the value of 0, the EV may block any attempt to discharge in order to protect the battery health.
3311    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVSessionTotalDischargeEnergyAvailable
3312    #[cfg_attr(
3313        feature = "serde",
3314        serde(rename = "evSessionTotalDischargeEnergyAvailable")
3315    )]
3316    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3317    pub ev_session_total_discharge_energy_available: Option<f64>,
3318    /// DER control functions supported by EV. +
3319    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType:DERControlFunctions (bitmap)
3320    #[cfg_attr(feature = "serde", serde(rename = "evSupportedDERControl"))]
3321    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3322    pub ev_supported_d_e_r_control: Option<alloc::vec::Vec<DERControlEnum>>,
3323    /// Rated maximum injected active power by EV supported at specified under-excited power factor (EVUnderExcitedPowerFactor). +
3324    /// It can also be defined as the rated maximum dischargePower at the rated minimum absorbed reactive power value.
3325    /// This means that if the EV is providing reactive power support, and it is requested to discharge at max power (e.g. to satisfy an EMS request), the EV may override the request and discharge up to underExcitedMaximumDischargePower to meet the minimum reactive power requirements. +
3326    /// This corresponds to the WUnPF attribute in the IEC 61850. +
3327    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedMaximumDischargePower
3328    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedMaxDischargePower"))]
3329    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3330    pub ev_under_excited_max_discharge_power: Option<f64>,
3331    /// EV power factor when injecting (under excited) the minimum reactive power. +
3332    /// Corresponds to the OvPF attribute in IEC 61850. +
3333    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedPowerFactor
3334    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedPowerFactor"))]
3335    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3336    pub ev_under_excited_power_factor: Option<f64>,
3337    /// Rated maximum total apparent power, defined by min(EV, EVSE) in va.
3338    /// Corresponds to the VAMaxRtg in IEC 61850. +
3339    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumApparentPower
3340    #[cfg_attr(feature = "serde", serde(rename = "maxApparentPower"))]
3341    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3342    pub max_apparent_power: Option<f64>,
3343    /// Rated maximum absorbed apparent power, defined by min(EV, EVSE) in va. +
3344    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3345    ///     in which case this field represents phase L1. +
3346    ///     Corresponds to the ChaVAMaxRtg in IEC 61850. +
3347    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower
3348    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower"))]
3349    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3350    pub max_charge_apparent_power: Option<f64>,
3351    /// Rated maximum absorbed apparent power on phase L2, defined by min(EV, EVSE) in va.
3352    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3353    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L2
3354    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L2"))]
3355    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3356    pub max_charge_apparent_power_l2: Option<f64>,
3357    /// Rated maximum absorbed apparent power on phase L3, defined by min(EV, EVSE) in va.
3358    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3359    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L3
3360    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L3"))]
3361    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3362    pub max_charge_apparent_power_l3: Option<f64>,
3363    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars. +
3364    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3365    ///     in which case this field represents phase L1. +
3366    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3367    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower
3368    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower"))]
3369    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3370    pub max_charge_reactive_power: Option<f64>,
3371    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3372    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3373    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L2
3374    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L2"))]
3375    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3376    pub max_charge_reactive_power_l2: Option<f64>,
3377    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3378    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3379    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L3
3380    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L3"))]
3381    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3382    pub max_charge_reactive_power_l3: Option<f64>,
3383    /// Rated maximum injected apparent power, defined by min(EV, EVSE) in va. +
3384    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3385    ///     in which case this field represents phase L1. +
3386    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3387    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower
3388    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower"))]
3389    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3390    pub max_discharge_apparent_power: Option<f64>,
3391    /// Rated maximum injected apparent power on phase L2, defined by min(EV, EVSE) in va. +
3392    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3393    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L2
3394    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L2"))]
3395    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3396    pub max_discharge_apparent_power_l2: Option<f64>,
3397    /// Rated maximum injected apparent power on phase L3, defined by min(EV, EVSE) in va. +
3398    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3399    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L3
3400    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L3"))]
3401    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3402    pub max_discharge_apparent_power_l3: Option<f64>,
3403    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars. +
3404    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3405    ///     in which case this field represents phase L1. +
3406    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3407    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower
3408    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower"))]
3409    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3410    pub max_discharge_reactive_power: Option<f64>,
3411    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3412    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3413    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L2
3414    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L2"))]
3415    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3416    pub max_discharge_reactive_power_l2: Option<f64>,
3417    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3418    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3419    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L3
3420    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L3"))]
3421    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3422    pub max_discharge_reactive_power_l3: Option<f64>,
3423    /// Maximum AC rms voltage, as defined by min(EV, EVSE)  to operate with. +
3424    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumNominalVoltage
3425    #[cfg_attr(feature = "serde", serde(rename = "maxNominalVoltage"))]
3426    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3427    pub max_nominal_voltage: Option<f64>,
3428    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars. +
3429    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3430    ///     in which case this field represents phase L1. +
3431    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower
3432    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower"))]
3433    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3434    pub min_charge_reactive_power: Option<f64>,
3435    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L2. +
3436    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L2
3437    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L2"))]
3438    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3439    pub min_charge_reactive_power_l2: Option<f64>,
3440    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L3. +
3441    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L3
3442    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L3"))]
3443    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3444    pub min_charge_reactive_power_l3: Option<f64>,
3445    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in vars. +
3446    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3447    ///     in which case this field represents phase L1. +
3448    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower
3449    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower"))]
3450    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3451    pub min_discharge_reactive_power: Option<f64>,
3452    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L2. +
3453    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L2
3454    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L2"))]
3455    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3456    pub min_discharge_reactive_power_l2: Option<f64>,
3457    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L3. +
3458    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L3
3459    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L3"))]
3460    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3461    pub min_discharge_reactive_power_l3: Option<f64>,
3462    /// Minimum AC rms voltage, as defined by max(EV, EVSE)  to operate with. +
3463    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumNominalVoltage
3464    #[cfg_attr(feature = "serde", serde(rename = "minNominalVoltage"))]
3465    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3466    pub min_nominal_voltage: Option<f64>,
3467    /// Line voltage supported by EVSE and EV.
3468    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltage
3469    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltage"))]
3470    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3471    pub nominal_voltage: Option<f64>,
3472    /// The nominal AC voltage (rms) offset between the Charging Station's electrical connection point and the utility’s point of common coupling. +
3473    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltageOffset
3474    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltageOffset"))]
3475    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3476    pub nominal_voltage_offset: Option<f64>,
3477}
3478#[cfg(not(feature = "alloc"))]
3479/// *(2.1)* DERChargingParametersType is used in ChargingNeedsType during an ISO 15118-20 session for AC_BPT_DER to report the inverter settings related to DER control that were agreed between EVSE and EV.
3480///
3481/// Fields starting with "ev" contain values from the EV.
3482/// Other fields contain a value that is supported by both EV and EVSE.
3483///
3484/// DERChargingParametersType type is only relevant in case of an ISO 15118-20 AC_BPT_DER/AC_DER charging session.
3485///
3486/// NOTE: All these fields have values greater or equal to zero (i.e. are non-negative)
3487#[derive(Debug, Clone, PartialEq)]
3488#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3489pub struct DERChargingParameters<
3490    CustomDataType = crate::NoCustomData,
3491    const D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP: usize = 8usize,
3492    const D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP: usize = 8usize,
3493> {
3494    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3495    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3496    pub custom_data: Option<CustomDataType>,
3497    /// Maximum allowed duration of DC injection at level 1 charging. +
3498    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel1DCInjection
3499    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel1DCInjection"))]
3500    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3501    pub ev_duration_level1_d_c_injection: Option<f64>,
3502    /// Maximum allowed duration of DC injection at level 2 charging. +
3503    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel2DCInjection
3504    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel2DCInjection"))]
3505    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3506    pub ev_duration_level2_d_c_injection: Option<f64>,
3507    /// Hardware version of EV inverter. +
3508    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterHwVersion
3509    #[cfg_attr(feature = "serde", serde(rename = "evInverterHwVersion"))]
3510    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3511    pub ev_inverter_hw_version: Option<heapless::String<50usize>>,
3512    /// Manufacturer of the EV inverter. +
3513    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterManufacturer
3514    #[cfg_attr(feature = "serde", serde(rename = "evInverterManufacturer"))]
3515    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3516    pub ev_inverter_manufacturer: Option<heapless::String<50usize>>,
3517    /// Model name of the EV inverter. +
3518    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterModel
3519    #[cfg_attr(feature = "serde", serde(rename = "evInverterModel"))]
3520    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3521    pub ev_inverter_model: Option<heapless::String<50usize>>,
3522    /// Serial number of the EV inverter. +
3523    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSerialNumber
3524    #[cfg_attr(feature = "serde", serde(rename = "evInverterSerialNumber"))]
3525    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3526    pub ev_inverter_serial_number: Option<heapless::String<50usize>>,
3527    /// Software version of EV inverter. +
3528    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSwVersion
3529    #[cfg_attr(feature = "serde", serde(rename = "evInverterSwVersion"))]
3530    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3531    pub ev_inverter_sw_version: Option<heapless::String<50usize>>,
3532    /// Type of islanding detection method. Only mandatory when islanding detection is required at the site, as set in the ISO 15118 Service Details configuration. +
3533    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingDetectionMethod
3534    #[cfg_attr(feature = "serde", serde(rename = "evIslandingDetectionMethod"))]
3535    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3536    pub ev_islanding_detection_method: Option<
3537        heapless::Vec<
3538            IslandingDetectionEnum,
3539            D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP,
3540        >,
3541    >,
3542    /// Time after which EV will trip if an island has been detected. +
3543    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingTripTime
3544    #[cfg_attr(feature = "serde", serde(rename = "evIslandingTripTime"))]
3545    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3546    pub ev_islanding_trip_time: Option<f64>,
3547    /// Maximum injected DC current allowed at level 1 charging. +
3548    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel1DCInjection
3549    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel1DCInjection"))]
3550    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3551    pub ev_maximum_level1_d_c_injection: Option<f64>,
3552    /// Maximum injected DC current allowed at level 2 charging. +
3553    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel2DCInjection
3554    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel2DCInjection"))]
3555    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3556    pub ev_maximum_level2_d_c_injection: Option<f64>,
3557    /// Rated maximum injected active power by EV, at specified over-excited power factor (overExcitedPowerFactor). +
3558    /// It can also be defined as the rated maximum discharge power at the rated minimum injected reactive power value. This means that if the EV is providing reactive power support, and it is requested to discharge at max power (e.g. to satisfy an EMS request), the EV may override the request and discharge up to overExcitedMaximumDischargePower to meet the minimum reactive power requirements. +
3559    /// Corresponds to the WOvPF attribute in IEC 61850. +
3560    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedMaximumDischargePower
3561    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedMaxDischargePower"))]
3562    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3563    pub ev_over_excited_max_discharge_power: Option<f64>,
3564    /// EV power factor when injecting (over excited) the minimum reactive power. +
3565    /// Corresponds to the OvPF attribute in IEC 61850. +
3566    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedPowerFactor
3567    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedPowerFactor"))]
3568    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3569    pub ev_over_excited_power_factor: Option<f64>,
3570    /// Measure of the susceptibility of the circuit to reactance, in Siemens (S). +
3571    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVReactiveSusceptance
3572    #[cfg_attr(feature = "serde", serde(rename = "evReactiveSusceptance"))]
3573    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3574    pub ev_reactive_susceptance: Option<f64>,
3575    /// Total energy value, in Wh, that EV is allowed to provide during the entire V2G session. The value is independent of the V2X Cycling area. Once this value reaches the value of 0, the EV may block any attempt to discharge in order to protect the battery health.
3576    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVSessionTotalDischargeEnergyAvailable
3577    #[cfg_attr(
3578        feature = "serde",
3579        serde(rename = "evSessionTotalDischargeEnergyAvailable")
3580    )]
3581    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3582    pub ev_session_total_discharge_energy_available: Option<f64>,
3583    /// DER control functions supported by EV. +
3584    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType:DERControlFunctions (bitmap)
3585    #[cfg_attr(feature = "serde", serde(rename = "evSupportedDERControl"))]
3586    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3587    pub ev_supported_d_e_r_control: Option<
3588        heapless::Vec<
3589            DERControlEnum,
3590            D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP,
3591        >,
3592    >,
3593    /// Rated maximum injected active power by EV supported at specified under-excited power factor (EVUnderExcitedPowerFactor). +
3594    /// It can also be defined as the rated maximum dischargePower at the rated minimum absorbed reactive power value.
3595    /// This means that if the EV is providing reactive power support, and it is requested to discharge at max power (e.g. to satisfy an EMS request), the EV may override the request and discharge up to underExcitedMaximumDischargePower to meet the minimum reactive power requirements. +
3596    /// This corresponds to the WUnPF attribute in the IEC 61850. +
3597    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedMaximumDischargePower
3598    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedMaxDischargePower"))]
3599    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3600    pub ev_under_excited_max_discharge_power: Option<f64>,
3601    /// EV power factor when injecting (under excited) the minimum reactive power. +
3602    /// Corresponds to the OvPF attribute in IEC 61850. +
3603    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedPowerFactor
3604    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedPowerFactor"))]
3605    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3606    pub ev_under_excited_power_factor: Option<f64>,
3607    /// Rated maximum total apparent power, defined by min(EV, EVSE) in va.
3608    /// Corresponds to the VAMaxRtg in IEC 61850. +
3609    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumApparentPower
3610    #[cfg_attr(feature = "serde", serde(rename = "maxApparentPower"))]
3611    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3612    pub max_apparent_power: Option<f64>,
3613    /// Rated maximum absorbed apparent power, defined by min(EV, EVSE) in va. +
3614    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3615    ///     in which case this field represents phase L1. +
3616    ///     Corresponds to the ChaVAMaxRtg in IEC 61850. +
3617    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower
3618    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower"))]
3619    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3620    pub max_charge_apparent_power: Option<f64>,
3621    /// Rated maximum absorbed apparent power on phase L2, defined by min(EV, EVSE) in va.
3622    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3623    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L2
3624    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L2"))]
3625    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3626    pub max_charge_apparent_power_l2: Option<f64>,
3627    /// Rated maximum absorbed apparent power on phase L3, defined by min(EV, EVSE) in va.
3628    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3629    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L3
3630    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L3"))]
3631    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3632    pub max_charge_apparent_power_l3: Option<f64>,
3633    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars. +
3634    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3635    ///     in which case this field represents phase L1. +
3636    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3637    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower
3638    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower"))]
3639    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3640    pub max_charge_reactive_power: Option<f64>,
3641    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3642    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3643    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L2
3644    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L2"))]
3645    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3646    pub max_charge_reactive_power_l2: Option<f64>,
3647    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3648    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3649    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L3
3650    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L3"))]
3651    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3652    pub max_charge_reactive_power_l3: Option<f64>,
3653    /// Rated maximum injected apparent power, defined by min(EV, EVSE) in va. +
3654    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3655    ///     in which case this field represents phase L1. +
3656    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3657    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower
3658    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower"))]
3659    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3660    pub max_discharge_apparent_power: Option<f64>,
3661    /// Rated maximum injected apparent power on phase L2, defined by min(EV, EVSE) in va. +
3662    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3663    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L2
3664    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L2"))]
3665    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3666    pub max_discharge_apparent_power_l2: Option<f64>,
3667    /// Rated maximum injected apparent power on phase L3, defined by min(EV, EVSE) in va. +
3668    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3669    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L3
3670    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L3"))]
3671    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3672    pub max_discharge_apparent_power_l3: Option<f64>,
3673    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars. +
3674    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3675    ///     in which case this field represents phase L1. +
3676    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3677    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower
3678    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower"))]
3679    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3680    pub max_discharge_reactive_power: Option<f64>,
3681    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3682    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3683    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L2
3684    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L2"))]
3685    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3686    pub max_discharge_reactive_power_l2: Option<f64>,
3687    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3688    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3689    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L3
3690    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L3"))]
3691    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3692    pub max_discharge_reactive_power_l3: Option<f64>,
3693    /// Maximum AC rms voltage, as defined by min(EV, EVSE)  to operate with. +
3694    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumNominalVoltage
3695    #[cfg_attr(feature = "serde", serde(rename = "maxNominalVoltage"))]
3696    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3697    pub max_nominal_voltage: Option<f64>,
3698    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars. +
3699    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3700    ///     in which case this field represents phase L1. +
3701    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower
3702    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower"))]
3703    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3704    pub min_charge_reactive_power: Option<f64>,
3705    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L2. +
3706    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L2
3707    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L2"))]
3708    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3709    pub min_charge_reactive_power_l2: Option<f64>,
3710    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L3. +
3711    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L3
3712    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L3"))]
3713    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3714    pub min_charge_reactive_power_l3: Option<f64>,
3715    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in vars. +
3716    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3717    ///     in which case this field represents phase L1. +
3718    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower
3719    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower"))]
3720    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3721    pub min_discharge_reactive_power: Option<f64>,
3722    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L2. +
3723    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L2
3724    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L2"))]
3725    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3726    pub min_discharge_reactive_power_l2: Option<f64>,
3727    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L3. +
3728    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L3
3729    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L3"))]
3730    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3731    pub min_discharge_reactive_power_l3: Option<f64>,
3732    /// Minimum AC rms voltage, as defined by max(EV, EVSE)  to operate with. +
3733    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumNominalVoltage
3734    #[cfg_attr(feature = "serde", serde(rename = "minNominalVoltage"))]
3735    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3736    pub min_nominal_voltage: Option<f64>,
3737    /// Line voltage supported by EVSE and EV.
3738    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltage
3739    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltage"))]
3740    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3741    pub nominal_voltage: Option<f64>,
3742    /// The nominal AC voltage (rms) offset between the Charging Station's electrical connection point and the utility’s point of common coupling. +
3743    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltageOffset
3744    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltageOffset"))]
3745    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3746    pub nominal_voltage_offset: Option<f64>,
3747}
3748/// *(2.1)* An entry in price schedule over time for which EV is willing to discharge.
3749#[derive(Debug, Clone, PartialEq)]
3750#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3751pub struct EVPriceRule<CustomDataType = crate::NoCustomData> {
3752    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3753    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3754    pub custom_data: Option<CustomDataType>,
3755    /// Cost per kWh.
3756    #[cfg_attr(feature = "serde", serde(rename = "energyFee"))]
3757    pub energy_fee: f64,
3758    /// The EnergyFee applies between this value and the value of the PowerRangeStart of the subsequent EVPriceRule. If the power is below this value, the EnergyFee of the previous EVPriceRule applies. Negative values are used for discharging.
3759    #[cfg_attr(feature = "serde", serde(rename = "powerRangeStart"))]
3760    pub power_range_start: f64,
3761}
3762/// *(2.1)* An entry in price schedule over time for which EV is willing to discharge.
3763#[derive(Debug, Clone, PartialEq)]
3764#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3765pub struct EVAbsolutePriceScheduleEntry<CustomDataType = crate::NoCustomData> {
3766    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3767    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3768    pub custom_data: Option<CustomDataType>,
3769    /// The amount of seconds of this entry.
3770    pub duration: i64,
3771    #[cfg_attr(feature = "serde", serde(rename = "evPriceRule"))]
3772    pub ev_price_rule: heapless::Vec<EVPriceRule<CustomDataType>, 8usize>,
3773}
3774#[cfg(feature = "alloc")]
3775/// *(2.1)* Price schedule of EV energy offer.
3776#[derive(Debug, Clone, PartialEq)]
3777#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3778pub struct EVAbsolutePriceSchedule<CustomDataType = crate::NoCustomData> {
3779    /// Currency code according to ISO 4217.
3780    pub currency: heapless::String<3usize>,
3781    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3782    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3783    pub custom_data: Option<CustomDataType>,
3784    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceScheduleEntries"))]
3785    pub ev_absolute_price_schedule_entries: alloc::vec::Vec<
3786        EVAbsolutePriceScheduleEntry<CustomDataType>,
3787    >,
3788    /// ISO 15118-20 URN of price algorithm: Power, PeakPower, StackedEnergy.
3789    #[cfg_attr(feature = "serde", serde(rename = "priceAlgorithm"))]
3790    pub price_algorithm: alloc::string::String,
3791    /// Starting point in time of the EVEnergyOffer.
3792    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3793    pub time_anchor: crate::OcppTimestamp,
3794}
3795#[cfg(not(feature = "alloc"))]
3796/// *(2.1)* Price schedule of EV energy offer.
3797#[derive(Debug, Clone, PartialEq)]
3798#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3799pub struct EVAbsolutePriceSchedule<
3800    CustomDataType = crate::NoCustomData,
3801    const E_V_ABSOLUTE_PRICE_SCHEDULE_EV_ABSOLUTE_PRICE_SCHEDULE_ENTRIES_CAP: usize = 8usize,
3802    const E_V_ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP: usize = 1024usize,
3803> {
3804    /// Currency code according to ISO 4217.
3805    pub currency: heapless::String<3usize>,
3806    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3807    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3808    pub custom_data: Option<CustomDataType>,
3809    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceScheduleEntries"))]
3810    pub ev_absolute_price_schedule_entries: heapless::Vec<
3811        EVAbsolutePriceScheduleEntry<CustomDataType>,
3812        E_V_ABSOLUTE_PRICE_SCHEDULE_EV_ABSOLUTE_PRICE_SCHEDULE_ENTRIES_CAP,
3813    >,
3814    /// ISO 15118-20 URN of price algorithm: Power, PeakPower, StackedEnergy.
3815    #[cfg_attr(feature = "serde", serde(rename = "priceAlgorithm"))]
3816    pub price_algorithm: heapless::String<
3817        E_V_ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP,
3818    >,
3819    /// Starting point in time of the EVEnergyOffer.
3820    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3821    pub time_anchor: crate::OcppTimestamp,
3822}
3823/// *(2.1)* An entry in schedule of the energy amount over time that EV is willing to discharge. A negative value indicates the willingness to discharge under specific conditions, a positive value indicates that the EV currently is not able to offer energy to discharge.
3824#[derive(Debug, Clone, PartialEq)]
3825#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3826pub struct EVPowerScheduleEntry<CustomDataType = crate::NoCustomData> {
3827    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3828    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3829    pub custom_data: Option<CustomDataType>,
3830    /// The duration of this entry.
3831    pub duration: i64,
3832    /// Defines maximum amount of power for the duration of this EVPowerScheduleEntry to be discharged from the EV battery through EVSE power outlet. Negative values are used for discharging.
3833    pub power: f64,
3834}
3835#[cfg(feature = "alloc")]
3836/// *(2.1)* Schedule of EV energy offer.
3837#[derive(Debug, Clone, PartialEq)]
3838#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3839pub struct EVPowerSchedule<CustomDataType = crate::NoCustomData> {
3840    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3841    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3842    pub custom_data: Option<CustomDataType>,
3843    #[cfg_attr(feature = "serde", serde(rename = "evPowerScheduleEntries"))]
3844    pub ev_power_schedule_entries: alloc::vec::Vec<EVPowerScheduleEntry<CustomDataType>>,
3845    /// The time that defines the starting point for the EVEnergyOffer.
3846    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3847    pub time_anchor: crate::OcppTimestamp,
3848}
3849#[cfg(not(feature = "alloc"))]
3850/// *(2.1)* Schedule of EV energy offer.
3851#[derive(Debug, Clone, PartialEq)]
3852#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3853pub struct EVPowerSchedule<
3854    CustomDataType = crate::NoCustomData,
3855    const E_V_POWER_SCHEDULE_EV_POWER_SCHEDULE_ENTRIES_CAP: usize = 8usize,
3856> {
3857    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3858    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3859    pub custom_data: Option<CustomDataType>,
3860    #[cfg_attr(feature = "serde", serde(rename = "evPowerScheduleEntries"))]
3861    pub ev_power_schedule_entries: heapless::Vec<
3862        EVPowerScheduleEntry<CustomDataType>,
3863        E_V_POWER_SCHEDULE_EV_POWER_SCHEDULE_ENTRIES_CAP,
3864    >,
3865    /// The time that defines the starting point for the EVEnergyOffer.
3866    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3867    pub time_anchor: crate::OcppTimestamp,
3868}
3869#[cfg(feature = "alloc")]
3870/// *(2.1)* A schedule of the energy amount over time that EV is willing to discharge. A negative value indicates the willingness to discharge under specific conditions, a positive value indicates that the EV currently is not able to offer energy to discharge.
3871#[derive(Debug, Clone, PartialEq)]
3872#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3873pub struct EVEnergyOffer<CustomDataType = crate::NoCustomData> {
3874    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3875    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3876    pub custom_data: Option<CustomDataType>,
3877    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceSchedule"))]
3878    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3879    pub ev_absolute_price_schedule: Option<EVAbsolutePriceSchedule<CustomDataType>>,
3880    #[cfg_attr(feature = "serde", serde(rename = "evPowerSchedule"))]
3881    pub ev_power_schedule: EVPowerSchedule<CustomDataType>,
3882}
3883#[cfg(not(feature = "alloc"))]
3884/// *(2.1)* A schedule of the energy amount over time that EV is willing to discharge. A negative value indicates the willingness to discharge under specific conditions, a positive value indicates that the EV currently is not able to offer energy to discharge.
3885#[derive(Debug, Clone, PartialEq)]
3886#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3887pub struct EVEnergyOffer<
3888    CustomDataType = crate::NoCustomData,
3889    const E_V_ABSOLUTE_PRICE_SCHEDULE_EV_ABSOLUTE_PRICE_SCHEDULE_ENTRIES_CAP: usize = 8usize,
3890    const E_V_ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP: usize = 1024usize,
3891    const E_V_POWER_SCHEDULE_EV_POWER_SCHEDULE_ENTRIES_CAP: usize = 8usize,
3892> {
3893    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3894    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3895    pub custom_data: Option<CustomDataType>,
3896    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceSchedule"))]
3897    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3898    pub ev_absolute_price_schedule: Option<
3899        EVAbsolutePriceSchedule<
3900            CustomDataType,
3901            E_V_ABSOLUTE_PRICE_SCHEDULE_EV_ABSOLUTE_PRICE_SCHEDULE_ENTRIES_CAP,
3902            E_V_ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP,
3903        >,
3904    >,
3905    #[cfg_attr(feature = "serde", serde(rename = "evPowerSchedule"))]
3906    pub ev_power_schedule: EVPowerSchedule<
3907        CustomDataType,
3908        E_V_POWER_SCHEDULE_EV_POWER_SCHEDULE_ENTRIES_CAP,
3909    >,
3910}
3911/// *(2.1)* Value of EVCC indicates that EV determines min/target SOC and departure time. +
3912/// A value of EVCC_SECC indicates that charging station or CSMS may also update min/target SOC and departure time. +
3913/// *ISO 15118-20:* +
3914/// ServiceSelectionReq(SelectedEnergyTransferService)
3915#[derive(Debug, Clone, PartialEq, Eq)]
3916#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3917pub enum MobilityNeedsModeEnum {
3918    EVCC,
3919    #[cfg_attr(feature = "serde", serde(rename = "EVCC_SECC"))]
3920    EVCCSECC,
3921}
3922/// Charging parameters for ISO 15118-20, also supporting V2X charging/discharging.+
3923/// All values are greater or equal to zero, with the exception of EVMinEnergyRequest, EVMaxEnergyRequest, EVTargetEnergyRequest, EVMinV2XEnergyRequest and EVMaxV2XEnergyRequest.
3924#[derive(Debug, Clone, PartialEq)]
3925#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3926pub struct V2XChargingParameters<CustomDataType = crate::NoCustomData> {
3927    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3928    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3929    pub custom_data: Option<CustomDataType>,
3930    /// Energy to maximum state of charge in Wh
3931    /// Relates to:
3932    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVMaximumEnergyRequest
3933    #[cfg_attr(feature = "serde", serde(rename = "evMaxEnergyRequest"))]
3934    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3935    pub ev_max_energy_request: Option<f64>,
3936    /// Energy (in Wh) to maximum state of charge for cycling (V2X) activity.
3937    /// Negative value indicates that current state of charge is above V2X range.
3938    /// Relates to:
3939    /// *ISO 15118-20*: Dynamic_SEReqControlModeType: EVMaximumV2XEnergyRequest
3940    #[cfg_attr(feature = "serde", serde(rename = "evMaxV2XEnergyRequest"))]
3941    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3942    pub ev_max_v2_x_energy_request: Option<f64>,
3943    /// Energy to minimum allowed state of charge in Wh
3944    /// Relates to:
3945    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVMinimumEnergyRequest
3946    #[cfg_attr(feature = "serde", serde(rename = "evMinEnergyRequest"))]
3947    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3948    pub ev_min_energy_request: Option<f64>,
3949    /// Energy (in Wh) to minimum state of charge for cycling (V2X) activity.
3950    /// Positive value means that current state of charge is below V2X range.
3951    /// Relates to:
3952    /// *ISO 15118-20*: Dynamic_SEReqControlModeType: EVMinimumV2XEnergyRequest
3953    #[cfg_attr(feature = "serde", serde(rename = "evMinV2XEnergyRequest"))]
3954    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3955    pub ev_min_v2_x_energy_request: Option<f64>,
3956    /// Energy to requested state of charge in Wh
3957    /// Relates to:
3958    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVTargetEnergyRequest
3959    #[cfg_attr(feature = "serde", serde(rename = "evTargetEnergyRequest"))]
3960    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3961    pub ev_target_energy_request: Option<f64>,
3962    /// Maximum charge current in A, defined by min(EV, EVSE)
3963    /// Relates to:
3964    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMaximumChargeCurrent
3965    #[cfg_attr(feature = "serde", serde(rename = "maxChargeCurrent"))]
3966    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3967    pub max_charge_current: Option<f64>,
3968    /// Maximum charge (absorbed) power in W, defined by min(EV, EVSE) at unity power factor. +
3969    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
3970    /// It corresponds to the ChaWMax attribute in the IEC 61850.
3971    /// It is usually equivalent to the rated apparent power of the EV when discharging (ChaVAMax) in IEC 61850. +
3972    ///
3973    /// Relates to:
3974    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumChargePower
3975    #[cfg_attr(feature = "serde", serde(rename = "maxChargePower"))]
3976    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3977    pub max_charge_power: Option<f64>,
3978    /// Maximum charge power on phase L2 in W, defined by min(EV, EVSE)
3979    /// Relates to:
3980    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumChargePower_L2
3981    #[cfg_attr(feature = "serde", serde(rename = "maxChargePower_L2"))]
3982    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3983    pub max_charge_power_l2: Option<f64>,
3984    /// Maximum charge power on phase L3 in W, defined by min(EV, EVSE)
3985    /// Relates to:
3986    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumChargePower_L3
3987    #[cfg_attr(feature = "serde", serde(rename = "maxChargePower_L3"))]
3988    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3989    pub max_charge_power_l3: Option<f64>,
3990    /// Maximum discharge current in A, defined by min(EV, EVSE).  Value &gt;= 0.
3991    /// Relates to:
3992    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMaximumDischargeCurrent
3993    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeCurrent"))]
3994    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3995    pub max_discharge_current: Option<f64>,
3996    /// Maximum discharge (injected) power in W, defined by min(EV, EVSE) at unity power factor.  Value &gt;= 0.
3997    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
3998    /// Relates to:
3999    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumDischargePower
4000    #[cfg_attr(feature = "serde", serde(rename = "maxDischargePower"))]
4001    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4002    pub max_discharge_power: Option<f64>,
4003    /// Maximum discharge power on phase L2 in W, defined by min(EV, EVSE).  Value &gt;= 0.
4004    /// Relates to:
4005    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumDischargePowe_L2
4006    #[cfg_attr(feature = "serde", serde(rename = "maxDischargePower_L2"))]
4007    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4008    pub max_discharge_power_l2: Option<f64>,
4009    /// Maximum discharge power on phase L3 in W, defined by min(EV, EVSE).  Value &gt;= 0.
4010    /// Relates to:
4011    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumDischargePower_L3
4012    #[cfg_attr(feature = "serde", serde(rename = "maxDischargePower_L3"))]
4013    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4014    pub max_discharge_power_l3: Option<f64>,
4015    /// Maximum voltage in V, defined by min(EV, EVSE)
4016    /// Relates to:
4017    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMaximumVoltage
4018    #[cfg_attr(feature = "serde", serde(rename = "maxVoltage"))]
4019    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4020    pub max_voltage: Option<f64>,
4021    /// Minimum charge current in A, defined by max(EV, EVSE)
4022    /// Relates to:
4023    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMinimumChargeCurrent
4024    #[cfg_attr(feature = "serde", serde(rename = "minChargeCurrent"))]
4025    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4026    pub min_charge_current: Option<f64>,
4027    /// Minimum charge power in W, defined by max(EV, EVSE).
4028    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4029    /// Relates to:
4030    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumChargePower
4031    #[cfg_attr(feature = "serde", serde(rename = "minChargePower"))]
4032    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4033    pub min_charge_power: Option<f64>,
4034    /// Minimum charge power on phase L2 in W, defined by max(EV, EVSE).
4035    /// Relates to:
4036    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumChargePower_L2
4037    #[cfg_attr(feature = "serde", serde(rename = "minChargePower_L2"))]
4038    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4039    pub min_charge_power_l2: Option<f64>,
4040    /// Minimum charge power on phase L3 in W, defined by max(EV, EVSE).
4041    /// Relates to:
4042    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumChargePower_L3
4043    #[cfg_attr(feature = "serde", serde(rename = "minChargePower_L3"))]
4044    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4045    pub min_charge_power_l3: Option<f64>,
4046    /// Minimum discharge current in A, defined by max(EV, EVSE).  Value &gt;= 0.
4047    /// Relates to:
4048    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMinimumDischargeCurrent
4049    #[cfg_attr(feature = "serde", serde(rename = "minDischargeCurrent"))]
4050    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4051    pub min_discharge_current: Option<f64>,
4052    /// Minimum discharge (injected) power in W, defined by max(EV, EVSE) at unity power factor. Value &gt;= 0. +
4053    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1. +
4054    /// It corresponds to the WMax attribute in the IEC 61850.
4055    /// It is usually equivalent to the rated apparent power of the EV when discharging (VAMax attribute in the IEC 61850).
4056    ///
4057    /// Relates to:
4058    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumDischargePower
4059    #[cfg_attr(feature = "serde", serde(rename = "minDischargePower"))]
4060    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4061    pub min_discharge_power: Option<f64>,
4062    /// Minimum discharge power on phase L2 in W, defined by max(EV, EVSE).  Value &gt;= 0.
4063    /// Relates to:
4064    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumDischargePower_L2
4065    #[cfg_attr(feature = "serde", serde(rename = "minDischargePower_L2"))]
4066    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4067    pub min_discharge_power_l2: Option<f64>,
4068    /// Minimum discharge power on phase L3 in W, defined by max(EV, EVSE).  Value &gt;= 0.
4069    /// Relates to:
4070    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumDischargePower_L3
4071    #[cfg_attr(feature = "serde", serde(rename = "minDischargePower_L3"))]
4072    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4073    pub min_discharge_power_l3: Option<f64>,
4074    /// Minimum voltage in V, defined by max(EV, EVSE)
4075    /// Relates to:
4076    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMinimumVoltage
4077    #[cfg_attr(feature = "serde", serde(rename = "minVoltage"))]
4078    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4079    pub min_voltage: Option<f64>,
4080    /// Target state of charge at departure as percentage.
4081    /// Relates to:
4082    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: TargetSOC
4083    #[cfg_attr(feature = "serde", serde(rename = "targetSoC"))]
4084    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4085    pub target_so_c: Option<i64>,
4086}
4087#[cfg(feature = "alloc")]
4088#[derive(Debug, Clone, PartialEq)]
4089#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4090pub struct ChargingNeeds<CustomDataType = crate::NoCustomData> {
4091    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
4092    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4093    pub ac_charging_parameters: Option<ACChargingParameters<CustomDataType>>,
4094    /// *(2.1)* Modes of energy transfer that are marked as available by EV.
4095    #[cfg_attr(feature = "serde", serde(rename = "availableEnergyTransfer"))]
4096    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4097    pub available_energy_transfer: Option<alloc::vec::Vec<EnergyTransferModeEnum>>,
4098    #[cfg_attr(feature = "serde", serde(rename = "controlMode"))]
4099    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4100    pub control_mode: Option<ControlModeEnum>,
4101    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4102    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4103    pub custom_data: Option<CustomDataType>,
4104    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
4105    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4106    pub dc_charging_parameters: Option<DCChargingParameters<CustomDataType>>,
4107    /// Estimated departure time of the EV. +
4108    /// *ISO 15118-2:* AC/DC_EVChargeParameterType: DepartureTime +
4109    /// *ISO 15118-20:* Dynamic/Scheduled_SEReqControlModeType: DepartureTIme
4110    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
4111    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4112    pub departure_time: Option<crate::OcppTimestamp>,
4113    #[cfg_attr(feature = "serde", serde(rename = "derChargingParameters"))]
4114    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4115    pub der_charging_parameters: Option<DERChargingParameters<CustomDataType>>,
4116    #[cfg_attr(feature = "serde", serde(rename = "evEnergyOffer"))]
4117    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4118    pub ev_energy_offer: Option<EVEnergyOffer<CustomDataType>>,
4119    #[cfg_attr(feature = "serde", serde(rename = "mobilityNeedsMode"))]
4120    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4121    pub mobility_needs_mode: Option<MobilityNeedsModeEnum>,
4122    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
4123    pub requested_energy_transfer: EnergyTransferModeEnum,
4124    #[cfg_attr(feature = "serde", serde(rename = "v2xChargingParameters"))]
4125    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4126    pub v2x_charging_parameters: Option<V2XChargingParameters<CustomDataType>>,
4127}
4128#[cfg(not(feature = "alloc"))]
4129#[derive(Debug, Clone, PartialEq)]
4130#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4131pub struct ChargingNeeds<
4132    CustomDataType = crate::NoCustomData,
4133    const CHARGING_NEEDS_AVAILABLE_ENERGY_TRANSFER_CAP: usize = 8usize,
4134    const D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP: usize = 8usize,
4135    const D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP: usize = 8usize,
4136    const E_V_ABSOLUTE_PRICE_SCHEDULE_EV_ABSOLUTE_PRICE_SCHEDULE_ENTRIES_CAP: usize = 8usize,
4137    const E_V_ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP: usize = 1024usize,
4138    const E_V_POWER_SCHEDULE_EV_POWER_SCHEDULE_ENTRIES_CAP: usize = 8usize,
4139> {
4140    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
4141    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4142    pub ac_charging_parameters: Option<ACChargingParameters<CustomDataType>>,
4143    /// *(2.1)* Modes of energy transfer that are marked as available by EV.
4144    #[cfg_attr(feature = "serde", serde(rename = "availableEnergyTransfer"))]
4145    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4146    pub available_energy_transfer: Option<
4147        heapless::Vec<
4148            EnergyTransferModeEnum,
4149            CHARGING_NEEDS_AVAILABLE_ENERGY_TRANSFER_CAP,
4150        >,
4151    >,
4152    #[cfg_attr(feature = "serde", serde(rename = "controlMode"))]
4153    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4154    pub control_mode: Option<ControlModeEnum>,
4155    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4156    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4157    pub custom_data: Option<CustomDataType>,
4158    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
4159    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4160    pub dc_charging_parameters: Option<DCChargingParameters<CustomDataType>>,
4161    /// Estimated departure time of the EV. +
4162    /// *ISO 15118-2:* AC/DC_EVChargeParameterType: DepartureTime +
4163    /// *ISO 15118-20:* Dynamic/Scheduled_SEReqControlModeType: DepartureTIme
4164    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
4165    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4166    pub departure_time: Option<crate::OcppTimestamp>,
4167    #[cfg_attr(feature = "serde", serde(rename = "derChargingParameters"))]
4168    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4169    pub der_charging_parameters: Option<
4170        DERChargingParameters<
4171            CustomDataType,
4172            D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP,
4173            D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP,
4174        >,
4175    >,
4176    #[cfg_attr(feature = "serde", serde(rename = "evEnergyOffer"))]
4177    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4178    pub ev_energy_offer: Option<
4179        EVEnergyOffer<
4180            CustomDataType,
4181            E_V_ABSOLUTE_PRICE_SCHEDULE_EV_ABSOLUTE_PRICE_SCHEDULE_ENTRIES_CAP,
4182            E_V_ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP,
4183            E_V_POWER_SCHEDULE_EV_POWER_SCHEDULE_ENTRIES_CAP,
4184        >,
4185    >,
4186    #[cfg_attr(feature = "serde", serde(rename = "mobilityNeedsMode"))]
4187    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4188    pub mobility_needs_mode: Option<MobilityNeedsModeEnum>,
4189    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
4190    pub requested_energy_transfer: EnergyTransferModeEnum,
4191    #[cfg_attr(feature = "serde", serde(rename = "v2xChargingParameters"))]
4192    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4193    pub v2x_charging_parameters: Option<V2XChargingParameters<CustomDataType>>,
4194}
4195/// 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.
4196#[derive(Debug, Clone, PartialEq, Eq)]
4197#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4198pub enum NotifyEVChargingNeedsStatusEnum {
4199    Accepted,
4200    Rejected,
4201    Processing,
4202    NoChargingProfile,
4203}
4204/// Specifies the event notification type of the message.
4205#[derive(Debug, Clone, PartialEq, Eq)]
4206#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4207pub enum EventNotificationEnum {
4208    HardWiredNotification,
4209    HardWiredMonitor,
4210    PreconfiguredMonitor,
4211    CustomMonitor,
4212}
4213/// Type of trigger for this event, e.g. exceeding a threshold value.
4214#[derive(Debug, Clone, PartialEq, Eq)]
4215#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4216pub enum EventTriggerEnum {
4217    Alerting,
4218    Delta,
4219    Periodic,
4220}
4221#[cfg(feature = "alloc")]
4222/// Class to report an event notification for a component-variable.
4223#[derive(Debug, Clone, PartialEq, Eq)]
4224#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4225pub struct EventData<CustomDataType = crate::NoCustomData> {
4226    /// Actual value (_attributeType_ Actual) of the variable.
4227    ///
4228    /// 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.
4229    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
4230    pub actual_value: alloc::string::String,
4231    /// Refers to the Id of an event that is considered to be the cause for this event.
4232    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4233    pub cause: Option<i64>,
4234    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
4235    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4236    pub cleared: Option<bool>,
4237    pub component: Component<CustomDataType>,
4238    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4239    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4240    pub custom_data: Option<CustomDataType>,
4241    /// Identifies the event. This field can be referred to as a cause by other events.
4242    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
4243    pub event_id: i64,
4244    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
4245    pub event_notification_type: EventNotificationEnum,
4246    /// *(2.1)* Severity associated with the monitor in _variableMonitoringId_ or with the hardwired notification.
4247    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4248    pub severity: Option<i64>,
4249    /// Technical (error) code as reported by component.
4250    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
4251    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4252    pub tech_code: Option<heapless::String<50usize>>,
4253    /// Technical detail information as reported by component.
4254    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
4255    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4256    pub tech_info: Option<heapless::String<500usize>>,
4257    /// Timestamp of the moment the report was generated.
4258    pub timestamp: crate::OcppTimestamp,
4259    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
4260    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4261    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4262    pub transaction_id: Option<heapless::String<36usize>>,
4263    pub trigger: EventTriggerEnum,
4264    pub variable: Variable<CustomDataType>,
4265    /// Identifies the VariableMonitoring which triggered the event.
4266    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
4267    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4268    pub variable_monitoring_id: Option<i64>,
4269}
4270#[cfg(not(feature = "alloc"))]
4271/// Class to report an event notification for a component-variable.
4272#[derive(Debug, Clone, PartialEq, Eq)]
4273#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4274pub struct EventData<
4275    CustomDataType = crate::NoCustomData,
4276    const EVENT_DATA_ACTUAL_VALUE_CAP: usize = 1024usize,
4277> {
4278    /// Actual value (_attributeType_ Actual) of the variable.
4279    ///
4280    /// 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.
4281    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
4282    pub actual_value: heapless::String<EVENT_DATA_ACTUAL_VALUE_CAP>,
4283    /// Refers to the Id of an event that is considered to be the cause for this event.
4284    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4285    pub cause: Option<i64>,
4286    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
4287    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4288    pub cleared: Option<bool>,
4289    pub component: Component<CustomDataType>,
4290    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4291    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4292    pub custom_data: Option<CustomDataType>,
4293    /// Identifies the event. This field can be referred to as a cause by other events.
4294    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
4295    pub event_id: i64,
4296    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
4297    pub event_notification_type: EventNotificationEnum,
4298    /// *(2.1)* Severity associated with the monitor in _variableMonitoringId_ or with the hardwired notification.
4299    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4300    pub severity: Option<i64>,
4301    /// Technical (error) code as reported by component.
4302    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
4303    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4304    pub tech_code: Option<heapless::String<50usize>>,
4305    /// Technical detail information as reported by component.
4306    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
4307    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4308    pub tech_info: Option<heapless::String<500usize>>,
4309    /// Timestamp of the moment the report was generated.
4310    pub timestamp: crate::OcppTimestamp,
4311    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
4312    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4313    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4314    pub transaction_id: Option<heapless::String<36usize>>,
4315    pub trigger: EventTriggerEnum,
4316    pub variable: Variable<CustomDataType>,
4317    /// Identifies the VariableMonitoring which triggered the event.
4318    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
4319    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4320    pub variable_monitoring_id: Option<i64>,
4321}
4322/// The type of this monitor, e.g. a threshold, delta or periodic monitor.
4323#[derive(Debug, Clone, PartialEq, Eq)]
4324#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4325pub enum MonitorEnum {
4326    UpperThreshold,
4327    LowerThreshold,
4328    Delta,
4329    Periodic,
4330    PeriodicClockAligned,
4331    TargetDelta,
4332    TargetDeltaRelative,
4333}
4334/// A monitoring setting for a variable.
4335#[derive(Debug, Clone, PartialEq)]
4336#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4337pub struct VariableMonitoring<CustomDataType = crate::NoCustomData> {
4338    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4339    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4340    pub custom_data: Option<CustomDataType>,
4341    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
4342    pub event_notification_type: EventNotificationEnum,
4343    /// Identifies the monitor.
4344    pub id: i64,
4345    /// 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.
4346    ///
4347    /// The severity levels have the following meaning: +
4348    /// *0-Danger* +
4349    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
4350    /// *1-Hardware Failure* +
4351    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
4352    /// *2-System Failure* +
4353    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
4354    /// *3-Critical* +
4355    /// Indicates a critical error. Action is required. +
4356    /// *4-Error* +
4357    /// Indicates a non-urgent error. Action is required. +
4358    /// *5-Alert* +
4359    /// Indicates an alert event. Default severity for any type of monitoring event.  +
4360    /// *6-Warning* +
4361    /// Indicates a warning event. Action may be required. +
4362    /// *7-Notice* +
4363    /// Indicates an unusual event. No immediate action is required. +
4364    /// *8-Informational* +
4365    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
4366    /// *9-Debug* +
4367    /// Indicates information useful to developers for debugging, not useful during operations.
4368    pub severity: i64,
4369    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction.
4370    pub transaction: bool,
4371    pub r#type: MonitorEnum,
4372    /// Value for threshold or delta monitoring.
4373    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
4374    pub value: f64,
4375}
4376#[cfg(feature = "alloc")]
4377/// Class to hold parameters of SetVariableMonitoring request.
4378#[derive(Debug, Clone, PartialEq)]
4379#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4380pub struct MonitoringData<CustomDataType = crate::NoCustomData> {
4381    pub component: Component<CustomDataType>,
4382    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4383    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4384    pub custom_data: Option<CustomDataType>,
4385    pub variable: Variable<CustomDataType>,
4386    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
4387    pub variable_monitoring: alloc::vec::Vec<VariableMonitoring<CustomDataType>>,
4388}
4389#[cfg(not(feature = "alloc"))]
4390/// Class to hold parameters of SetVariableMonitoring request.
4391#[derive(Debug, Clone, PartialEq)]
4392#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4393pub struct MonitoringData<
4394    CustomDataType = crate::NoCustomData,
4395    const MONITORING_DATA_VARIABLE_MONITORING_CAP: usize = 8usize,
4396> {
4397    pub component: Component<CustomDataType>,
4398    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4399    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4400    pub custom_data: Option<CustomDataType>,
4401    pub variable: Variable<CustomDataType>,
4402    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
4403    pub variable_monitoring: heapless::Vec<
4404        VariableMonitoring<CustomDataType>,
4405        MONITORING_DATA_VARIABLE_MONITORING_CAP,
4406    >,
4407}
4408#[cfg(feature = "alloc")]
4409#[derive(Debug, Clone, PartialEq)]
4410#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4411pub struct StreamDataElement<CustomDataType = crate::NoCustomData> {
4412    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4413    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4414    pub custom_data: Option<CustomDataType>,
4415    /// Offset relative to _basetime_ of this message. _basetime_ + _t_ is timestamp of recorded value.
4416    pub t: f64,
4417    pub v: alloc::string::String,
4418}
4419#[cfg(not(feature = "alloc"))]
4420#[derive(Debug, Clone, PartialEq)]
4421#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4422pub struct StreamDataElement<
4423    CustomDataType = crate::NoCustomData,
4424    const STREAM_DATA_ELEMENT_V_CAP: usize = 1024usize,
4425> {
4426    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4427    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4428    pub custom_data: Option<CustomDataType>,
4429    /// Offset relative to _basetime_ of this message. _basetime_ + _t_ is timestamp of recorded value.
4430    pub t: f64,
4431    pub v: heapless::String<STREAM_DATA_ELEMENT_V_CAP>,
4432}
4433/// Defines the mutability of this attribute. Default is ReadWrite when omitted.
4434#[derive(Debug, Clone, PartialEq, Eq)]
4435#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4436pub enum MutabilityEnum {
4437    ReadOnly,
4438    WriteOnly,
4439    ReadWrite,
4440}
4441#[cfg(feature = "alloc")]
4442/// Attribute data of a variable.
4443#[derive(Debug, Clone, PartialEq, Eq)]
4444#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4445pub struct VariableAttribute<CustomDataType = crate::NoCustomData> {
4446    /// If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
4447    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4448    pub constant: Option<bool>,
4449    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4450    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4451    pub custom_data: Option<CustomDataType>,
4452    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4453    pub mutability: Option<MutabilityEnum>,
4454    /// If true, value will be persistent across system reboots or power down. Default when omitted is false.
4455    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4456    pub persistent: Option<bool>,
4457    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4458    pub r#type: Option<AttributeEnum>,
4459    /// Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'.
4460    ///
4461    /// 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.
4462    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4463    pub value: Option<alloc::string::String>,
4464}
4465#[cfg(not(feature = "alloc"))]
4466/// Attribute data of a variable.
4467#[derive(Debug, Clone, PartialEq, Eq)]
4468#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4469pub struct VariableAttribute<
4470    CustomDataType = crate::NoCustomData,
4471    const VARIABLE_ATTRIBUTE_VALUE_CAP: usize = 1024usize,
4472> {
4473    /// If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
4474    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4475    pub constant: Option<bool>,
4476    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4477    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4478    pub custom_data: Option<CustomDataType>,
4479    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4480    pub mutability: Option<MutabilityEnum>,
4481    /// If true, value will be persistent across system reboots or power down. Default when omitted is false.
4482    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4483    pub persistent: Option<bool>,
4484    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4485    pub r#type: Option<AttributeEnum>,
4486    /// Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'.
4487    ///
4488    /// 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.
4489    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4490    pub value: Option<heapless::String<VARIABLE_ATTRIBUTE_VALUE_CAP>>,
4491}
4492/// Data type of this variable.
4493#[derive(Debug, Clone, PartialEq, Eq)]
4494#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4495pub enum DataEnum {
4496    #[cfg_attr(feature = "serde", serde(rename = "string"))]
4497    String,
4498    #[cfg_attr(feature = "serde", serde(rename = "decimal"))]
4499    Decimal,
4500    #[cfg_attr(feature = "serde", serde(rename = "integer"))]
4501    Integer,
4502    #[cfg_attr(feature = "serde", serde(rename = "dateTime"))]
4503    DateTime,
4504    #[cfg_attr(feature = "serde", serde(rename = "boolean"))]
4505    Boolean,
4506    OptionList,
4507    SequenceList,
4508    MemberList,
4509}
4510#[cfg(feature = "alloc")]
4511/// Fixed read-only parameters of a variable.
4512#[derive(Debug, Clone, PartialEq)]
4513#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4514pub struct VariableCharacteristics<CustomDataType = crate::NoCustomData> {
4515    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4516    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4517    pub custom_data: Option<CustomDataType>,
4518    #[cfg_attr(feature = "serde", serde(rename = "dataType"))]
4519    pub data_type: DataEnum,
4520    /// *(2.1)* Maximum number of elements from _valuesList_ that are supported as _attributeValue_.
4521    #[cfg_attr(feature = "serde", serde(rename = "maxElements"))]
4522    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4523    pub max_elements: Option<i64>,
4524    /// 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.
4525    #[cfg_attr(feature = "serde", serde(rename = "maxLimit"))]
4526    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4527    pub max_limit: Option<f64>,
4528    /// Minimum possible value of this variable.
4529    #[cfg_attr(feature = "serde", serde(rename = "minLimit"))]
4530    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4531    pub min_limit: Option<f64>,
4532    /// Flag indicating if this variable supports monitoring.
4533    #[cfg_attr(feature = "serde", serde(rename = "supportsMonitoring"))]
4534    pub supports_monitoring: bool,
4535    /// Unit of the variable. When the transmitted value has a unit, this field SHALL be included.
4536    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4537    pub unit: Option<heapless::String<16usize>>,
4538    /// Mandatory when _dataType_ = OptionList, MemberList or SequenceList. In that case _valuesList_ specifies the allowed values for the type.
4539    ///
4540    /// The length of this field can be limited by DeviceDataCtrlr.ConfigurationValueSize.
4541    ///
4542    /// * OptionList: The (Actual) Variable value must be a single value from the reported (CSV) enumeration list.
4543    ///
4544    /// * MemberList: The (Actual) Variable value  may be an (unordered) (sub-)set of the reported (CSV) valid values list.
4545    ///
4546    /// * SequenceList: The (Actual) Variable value  may be an ordered (priority, etc)  (sub-)set of the reported (CSV) valid values.
4547    ///
4548    /// This is a comma separated list.
4549    ///
4550    /// The Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valuesList. The max size of these values will always remain equal.
4551    #[cfg_attr(feature = "serde", serde(rename = "valuesList"))]
4552    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4553    pub values_list: Option<alloc::string::String>,
4554}
4555#[cfg(not(feature = "alloc"))]
4556/// Fixed read-only parameters of a variable.
4557#[derive(Debug, Clone, PartialEq)]
4558#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4559pub struct VariableCharacteristics<
4560    CustomDataType = crate::NoCustomData,
4561    const VARIABLE_CHARACTERISTICS_VALUES_LIST_CAP: usize = 1000usize,
4562> {
4563    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4564    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4565    pub custom_data: Option<CustomDataType>,
4566    #[cfg_attr(feature = "serde", serde(rename = "dataType"))]
4567    pub data_type: DataEnum,
4568    /// *(2.1)* Maximum number of elements from _valuesList_ that are supported as _attributeValue_.
4569    #[cfg_attr(feature = "serde", serde(rename = "maxElements"))]
4570    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4571    pub max_elements: Option<i64>,
4572    /// 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.
4573    #[cfg_attr(feature = "serde", serde(rename = "maxLimit"))]
4574    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4575    pub max_limit: Option<f64>,
4576    /// Minimum possible value of this variable.
4577    #[cfg_attr(feature = "serde", serde(rename = "minLimit"))]
4578    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4579    pub min_limit: Option<f64>,
4580    /// Flag indicating if this variable supports monitoring.
4581    #[cfg_attr(feature = "serde", serde(rename = "supportsMonitoring"))]
4582    pub supports_monitoring: bool,
4583    /// Unit of the variable. When the transmitted value has a unit, this field SHALL be included.
4584    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4585    pub unit: Option<heapless::String<16usize>>,
4586    /// Mandatory when _dataType_ = OptionList, MemberList or SequenceList. In that case _valuesList_ specifies the allowed values for the type.
4587    ///
4588    /// The length of this field can be limited by DeviceDataCtrlr.ConfigurationValueSize.
4589    ///
4590    /// * OptionList: The (Actual) Variable value must be a single value from the reported (CSV) enumeration list.
4591    ///
4592    /// * MemberList: The (Actual) Variable value  may be an (unordered) (sub-)set of the reported (CSV) valid values list.
4593    ///
4594    /// * SequenceList: The (Actual) Variable value  may be an ordered (priority, etc)  (sub-)set of the reported (CSV) valid values.
4595    ///
4596    /// This is a comma separated list.
4597    ///
4598    /// The Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valuesList. The max size of these values will always remain equal.
4599    #[cfg_attr(feature = "serde", serde(rename = "valuesList"))]
4600    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4601    pub values_list: Option<heapless::String<VARIABLE_CHARACTERISTICS_VALUES_LIST_CAP>>,
4602}
4603#[cfg(feature = "alloc")]
4604/// Class to report components, variables and variable attributes and characteristics.
4605#[derive(Debug, Clone, PartialEq)]
4606#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4607pub struct ReportData<CustomDataType = crate::NoCustomData> {
4608    pub component: Component<CustomDataType>,
4609    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4610    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4611    pub custom_data: Option<CustomDataType>,
4612    pub variable: Variable<CustomDataType>,
4613    #[cfg_attr(feature = "serde", serde(rename = "variableAttribute"))]
4614    pub variable_attribute: heapless::Vec<VariableAttribute<CustomDataType>, 4usize>,
4615    #[cfg_attr(feature = "serde", serde(rename = "variableCharacteristics"))]
4616    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4617    pub variable_characteristics: Option<VariableCharacteristics<CustomDataType>>,
4618}
4619#[cfg(not(feature = "alloc"))]
4620/// Class to report components, variables and variable attributes and characteristics.
4621#[derive(Debug, Clone, PartialEq)]
4622#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4623pub struct ReportData<
4624    CustomDataType = crate::NoCustomData,
4625    const VARIABLE_ATTRIBUTE_VALUE_CAP: usize = 1024usize,
4626    const VARIABLE_CHARACTERISTICS_VALUES_LIST_CAP: usize = 1000usize,
4627> {
4628    pub component: Component<CustomDataType>,
4629    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4630    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4631    pub custom_data: Option<CustomDataType>,
4632    pub variable: Variable<CustomDataType>,
4633    #[cfg_attr(feature = "serde", serde(rename = "variableAttribute"))]
4634    pub variable_attribute: heapless::Vec<
4635        VariableAttribute<CustomDataType, VARIABLE_ATTRIBUTE_VALUE_CAP>,
4636        4usize,
4637    >,
4638    #[cfg_attr(feature = "serde", serde(rename = "variableCharacteristics"))]
4639    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4640    pub variable_characteristics: Option<
4641        VariableCharacteristics<CustomDataType, VARIABLE_CHARACTERISTICS_VALUES_LIST_CAP>,
4642    >,
4643}
4644/// The status of the settlement attempt.
4645#[derive(Debug, Clone, PartialEq, Eq)]
4646#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4647pub enum PaymentStatusEnum {
4648    Settled,
4649    Canceled,
4650    Rejected,
4651    Failed,
4652}
4653/// *(2.1)* A generic address format.
4654#[derive(Debug, Clone, PartialEq, Eq)]
4655#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4656pub struct Address<CustomDataType = crate::NoCustomData> {
4657    /// Address line 1
4658    pub address1: heapless::String<100usize>,
4659    /// Address line 2
4660    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4661    pub address2: Option<heapless::String<100usize>>,
4662    /// City
4663    pub city: heapless::String<100usize>,
4664    /// Country name
4665    pub country: heapless::String<50usize>,
4666    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4667    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4668    pub custom_data: Option<CustomDataType>,
4669    /// Name of person/company
4670    pub name: heapless::String<50usize>,
4671    /// Postal code
4672    #[cfg_attr(feature = "serde", serde(rename = "postalCode"))]
4673    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4674    pub postal_code: Option<heapless::String<20usize>>,
4675}
4676/// This contains the progress status of the publishfirmware
4677/// installation.
4678#[derive(Debug, Clone, PartialEq, Eq)]
4679#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4680pub enum PublishFirmwareStatusEnum {
4681    Idle,
4682    DownloadScheduled,
4683    Downloading,
4684    Downloaded,
4685    Published,
4686    DownloadFailed,
4687    DownloadPaused,
4688    InvalidChecksum,
4689    ChecksumVerified,
4690    PublishFailed,
4691}
4692/// Updates to a ChargingSchedulePeriodType for dynamic charging profiles.
4693#[derive(Debug, Clone, PartialEq)]
4694#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4695pub struct ChargingScheduleUpdate<CustomDataType = crate::NoCustomData> {
4696    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4697    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4698    pub custom_data: Option<CustomDataType>,
4699    /// *(2.1)* Limit in _chargingRateUnit_ that the EV is allowed to discharge with. Note, these are negative values in order to be consistent with _setpoint_, which can be positive and negative.  +
4700    /// For AC this field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4701    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit"))]
4702    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4703    pub discharge_limit: Option<f64>,
4704    /// *(2.1)* Limit in _chargingRateUnit_ on phase L2 that the EV is allowed to discharge with.
4705    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L2"))]
4706    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4707    pub discharge_limit_l2: Option<f64>,
4708    /// *(2.1)* Limit in _chargingRateUnit_ on phase L3 that the EV is allowed to discharge with.
4709    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L3"))]
4710    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4711    pub discharge_limit_l3: Option<f64>,
4712    /// Optional only when not required by the _operationMode_, as in CentralSetpoint, ExternalSetpoint, ExternalLimits, LocalFrequency,  LocalLoadBalancing. +
4713    /// Charging rate limit during the schedule period, in the applicable _chargingRateUnit_.
4714    /// This SHOULD be a non-negative value; a negative value is only supported for backwards compatibility with older systems that use a negative value to specify a discharging limit.
4715    /// For AC this field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4716    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4717    pub limit: Option<f64>,
4718    /// *(2.1)* Charging rate limit on phase L2  in the applicable _chargingRateUnit_.
4719    #[cfg_attr(feature = "serde", serde(rename = "limit_L2"))]
4720    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4721    pub limit_l2: Option<f64>,
4722    /// *(2.1)* Charging rate limit on phase L3  in the applicable _chargingRateUnit_.
4723    #[cfg_attr(feature = "serde", serde(rename = "limit_L3"))]
4724    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4725    pub limit_l3: Option<f64>,
4726    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow as close as possible. Use negative values for discharging. +
4727    /// When a limit and/or _dischargeLimit_ are given the overshoot when following _setpoint_ must remain within these values.
4728    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4729    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4730    pub setpoint: Option<f64>,
4731    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow as closely as possible. Positive values for inductive, negative for capacitive reactive power or current.  +
4732    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4733    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive"))]
4734    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4735    pub setpoint_reactive: Option<f64>,
4736    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L2 as closely as possible.
4737    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L2"))]
4738    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4739    pub setpoint_reactive_l2: Option<f64>,
4740    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L3 as closely as possible.
4741    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L3"))]
4742    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4743    pub setpoint_reactive_l3: Option<f64>,
4744    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L2 as close as possible.
4745    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L2"))]
4746    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4747    pub setpoint_l2: Option<f64>,
4748    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L3 as close as possible.
4749    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L3"))]
4750    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4751    pub setpoint_l3: Option<f64>,
4752}
4753/// Result of request.
4754#[derive(Debug, Clone, PartialEq, Eq)]
4755#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4756pub enum ChargingProfileStatusEnum {
4757    Accepted,
4758    Rejected,
4759}
4760/// Indicates the kind of schedule.
4761#[derive(Debug, Clone, PartialEq, Eq)]
4762#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4763pub enum ChargingProfileKindEnum {
4764    Absolute,
4765    Recurring,
4766    Relative,
4767    Dynamic,
4768}
4769/// Indicates the start point of a recurrence.
4770#[derive(Debug, Clone, PartialEq, Eq)]
4771#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4772pub enum RecurrencyKindEnum {
4773    Daily,
4774    Weekly,
4775}
4776#[cfg(feature = "alloc")]
4777/// A ChargingProfile consists of 1 to 3 ChargingSchedules with a list of ChargingSchedulePeriods, describing the amount of power or current that can be delivered per time interval.
4778///
4779/// image::images/ChargingProfile-Simple.png\[\]
4780#[derive(Debug, Clone, PartialEq)]
4781#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4782pub struct ChargingProfile<CustomDataType = crate::NoCustomData> {
4783    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
4784    pub charging_profile_kind: ChargingProfileKindEnum,
4785    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
4786    pub charging_profile_purpose: ChargingProfilePurposeEnum,
4787    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
4788    pub charging_schedule: heapless::Vec<ChargingSchedule<CustomDataType>, 3usize>,
4789    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4790    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4791    pub custom_data: Option<CustomDataType>,
4792    /// *(2.1)*  Interval in seconds after receipt of last update, when to request a profile update by sending a PullDynamicScheduleUpdateRequest message.
4793    ///     A value of 0 or no value means that no update interval applies. +
4794    ///     Only relevant in a dynamic charging profile.
4795    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateInterval"))]
4796    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4797    pub dyn_update_interval: Option<i64>,
4798    /// *(2.1)* Time at which limits or setpoints in this charging profile were last updated by a PullDynamicScheduleUpdateRequest or UpdateDynamicScheduleRequest or by an external actor. +
4799    ///     Only relevant in a dynamic charging profile.
4800    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateTime"))]
4801    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4802    pub dyn_update_time: Option<crate::OcppTimestamp>,
4803    /// Id of ChargingProfile. Unique within charging station. Id can have a negative value. This is useful to distinguish charging profiles from an external actor (external constraints) from charging profiles received from CSMS.
4804    pub id: i64,
4805    /// *(2.1)* When set to true this charging profile will not be valid anymore after being offline for more than _maxOfflineDuration_. +
4806    ///     When absent defaults to false.
4807    #[cfg_attr(feature = "serde", serde(rename = "invalidAfterOfflineDuration"))]
4808    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4809    pub invalid_after_offline_duration: Option<bool>,
4810    /// *(2.1)* Period in seconds that this charging profile remains valid after the Charging Station has gone offline. After this period the charging profile becomes invalid for as long as it is offline and the Charging Station reverts back to a valid profile with a lower stack level.
4811    /// If _invalidAfterOfflineDuration_ is true, then this charging profile will become permanently invalid.
4812    /// A value of 0 means that the charging profile is immediately invalid while offline. When the field is absent, then  no timeout applies and the charging profile remains valid when offline.
4813    #[cfg_attr(feature = "serde", serde(rename = "maxOfflineDuration"))]
4814    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4815    pub max_offline_duration: Option<i64>,
4816    /// *(2.1)* ISO 15118-20 signature for all price schedules in _chargingSchedules_. +
4817    /// Note: for 256-bit elliptic curves (like secp256k1) the ECDSA signature is 512 bits (64 bytes) and for 521-bit curves (like secp521r1) the signature is 1042 bits. This equals 131 bytes, which can be encoded as base64 in 176 bytes.
4818    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleSignature"))]
4819    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4820    pub price_schedule_signature: Option<heapless::String<256usize>>,
4821    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
4822    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4823    pub recurrency_kind: Option<RecurrencyKindEnum>,
4824    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
4825    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
4826    pub stack_level: i64,
4827    /// SHALL only be included if ChargingProfilePurpose is set to TxProfile in a SetChargingProfileRequest. The transactionId is used to match the profile to a specific transaction.
4828    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4829    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4830    pub transaction_id: Option<heapless::String<36usize>>,
4831    /// 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.
4832    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
4833    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4834    pub valid_from: Option<crate::OcppTimestamp>,
4835    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
4836    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
4837    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4838    pub valid_to: Option<crate::OcppTimestamp>,
4839}
4840#[cfg(not(feature = "alloc"))]
4841/// A ChargingProfile consists of 1 to 3 ChargingSchedules with a list of ChargingSchedulePeriods, describing the amount of power or current that can be delivered per time interval.
4842///
4843/// image::images/ChargingProfile-Simple.png\[\]
4844#[derive(Debug, Clone, PartialEq)]
4845#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4846pub struct ChargingProfile<
4847    CustomDataType = crate::NoCustomData,
4848    const ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP: usize = 1024usize,
4849    const ABSOLUTE_PRICE_SCHEDULE_PRICE_RULE_STACKS_CAP: usize = 8usize,
4850    const CHARGING_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP: usize = 8usize,
4851    const CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP: usize = 8usize,
4852    const CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP: usize = 8usize,
4853    const PRICE_LEVEL_SCHEDULE_PRICE_LEVEL_SCHEDULE_ENTRIES_CAP: usize = 8usize,
4854    const SALES_TARIFF_SALES_TARIFF_ENTRY_CAP: usize = 8usize,
4855> {
4856    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
4857    pub charging_profile_kind: ChargingProfileKindEnum,
4858    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
4859    pub charging_profile_purpose: ChargingProfilePurposeEnum,
4860    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
4861    pub charging_schedule: heapless::Vec<
4862        ChargingSchedule<
4863            CustomDataType,
4864            ABSOLUTE_PRICE_SCHEDULE_PRICE_ALGORITHM_CAP,
4865            ABSOLUTE_PRICE_SCHEDULE_PRICE_RULE_STACKS_CAP,
4866            CHARGING_SCHEDULE_CHARGING_SCHEDULE_PERIOD_CAP,
4867            CHARGING_SCHEDULE_PERIOD_V2X_FREQ_WATT_CURVE_CAP,
4868            CHARGING_SCHEDULE_PERIOD_V2X_SIGNAL_WATT_CURVE_CAP,
4869            PRICE_LEVEL_SCHEDULE_PRICE_LEVEL_SCHEDULE_ENTRIES_CAP,
4870            SALES_TARIFF_SALES_TARIFF_ENTRY_CAP,
4871        >,
4872        3usize,
4873    >,
4874    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4875    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4876    pub custom_data: Option<CustomDataType>,
4877    /// *(2.1)*  Interval in seconds after receipt of last update, when to request a profile update by sending a PullDynamicScheduleUpdateRequest message.
4878    ///     A value of 0 or no value means that no update interval applies. +
4879    ///     Only relevant in a dynamic charging profile.
4880    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateInterval"))]
4881    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4882    pub dyn_update_interval: Option<i64>,
4883    /// *(2.1)* Time at which limits or setpoints in this charging profile were last updated by a PullDynamicScheduleUpdateRequest or UpdateDynamicScheduleRequest or by an external actor. +
4884    ///     Only relevant in a dynamic charging profile.
4885    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateTime"))]
4886    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4887    pub dyn_update_time: Option<crate::OcppTimestamp>,
4888    /// Id of ChargingProfile. Unique within charging station. Id can have a negative value. This is useful to distinguish charging profiles from an external actor (external constraints) from charging profiles received from CSMS.
4889    pub id: i64,
4890    /// *(2.1)* When set to true this charging profile will not be valid anymore after being offline for more than _maxOfflineDuration_. +
4891    ///     When absent defaults to false.
4892    #[cfg_attr(feature = "serde", serde(rename = "invalidAfterOfflineDuration"))]
4893    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4894    pub invalid_after_offline_duration: Option<bool>,
4895    /// *(2.1)* Period in seconds that this charging profile remains valid after the Charging Station has gone offline. After this period the charging profile becomes invalid for as long as it is offline and the Charging Station reverts back to a valid profile with a lower stack level.
4896    /// If _invalidAfterOfflineDuration_ is true, then this charging profile will become permanently invalid.
4897    /// A value of 0 means that the charging profile is immediately invalid while offline. When the field is absent, then  no timeout applies and the charging profile remains valid when offline.
4898    #[cfg_attr(feature = "serde", serde(rename = "maxOfflineDuration"))]
4899    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4900    pub max_offline_duration: Option<i64>,
4901    /// *(2.1)* ISO 15118-20 signature for all price schedules in _chargingSchedules_. +
4902    /// Note: for 256-bit elliptic curves (like secp256k1) the ECDSA signature is 512 bits (64 bytes) and for 521-bit curves (like secp521r1) the signature is 1042 bits. This equals 131 bytes, which can be encoded as base64 in 176 bytes.
4903    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleSignature"))]
4904    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4905    pub price_schedule_signature: Option<heapless::String<256usize>>,
4906    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
4907    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4908    pub recurrency_kind: Option<RecurrencyKindEnum>,
4909    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
4910    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
4911    pub stack_level: i64,
4912    /// SHALL only be included if ChargingProfilePurpose is set to TxProfile in a SetChargingProfileRequest. The transactionId is used to match the profile to a specific transaction.
4913    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4914    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4915    pub transaction_id: Option<heapless::String<36usize>>,
4916    /// 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.
4917    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
4918    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4919    pub valid_from: Option<crate::OcppTimestamp>,
4920    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
4921    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
4922    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4923    pub valid_to: Option<crate::OcppTimestamp>,
4924}
4925#[derive(Debug, Clone, PartialEq)]
4926#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4927pub struct DERCurvePoints<CustomDataType = crate::NoCustomData> {
4928    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4929    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4930    pub custom_data: Option<CustomDataType>,
4931    /// The data value of the X-axis (independent) variable, depending on the curve type.
4932    pub x: f64,
4933    /// The data value of the Y-axis (dependent) variable, depending on the  &lt;&lt;cmn_derunitenumtype&gt;&gt; of the curve. If _y_ is power factor, then a positive value means DER is absorbing reactive power (under-excited), a negative value when DER is injecting reactive power (over-excited).
4934    pub y: f64,
4935}
4936#[derive(Debug, Clone, PartialEq)]
4937#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4938pub struct Hysteresis<CustomDataType = crate::NoCustomData> {
4939    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4940    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4941    pub custom_data: Option<CustomDataType>,
4942    /// Delay in seconds, once grid parameter within HysteresisLow and HysteresisHigh, for the EV to return to normal operation after a grid event.
4943    #[cfg_attr(feature = "serde", serde(rename = "hysteresisDelay"))]
4944    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4945    pub hysteresis_delay: Option<f64>,
4946    /// Set default rate of change (ramp rate %/s) for the EV to return to normal operation after a grid event
4947    #[cfg_attr(feature = "serde", serde(rename = "hysteresisGradient"))]
4948    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4949    pub hysteresis_gradient: Option<f64>,
4950    /// High value for return to normal operation after a grid event, in absolute value. This value adopts the same unit as defined by yUnit
4951    #[cfg_attr(feature = "serde", serde(rename = "hysteresisHigh"))]
4952    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4953    pub hysteresis_high: Option<f64>,
4954    /// Low value for return to normal operation after a grid event, in absolute value. This value adopts the same unit as defined by yUnit
4955    #[cfg_attr(feature = "serde", serde(rename = "hysteresisLow"))]
4956    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4957    pub hysteresis_low: Option<f64>,
4958}
4959#[derive(Debug, Clone, PartialEq)]
4960#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4961pub struct ReactivePowerParams<CustomDataType = crate::NoCustomData> {
4962    /// Only for VoltVar: Enable/disable autonomous VRef adjustment
4963    #[cfg_attr(feature = "serde", serde(rename = "autonomousVRefEnable"))]
4964    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4965    pub autonomous_v_ref_enable: Option<bool>,
4966    /// Only for VoltVar: Adjustment range for VRef time constant
4967    #[cfg_attr(feature = "serde", serde(rename = "autonomousVRefTimeConstant"))]
4968    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4969    pub autonomous_v_ref_time_constant: Option<f64>,
4970    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4971    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4972    pub custom_data: Option<CustomDataType>,
4973    /// Only for VoltVar curve: The nominal ac voltage (rms) adjustment to the voltage curve points for Volt-Var curves (percentage).
4974    #[cfg_attr(feature = "serde", serde(rename = "vRef"))]
4975    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4976    pub v_ref: Option<f64>,
4977}
4978/// Parameter is only sent, if the EV has to feed-in power or reactive power during fault-ride through (FRT) as defined by HVMomCess curve and LVMomCess curve.
4979#[derive(Debug, Clone, PartialEq, Eq)]
4980#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4981pub enum PowerDuringCessationEnum {
4982    Active,
4983    Reactive,
4984}
4985#[derive(Debug, Clone, PartialEq)]
4986#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4987pub struct VoltageParams<CustomDataType = crate::NoCustomData> {
4988    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4989    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4990    pub custom_data: Option<CustomDataType>,
4991    /// Time for which the voltage is allowed to stay above the 10 min mean value.
4992    ///     After this time, the EV must trip.
4993    ///     This value is mandatory if OverVoltageMeanValue10min is set.
4994    #[cfg_attr(feature = "serde", serde(rename = "hv10MinMeanTripDelay"))]
4995    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4996    pub hv10_min_mean_trip_delay: Option<f64>,
4997    /// EN 50549-1 chapter 4.9.3.4
4998    ///     Voltage threshold for the 10 min time window mean value monitoring.
4999    ///     The 10 min mean is recalculated up to every 3 s.
5000    ///     If the present voltage is above this threshold for more than the time defined by _hv10MinMeanValue_, the EV must trip.
5001    ///     This value is mandatory if _hv10MinMeanTripDelay_ is set.
5002    #[cfg_attr(feature = "serde", serde(rename = "hv10MinMeanValue"))]
5003    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5004    pub hv10_min_mean_value: Option<f64>,
5005    #[cfg_attr(feature = "serde", serde(rename = "powerDuringCessation"))]
5006    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5007    pub power_during_cessation: Option<PowerDuringCessationEnum>,
5008}
5009/// Unit of the Y-axis of DER curve
5010#[derive(Debug, Clone, PartialEq, Eq)]
5011#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5012pub enum DERUnitEnum {
5013    #[cfg_attr(feature = "serde", serde(rename = "Not_Applicable"))]
5014    NotApplicable,
5015    PctMaxW,
5016    PctMaxVar,
5017    PctWAvail,
5018    PctVarAvail,
5019    PctEffectiveV,
5020}
5021#[derive(Debug, Clone, PartialEq)]
5022#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5023pub struct DERCurve<CustomDataType = crate::NoCustomData> {
5024    #[cfg_attr(feature = "serde", serde(rename = "curveData"))]
5025    pub curve_data: heapless::Vec<DERCurvePoints<CustomDataType>, 10usize>,
5026    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5027    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5028    pub custom_data: Option<CustomDataType>,
5029    /// Duration in seconds that this curve will be active. Only absent when _default_ is true.
5030    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5031    pub duration: Option<f64>,
5032    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5033    pub hysteresis: Option<Hysteresis<CustomDataType>>,
5034    /// Priority of curve (0=highest)
5035    pub priority: i64,
5036    #[cfg_attr(feature = "serde", serde(rename = "reactivePowerParams"))]
5037    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5038    pub reactive_power_params: Option<ReactivePowerParams<CustomDataType>>,
5039    /// Open loop response time, the time to ramp up to 90% of the new target in response to the change in voltage, in seconds. A value of 0 is used to mean no limit. When not present, the device should follow its default behavior.
5040    #[cfg_attr(feature = "serde", serde(rename = "responseTime"))]
5041    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5042    pub response_time: Option<f64>,
5043    /// Point in time when this curve will become activated. Only absent when _default_ is true.
5044    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5045    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5046    pub start_time: Option<crate::OcppTimestamp>,
5047    #[cfg_attr(feature = "serde", serde(rename = "voltageParams"))]
5048    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5049    pub voltage_params: Option<VoltageParams<CustomDataType>>,
5050    #[cfg_attr(feature = "serde", serde(rename = "yUnit"))]
5051    pub y_unit: DERUnitEnum,
5052}
5053#[derive(Debug, Clone, PartialEq)]
5054#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5055pub struct DERCurveGet<CustomDataType = crate::NoCustomData> {
5056    pub curve: DERCurve<CustomDataType>,
5057    #[cfg_attr(feature = "serde", serde(rename = "curveType"))]
5058    pub curve_type: DERControlEnum,
5059    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5060    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5061    pub custom_data: Option<CustomDataType>,
5062    /// Id of DER curve
5063    pub id: heapless::String<36usize>,
5064    /// True if this is a default curve
5065    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5066    pub is_default: bool,
5067    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
5068    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5069    pub is_superseded: bool,
5070}
5071#[derive(Debug, Clone, PartialEq)]
5072#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5073pub struct EnterService<CustomDataType = crate::NoCustomData> {
5074    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5075    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5076    pub custom_data: Option<CustomDataType>,
5077    /// Enter service delay
5078    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5079    pub delay: Option<f64>,
5080    /// Enter service frequency high
5081    #[cfg_attr(feature = "serde", serde(rename = "highFreq"))]
5082    pub high_freq: f64,
5083    /// Enter service voltage high
5084    #[cfg_attr(feature = "serde", serde(rename = "highVoltage"))]
5085    pub high_voltage: f64,
5086    /// Enter service frequency low
5087    #[cfg_attr(feature = "serde", serde(rename = "lowFreq"))]
5088    pub low_freq: f64,
5089    /// Enter service voltage low
5090    #[cfg_attr(feature = "serde", serde(rename = "lowVoltage"))]
5091    pub low_voltage: f64,
5092    /// Priority of setting (0=highest)
5093    pub priority: i64,
5094    /// Enter service ramp rate in seconds
5095    #[cfg_attr(feature = "serde", serde(rename = "rampRate"))]
5096    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5097    pub ramp_rate: Option<f64>,
5098    /// Enter service randomized delay
5099    #[cfg_attr(feature = "serde", serde(rename = "randomDelay"))]
5100    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5101    pub random_delay: Option<f64>,
5102}
5103#[derive(Debug, Clone, PartialEq)]
5104#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5105pub struct EnterServiceGet<CustomDataType = crate::NoCustomData> {
5106    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5107    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5108    pub custom_data: Option<CustomDataType>,
5109    #[cfg_attr(feature = "serde", serde(rename = "enterService"))]
5110    pub enter_service: EnterService<CustomDataType>,
5111    /// Id of setting
5112    pub id: heapless::String<36usize>,
5113}
5114#[derive(Debug, Clone, PartialEq)]
5115#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5116pub struct FixedPF<CustomDataType = crate::NoCustomData> {
5117    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5118    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5119    pub custom_data: Option<CustomDataType>,
5120    /// Power factor, cos(phi), as value between 0..1.
5121    pub displacement: f64,
5122    /// Duration in seconds that this setting is active.
5123    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5124    pub duration: Option<f64>,
5125    /// True when absorbing reactive power (under-excited), false when injecting reactive power (over-excited).
5126    pub excitation: bool,
5127    /// Priority of setting (0=highest)
5128    pub priority: i64,
5129    /// Time when this setting becomes active
5130    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5131    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5132    pub start_time: Option<crate::OcppTimestamp>,
5133}
5134#[derive(Debug, Clone, PartialEq)]
5135#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5136pub struct FixedPFGet<CustomDataType = crate::NoCustomData> {
5137    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5138    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5139    pub custom_data: Option<CustomDataType>,
5140    #[cfg_attr(feature = "serde", serde(rename = "fixedPF"))]
5141    pub fixed_p_f: FixedPF<CustomDataType>,
5142    /// Id of setting.
5143    pub id: heapless::String<36usize>,
5144    /// True if setting is a default control.
5145    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5146    pub is_default: bool,
5147    /// True if this setting is superseded by a lower priority setting.
5148    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5149    pub is_superseded: bool,
5150}
5151#[derive(Debug, Clone, PartialEq)]
5152#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5153pub struct FixedVar<CustomDataType = crate::NoCustomData> {
5154    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5155    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5156    pub custom_data: Option<CustomDataType>,
5157    /// Duration in seconds that this setting is active.
5158    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5159    pub duration: Option<f64>,
5160    /// Priority of setting (0=highest)
5161    pub priority: i64,
5162    /// The value specifies a target var output interpreted as a signed percentage (-100 to 100).
5163    ///     A negative value refers to charging, whereas a positive one refers to discharging.
5164    ///     The value type is determined by the unit field.
5165    pub setpoint: f64,
5166    /// Time when this setting becomes active.
5167    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5168    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5169    pub start_time: Option<crate::OcppTimestamp>,
5170    pub unit: DERUnitEnum,
5171}
5172#[derive(Debug, Clone, PartialEq)]
5173#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5174pub struct FixedVarGet<CustomDataType = crate::NoCustomData> {
5175    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5176    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5177    pub custom_data: Option<CustomDataType>,
5178    #[cfg_attr(feature = "serde", serde(rename = "fixedVar"))]
5179    pub fixed_var: FixedVar<CustomDataType>,
5180    /// Id of setting
5181    pub id: heapless::String<36usize>,
5182    /// True if setting is a default control.
5183    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5184    pub is_default: bool,
5185    /// True if this setting is superseded by a lower priority setting
5186    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5187    pub is_superseded: bool,
5188}
5189#[derive(Debug, Clone, PartialEq)]
5190#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5191pub struct FreqDroop<CustomDataType = crate::NoCustomData> {
5192    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5193    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5194    pub custom_data: Option<CustomDataType>,
5195    /// Duration in seconds that this setting is active
5196    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5197    pub duration: Option<f64>,
5198    /// Over-frequency droop per unit, oFDroop
5199    #[cfg_attr(feature = "serde", serde(rename = "overDroop"))]
5200    pub over_droop: f64,
5201    /// Over-frequency start of droop
5202    #[cfg_attr(feature = "serde", serde(rename = "overFreq"))]
5203    pub over_freq: f64,
5204    /// Priority of setting (0=highest)
5205    pub priority: i64,
5206    /// Open loop response time in seconds
5207    #[cfg_attr(feature = "serde", serde(rename = "responseTime"))]
5208    pub response_time: f64,
5209    /// Time when this setting becomes active
5210    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5211    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5212    pub start_time: Option<crate::OcppTimestamp>,
5213    /// Under-frequency droop per unit, uFDroop
5214    #[cfg_attr(feature = "serde", serde(rename = "underDroop"))]
5215    pub under_droop: f64,
5216    /// Under-frequency start of droop
5217    #[cfg_attr(feature = "serde", serde(rename = "underFreq"))]
5218    pub under_freq: f64,
5219}
5220#[derive(Debug, Clone, PartialEq)]
5221#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5222pub struct FreqDroopGet<CustomDataType = crate::NoCustomData> {
5223    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5224    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5225    pub custom_data: Option<CustomDataType>,
5226    #[cfg_attr(feature = "serde", serde(rename = "freqDroop"))]
5227    pub freq_droop: FreqDroop<CustomDataType>,
5228    /// Id of setting
5229    pub id: heapless::String<36usize>,
5230    /// True if setting is a default control.
5231    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5232    pub is_default: bool,
5233    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
5234    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5235    pub is_superseded: bool,
5236}
5237#[derive(Debug, Clone, PartialEq)]
5238#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5239pub struct Gradient<CustomDataType = crate::NoCustomData> {
5240    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5241    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5242    pub custom_data: Option<CustomDataType>,
5243    /// Default ramp rate in seconds (0 if not applicable)
5244    pub gradient: f64,
5245    /// Id of setting
5246    pub priority: i64,
5247    /// Soft-start ramp rate in seconds (0 if not applicable)
5248    #[cfg_attr(feature = "serde", serde(rename = "softGradient"))]
5249    pub soft_gradient: f64,
5250}
5251#[derive(Debug, Clone, PartialEq)]
5252#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5253pub struct GradientGet<CustomDataType = crate::NoCustomData> {
5254    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5255    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5256    pub custom_data: Option<CustomDataType>,
5257    pub gradient: Gradient<CustomDataType>,
5258    /// Id of setting
5259    pub id: heapless::String<36usize>,
5260}
5261#[derive(Debug, Clone, PartialEq)]
5262#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5263pub struct LimitMaxDischarge<CustomDataType = crate::NoCustomData> {
5264    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5265    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5266    pub custom_data: Option<CustomDataType>,
5267    /// Duration in seconds that this setting is active
5268    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5269    pub duration: Option<f64>,
5270    /// Only for PowerMonitoring. +
5271    ///     The value specifies a percentage (0 to 100) of the rated maximum discharge power of EV.
5272    ///     The PowerMonitoring curve becomes active when power exceeds this percentage.
5273    #[cfg_attr(feature = "serde", serde(rename = "pctMaxDischargePower"))]
5274    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5275    pub pct_max_discharge_power: Option<f64>,
5276    #[cfg_attr(feature = "serde", serde(rename = "powerMonitoringMustTrip"))]
5277    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5278    pub power_monitoring_must_trip: Option<DERCurve<CustomDataType>>,
5279    /// Priority of setting (0=highest)
5280    pub priority: i64,
5281    /// Time when this setting becomes active
5282    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5283    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5284    pub start_time: Option<crate::OcppTimestamp>,
5285}
5286#[derive(Debug, Clone, PartialEq)]
5287#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5288pub struct LimitMaxDischargeGet<CustomDataType = crate::NoCustomData> {
5289    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5290    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5291    pub custom_data: Option<CustomDataType>,
5292    /// Id of setting
5293    pub id: heapless::String<36usize>,
5294    /// True if setting is a default control.
5295    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5296    pub is_default: bool,
5297    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
5298    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5299    pub is_superseded: bool,
5300    #[cfg_attr(feature = "serde", serde(rename = "limitMaxDischarge"))]
5301    pub limit_max_discharge: LimitMaxDischarge<CustomDataType>,
5302}
5303/// Status indicating whether the Charging Station accepts the request to start a transaction.
5304#[derive(Debug, Clone, PartialEq, Eq)]
5305#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5306pub enum RequestStartStopStatusEnum {
5307    Accepted,
5308    Rejected,
5309}
5310/// The updated reservation status.
5311#[derive(Debug, Clone, PartialEq, Eq)]
5312#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5313pub enum ReservationUpdateStatusEnum {
5314    Expired,
5315    Removed,
5316    NoTransaction,
5317}
5318/// This indicates the success or failure of the reservation.
5319#[derive(Debug, Clone, PartialEq, Eq)]
5320#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5321pub enum ReserveNowStatusEnum {
5322    Accepted,
5323    Faulted,
5324    Occupied,
5325    Rejected,
5326    Unavailable,
5327}
5328/// This contains the type of reset that the Charging Station or EVSE should perform.
5329#[derive(Debug, Clone, PartialEq, Eq)]
5330#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5331pub enum ResetEnum {
5332    Immediate,
5333    OnIdle,
5334    ImmediateAndResume,
5335}
5336/// This indicates whether the Charging Station is able to perform the reset.
5337#[derive(Debug, Clone, PartialEq, Eq)]
5338#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5339pub enum ResetStatusEnum {
5340    Accepted,
5341    Rejected,
5342    Scheduled,
5343}
5344#[cfg(feature = "alloc")]
5345/// Contains the identifier to use for authorization.
5346#[derive(Debug, Clone, PartialEq, Eq)]
5347#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5348pub struct AuthorizationData<CustomDataType = crate::NoCustomData> {
5349    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5350    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5351    pub custom_data: Option<CustomDataType>,
5352    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
5353    pub id_token: IdToken<CustomDataType>,
5354    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
5355    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5356    pub id_token_info: Option<IdTokenInfo<CustomDataType>>,
5357}
5358#[cfg(not(feature = "alloc"))]
5359/// Contains the identifier to use for authorization.
5360#[derive(Debug, Clone, PartialEq, Eq)]
5361#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5362pub struct AuthorizationData<
5363    CustomDataType = crate::NoCustomData,
5364    const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 8usize,
5365    const ID_TOKEN_INFO_EVSE_ID_CAP: usize = 8usize,
5366    const MESSAGE_CONTENT_CONTENT_CAP: usize = 1024usize,
5367> {
5368    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5369    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5370    pub custom_data: Option<CustomDataType>,
5371    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
5372    pub id_token: IdToken<CustomDataType, ID_TOKEN_ADDITIONAL_INFO_CAP>,
5373    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
5374    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5375    pub id_token_info: Option<
5376        IdTokenInfo<
5377            CustomDataType,
5378            ID_TOKEN_INFO_EVSE_ID_CAP,
5379            ID_TOKEN_ADDITIONAL_INFO_CAP,
5380            MESSAGE_CONTENT_CONTENT_CAP,
5381        >,
5382    >,
5383}
5384/// This contains the type of update (full or differential) of this request.
5385#[derive(Debug, Clone, PartialEq, Eq)]
5386#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5387pub enum UpdateEnum {
5388    Differential,
5389    Full,
5390}
5391/// This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
5392#[derive(Debug, Clone, PartialEq, Eq)]
5393#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5394pub enum SendLocalListStatusEnum {
5395    Accepted,
5396    Failed,
5397    VersionMismatch,
5398}
5399#[derive(Debug, Clone, PartialEq, Eq)]
5400#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5401pub enum TariffSetStatusEnum {
5402    Accepted,
5403    Rejected,
5404    TooManyElements,
5405    ConditionNotSupported,
5406    DuplicateTariffId,
5407}
5408/// This indicates whether the Charging Station is able to display the message.
5409#[derive(Debug, Clone, PartialEq, Eq)]
5410#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5411pub enum DisplayMessageStatusEnum {
5412    Accepted,
5413    NotSupportedMessageFormat,
5414    Rejected,
5415    NotSupportedPriority,
5416    NotSupportedState,
5417    UnknownTransaction,
5418    LanguageNotSupported,
5419}
5420/// Specify which monitoring base will be set
5421#[derive(Debug, Clone, PartialEq, Eq)]
5422#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5423pub enum MonitoringBaseEnum {
5424    All,
5425    FactoryDefault,
5426    HardWiredOnly,
5427}
5428/// Authentication method.
5429#[derive(Debug, Clone, PartialEq, Eq)]
5430#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5431pub enum APNAuthenticationEnum {
5432    PAP,
5433    CHAP,
5434    NONE,
5435    AUTO,
5436}
5437#[cfg(feature = "alloc")]
5438/// Collection of configuration data needed to make a data-connection over a cellular network.
5439///
5440/// 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.
5441#[derive(Debug, Clone, PartialEq, Eq)]
5442#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5443pub struct APN<CustomDataType = crate::NoCustomData> {
5444    /// The Access Point Name as an URL.
5445    pub apn: alloc::string::String,
5446    #[cfg_attr(feature = "serde", serde(rename = "apnAuthentication"))]
5447    pub apn_authentication: APNAuthenticationEnum,
5448    /// *(2.1)* APN Password.
5449    #[cfg_attr(feature = "serde", serde(rename = "apnPassword"))]
5450    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5451    pub apn_password: Option<heapless::String<64usize>>,
5452    /// APN username.
5453    #[cfg_attr(feature = "serde", serde(rename = "apnUserName"))]
5454    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5455    pub apn_user_name: Option<heapless::String<50usize>>,
5456    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5457    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5458    pub custom_data: Option<CustomDataType>,
5459    /// Preferred network, written as MCC and MNC concatenated. See note.
5460    #[cfg_attr(feature = "serde", serde(rename = "preferredNetwork"))]
5461    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5462    pub preferred_network: Option<heapless::String<6usize>>,
5463    /// SIM card pin code.
5464    #[cfg_attr(feature = "serde", serde(rename = "simPin"))]
5465    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5466    pub sim_pin: Option<i64>,
5467    /// Default: false. Use only the preferred Network, do
5468    /// not dial in when not available. See Note.
5469    #[cfg_attr(feature = "serde", serde(rename = "useOnlyPreferredNetwork"))]
5470    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5471    pub use_only_preferred_network: Option<bool>,
5472}
5473#[cfg(not(feature = "alloc"))]
5474/// Collection of configuration data needed to make a data-connection over a cellular network.
5475///
5476/// 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.
5477#[derive(Debug, Clone, PartialEq, Eq)]
5478#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5479pub struct APN<
5480    CustomDataType = crate::NoCustomData,
5481    const A_P_N_APN_CAP: usize = 1024usize,
5482> {
5483    /// The Access Point Name as an URL.
5484    pub apn: heapless::String<A_P_N_APN_CAP>,
5485    #[cfg_attr(feature = "serde", serde(rename = "apnAuthentication"))]
5486    pub apn_authentication: APNAuthenticationEnum,
5487    /// *(2.1)* APN Password.
5488    #[cfg_attr(feature = "serde", serde(rename = "apnPassword"))]
5489    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5490    pub apn_password: Option<heapless::String<64usize>>,
5491    /// APN username.
5492    #[cfg_attr(feature = "serde", serde(rename = "apnUserName"))]
5493    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5494    pub apn_user_name: Option<heapless::String<50usize>>,
5495    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5496    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5497    pub custom_data: Option<CustomDataType>,
5498    /// Preferred network, written as MCC and MNC concatenated. See note.
5499    #[cfg_attr(feature = "serde", serde(rename = "preferredNetwork"))]
5500    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5501    pub preferred_network: Option<heapless::String<6usize>>,
5502    /// SIM card pin code.
5503    #[cfg_attr(feature = "serde", serde(rename = "simPin"))]
5504    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5505    pub sim_pin: Option<i64>,
5506    /// Default: false. Use only the preferred Network, do
5507    /// not dial in when not available. See Note.
5508    #[cfg_attr(feature = "serde", serde(rename = "useOnlyPreferredNetwork"))]
5509    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5510    pub use_only_preferred_network: Option<bool>,
5511}
5512/// Applicable Network Interface. Charging Station is allowed to use a different network interface to connect if the given one does not work.
5513#[derive(Debug, Clone, PartialEq, Eq)]
5514#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5515pub enum OCPPInterfaceEnum {
5516    Wired0,
5517    Wired1,
5518    Wired2,
5519    Wired3,
5520    Wireless0,
5521    Wireless1,
5522    Wireless2,
5523    Wireless3,
5524    Any,
5525}
5526/// Defines the transport protocol (e.g. SOAP or JSON). Note: SOAP is not supported in OCPP 2.x, but is supported by earlier versions of OCPP.
5527#[derive(Debug, Clone, PartialEq, Eq)]
5528#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5529pub enum OCPPTransportEnum {
5530    SOAP,
5531    JSON,
5532}
5533/// *(2.1)* This field is ignored, since the OCPP version to use is determined during the websocket handshake. The field is only kept for backwards compatibility with the OCPP 2.0.1 JSON schema.
5534#[derive(Debug, Clone, PartialEq, Eq)]
5535#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5536pub enum OCPPVersionEnum {
5537    OCPP12,
5538    OCPP15,
5539    OCPP16,
5540    OCPP20,
5541    OCPP201,
5542    OCPP21,
5543}
5544/// Type of VPN
5545#[derive(Debug, Clone, PartialEq, Eq)]
5546#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5547pub enum VPNEnum {
5548    IKEv2,
5549    IPSec,
5550    L2TP,
5551    PPTP,
5552}
5553#[cfg(feature = "alloc")]
5554/// VPN Configuration settings
5555#[derive(Debug, Clone, PartialEq, Eq)]
5556#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5557pub struct VPN<CustomDataType = crate::NoCustomData> {
5558    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5559    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5560    pub custom_data: Option<CustomDataType>,
5561    /// VPN group.
5562    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5563    pub group: Option<heapless::String<50usize>>,
5564    /// VPN shared secret.
5565    pub key: heapless::String<255usize>,
5566    /// *(2.1)* VPN Password.
5567    pub password: heapless::String<64usize>,
5568    /// VPN Server Address
5569    pub server: alloc::string::String,
5570    pub r#type: VPNEnum,
5571    /// VPN User
5572    pub user: heapless::String<50usize>,
5573}
5574#[cfg(not(feature = "alloc"))]
5575/// VPN Configuration settings
5576#[derive(Debug, Clone, PartialEq, Eq)]
5577#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5578pub struct VPN<
5579    CustomDataType = crate::NoCustomData,
5580    const V_P_N_SERVER_CAP: usize = 1024usize,
5581> {
5582    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5583    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5584    pub custom_data: Option<CustomDataType>,
5585    /// VPN group.
5586    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5587    pub group: Option<heapless::String<50usize>>,
5588    /// VPN shared secret.
5589    pub key: heapless::String<255usize>,
5590    /// *(2.1)* VPN Password.
5591    pub password: heapless::String<64usize>,
5592    /// VPN Server Address
5593    pub server: heapless::String<V_P_N_SERVER_CAP>,
5594    pub r#type: VPNEnum,
5595    /// VPN User
5596    pub user: heapless::String<50usize>,
5597}
5598#[cfg(feature = "alloc")]
5599/// The NetworkConnectionProfile defines the functional and technical parameters of a communication link.
5600#[derive(Debug, Clone, PartialEq, Eq)]
5601#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5602pub struct NetworkConnectionProfile<CustomDataType = crate::NoCustomData> {
5603    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5604    pub apn: Option<APN<CustomDataType>>,
5605    /// *(2.1)* BasicAuthPassword to use for security profile 1 or 2.
5606    #[cfg_attr(feature = "serde", serde(rename = "basicAuthPassword"))]
5607    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5608    pub basic_auth_password: Option<heapless::String<64usize>>,
5609    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5610    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5611    pub custom_data: Option<CustomDataType>,
5612    /// *(2.1)* Charging Station identity to be used as the basic authentication username.
5613    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5614    pub identity: Option<heapless::String<48usize>>,
5615    /// Duration in seconds before a message send by the Charging Station via this network connection times-out.
5616    /// The best setting depends on the underlying network and response times of the CSMS.
5617    /// If you are looking for a some guideline: use 30 seconds as a starting point.
5618    #[cfg_attr(feature = "serde", serde(rename = "messageTimeout"))]
5619    pub message_timeout: i64,
5620    /// URL of the CSMS(s) that this Charging Station communicates with, without the Charging Station identity part. +
5621    /// The SecurityCtrlr.Identity field is appended to _ocppCsmsUrl_ to provide the full websocket URL.
5622    #[cfg_attr(feature = "serde", serde(rename = "ocppCsmsUrl"))]
5623    pub ocpp_csms_url: alloc::string::String,
5624    #[cfg_attr(feature = "serde", serde(rename = "ocppInterface"))]
5625    pub ocpp_interface: OCPPInterfaceEnum,
5626    #[cfg_attr(feature = "serde", serde(rename = "ocppTransport"))]
5627    pub ocpp_transport: OCPPTransportEnum,
5628    #[cfg_attr(feature = "serde", serde(rename = "ocppVersion"))]
5629    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5630    pub ocpp_version: Option<OCPPVersionEnum>,
5631    /// This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile.
5632    #[cfg_attr(feature = "serde", serde(rename = "securityProfile"))]
5633    pub security_profile: i64,
5634    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5635    pub vpn: Option<VPN<CustomDataType>>,
5636}
5637#[cfg(not(feature = "alloc"))]
5638/// The NetworkConnectionProfile defines the functional and technical parameters of a communication link.
5639#[derive(Debug, Clone, PartialEq, Eq)]
5640#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5641pub struct NetworkConnectionProfile<
5642    CustomDataType = crate::NoCustomData,
5643    const A_P_N_APN_CAP: usize = 1024usize,
5644    const NETWORK_CONNECTION_PROFILE_OCPP_CSMS_URL_CAP: usize = 1024usize,
5645    const V_P_N_SERVER_CAP: usize = 1024usize,
5646> {
5647    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5648    pub apn: Option<APN<CustomDataType, A_P_N_APN_CAP>>,
5649    /// *(2.1)* BasicAuthPassword to use for security profile 1 or 2.
5650    #[cfg_attr(feature = "serde", serde(rename = "basicAuthPassword"))]
5651    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5652    pub basic_auth_password: Option<heapless::String<64usize>>,
5653    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5654    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5655    pub custom_data: Option<CustomDataType>,
5656    /// *(2.1)* Charging Station identity to be used as the basic authentication username.
5657    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5658    pub identity: Option<heapless::String<48usize>>,
5659    /// Duration in seconds before a message send by the Charging Station via this network connection times-out.
5660    /// The best setting depends on the underlying network and response times of the CSMS.
5661    /// If you are looking for a some guideline: use 30 seconds as a starting point.
5662    #[cfg_attr(feature = "serde", serde(rename = "messageTimeout"))]
5663    pub message_timeout: i64,
5664    /// URL of the CSMS(s) that this Charging Station communicates with, without the Charging Station identity part. +
5665    /// The SecurityCtrlr.Identity field is appended to _ocppCsmsUrl_ to provide the full websocket URL.
5666    #[cfg_attr(feature = "serde", serde(rename = "ocppCsmsUrl"))]
5667    pub ocpp_csms_url: heapless::String<NETWORK_CONNECTION_PROFILE_OCPP_CSMS_URL_CAP>,
5668    #[cfg_attr(feature = "serde", serde(rename = "ocppInterface"))]
5669    pub ocpp_interface: OCPPInterfaceEnum,
5670    #[cfg_attr(feature = "serde", serde(rename = "ocppTransport"))]
5671    pub ocpp_transport: OCPPTransportEnum,
5672    #[cfg_attr(feature = "serde", serde(rename = "ocppVersion"))]
5673    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5674    pub ocpp_version: Option<OCPPVersionEnum>,
5675    /// This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile.
5676    #[cfg_attr(feature = "serde", serde(rename = "securityProfile"))]
5677    pub security_profile: i64,
5678    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5679    pub vpn: Option<VPN<CustomDataType, V_P_N_SERVER_CAP>>,
5680}
5681/// Result of operation.
5682#[derive(Debug, Clone, PartialEq, Eq)]
5683#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5684pub enum SetNetworkProfileStatusEnum {
5685    Accepted,
5686    Rejected,
5687    Failed,
5688}
5689/// Class to hold parameters of SetVariableMonitoring request.
5690#[derive(Debug, Clone, PartialEq)]
5691#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5692pub struct SetMonitoringData<CustomDataType = crate::NoCustomData> {
5693    pub component: Component<CustomDataType>,
5694    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5695    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5696    pub custom_data: Option<CustomDataType>,
5697    /// An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id's for new monitors.
5698    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5699    pub id: Option<i64>,
5700    #[cfg_attr(feature = "serde", serde(rename = "periodicEventStream"))]
5701    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5702    pub periodic_event_stream: Option<PeriodicEventStreamParams<CustomDataType>>,
5703    /// 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.
5704    ///
5705    /// The severity levels have the following meaning: +
5706    /// *0-Danger* +
5707    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
5708    /// *1-Hardware Failure* +
5709    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
5710    /// *2-System Failure* +
5711    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
5712    /// *3-Critical* +
5713    /// Indicates a critical error. Action is required. +
5714    /// *4-Error* +
5715    /// Indicates a non-urgent error. Action is required. +
5716    /// *5-Alert* +
5717    /// Indicates an alert event. Default severity for any type of monitoring event.  +
5718    /// *6-Warning* +
5719    /// Indicates a warning event. Action may be required. +
5720    /// *7-Notice* +
5721    /// Indicates an unusual event. No immediate action is required. +
5722    /// *8-Informational* +
5723    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
5724    /// *9-Debug* +
5725    /// Indicates information useful to developers for debugging, not useful during operations.
5726    pub severity: i64,
5727    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false.
5728    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5729    pub transaction: Option<bool>,
5730    pub r#type: MonitorEnum,
5731    /// Value for threshold or delta monitoring.
5732    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
5733    pub value: f64,
5734    pub variable: Variable<CustomDataType>,
5735}
5736/// Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
5737#[derive(Debug, Clone, PartialEq, Eq)]
5738#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5739pub enum SetMonitoringStatusEnum {
5740    Accepted,
5741    UnknownComponent,
5742    UnknownVariable,
5743    UnsupportedMonitorType,
5744    Rejected,
5745    Duplicate,
5746}
5747#[cfg(feature = "alloc")]
5748/// Class to hold result of SetVariableMonitoring request.
5749#[derive(Debug, Clone, PartialEq, Eq)]
5750#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5751pub struct SetMonitoringResult<CustomDataType = crate::NoCustomData> {
5752    pub component: Component<CustomDataType>,
5753    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5754    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5755    pub custom_data: Option<CustomDataType>,
5756    /// 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.
5757    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5758    pub id: Option<i64>,
5759    /// 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.
5760    ///
5761    /// The severity levels have the following meaning: +
5762    /// *0-Danger* +
5763    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
5764    /// *1-Hardware Failure* +
5765    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
5766    /// *2-System Failure* +
5767    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
5768    /// *3-Critical* +
5769    /// Indicates a critical error. Action is required. +
5770    /// *4-Error* +
5771    /// Indicates a non-urgent error. Action is required. +
5772    /// *5-Alert* +
5773    /// Indicates an alert event. Default severity for any type of monitoring event.  +
5774    /// *6-Warning* +
5775    /// Indicates a warning event. Action may be required. +
5776    /// *7-Notice* +
5777    /// Indicates an unusual event. No immediate action is required. +
5778    /// *8-Informational* +
5779    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
5780    /// *9-Debug* +
5781    /// Indicates information useful to developers for debugging, not useful during operations.
5782    pub severity: i64,
5783    pub status: SetMonitoringStatusEnum,
5784    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
5785    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5786    pub status_info: Option<StatusInfo<CustomDataType>>,
5787    pub r#type: MonitorEnum,
5788    pub variable: Variable<CustomDataType>,
5789}
5790#[cfg(not(feature = "alloc"))]
5791/// Class to hold result of SetVariableMonitoring request.
5792#[derive(Debug, Clone, PartialEq, Eq)]
5793#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5794pub struct SetMonitoringResult<
5795    CustomDataType = crate::NoCustomData,
5796    const STATUS_INFO_ADDITIONAL_INFO_CAP: usize = 1024usize,
5797> {
5798    pub component: Component<CustomDataType>,
5799    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5800    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5801    pub custom_data: Option<CustomDataType>,
5802    /// 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.
5803    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5804    pub id: Option<i64>,
5805    /// 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.
5806    ///
5807    /// The severity levels have the following meaning: +
5808    /// *0-Danger* +
5809    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
5810    /// *1-Hardware Failure* +
5811    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
5812    /// *2-System Failure* +
5813    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
5814    /// *3-Critical* +
5815    /// Indicates a critical error. Action is required. +
5816    /// *4-Error* +
5817    /// Indicates a non-urgent error. Action is required. +
5818    /// *5-Alert* +
5819    /// Indicates an alert event. Default severity for any type of monitoring event.  +
5820    /// *6-Warning* +
5821    /// Indicates a warning event. Action may be required. +
5822    /// *7-Notice* +
5823    /// Indicates an unusual event. No immediate action is required. +
5824    /// *8-Informational* +
5825    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
5826    /// *9-Debug* +
5827    /// Indicates information useful to developers for debugging, not useful during operations.
5828    pub severity: i64,
5829    pub status: SetMonitoringStatusEnum,
5830    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
5831    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5832    pub status_info: Option<StatusInfo<CustomDataType, STATUS_INFO_ADDITIONAL_INFO_CAP>>,
5833    pub r#type: MonitorEnum,
5834    pub variable: Variable<CustomDataType>,
5835}
5836#[cfg(feature = "alloc")]
5837#[derive(Debug, Clone, PartialEq, Eq)]
5838#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5839pub struct SetVariableData<CustomDataType = crate::NoCustomData> {
5840    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
5841    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5842    pub attribute_type: Option<AttributeEnum>,
5843    /// Value to be assigned to attribute of variable.
5844    /// This value is allowed to be an empty string ("").
5845    ///
5846    /// The Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valuesList. The max size of these values will always remain equal.
5847    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
5848    pub attribute_value: alloc::string::String,
5849    pub component: Component<CustomDataType>,
5850    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5851    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5852    pub custom_data: Option<CustomDataType>,
5853    pub variable: Variable<CustomDataType>,
5854}
5855#[cfg(not(feature = "alloc"))]
5856#[derive(Debug, Clone, PartialEq, Eq)]
5857#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5858pub struct SetVariableData<
5859    CustomDataType = crate::NoCustomData,
5860    const SET_VARIABLE_DATA_ATTRIBUTE_VALUE_CAP: usize = 1024usize,
5861> {
5862    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
5863    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5864    pub attribute_type: Option<AttributeEnum>,
5865    /// Value to be assigned to attribute of variable.
5866    /// This value is allowed to be an empty string ("").
5867    ///
5868    /// The Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valuesList. The max size of these values will always remain equal.
5869    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
5870    pub attribute_value: heapless::String<SET_VARIABLE_DATA_ATTRIBUTE_VALUE_CAP>,
5871    pub component: Component<CustomDataType>,
5872    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5873    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5874    pub custom_data: Option<CustomDataType>,
5875    pub variable: Variable<CustomDataType>,
5876}
5877/// Result status of setting the variable.
5878#[derive(Debug, Clone, PartialEq, Eq)]
5879#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5880pub enum SetVariableStatusEnum {
5881    Accepted,
5882    Rejected,
5883    UnknownComponent,
5884    UnknownVariable,
5885    NotSupportedAttributeType,
5886    RebootRequired,
5887}
5888#[cfg(feature = "alloc")]
5889#[derive(Debug, Clone, PartialEq, Eq)]
5890#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5891pub struct SetVariableResult<CustomDataType = crate::NoCustomData> {
5892    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
5893    pub attribute_status: SetVariableStatusEnum,
5894    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
5895    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5896    pub attribute_status_info: Option<StatusInfo<CustomDataType>>,
5897    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
5898    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5899    pub attribute_type: Option<AttributeEnum>,
5900    pub component: Component<CustomDataType>,
5901    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5902    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5903    pub custom_data: Option<CustomDataType>,
5904    pub variable: Variable<CustomDataType>,
5905}
5906#[cfg(not(feature = "alloc"))]
5907#[derive(Debug, Clone, PartialEq, Eq)]
5908#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5909pub struct SetVariableResult<
5910    CustomDataType = crate::NoCustomData,
5911    const STATUS_INFO_ADDITIONAL_INFO_CAP: usize = 1024usize,
5912> {
5913    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
5914    pub attribute_status: SetVariableStatusEnum,
5915    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
5916    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5917    pub attribute_status_info: Option<
5918        StatusInfo<CustomDataType, STATUS_INFO_ADDITIONAL_INFO_CAP>,
5919    >,
5920    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
5921    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5922    pub attribute_type: Option<AttributeEnum>,
5923    pub component: Component<CustomDataType>,
5924    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5925    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5926    pub custom_data: Option<CustomDataType>,
5927    pub variable: Variable<CustomDataType>,
5928}
5929/// This contains the current status of the Connector.
5930#[derive(Debug, Clone, PartialEq, Eq)]
5931#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5932pub enum ConnectorStatusEnum {
5933    Available,
5934    Occupied,
5935    Reserved,
5936    Unavailable,
5937    Faulted,
5938}
5939/// Type of cost dimension: energy, power, time, etc.
5940#[derive(Debug, Clone, PartialEq, Eq)]
5941#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5942pub enum CostDimensionEnum {
5943    Energy,
5944    MaxCurrent,
5945    MinCurrent,
5946    MaxPower,
5947    MinPower,
5948    IdleTIme,
5949    ChargingTime,
5950}
5951/// Volume consumed of cost dimension.
5952#[derive(Debug, Clone, PartialEq)]
5953#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5954pub struct CostDimension<CustomDataType = crate::NoCustomData> {
5955    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5956    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5957    pub custom_data: Option<CustomDataType>,
5958    pub r#type: CostDimensionEnum,
5959    /// Volume of the dimension consumed, measured according to the dimension type.
5960    pub volume: f64,
5961}
5962#[cfg(feature = "alloc")]
5963/// A ChargingPeriodType consists of a start time, and a list of possible values that influence this period, for example: amount of energy charged this period, maximum current during this period etc.
5964#[derive(Debug, Clone, PartialEq)]
5965#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5966pub struct ChargingPeriod<CustomDataType = crate::NoCustomData> {
5967    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5968    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5969    pub custom_data: Option<CustomDataType>,
5970    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5971    pub dimensions: Option<alloc::vec::Vec<CostDimension<CustomDataType>>>,
5972    /// Start timestamp of charging period. A period ends when the next period starts. The last period ends when the session ends.
5973    #[cfg_attr(feature = "serde", serde(rename = "startPeriod"))]
5974    pub start_period: crate::OcppTimestamp,
5975    /// Unique identifier of the Tariff that was used to calculate cost. If not provided, then cost was calculated by some other means.
5976    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
5977    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5978    pub tariff_id: Option<heapless::String<60usize>>,
5979}
5980#[cfg(not(feature = "alloc"))]
5981/// A ChargingPeriodType consists of a start time, and a list of possible values that influence this period, for example: amount of energy charged this period, maximum current during this period etc.
5982#[derive(Debug, Clone, PartialEq)]
5983#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5984pub struct ChargingPeriod<
5985    CustomDataType = crate::NoCustomData,
5986    const CHARGING_PERIOD_DIMENSIONS_CAP: usize = 8usize,
5987> {
5988    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5989    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5990    pub custom_data: Option<CustomDataType>,
5991    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5992    pub dimensions: Option<
5993        heapless::Vec<CostDimension<CustomDataType>, CHARGING_PERIOD_DIMENSIONS_CAP>,
5994    >,
5995    /// Start timestamp of charging period. A period ends when the next period starts. The last period ends when the session ends.
5996    #[cfg_attr(feature = "serde", serde(rename = "startPeriod"))]
5997    pub start_period: crate::OcppTimestamp,
5998    /// Unique identifier of the Tariff that was used to calculate cost. If not provided, then cost was calculated by some other means.
5999    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
6000    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6001    pub tariff_id: Option<heapless::String<60usize>>,
6002}
6003/// Total cost with and without tax. Contains the total of energy, charging time, idle time, fixed and reservation costs including and/or excluding tax.
6004#[derive(Debug, Clone, PartialEq)]
6005#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6006pub struct TotalPrice<CustomDataType = crate::NoCustomData> {
6007    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6008    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6009    pub custom_data: Option<CustomDataType>,
6010    /// Price/cost excluding tax. Can be absent if _inclTax_ is present.
6011    #[cfg_attr(feature = "serde", serde(rename = "exclTax"))]
6012    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6013    pub excl_tax: Option<f64>,
6014    /// Price/cost including tax. Can be absent if _exclTax_ is present.
6015    #[cfg_attr(feature = "serde", serde(rename = "inclTax"))]
6016    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6017    pub incl_tax: Option<f64>,
6018}
6019/// Type of cost: normal or the minimum or maximum cost.
6020#[derive(Debug, Clone, PartialEq, Eq)]
6021#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6022pub enum TariffCostEnum {
6023    NormalCost,
6024    MinCost,
6025    MaxCost,
6026}
6027/// This contains the cost calculated during a transaction. It is used both for running cost and final cost of the transaction.
6028#[derive(Debug, Clone, PartialEq)]
6029#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6030pub struct TotalCost<CustomDataType = crate::NoCustomData> {
6031    #[cfg_attr(feature = "serde", serde(rename = "chargingTime"))]
6032    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6033    pub charging_time: Option<Price<CustomDataType>>,
6034    /// Currency of the costs in ISO 4217 Code.
6035    pub currency: heapless::String<3usize>,
6036    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6037    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6038    pub custom_data: Option<CustomDataType>,
6039    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6040    pub energy: Option<Price<CustomDataType>>,
6041    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6042    pub fixed: Option<Price<CustomDataType>>,
6043    #[cfg_attr(feature = "serde", serde(rename = "idleTime"))]
6044    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6045    pub idle_time: Option<Price<CustomDataType>>,
6046    #[cfg_attr(feature = "serde", serde(rename = "reservationFixed"))]
6047    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6048    pub reservation_fixed: Option<Price<CustomDataType>>,
6049    #[cfg_attr(feature = "serde", serde(rename = "reservationTime"))]
6050    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6051    pub reservation_time: Option<Price<CustomDataType>>,
6052    pub total: TotalPrice<CustomDataType>,
6053    #[cfg_attr(feature = "serde", serde(rename = "typeOfCost"))]
6054    pub type_of_cost: TariffCostEnum,
6055}
6056/// This contains the calculated usage of energy, charging time and idle time during a transaction.
6057#[derive(Debug, Clone, PartialEq)]
6058#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6059pub struct TotalUsage<CustomDataType = crate::NoCustomData> {
6060    /// Total duration of the charging session (including the duration of charging and not charging), in seconds.
6061    #[cfg_attr(feature = "serde", serde(rename = "chargingTime"))]
6062    pub charging_time: i64,
6063    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6064    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6065    pub custom_data: Option<CustomDataType>,
6066    pub energy: f64,
6067    /// Total duration of the charging session where the EV was not charging (no energy was transferred between EVSE and EV), in seconds.
6068    #[cfg_attr(feature = "serde", serde(rename = "idleTime"))]
6069    pub idle_time: i64,
6070    /// Total time of reservation in seconds.
6071    #[cfg_attr(feature = "serde", serde(rename = "reservationTime"))]
6072    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6073    pub reservation_time: Option<i64>,
6074}
6075#[cfg(feature = "alloc")]
6076/// CostDetailsType contains the cost as calculated by Charging Station based on provided TariffType.
6077///
6078/// NOTE: Reservation is not shown as a _chargingPeriod_, because it took place outside of the transaction.
6079#[derive(Debug, Clone, PartialEq)]
6080#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6081pub struct CostDetails<CustomDataType = crate::NoCustomData> {
6082    #[cfg_attr(feature = "serde", serde(rename = "chargingPeriods"))]
6083    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6084    pub charging_periods: Option<alloc::vec::Vec<ChargingPeriod<CustomDataType>>>,
6085    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6086    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6087    pub custom_data: Option<CustomDataType>,
6088    /// Optional human-readable reason text in case of failure to calculate.
6089    #[cfg_attr(feature = "serde", serde(rename = "failureReason"))]
6090    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6091    pub failure_reason: Option<heapless::String<500usize>>,
6092    /// If set to true, then Charging Station has failed to calculate the cost.
6093    #[cfg_attr(feature = "serde", serde(rename = "failureToCalculate"))]
6094    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6095    pub failure_to_calculate: Option<bool>,
6096    #[cfg_attr(feature = "serde", serde(rename = "totalCost"))]
6097    pub total_cost: TotalCost<CustomDataType>,
6098    #[cfg_attr(feature = "serde", serde(rename = "totalUsage"))]
6099    pub total_usage: TotalUsage<CustomDataType>,
6100}
6101#[cfg(not(feature = "alloc"))]
6102/// CostDetailsType contains the cost as calculated by Charging Station based on provided TariffType.
6103///
6104/// NOTE: Reservation is not shown as a _chargingPeriod_, because it took place outside of the transaction.
6105#[derive(Debug, Clone, PartialEq)]
6106#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6107pub struct CostDetails<
6108    CustomDataType = crate::NoCustomData,
6109    const COST_DETAILS_CHARGING_PERIODS_CAP: usize = 8usize,
6110    const CHARGING_PERIOD_DIMENSIONS_CAP: usize = 8usize,
6111> {
6112    #[cfg_attr(feature = "serde", serde(rename = "chargingPeriods"))]
6113    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6114    pub charging_periods: Option<
6115        heapless::Vec<
6116            ChargingPeriod<CustomDataType, CHARGING_PERIOD_DIMENSIONS_CAP>,
6117            COST_DETAILS_CHARGING_PERIODS_CAP,
6118        >,
6119    >,
6120    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6121    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6122    pub custom_data: Option<CustomDataType>,
6123    /// Optional human-readable reason text in case of failure to calculate.
6124    #[cfg_attr(feature = "serde", serde(rename = "failureReason"))]
6125    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6126    pub failure_reason: Option<heapless::String<500usize>>,
6127    /// If set to true, then Charging Station has failed to calculate the cost.
6128    #[cfg_attr(feature = "serde", serde(rename = "failureToCalculate"))]
6129    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6130    pub failure_to_calculate: Option<bool>,
6131    #[cfg_attr(feature = "serde", serde(rename = "totalCost"))]
6132    pub total_cost: TotalCost<CustomDataType>,
6133    #[cfg_attr(feature = "serde", serde(rename = "totalUsage"))]
6134    pub total_usage: TotalUsage<CustomDataType>,
6135}
6136/// This contains the type of this event.
6137/// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
6138#[derive(Debug, Clone, PartialEq, Eq)]
6139#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6140pub enum TransactionEventEnum {
6141    Ended,
6142    Started,
6143    Updated,
6144}
6145/// *(2.1)* The current preconditioning status of the BMS in the EV. Default value is Unknown.
6146#[derive(Debug, Clone, PartialEq, Eq)]
6147#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6148pub enum PreconditioningStatusEnum {
6149    Unknown,
6150    Ready,
6151    NotReady,
6152    Preconditioning,
6153}
6154/// Current charging state, is required when state
6155/// has changed. Omitted when there is no communication between EVSE and EV, because no cable is plugged in.
6156#[derive(Debug, Clone, PartialEq, Eq)]
6157#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6158pub enum ChargingStateEnum {
6159    EVConnected,
6160    Charging,
6161    SuspendedEV,
6162    SuspendedEVSE,
6163    Idle,
6164}
6165/// The _stoppedReason_ is the reason/event that initiated the process of stopping the transaction. It will normally be the user stopping authorization via card (Local or MasterPass) or app (Remote), but it can also be CSMS revoking authorization (DeAuthorized), or disconnecting the EV when TxStopPoint = EVConnected (EVDisconnected). Most other reasons are related to technical faults or energy limitations. +
6166/// MAY only be omitted when _stoppedReason_ is "Local"
6167#[derive(Debug, Clone, PartialEq, Eq)]
6168#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6169pub enum ReasonEnum {
6170    DeAuthorized,
6171    EmergencyStop,
6172    EnergyLimitReached,
6173    EVDisconnected,
6174    GroundFault,
6175    ImmediateReset,
6176    MasterPass,
6177    Local,
6178    LocalOutOfCredit,
6179    Other,
6180    OvercurrentFault,
6181    PowerLoss,
6182    PowerQuality,
6183    Reboot,
6184    Remote,
6185    SOCLimitReached,
6186    StoppedByEV,
6187    TimeLimitReached,
6188    Timeout,
6189    ReqEnergyTransferRejected,
6190}
6191/// Cost, energy, time or SoC limit for a transaction.
6192#[derive(Debug, Clone, PartialEq)]
6193#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6194pub struct TransactionLimit<CustomDataType = crate::NoCustomData> {
6195    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6196    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6197    pub custom_data: Option<CustomDataType>,
6198    /// Maximum allowed cost of transaction in currency of tariff.
6199    #[cfg_attr(feature = "serde", serde(rename = "maxCost"))]
6200    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6201    pub max_cost: Option<f64>,
6202    /// Maximum allowed energy in Wh to charge in transaction.
6203    #[cfg_attr(feature = "serde", serde(rename = "maxEnergy"))]
6204    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6205    pub max_energy: Option<f64>,
6206    /// Maximum State of Charge of EV in percentage.
6207    #[cfg_attr(feature = "serde", serde(rename = "maxSoC"))]
6208    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6209    pub max_so_c: Option<i64>,
6210    /// Maximum duration of transaction in seconds from start to end.
6211    #[cfg_attr(feature = "serde", serde(rename = "maxTime"))]
6212    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6213    pub max_time: Option<i64>,
6214}
6215#[derive(Debug, Clone, PartialEq)]
6216#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6217pub struct Transaction<CustomDataType = crate::NoCustomData> {
6218    #[cfg_attr(feature = "serde", serde(rename = "chargingState"))]
6219    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6220    pub charging_state: Option<ChargingStateEnum>,
6221    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6222    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6223    pub custom_data: Option<CustomDataType>,
6224    #[cfg_attr(feature = "serde", serde(rename = "operationMode"))]
6225    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6226    pub operation_mode: Option<OperationModeEnum>,
6227    /// 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.
6228    #[cfg_attr(feature = "serde", serde(rename = "remoteStartId"))]
6229    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6230    pub remote_start_id: Option<i64>,
6231    #[cfg_attr(feature = "serde", serde(rename = "stoppedReason"))]
6232    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6233    pub stopped_reason: Option<ReasonEnum>,
6234    /// *(2.1)* Id of tariff in use for transaction
6235    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
6236    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6237    pub tariff_id: Option<heapless::String<60usize>>,
6238    /// 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.
6239    #[cfg_attr(feature = "serde", serde(rename = "timeSpentCharging"))]
6240    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6241    pub time_spent_charging: Option<i64>,
6242    /// This contains the Id of the transaction.
6243    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
6244    pub transaction_id: heapless::String<36usize>,
6245    #[cfg_attr(feature = "serde", serde(rename = "transactionLimit"))]
6246    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6247    pub transaction_limit: Option<TransactionLimit<CustomDataType>>,
6248}
6249/// Reason the Charging Station sends this message to the CSMS
6250#[derive(Debug, Clone, PartialEq, Eq)]
6251#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6252pub enum TriggerReasonEnum {
6253    AbnormalCondition,
6254    Authorized,
6255    CablePluggedIn,
6256    ChargingRateChanged,
6257    ChargingStateChanged,
6258    CostLimitReached,
6259    Deauthorized,
6260    EnergyLimitReached,
6261    EVCommunicationLost,
6262    EVConnectTimeout,
6263    EVDeparted,
6264    EVDetected,
6265    LimitSet,
6266    MeterValueClock,
6267    MeterValuePeriodic,
6268    OperationModeChanged,
6269    RemoteStart,
6270    RemoteStop,
6271    ResetCommand,
6272    RunningCost,
6273    SignedDataReceived,
6274    SoCLimitReached,
6275    StopAuthorized,
6276    TariffChanged,
6277    TariffNotAccepted,
6278    TimeLimitReached,
6279    Trigger,
6280    TxResumed,
6281    UnlockCommand,
6282}
6283/// Type of message to be triggered.
6284#[derive(Debug, Clone, PartialEq, Eq)]
6285#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6286pub enum MessageTriggerEnum {
6287    BootNotification,
6288    LogStatusNotification,
6289    FirmwareStatusNotification,
6290    Heartbeat,
6291    MeterValues,
6292    SignChargingStationCertificate,
6293    SignV2GCertificate,
6294    SignV2G20Certificate,
6295    StatusNotification,
6296    TransactionEvent,
6297    SignCombinedCertificate,
6298    PublishFirmwareStatusNotification,
6299    CustomTrigger,
6300}
6301/// Indicates whether the Charging Station will send the requested notification or not.
6302#[derive(Debug, Clone, PartialEq, Eq)]
6303#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6304pub enum TriggerMessageStatusEnum {
6305    Accepted,
6306    Rejected,
6307    NotImplemented,
6308}
6309/// This indicates whether the Charging Station has unlocked the connector.
6310#[derive(Debug, Clone, PartialEq, Eq)]
6311#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6312pub enum UnlockStatusEnum {
6313    Unlocked,
6314    UnlockFailed,
6315    OngoingAuthorizedTransaction,
6316    UnknownConnector,
6317}
6318/// Indicates whether the Local Controller succeeded in unpublishing the firmware.
6319#[derive(Debug, Clone, PartialEq, Eq)]
6320#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6321pub enum UnpublishFirmwareStatusEnum {
6322    DownloadOngoing,
6323    NoFirmware,
6324    Unpublished,
6325}
6326#[cfg(feature = "alloc")]
6327/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
6328#[derive(Debug, Clone, PartialEq, Eq)]
6329#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6330pub struct Firmware<CustomDataType = crate::NoCustomData> {
6331    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6332    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6333    pub custom_data: Option<CustomDataType>,
6334    /// Date and time at which the firmware shall be installed.
6335    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
6336    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6337    pub install_date_time: Option<crate::OcppTimestamp>,
6338    /// URI defining the origin of the firmware.
6339    pub location: alloc::string::String,
6340    /// Date and time at which the firmware shall be retrieved.
6341    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
6342    pub retrieve_date_time: crate::OcppTimestamp,
6343    /// Base64 encoded firmware signature.
6344    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6345    pub signature: Option<alloc::string::String>,
6346    /// Certificate with which the firmware was signed.
6347    /// PEM encoded X.509 certificate.
6348    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
6349    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6350    pub signing_certificate: Option<alloc::string::String>,
6351}
6352#[cfg(not(feature = "alloc"))]
6353/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
6354#[derive(Debug, Clone, PartialEq, Eq)]
6355#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6356pub struct Firmware<
6357    CustomDataType = crate::NoCustomData,
6358    const FIRMWARE_LOCATION_CAP: usize = 1024usize,
6359    const FIRMWARE_SIGNATURE_CAP: usize = 800usize,
6360    const FIRMWARE_SIGNING_CERTIFICATE_CAP: usize = 1024usize,
6361> {
6362    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6363    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6364    pub custom_data: Option<CustomDataType>,
6365    /// Date and time at which the firmware shall be installed.
6366    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
6367    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6368    pub install_date_time: Option<crate::OcppTimestamp>,
6369    /// URI defining the origin of the firmware.
6370    pub location: heapless::String<FIRMWARE_LOCATION_CAP>,
6371    /// Date and time at which the firmware shall be retrieved.
6372    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
6373    pub retrieve_date_time: crate::OcppTimestamp,
6374    /// Base64 encoded firmware signature.
6375    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6376    pub signature: Option<heapless::String<FIRMWARE_SIGNATURE_CAP>>,
6377    /// Certificate with which the firmware was signed.
6378    /// PEM encoded X.509 certificate.
6379    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
6380    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6381    pub signing_certificate: Option<heapless::String<FIRMWARE_SIGNING_CERTIFICATE_CAP>>,
6382}
6383/// This field indicates whether the Charging Station was able to accept the request.
6384#[derive(Debug, Clone, PartialEq, Eq)]
6385#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6386pub enum UpdateFirmwareStatusEnum {
6387    Accepted,
6388    Rejected,
6389    AcceptedCanceled,
6390    InvalidCertificate,
6391    RevokedCertificate,
6392}
6393/// Result of the request.
6394#[derive(Debug, Clone, PartialEq, Eq)]
6395#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6396pub enum PriorityChargingStatusEnum {
6397    Accepted,
6398    Rejected,
6399    NoProfile,
6400}