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: alloc::vec::Vec<PriceRuleStack>,
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: alloc::vec::Vec<PriceLevelScheduleEntry>,
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#[cfg(feature = "alloc")]
2843/// A SalesTariff provided by a Mobility Operator (EMSP) .
2844/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
2845#[derive(Debug, Clone, PartialEq)]
2846#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2847pub struct SalesTariff {
2848    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2849    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2850    pub custom_data: Option<CustomData>,
2851    /// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
2852    pub id: i64,
2853    /// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
2854    #[cfg_attr(feature = "serde", serde(rename = "numEPriceLevels"))]
2855    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2856    pub num_e_price_levels: Option<i64>,
2857    /// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
2858    #[cfg_attr(feature = "serde", serde(rename = "salesTariffDescription"))]
2859    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2860    pub sales_tariff_description: Option<heapless::String<32usize>>,
2861    #[cfg_attr(feature = "serde", serde(rename = "salesTariffEntry"))]
2862    pub sales_tariff_entry: alloc::vec::Vec<SalesTariffEntry>,
2863}
2864#[cfg(not(feature = "alloc"))]
2865/// A SalesTariff provided by a Mobility Operator (EMSP) .
2866/// NOTE: This dataType is based on dataTypes from &lt;&lt;ref-ISOIEC15118-2,ISO 15118-2&gt;&gt;.
2867#[derive(Debug, Clone, PartialEq)]
2868#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2869pub struct SalesTariff {
2870    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2871    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2872    pub custom_data: Option<CustomData>,
2873    /// SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
2874    pub id: i64,
2875    /// Defines the overall number of distinct price levels used across all provided SalesTariff elements.
2876    #[cfg_attr(feature = "serde", serde(rename = "numEPriceLevels"))]
2877    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2878    pub num_e_price_levels: Option<i64>,
2879    /// A human readable title/short description of the sales tariff e.g. for HMI display purposes.
2880    #[cfg_attr(feature = "serde", serde(rename = "salesTariffDescription"))]
2881    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2882    pub sales_tariff_description: Option<heapless::String<32usize>>,
2883    #[cfg_attr(feature = "serde", serde(rename = "salesTariffEntry"))]
2884    pub sales_tariff_entry: heapless::Vec<SalesTariffEntry, 1024usize>,
2885}
2886#[cfg(feature = "alloc")]
2887/// 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'. +
2888/// 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.
2889///
2890/// image::images/ChargingSchedule-Simple.png\[\]
2891#[derive(Debug, Clone, PartialEq)]
2892#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2893pub struct ChargingSchedule {
2894    #[cfg_attr(feature = "serde", serde(rename = "absolutePriceSchedule"))]
2895    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2896    pub absolute_price_schedule: Option<AbsolutePriceSchedule>,
2897    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
2898    pub charging_rate_unit: ChargingRateUnitEnum,
2899    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
2900    pub charging_schedule_period: alloc::vec::Vec<ChargingSchedulePeriod>,
2901    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2902    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2903    pub custom_data: Option<CustomData>,
2904    /// *(2.1)* Base64 encoded hash (SHA256 for ISO 15118-2, SHA512 for ISO 15118-20) of the EXI price schedule element. Used in signature.
2905    #[cfg_attr(feature = "serde", serde(rename = "digestValue"))]
2906    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2907    pub digest_value: Option<heapless::String<88usize>>,
2908    /// 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.
2909    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2910    pub duration: Option<i64>,
2911    pub id: i64,
2912    #[cfg_attr(feature = "serde", serde(rename = "limitAtSoC"))]
2913    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2914    pub limit_at_so_c: Option<LimitAtSoC>,
2915    /// 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.
2916    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
2917    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2918    pub min_charging_rate: Option<f64>,
2919    /// *(2.1)* Power tolerance when following EVPowerProfile.
2920    #[cfg_attr(feature = "serde", serde(rename = "powerTolerance"))]
2921    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2922    pub power_tolerance: Option<f64>,
2923    #[cfg_attr(feature = "serde", serde(rename = "priceLevelSchedule"))]
2924    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2925    pub price_level_schedule: Option<PriceLevelSchedule>,
2926    /// *(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.
2927    #[cfg_attr(feature = "serde", serde(rename = "randomizedDelay"))]
2928    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2929    pub randomized_delay: Option<i64>,
2930    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
2931    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2932    pub sales_tariff: Option<SalesTariff>,
2933    /// *(2.1)* Id of this element for referencing in a signature.
2934    #[cfg_attr(feature = "serde", serde(rename = "signatureId"))]
2935    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2936    pub signature_id: Option<i64>,
2937    /// Starting point of an absolute schedule or recurring schedule.
2938    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
2939    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2940    pub start_schedule: Option<alloc::string::String>,
2941    /// *(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.
2942    ///  This allows the same `Absolute` or `Recurring` charging profile to be used in both summer and winter time.
2943    #[cfg_attr(feature = "serde", serde(rename = "useLocalTime"))]
2944    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2945    pub use_local_time: Option<bool>,
2946}
2947#[cfg(not(feature = "alloc"))]
2948/// 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'. +
2949/// 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.
2950///
2951/// image::images/ChargingSchedule-Simple.png\[\]
2952#[derive(Debug, Clone, PartialEq)]
2953#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
2954pub struct ChargingSchedule<
2955    const ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
2956    const PRICE_LEVEL_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
2957    const CHARGING_SCHEDULE_START_SCHEDULE_CAP: usize = 1024usize,
2958> {
2959    #[cfg_attr(feature = "serde", serde(rename = "absolutePriceSchedule"))]
2960    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2961    pub absolute_price_schedule: Option<
2962        AbsolutePriceSchedule<ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP>,
2963    >,
2964    #[cfg_attr(feature = "serde", serde(rename = "chargingRateUnit"))]
2965    pub charging_rate_unit: ChargingRateUnitEnum,
2966    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedulePeriod"))]
2967    pub charging_schedule_period: heapless::Vec<ChargingSchedulePeriod, 1024usize>,
2968    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
2969    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2970    pub custom_data: Option<CustomData>,
2971    /// *(2.1)* Base64 encoded hash (SHA256 for ISO 15118-2, SHA512 for ISO 15118-20) of the EXI price schedule element. Used in signature.
2972    #[cfg_attr(feature = "serde", serde(rename = "digestValue"))]
2973    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2974    pub digest_value: Option<heapless::String<88usize>>,
2975    /// 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.
2976    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2977    pub duration: Option<i64>,
2978    pub id: i64,
2979    #[cfg_attr(feature = "serde", serde(rename = "limitAtSoC"))]
2980    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2981    pub limit_at_so_c: Option<LimitAtSoC>,
2982    /// 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.
2983    #[cfg_attr(feature = "serde", serde(rename = "minChargingRate"))]
2984    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2985    pub min_charging_rate: Option<f64>,
2986    /// *(2.1)* Power tolerance when following EVPowerProfile.
2987    #[cfg_attr(feature = "serde", serde(rename = "powerTolerance"))]
2988    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2989    pub power_tolerance: Option<f64>,
2990    #[cfg_attr(feature = "serde", serde(rename = "priceLevelSchedule"))]
2991    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2992    pub price_level_schedule: Option<
2993        PriceLevelSchedule<PRICE_LEVEL_SCHEDULE_TIME_ANCHOR_CAP>,
2994    >,
2995    /// *(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.
2996    #[cfg_attr(feature = "serde", serde(rename = "randomizedDelay"))]
2997    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
2998    pub randomized_delay: Option<i64>,
2999    #[cfg_attr(feature = "serde", serde(rename = "salesTariff"))]
3000    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3001    pub sales_tariff: Option<SalesTariff>,
3002    /// *(2.1)* Id of this element for referencing in a signature.
3003    #[cfg_attr(feature = "serde", serde(rename = "signatureId"))]
3004    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3005    pub signature_id: Option<i64>,
3006    /// Starting point of an absolute schedule or recurring schedule.
3007    #[cfg_attr(feature = "serde", serde(rename = "startSchedule"))]
3008    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3009    pub start_schedule: Option<heapless::String<CHARGING_SCHEDULE_START_SCHEDULE_CAP>>,
3010    /// *(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.
3011    ///  This allows the same `Absolute` or `Recurring` charging profile to be used in both summer and winter time.
3012    #[cfg_attr(feature = "serde", serde(rename = "useLocalTime"))]
3013    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3014    pub use_local_time: Option<bool>,
3015}
3016/// Type of grid event that caused this
3017#[derive(Debug, Clone, PartialEq, Eq)]
3018#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3019pub enum GridEventFaultEnum {
3020    CurrentImbalance,
3021    LocalEmergency,
3022    LowInputPower,
3023    OverCurrent,
3024    OverFrequency,
3025    OverVoltage,
3026    PhaseRotation,
3027    RemoteEmergency,
3028    UnderFrequency,
3029    UnderVoltage,
3030    VoltageImbalance,
3031}
3032#[cfg(feature = "alloc")]
3033/// Contains message details, for a message to be displayed on a Charging Station.
3034#[derive(Debug, Clone, PartialEq, Eq)]
3035#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3036pub struct MessageInfo {
3037    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3038    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3039    pub custom_data: Option<CustomData>,
3040    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3041    pub display: Option<Component>,
3042    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
3043    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
3044    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3045    pub end_date_time: Option<alloc::string::String>,
3046    /// Unique id within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
3047    pub id: i64,
3048    pub message: MessageContent,
3049    #[cfg_attr(feature = "serde", serde(rename = "messageExtra"))]
3050    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3051    pub message_extra: Option<heapless::Vec<MessageContent, 4usize>>,
3052    pub priority: MessagePriorityEnum,
3053    /// From what date-time should this message be shown. If omitted: directly.
3054    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
3055    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3056    pub start_date_time: Option<alloc::string::String>,
3057    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3058    pub state: Option<MessageStateEnum>,
3059    /// During which transaction shall this message be shown.
3060    /// Message SHALL be removed by the Charging Station after transaction has
3061    /// ended.
3062    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
3063    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3064    pub transaction_id: Option<heapless::String<36usize>>,
3065}
3066#[cfg(not(feature = "alloc"))]
3067/// Contains message details, for a message to be displayed on a Charging Station.
3068#[derive(Debug, Clone, PartialEq, Eq)]
3069#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3070pub struct MessageInfo<
3071    const MESSAGE_INFO_END_DATE_TIME_CAP: usize = 1024usize,
3072    const MESSAGE_INFO_START_DATE_TIME_CAP: usize = 1024usize,
3073> {
3074    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3075    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3076    pub custom_data: Option<CustomData>,
3077    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3078    pub display: Option<Component>,
3079    /// Until what date-time should this message be shown, after this date/time this message SHALL be removed.
3080    #[cfg_attr(feature = "serde", serde(rename = "endDateTime"))]
3081    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3082    pub end_date_time: Option<heapless::String<MESSAGE_INFO_END_DATE_TIME_CAP>>,
3083    /// Unique id within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
3084    pub id: i64,
3085    pub message: MessageContent,
3086    #[cfg_attr(feature = "serde", serde(rename = "messageExtra"))]
3087    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3088    pub message_extra: Option<heapless::Vec<MessageContent, 4usize>>,
3089    pub priority: MessagePriorityEnum,
3090    /// From what date-time should this message be shown. If omitted: directly.
3091    #[cfg_attr(feature = "serde", serde(rename = "startDateTime"))]
3092    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3093    pub start_date_time: Option<heapless::String<MESSAGE_INFO_START_DATE_TIME_CAP>>,
3094    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3095    pub state: Option<MessageStateEnum>,
3096    /// During which transaction shall this message be shown.
3097    /// Message SHALL be removed by the Charging Station after transaction has
3098    /// ended.
3099    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
3100    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3101    pub transaction_id: Option<heapless::String<36usize>>,
3102}
3103/// EV AC charging parameters for ISO 15118-2
3104#[derive(Debug, Clone, PartialEq)]
3105#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3106pub struct ACChargingParameters {
3107    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3108    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3109    pub custom_data: Option<CustomData>,
3110    /// Amount of energy requested (in Wh). This includes energy required for preconditioning.
3111    /// Relates to: +
3112    /// *ISO 15118-2*: AC_EVChargeParameterType: EAmount +
3113    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVTargetEnergyRequest
3114    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
3115    pub energy_amount: f64,
3116    /// Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity.
3117    /// Relates to: +
3118    /// *ISO 15118-2*: AC_EVChargeParameterType: EVMaxCurrent
3119    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
3120    pub ev_max_current: f64,
3121    /// Maximum voltage supported by the electric vehicle.
3122    /// Relates to: +
3123    /// *ISO 15118-2*: AC_EVChargeParameterType: EVMaxVoltage
3124    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
3125    pub ev_max_voltage: f64,
3126    /// Minimum current (amps) supported by the electric vehicle (per phase).
3127    /// Relates to: +
3128    /// *ISO 15118-2*: AC_EVChargeParameterType: EVMinCurrent
3129    #[cfg_attr(feature = "serde", serde(rename = "evMinCurrent"))]
3130    pub ev_min_current: f64,
3131}
3132/// *(2.1)* Indicates whether EV wants to operate in Dynamic or Scheduled mode. When absent, Scheduled mode is assumed for backwards compatibility. +
3133/// *ISO 15118-20:* +
3134/// ServiceSelectionReq(SelectedEnergyTransferService)
3135#[derive(Debug, Clone, PartialEq, Eq)]
3136#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3137pub enum ControlModeEnum {
3138    ScheduledControl,
3139    DynamicControl,
3140}
3141/// EV DC charging parameters for ISO 15118-2
3142#[derive(Debug, Clone, PartialEq)]
3143#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3144pub struct DCChargingParameters {
3145    /// Percentage of SoC at which the EV considers a fast charging process to end. (possible values: 0 - 100)
3146    /// Relates to: +
3147    /// *ISO 15118-2*: DC_EVChargeParameterType: BulkSOC
3148    #[cfg_attr(feature = "serde", serde(rename = "bulkSoC"))]
3149    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3150    pub bulk_so_c: Option<i64>,
3151    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3152    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3153    pub custom_data: Option<CustomData>,
3154    /// Amount of energy requested (in Wh). This inludes energy required for preconditioning.
3155    /// Relates to: +
3156    /// *ISO 15118-2*: DC_EVChargeParameterType: EVEnergyRequest
3157    #[cfg_attr(feature = "serde", serde(rename = "energyAmount"))]
3158    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3159    pub energy_amount: Option<f64>,
3160    /// Capacity of the electric vehicle battery (in Wh).
3161    /// Relates to: +
3162    /// *ISO 15118-2*: DC_EVChargeParameterType: EVEnergyCapacity
3163    #[cfg_attr(feature = "serde", serde(rename = "evEnergyCapacity"))]
3164    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3165    pub ev_energy_capacity: Option<f64>,
3166    /// Maximum current (in A) supported by the electric vehicle. Includes cable capacity.
3167    /// Relates to: +
3168    /// *ISO 15118-2*: DC_EVChargeParameterType:EVMaximumCurrentLimit
3169    #[cfg_attr(feature = "serde", serde(rename = "evMaxCurrent"))]
3170    pub ev_max_current: f64,
3171    /// Maximum power (in W) supported by the electric vehicle. Required for DC charging.
3172    /// Relates to: +
3173    /// *ISO 15118-2*: DC_EVChargeParameterType: EVMaximumPowerLimit
3174    #[cfg_attr(feature = "serde", serde(rename = "evMaxPower"))]
3175    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3176    pub ev_max_power: Option<f64>,
3177    /// Maximum voltage supported by the electric vehicle.
3178    /// Relates to: +
3179    /// *ISO 15118-2*: DC_EVChargeParameterType: EVMaximumVoltageLimit
3180    #[cfg_attr(feature = "serde", serde(rename = "evMaxVoltage"))]
3181    pub ev_max_voltage: f64,
3182    /// Percentage of SoC at which the EV considers the battery fully charged. (possible values: 0 - 100)
3183    /// Relates to: +
3184    /// *ISO 15118-2*: DC_EVChargeParameterType: FullSOC
3185    #[cfg_attr(feature = "serde", serde(rename = "fullSoC"))]
3186    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3187    pub full_so_c: Option<i64>,
3188    /// Energy available in the battery (in percent of the battery capacity)
3189    /// Relates to: +
3190    /// *ISO 15118-2*: DC_EVChargeParameterType: DC_EVStatus: EVRESSSOC
3191    #[cfg_attr(feature = "serde", serde(rename = "stateOfCharge"))]
3192    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3193    pub state_of_charge: Option<i64>,
3194}
3195#[derive(Debug, Clone, PartialEq, Eq)]
3196#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3197pub enum IslandingDetectionEnum {
3198    NoAntiIslandingSupport,
3199    RoCoF,
3200    #[cfg_attr(feature = "serde", serde(rename = "UVP_OVP"))]
3201    UVPOVP,
3202    #[cfg_attr(feature = "serde", serde(rename = "UFP_OFP"))]
3203    UFPOFP,
3204    VoltageVectorShift,
3205    ZeroCrossingDetection,
3206    OtherPassive,
3207    ImpedanceMeasurement,
3208    ImpedanceAtFrequency,
3209    SlipModeFrequencyShift,
3210    SandiaFrequencyShift,
3211    SandiaVoltageShift,
3212    FrequencyJump,
3213    RCLQFactor,
3214    OtherActive,
3215}
3216#[cfg(feature = "alloc")]
3217/// *(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.
3218///
3219/// Fields starting with "ev" contain values from the EV.
3220/// Other fields contain a value that is supported by both EV and EVSE.
3221///
3222/// DERChargingParametersType type is only relevant in case of an ISO 15118-20 AC_BPT_DER/AC_DER charging session.
3223///
3224/// NOTE: All these fields have values greater or equal to zero (i.e. are non-negative)
3225#[derive(Debug, Clone, PartialEq)]
3226#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3227pub struct DERChargingParameters {
3228    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3229    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3230    pub custom_data: Option<CustomData>,
3231    /// Maximum allowed duration of DC injection at level 1 charging. +
3232    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel1DCInjection
3233    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel1DCInjection"))]
3234    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3235    pub ev_duration_level1_d_c_injection: Option<f64>,
3236    /// Maximum allowed duration of DC injection at level 2 charging. +
3237    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel2DCInjection
3238    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel2DCInjection"))]
3239    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3240    pub ev_duration_level2_d_c_injection: Option<f64>,
3241    /// Hardware version of EV inverter. +
3242    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterHwVersion
3243    #[cfg_attr(feature = "serde", serde(rename = "evInverterHwVersion"))]
3244    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3245    pub ev_inverter_hw_version: Option<heapless::String<50usize>>,
3246    /// Manufacturer of the EV inverter. +
3247    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterManufacturer
3248    #[cfg_attr(feature = "serde", serde(rename = "evInverterManufacturer"))]
3249    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3250    pub ev_inverter_manufacturer: Option<heapless::String<50usize>>,
3251    /// Model name of the EV inverter. +
3252    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterModel
3253    #[cfg_attr(feature = "serde", serde(rename = "evInverterModel"))]
3254    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3255    pub ev_inverter_model: Option<heapless::String<50usize>>,
3256    /// Serial number of the EV inverter. +
3257    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSerialNumber
3258    #[cfg_attr(feature = "serde", serde(rename = "evInverterSerialNumber"))]
3259    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3260    pub ev_inverter_serial_number: Option<heapless::String<50usize>>,
3261    /// Software version of EV inverter. +
3262    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSwVersion
3263    #[cfg_attr(feature = "serde", serde(rename = "evInverterSwVersion"))]
3264    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3265    pub ev_inverter_sw_version: Option<heapless::String<50usize>>,
3266    /// Type of islanding detection method. Only mandatory when islanding detection is required at the site, as set in the ISO 15118 Service Details configuration. +
3267    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingDetectionMethod
3268    #[cfg_attr(feature = "serde", serde(rename = "evIslandingDetectionMethod"))]
3269    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3270    pub ev_islanding_detection_method: Option<alloc::vec::Vec<IslandingDetectionEnum>>,
3271    /// Time after which EV will trip if an island has been detected. +
3272    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingTripTime
3273    #[cfg_attr(feature = "serde", serde(rename = "evIslandingTripTime"))]
3274    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3275    pub ev_islanding_trip_time: Option<f64>,
3276    /// Maximum injected DC current allowed at level 1 charging. +
3277    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel1DCInjection
3278    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel1DCInjection"))]
3279    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3280    pub ev_maximum_level1_d_c_injection: Option<f64>,
3281    /// Maximum injected DC current allowed at level 2 charging. +
3282    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel2DCInjection
3283    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel2DCInjection"))]
3284    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3285    pub ev_maximum_level2_d_c_injection: Option<f64>,
3286    /// Rated maximum injected active power by EV, at specified over-excited power factor (overExcitedPowerFactor). +
3287    /// 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. +
3288    /// Corresponds to the WOvPF attribute in IEC 61850. +
3289    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedMaximumDischargePower
3290    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedMaxDischargePower"))]
3291    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3292    pub ev_over_excited_max_discharge_power: Option<f64>,
3293    /// EV power factor when injecting (over excited) the minimum reactive power. +
3294    /// Corresponds to the OvPF attribute in IEC 61850. +
3295    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedPowerFactor
3296    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedPowerFactor"))]
3297    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3298    pub ev_over_excited_power_factor: Option<f64>,
3299    /// Measure of the susceptibility of the circuit to reactance, in Siemens (S). +
3300    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVReactiveSusceptance
3301    #[cfg_attr(feature = "serde", serde(rename = "evReactiveSusceptance"))]
3302    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3303    pub ev_reactive_susceptance: Option<f64>,
3304    /// 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.
3305    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVSessionTotalDischargeEnergyAvailable
3306    #[cfg_attr(
3307        feature = "serde",
3308        serde(rename = "evSessionTotalDischargeEnergyAvailable")
3309    )]
3310    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3311    pub ev_session_total_discharge_energy_available: Option<f64>,
3312    /// DER control functions supported by EV. +
3313    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType:DERControlFunctions (bitmap)
3314    #[cfg_attr(feature = "serde", serde(rename = "evSupportedDERControl"))]
3315    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3316    pub ev_supported_d_e_r_control: Option<alloc::vec::Vec<DERControlEnum>>,
3317    /// Rated maximum injected active power by EV supported at specified under-excited power factor (EVUnderExcitedPowerFactor). +
3318    /// It can also be defined as the rated maximum dischargePower at the rated minimum absorbed reactive power value.
3319    /// 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. +
3320    /// This corresponds to the WUnPF attribute in the IEC 61850. +
3321    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedMaximumDischargePower
3322    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedMaxDischargePower"))]
3323    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3324    pub ev_under_excited_max_discharge_power: Option<f64>,
3325    /// EV power factor when injecting (under excited) the minimum reactive power. +
3326    /// Corresponds to the OvPF attribute in IEC 61850. +
3327    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedPowerFactor
3328    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedPowerFactor"))]
3329    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3330    pub ev_under_excited_power_factor: Option<f64>,
3331    /// Rated maximum total apparent power, defined by min(EV, EVSE) in va.
3332    /// Corresponds to the VAMaxRtg in IEC 61850. +
3333    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumApparentPower
3334    #[cfg_attr(feature = "serde", serde(rename = "maxApparentPower"))]
3335    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3336    pub max_apparent_power: Option<f64>,
3337    /// Rated maximum absorbed apparent power, defined by min(EV, EVSE) in va. +
3338    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3339    ///     in which case this field represents phase L1. +
3340    ///     Corresponds to the ChaVAMaxRtg in IEC 61850. +
3341    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower
3342    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower"))]
3343    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3344    pub max_charge_apparent_power: Option<f64>,
3345    /// Rated maximum absorbed apparent power on phase L2, defined by min(EV, EVSE) in va.
3346    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3347    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L2
3348    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L2"))]
3349    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3350    pub max_charge_apparent_power_l2: Option<f64>,
3351    /// Rated maximum absorbed apparent power on phase L3, defined by min(EV, EVSE) in va.
3352    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3353    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L3
3354    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L3"))]
3355    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3356    pub max_charge_apparent_power_l3: Option<f64>,
3357    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars. +
3358    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3359    ///     in which case this field represents phase L1. +
3360    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3361    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower
3362    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower"))]
3363    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3364    pub max_charge_reactive_power: Option<f64>,
3365    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3366    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3367    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L2
3368    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L2"))]
3369    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3370    pub max_charge_reactive_power_l2: Option<f64>,
3371    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3372    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3373    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L3
3374    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L3"))]
3375    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3376    pub max_charge_reactive_power_l3: Option<f64>,
3377    /// Rated maximum injected apparent power, defined by min(EV, EVSE) in va. +
3378    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3379    ///     in which case this field represents phase L1. +
3380    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3381    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower
3382    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower"))]
3383    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3384    pub max_discharge_apparent_power: Option<f64>,
3385    /// Rated maximum injected apparent power on phase L2, defined by min(EV, EVSE) in va. +
3386    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3387    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L2
3388    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L2"))]
3389    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3390    pub max_discharge_apparent_power_l2: Option<f64>,
3391    /// Rated maximum injected apparent power on phase L3, defined by min(EV, EVSE) in va. +
3392    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3393    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L3
3394    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L3"))]
3395    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3396    pub max_discharge_apparent_power_l3: Option<f64>,
3397    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars. +
3398    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3399    ///     in which case this field represents phase L1. +
3400    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3401    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower
3402    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower"))]
3403    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3404    pub max_discharge_reactive_power: Option<f64>,
3405    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3406    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3407    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L2
3408    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L2"))]
3409    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3410    pub max_discharge_reactive_power_l2: Option<f64>,
3411    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3412    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3413    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L3
3414    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L3"))]
3415    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3416    pub max_discharge_reactive_power_l3: Option<f64>,
3417    /// Maximum AC rms voltage, as defined by min(EV, EVSE)  to operate with. +
3418    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumNominalVoltage
3419    #[cfg_attr(feature = "serde", serde(rename = "maxNominalVoltage"))]
3420    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3421    pub max_nominal_voltage: Option<f64>,
3422    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars. +
3423    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3424    ///     in which case this field represents phase L1. +
3425    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower
3426    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower"))]
3427    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3428    pub min_charge_reactive_power: Option<f64>,
3429    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L2. +
3430    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L2
3431    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L2"))]
3432    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3433    pub min_charge_reactive_power_l2: Option<f64>,
3434    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L3. +
3435    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L3
3436    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L3"))]
3437    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3438    pub min_charge_reactive_power_l3: Option<f64>,
3439    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in vars. +
3440    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3441    ///     in which case this field represents phase L1. +
3442    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower
3443    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower"))]
3444    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3445    pub min_discharge_reactive_power: Option<f64>,
3446    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L2. +
3447    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L2
3448    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L2"))]
3449    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3450    pub min_discharge_reactive_power_l2: Option<f64>,
3451    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L3. +
3452    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L3
3453    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L3"))]
3454    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3455    pub min_discharge_reactive_power_l3: Option<f64>,
3456    /// Minimum AC rms voltage, as defined by max(EV, EVSE)  to operate with. +
3457    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumNominalVoltage
3458    #[cfg_attr(feature = "serde", serde(rename = "minNominalVoltage"))]
3459    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3460    pub min_nominal_voltage: Option<f64>,
3461    /// Line voltage supported by EVSE and EV.
3462    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltage
3463    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltage"))]
3464    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3465    pub nominal_voltage: Option<f64>,
3466    /// The nominal AC voltage (rms) offset between the Charging Station's electrical connection point and the utility’s point of common coupling. +
3467    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltageOffset
3468    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltageOffset"))]
3469    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3470    pub nominal_voltage_offset: Option<f64>,
3471}
3472#[cfg(not(feature = "alloc"))]
3473/// *(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.
3474///
3475/// Fields starting with "ev" contain values from the EV.
3476/// Other fields contain a value that is supported by both EV and EVSE.
3477///
3478/// DERChargingParametersType type is only relevant in case of an ISO 15118-20 AC_BPT_DER/AC_DER charging session.
3479///
3480/// NOTE: All these fields have values greater or equal to zero (i.e. are non-negative)
3481#[derive(Debug, Clone, PartialEq)]
3482#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3483pub struct DERChargingParameters<
3484    const D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP: usize = 16usize,
3485    const D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP: usize = 16usize,
3486> {
3487    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3488    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3489    pub custom_data: Option<CustomData>,
3490    /// Maximum allowed duration of DC injection at level 1 charging. +
3491    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel1DCInjection
3492    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel1DCInjection"))]
3493    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3494    pub ev_duration_level1_d_c_injection: Option<f64>,
3495    /// Maximum allowed duration of DC injection at level 2 charging. +
3496    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVDurationLevel2DCInjection
3497    #[cfg_attr(feature = "serde", serde(rename = "evDurationLevel2DCInjection"))]
3498    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3499    pub ev_duration_level2_d_c_injection: Option<f64>,
3500    /// Hardware version of EV inverter. +
3501    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterHwVersion
3502    #[cfg_attr(feature = "serde", serde(rename = "evInverterHwVersion"))]
3503    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3504    pub ev_inverter_hw_version: Option<heapless::String<50usize>>,
3505    /// Manufacturer of the EV inverter. +
3506    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterManufacturer
3507    #[cfg_attr(feature = "serde", serde(rename = "evInverterManufacturer"))]
3508    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3509    pub ev_inverter_manufacturer: Option<heapless::String<50usize>>,
3510    /// Model name of the EV inverter. +
3511    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterModel
3512    #[cfg_attr(feature = "serde", serde(rename = "evInverterModel"))]
3513    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3514    pub ev_inverter_model: Option<heapless::String<50usize>>,
3515    /// Serial number of the EV inverter. +
3516    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSerialNumber
3517    #[cfg_attr(feature = "serde", serde(rename = "evInverterSerialNumber"))]
3518    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3519    pub ev_inverter_serial_number: Option<heapless::String<50usize>>,
3520    /// Software version of EV inverter. +
3521    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVInverterSwVersion
3522    #[cfg_attr(feature = "serde", serde(rename = "evInverterSwVersion"))]
3523    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3524    pub ev_inverter_sw_version: Option<heapless::String<50usize>>,
3525    /// Type of islanding detection method. Only mandatory when islanding detection is required at the site, as set in the ISO 15118 Service Details configuration. +
3526    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingDetectionMethod
3527    #[cfg_attr(feature = "serde", serde(rename = "evIslandingDetectionMethod"))]
3528    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3529    pub ev_islanding_detection_method: Option<
3530        heapless::Vec<
3531            IslandingDetectionEnum,
3532            D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP,
3533        >,
3534    >,
3535    /// Time after which EV will trip if an island has been detected. +
3536    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVIslandingTripTime
3537    #[cfg_attr(feature = "serde", serde(rename = "evIslandingTripTime"))]
3538    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3539    pub ev_islanding_trip_time: Option<f64>,
3540    /// Maximum injected DC current allowed at level 1 charging. +
3541    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel1DCInjection
3542    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel1DCInjection"))]
3543    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3544    pub ev_maximum_level1_d_c_injection: Option<f64>,
3545    /// Maximum injected DC current allowed at level 2 charging. +
3546    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumLevel2DCInjection
3547    #[cfg_attr(feature = "serde", serde(rename = "evMaximumLevel2DCInjection"))]
3548    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3549    pub ev_maximum_level2_d_c_injection: Option<f64>,
3550    /// Rated maximum injected active power by EV, at specified over-excited power factor (overExcitedPowerFactor). +
3551    /// 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. +
3552    /// Corresponds to the WOvPF attribute in IEC 61850. +
3553    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedMaximumDischargePower
3554    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedMaxDischargePower"))]
3555    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3556    pub ev_over_excited_max_discharge_power: Option<f64>,
3557    /// EV power factor when injecting (over excited) the minimum reactive power. +
3558    /// Corresponds to the OvPF attribute in IEC 61850. +
3559    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVOverExcitedPowerFactor
3560    #[cfg_attr(feature = "serde", serde(rename = "evOverExcitedPowerFactor"))]
3561    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3562    pub ev_over_excited_power_factor: Option<f64>,
3563    /// Measure of the susceptibility of the circuit to reactance, in Siemens (S). +
3564    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVReactiveSusceptance
3565    #[cfg_attr(feature = "serde", serde(rename = "evReactiveSusceptance"))]
3566    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3567    pub ev_reactive_susceptance: Option<f64>,
3568    /// 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.
3569    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVSessionTotalDischargeEnergyAvailable
3570    #[cfg_attr(
3571        feature = "serde",
3572        serde(rename = "evSessionTotalDischargeEnergyAvailable")
3573    )]
3574    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3575    pub ev_session_total_discharge_energy_available: Option<f64>,
3576    /// DER control functions supported by EV. +
3577    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType:DERControlFunctions (bitmap)
3578    #[cfg_attr(feature = "serde", serde(rename = "evSupportedDERControl"))]
3579    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3580    pub ev_supported_d_e_r_control: Option<
3581        heapless::Vec<
3582            DERControlEnum,
3583            D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP,
3584        >,
3585    >,
3586    /// Rated maximum injected active power by EV supported at specified under-excited power factor (EVUnderExcitedPowerFactor). +
3587    /// It can also be defined as the rated maximum dischargePower at the rated minimum absorbed reactive power value.
3588    /// 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. +
3589    /// This corresponds to the WUnPF attribute in the IEC 61850. +
3590    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedMaximumDischargePower
3591    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedMaxDischargePower"))]
3592    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3593    pub ev_under_excited_max_discharge_power: Option<f64>,
3594    /// EV power factor when injecting (under excited) the minimum reactive power. +
3595    /// Corresponds to the OvPF attribute in IEC 61850. +
3596    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVUnderExcitedPowerFactor
3597    #[cfg_attr(feature = "serde", serde(rename = "evUnderExcitedPowerFactor"))]
3598    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3599    pub ev_under_excited_power_factor: Option<f64>,
3600    /// Rated maximum total apparent power, defined by min(EV, EVSE) in va.
3601    /// Corresponds to the VAMaxRtg in IEC 61850. +
3602    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumApparentPower
3603    #[cfg_attr(feature = "serde", serde(rename = "maxApparentPower"))]
3604    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3605    pub max_apparent_power: Option<f64>,
3606    /// Rated maximum absorbed apparent power, defined by min(EV, EVSE) in va. +
3607    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3608    ///     in which case this field represents phase L1. +
3609    ///     Corresponds to the ChaVAMaxRtg in IEC 61850. +
3610    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower
3611    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower"))]
3612    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3613    pub max_charge_apparent_power: Option<f64>,
3614    /// Rated maximum absorbed apparent power on phase L2, defined by min(EV, EVSE) in va.
3615    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3616    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L2
3617    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L2"))]
3618    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3619    pub max_charge_apparent_power_l2: Option<f64>,
3620    /// Rated maximum absorbed apparent power on phase L3, defined by min(EV, EVSE) in va.
3621    /// Corresponds to the ChaVAMaxRtg in IEC 61850. +
3622    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeApparentPower_L3
3623    #[cfg_attr(feature = "serde", serde(rename = "maxChargeApparentPower_L3"))]
3624    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3625    pub max_charge_apparent_power_l3: Option<f64>,
3626    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars. +
3627    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3628    ///     in which case this field represents phase L1. +
3629    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3630    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower
3631    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower"))]
3632    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3633    pub max_charge_reactive_power: Option<f64>,
3634    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3635    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3636    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L2
3637    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L2"))]
3638    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3639    pub max_charge_reactive_power_l2: Option<f64>,
3640    /// Rated maximum absorbed reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3641    /// Corresponds to the AvarMax attribute in the IEC 61850. +
3642    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumChargeReactivePower_L3
3643    #[cfg_attr(feature = "serde", serde(rename = "maxChargeReactivePower_L3"))]
3644    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3645    pub max_charge_reactive_power_l3: Option<f64>,
3646    /// Rated maximum injected apparent power, defined by min(EV, EVSE) in va. +
3647    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3648    ///     in which case this field represents phase L1. +
3649    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3650    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower
3651    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower"))]
3652    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3653    pub max_discharge_apparent_power: Option<f64>,
3654    /// Rated maximum injected apparent power on phase L2, defined by min(EV, EVSE) in va. +
3655    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3656    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L2
3657    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L2"))]
3658    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3659    pub max_discharge_apparent_power_l2: Option<f64>,
3660    /// Rated maximum injected apparent power on phase L3, defined by min(EV, EVSE) in va. +
3661    ///     Corresponds to the DisVAMaxRtg in IEC 61850. +
3662    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeApparentPower_L3
3663    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeApparentPower_L3"))]
3664    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3665    pub max_discharge_apparent_power_l3: Option<f64>,
3666    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars. +
3667    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3668    ///     in which case this field represents phase L1. +
3669    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3670    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower
3671    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower"))]
3672    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3673    pub max_discharge_reactive_power: Option<f64>,
3674    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L2. +
3675    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3676    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L2
3677    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L2"))]
3678    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3679    pub max_discharge_reactive_power_l2: Option<f64>,
3680    /// Rated maximum injected reactive power, defined by min(EV, EVSE), in vars on phase L3. +
3681    /// Corresponds to the IvarMax attribute in the IEC 61850. +
3682    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumDischargeReactivePower_L3
3683    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeReactivePower_L3"))]
3684    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3685    pub max_discharge_reactive_power_l3: Option<f64>,
3686    /// Maximum AC rms voltage, as defined by min(EV, EVSE)  to operate with. +
3687    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMaximumNominalVoltage
3688    #[cfg_attr(feature = "serde", serde(rename = "maxNominalVoltage"))]
3689    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3690    pub max_nominal_voltage: Option<f64>,
3691    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars. +
3692    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3693    ///     in which case this field represents phase L1. +
3694    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower
3695    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower"))]
3696    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3697    pub min_charge_reactive_power: Option<f64>,
3698    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L2. +
3699    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L2
3700    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L2"))]
3701    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3702    pub min_charge_reactive_power_l2: Option<f64>,
3703    /// Rated minimum absorbed reactive power, defined by max(EV, EVSE), in vars on phase L3. +
3704    ///     *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumChargeReactivePower_L3
3705    #[cfg_attr(feature = "serde", serde(rename = "minChargeReactivePower_L3"))]
3706    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3707    pub min_charge_reactive_power_l3: Option<f64>,
3708    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in vars. +
3709    ///     This field represents the sum of all phases, unless values are provided for L2 and L3,
3710    ///     in which case this field represents phase L1. +
3711    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower
3712    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower"))]
3713    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3714    pub min_discharge_reactive_power: Option<f64>,
3715    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L2. +
3716    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L2
3717    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L2"))]
3718    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3719    pub min_discharge_reactive_power_l2: Option<f64>,
3720    /// Rated minimum injected reactive power, defined by max(EV, EVSE), in var on phase L3. +
3721    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumDischargeReactivePower_L3
3722    #[cfg_attr(feature = "serde", serde(rename = "minDischargeReactivePower_L3"))]
3723    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3724    pub min_discharge_reactive_power_l3: Option<f64>,
3725    /// Minimum AC rms voltage, as defined by max(EV, EVSE)  to operate with. +
3726    ///        *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVMinimumNominalVoltage
3727    #[cfg_attr(feature = "serde", serde(rename = "minNominalVoltage"))]
3728    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3729    pub min_nominal_voltage: Option<f64>,
3730    /// Line voltage supported by EVSE and EV.
3731    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltage
3732    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltage"))]
3733    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3734    pub nominal_voltage: Option<f64>,
3735    /// The nominal AC voltage (rms) offset between the Charging Station's electrical connection point and the utility’s point of common coupling. +
3736    ///         *ISO 15118-20*: DER_BPT_AC_CPDReqEnergyTransferModeType: EVNominalVoltageOffset
3737    #[cfg_attr(feature = "serde", serde(rename = "nominalVoltageOffset"))]
3738    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3739    pub nominal_voltage_offset: Option<f64>,
3740}
3741/// *(2.1)* An entry in price schedule over time for which EV is willing to discharge.
3742#[derive(Debug, Clone, PartialEq)]
3743#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3744pub struct EVPriceRule {
3745    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3746    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3747    pub custom_data: Option<CustomData>,
3748    /// Cost per kWh.
3749    #[cfg_attr(feature = "serde", serde(rename = "energyFee"))]
3750    pub energy_fee: f64,
3751    /// 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.
3752    #[cfg_attr(feature = "serde", serde(rename = "powerRangeStart"))]
3753    pub power_range_start: f64,
3754}
3755/// *(2.1)* An entry in price schedule over time for which EV is willing to discharge.
3756#[derive(Debug, Clone, PartialEq)]
3757#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3758pub struct EVAbsolutePriceScheduleEntry {
3759    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3760    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3761    pub custom_data: Option<CustomData>,
3762    /// The amount of seconds of this entry.
3763    pub duration: i64,
3764    #[cfg_attr(feature = "serde", serde(rename = "evPriceRule"))]
3765    pub ev_price_rule: heapless::Vec<EVPriceRule, 8usize>,
3766}
3767#[cfg(feature = "alloc")]
3768/// *(2.1)* Price schedule of EV energy offer.
3769#[derive(Debug, Clone, PartialEq)]
3770#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3771pub struct EVAbsolutePriceSchedule {
3772    /// Currency code according to ISO 4217.
3773    pub currency: heapless::String<3usize>,
3774    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3775    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3776    pub custom_data: Option<CustomData>,
3777    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceScheduleEntries"))]
3778    pub ev_absolute_price_schedule_entries: alloc::vec::Vec<
3779        EVAbsolutePriceScheduleEntry,
3780    >,
3781    /// ISO 15118-20 URN of price algorithm: Power, PeakPower, StackedEnergy.
3782    #[cfg_attr(feature = "serde", serde(rename = "priceAlgorithm"))]
3783    pub price_algorithm: heapless::String<2000usize>,
3784    /// Starting point in time of the EVEnergyOffer.
3785    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3786    pub time_anchor: alloc::string::String,
3787}
3788#[cfg(not(feature = "alloc"))]
3789/// *(2.1)* Price schedule of EV energy offer.
3790#[derive(Debug, Clone, PartialEq)]
3791#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3792pub struct EVAbsolutePriceSchedule<
3793    const E_V_ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
3794> {
3795    /// Currency code according to ISO 4217.
3796    pub currency: heapless::String<3usize>,
3797    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3798    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3799    pub custom_data: Option<CustomData>,
3800    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceScheduleEntries"))]
3801    pub ev_absolute_price_schedule_entries: heapless::Vec<
3802        EVAbsolutePriceScheduleEntry,
3803        1024usize,
3804    >,
3805    /// ISO 15118-20 URN of price algorithm: Power, PeakPower, StackedEnergy.
3806    #[cfg_attr(feature = "serde", serde(rename = "priceAlgorithm"))]
3807    pub price_algorithm: heapless::String<2000usize>,
3808    /// Starting point in time of the EVEnergyOffer.
3809    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3810    pub time_anchor: heapless::String<E_V_ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP>,
3811}
3812/// *(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.
3813#[derive(Debug, Clone, PartialEq)]
3814#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3815pub struct EVPowerScheduleEntry {
3816    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3817    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3818    pub custom_data: Option<CustomData>,
3819    /// The duration of this entry.
3820    pub duration: i64,
3821    /// 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.
3822    pub power: f64,
3823}
3824#[cfg(feature = "alloc")]
3825/// *(2.1)* Schedule of EV energy offer.
3826#[derive(Debug, Clone, PartialEq)]
3827#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3828pub struct EVPowerSchedule {
3829    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3830    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3831    pub custom_data: Option<CustomData>,
3832    #[cfg_attr(feature = "serde", serde(rename = "evPowerScheduleEntries"))]
3833    pub ev_power_schedule_entries: alloc::vec::Vec<EVPowerScheduleEntry>,
3834    /// The time that defines the starting point for the EVEnergyOffer.
3835    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3836    pub time_anchor: alloc::string::String,
3837}
3838#[cfg(not(feature = "alloc"))]
3839/// *(2.1)* Schedule of EV energy offer.
3840#[derive(Debug, Clone, PartialEq)]
3841#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3842pub struct EVPowerSchedule<const E_V_POWER_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize> {
3843    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3844    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3845    pub custom_data: Option<CustomData>,
3846    #[cfg_attr(feature = "serde", serde(rename = "evPowerScheduleEntries"))]
3847    pub ev_power_schedule_entries: heapless::Vec<EVPowerScheduleEntry, 1024usize>,
3848    /// The time that defines the starting point for the EVEnergyOffer.
3849    #[cfg_attr(feature = "serde", serde(rename = "timeAnchor"))]
3850    pub time_anchor: heapless::String<E_V_POWER_SCHEDULE_TIME_ANCHOR_CAP>,
3851}
3852#[cfg(feature = "alloc")]
3853/// *(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.
3854#[derive(Debug, Clone, PartialEq)]
3855#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3856pub struct EVEnergyOffer {
3857    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3858    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3859    pub custom_data: Option<CustomData>,
3860    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceSchedule"))]
3861    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3862    pub ev_absolute_price_schedule: Option<EVAbsolutePriceSchedule>,
3863    #[cfg_attr(feature = "serde", serde(rename = "evPowerSchedule"))]
3864    pub ev_power_schedule: EVPowerSchedule,
3865}
3866#[cfg(not(feature = "alloc"))]
3867/// *(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.
3868#[derive(Debug, Clone, PartialEq)]
3869#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3870pub struct EVEnergyOffer<
3871    const E_V_ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
3872    const E_V_POWER_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
3873> {
3874    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3875    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3876    pub custom_data: Option<CustomData>,
3877    #[cfg_attr(feature = "serde", serde(rename = "evAbsolutePriceSchedule"))]
3878    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3879    pub ev_absolute_price_schedule: Option<
3880        EVAbsolutePriceSchedule<E_V_ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP>,
3881    >,
3882    #[cfg_attr(feature = "serde", serde(rename = "evPowerSchedule"))]
3883    pub ev_power_schedule: EVPowerSchedule<E_V_POWER_SCHEDULE_TIME_ANCHOR_CAP>,
3884}
3885/// *(2.1)* Value of EVCC indicates that EV determines min/target SOC and departure time. +
3886/// A value of EVCC_SECC indicates that charging station or CSMS may also update min/target SOC and departure time. +
3887/// *ISO 15118-20:* +
3888/// ServiceSelectionReq(SelectedEnergyTransferService)
3889#[derive(Debug, Clone, PartialEq, Eq)]
3890#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3891pub enum MobilityNeedsModeEnum {
3892    EVCC,
3893    #[cfg_attr(feature = "serde", serde(rename = "EVCC_SECC"))]
3894    EVCCSECC,
3895}
3896/// Charging parameters for ISO 15118-20, also supporting V2X charging/discharging.+
3897/// All values are greater or equal to zero, with the exception of EVMinEnergyRequest, EVMaxEnergyRequest, EVTargetEnergyRequest, EVMinV2XEnergyRequest and EVMaxV2XEnergyRequest.
3898#[derive(Debug, Clone, PartialEq)]
3899#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3900pub struct V2XChargingParameters {
3901    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
3902    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3903    pub custom_data: Option<CustomData>,
3904    /// Energy to maximum state of charge in Wh
3905    /// Relates to:
3906    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVMaximumEnergyRequest
3907    #[cfg_attr(feature = "serde", serde(rename = "evMaxEnergyRequest"))]
3908    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3909    pub ev_max_energy_request: Option<f64>,
3910    /// Energy (in Wh) to maximum state of charge for cycling (V2X) activity.
3911    /// Negative value indicates that current state of charge is above V2X range.
3912    /// Relates to:
3913    /// *ISO 15118-20*: Dynamic_SEReqControlModeType: EVMaximumV2XEnergyRequest
3914    #[cfg_attr(feature = "serde", serde(rename = "evMaxV2XEnergyRequest"))]
3915    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3916    pub ev_max_v2_x_energy_request: Option<f64>,
3917    /// Energy to minimum allowed state of charge in Wh
3918    /// Relates to:
3919    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVMinimumEnergyRequest
3920    #[cfg_attr(feature = "serde", serde(rename = "evMinEnergyRequest"))]
3921    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3922    pub ev_min_energy_request: Option<f64>,
3923    /// Energy (in Wh) to minimum state of charge for cycling (V2X) activity.
3924    /// Positive value means that current state of charge is below V2X range.
3925    /// Relates to:
3926    /// *ISO 15118-20*: Dynamic_SEReqControlModeType: EVMinimumV2XEnergyRequest
3927    #[cfg_attr(feature = "serde", serde(rename = "evMinV2XEnergyRequest"))]
3928    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3929    pub ev_min_v2_x_energy_request: Option<f64>,
3930    /// Energy to requested state of charge in Wh
3931    /// Relates to:
3932    /// *ISO 15118-20*: Dynamic/Scheduled_SEReqControlModeType: EVTargetEnergyRequest
3933    #[cfg_attr(feature = "serde", serde(rename = "evTargetEnergyRequest"))]
3934    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3935    pub ev_target_energy_request: Option<f64>,
3936    /// Maximum charge current in A, defined by min(EV, EVSE)
3937    /// Relates to:
3938    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMaximumChargeCurrent
3939    #[cfg_attr(feature = "serde", serde(rename = "maxChargeCurrent"))]
3940    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3941    pub max_charge_current: Option<f64>,
3942    /// Maximum charge (absorbed) power in W, defined by min(EV, EVSE) at unity power factor. +
3943    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
3944    /// It corresponds to the ChaWMax attribute in the IEC 61850.
3945    /// It is usually equivalent to the rated apparent power of the EV when discharging (ChaVAMax) in IEC 61850. +
3946    ///
3947    /// Relates to:
3948    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumChargePower
3949    #[cfg_attr(feature = "serde", serde(rename = "maxChargePower"))]
3950    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3951    pub max_charge_power: Option<f64>,
3952    /// Maximum charge power on phase L2 in W, defined by min(EV, EVSE)
3953    /// Relates to:
3954    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumChargePower_L2
3955    #[cfg_attr(feature = "serde", serde(rename = "maxChargePower_L2"))]
3956    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3957    pub max_charge_power_l2: Option<f64>,
3958    /// Maximum charge power on phase L3 in W, defined by min(EV, EVSE)
3959    /// Relates to:
3960    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumChargePower_L3
3961    #[cfg_attr(feature = "serde", serde(rename = "maxChargePower_L3"))]
3962    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3963    pub max_charge_power_l3: Option<f64>,
3964    /// Maximum discharge current in A, defined by min(EV, EVSE).  Value &gt;= 0.
3965    /// Relates to:
3966    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMaximumDischargeCurrent
3967    #[cfg_attr(feature = "serde", serde(rename = "maxDischargeCurrent"))]
3968    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3969    pub max_discharge_current: Option<f64>,
3970    /// Maximum discharge (injected) power in W, defined by min(EV, EVSE) at unity power factor.  Value &gt;= 0.
3971    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
3972    /// Relates to:
3973    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumDischargePower
3974    #[cfg_attr(feature = "serde", serde(rename = "maxDischargePower"))]
3975    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3976    pub max_discharge_power: Option<f64>,
3977    /// Maximum discharge power on phase L2 in W, defined by min(EV, EVSE).  Value &gt;= 0.
3978    /// Relates to:
3979    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumDischargePowe_L2
3980    #[cfg_attr(feature = "serde", serde(rename = "maxDischargePower_L2"))]
3981    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3982    pub max_discharge_power_l2: Option<f64>,
3983    /// Maximum discharge power on phase L3 in W, defined by min(EV, EVSE).  Value &gt;= 0.
3984    /// Relates to:
3985    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMaximumDischargePower_L3
3986    #[cfg_attr(feature = "serde", serde(rename = "maxDischargePower_L3"))]
3987    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3988    pub max_discharge_power_l3: Option<f64>,
3989    /// Maximum voltage in V, defined by min(EV, EVSE)
3990    /// Relates to:
3991    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMaximumVoltage
3992    #[cfg_attr(feature = "serde", serde(rename = "maxVoltage"))]
3993    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
3994    pub max_voltage: Option<f64>,
3995    /// Minimum charge current in A, defined by max(EV, EVSE)
3996    /// Relates to:
3997    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMinimumChargeCurrent
3998    #[cfg_attr(feature = "serde", serde(rename = "minChargeCurrent"))]
3999    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4000    pub min_charge_current: Option<f64>,
4001    /// Minimum charge power in W, defined by max(EV, EVSE).
4002    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4003    /// Relates to:
4004    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumChargePower
4005    #[cfg_attr(feature = "serde", serde(rename = "minChargePower"))]
4006    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4007    pub min_charge_power: Option<f64>,
4008    /// Minimum charge power on phase L2 in W, defined by max(EV, EVSE).
4009    /// Relates to:
4010    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumChargePower_L2
4011    #[cfg_attr(feature = "serde", serde(rename = "minChargePower_L2"))]
4012    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4013    pub min_charge_power_l2: Option<f64>,
4014    /// Minimum charge power on phase L3 in W, defined by max(EV, EVSE).
4015    /// Relates to:
4016    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumChargePower_L3
4017    #[cfg_attr(feature = "serde", serde(rename = "minChargePower_L3"))]
4018    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4019    pub min_charge_power_l3: Option<f64>,
4020    /// Minimum discharge current in A, defined by max(EV, EVSE).  Value &gt;= 0.
4021    /// Relates to:
4022    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMinimumDischargeCurrent
4023    #[cfg_attr(feature = "serde", serde(rename = "minDischargeCurrent"))]
4024    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4025    pub min_discharge_current: Option<f64>,
4026    /// Minimum discharge (injected) power in W, defined by max(EV, EVSE) at unity power factor. Value &gt;= 0. +
4027    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1. +
4028    /// It corresponds to the WMax attribute in the IEC 61850.
4029    /// It is usually equivalent to the rated apparent power of the EV when discharging (VAMax attribute in the IEC 61850).
4030    ///
4031    /// Relates to:
4032    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumDischargePower
4033    #[cfg_attr(feature = "serde", serde(rename = "minDischargePower"))]
4034    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4035    pub min_discharge_power: Option<f64>,
4036    /// Minimum discharge power on phase L2 in W, defined by max(EV, EVSE).  Value &gt;= 0.
4037    /// Relates to:
4038    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumDischargePower_L2
4039    #[cfg_attr(feature = "serde", serde(rename = "minDischargePower_L2"))]
4040    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4041    pub min_discharge_power_l2: Option<f64>,
4042    /// Minimum discharge power on phase L3 in W, defined by max(EV, EVSE).  Value &gt;= 0.
4043    /// Relates to:
4044    /// *ISO 15118-20*: BPT_AC/DC_CPDReqEnergyTransferModeType: EVMinimumDischargePower_L3
4045    #[cfg_attr(feature = "serde", serde(rename = "minDischargePower_L3"))]
4046    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4047    pub min_discharge_power_l3: Option<f64>,
4048    /// Minimum voltage in V, defined by max(EV, EVSE)
4049    /// Relates to:
4050    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: EVMinimumVoltage
4051    #[cfg_attr(feature = "serde", serde(rename = "minVoltage"))]
4052    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4053    pub min_voltage: Option<f64>,
4054    /// Target state of charge at departure as percentage.
4055    /// Relates to:
4056    /// *ISO 15118-20*: BPT_DC_CPDReqEnergyTransferModeType: TargetSOC
4057    #[cfg_attr(feature = "serde", serde(rename = "targetSoC"))]
4058    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4059    pub target_so_c: Option<i64>,
4060}
4061#[cfg(feature = "alloc")]
4062#[derive(Debug, Clone, PartialEq)]
4063#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4064pub struct ChargingNeeds {
4065    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
4066    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4067    pub ac_charging_parameters: Option<ACChargingParameters>,
4068    /// *(2.1)* Modes of energy transfer that are marked as available by EV.
4069    #[cfg_attr(feature = "serde", serde(rename = "availableEnergyTransfer"))]
4070    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4071    pub available_energy_transfer: Option<alloc::vec::Vec<EnergyTransferModeEnum>>,
4072    #[cfg_attr(feature = "serde", serde(rename = "controlMode"))]
4073    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4074    pub control_mode: Option<ControlModeEnum>,
4075    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4076    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4077    pub custom_data: Option<CustomData>,
4078    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
4079    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4080    pub dc_charging_parameters: Option<DCChargingParameters>,
4081    /// Estimated departure time of the EV. +
4082    /// *ISO 15118-2:* AC/DC_EVChargeParameterType: DepartureTime +
4083    /// *ISO 15118-20:* Dynamic/Scheduled_SEReqControlModeType: DepartureTIme
4084    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
4085    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4086    pub departure_time: Option<alloc::string::String>,
4087    #[cfg_attr(feature = "serde", serde(rename = "derChargingParameters"))]
4088    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4089    pub der_charging_parameters: Option<DERChargingParameters>,
4090    #[cfg_attr(feature = "serde", serde(rename = "evEnergyOffer"))]
4091    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4092    pub ev_energy_offer: Option<EVEnergyOffer>,
4093    #[cfg_attr(feature = "serde", serde(rename = "mobilityNeedsMode"))]
4094    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4095    pub mobility_needs_mode: Option<MobilityNeedsModeEnum>,
4096    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
4097    pub requested_energy_transfer: EnergyTransferModeEnum,
4098    #[cfg_attr(feature = "serde", serde(rename = "v2xChargingParameters"))]
4099    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4100    pub v2x_charging_parameters: Option<V2XChargingParameters>,
4101}
4102#[cfg(not(feature = "alloc"))]
4103#[derive(Debug, Clone, PartialEq)]
4104#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4105pub struct ChargingNeeds<
4106    const CHARGING_NEEDS_AVAILABLE_ENERGY_TRANSFER_CAP: usize = 16usize,
4107    const CHARGING_NEEDS_DEPARTURE_TIME_CAP: usize = 1024usize,
4108    const D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP: usize = 16usize,
4109    const D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP: usize = 16usize,
4110    const E_V_ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
4111    const E_V_POWER_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
4112> {
4113    #[cfg_attr(feature = "serde", serde(rename = "acChargingParameters"))]
4114    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4115    pub ac_charging_parameters: Option<ACChargingParameters>,
4116    /// *(2.1)* Modes of energy transfer that are marked as available by EV.
4117    #[cfg_attr(feature = "serde", serde(rename = "availableEnergyTransfer"))]
4118    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4119    pub available_energy_transfer: Option<
4120        heapless::Vec<
4121            EnergyTransferModeEnum,
4122            CHARGING_NEEDS_AVAILABLE_ENERGY_TRANSFER_CAP,
4123        >,
4124    >,
4125    #[cfg_attr(feature = "serde", serde(rename = "controlMode"))]
4126    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4127    pub control_mode: Option<ControlModeEnum>,
4128    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4129    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4130    pub custom_data: Option<CustomData>,
4131    #[cfg_attr(feature = "serde", serde(rename = "dcChargingParameters"))]
4132    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4133    pub dc_charging_parameters: Option<DCChargingParameters>,
4134    /// Estimated departure time of the EV. +
4135    /// *ISO 15118-2:* AC/DC_EVChargeParameterType: DepartureTime +
4136    /// *ISO 15118-20:* Dynamic/Scheduled_SEReqControlModeType: DepartureTIme
4137    #[cfg_attr(feature = "serde", serde(rename = "departureTime"))]
4138    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4139    pub departure_time: Option<heapless::String<CHARGING_NEEDS_DEPARTURE_TIME_CAP>>,
4140    #[cfg_attr(feature = "serde", serde(rename = "derChargingParameters"))]
4141    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4142    pub der_charging_parameters: Option<
4143        DERChargingParameters<
4144            D_E_R_CHARGING_PARAMETERS_EV_ISLANDING_DETECTION_METHOD_CAP,
4145            D_E_R_CHARGING_PARAMETERS_EV_SUPPORTED_D_E_R_CONTROL_CAP,
4146        >,
4147    >,
4148    #[cfg_attr(feature = "serde", serde(rename = "evEnergyOffer"))]
4149    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4150    pub ev_energy_offer: Option<
4151        EVEnergyOffer<
4152            E_V_ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP,
4153            E_V_POWER_SCHEDULE_TIME_ANCHOR_CAP,
4154        >,
4155    >,
4156    #[cfg_attr(feature = "serde", serde(rename = "mobilityNeedsMode"))]
4157    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4158    pub mobility_needs_mode: Option<MobilityNeedsModeEnum>,
4159    #[cfg_attr(feature = "serde", serde(rename = "requestedEnergyTransfer"))]
4160    pub requested_energy_transfer: EnergyTransferModeEnum,
4161    #[cfg_attr(feature = "serde", serde(rename = "v2xChargingParameters"))]
4162    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4163    pub v2x_charging_parameters: Option<V2XChargingParameters>,
4164}
4165/// 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.
4166#[derive(Debug, Clone, PartialEq, Eq)]
4167#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4168pub enum NotifyEVChargingNeedsStatusEnum {
4169    Accepted,
4170    Rejected,
4171    Processing,
4172    NoChargingProfile,
4173}
4174/// Specifies the event notification type of the message.
4175#[derive(Debug, Clone, PartialEq, Eq)]
4176#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4177pub enum EventNotificationEnum {
4178    HardWiredNotification,
4179    HardWiredMonitor,
4180    PreconfiguredMonitor,
4181    CustomMonitor,
4182}
4183/// Type of trigger for this event, e.g. exceeding a threshold value.
4184#[derive(Debug, Clone, PartialEq, Eq)]
4185#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4186pub enum EventTriggerEnum {
4187    Alerting,
4188    Delta,
4189    Periodic,
4190}
4191#[cfg(feature = "alloc")]
4192/// Class to report an event notification for a component-variable.
4193#[derive(Debug, Clone, PartialEq, Eq)]
4194#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4195pub struct EventData {
4196    /// Actual value (_attributeType_ Actual) of the variable.
4197    ///
4198    /// 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.
4199    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
4200    pub actual_value: heapless::String<2500usize>,
4201    /// Refers to the Id of an event that is considered to be the cause for this event.
4202    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4203    pub cause: Option<i64>,
4204    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
4205    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4206    pub cleared: Option<bool>,
4207    pub component: Component,
4208    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4209    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4210    pub custom_data: Option<CustomData>,
4211    /// Identifies the event. This field can be referred to as a cause by other events.
4212    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
4213    pub event_id: i64,
4214    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
4215    pub event_notification_type: EventNotificationEnum,
4216    /// *(2.1)* Severity associated with the monitor in _variableMonitoringId_ or with the hardwired notification.
4217    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4218    pub severity: Option<i64>,
4219    /// Technical (error) code as reported by component.
4220    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
4221    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4222    pub tech_code: Option<heapless::String<50usize>>,
4223    /// Technical detail information as reported by component.
4224    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
4225    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4226    pub tech_info: Option<heapless::String<500usize>>,
4227    /// Timestamp of the moment the report was generated.
4228    pub timestamp: alloc::string::String,
4229    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
4230    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4231    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4232    pub transaction_id: Option<heapless::String<36usize>>,
4233    pub trigger: EventTriggerEnum,
4234    pub variable: Variable,
4235    /// Identifies the VariableMonitoring which triggered the event.
4236    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
4237    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4238    pub variable_monitoring_id: Option<i64>,
4239}
4240#[cfg(not(feature = "alloc"))]
4241/// Class to report an event notification for a component-variable.
4242#[derive(Debug, Clone, PartialEq, Eq)]
4243#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4244pub struct EventData<const EVENT_DATA_TIMESTAMP_CAP: usize = 1024usize> {
4245    /// Actual value (_attributeType_ Actual) of the variable.
4246    ///
4247    /// 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.
4248    #[cfg_attr(feature = "serde", serde(rename = "actualValue"))]
4249    pub actual_value: heapless::String<2500usize>,
4250    /// Refers to the Id of an event that is considered to be the cause for this event.
4251    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4252    pub cause: Option<i64>,
4253    /// _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
4254    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4255    pub cleared: Option<bool>,
4256    pub component: Component,
4257    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4258    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4259    pub custom_data: Option<CustomData>,
4260    /// Identifies the event. This field can be referred to as a cause by other events.
4261    #[cfg_attr(feature = "serde", serde(rename = "eventId"))]
4262    pub event_id: i64,
4263    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
4264    pub event_notification_type: EventNotificationEnum,
4265    /// *(2.1)* Severity associated with the monitor in _variableMonitoringId_ or with the hardwired notification.
4266    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4267    pub severity: Option<i64>,
4268    /// Technical (error) code as reported by component.
4269    #[cfg_attr(feature = "serde", serde(rename = "techCode"))]
4270    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4271    pub tech_code: Option<heapless::String<50usize>>,
4272    /// Technical detail information as reported by component.
4273    #[cfg_attr(feature = "serde", serde(rename = "techInfo"))]
4274    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4275    pub tech_info: Option<heapless::String<500usize>>,
4276    /// Timestamp of the moment the report was generated.
4277    pub timestamp: heapless::String<EVENT_DATA_TIMESTAMP_CAP>,
4278    /// If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
4279    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4280    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4281    pub transaction_id: Option<heapless::String<36usize>>,
4282    pub trigger: EventTriggerEnum,
4283    pub variable: Variable,
4284    /// Identifies the VariableMonitoring which triggered the event.
4285    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoringId"))]
4286    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4287    pub variable_monitoring_id: Option<i64>,
4288}
4289/// The type of this monitor, e.g. a threshold, delta or periodic monitor.
4290#[derive(Debug, Clone, PartialEq, Eq)]
4291#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4292pub enum MonitorEnum {
4293    UpperThreshold,
4294    LowerThreshold,
4295    Delta,
4296    Periodic,
4297    PeriodicClockAligned,
4298    TargetDelta,
4299    TargetDeltaRelative,
4300}
4301/// A monitoring setting for a variable.
4302#[derive(Debug, Clone, PartialEq)]
4303#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4304pub struct VariableMonitoring {
4305    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4306    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4307    pub custom_data: Option<CustomData>,
4308    #[cfg_attr(feature = "serde", serde(rename = "eventNotificationType"))]
4309    pub event_notification_type: EventNotificationEnum,
4310    /// Identifies the monitor.
4311    pub id: i64,
4312    /// 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.
4313    ///
4314    /// The severity levels have the following meaning: +
4315    /// *0-Danger* +
4316    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
4317    /// *1-Hardware Failure* +
4318    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
4319    /// *2-System Failure* +
4320    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
4321    /// *3-Critical* +
4322    /// Indicates a critical error. Action is required. +
4323    /// *4-Error* +
4324    /// Indicates a non-urgent error. Action is required. +
4325    /// *5-Alert* +
4326    /// Indicates an alert event. Default severity for any type of monitoring event.  +
4327    /// *6-Warning* +
4328    /// Indicates a warning event. Action may be required. +
4329    /// *7-Notice* +
4330    /// Indicates an unusual event. No immediate action is required. +
4331    /// *8-Informational* +
4332    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
4333    /// *9-Debug* +
4334    /// Indicates information useful to developers for debugging, not useful during operations.
4335    pub severity: i64,
4336    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction.
4337    pub transaction: bool,
4338    pub r#type: MonitorEnum,
4339    /// Value for threshold or delta monitoring.
4340    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
4341    pub value: f64,
4342}
4343#[cfg(feature = "alloc")]
4344/// Class to hold parameters of SetVariableMonitoring request.
4345#[derive(Debug, Clone, PartialEq)]
4346#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4347pub struct MonitoringData {
4348    pub component: Component,
4349    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4350    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4351    pub custom_data: Option<CustomData>,
4352    pub variable: Variable,
4353    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
4354    pub variable_monitoring: alloc::vec::Vec<VariableMonitoring>,
4355}
4356#[cfg(not(feature = "alloc"))]
4357/// Class to hold parameters of SetVariableMonitoring request.
4358#[derive(Debug, Clone, PartialEq)]
4359#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4360pub struct MonitoringData<
4361    const MONITORING_DATA_VARIABLE_MONITORING_CAP: usize = 16usize,
4362> {
4363    pub component: Component,
4364    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4365    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4366    pub custom_data: Option<CustomData>,
4367    pub variable: Variable,
4368    #[cfg_attr(feature = "serde", serde(rename = "variableMonitoring"))]
4369    pub variable_monitoring: heapless::Vec<
4370        VariableMonitoring,
4371        MONITORING_DATA_VARIABLE_MONITORING_CAP,
4372    >,
4373}
4374#[derive(Debug, Clone, PartialEq)]
4375#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4376pub struct StreamDataElement {
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    /// Offset relative to _basetime_ of this message. _basetime_ + _t_ is timestamp of recorded value.
4381    pub t: f64,
4382    pub v: heapless::String<2500usize>,
4383}
4384/// Defines the mutability of this attribute. Default is ReadWrite when omitted.
4385#[derive(Debug, Clone, PartialEq, Eq)]
4386#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4387pub enum MutabilityEnum {
4388    ReadOnly,
4389    WriteOnly,
4390    ReadWrite,
4391}
4392/// Attribute data of a variable.
4393#[derive(Debug, Clone, PartialEq, Eq)]
4394#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4395pub struct VariableAttribute {
4396    /// If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
4397    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4398    pub constant: Option<bool>,
4399    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4400    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4401    pub custom_data: Option<CustomData>,
4402    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4403    pub mutability: Option<MutabilityEnum>,
4404    /// If true, value will be persistent across system reboots or power down. Default when omitted is false.
4405    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4406    pub persistent: Option<bool>,
4407    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4408    pub r#type: Option<AttributeEnum>,
4409    /// Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'.
4410    ///
4411    /// 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.
4412    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4413    pub value: Option<heapless::String<2500usize>>,
4414}
4415/// Data type of this variable.
4416#[derive(Debug, Clone, PartialEq, Eq)]
4417#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4418pub enum DataEnum {
4419    #[cfg_attr(feature = "serde", serde(rename = "string"))]
4420    String,
4421    #[cfg_attr(feature = "serde", serde(rename = "decimal"))]
4422    Decimal,
4423    #[cfg_attr(feature = "serde", serde(rename = "integer"))]
4424    Integer,
4425    #[cfg_attr(feature = "serde", serde(rename = "dateTime"))]
4426    DateTime,
4427    #[cfg_attr(feature = "serde", serde(rename = "boolean"))]
4428    Boolean,
4429    OptionList,
4430    SequenceList,
4431    MemberList,
4432}
4433/// Fixed read-only parameters of a variable.
4434#[derive(Debug, Clone, PartialEq)]
4435#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4436pub struct VariableCharacteristics {
4437    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4438    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4439    pub custom_data: Option<CustomData>,
4440    #[cfg_attr(feature = "serde", serde(rename = "dataType"))]
4441    pub data_type: DataEnum,
4442    /// *(2.1)* Maximum number of elements from _valuesList_ that are supported as _attributeValue_.
4443    #[cfg_attr(feature = "serde", serde(rename = "maxElements"))]
4444    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4445    pub max_elements: Option<i64>,
4446    /// 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.
4447    #[cfg_attr(feature = "serde", serde(rename = "maxLimit"))]
4448    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4449    pub max_limit: Option<f64>,
4450    /// Minimum possible value of this variable.
4451    #[cfg_attr(feature = "serde", serde(rename = "minLimit"))]
4452    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4453    pub min_limit: Option<f64>,
4454    /// Flag indicating if this variable supports monitoring.
4455    #[cfg_attr(feature = "serde", serde(rename = "supportsMonitoring"))]
4456    pub supports_monitoring: bool,
4457    /// Unit of the variable. When the transmitted value has a unit, this field SHALL be included.
4458    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4459    pub unit: Option<heapless::String<16usize>>,
4460    /// Mandatory when _dataType_ = OptionList, MemberList or SequenceList. In that case _valuesList_ specifies the allowed values for the type.
4461    ///
4462    /// The length of this field can be limited by DeviceDataCtrlr.ConfigurationValueSize.
4463    ///
4464    /// * OptionList: The (Actual) Variable value must be a single value from the reported (CSV) enumeration list.
4465    ///
4466    /// * MemberList: The (Actual) Variable value  may be an (unordered) (sub-)set of the reported (CSV) valid values list.
4467    ///
4468    /// * SequenceList: The (Actual) Variable value  may be an ordered (priority, etc)  (sub-)set of the reported (CSV) valid values.
4469    ///
4470    /// This is a comma separated list.
4471    ///
4472    /// 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.
4473    #[cfg_attr(feature = "serde", serde(rename = "valuesList"))]
4474    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4475    pub values_list: Option<heapless::String<1000usize>>,
4476}
4477/// Class to report components, variables and variable attributes and characteristics.
4478#[derive(Debug, Clone, PartialEq)]
4479#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4480pub struct ReportData {
4481    pub component: Component,
4482    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4483    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4484    pub custom_data: Option<CustomData>,
4485    pub variable: Variable,
4486    #[cfg_attr(feature = "serde", serde(rename = "variableAttribute"))]
4487    pub variable_attribute: heapless::Vec<VariableAttribute, 4usize>,
4488    #[cfg_attr(feature = "serde", serde(rename = "variableCharacteristics"))]
4489    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4490    pub variable_characteristics: Option<VariableCharacteristics>,
4491}
4492/// The status of the settlement attempt.
4493#[derive(Debug, Clone, PartialEq, Eq)]
4494#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4495pub enum PaymentStatusEnum {
4496    Settled,
4497    Canceled,
4498    Rejected,
4499    Failed,
4500}
4501/// *(2.1)* A generic address format.
4502#[derive(Debug, Clone, PartialEq, Eq)]
4503#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4504pub struct Address {
4505    /// Address line 1
4506    pub address1: heapless::String<100usize>,
4507    /// Address line 2
4508    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4509    pub address2: Option<heapless::String<100usize>>,
4510    /// City
4511    pub city: heapless::String<100usize>,
4512    /// Country name
4513    pub country: heapless::String<50usize>,
4514    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4515    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4516    pub custom_data: Option<CustomData>,
4517    /// Name of person/company
4518    pub name: heapless::String<50usize>,
4519    /// Postal code
4520    #[cfg_attr(feature = "serde", serde(rename = "postalCode"))]
4521    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4522    pub postal_code: Option<heapless::String<20usize>>,
4523}
4524/// This contains the progress status of the publishfirmware
4525/// installation.
4526#[derive(Debug, Clone, PartialEq, Eq)]
4527#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4528pub enum PublishFirmwareStatusEnum {
4529    Idle,
4530    DownloadScheduled,
4531    Downloading,
4532    Downloaded,
4533    Published,
4534    DownloadFailed,
4535    DownloadPaused,
4536    InvalidChecksum,
4537    ChecksumVerified,
4538    PublishFailed,
4539}
4540/// Updates to a ChargingSchedulePeriodType for dynamic charging profiles.
4541#[derive(Debug, Clone, PartialEq)]
4542#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4543pub struct ChargingScheduleUpdate {
4544    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4545    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4546    pub custom_data: Option<CustomData>,
4547    /// *(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.  +
4548    /// 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.
4549    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit"))]
4550    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4551    pub discharge_limit: Option<f64>,
4552    /// *(2.1)* Limit in _chargingRateUnit_ on phase L2 that the EV is allowed to discharge with.
4553    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L2"))]
4554    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4555    pub discharge_limit_l2: Option<f64>,
4556    /// *(2.1)* Limit in _chargingRateUnit_ on phase L3 that the EV is allowed to discharge with.
4557    #[cfg_attr(feature = "serde", serde(rename = "dischargeLimit_L3"))]
4558    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4559    pub discharge_limit_l3: Option<f64>,
4560    /// Optional only when not required by the _operationMode_, as in CentralSetpoint, ExternalSetpoint, ExternalLimits, LocalFrequency,  LocalLoadBalancing. +
4561    /// Charging rate limit during the schedule period, in the applicable _chargingRateUnit_.
4562    /// 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.
4563    /// 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.
4564    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4565    pub limit: Option<f64>,
4566    /// *(2.1)* Charging rate limit on phase L2  in the applicable _chargingRateUnit_.
4567    #[cfg_attr(feature = "serde", serde(rename = "limit_L2"))]
4568    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4569    pub limit_l2: Option<f64>,
4570    /// *(2.1)* Charging rate limit on phase L3  in the applicable _chargingRateUnit_.
4571    #[cfg_attr(feature = "serde", serde(rename = "limit_L3"))]
4572    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4573    pub limit_l3: Option<f64>,
4574    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow as close as possible. Use negative values for discharging. +
4575    /// When a limit and/or _dischargeLimit_ are given the overshoot when following _setpoint_ must remain within these values.
4576    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4577    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4578    pub setpoint: Option<f64>,
4579    /// *(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.  +
4580    /// This field represents the sum of all phases, unless values are provided for L2 and L3, in which case this field represents phase L1.
4581    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive"))]
4582    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4583    pub setpoint_reactive: Option<f64>,
4584    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L2 as closely as possible.
4585    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L2"))]
4586    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4587    pub setpoint_reactive_l2: Option<f64>,
4588    /// *(2.1)* Setpoint for reactive power (or current) in _chargingRateUnit_ that the EV should follow on phase L3 as closely as possible.
4589    #[cfg_attr(feature = "serde", serde(rename = "setpointReactive_L3"))]
4590    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4591    pub setpoint_reactive_l3: Option<f64>,
4592    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L2 as close as possible.
4593    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L2"))]
4594    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4595    pub setpoint_l2: Option<f64>,
4596    /// *(2.1)* Setpoint in _chargingRateUnit_ that the EV should follow on phase L3 as close as possible.
4597    #[cfg_attr(feature = "serde", serde(rename = "setpoint_L3"))]
4598    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4599    pub setpoint_l3: Option<f64>,
4600}
4601/// Result of request.
4602#[derive(Debug, Clone, PartialEq, Eq)]
4603#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4604pub enum ChargingProfileStatusEnum {
4605    Accepted,
4606    Rejected,
4607}
4608/// Indicates the kind of schedule.
4609#[derive(Debug, Clone, PartialEq, Eq)]
4610#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4611pub enum ChargingProfileKindEnum {
4612    Absolute,
4613    Recurring,
4614    Relative,
4615    Dynamic,
4616}
4617/// Indicates the start point of a recurrence.
4618#[derive(Debug, Clone, PartialEq, Eq)]
4619#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4620pub enum RecurrencyKindEnum {
4621    Daily,
4622    Weekly,
4623}
4624#[cfg(feature = "alloc")]
4625/// 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.
4626///
4627/// image::images/ChargingProfile-Simple.png\[\]
4628#[derive(Debug, Clone, PartialEq)]
4629#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4630pub struct ChargingProfile {
4631    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
4632    pub charging_profile_kind: ChargingProfileKindEnum,
4633    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
4634    pub charging_profile_purpose: ChargingProfilePurposeEnum,
4635    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
4636    pub charging_schedule: heapless::Vec<ChargingSchedule, 3usize>,
4637    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4638    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4639    pub custom_data: Option<CustomData>,
4640    /// *(2.1)*  Interval in seconds after receipt of last update, when to request a profile update by sending a PullDynamicScheduleUpdateRequest message.
4641    ///     A value of 0 or no value means that no update interval applies. +
4642    ///     Only relevant in a dynamic charging profile.
4643    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateInterval"))]
4644    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4645    pub dyn_update_interval: Option<i64>,
4646    /// *(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. +
4647    ///     Only relevant in a dynamic charging profile.
4648    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateTime"))]
4649    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4650    pub dyn_update_time: Option<alloc::string::String>,
4651    /// 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.
4652    pub id: i64,
4653    /// *(2.1)* When set to true this charging profile will not be valid anymore after being offline for more than _maxOfflineDuration_. +
4654    ///     When absent defaults to false.
4655    #[cfg_attr(feature = "serde", serde(rename = "invalidAfterOfflineDuration"))]
4656    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4657    pub invalid_after_offline_duration: Option<bool>,
4658    /// *(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.
4659    /// If _invalidAfterOfflineDuration_ is true, then this charging profile will become permanently invalid.
4660    /// 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.
4661    #[cfg_attr(feature = "serde", serde(rename = "maxOfflineDuration"))]
4662    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4663    pub max_offline_duration: Option<i64>,
4664    /// *(2.1)* ISO 15118-20 signature for all price schedules in _chargingSchedules_. +
4665    /// 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.
4666    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleSignature"))]
4667    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4668    pub price_schedule_signature: Option<heapless::String<256usize>>,
4669    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
4670    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4671    pub recurrency_kind: Option<RecurrencyKindEnum>,
4672    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
4673    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
4674    pub stack_level: i64,
4675    /// 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.
4676    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4677    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4678    pub transaction_id: Option<heapless::String<36usize>>,
4679    /// 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.
4680    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
4681    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4682    pub valid_from: Option<alloc::string::String>,
4683    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
4684    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
4685    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4686    pub valid_to: Option<alloc::string::String>,
4687}
4688#[cfg(not(feature = "alloc"))]
4689/// 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.
4690///
4691/// image::images/ChargingProfile-Simple.png\[\]
4692#[derive(Debug, Clone, PartialEq)]
4693#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4694pub struct ChargingProfile<
4695    const ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
4696    const PRICE_LEVEL_SCHEDULE_TIME_ANCHOR_CAP: usize = 1024usize,
4697    const CHARGING_SCHEDULE_START_SCHEDULE_CAP: usize = 1024usize,
4698    const CHARGING_PROFILE_DYN_UPDATE_TIME_CAP: usize = 1024usize,
4699    const CHARGING_PROFILE_VALID_FROM_CAP: usize = 1024usize,
4700    const CHARGING_PROFILE_VALID_TO_CAP: usize = 1024usize,
4701> {
4702    #[cfg_attr(feature = "serde", serde(rename = "chargingProfileKind"))]
4703    pub charging_profile_kind: ChargingProfileKindEnum,
4704    #[cfg_attr(feature = "serde", serde(rename = "chargingProfilePurpose"))]
4705    pub charging_profile_purpose: ChargingProfilePurposeEnum,
4706    #[cfg_attr(feature = "serde", serde(rename = "chargingSchedule"))]
4707    pub charging_schedule: heapless::Vec<
4708        ChargingSchedule<
4709            ABSOLUTE_PRICE_SCHEDULE_TIME_ANCHOR_CAP,
4710            PRICE_LEVEL_SCHEDULE_TIME_ANCHOR_CAP,
4711            CHARGING_SCHEDULE_START_SCHEDULE_CAP,
4712        >,
4713        3usize,
4714    >,
4715    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4716    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4717    pub custom_data: Option<CustomData>,
4718    /// *(2.1)*  Interval in seconds after receipt of last update, when to request a profile update by sending a PullDynamicScheduleUpdateRequest message.
4719    ///     A value of 0 or no value means that no update interval applies. +
4720    ///     Only relevant in a dynamic charging profile.
4721    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateInterval"))]
4722    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4723    pub dyn_update_interval: Option<i64>,
4724    /// *(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. +
4725    ///     Only relevant in a dynamic charging profile.
4726    #[cfg_attr(feature = "serde", serde(rename = "dynUpdateTime"))]
4727    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4728    pub dyn_update_time: Option<heapless::String<CHARGING_PROFILE_DYN_UPDATE_TIME_CAP>>,
4729    /// 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.
4730    pub id: i64,
4731    /// *(2.1)* When set to true this charging profile will not be valid anymore after being offline for more than _maxOfflineDuration_. +
4732    ///     When absent defaults to false.
4733    #[cfg_attr(feature = "serde", serde(rename = "invalidAfterOfflineDuration"))]
4734    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4735    pub invalid_after_offline_duration: Option<bool>,
4736    /// *(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.
4737    /// If _invalidAfterOfflineDuration_ is true, then this charging profile will become permanently invalid.
4738    /// 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.
4739    #[cfg_attr(feature = "serde", serde(rename = "maxOfflineDuration"))]
4740    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4741    pub max_offline_duration: Option<i64>,
4742    /// *(2.1)* ISO 15118-20 signature for all price schedules in _chargingSchedules_. +
4743    /// 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.
4744    #[cfg_attr(feature = "serde", serde(rename = "priceScheduleSignature"))]
4745    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4746    pub price_schedule_signature: Option<heapless::String<256usize>>,
4747    #[cfg_attr(feature = "serde", serde(rename = "recurrencyKind"))]
4748    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4749    pub recurrency_kind: Option<RecurrencyKindEnum>,
4750    /// Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
4751    #[cfg_attr(feature = "serde", serde(rename = "stackLevel"))]
4752    pub stack_level: i64,
4753    /// 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.
4754    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
4755    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4756    pub transaction_id: Option<heapless::String<36usize>>,
4757    /// 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.
4758    #[cfg_attr(feature = "serde", serde(rename = "validFrom"))]
4759    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4760    pub valid_from: Option<heapless::String<CHARGING_PROFILE_VALID_FROM_CAP>>,
4761    /// Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
4762    #[cfg_attr(feature = "serde", serde(rename = "validTo"))]
4763    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4764    pub valid_to: Option<heapless::String<CHARGING_PROFILE_VALID_TO_CAP>>,
4765}
4766#[derive(Debug, Clone, PartialEq)]
4767#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4768pub struct DERCurvePoints {
4769    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4770    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4771    pub custom_data: Option<CustomData>,
4772    /// The data value of the X-axis (independent) variable, depending on the curve type.
4773    pub x: f64,
4774    /// 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).
4775    pub y: f64,
4776}
4777#[derive(Debug, Clone, PartialEq)]
4778#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4779pub struct Hysteresis {
4780    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4781    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4782    pub custom_data: Option<CustomData>,
4783    /// Delay in seconds, once grid parameter within HysteresisLow and HysteresisHigh, for the EV to return to normal operation after a grid event.
4784    #[cfg_attr(feature = "serde", serde(rename = "hysteresisDelay"))]
4785    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4786    pub hysteresis_delay: Option<f64>,
4787    /// Set default rate of change (ramp rate %/s) for the EV to return to normal operation after a grid event
4788    #[cfg_attr(feature = "serde", serde(rename = "hysteresisGradient"))]
4789    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4790    pub hysteresis_gradient: Option<f64>,
4791    /// High value for return to normal operation after a grid event, in absolute value. This value adopts the same unit as defined by yUnit
4792    #[cfg_attr(feature = "serde", serde(rename = "hysteresisHigh"))]
4793    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4794    pub hysteresis_high: Option<f64>,
4795    /// Low value for return to normal operation after a grid event, in absolute value. This value adopts the same unit as defined by yUnit
4796    #[cfg_attr(feature = "serde", serde(rename = "hysteresisLow"))]
4797    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4798    pub hysteresis_low: Option<f64>,
4799}
4800#[derive(Debug, Clone, PartialEq)]
4801#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4802pub struct ReactivePowerParams {
4803    /// Only for VoltVar: Enable/disable autonomous VRef adjustment
4804    #[cfg_attr(feature = "serde", serde(rename = "autonomousVRefEnable"))]
4805    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4806    pub autonomous_v_ref_enable: Option<bool>,
4807    /// Only for VoltVar: Adjustment range for VRef time constant
4808    #[cfg_attr(feature = "serde", serde(rename = "autonomousVRefTimeConstant"))]
4809    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4810    pub autonomous_v_ref_time_constant: Option<f64>,
4811    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4812    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4813    pub custom_data: Option<CustomData>,
4814    /// Only for VoltVar curve: The nominal ac voltage (rms) adjustment to the voltage curve points for Volt-Var curves (percentage).
4815    #[cfg_attr(feature = "serde", serde(rename = "vRef"))]
4816    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4817    pub v_ref: Option<f64>,
4818}
4819/// 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.
4820#[derive(Debug, Clone, PartialEq, Eq)]
4821#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4822pub enum PowerDuringCessationEnum {
4823    Active,
4824    Reactive,
4825}
4826#[derive(Debug, Clone, PartialEq)]
4827#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4828pub struct VoltageParams {
4829    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4830    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4831    pub custom_data: Option<CustomData>,
4832    /// Time for which the voltage is allowed to stay above the 10 min mean value.
4833    ///     After this time, the EV must trip.
4834    ///     This value is mandatory if OverVoltageMeanValue10min is set.
4835    #[cfg_attr(feature = "serde", serde(rename = "hv10MinMeanTripDelay"))]
4836    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4837    pub hv10_min_mean_trip_delay: Option<f64>,
4838    /// EN 50549-1 chapter 4.9.3.4
4839    ///     Voltage threshold for the 10 min time window mean value monitoring.
4840    ///     The 10 min mean is recalculated up to every 3 s.
4841    ///     If the present voltage is above this threshold for more than the time defined by _hv10MinMeanValue_, the EV must trip.
4842    ///     This value is mandatory if _hv10MinMeanTripDelay_ is set.
4843    #[cfg_attr(feature = "serde", serde(rename = "hv10MinMeanValue"))]
4844    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4845    pub hv10_min_mean_value: Option<f64>,
4846    #[cfg_attr(feature = "serde", serde(rename = "powerDuringCessation"))]
4847    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4848    pub power_during_cessation: Option<PowerDuringCessationEnum>,
4849}
4850/// Unit of the Y-axis of DER curve
4851#[derive(Debug, Clone, PartialEq, Eq)]
4852#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4853pub enum DERUnitEnum {
4854    #[cfg_attr(feature = "serde", serde(rename = "Not_Applicable"))]
4855    NotApplicable,
4856    PctMaxW,
4857    PctMaxVar,
4858    PctWAvail,
4859    PctVarAvail,
4860    PctEffectiveV,
4861}
4862#[cfg(feature = "alloc")]
4863#[derive(Debug, Clone, PartialEq)]
4864#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4865pub struct DERCurve {
4866    #[cfg_attr(feature = "serde", serde(rename = "curveData"))]
4867    pub curve_data: heapless::Vec<DERCurvePoints, 10usize>,
4868    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4869    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4870    pub custom_data: Option<CustomData>,
4871    /// Duration in seconds that this curve will be active. Only absent when _default_ is true.
4872    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4873    pub duration: Option<f64>,
4874    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4875    pub hysteresis: Option<Hysteresis>,
4876    /// Priority of curve (0=highest)
4877    pub priority: i64,
4878    #[cfg_attr(feature = "serde", serde(rename = "reactivePowerParams"))]
4879    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4880    pub reactive_power_params: Option<ReactivePowerParams>,
4881    /// 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.
4882    #[cfg_attr(feature = "serde", serde(rename = "responseTime"))]
4883    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4884    pub response_time: Option<f64>,
4885    /// Point in time when this curve will become activated. Only absent when _default_ is true.
4886    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
4887    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4888    pub start_time: Option<alloc::string::String>,
4889    #[cfg_attr(feature = "serde", serde(rename = "voltageParams"))]
4890    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4891    pub voltage_params: Option<VoltageParams>,
4892    #[cfg_attr(feature = "serde", serde(rename = "yUnit"))]
4893    pub y_unit: DERUnitEnum,
4894}
4895#[cfg(not(feature = "alloc"))]
4896#[derive(Debug, Clone, PartialEq)]
4897#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4898pub struct DERCurve<const D_E_R_CURVE_START_TIME_CAP: usize = 1024usize> {
4899    #[cfg_attr(feature = "serde", serde(rename = "curveData"))]
4900    pub curve_data: heapless::Vec<DERCurvePoints, 10usize>,
4901    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4902    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4903    pub custom_data: Option<CustomData>,
4904    /// Duration in seconds that this curve will be active. Only absent when _default_ is true.
4905    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4906    pub duration: Option<f64>,
4907    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4908    pub hysteresis: Option<Hysteresis>,
4909    /// Priority of curve (0=highest)
4910    pub priority: i64,
4911    #[cfg_attr(feature = "serde", serde(rename = "reactivePowerParams"))]
4912    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4913    pub reactive_power_params: Option<ReactivePowerParams>,
4914    /// 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.
4915    #[cfg_attr(feature = "serde", serde(rename = "responseTime"))]
4916    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4917    pub response_time: Option<f64>,
4918    /// Point in time when this curve will become activated. Only absent when _default_ is true.
4919    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
4920    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4921    pub start_time: Option<heapless::String<D_E_R_CURVE_START_TIME_CAP>>,
4922    #[cfg_attr(feature = "serde", serde(rename = "voltageParams"))]
4923    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4924    pub voltage_params: Option<VoltageParams>,
4925    #[cfg_attr(feature = "serde", serde(rename = "yUnit"))]
4926    pub y_unit: DERUnitEnum,
4927}
4928#[cfg(feature = "alloc")]
4929#[derive(Debug, Clone, PartialEq)]
4930#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4931pub struct DERCurveGet {
4932    pub curve: DERCurve,
4933    #[cfg_attr(feature = "serde", serde(rename = "curveType"))]
4934    pub curve_type: DERControlEnum,
4935    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4936    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4937    pub custom_data: Option<CustomData>,
4938    /// Id of DER curve
4939    pub id: heapless::String<36usize>,
4940    /// True if this is a default curve
4941    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
4942    pub is_default: bool,
4943    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
4944    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
4945    pub is_superseded: bool,
4946}
4947#[cfg(not(feature = "alloc"))]
4948#[derive(Debug, Clone, PartialEq)]
4949#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4950pub struct DERCurveGet<const D_E_R_CURVE_START_TIME_CAP: usize = 1024usize> {
4951    pub curve: DERCurve<D_E_R_CURVE_START_TIME_CAP>,
4952    #[cfg_attr(feature = "serde", serde(rename = "curveType"))]
4953    pub curve_type: DERControlEnum,
4954    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4955    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4956    pub custom_data: Option<CustomData>,
4957    /// Id of DER curve
4958    pub id: heapless::String<36usize>,
4959    /// True if this is a default curve
4960    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
4961    pub is_default: bool,
4962    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
4963    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
4964    pub is_superseded: bool,
4965}
4966#[derive(Debug, Clone, PartialEq)]
4967#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4968pub struct EnterService {
4969    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
4970    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4971    pub custom_data: Option<CustomData>,
4972    /// Enter service delay
4973    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4974    pub delay: Option<f64>,
4975    /// Enter service frequency high
4976    #[cfg_attr(feature = "serde", serde(rename = "highFreq"))]
4977    pub high_freq: f64,
4978    /// Enter service voltage high
4979    #[cfg_attr(feature = "serde", serde(rename = "highVoltage"))]
4980    pub high_voltage: f64,
4981    /// Enter service frequency low
4982    #[cfg_attr(feature = "serde", serde(rename = "lowFreq"))]
4983    pub low_freq: f64,
4984    /// Enter service voltage low
4985    #[cfg_attr(feature = "serde", serde(rename = "lowVoltage"))]
4986    pub low_voltage: f64,
4987    /// Priority of setting (0=highest)
4988    pub priority: i64,
4989    /// Enter service ramp rate in seconds
4990    #[cfg_attr(feature = "serde", serde(rename = "rampRate"))]
4991    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4992    pub ramp_rate: Option<f64>,
4993    /// Enter service randomized delay
4994    #[cfg_attr(feature = "serde", serde(rename = "randomDelay"))]
4995    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
4996    pub random_delay: Option<f64>,
4997}
4998#[derive(Debug, Clone, PartialEq)]
4999#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5000pub struct EnterServiceGet {
5001    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5002    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5003    pub custom_data: Option<CustomData>,
5004    #[cfg_attr(feature = "serde", serde(rename = "enterService"))]
5005    pub enter_service: EnterService,
5006    /// Id of setting
5007    pub id: heapless::String<36usize>,
5008}
5009#[cfg(feature = "alloc")]
5010#[derive(Debug, Clone, PartialEq)]
5011#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5012pub struct FixedPF {
5013    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5014    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5015    pub custom_data: Option<CustomData>,
5016    /// Power factor, cos(phi), as value between 0..1.
5017    pub displacement: f64,
5018    /// Duration in seconds that this setting is active.
5019    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5020    pub duration: Option<f64>,
5021    /// True when absorbing reactive power (under-excited), false when injecting reactive power (over-excited).
5022    pub excitation: bool,
5023    /// Priority of setting (0=highest)
5024    pub priority: i64,
5025    /// Time when this setting becomes active
5026    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5027    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5028    pub start_time: Option<alloc::string::String>,
5029}
5030#[cfg(not(feature = "alloc"))]
5031#[derive(Debug, Clone, PartialEq)]
5032#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5033pub struct FixedPF<const FIXED_P_F_START_TIME_CAP: usize = 1024usize> {
5034    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5035    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5036    pub custom_data: Option<CustomData>,
5037    /// Power factor, cos(phi), as value between 0..1.
5038    pub displacement: f64,
5039    /// Duration in seconds that this setting is active.
5040    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5041    pub duration: Option<f64>,
5042    /// True when absorbing reactive power (under-excited), false when injecting reactive power (over-excited).
5043    pub excitation: bool,
5044    /// Priority of setting (0=highest)
5045    pub priority: i64,
5046    /// Time when this setting becomes active
5047    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5048    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5049    pub start_time: Option<heapless::String<FIXED_P_F_START_TIME_CAP>>,
5050}
5051#[cfg(feature = "alloc")]
5052#[derive(Debug, Clone, PartialEq)]
5053#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5054pub struct FixedPFGet {
5055    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5056    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5057    pub custom_data: Option<CustomData>,
5058    #[cfg_attr(feature = "serde", serde(rename = "fixedPF"))]
5059    pub fixed_p_f: FixedPF,
5060    /// Id of setting.
5061    pub id: heapless::String<36usize>,
5062    /// True if setting is a default control.
5063    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5064    pub is_default: bool,
5065    /// True if this setting is superseded by a lower priority setting.
5066    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5067    pub is_superseded: bool,
5068}
5069#[cfg(not(feature = "alloc"))]
5070#[derive(Debug, Clone, PartialEq)]
5071#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5072pub struct FixedPFGet<const FIXED_P_F_START_TIME_CAP: usize = 1024usize> {
5073    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5074    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5075    pub custom_data: Option<CustomData>,
5076    #[cfg_attr(feature = "serde", serde(rename = "fixedPF"))]
5077    pub fixed_p_f: FixedPF<FIXED_P_F_START_TIME_CAP>,
5078    /// Id of setting.
5079    pub id: heapless::String<36usize>,
5080    /// True if setting is a default control.
5081    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5082    pub is_default: bool,
5083    /// True if this setting is superseded by a lower priority setting.
5084    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5085    pub is_superseded: bool,
5086}
5087#[cfg(feature = "alloc")]
5088#[derive(Debug, Clone, PartialEq)]
5089#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5090pub struct FixedVar {
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<alloc::string::String>,
5107    pub unit: DERUnitEnum,
5108}
5109#[cfg(not(feature = "alloc"))]
5110#[derive(Debug, Clone, PartialEq)]
5111#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5112pub struct FixedVar<const FIXED_VAR_START_TIME_CAP: usize = 1024usize> {
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    /// Duration in seconds that this setting is active.
5117    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5118    pub duration: Option<f64>,
5119    /// Priority of setting (0=highest)
5120    pub priority: i64,
5121    /// The value specifies a target var output interpreted as a signed percentage (-100 to 100).
5122    ///     A negative value refers to charging, whereas a positive one refers to discharging.
5123    ///     The value type is determined by the unit field.
5124    pub setpoint: f64,
5125    /// Time when this setting becomes active.
5126    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5127    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5128    pub start_time: Option<heapless::String<FIXED_VAR_START_TIME_CAP>>,
5129    pub unit: DERUnitEnum,
5130}
5131#[cfg(feature = "alloc")]
5132#[derive(Debug, Clone, PartialEq)]
5133#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5134pub struct FixedVarGet {
5135    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5136    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5137    pub custom_data: Option<CustomData>,
5138    #[cfg_attr(feature = "serde", serde(rename = "fixedVar"))]
5139    pub fixed_var: FixedVar,
5140    /// Id of setting
5141    pub id: heapless::String<36usize>,
5142    /// True if setting is a default control.
5143    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5144    pub is_default: bool,
5145    /// True if this setting is superseded by a lower priority setting
5146    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5147    pub is_superseded: bool,
5148}
5149#[cfg(not(feature = "alloc"))]
5150#[derive(Debug, Clone, PartialEq)]
5151#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5152pub struct FixedVarGet<const FIXED_VAR_START_TIME_CAP: usize = 1024usize> {
5153    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5154    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5155    pub custom_data: Option<CustomData>,
5156    #[cfg_attr(feature = "serde", serde(rename = "fixedVar"))]
5157    pub fixed_var: FixedVar<FIXED_VAR_START_TIME_CAP>,
5158    /// Id of setting
5159    pub id: heapless::String<36usize>,
5160    /// True if setting is a default control.
5161    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5162    pub is_default: bool,
5163    /// True if this setting is superseded by a lower priority setting
5164    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5165    pub is_superseded: bool,
5166}
5167#[cfg(feature = "alloc")]
5168#[derive(Debug, Clone, PartialEq)]
5169#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5170pub struct FreqDroop {
5171    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5172    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5173    pub custom_data: Option<CustomData>,
5174    /// Duration in seconds that this setting is active
5175    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5176    pub duration: Option<f64>,
5177    /// Over-frequency droop per unit, oFDroop
5178    #[cfg_attr(feature = "serde", serde(rename = "overDroop"))]
5179    pub over_droop: f64,
5180    /// Over-frequency start of droop
5181    #[cfg_attr(feature = "serde", serde(rename = "overFreq"))]
5182    pub over_freq: f64,
5183    /// Priority of setting (0=highest)
5184    pub priority: i64,
5185    /// Open loop response time in seconds
5186    #[cfg_attr(feature = "serde", serde(rename = "responseTime"))]
5187    pub response_time: f64,
5188    /// Time when this setting becomes active
5189    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5190    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5191    pub start_time: Option<alloc::string::String>,
5192    /// Under-frequency droop per unit, uFDroop
5193    #[cfg_attr(feature = "serde", serde(rename = "underDroop"))]
5194    pub under_droop: f64,
5195    /// Under-frequency start of droop
5196    #[cfg_attr(feature = "serde", serde(rename = "underFreq"))]
5197    pub under_freq: f64,
5198}
5199#[cfg(not(feature = "alloc"))]
5200#[derive(Debug, Clone, PartialEq)]
5201#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5202pub struct FreqDroop<const FREQ_DROOP_START_TIME_CAP: usize = 1024usize> {
5203    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5204    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5205    pub custom_data: Option<CustomData>,
5206    /// Duration in seconds that this setting is active
5207    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5208    pub duration: Option<f64>,
5209    /// Over-frequency droop per unit, oFDroop
5210    #[cfg_attr(feature = "serde", serde(rename = "overDroop"))]
5211    pub over_droop: f64,
5212    /// Over-frequency start of droop
5213    #[cfg_attr(feature = "serde", serde(rename = "overFreq"))]
5214    pub over_freq: f64,
5215    /// Priority of setting (0=highest)
5216    pub priority: i64,
5217    /// Open loop response time in seconds
5218    #[cfg_attr(feature = "serde", serde(rename = "responseTime"))]
5219    pub response_time: f64,
5220    /// Time when this setting becomes active
5221    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5222    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5223    pub start_time: Option<heapless::String<FREQ_DROOP_START_TIME_CAP>>,
5224    /// Under-frequency droop per unit, uFDroop
5225    #[cfg_attr(feature = "serde", serde(rename = "underDroop"))]
5226    pub under_droop: f64,
5227    /// Under-frequency start of droop
5228    #[cfg_attr(feature = "serde", serde(rename = "underFreq"))]
5229    pub under_freq: f64,
5230}
5231#[cfg(feature = "alloc")]
5232#[derive(Debug, Clone, PartialEq)]
5233#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5234pub struct FreqDroopGet {
5235    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5236    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5237    pub custom_data: Option<CustomData>,
5238    #[cfg_attr(feature = "serde", serde(rename = "freqDroop"))]
5239    pub freq_droop: FreqDroop,
5240    /// Id of setting
5241    pub id: heapless::String<36usize>,
5242    /// True if setting is a default control.
5243    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5244    pub is_default: bool,
5245    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
5246    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5247    pub is_superseded: bool,
5248}
5249#[cfg(not(feature = "alloc"))]
5250#[derive(Debug, Clone, PartialEq)]
5251#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5252pub struct FreqDroopGet<const FREQ_DROOP_START_TIME_CAP: usize = 1024usize> {
5253    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5254    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5255    pub custom_data: Option<CustomData>,
5256    #[cfg_attr(feature = "serde", serde(rename = "freqDroop"))]
5257    pub freq_droop: FreqDroop<FREQ_DROOP_START_TIME_CAP>,
5258    /// Id of setting
5259    pub id: heapless::String<36usize>,
5260    /// True if setting is a default control.
5261    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5262    pub is_default: bool,
5263    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
5264    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5265    pub is_superseded: bool,
5266}
5267#[derive(Debug, Clone, PartialEq)]
5268#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5269pub struct Gradient {
5270    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5271    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5272    pub custom_data: Option<CustomData>,
5273    /// Default ramp rate in seconds (0 if not applicable)
5274    pub gradient: f64,
5275    /// Id of setting
5276    pub priority: i64,
5277    /// Soft-start ramp rate in seconds (0 if not applicable)
5278    #[cfg_attr(feature = "serde", serde(rename = "softGradient"))]
5279    pub soft_gradient: f64,
5280}
5281#[derive(Debug, Clone, PartialEq)]
5282#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5283pub struct GradientGet {
5284    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5285    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5286    pub custom_data: Option<CustomData>,
5287    pub gradient: Gradient,
5288    /// Id of setting
5289    pub id: heapless::String<36usize>,
5290}
5291#[cfg(feature = "alloc")]
5292#[derive(Debug, Clone, PartialEq)]
5293#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5294pub struct LimitMaxDischarge {
5295    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5296    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5297    pub custom_data: Option<CustomData>,
5298    /// Duration in seconds that this setting is active
5299    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5300    pub duration: Option<f64>,
5301    /// Only for PowerMonitoring. +
5302    ///     The value specifies a percentage (0 to 100) of the rated maximum discharge power of EV.
5303    ///     The PowerMonitoring curve becomes active when power exceeds this percentage.
5304    #[cfg_attr(feature = "serde", serde(rename = "pctMaxDischargePower"))]
5305    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5306    pub pct_max_discharge_power: Option<f64>,
5307    #[cfg_attr(feature = "serde", serde(rename = "powerMonitoringMustTrip"))]
5308    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5309    pub power_monitoring_must_trip: Option<DERCurve>,
5310    /// Priority of setting (0=highest)
5311    pub priority: i64,
5312    /// Time when this setting becomes active
5313    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5314    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5315    pub start_time: Option<alloc::string::String>,
5316}
5317#[cfg(not(feature = "alloc"))]
5318#[derive(Debug, Clone, PartialEq)]
5319#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5320pub struct LimitMaxDischarge<
5321    const D_E_R_CURVE_START_TIME_CAP: usize = 1024usize,
5322    const LIMIT_MAX_DISCHARGE_START_TIME_CAP: usize = 1024usize,
5323> {
5324    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5325    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5326    pub custom_data: Option<CustomData>,
5327    /// Duration in seconds that this setting is active
5328    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5329    pub duration: Option<f64>,
5330    /// Only for PowerMonitoring. +
5331    ///     The value specifies a percentage (0 to 100) of the rated maximum discharge power of EV.
5332    ///     The PowerMonitoring curve becomes active when power exceeds this percentage.
5333    #[cfg_attr(feature = "serde", serde(rename = "pctMaxDischargePower"))]
5334    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5335    pub pct_max_discharge_power: Option<f64>,
5336    #[cfg_attr(feature = "serde", serde(rename = "powerMonitoringMustTrip"))]
5337    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5338    pub power_monitoring_must_trip: Option<DERCurve<D_E_R_CURVE_START_TIME_CAP>>,
5339    /// Priority of setting (0=highest)
5340    pub priority: i64,
5341    /// Time when this setting becomes active
5342    #[cfg_attr(feature = "serde", serde(rename = "startTime"))]
5343    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5344    pub start_time: Option<heapless::String<LIMIT_MAX_DISCHARGE_START_TIME_CAP>>,
5345}
5346#[cfg(feature = "alloc")]
5347#[derive(Debug, Clone, PartialEq)]
5348#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5349pub struct LimitMaxDischargeGet {
5350    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5351    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5352    pub custom_data: Option<CustomData>,
5353    /// Id of setting
5354    pub id: heapless::String<36usize>,
5355    /// True if setting is a default control.
5356    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5357    pub is_default: bool,
5358    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
5359    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5360    pub is_superseded: bool,
5361    #[cfg_attr(feature = "serde", serde(rename = "limitMaxDischarge"))]
5362    pub limit_max_discharge: LimitMaxDischarge,
5363}
5364#[cfg(not(feature = "alloc"))]
5365#[derive(Debug, Clone, PartialEq)]
5366#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5367pub struct LimitMaxDischargeGet<
5368    const D_E_R_CURVE_START_TIME_CAP: usize = 1024usize,
5369    const LIMIT_MAX_DISCHARGE_START_TIME_CAP: usize = 1024usize,
5370> {
5371    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5372    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5373    pub custom_data: Option<CustomData>,
5374    /// Id of setting
5375    pub id: heapless::String<36usize>,
5376    /// True if setting is a default control.
5377    #[cfg_attr(feature = "serde", serde(rename = "isDefault"))]
5378    pub is_default: bool,
5379    /// True if this setting is superseded by a higher priority setting (i.e. lower value of _priority_)
5380    #[cfg_attr(feature = "serde", serde(rename = "isSuperseded"))]
5381    pub is_superseded: bool,
5382    #[cfg_attr(feature = "serde", serde(rename = "limitMaxDischarge"))]
5383    pub limit_max_discharge: LimitMaxDischarge<
5384        D_E_R_CURVE_START_TIME_CAP,
5385        LIMIT_MAX_DISCHARGE_START_TIME_CAP,
5386    >,
5387}
5388/// Status indicating whether the Charging Station accepts the request to start a transaction.
5389#[derive(Debug, Clone, PartialEq, Eq)]
5390#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5391pub enum RequestStartStopStatusEnum {
5392    Accepted,
5393    Rejected,
5394}
5395/// The updated reservation status.
5396#[derive(Debug, Clone, PartialEq, Eq)]
5397#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5398pub enum ReservationUpdateStatusEnum {
5399    Expired,
5400    Removed,
5401    NoTransaction,
5402}
5403/// This indicates the success or failure of the reservation.
5404#[derive(Debug, Clone, PartialEq, Eq)]
5405#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5406pub enum ReserveNowStatusEnum {
5407    Accepted,
5408    Faulted,
5409    Occupied,
5410    Rejected,
5411    Unavailable,
5412}
5413/// This contains the type of reset that the Charging Station or EVSE should perform.
5414#[derive(Debug, Clone, PartialEq, Eq)]
5415#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5416pub enum ResetEnum {
5417    Immediate,
5418    OnIdle,
5419    ImmediateAndResume,
5420}
5421/// This indicates whether the Charging Station is able to perform the reset.
5422#[derive(Debug, Clone, PartialEq, Eq)]
5423#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5424pub enum ResetStatusEnum {
5425    Accepted,
5426    Rejected,
5427    Scheduled,
5428}
5429#[cfg(feature = "alloc")]
5430/// Contains the identifier to use for authorization.
5431#[derive(Debug, Clone, PartialEq, Eq)]
5432#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5433pub struct AuthorizationData {
5434    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5435    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5436    pub custom_data: Option<CustomData>,
5437    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
5438    pub id_token: IdToken,
5439    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
5440    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5441    pub id_token_info: Option<IdTokenInfo>,
5442}
5443#[cfg(not(feature = "alloc"))]
5444/// Contains the identifier to use for authorization.
5445#[derive(Debug, Clone, PartialEq, Eq)]
5446#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5447pub struct AuthorizationData<
5448    const ID_TOKEN_ADDITIONAL_INFO_CAP: usize = 16usize,
5449    const ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP: usize = 1024usize,
5450    const ID_TOKEN_INFO_EVSE_ID_CAP: usize = 16usize,
5451> {
5452    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5453    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5454    pub custom_data: Option<CustomData>,
5455    #[cfg_attr(feature = "serde", serde(rename = "idToken"))]
5456    pub id_token: IdToken<ID_TOKEN_ADDITIONAL_INFO_CAP>,
5457    #[cfg_attr(feature = "serde", serde(rename = "idTokenInfo"))]
5458    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5459    pub id_token_info: Option<
5460        IdTokenInfo<
5461            ID_TOKEN_INFO_CACHE_EXPIRY_DATE_TIME_CAP,
5462            ID_TOKEN_INFO_EVSE_ID_CAP,
5463            ID_TOKEN_ADDITIONAL_INFO_CAP,
5464        >,
5465    >,
5466}
5467/// This contains the type of update (full or differential) of this request.
5468#[derive(Debug, Clone, PartialEq, Eq)]
5469#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5470pub enum UpdateEnum {
5471    Differential,
5472    Full,
5473}
5474/// This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
5475#[derive(Debug, Clone, PartialEq, Eq)]
5476#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5477pub enum SendLocalListStatusEnum {
5478    Accepted,
5479    Failed,
5480    VersionMismatch,
5481}
5482#[derive(Debug, Clone, PartialEq, Eq)]
5483#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5484pub enum TariffSetStatusEnum {
5485    Accepted,
5486    Rejected,
5487    TooManyElements,
5488    ConditionNotSupported,
5489    DuplicateTariffId,
5490}
5491/// This indicates whether the Charging Station is able to display the message.
5492#[derive(Debug, Clone, PartialEq, Eq)]
5493#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5494pub enum DisplayMessageStatusEnum {
5495    Accepted,
5496    NotSupportedMessageFormat,
5497    Rejected,
5498    NotSupportedPriority,
5499    NotSupportedState,
5500    UnknownTransaction,
5501    LanguageNotSupported,
5502}
5503/// Specify which monitoring base will be set
5504#[derive(Debug, Clone, PartialEq, Eq)]
5505#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5506pub enum MonitoringBaseEnum {
5507    All,
5508    FactoryDefault,
5509    HardWiredOnly,
5510}
5511/// Authentication method.
5512#[derive(Debug, Clone, PartialEq, Eq)]
5513#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5514pub enum APNAuthenticationEnum {
5515    PAP,
5516    CHAP,
5517    NONE,
5518    AUTO,
5519}
5520/// Collection of configuration data needed to make a data-connection over a cellular network.
5521///
5522/// 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.
5523#[derive(Debug, Clone, PartialEq, Eq)]
5524#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5525pub struct APN {
5526    /// The Access Point Name as an URL.
5527    pub apn: heapless::String<2000usize>,
5528    #[cfg_attr(feature = "serde", serde(rename = "apnAuthentication"))]
5529    pub apn_authentication: APNAuthenticationEnum,
5530    /// *(2.1)* APN Password.
5531    #[cfg_attr(feature = "serde", serde(rename = "apnPassword"))]
5532    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5533    pub apn_password: Option<heapless::String<64usize>>,
5534    /// APN username.
5535    #[cfg_attr(feature = "serde", serde(rename = "apnUserName"))]
5536    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5537    pub apn_user_name: Option<heapless::String<50usize>>,
5538    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5539    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5540    pub custom_data: Option<CustomData>,
5541    /// Preferred network, written as MCC and MNC concatenated. See note.
5542    #[cfg_attr(feature = "serde", serde(rename = "preferredNetwork"))]
5543    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5544    pub preferred_network: Option<heapless::String<6usize>>,
5545    /// SIM card pin code.
5546    #[cfg_attr(feature = "serde", serde(rename = "simPin"))]
5547    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5548    pub sim_pin: Option<i64>,
5549    /// Default: false. Use only the preferred Network, do
5550    /// not dial in when not available. See Note.
5551    #[cfg_attr(feature = "serde", serde(rename = "useOnlyPreferredNetwork"))]
5552    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5553    pub use_only_preferred_network: Option<bool>,
5554}
5555/// Applicable Network Interface. Charging Station is allowed to use a different network interface to connect if the given one does not work.
5556#[derive(Debug, Clone, PartialEq, Eq)]
5557#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5558pub enum OCPPInterfaceEnum {
5559    Wired0,
5560    Wired1,
5561    Wired2,
5562    Wired3,
5563    Wireless0,
5564    Wireless1,
5565    Wireless2,
5566    Wireless3,
5567    Any,
5568}
5569/// 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.
5570#[derive(Debug, Clone, PartialEq, Eq)]
5571#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5572pub enum OCPPTransportEnum {
5573    SOAP,
5574    JSON,
5575}
5576/// *(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.
5577#[derive(Debug, Clone, PartialEq, Eq)]
5578#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5579pub enum OCPPVersionEnum {
5580    OCPP12,
5581    OCPP15,
5582    OCPP16,
5583    OCPP20,
5584    OCPP201,
5585    OCPP21,
5586}
5587/// Type of VPN
5588#[derive(Debug, Clone, PartialEq, Eq)]
5589#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5590pub enum VPNEnum {
5591    IKEv2,
5592    IPSec,
5593    L2TP,
5594    PPTP,
5595}
5596/// VPN Configuration settings
5597#[derive(Debug, Clone, PartialEq, Eq)]
5598#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5599pub struct VPN {
5600    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5601    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5602    pub custom_data: Option<CustomData>,
5603    /// VPN group.
5604    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5605    pub group: Option<heapless::String<50usize>>,
5606    /// VPN shared secret.
5607    pub key: heapless::String<255usize>,
5608    /// *(2.1)* VPN Password.
5609    pub password: heapless::String<64usize>,
5610    /// VPN Server Address
5611    pub server: heapless::String<2000usize>,
5612    pub r#type: VPNEnum,
5613    /// VPN User
5614    pub user: heapless::String<50usize>,
5615}
5616/// The NetworkConnectionProfile defines the functional and technical parameters of a communication link.
5617#[derive(Debug, Clone, PartialEq, Eq)]
5618#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5619pub struct NetworkConnectionProfile {
5620    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5621    pub apn: Option<APN>,
5622    /// *(2.1)* BasicAuthPassword to use for security profile 1 or 2.
5623    #[cfg_attr(feature = "serde", serde(rename = "basicAuthPassword"))]
5624    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5625    pub basic_auth_password: Option<heapless::String<64usize>>,
5626    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5627    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5628    pub custom_data: Option<CustomData>,
5629    /// *(2.1)* Charging Station identity to be used as the basic authentication username.
5630    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5631    pub identity: Option<heapless::String<48usize>>,
5632    /// Duration in seconds before a message send by the Charging Station via this network connection times-out.
5633    /// The best setting depends on the underlying network and response times of the CSMS.
5634    /// If you are looking for a some guideline: use 30 seconds as a starting point.
5635    #[cfg_attr(feature = "serde", serde(rename = "messageTimeout"))]
5636    pub message_timeout: i64,
5637    /// URL of the CSMS(s) that this Charging Station communicates with, without the Charging Station identity part. +
5638    /// The SecurityCtrlr.Identity field is appended to _ocppCsmsUrl_ to provide the full websocket URL.
5639    #[cfg_attr(feature = "serde", serde(rename = "ocppCsmsUrl"))]
5640    pub ocpp_csms_url: heapless::String<2000usize>,
5641    #[cfg_attr(feature = "serde", serde(rename = "ocppInterface"))]
5642    pub ocpp_interface: OCPPInterfaceEnum,
5643    #[cfg_attr(feature = "serde", serde(rename = "ocppTransport"))]
5644    pub ocpp_transport: OCPPTransportEnum,
5645    #[cfg_attr(feature = "serde", serde(rename = "ocppVersion"))]
5646    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5647    pub ocpp_version: Option<OCPPVersionEnum>,
5648    /// This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile.
5649    #[cfg_attr(feature = "serde", serde(rename = "securityProfile"))]
5650    pub security_profile: i64,
5651    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5652    pub vpn: Option<VPN>,
5653}
5654/// Result of operation.
5655#[derive(Debug, Clone, PartialEq, Eq)]
5656#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5657pub enum SetNetworkProfileStatusEnum {
5658    Accepted,
5659    Rejected,
5660    Failed,
5661}
5662/// Class to hold parameters of SetVariableMonitoring request.
5663#[derive(Debug, Clone, PartialEq)]
5664#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5665pub struct SetMonitoringData {
5666    pub component: Component,
5667    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5668    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5669    pub custom_data: Option<CustomData>,
5670    /// An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id's for new monitors.
5671    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5672    pub id: Option<i64>,
5673    #[cfg_attr(feature = "serde", serde(rename = "periodicEventStream"))]
5674    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5675    pub periodic_event_stream: Option<PeriodicEventStreamParams>,
5676    /// 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.
5677    ///
5678    /// The severity levels have the following meaning: +
5679    /// *0-Danger* +
5680    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
5681    /// *1-Hardware Failure* +
5682    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
5683    /// *2-System Failure* +
5684    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
5685    /// *3-Critical* +
5686    /// Indicates a critical error. Action is required. +
5687    /// *4-Error* +
5688    /// Indicates a non-urgent error. Action is required. +
5689    /// *5-Alert* +
5690    /// Indicates an alert event. Default severity for any type of monitoring event.  +
5691    /// *6-Warning* +
5692    /// Indicates a warning event. Action may be required. +
5693    /// *7-Notice* +
5694    /// Indicates an unusual event. No immediate action is required. +
5695    /// *8-Informational* +
5696    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
5697    /// *9-Debug* +
5698    /// Indicates information useful to developers for debugging, not useful during operations.
5699    pub severity: i64,
5700    /// Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false.
5701    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5702    pub transaction: Option<bool>,
5703    pub r#type: MonitorEnum,
5704    /// Value for threshold or delta monitoring.
5705    /// For Periodic or PeriodicClockAligned this is the interval in seconds.
5706    pub value: f64,
5707    pub variable: Variable,
5708}
5709/// Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
5710#[derive(Debug, Clone, PartialEq, Eq)]
5711#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5712pub enum SetMonitoringStatusEnum {
5713    Accepted,
5714    UnknownComponent,
5715    UnknownVariable,
5716    UnsupportedMonitorType,
5717    Rejected,
5718    Duplicate,
5719}
5720/// Class to hold result of SetVariableMonitoring request.
5721#[derive(Debug, Clone, PartialEq, Eq)]
5722#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5723pub struct SetMonitoringResult {
5724    pub component: Component,
5725    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5726    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5727    pub custom_data: Option<CustomData>,
5728    /// 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.
5729    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5730    pub id: Option<i64>,
5731    /// 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.
5732    ///
5733    /// The severity levels have the following meaning: +
5734    /// *0-Danger* +
5735    /// Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. +
5736    /// *1-Hardware Failure* +
5737    /// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. +
5738    /// *2-System Failure* +
5739    /// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. +
5740    /// *3-Critical* +
5741    /// Indicates a critical error. Action is required. +
5742    /// *4-Error* +
5743    /// Indicates a non-urgent error. Action is required. +
5744    /// *5-Alert* +
5745    /// Indicates an alert event. Default severity for any type of monitoring event.  +
5746    /// *6-Warning* +
5747    /// Indicates a warning event. Action may be required. +
5748    /// *7-Notice* +
5749    /// Indicates an unusual event. No immediate action is required. +
5750    /// *8-Informational* +
5751    /// Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. +
5752    /// *9-Debug* +
5753    /// Indicates information useful to developers for debugging, not useful during operations.
5754    pub severity: i64,
5755    pub status: SetMonitoringStatusEnum,
5756    #[cfg_attr(feature = "serde", serde(rename = "statusInfo"))]
5757    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5758    pub status_info: Option<StatusInfo>,
5759    pub r#type: MonitorEnum,
5760    pub variable: Variable,
5761}
5762#[derive(Debug, Clone, PartialEq, Eq)]
5763#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5764pub struct SetVariableData {
5765    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
5766    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5767    pub attribute_type: Option<AttributeEnum>,
5768    /// Value to be assigned to attribute of variable.
5769    /// This value is allowed to be an empty string ("").
5770    ///
5771    /// 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.
5772    #[cfg_attr(feature = "serde", serde(rename = "attributeValue"))]
5773    pub attribute_value: heapless::String<2500usize>,
5774    pub component: Component,
5775    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5776    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5777    pub custom_data: Option<CustomData>,
5778    pub variable: Variable,
5779}
5780/// Result status of setting the variable.
5781#[derive(Debug, Clone, PartialEq, Eq)]
5782#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5783pub enum SetVariableStatusEnum {
5784    Accepted,
5785    Rejected,
5786    UnknownComponent,
5787    UnknownVariable,
5788    NotSupportedAttributeType,
5789    RebootRequired,
5790}
5791#[derive(Debug, Clone, PartialEq, Eq)]
5792#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5793pub struct SetVariableResult {
5794    #[cfg_attr(feature = "serde", serde(rename = "attributeStatus"))]
5795    pub attribute_status: SetVariableStatusEnum,
5796    #[cfg_attr(feature = "serde", serde(rename = "attributeStatusInfo"))]
5797    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5798    pub attribute_status_info: Option<StatusInfo>,
5799    #[cfg_attr(feature = "serde", serde(rename = "attributeType"))]
5800    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5801    pub attribute_type: Option<AttributeEnum>,
5802    pub component: Component,
5803    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5804    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5805    pub custom_data: Option<CustomData>,
5806    pub variable: Variable,
5807}
5808/// This contains the current status of the Connector.
5809#[derive(Debug, Clone, PartialEq, Eq)]
5810#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5811pub enum ConnectorStatusEnum {
5812    Available,
5813    Occupied,
5814    Reserved,
5815    Unavailable,
5816    Faulted,
5817}
5818/// Type of cost dimension: energy, power, time, etc.
5819#[derive(Debug, Clone, PartialEq, Eq)]
5820#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5821pub enum CostDimensionEnum {
5822    Energy,
5823    MaxCurrent,
5824    MinCurrent,
5825    MaxPower,
5826    MinPower,
5827    IdleTIme,
5828    ChargingTime,
5829}
5830/// Volume consumed of cost dimension.
5831#[derive(Debug, Clone, PartialEq)]
5832#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5833pub struct CostDimension {
5834    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5835    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5836    pub custom_data: Option<CustomData>,
5837    pub r#type: CostDimensionEnum,
5838    /// Volume of the dimension consumed, measured according to the dimension type.
5839    pub volume: f64,
5840}
5841#[cfg(feature = "alloc")]
5842/// 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.
5843#[derive(Debug, Clone, PartialEq)]
5844#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5845pub struct ChargingPeriod {
5846    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5847    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5848    pub custom_data: Option<CustomData>,
5849    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5850    pub dimensions: Option<alloc::vec::Vec<CostDimension>>,
5851    /// Start timestamp of charging period. A period ends when the next period starts. The last period ends when the session ends.
5852    #[cfg_attr(feature = "serde", serde(rename = "startPeriod"))]
5853    pub start_period: alloc::string::String,
5854    /// Unique identifier of the Tariff that was used to calculate cost. If not provided, then cost was calculated by some other means.
5855    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
5856    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5857    pub tariff_id: Option<heapless::String<60usize>>,
5858}
5859#[cfg(not(feature = "alloc"))]
5860/// 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.
5861#[derive(Debug, Clone, PartialEq)]
5862#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5863pub struct ChargingPeriod<
5864    const CHARGING_PERIOD_DIMENSIONS_CAP: usize = 16usize,
5865    const CHARGING_PERIOD_START_PERIOD_CAP: usize = 1024usize,
5866> {
5867    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5868    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5869    pub custom_data: Option<CustomData>,
5870    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5871    pub dimensions: Option<heapless::Vec<CostDimension, CHARGING_PERIOD_DIMENSIONS_CAP>>,
5872    /// Start timestamp of charging period. A period ends when the next period starts. The last period ends when the session ends.
5873    #[cfg_attr(feature = "serde", serde(rename = "startPeriod"))]
5874    pub start_period: heapless::String<CHARGING_PERIOD_START_PERIOD_CAP>,
5875    /// Unique identifier of the Tariff that was used to calculate cost. If not provided, then cost was calculated by some other means.
5876    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
5877    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5878    pub tariff_id: Option<heapless::String<60usize>>,
5879}
5880/// Total cost with and without tax. Contains the total of energy, charging time, idle time, fixed and reservation costs including and/or excluding tax.
5881#[derive(Debug, Clone, PartialEq)]
5882#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5883pub struct TotalPrice {
5884    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5885    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5886    pub custom_data: Option<CustomData>,
5887    /// Price/cost excluding tax. Can be absent if _inclTax_ is present.
5888    #[cfg_attr(feature = "serde", serde(rename = "exclTax"))]
5889    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5890    pub excl_tax: Option<f64>,
5891    /// Price/cost including tax. Can be absent if _exclTax_ is present.
5892    #[cfg_attr(feature = "serde", serde(rename = "inclTax"))]
5893    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5894    pub incl_tax: Option<f64>,
5895}
5896/// Type of cost: normal or the minimum or maximum cost.
5897#[derive(Debug, Clone, PartialEq, Eq)]
5898#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5899pub enum TariffCostEnum {
5900    NormalCost,
5901    MinCost,
5902    MaxCost,
5903}
5904/// This contains the cost calculated during a transaction. It is used both for running cost and final cost of the transaction.
5905#[derive(Debug, Clone, PartialEq)]
5906#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5907pub struct TotalCost {
5908    #[cfg_attr(feature = "serde", serde(rename = "chargingTime"))]
5909    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5910    pub charging_time: Option<Price>,
5911    /// Currency of the costs in ISO 4217 Code.
5912    pub currency: heapless::String<3usize>,
5913    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5914    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5915    pub custom_data: Option<CustomData>,
5916    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5917    pub energy: Option<Price>,
5918    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5919    pub fixed: Option<Price>,
5920    #[cfg_attr(feature = "serde", serde(rename = "idleTime"))]
5921    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5922    pub idle_time: Option<Price>,
5923    #[cfg_attr(feature = "serde", serde(rename = "reservationFixed"))]
5924    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5925    pub reservation_fixed: Option<Price>,
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<Price>,
5929    pub total: TotalPrice,
5930    #[cfg_attr(feature = "serde", serde(rename = "typeOfCost"))]
5931    pub type_of_cost: TariffCostEnum,
5932}
5933/// This contains the calculated usage of energy, charging time and idle time during a transaction.
5934#[derive(Debug, Clone, PartialEq)]
5935#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5936pub struct TotalUsage {
5937    /// Total duration of the charging session (including the duration of charging and not charging), in seconds.
5938    #[cfg_attr(feature = "serde", serde(rename = "chargingTime"))]
5939    pub charging_time: i64,
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    pub energy: f64,
5944    /// Total duration of the charging session where the EV was not charging (no energy was transferred between EVSE and EV), in seconds.
5945    #[cfg_attr(feature = "serde", serde(rename = "idleTime"))]
5946    pub idle_time: i64,
5947    /// Total time of reservation in seconds.
5948    #[cfg_attr(feature = "serde", serde(rename = "reservationTime"))]
5949    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5950    pub reservation_time: Option<i64>,
5951}
5952#[cfg(feature = "alloc")]
5953/// CostDetailsType contains the cost as calculated by Charging Station based on provided TariffType.
5954///
5955/// NOTE: Reservation is not shown as a _chargingPeriod_, because it took place outside of the transaction.
5956#[derive(Debug, Clone, PartialEq)]
5957#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5958pub struct CostDetails {
5959    #[cfg_attr(feature = "serde", serde(rename = "chargingPeriods"))]
5960    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5961    pub charging_periods: Option<alloc::vec::Vec<ChargingPeriod>>,
5962    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
5963    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5964    pub custom_data: Option<CustomData>,
5965    /// Optional human-readable reason text in case of failure to calculate.
5966    #[cfg_attr(feature = "serde", serde(rename = "failureReason"))]
5967    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5968    pub failure_reason: Option<heapless::String<500usize>>,
5969    /// If set to true, then Charging Station has failed to calculate the cost.
5970    #[cfg_attr(feature = "serde", serde(rename = "failureToCalculate"))]
5971    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5972    pub failure_to_calculate: Option<bool>,
5973    #[cfg_attr(feature = "serde", serde(rename = "totalCost"))]
5974    pub total_cost: TotalCost,
5975    #[cfg_attr(feature = "serde", serde(rename = "totalUsage"))]
5976    pub total_usage: TotalUsage,
5977}
5978#[cfg(not(feature = "alloc"))]
5979/// CostDetailsType contains the cost as calculated by Charging Station based on provided TariffType.
5980///
5981/// NOTE: Reservation is not shown as a _chargingPeriod_, because it took place outside of the transaction.
5982#[derive(Debug, Clone, PartialEq)]
5983#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5984pub struct CostDetails<
5985    const COST_DETAILS_CHARGING_PERIODS_CAP: usize = 16usize,
5986    const CHARGING_PERIOD_DIMENSIONS_CAP: usize = 16usize,
5987    const CHARGING_PERIOD_START_PERIOD_CAP: usize = 1024usize,
5988> {
5989    #[cfg_attr(feature = "serde", serde(rename = "chargingPeriods"))]
5990    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
5991    pub charging_periods: Option<
5992        heapless::Vec<
5993            ChargingPeriod<
5994                CHARGING_PERIOD_DIMENSIONS_CAP,
5995                CHARGING_PERIOD_START_PERIOD_CAP,
5996            >,
5997            COST_DETAILS_CHARGING_PERIODS_CAP,
5998        >,
5999    >,
6000    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6001    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6002    pub custom_data: Option<CustomData>,
6003    /// Optional human-readable reason text in case of failure to calculate.
6004    #[cfg_attr(feature = "serde", serde(rename = "failureReason"))]
6005    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6006    pub failure_reason: Option<heapless::String<500usize>>,
6007    /// If set to true, then Charging Station has failed to calculate the cost.
6008    #[cfg_attr(feature = "serde", serde(rename = "failureToCalculate"))]
6009    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6010    pub failure_to_calculate: Option<bool>,
6011    #[cfg_attr(feature = "serde", serde(rename = "totalCost"))]
6012    pub total_cost: TotalCost,
6013    #[cfg_attr(feature = "serde", serde(rename = "totalUsage"))]
6014    pub total_usage: TotalUsage,
6015}
6016/// This contains the type of this event.
6017/// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
6018#[derive(Debug, Clone, PartialEq, Eq)]
6019#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6020pub enum TransactionEventEnum {
6021    Ended,
6022    Started,
6023    Updated,
6024}
6025/// *(2.1)* The current preconditioning status of the BMS in the EV. Default value is Unknown.
6026#[derive(Debug, Clone, PartialEq, Eq)]
6027#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6028pub enum PreconditioningStatusEnum {
6029    Unknown,
6030    Ready,
6031    NotReady,
6032    Preconditioning,
6033}
6034/// Current charging state, is required when state
6035/// has changed. Omitted when there is no communication between EVSE and EV, because no cable is plugged in.
6036#[derive(Debug, Clone, PartialEq, Eq)]
6037#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6038pub enum ChargingStateEnum {
6039    EVConnected,
6040    Charging,
6041    SuspendedEV,
6042    SuspendedEVSE,
6043    Idle,
6044}
6045/// 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. +
6046/// MAY only be omitted when _stoppedReason_ is "Local"
6047#[derive(Debug, Clone, PartialEq, Eq)]
6048#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6049pub enum ReasonEnum {
6050    DeAuthorized,
6051    EmergencyStop,
6052    EnergyLimitReached,
6053    EVDisconnected,
6054    GroundFault,
6055    ImmediateReset,
6056    MasterPass,
6057    Local,
6058    LocalOutOfCredit,
6059    Other,
6060    OvercurrentFault,
6061    PowerLoss,
6062    PowerQuality,
6063    Reboot,
6064    Remote,
6065    SOCLimitReached,
6066    StoppedByEV,
6067    TimeLimitReached,
6068    Timeout,
6069    ReqEnergyTransferRejected,
6070}
6071/// Cost, energy, time or SoC limit for a transaction.
6072#[derive(Debug, Clone, PartialEq)]
6073#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6074pub struct TransactionLimit {
6075    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6076    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6077    pub custom_data: Option<CustomData>,
6078    /// Maximum allowed cost of transaction in currency of tariff.
6079    #[cfg_attr(feature = "serde", serde(rename = "maxCost"))]
6080    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6081    pub max_cost: Option<f64>,
6082    /// Maximum allowed energy in Wh to charge in transaction.
6083    #[cfg_attr(feature = "serde", serde(rename = "maxEnergy"))]
6084    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6085    pub max_energy: Option<f64>,
6086    /// Maximum State of Charge of EV in percentage.
6087    #[cfg_attr(feature = "serde", serde(rename = "maxSoC"))]
6088    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6089    pub max_so_c: Option<i64>,
6090    /// Maximum duration of transaction in seconds from start to end.
6091    #[cfg_attr(feature = "serde", serde(rename = "maxTime"))]
6092    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6093    pub max_time: Option<i64>,
6094}
6095#[derive(Debug, Clone, PartialEq)]
6096#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6097pub struct Transaction {
6098    #[cfg_attr(feature = "serde", serde(rename = "chargingState"))]
6099    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6100    pub charging_state: Option<ChargingStateEnum>,
6101    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6102    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6103    pub custom_data: Option<CustomData>,
6104    #[cfg_attr(feature = "serde", serde(rename = "operationMode"))]
6105    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6106    pub operation_mode: Option<OperationModeEnum>,
6107    /// 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.
6108    #[cfg_attr(feature = "serde", serde(rename = "remoteStartId"))]
6109    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6110    pub remote_start_id: Option<i64>,
6111    #[cfg_attr(feature = "serde", serde(rename = "stoppedReason"))]
6112    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6113    pub stopped_reason: Option<ReasonEnum>,
6114    /// *(2.1)* Id of tariff in use for transaction
6115    #[cfg_attr(feature = "serde", serde(rename = "tariffId"))]
6116    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6117    pub tariff_id: Option<heapless::String<60usize>>,
6118    /// 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.
6119    #[cfg_attr(feature = "serde", serde(rename = "timeSpentCharging"))]
6120    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6121    pub time_spent_charging: Option<i64>,
6122    /// This contains the Id of the transaction.
6123    #[cfg_attr(feature = "serde", serde(rename = "transactionId"))]
6124    pub transaction_id: heapless::String<36usize>,
6125    #[cfg_attr(feature = "serde", serde(rename = "transactionLimit"))]
6126    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6127    pub transaction_limit: Option<TransactionLimit>,
6128}
6129/// Reason the Charging Station sends this message to the CSMS
6130#[derive(Debug, Clone, PartialEq, Eq)]
6131#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6132pub enum TriggerReasonEnum {
6133    AbnormalCondition,
6134    Authorized,
6135    CablePluggedIn,
6136    ChargingRateChanged,
6137    ChargingStateChanged,
6138    CostLimitReached,
6139    Deauthorized,
6140    EnergyLimitReached,
6141    EVCommunicationLost,
6142    EVConnectTimeout,
6143    EVDeparted,
6144    EVDetected,
6145    LimitSet,
6146    MeterValueClock,
6147    MeterValuePeriodic,
6148    OperationModeChanged,
6149    RemoteStart,
6150    RemoteStop,
6151    ResetCommand,
6152    RunningCost,
6153    SignedDataReceived,
6154    SoCLimitReached,
6155    StopAuthorized,
6156    TariffChanged,
6157    TariffNotAccepted,
6158    TimeLimitReached,
6159    Trigger,
6160    TxResumed,
6161    UnlockCommand,
6162}
6163/// Type of message to be triggered.
6164#[derive(Debug, Clone, PartialEq, Eq)]
6165#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6166pub enum MessageTriggerEnum {
6167    BootNotification,
6168    LogStatusNotification,
6169    FirmwareStatusNotification,
6170    Heartbeat,
6171    MeterValues,
6172    SignChargingStationCertificate,
6173    SignV2GCertificate,
6174    SignV2G20Certificate,
6175    StatusNotification,
6176    TransactionEvent,
6177    SignCombinedCertificate,
6178    PublishFirmwareStatusNotification,
6179    CustomTrigger,
6180}
6181/// Indicates whether the Charging Station will send the requested notification or not.
6182#[derive(Debug, Clone, PartialEq, Eq)]
6183#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6184pub enum TriggerMessageStatusEnum {
6185    Accepted,
6186    Rejected,
6187    NotImplemented,
6188}
6189/// This indicates whether the Charging Station has unlocked the connector.
6190#[derive(Debug, Clone, PartialEq, Eq)]
6191#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6192pub enum UnlockStatusEnum {
6193    Unlocked,
6194    UnlockFailed,
6195    OngoingAuthorizedTransaction,
6196    UnknownConnector,
6197}
6198/// Indicates whether the Local Controller succeeded in unpublishing the firmware.
6199#[derive(Debug, Clone, PartialEq, Eq)]
6200#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6201pub enum UnpublishFirmwareStatusEnum {
6202    DownloadOngoing,
6203    NoFirmware,
6204    Unpublished,
6205}
6206#[cfg(feature = "alloc")]
6207/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
6208#[derive(Debug, Clone, PartialEq, Eq)]
6209#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6210pub struct Firmware {
6211    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6212    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6213    pub custom_data: Option<CustomData>,
6214    /// Date and time at which the firmware shall be installed.
6215    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
6216    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6217    pub install_date_time: Option<alloc::string::String>,
6218    /// URI defining the origin of the firmware.
6219    pub location: heapless::String<2000usize>,
6220    /// Date and time at which the firmware shall be retrieved.
6221    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
6222    pub retrieve_date_time: alloc::string::String,
6223    /// Base64 encoded firmware signature.
6224    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6225    pub signature: Option<heapless::String<800usize>>,
6226    /// Certificate with which the firmware was signed.
6227    /// PEM encoded X.509 certificate.
6228    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
6229    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6230    pub signing_certificate: Option<heapless::String<5500usize>>,
6231}
6232#[cfg(not(feature = "alloc"))]
6233/// Represents a copy of the firmware that can be loaded/updated on the Charging Station.
6234#[derive(Debug, Clone, PartialEq, Eq)]
6235#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6236pub struct Firmware<
6237    const FIRMWARE_INSTALL_DATE_TIME_CAP: usize = 1024usize,
6238    const FIRMWARE_RETRIEVE_DATE_TIME_CAP: usize = 1024usize,
6239> {
6240    #[cfg_attr(feature = "serde", serde(rename = "customData"))]
6241    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6242    pub custom_data: Option<CustomData>,
6243    /// Date and time at which the firmware shall be installed.
6244    #[cfg_attr(feature = "serde", serde(rename = "installDateTime"))]
6245    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6246    pub install_date_time: Option<heapless::String<FIRMWARE_INSTALL_DATE_TIME_CAP>>,
6247    /// URI defining the origin of the firmware.
6248    pub location: heapless::String<2000usize>,
6249    /// Date and time at which the firmware shall be retrieved.
6250    #[cfg_attr(feature = "serde", serde(rename = "retrieveDateTime"))]
6251    pub retrieve_date_time: heapless::String<FIRMWARE_RETRIEVE_DATE_TIME_CAP>,
6252    /// Base64 encoded firmware signature.
6253    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6254    pub signature: Option<heapless::String<800usize>>,
6255    /// Certificate with which the firmware was signed.
6256    /// PEM encoded X.509 certificate.
6257    #[cfg_attr(feature = "serde", serde(rename = "signingCertificate"))]
6258    #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
6259    pub signing_certificate: Option<heapless::String<5500usize>>,
6260}
6261/// This field indicates whether the Charging Station was able to accept the request.
6262#[derive(Debug, Clone, PartialEq, Eq)]
6263#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6264pub enum UpdateFirmwareStatusEnum {
6265    Accepted,
6266    Rejected,
6267    AcceptedCanceled,
6268    InvalidCertificate,
6269    RevokedCertificate,
6270}
6271/// Result of the request.
6272#[derive(Debug, Clone, PartialEq, Eq)]
6273#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6274pub enum PriorityChargingStatusEnum {
6275    Accepted,
6276    Rejected,
6277    NoProfile,
6278}