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