Skip to main content

codetics_ocpp21/
enums.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Kevin Vavelin, Codetics (https://codetics.fr)
3
4//! OCPP 2.1 enumerations.
5
6use ocpp_core::validate::{Path, Validate, Violation};
7use serde::{Deserialize, Serialize};
8
9/// Authentication method.
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
11pub enum APNAuthenticationEnum {
12    #[serde(rename = "PAP")]
13    PAP,
14    #[serde(rename = "CHAP")]
15    CHAP,
16    #[serde(rename = "NONE")]
17    NONE,
18    #[serde(rename = "AUTO")]
19    AUTO,
20}
21
22impl APNAuthenticationEnum {
23    pub const ALL: &'static [APNAuthenticationEnum] = &[
24        APNAuthenticationEnum::PAP,
25        APNAuthenticationEnum::CHAP,
26        APNAuthenticationEnum::NONE,
27        APNAuthenticationEnum::AUTO,
28    ];
29    /// Value as it appears on the wire.
30    pub const fn as_str(&self) -> &'static str {
31        match self {
32            APNAuthenticationEnum::PAP => "PAP",
33            APNAuthenticationEnum::CHAP => "CHAP",
34            APNAuthenticationEnum::NONE => "NONE",
35            APNAuthenticationEnum::AUTO => "AUTO",
36        }
37    }
38}
39
40impl std::fmt::Display for APNAuthenticationEnum {
41    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
42        f.write_str(self.as_str())
43    }
44}
45
46impl std::str::FromStr for APNAuthenticationEnum {
47    type Err = ();
48    fn from_str(s: &str) -> Result<Self, ()> {
49        Self::ALL
50            .iter()
51            .copied()
52            .find(|v| v.as_str() == s)
53            .ok_or(())
54    }
55}
56
57impl Validate for APNAuthenticationEnum {
58    #[inline]
59    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
60        Ok(())
61    }
62}
63
64/// Attribute type for which value is requested. When absent, default Actual is assumed.
65#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
66pub enum AttributeEnum {
67    #[serde(rename = "Actual")]
68    Actual,
69    #[serde(rename = "Target")]
70    Target,
71    #[serde(rename = "MinSet")]
72    MinSet,
73    #[serde(rename = "MaxSet")]
74    MaxSet,
75}
76
77impl AttributeEnum {
78    pub const ALL: &'static [AttributeEnum] = &[
79        AttributeEnum::Actual,
80        AttributeEnum::Target,
81        AttributeEnum::MinSet,
82        AttributeEnum::MaxSet,
83    ];
84    /// Value as it appears on the wire.
85    pub const fn as_str(&self) -> &'static str {
86        match self {
87            AttributeEnum::Actual => "Actual",
88            AttributeEnum::Target => "Target",
89            AttributeEnum::MinSet => "MinSet",
90            AttributeEnum::MaxSet => "MaxSet",
91        }
92    }
93}
94
95impl std::fmt::Display for AttributeEnum {
96    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
97        f.write_str(self.as_str())
98    }
99}
100
101impl std::str::FromStr for AttributeEnum {
102    type Err = ();
103    fn from_str(s: &str) -> Result<Self, ()> {
104        Self::ALL
105            .iter()
106            .copied()
107            .find(|v| v.as_str() == s)
108            .ok_or(())
109    }
110}
111
112impl Validate for AttributeEnum {
113    #[inline]
114    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
115        Ok(())
116    }
117}
118
119/// Current status of the ID Token.
120#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
121pub enum AuthorizationStatusEnum {
122    #[serde(rename = "Accepted")]
123    Accepted,
124    #[serde(rename = "Blocked")]
125    Blocked,
126    #[serde(rename = "ConcurrentTx")]
127    ConcurrentTx,
128    #[serde(rename = "Expired")]
129    Expired,
130    #[serde(rename = "Invalid")]
131    Invalid,
132    #[serde(rename = "NoCredit")]
133    NoCredit,
134    #[serde(rename = "NotAllowedTypeEVSE")]
135    NotAllowedTypeEVSE,
136    #[serde(rename = "NotAtThisLocation")]
137    NotAtThisLocation,
138    #[serde(rename = "NotAtThisTime")]
139    NotAtThisTime,
140    #[serde(rename = "Unknown")]
141    Unknown,
142}
143
144impl AuthorizationStatusEnum {
145    pub const ALL: &'static [AuthorizationStatusEnum] = &[
146        AuthorizationStatusEnum::Accepted,
147        AuthorizationStatusEnum::Blocked,
148        AuthorizationStatusEnum::ConcurrentTx,
149        AuthorizationStatusEnum::Expired,
150        AuthorizationStatusEnum::Invalid,
151        AuthorizationStatusEnum::NoCredit,
152        AuthorizationStatusEnum::NotAllowedTypeEVSE,
153        AuthorizationStatusEnum::NotAtThisLocation,
154        AuthorizationStatusEnum::NotAtThisTime,
155        AuthorizationStatusEnum::Unknown,
156    ];
157    /// Value as it appears on the wire.
158    pub const fn as_str(&self) -> &'static str {
159        match self {
160            AuthorizationStatusEnum::Accepted => "Accepted",
161            AuthorizationStatusEnum::Blocked => "Blocked",
162            AuthorizationStatusEnum::ConcurrentTx => "ConcurrentTx",
163            AuthorizationStatusEnum::Expired => "Expired",
164            AuthorizationStatusEnum::Invalid => "Invalid",
165            AuthorizationStatusEnum::NoCredit => "NoCredit",
166            AuthorizationStatusEnum::NotAllowedTypeEVSE => "NotAllowedTypeEVSE",
167            AuthorizationStatusEnum::NotAtThisLocation => "NotAtThisLocation",
168            AuthorizationStatusEnum::NotAtThisTime => "NotAtThisTime",
169            AuthorizationStatusEnum::Unknown => "Unknown",
170        }
171    }
172}
173
174impl std::fmt::Display for AuthorizationStatusEnum {
175    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
176        f.write_str(self.as_str())
177    }
178}
179
180impl std::str::FromStr for AuthorizationStatusEnum {
181    type Err = ();
182    fn from_str(s: &str) -> Result<Self, ()> {
183        Self::ALL
184            .iter()
185            .copied()
186            .find(|v| v.as_str() == s)
187            .ok_or(())
188    }
189}
190
191impl Validate for AuthorizationStatusEnum {
192    #[inline]
193    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
194        Ok(())
195    }
196}
197
198/// Certificate status information.
199/// - if all certificates are valid: return 'Accepted'.
200/// - if one of the certificates was revoked, return 'CertificateRevoked'.
201#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
202pub enum AuthorizeCertificateStatusEnum {
203    #[serde(rename = "Accepted")]
204    Accepted,
205    #[serde(rename = "SignatureError")]
206    SignatureError,
207    #[serde(rename = "CertificateExpired")]
208    CertificateExpired,
209    #[serde(rename = "CertificateRevoked")]
210    CertificateRevoked,
211    #[serde(rename = "NoCertificateAvailable")]
212    NoCertificateAvailable,
213    #[serde(rename = "CertChainError")]
214    CertChainError,
215    #[serde(rename = "ContractCancelled")]
216    ContractCancelled,
217}
218
219impl AuthorizeCertificateStatusEnum {
220    pub const ALL: &'static [AuthorizeCertificateStatusEnum] = &[
221        AuthorizeCertificateStatusEnum::Accepted,
222        AuthorizeCertificateStatusEnum::SignatureError,
223        AuthorizeCertificateStatusEnum::CertificateExpired,
224        AuthorizeCertificateStatusEnum::CertificateRevoked,
225        AuthorizeCertificateStatusEnum::NoCertificateAvailable,
226        AuthorizeCertificateStatusEnum::CertChainError,
227        AuthorizeCertificateStatusEnum::ContractCancelled,
228    ];
229    /// Value as it appears on the wire.
230    pub const fn as_str(&self) -> &'static str {
231        match self {
232            AuthorizeCertificateStatusEnum::Accepted => "Accepted",
233            AuthorizeCertificateStatusEnum::SignatureError => "SignatureError",
234            AuthorizeCertificateStatusEnum::CertificateExpired => "CertificateExpired",
235            AuthorizeCertificateStatusEnum::CertificateRevoked => "CertificateRevoked",
236            AuthorizeCertificateStatusEnum::NoCertificateAvailable => "NoCertificateAvailable",
237            AuthorizeCertificateStatusEnum::CertChainError => "CertChainError",
238            AuthorizeCertificateStatusEnum::ContractCancelled => "ContractCancelled",
239        }
240    }
241}
242
243impl std::fmt::Display for AuthorizeCertificateStatusEnum {
244    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
245        f.write_str(self.as_str())
246    }
247}
248
249impl std::str::FromStr for AuthorizeCertificateStatusEnum {
250    type Err = ();
251    fn from_str(s: &str) -> Result<Self, ()> {
252        Self::ALL
253            .iter()
254            .copied()
255            .find(|v| v.as_str() == s)
256            .ok_or(())
257    }
258}
259
260impl Validate for AuthorizeCertificateStatusEnum {
261    #[inline]
262    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
263        Ok(())
264    }
265}
266
267/// Battery in/out
268#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
269pub enum BatterySwapEventEnum {
270    #[serde(rename = "BatteryIn")]
271    BatteryIn,
272    #[serde(rename = "BatteryOut")]
273    BatteryOut,
274    #[serde(rename = "BatteryOutTimeout")]
275    BatteryOutTimeout,
276}
277
278impl BatterySwapEventEnum {
279    pub const ALL: &'static [BatterySwapEventEnum] = &[
280        BatterySwapEventEnum::BatteryIn,
281        BatterySwapEventEnum::BatteryOut,
282        BatterySwapEventEnum::BatteryOutTimeout,
283    ];
284    /// Value as it appears on the wire.
285    pub const fn as_str(&self) -> &'static str {
286        match self {
287            BatterySwapEventEnum::BatteryIn => "BatteryIn",
288            BatterySwapEventEnum::BatteryOut => "BatteryOut",
289            BatterySwapEventEnum::BatteryOutTimeout => "BatteryOutTimeout",
290        }
291    }
292}
293
294impl std::fmt::Display for BatterySwapEventEnum {
295    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
296        f.write_str(self.as_str())
297    }
298}
299
300impl std::str::FromStr for BatterySwapEventEnum {
301    type Err = ();
302    fn from_str(s: &str) -> Result<Self, ()> {
303        Self::ALL
304            .iter()
305            .copied()
306            .find(|v| v.as_str() == s)
307            .ok_or(())
308    }
309}
310
311impl Validate for BatterySwapEventEnum {
312    #[inline]
313    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
314        Ok(())
315    }
316}
317
318/// This contains the reason for sending this message to the CSMS.
319#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
320pub enum BootReasonEnum {
321    #[serde(rename = "ApplicationReset")]
322    ApplicationReset,
323    #[serde(rename = "FirmwareUpdate")]
324    FirmwareUpdate,
325    #[serde(rename = "LocalReset")]
326    LocalReset,
327    #[serde(rename = "PowerUp")]
328    PowerUp,
329    #[serde(rename = "RemoteReset")]
330    RemoteReset,
331    #[serde(rename = "ScheduledReset")]
332    ScheduledReset,
333    #[serde(rename = "Triggered")]
334    Triggered,
335    #[serde(rename = "Unknown")]
336    Unknown,
337    #[serde(rename = "Watchdog")]
338    Watchdog,
339}
340
341impl BootReasonEnum {
342    pub const ALL: &'static [BootReasonEnum] = &[
343        BootReasonEnum::ApplicationReset,
344        BootReasonEnum::FirmwareUpdate,
345        BootReasonEnum::LocalReset,
346        BootReasonEnum::PowerUp,
347        BootReasonEnum::RemoteReset,
348        BootReasonEnum::ScheduledReset,
349        BootReasonEnum::Triggered,
350        BootReasonEnum::Unknown,
351        BootReasonEnum::Watchdog,
352    ];
353    /// Value as it appears on the wire.
354    pub const fn as_str(&self) -> &'static str {
355        match self {
356            BootReasonEnum::ApplicationReset => "ApplicationReset",
357            BootReasonEnum::FirmwareUpdate => "FirmwareUpdate",
358            BootReasonEnum::LocalReset => "LocalReset",
359            BootReasonEnum::PowerUp => "PowerUp",
360            BootReasonEnum::RemoteReset => "RemoteReset",
361            BootReasonEnum::ScheduledReset => "ScheduledReset",
362            BootReasonEnum::Triggered => "Triggered",
363            BootReasonEnum::Unknown => "Unknown",
364            BootReasonEnum::Watchdog => "Watchdog",
365        }
366    }
367}
368
369impl std::fmt::Display for BootReasonEnum {
370    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
371        f.write_str(self.as_str())
372    }
373}
374
375impl std::str::FromStr for BootReasonEnum {
376    type Err = ();
377    fn from_str(s: &str) -> Result<Self, ()> {
378        Self::ALL
379            .iter()
380            .copied()
381            .find(|v| v.as_str() == s)
382            .ok_or(())
383    }
384}
385
386impl Validate for BootReasonEnum {
387    #[inline]
388    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
389        Ok(())
390    }
391}
392
393/// This indicates the success or failure of the canceling of a reservation by CSMS.
394#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
395pub enum CancelReservationStatusEnum {
396    #[serde(rename = "Accepted")]
397    Accepted,
398    #[serde(rename = "Rejected")]
399    Rejected,
400}
401
402impl CancelReservationStatusEnum {
403    pub const ALL: &'static [CancelReservationStatusEnum] = &[
404        CancelReservationStatusEnum::Accepted,
405        CancelReservationStatusEnum::Rejected,
406    ];
407    /// Value as it appears on the wire.
408    pub const fn as_str(&self) -> &'static str {
409        match self {
410            CancelReservationStatusEnum::Accepted => "Accepted",
411            CancelReservationStatusEnum::Rejected => "Rejected",
412        }
413    }
414}
415
416impl std::fmt::Display for CancelReservationStatusEnum {
417    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
418        f.write_str(self.as_str())
419    }
420}
421
422impl std::str::FromStr for CancelReservationStatusEnum {
423    type Err = ();
424    fn from_str(s: &str) -> Result<Self, ()> {
425        Self::ALL
426            .iter()
427            .copied()
428            .find(|v| v.as_str() == s)
429            .ok_or(())
430    }
431}
432
433impl Validate for CancelReservationStatusEnum {
434    #[inline]
435    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
436        Ok(())
437    }
438}
439
440/// Defines whether certificate needs to be installed or updated.
441#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
442pub enum CertificateActionEnum {
443    #[serde(rename = "Install")]
444    Install,
445    #[serde(rename = "Update")]
446    Update,
447}
448
449impl CertificateActionEnum {
450    pub const ALL: &'static [CertificateActionEnum] = &[
451        CertificateActionEnum::Install,
452        CertificateActionEnum::Update,
453    ];
454    /// Value as it appears on the wire.
455    pub const fn as_str(&self) -> &'static str {
456        match self {
457            CertificateActionEnum::Install => "Install",
458            CertificateActionEnum::Update => "Update",
459        }
460    }
461}
462
463impl std::fmt::Display for CertificateActionEnum {
464    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
465        f.write_str(self.as_str())
466    }
467}
468
469impl std::str::FromStr for CertificateActionEnum {
470    type Err = ();
471    fn from_str(s: &str) -> Result<Self, ()> {
472        Self::ALL
473            .iter()
474            .copied()
475            .find(|v| v.as_str() == s)
476            .ok_or(())
477    }
478}
479
480impl Validate for CertificateActionEnum {
481    #[inline]
482    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
483        Ok(())
484    }
485}
486
487/// Returns whether certificate signing has been accepted, otherwise rejected.
488#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
489pub enum CertificateSignedStatusEnum {
490    #[serde(rename = "Accepted")]
491    Accepted,
492    #[serde(rename = "Rejected")]
493    Rejected,
494}
495
496impl CertificateSignedStatusEnum {
497    pub const ALL: &'static [CertificateSignedStatusEnum] = &[
498        CertificateSignedStatusEnum::Accepted,
499        CertificateSignedStatusEnum::Rejected,
500    ];
501    /// Value as it appears on the wire.
502    pub const fn as_str(&self) -> &'static str {
503        match self {
504            CertificateSignedStatusEnum::Accepted => "Accepted",
505            CertificateSignedStatusEnum::Rejected => "Rejected",
506        }
507    }
508}
509
510impl std::fmt::Display for CertificateSignedStatusEnum {
511    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
512        f.write_str(self.as_str())
513    }
514}
515
516impl std::str::FromStr for CertificateSignedStatusEnum {
517    type Err = ();
518    fn from_str(s: &str) -> Result<Self, ()> {
519        Self::ALL
520            .iter()
521            .copied()
522            .find(|v| v.as_str() == s)
523            .ok_or(())
524    }
525}
526
527impl Validate for CertificateSignedStatusEnum {
528    #[inline]
529    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
530        Ok(())
531    }
532}
533
534/// 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.
535#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
536pub enum CertificateSigningUseEnum {
537    #[serde(rename = "ChargingStationCertificate")]
538    ChargingStationCertificate,
539    #[serde(rename = "V2GCertificate")]
540    V2GCertificate,
541    #[serde(rename = "V2G20Certificate")]
542    V2G20Certificate,
543}
544
545impl CertificateSigningUseEnum {
546    pub const ALL: &'static [CertificateSigningUseEnum] = &[
547        CertificateSigningUseEnum::ChargingStationCertificate,
548        CertificateSigningUseEnum::V2GCertificate,
549        CertificateSigningUseEnum::V2G20Certificate,
550    ];
551    /// Value as it appears on the wire.
552    pub const fn as_str(&self) -> &'static str {
553        match self {
554            CertificateSigningUseEnum::ChargingStationCertificate => "ChargingStationCertificate",
555            CertificateSigningUseEnum::V2GCertificate => "V2GCertificate",
556            CertificateSigningUseEnum::V2G20Certificate => "V2G20Certificate",
557        }
558    }
559}
560
561impl std::fmt::Display for CertificateSigningUseEnum {
562    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
563        f.write_str(self.as_str())
564    }
565}
566
567impl std::str::FromStr for CertificateSigningUseEnum {
568    type Err = ();
569    fn from_str(s: &str) -> Result<Self, ()> {
570        Self::ALL
571            .iter()
572            .copied()
573            .find(|v| v.as_str() == s)
574            .ok_or(())
575    }
576}
577
578impl Validate for CertificateSigningUseEnum {
579    #[inline]
580    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
581        Ok(())
582    }
583}
584
585/// Status of certificate: good, revoked or unknown.
586#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
587pub enum CertificateStatusEnum {
588    #[serde(rename = "Good")]
589    Good,
590    #[serde(rename = "Revoked")]
591    Revoked,
592    #[serde(rename = "Unknown")]
593    Unknown,
594    #[serde(rename = "Failed")]
595    Failed,
596}
597
598impl CertificateStatusEnum {
599    pub const ALL: &'static [CertificateStatusEnum] = &[
600        CertificateStatusEnum::Good,
601        CertificateStatusEnum::Revoked,
602        CertificateStatusEnum::Unknown,
603        CertificateStatusEnum::Failed,
604    ];
605    /// Value as it appears on the wire.
606    pub const fn as_str(&self) -> &'static str {
607        match self {
608            CertificateStatusEnum::Good => "Good",
609            CertificateStatusEnum::Revoked => "Revoked",
610            CertificateStatusEnum::Unknown => "Unknown",
611            CertificateStatusEnum::Failed => "Failed",
612        }
613    }
614}
615
616impl std::fmt::Display for CertificateStatusEnum {
617    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
618        f.write_str(self.as_str())
619    }
620}
621
622impl std::str::FromStr for CertificateStatusEnum {
623    type Err = ();
624    fn from_str(s: &str) -> Result<Self, ()> {
625        Self::ALL
626            .iter()
627            .copied()
628            .find(|v| v.as_str() == s)
629            .ok_or(())
630    }
631}
632
633impl Validate for CertificateStatusEnum {
634    #[inline]
635    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
636        Ok(())
637    }
638}
639
640/// Source of status: OCSP, CRL
641#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
642pub enum CertificateStatusSourceEnum {
643    #[serde(rename = "CRL")]
644    CRL,
645    #[serde(rename = "OCSP")]
646    OCSP,
647}
648
649impl CertificateStatusSourceEnum {
650    pub const ALL: &'static [CertificateStatusSourceEnum] = &[
651        CertificateStatusSourceEnum::CRL,
652        CertificateStatusSourceEnum::OCSP,
653    ];
654    /// Value as it appears on the wire.
655    pub const fn as_str(&self) -> &'static str {
656        match self {
657            CertificateStatusSourceEnum::CRL => "CRL",
658            CertificateStatusSourceEnum::OCSP => "OCSP",
659        }
660    }
661}
662
663impl std::fmt::Display for CertificateStatusSourceEnum {
664    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
665        f.write_str(self.as_str())
666    }
667}
668
669impl std::str::FromStr for CertificateStatusSourceEnum {
670    type Err = ();
671    fn from_str(s: &str) -> Result<Self, ()> {
672        Self::ALL
673            .iter()
674            .copied()
675            .find(|v| v.as_str() == s)
676            .ok_or(())
677    }
678}
679
680impl Validate for CertificateStatusSourceEnum {
681    #[inline]
682    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
683        Ok(())
684    }
685}
686
687/// This indicates whether the Charging Station is able to perform the availability change.
688#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
689pub enum ChangeAvailabilityStatusEnum {
690    #[serde(rename = "Accepted")]
691    Accepted,
692    #[serde(rename = "Rejected")]
693    Rejected,
694    #[serde(rename = "Scheduled")]
695    Scheduled,
696}
697
698impl ChangeAvailabilityStatusEnum {
699    pub const ALL: &'static [ChangeAvailabilityStatusEnum] = &[
700        ChangeAvailabilityStatusEnum::Accepted,
701        ChangeAvailabilityStatusEnum::Rejected,
702        ChangeAvailabilityStatusEnum::Scheduled,
703    ];
704    /// Value as it appears on the wire.
705    pub const fn as_str(&self) -> &'static str {
706        match self {
707            ChangeAvailabilityStatusEnum::Accepted => "Accepted",
708            ChangeAvailabilityStatusEnum::Rejected => "Rejected",
709            ChangeAvailabilityStatusEnum::Scheduled => "Scheduled",
710        }
711    }
712}
713
714impl std::fmt::Display for ChangeAvailabilityStatusEnum {
715    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
716        f.write_str(self.as_str())
717    }
718}
719
720impl std::str::FromStr for ChangeAvailabilityStatusEnum {
721    type Err = ();
722    fn from_str(s: &str) -> Result<Self, ()> {
723        Self::ALL
724            .iter()
725            .copied()
726            .find(|v| v.as_str() == s)
727            .ok_or(())
728    }
729}
730
731impl Validate for ChangeAvailabilityStatusEnum {
732    #[inline]
733    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
734        Ok(())
735    }
736}
737
738/// Indicates the kind of schedule.
739#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
740pub enum ChargingProfileKindEnum {
741    #[serde(rename = "Absolute")]
742    Absolute,
743    #[serde(rename = "Recurring")]
744    Recurring,
745    #[serde(rename = "Relative")]
746    Relative,
747    #[serde(rename = "Dynamic")]
748    Dynamic,
749}
750
751impl ChargingProfileKindEnum {
752    pub const ALL: &'static [ChargingProfileKindEnum] = &[
753        ChargingProfileKindEnum::Absolute,
754        ChargingProfileKindEnum::Recurring,
755        ChargingProfileKindEnum::Relative,
756        ChargingProfileKindEnum::Dynamic,
757    ];
758    /// Value as it appears on the wire.
759    pub const fn as_str(&self) -> &'static str {
760        match self {
761            ChargingProfileKindEnum::Absolute => "Absolute",
762            ChargingProfileKindEnum::Recurring => "Recurring",
763            ChargingProfileKindEnum::Relative => "Relative",
764            ChargingProfileKindEnum::Dynamic => "Dynamic",
765        }
766    }
767}
768
769impl std::fmt::Display for ChargingProfileKindEnum {
770    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
771        f.write_str(self.as_str())
772    }
773}
774
775impl std::str::FromStr for ChargingProfileKindEnum {
776    type Err = ();
777    fn from_str(s: &str) -> Result<Self, ()> {
778        Self::ALL
779            .iter()
780            .copied()
781            .find(|v| v.as_str() == s)
782            .ok_or(())
783    }
784}
785
786impl Validate for ChargingProfileKindEnum {
787    #[inline]
788    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
789        Ok(())
790    }
791}
792
793/// Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request.
794#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
795pub enum ChargingProfilePurposeEnum {
796    #[serde(rename = "ChargingStationExternalConstraints")]
797    ChargingStationExternalConstraints,
798    #[serde(rename = "ChargingStationMaxProfile")]
799    ChargingStationMaxProfile,
800    #[serde(rename = "TxDefaultProfile")]
801    TxDefaultProfile,
802    #[serde(rename = "TxProfile")]
803    TxProfile,
804    #[serde(rename = "PriorityCharging")]
805    PriorityCharging,
806    #[serde(rename = "LocalGeneration")]
807    LocalGeneration,
808}
809
810impl ChargingProfilePurposeEnum {
811    pub const ALL: &'static [ChargingProfilePurposeEnum] = &[
812        ChargingProfilePurposeEnum::ChargingStationExternalConstraints,
813        ChargingProfilePurposeEnum::ChargingStationMaxProfile,
814        ChargingProfilePurposeEnum::TxDefaultProfile,
815        ChargingProfilePurposeEnum::TxProfile,
816        ChargingProfilePurposeEnum::PriorityCharging,
817        ChargingProfilePurposeEnum::LocalGeneration,
818    ];
819    /// Value as it appears on the wire.
820    pub const fn as_str(&self) -> &'static str {
821        match self {
822            ChargingProfilePurposeEnum::ChargingStationExternalConstraints => {
823                "ChargingStationExternalConstraints"
824            }
825            ChargingProfilePurposeEnum::ChargingStationMaxProfile => "ChargingStationMaxProfile",
826            ChargingProfilePurposeEnum::TxDefaultProfile => "TxDefaultProfile",
827            ChargingProfilePurposeEnum::TxProfile => "TxProfile",
828            ChargingProfilePurposeEnum::PriorityCharging => "PriorityCharging",
829            ChargingProfilePurposeEnum::LocalGeneration => "LocalGeneration",
830        }
831    }
832}
833
834impl std::fmt::Display for ChargingProfilePurposeEnum {
835    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
836        f.write_str(self.as_str())
837    }
838}
839
840impl std::str::FromStr for ChargingProfilePurposeEnum {
841    type Err = ();
842    fn from_str(s: &str) -> Result<Self, ()> {
843        Self::ALL
844            .iter()
845            .copied()
846            .find(|v| v.as_str() == s)
847            .ok_or(())
848    }
849}
850
851impl Validate for ChargingProfilePurposeEnum {
852    #[inline]
853    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
854        Ok(())
855    }
856}
857
858/// Result of request.
859#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
860pub enum ChargingProfileStatusEnum {
861    #[serde(rename = "Accepted")]
862    Accepted,
863    #[serde(rename = "Rejected")]
864    Rejected,
865}
866
867impl ChargingProfileStatusEnum {
868    pub const ALL: &'static [ChargingProfileStatusEnum] = &[
869        ChargingProfileStatusEnum::Accepted,
870        ChargingProfileStatusEnum::Rejected,
871    ];
872    /// Value as it appears on the wire.
873    pub const fn as_str(&self) -> &'static str {
874        match self {
875            ChargingProfileStatusEnum::Accepted => "Accepted",
876            ChargingProfileStatusEnum::Rejected => "Rejected",
877        }
878    }
879}
880
881impl std::fmt::Display for ChargingProfileStatusEnum {
882    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
883        f.write_str(self.as_str())
884    }
885}
886
887impl std::str::FromStr for ChargingProfileStatusEnum {
888    type Err = ();
889    fn from_str(s: &str) -> Result<Self, ()> {
890        Self::ALL
891            .iter()
892            .copied()
893            .find(|v| v.as_str() == s)
894            .ok_or(())
895    }
896}
897
898impl Validate for ChargingProfileStatusEnum {
899    #[inline]
900    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
901        Ok(())
902    }
903}
904
905/// Can be used to force a power or current profile.
906#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
907pub enum ChargingRateUnitEnum {
908    #[serde(rename = "W")]
909    W,
910    #[serde(rename = "A")]
911    A,
912}
913
914impl ChargingRateUnitEnum {
915    pub const ALL: &'static [ChargingRateUnitEnum] =
916        &[ChargingRateUnitEnum::W, ChargingRateUnitEnum::A];
917    /// Value as it appears on the wire.
918    pub const fn as_str(&self) -> &'static str {
919        match self {
920            ChargingRateUnitEnum::W => "W",
921            ChargingRateUnitEnum::A => "A",
922        }
923    }
924}
925
926impl std::fmt::Display for ChargingRateUnitEnum {
927    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
928        f.write_str(self.as_str())
929    }
930}
931
932impl std::str::FromStr for ChargingRateUnitEnum {
933    type Err = ();
934    fn from_str(s: &str) -> Result<Self, ()> {
935        Self::ALL
936            .iter()
937            .copied()
938            .find(|v| v.as_str() == s)
939            .ok_or(())
940    }
941}
942
943impl Validate for ChargingRateUnitEnum {
944    #[inline]
945    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
946        Ok(())
947    }
948}
949
950/// Current charging state, is required when state
951/// has changed. Omitted when there is no communication between EVSE and EV, because no cable is plugged in.
952#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
953pub enum ChargingStateEnum {
954    #[serde(rename = "EVConnected")]
955    EVConnected,
956    #[serde(rename = "Charging")]
957    Charging,
958    #[serde(rename = "SuspendedEV")]
959    SuspendedEV,
960    #[serde(rename = "SuspendedEVSE")]
961    SuspendedEVSE,
962    #[serde(rename = "Idle")]
963    Idle,
964}
965
966impl ChargingStateEnum {
967    pub const ALL: &'static [ChargingStateEnum] = &[
968        ChargingStateEnum::EVConnected,
969        ChargingStateEnum::Charging,
970        ChargingStateEnum::SuspendedEV,
971        ChargingStateEnum::SuspendedEVSE,
972        ChargingStateEnum::Idle,
973    ];
974    /// Value as it appears on the wire.
975    pub const fn as_str(&self) -> &'static str {
976        match self {
977            ChargingStateEnum::EVConnected => "EVConnected",
978            ChargingStateEnum::Charging => "Charging",
979            ChargingStateEnum::SuspendedEV => "SuspendedEV",
980            ChargingStateEnum::SuspendedEVSE => "SuspendedEVSE",
981            ChargingStateEnum::Idle => "Idle",
982        }
983    }
984}
985
986impl std::fmt::Display for ChargingStateEnum {
987    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
988        f.write_str(self.as_str())
989    }
990}
991
992impl std::str::FromStr for ChargingStateEnum {
993    type Err = ();
994    fn from_str(s: &str) -> Result<Self, ()> {
995        Self::ALL
996            .iter()
997            .copied()
998            .find(|v| v.as_str() == s)
999            .ok_or(())
1000    }
1001}
1002
1003impl Validate for ChargingStateEnum {
1004    #[inline]
1005    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1006        Ok(())
1007    }
1008}
1009
1010/// Accepted if the Charging Station has executed the request, otherwise rejected.
1011#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1012pub enum ClearCacheStatusEnum {
1013    #[serde(rename = "Accepted")]
1014    Accepted,
1015    #[serde(rename = "Rejected")]
1016    Rejected,
1017}
1018
1019impl ClearCacheStatusEnum {
1020    pub const ALL: &'static [ClearCacheStatusEnum] = &[
1021        ClearCacheStatusEnum::Accepted,
1022        ClearCacheStatusEnum::Rejected,
1023    ];
1024    /// Value as it appears on the wire.
1025    pub const fn as_str(&self) -> &'static str {
1026        match self {
1027            ClearCacheStatusEnum::Accepted => "Accepted",
1028            ClearCacheStatusEnum::Rejected => "Rejected",
1029        }
1030    }
1031}
1032
1033impl std::fmt::Display for ClearCacheStatusEnum {
1034    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1035        f.write_str(self.as_str())
1036    }
1037}
1038
1039impl std::str::FromStr for ClearCacheStatusEnum {
1040    type Err = ();
1041    fn from_str(s: &str) -> Result<Self, ()> {
1042        Self::ALL
1043            .iter()
1044            .copied()
1045            .find(|v| v.as_str() == s)
1046            .ok_or(())
1047    }
1048}
1049
1050impl Validate for ClearCacheStatusEnum {
1051    #[inline]
1052    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1053        Ok(())
1054    }
1055}
1056
1057/// Indicates if the Charging Station was able to execute the request.
1058#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1059pub enum ClearChargingProfileStatusEnum {
1060    #[serde(rename = "Accepted")]
1061    Accepted,
1062    #[serde(rename = "Unknown")]
1063    Unknown,
1064}
1065
1066impl ClearChargingProfileStatusEnum {
1067    pub const ALL: &'static [ClearChargingProfileStatusEnum] = &[
1068        ClearChargingProfileStatusEnum::Accepted,
1069        ClearChargingProfileStatusEnum::Unknown,
1070    ];
1071    /// Value as it appears on the wire.
1072    pub const fn as_str(&self) -> &'static str {
1073        match self {
1074            ClearChargingProfileStatusEnum::Accepted => "Accepted",
1075            ClearChargingProfileStatusEnum::Unknown => "Unknown",
1076        }
1077    }
1078}
1079
1080impl std::fmt::Display for ClearChargingProfileStatusEnum {
1081    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1082        f.write_str(self.as_str())
1083    }
1084}
1085
1086impl std::str::FromStr for ClearChargingProfileStatusEnum {
1087    type Err = ();
1088    fn from_str(s: &str) -> Result<Self, ()> {
1089        Self::ALL
1090            .iter()
1091            .copied()
1092            .find(|v| v.as_str() == s)
1093            .ok_or(())
1094    }
1095}
1096
1097impl Validate for ClearChargingProfileStatusEnum {
1098    #[inline]
1099    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1100        Ok(())
1101    }
1102}
1103
1104/// Returns whether the Charging Station has been able to remove the message.
1105#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1106pub enum ClearMessageStatusEnum {
1107    #[serde(rename = "Accepted")]
1108    Accepted,
1109    #[serde(rename = "Unknown")]
1110    Unknown,
1111    #[serde(rename = "Rejected")]
1112    Rejected,
1113}
1114
1115impl ClearMessageStatusEnum {
1116    pub const ALL: &'static [ClearMessageStatusEnum] = &[
1117        ClearMessageStatusEnum::Accepted,
1118        ClearMessageStatusEnum::Unknown,
1119        ClearMessageStatusEnum::Rejected,
1120    ];
1121    /// Value as it appears on the wire.
1122    pub const fn as_str(&self) -> &'static str {
1123        match self {
1124            ClearMessageStatusEnum::Accepted => "Accepted",
1125            ClearMessageStatusEnum::Unknown => "Unknown",
1126            ClearMessageStatusEnum::Rejected => "Rejected",
1127        }
1128    }
1129}
1130
1131impl std::fmt::Display for ClearMessageStatusEnum {
1132    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1133        f.write_str(self.as_str())
1134    }
1135}
1136
1137impl std::str::FromStr for ClearMessageStatusEnum {
1138    type Err = ();
1139    fn from_str(s: &str) -> Result<Self, ()> {
1140        Self::ALL
1141            .iter()
1142            .copied()
1143            .find(|v| v.as_str() == s)
1144            .ok_or(())
1145    }
1146}
1147
1148impl Validate for ClearMessageStatusEnum {
1149    #[inline]
1150    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1151        Ok(())
1152    }
1153}
1154
1155/// Result of the clear request for this monitor, identified by its Id.
1156#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1157pub enum ClearMonitoringStatusEnum {
1158    #[serde(rename = "Accepted")]
1159    Accepted,
1160    #[serde(rename = "Rejected")]
1161    Rejected,
1162    #[serde(rename = "NotFound")]
1163    NotFound,
1164}
1165
1166impl ClearMonitoringStatusEnum {
1167    pub const ALL: &'static [ClearMonitoringStatusEnum] = &[
1168        ClearMonitoringStatusEnum::Accepted,
1169        ClearMonitoringStatusEnum::Rejected,
1170        ClearMonitoringStatusEnum::NotFound,
1171    ];
1172    /// Value as it appears on the wire.
1173    pub const fn as_str(&self) -> &'static str {
1174        match self {
1175            ClearMonitoringStatusEnum::Accepted => "Accepted",
1176            ClearMonitoringStatusEnum::Rejected => "Rejected",
1177            ClearMonitoringStatusEnum::NotFound => "NotFound",
1178        }
1179    }
1180}
1181
1182impl std::fmt::Display for ClearMonitoringStatusEnum {
1183    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1184        f.write_str(self.as_str())
1185    }
1186}
1187
1188impl std::str::FromStr for ClearMonitoringStatusEnum {
1189    type Err = ();
1190    fn from_str(s: &str) -> Result<Self, ()> {
1191        Self::ALL
1192            .iter()
1193            .copied()
1194            .find(|v| v.as_str() == s)
1195            .ok_or(())
1196    }
1197}
1198
1199impl Validate for ClearMonitoringStatusEnum {
1200    #[inline]
1201    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1202        Ok(())
1203    }
1204}
1205
1206#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1207pub enum ComponentCriterionEnum {
1208    #[serde(rename = "Active")]
1209    Active,
1210    #[serde(rename = "Available")]
1211    Available,
1212    #[serde(rename = "Enabled")]
1213    Enabled,
1214    #[serde(rename = "Problem")]
1215    Problem,
1216}
1217
1218impl ComponentCriterionEnum {
1219    pub const ALL: &'static [ComponentCriterionEnum] = &[
1220        ComponentCriterionEnum::Active,
1221        ComponentCriterionEnum::Available,
1222        ComponentCriterionEnum::Enabled,
1223        ComponentCriterionEnum::Problem,
1224    ];
1225    /// Value as it appears on the wire.
1226    pub const fn as_str(&self) -> &'static str {
1227        match self {
1228            ComponentCriterionEnum::Active => "Active",
1229            ComponentCriterionEnum::Available => "Available",
1230            ComponentCriterionEnum::Enabled => "Enabled",
1231            ComponentCriterionEnum::Problem => "Problem",
1232        }
1233    }
1234}
1235
1236impl std::fmt::Display for ComponentCriterionEnum {
1237    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1238        f.write_str(self.as_str())
1239    }
1240}
1241
1242impl std::str::FromStr for ComponentCriterionEnum {
1243    type Err = ();
1244    fn from_str(s: &str) -> Result<Self, ()> {
1245        Self::ALL
1246            .iter()
1247            .copied()
1248            .find(|v| v.as_str() == s)
1249            .ok_or(())
1250    }
1251}
1252
1253impl Validate for ComponentCriterionEnum {
1254    #[inline]
1255    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1256        Ok(())
1257    }
1258}
1259
1260/// This contains the current status of the Connector.
1261#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1262pub enum ConnectorStatusEnum {
1263    #[serde(rename = "Available")]
1264    Available,
1265    #[serde(rename = "Occupied")]
1266    Occupied,
1267    #[serde(rename = "Reserved")]
1268    Reserved,
1269    #[serde(rename = "Unavailable")]
1270    Unavailable,
1271    #[serde(rename = "Faulted")]
1272    Faulted,
1273}
1274
1275impl ConnectorStatusEnum {
1276    pub const ALL: &'static [ConnectorStatusEnum] = &[
1277        ConnectorStatusEnum::Available,
1278        ConnectorStatusEnum::Occupied,
1279        ConnectorStatusEnum::Reserved,
1280        ConnectorStatusEnum::Unavailable,
1281        ConnectorStatusEnum::Faulted,
1282    ];
1283    /// Value as it appears on the wire.
1284    pub const fn as_str(&self) -> &'static str {
1285        match self {
1286            ConnectorStatusEnum::Available => "Available",
1287            ConnectorStatusEnum::Occupied => "Occupied",
1288            ConnectorStatusEnum::Reserved => "Reserved",
1289            ConnectorStatusEnum::Unavailable => "Unavailable",
1290            ConnectorStatusEnum::Faulted => "Faulted",
1291        }
1292    }
1293}
1294
1295impl std::fmt::Display for ConnectorStatusEnum {
1296    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1297        f.write_str(self.as_str())
1298    }
1299}
1300
1301impl std::str::FromStr for ConnectorStatusEnum {
1302    type Err = ();
1303    fn from_str(s: &str) -> Result<Self, ()> {
1304        Self::ALL
1305            .iter()
1306            .copied()
1307            .find(|v| v.as_str() == s)
1308            .ok_or(())
1309    }
1310}
1311
1312impl Validate for ConnectorStatusEnum {
1313    #[inline]
1314    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1315        Ok(())
1316    }
1317}
1318
1319/// *(2.1)* Indicates whether EV wants to operate in Dynamic or Scheduled mode. When absent, Scheduled mode is assumed for backwards compatibility. +
1320/// *ISO 15118-20:* +
1321/// ServiceSelectionReq(SelectedEnergyTransferService)
1322#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1323pub enum ControlModeEnum {
1324    #[serde(rename = "ScheduledControl")]
1325    ScheduledControl,
1326    #[serde(rename = "DynamicControl")]
1327    DynamicControl,
1328}
1329
1330impl ControlModeEnum {
1331    pub const ALL: &'static [ControlModeEnum] = &[
1332        ControlModeEnum::ScheduledControl,
1333        ControlModeEnum::DynamicControl,
1334    ];
1335    /// Value as it appears on the wire.
1336    pub const fn as_str(&self) -> &'static str {
1337        match self {
1338            ControlModeEnum::ScheduledControl => "ScheduledControl",
1339            ControlModeEnum::DynamicControl => "DynamicControl",
1340        }
1341    }
1342}
1343
1344impl std::fmt::Display for ControlModeEnum {
1345    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1346        f.write_str(self.as_str())
1347    }
1348}
1349
1350impl std::str::FromStr for ControlModeEnum {
1351    type Err = ();
1352    fn from_str(s: &str) -> Result<Self, ()> {
1353        Self::ALL
1354            .iter()
1355            .copied()
1356            .find(|v| v.as_str() == s)
1357            .ok_or(())
1358    }
1359}
1360
1361impl Validate for ControlModeEnum {
1362    #[inline]
1363    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1364        Ok(())
1365    }
1366}
1367
1368/// Type of cost dimension: energy, power, time, etc.
1369#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1370pub enum CostDimensionEnum {
1371    #[serde(rename = "Energy")]
1372    Energy,
1373    #[serde(rename = "MaxCurrent")]
1374    MaxCurrent,
1375    #[serde(rename = "MinCurrent")]
1376    MinCurrent,
1377    #[serde(rename = "MaxPower")]
1378    MaxPower,
1379    #[serde(rename = "MinPower")]
1380    MinPower,
1381    #[serde(rename = "IdleTIme")]
1382    IdleTIme,
1383    #[serde(rename = "ChargingTime")]
1384    ChargingTime,
1385}
1386
1387impl CostDimensionEnum {
1388    pub const ALL: &'static [CostDimensionEnum] = &[
1389        CostDimensionEnum::Energy,
1390        CostDimensionEnum::MaxCurrent,
1391        CostDimensionEnum::MinCurrent,
1392        CostDimensionEnum::MaxPower,
1393        CostDimensionEnum::MinPower,
1394        CostDimensionEnum::IdleTIme,
1395        CostDimensionEnum::ChargingTime,
1396    ];
1397    /// Value as it appears on the wire.
1398    pub const fn as_str(&self) -> &'static str {
1399        match self {
1400            CostDimensionEnum::Energy => "Energy",
1401            CostDimensionEnum::MaxCurrent => "MaxCurrent",
1402            CostDimensionEnum::MinCurrent => "MinCurrent",
1403            CostDimensionEnum::MaxPower => "MaxPower",
1404            CostDimensionEnum::MinPower => "MinPower",
1405            CostDimensionEnum::IdleTIme => "IdleTIme",
1406            CostDimensionEnum::ChargingTime => "ChargingTime",
1407        }
1408    }
1409}
1410
1411impl std::fmt::Display for CostDimensionEnum {
1412    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1413        f.write_str(self.as_str())
1414    }
1415}
1416
1417impl std::str::FromStr for CostDimensionEnum {
1418    type Err = ();
1419    fn from_str(s: &str) -> Result<Self, ()> {
1420        Self::ALL
1421            .iter()
1422            .copied()
1423            .find(|v| v.as_str() == s)
1424            .ok_or(())
1425    }
1426}
1427
1428impl Validate for CostDimensionEnum {
1429    #[inline]
1430    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1431        Ok(())
1432    }
1433}
1434
1435/// The kind of cost referred to in the message element amount
1436#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1437pub enum CostKindEnum {
1438    #[serde(rename = "CarbonDioxideEmission")]
1439    CarbonDioxideEmission,
1440    #[serde(rename = "RelativePricePercentage")]
1441    RelativePricePercentage,
1442    #[serde(rename = "RenewableGenerationPercentage")]
1443    RenewableGenerationPercentage,
1444}
1445
1446impl CostKindEnum {
1447    pub const ALL: &'static [CostKindEnum] = &[
1448        CostKindEnum::CarbonDioxideEmission,
1449        CostKindEnum::RelativePricePercentage,
1450        CostKindEnum::RenewableGenerationPercentage,
1451    ];
1452    /// Value as it appears on the wire.
1453    pub const fn as_str(&self) -> &'static str {
1454        match self {
1455            CostKindEnum::CarbonDioxideEmission => "CarbonDioxideEmission",
1456            CostKindEnum::RelativePricePercentage => "RelativePricePercentage",
1457            CostKindEnum::RenewableGenerationPercentage => "RenewableGenerationPercentage",
1458        }
1459    }
1460}
1461
1462impl std::fmt::Display for CostKindEnum {
1463    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1464        f.write_str(self.as_str())
1465    }
1466}
1467
1468impl std::str::FromStr for CostKindEnum {
1469    type Err = ();
1470    fn from_str(s: &str) -> Result<Self, ()> {
1471        Self::ALL
1472            .iter()
1473            .copied()
1474            .find(|v| v.as_str() == s)
1475            .ok_or(())
1476    }
1477}
1478
1479impl Validate for CostKindEnum {
1480    #[inline]
1481    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1482        Ok(())
1483    }
1484}
1485
1486/// Indicates whether the request was accepted.
1487#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1488pub enum CustomerInformationStatusEnum {
1489    #[serde(rename = "Accepted")]
1490    Accepted,
1491    #[serde(rename = "Rejected")]
1492    Rejected,
1493    #[serde(rename = "Invalid")]
1494    Invalid,
1495}
1496
1497impl CustomerInformationStatusEnum {
1498    pub const ALL: &'static [CustomerInformationStatusEnum] = &[
1499        CustomerInformationStatusEnum::Accepted,
1500        CustomerInformationStatusEnum::Rejected,
1501        CustomerInformationStatusEnum::Invalid,
1502    ];
1503    /// Value as it appears on the wire.
1504    pub const fn as_str(&self) -> &'static str {
1505        match self {
1506            CustomerInformationStatusEnum::Accepted => "Accepted",
1507            CustomerInformationStatusEnum::Rejected => "Rejected",
1508            CustomerInformationStatusEnum::Invalid => "Invalid",
1509        }
1510    }
1511}
1512
1513impl std::fmt::Display for CustomerInformationStatusEnum {
1514    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1515        f.write_str(self.as_str())
1516    }
1517}
1518
1519impl std::str::FromStr for CustomerInformationStatusEnum {
1520    type Err = ();
1521    fn from_str(s: &str) -> Result<Self, ()> {
1522        Self::ALL
1523            .iter()
1524            .copied()
1525            .find(|v| v.as_str() == s)
1526            .ok_or(())
1527    }
1528}
1529
1530impl Validate for CustomerInformationStatusEnum {
1531    #[inline]
1532    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1533        Ok(())
1534    }
1535}
1536
1537/// Name of control settings to clear. Not used when _controlId_ is provided.
1538#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1539pub enum DERControlEnum {
1540    #[serde(rename = "EnterService")]
1541    EnterService,
1542    #[serde(rename = "FreqDroop")]
1543    FreqDroop,
1544    #[serde(rename = "FreqWatt")]
1545    FreqWatt,
1546    #[serde(rename = "FixedPFAbsorb")]
1547    FixedPFAbsorb,
1548    #[serde(rename = "FixedPFInject")]
1549    FixedPFInject,
1550    #[serde(rename = "FixedVar")]
1551    FixedVar,
1552    #[serde(rename = "Gradients")]
1553    Gradients,
1554    #[serde(rename = "HFMustTrip")]
1555    HFMustTrip,
1556    #[serde(rename = "HFMayTrip")]
1557    HFMayTrip,
1558    #[serde(rename = "HVMustTrip")]
1559    HVMustTrip,
1560    #[serde(rename = "HVMomCess")]
1561    HVMomCess,
1562    #[serde(rename = "HVMayTrip")]
1563    HVMayTrip,
1564    #[serde(rename = "LimitMaxDischarge")]
1565    LimitMaxDischarge,
1566    #[serde(rename = "LFMustTrip")]
1567    LFMustTrip,
1568    #[serde(rename = "LVMustTrip")]
1569    LVMustTrip,
1570    #[serde(rename = "LVMomCess")]
1571    LVMomCess,
1572    #[serde(rename = "LVMayTrip")]
1573    LVMayTrip,
1574    #[serde(rename = "PowerMonitoringMustTrip")]
1575    PowerMonitoringMustTrip,
1576    #[serde(rename = "VoltVar")]
1577    VoltVar,
1578    #[serde(rename = "VoltWatt")]
1579    VoltWatt,
1580    #[serde(rename = "WattPF")]
1581    WattPF,
1582    #[serde(rename = "WattVar")]
1583    WattVar,
1584}
1585
1586impl DERControlEnum {
1587    pub const ALL: &'static [DERControlEnum] = &[
1588        DERControlEnum::EnterService,
1589        DERControlEnum::FreqDroop,
1590        DERControlEnum::FreqWatt,
1591        DERControlEnum::FixedPFAbsorb,
1592        DERControlEnum::FixedPFInject,
1593        DERControlEnum::FixedVar,
1594        DERControlEnum::Gradients,
1595        DERControlEnum::HFMustTrip,
1596        DERControlEnum::HFMayTrip,
1597        DERControlEnum::HVMustTrip,
1598        DERControlEnum::HVMomCess,
1599        DERControlEnum::HVMayTrip,
1600        DERControlEnum::LimitMaxDischarge,
1601        DERControlEnum::LFMustTrip,
1602        DERControlEnum::LVMustTrip,
1603        DERControlEnum::LVMomCess,
1604        DERControlEnum::LVMayTrip,
1605        DERControlEnum::PowerMonitoringMustTrip,
1606        DERControlEnum::VoltVar,
1607        DERControlEnum::VoltWatt,
1608        DERControlEnum::WattPF,
1609        DERControlEnum::WattVar,
1610    ];
1611    /// Value as it appears on the wire.
1612    pub const fn as_str(&self) -> &'static str {
1613        match self {
1614            DERControlEnum::EnterService => "EnterService",
1615            DERControlEnum::FreqDroop => "FreqDroop",
1616            DERControlEnum::FreqWatt => "FreqWatt",
1617            DERControlEnum::FixedPFAbsorb => "FixedPFAbsorb",
1618            DERControlEnum::FixedPFInject => "FixedPFInject",
1619            DERControlEnum::FixedVar => "FixedVar",
1620            DERControlEnum::Gradients => "Gradients",
1621            DERControlEnum::HFMustTrip => "HFMustTrip",
1622            DERControlEnum::HFMayTrip => "HFMayTrip",
1623            DERControlEnum::HVMustTrip => "HVMustTrip",
1624            DERControlEnum::HVMomCess => "HVMomCess",
1625            DERControlEnum::HVMayTrip => "HVMayTrip",
1626            DERControlEnum::LimitMaxDischarge => "LimitMaxDischarge",
1627            DERControlEnum::LFMustTrip => "LFMustTrip",
1628            DERControlEnum::LVMustTrip => "LVMustTrip",
1629            DERControlEnum::LVMomCess => "LVMomCess",
1630            DERControlEnum::LVMayTrip => "LVMayTrip",
1631            DERControlEnum::PowerMonitoringMustTrip => "PowerMonitoringMustTrip",
1632            DERControlEnum::VoltVar => "VoltVar",
1633            DERControlEnum::VoltWatt => "VoltWatt",
1634            DERControlEnum::WattPF => "WattPF",
1635            DERControlEnum::WattVar => "WattVar",
1636        }
1637    }
1638}
1639
1640impl std::fmt::Display for DERControlEnum {
1641    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1642        f.write_str(self.as_str())
1643    }
1644}
1645
1646impl std::str::FromStr for DERControlEnum {
1647    type Err = ();
1648    fn from_str(s: &str) -> Result<Self, ()> {
1649        Self::ALL
1650            .iter()
1651            .copied()
1652            .find(|v| v.as_str() == s)
1653            .ok_or(())
1654    }
1655}
1656
1657impl Validate for DERControlEnum {
1658    #[inline]
1659    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1660        Ok(())
1661    }
1662}
1663
1664/// Result of operation.
1665#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1666pub enum DERControlStatusEnum {
1667    #[serde(rename = "Accepted")]
1668    Accepted,
1669    #[serde(rename = "Rejected")]
1670    Rejected,
1671    #[serde(rename = "NotSupported")]
1672    NotSupported,
1673    #[serde(rename = "NotFound")]
1674    NotFound,
1675}
1676
1677impl DERControlStatusEnum {
1678    pub const ALL: &'static [DERControlStatusEnum] = &[
1679        DERControlStatusEnum::Accepted,
1680        DERControlStatusEnum::Rejected,
1681        DERControlStatusEnum::NotSupported,
1682        DERControlStatusEnum::NotFound,
1683    ];
1684    /// Value as it appears on the wire.
1685    pub const fn as_str(&self) -> &'static str {
1686        match self {
1687            DERControlStatusEnum::Accepted => "Accepted",
1688            DERControlStatusEnum::Rejected => "Rejected",
1689            DERControlStatusEnum::NotSupported => "NotSupported",
1690            DERControlStatusEnum::NotFound => "NotFound",
1691        }
1692    }
1693}
1694
1695impl std::fmt::Display for DERControlStatusEnum {
1696    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1697        f.write_str(self.as_str())
1698    }
1699}
1700
1701impl std::str::FromStr for DERControlStatusEnum {
1702    type Err = ();
1703    fn from_str(s: &str) -> Result<Self, ()> {
1704        Self::ALL
1705            .iter()
1706            .copied()
1707            .find(|v| v.as_str() == s)
1708            .ok_or(())
1709    }
1710}
1711
1712impl Validate for DERControlStatusEnum {
1713    #[inline]
1714    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1715        Ok(())
1716    }
1717}
1718
1719/// Unit of the Y-axis of DER curve
1720#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1721pub enum DERUnitEnum {
1722    #[serde(rename = "Not_Applicable")]
1723    NotApplicable,
1724    #[serde(rename = "PctMaxW")]
1725    PctMaxW,
1726    #[serde(rename = "PctMaxVar")]
1727    PctMaxVar,
1728    #[serde(rename = "PctWAvail")]
1729    PctWAvail,
1730    #[serde(rename = "PctVarAvail")]
1731    PctVarAvail,
1732    #[serde(rename = "PctEffectiveV")]
1733    PctEffectiveV,
1734}
1735
1736impl DERUnitEnum {
1737    pub const ALL: &'static [DERUnitEnum] = &[
1738        DERUnitEnum::NotApplicable,
1739        DERUnitEnum::PctMaxW,
1740        DERUnitEnum::PctMaxVar,
1741        DERUnitEnum::PctWAvail,
1742        DERUnitEnum::PctVarAvail,
1743        DERUnitEnum::PctEffectiveV,
1744    ];
1745    /// Value as it appears on the wire.
1746    pub const fn as_str(&self) -> &'static str {
1747        match self {
1748            DERUnitEnum::NotApplicable => "Not_Applicable",
1749            DERUnitEnum::PctMaxW => "PctMaxW",
1750            DERUnitEnum::PctMaxVar => "PctMaxVar",
1751            DERUnitEnum::PctWAvail => "PctWAvail",
1752            DERUnitEnum::PctVarAvail => "PctVarAvail",
1753            DERUnitEnum::PctEffectiveV => "PctEffectiveV",
1754        }
1755    }
1756}
1757
1758impl std::fmt::Display for DERUnitEnum {
1759    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1760        f.write_str(self.as_str())
1761    }
1762}
1763
1764impl std::str::FromStr for DERUnitEnum {
1765    type Err = ();
1766    fn from_str(s: &str) -> Result<Self, ()> {
1767        Self::ALL
1768            .iter()
1769            .copied()
1770            .find(|v| v.as_str() == s)
1771            .ok_or(())
1772    }
1773}
1774
1775impl Validate for DERUnitEnum {
1776    #[inline]
1777    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1778        Ok(())
1779    }
1780}
1781
1782/// Data type of this variable.
1783#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1784pub enum DataEnum {
1785    #[serde(rename = "string")]
1786    String,
1787    #[serde(rename = "decimal")]
1788    Decimal,
1789    #[serde(rename = "integer")]
1790    Integer,
1791    #[serde(rename = "dateTime")]
1792    DateTime,
1793    #[serde(rename = "boolean")]
1794    Boolean,
1795    #[serde(rename = "OptionList")]
1796    OptionList,
1797    #[serde(rename = "SequenceList")]
1798    SequenceList,
1799    #[serde(rename = "MemberList")]
1800    MemberList,
1801}
1802
1803impl DataEnum {
1804    pub const ALL: &'static [DataEnum] = &[
1805        DataEnum::String,
1806        DataEnum::Decimal,
1807        DataEnum::Integer,
1808        DataEnum::DateTime,
1809        DataEnum::Boolean,
1810        DataEnum::OptionList,
1811        DataEnum::SequenceList,
1812        DataEnum::MemberList,
1813    ];
1814    /// Value as it appears on the wire.
1815    pub const fn as_str(&self) -> &'static str {
1816        match self {
1817            DataEnum::String => "string",
1818            DataEnum::Decimal => "decimal",
1819            DataEnum::Integer => "integer",
1820            DataEnum::DateTime => "dateTime",
1821            DataEnum::Boolean => "boolean",
1822            DataEnum::OptionList => "OptionList",
1823            DataEnum::SequenceList => "SequenceList",
1824            DataEnum::MemberList => "MemberList",
1825        }
1826    }
1827}
1828
1829impl std::fmt::Display for DataEnum {
1830    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1831        f.write_str(self.as_str())
1832    }
1833}
1834
1835impl std::str::FromStr for DataEnum {
1836    type Err = ();
1837    fn from_str(s: &str) -> Result<Self, ()> {
1838        Self::ALL
1839            .iter()
1840            .copied()
1841            .find(|v| v.as_str() == s)
1842            .ok_or(())
1843    }
1844}
1845
1846impl Validate for DataEnum {
1847    #[inline]
1848    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1849        Ok(())
1850    }
1851}
1852
1853/// This indicates the success or failure of the data transfer.
1854#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1855pub enum DataTransferStatusEnum {
1856    #[serde(rename = "Accepted")]
1857    Accepted,
1858    #[serde(rename = "Rejected")]
1859    Rejected,
1860    #[serde(rename = "UnknownMessageId")]
1861    UnknownMessageId,
1862    #[serde(rename = "UnknownVendorId")]
1863    UnknownVendorId,
1864}
1865
1866impl DataTransferStatusEnum {
1867    pub const ALL: &'static [DataTransferStatusEnum] = &[
1868        DataTransferStatusEnum::Accepted,
1869        DataTransferStatusEnum::Rejected,
1870        DataTransferStatusEnum::UnknownMessageId,
1871        DataTransferStatusEnum::UnknownVendorId,
1872    ];
1873    /// Value as it appears on the wire.
1874    pub const fn as_str(&self) -> &'static str {
1875        match self {
1876            DataTransferStatusEnum::Accepted => "Accepted",
1877            DataTransferStatusEnum::Rejected => "Rejected",
1878            DataTransferStatusEnum::UnknownMessageId => "UnknownMessageId",
1879            DataTransferStatusEnum::UnknownVendorId => "UnknownVendorId",
1880        }
1881    }
1882}
1883
1884impl std::fmt::Display for DataTransferStatusEnum {
1885    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1886        f.write_str(self.as_str())
1887    }
1888}
1889
1890impl std::str::FromStr for DataTransferStatusEnum {
1891    type Err = ();
1892    fn from_str(s: &str) -> Result<Self, ()> {
1893        Self::ALL
1894            .iter()
1895            .copied()
1896            .find(|v| v.as_str() == s)
1897            .ok_or(())
1898    }
1899}
1900
1901impl Validate for DataTransferStatusEnum {
1902    #[inline]
1903    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1904        Ok(())
1905    }
1906}
1907
1908#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1909pub enum DayOfWeekEnum {
1910    #[serde(rename = "Monday")]
1911    Monday,
1912    #[serde(rename = "Tuesday")]
1913    Tuesday,
1914    #[serde(rename = "Wednesday")]
1915    Wednesday,
1916    #[serde(rename = "Thursday")]
1917    Thursday,
1918    #[serde(rename = "Friday")]
1919    Friday,
1920    #[serde(rename = "Saturday")]
1921    Saturday,
1922    #[serde(rename = "Sunday")]
1923    Sunday,
1924}
1925
1926impl DayOfWeekEnum {
1927    pub const ALL: &'static [DayOfWeekEnum] = &[
1928        DayOfWeekEnum::Monday,
1929        DayOfWeekEnum::Tuesday,
1930        DayOfWeekEnum::Wednesday,
1931        DayOfWeekEnum::Thursday,
1932        DayOfWeekEnum::Friday,
1933        DayOfWeekEnum::Saturday,
1934        DayOfWeekEnum::Sunday,
1935    ];
1936    /// Value as it appears on the wire.
1937    pub const fn as_str(&self) -> &'static str {
1938        match self {
1939            DayOfWeekEnum::Monday => "Monday",
1940            DayOfWeekEnum::Tuesday => "Tuesday",
1941            DayOfWeekEnum::Wednesday => "Wednesday",
1942            DayOfWeekEnum::Thursday => "Thursday",
1943            DayOfWeekEnum::Friday => "Friday",
1944            DayOfWeekEnum::Saturday => "Saturday",
1945            DayOfWeekEnum::Sunday => "Sunday",
1946        }
1947    }
1948}
1949
1950impl std::fmt::Display for DayOfWeekEnum {
1951    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1952        f.write_str(self.as_str())
1953    }
1954}
1955
1956impl std::str::FromStr for DayOfWeekEnum {
1957    type Err = ();
1958    fn from_str(s: &str) -> Result<Self, ()> {
1959        Self::ALL
1960            .iter()
1961            .copied()
1962            .find(|v| v.as_str() == s)
1963            .ok_or(())
1964    }
1965}
1966
1967impl Validate for DayOfWeekEnum {
1968    #[inline]
1969    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1970        Ok(())
1971    }
1972}
1973
1974/// Charging Station indicates if it can process the request.
1975#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1976pub enum DeleteCertificateStatusEnum {
1977    #[serde(rename = "Accepted")]
1978    Accepted,
1979    #[serde(rename = "Failed")]
1980    Failed,
1981    #[serde(rename = "NotFound")]
1982    NotFound,
1983}
1984
1985impl DeleteCertificateStatusEnum {
1986    pub const ALL: &'static [DeleteCertificateStatusEnum] = &[
1987        DeleteCertificateStatusEnum::Accepted,
1988        DeleteCertificateStatusEnum::Failed,
1989        DeleteCertificateStatusEnum::NotFound,
1990    ];
1991    /// Value as it appears on the wire.
1992    pub const fn as_str(&self) -> &'static str {
1993        match self {
1994            DeleteCertificateStatusEnum::Accepted => "Accepted",
1995            DeleteCertificateStatusEnum::Failed => "Failed",
1996            DeleteCertificateStatusEnum::NotFound => "NotFound",
1997        }
1998    }
1999}
2000
2001impl std::fmt::Display for DeleteCertificateStatusEnum {
2002    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2003        f.write_str(self.as_str())
2004    }
2005}
2006
2007impl std::str::FromStr for DeleteCertificateStatusEnum {
2008    type Err = ();
2009    fn from_str(s: &str) -> Result<Self, ()> {
2010        Self::ALL
2011            .iter()
2012            .copied()
2013            .find(|v| v.as_str() == s)
2014            .ok_or(())
2015    }
2016}
2017
2018impl Validate for DeleteCertificateStatusEnum {
2019    #[inline]
2020    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2021        Ok(())
2022    }
2023}
2024
2025/// This indicates whether the Charging Station is able to display the message.
2026#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2027pub enum DisplayMessageStatusEnum {
2028    #[serde(rename = "Accepted")]
2029    Accepted,
2030    #[serde(rename = "NotSupportedMessageFormat")]
2031    NotSupportedMessageFormat,
2032    #[serde(rename = "Rejected")]
2033    Rejected,
2034    #[serde(rename = "NotSupportedPriority")]
2035    NotSupportedPriority,
2036    #[serde(rename = "NotSupportedState")]
2037    NotSupportedState,
2038    #[serde(rename = "UnknownTransaction")]
2039    UnknownTransaction,
2040    #[serde(rename = "LanguageNotSupported")]
2041    LanguageNotSupported,
2042}
2043
2044impl DisplayMessageStatusEnum {
2045    pub const ALL: &'static [DisplayMessageStatusEnum] = &[
2046        DisplayMessageStatusEnum::Accepted,
2047        DisplayMessageStatusEnum::NotSupportedMessageFormat,
2048        DisplayMessageStatusEnum::Rejected,
2049        DisplayMessageStatusEnum::NotSupportedPriority,
2050        DisplayMessageStatusEnum::NotSupportedState,
2051        DisplayMessageStatusEnum::UnknownTransaction,
2052        DisplayMessageStatusEnum::LanguageNotSupported,
2053    ];
2054    /// Value as it appears on the wire.
2055    pub const fn as_str(&self) -> &'static str {
2056        match self {
2057            DisplayMessageStatusEnum::Accepted => "Accepted",
2058            DisplayMessageStatusEnum::NotSupportedMessageFormat => "NotSupportedMessageFormat",
2059            DisplayMessageStatusEnum::Rejected => "Rejected",
2060            DisplayMessageStatusEnum::NotSupportedPriority => "NotSupportedPriority",
2061            DisplayMessageStatusEnum::NotSupportedState => "NotSupportedState",
2062            DisplayMessageStatusEnum::UnknownTransaction => "UnknownTransaction",
2063            DisplayMessageStatusEnum::LanguageNotSupported => "LanguageNotSupported",
2064        }
2065    }
2066}
2067
2068impl std::fmt::Display for DisplayMessageStatusEnum {
2069    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2070        f.write_str(self.as_str())
2071    }
2072}
2073
2074impl std::str::FromStr for DisplayMessageStatusEnum {
2075    type Err = ();
2076    fn from_str(s: &str) -> Result<Self, ()> {
2077        Self::ALL
2078            .iter()
2079            .copied()
2080            .find(|v| v.as_str() == s)
2081            .ok_or(())
2082    }
2083}
2084
2085impl Validate for DisplayMessageStatusEnum {
2086    #[inline]
2087    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2088        Ok(())
2089    }
2090}
2091
2092#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2093pub enum EnergyTransferModeEnum {
2094    #[serde(rename = "AC_single_phase")]
2095    ACSinglePhase,
2096    #[serde(rename = "AC_two_phase")]
2097    ACTwoPhase,
2098    #[serde(rename = "AC_three_phase")]
2099    ACThreePhase,
2100    #[serde(rename = "DC")]
2101    DC,
2102    #[serde(rename = "AC_BPT")]
2103    ACBPT,
2104    #[serde(rename = "AC_BPT_DER")]
2105    ACBPTDER,
2106    #[serde(rename = "AC_DER")]
2107    ACDER,
2108    #[serde(rename = "DC_BPT")]
2109    DCBPT,
2110    #[serde(rename = "DC_ACDP")]
2111    DCACDP,
2112    #[serde(rename = "DC_ACDP_BPT")]
2113    DCACDPBPT,
2114    #[serde(rename = "WPT")]
2115    WPT,
2116}
2117
2118impl EnergyTransferModeEnum {
2119    pub const ALL: &'static [EnergyTransferModeEnum] = &[
2120        EnergyTransferModeEnum::ACSinglePhase,
2121        EnergyTransferModeEnum::ACTwoPhase,
2122        EnergyTransferModeEnum::ACThreePhase,
2123        EnergyTransferModeEnum::DC,
2124        EnergyTransferModeEnum::ACBPT,
2125        EnergyTransferModeEnum::ACBPTDER,
2126        EnergyTransferModeEnum::ACDER,
2127        EnergyTransferModeEnum::DCBPT,
2128        EnergyTransferModeEnum::DCACDP,
2129        EnergyTransferModeEnum::DCACDPBPT,
2130        EnergyTransferModeEnum::WPT,
2131    ];
2132    /// Value as it appears on the wire.
2133    pub const fn as_str(&self) -> &'static str {
2134        match self {
2135            EnergyTransferModeEnum::ACSinglePhase => "AC_single_phase",
2136            EnergyTransferModeEnum::ACTwoPhase => "AC_two_phase",
2137            EnergyTransferModeEnum::ACThreePhase => "AC_three_phase",
2138            EnergyTransferModeEnum::DC => "DC",
2139            EnergyTransferModeEnum::ACBPT => "AC_BPT",
2140            EnergyTransferModeEnum::ACBPTDER => "AC_BPT_DER",
2141            EnergyTransferModeEnum::ACDER => "AC_DER",
2142            EnergyTransferModeEnum::DCBPT => "DC_BPT",
2143            EnergyTransferModeEnum::DCACDP => "DC_ACDP",
2144            EnergyTransferModeEnum::DCACDPBPT => "DC_ACDP_BPT",
2145            EnergyTransferModeEnum::WPT => "WPT",
2146        }
2147    }
2148}
2149
2150impl std::fmt::Display for EnergyTransferModeEnum {
2151    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2152        f.write_str(self.as_str())
2153    }
2154}
2155
2156impl std::str::FromStr for EnergyTransferModeEnum {
2157    type Err = ();
2158    fn from_str(s: &str) -> Result<Self, ()> {
2159        Self::ALL
2160            .iter()
2161            .copied()
2162            .find(|v| v.as_str() == s)
2163            .ok_or(())
2164    }
2165}
2166
2167impl Validate for EnergyTransferModeEnum {
2168    #[inline]
2169    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2170        Ok(())
2171    }
2172}
2173
2174/// Specifies the event notification type of the message.
2175#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2176pub enum EventNotificationEnum {
2177    #[serde(rename = "HardWiredNotification")]
2178    HardWiredNotification,
2179    #[serde(rename = "HardWiredMonitor")]
2180    HardWiredMonitor,
2181    #[serde(rename = "PreconfiguredMonitor")]
2182    PreconfiguredMonitor,
2183    #[serde(rename = "CustomMonitor")]
2184    CustomMonitor,
2185}
2186
2187impl EventNotificationEnum {
2188    pub const ALL: &'static [EventNotificationEnum] = &[
2189        EventNotificationEnum::HardWiredNotification,
2190        EventNotificationEnum::HardWiredMonitor,
2191        EventNotificationEnum::PreconfiguredMonitor,
2192        EventNotificationEnum::CustomMonitor,
2193    ];
2194    /// Value as it appears on the wire.
2195    pub const fn as_str(&self) -> &'static str {
2196        match self {
2197            EventNotificationEnum::HardWiredNotification => "HardWiredNotification",
2198            EventNotificationEnum::HardWiredMonitor => "HardWiredMonitor",
2199            EventNotificationEnum::PreconfiguredMonitor => "PreconfiguredMonitor",
2200            EventNotificationEnum::CustomMonitor => "CustomMonitor",
2201        }
2202    }
2203}
2204
2205impl std::fmt::Display for EventNotificationEnum {
2206    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2207        f.write_str(self.as_str())
2208    }
2209}
2210
2211impl std::str::FromStr for EventNotificationEnum {
2212    type Err = ();
2213    fn from_str(s: &str) -> Result<Self, ()> {
2214        Self::ALL
2215            .iter()
2216            .copied()
2217            .find(|v| v.as_str() == s)
2218            .ok_or(())
2219    }
2220}
2221
2222impl Validate for EventNotificationEnum {
2223    #[inline]
2224    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2225        Ok(())
2226    }
2227}
2228
2229/// Type of trigger for this event, e.g. exceeding a threshold value.
2230#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2231pub enum EventTriggerEnum {
2232    #[serde(rename = "Alerting")]
2233    Alerting,
2234    #[serde(rename = "Delta")]
2235    Delta,
2236    #[serde(rename = "Periodic")]
2237    Periodic,
2238}
2239
2240impl EventTriggerEnum {
2241    pub const ALL: &'static [EventTriggerEnum] = &[
2242        EventTriggerEnum::Alerting,
2243        EventTriggerEnum::Delta,
2244        EventTriggerEnum::Periodic,
2245    ];
2246    /// Value as it appears on the wire.
2247    pub const fn as_str(&self) -> &'static str {
2248        match self {
2249            EventTriggerEnum::Alerting => "Alerting",
2250            EventTriggerEnum::Delta => "Delta",
2251            EventTriggerEnum::Periodic => "Periodic",
2252        }
2253    }
2254}
2255
2256impl std::fmt::Display for EventTriggerEnum {
2257    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2258        f.write_str(self.as_str())
2259    }
2260}
2261
2262impl std::str::FromStr for EventTriggerEnum {
2263    type Err = ();
2264    fn from_str(s: &str) -> Result<Self, ()> {
2265        Self::ALL
2266            .iter()
2267            .copied()
2268            .find(|v| v.as_str() == s)
2269            .ok_or(())
2270    }
2271}
2272
2273impl Validate for EventTriggerEnum {
2274    #[inline]
2275    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2276        Ok(())
2277    }
2278}
2279
2280/// Type of EVSE (AC, DC) this tariff applies to.
2281#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2282pub enum EvseKindEnum {
2283    #[serde(rename = "AC")]
2284    AC,
2285    #[serde(rename = "DC")]
2286    DC,
2287}
2288
2289impl EvseKindEnum {
2290    pub const ALL: &'static [EvseKindEnum] = &[EvseKindEnum::AC, EvseKindEnum::DC];
2291    /// Value as it appears on the wire.
2292    pub const fn as_str(&self) -> &'static str {
2293        match self {
2294            EvseKindEnum::AC => "AC",
2295            EvseKindEnum::DC => "DC",
2296        }
2297    }
2298}
2299
2300impl std::fmt::Display for EvseKindEnum {
2301    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2302        f.write_str(self.as_str())
2303    }
2304}
2305
2306impl std::str::FromStr for EvseKindEnum {
2307    type Err = ();
2308    fn from_str(s: &str) -> Result<Self, ()> {
2309        Self::ALL
2310            .iter()
2311            .copied()
2312            .find(|v| v.as_str() == s)
2313            .ok_or(())
2314    }
2315}
2316
2317impl Validate for EvseKindEnum {
2318    #[inline]
2319    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2320        Ok(())
2321    }
2322}
2323
2324/// This contains the progress status of the firmware installation.
2325#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2326pub enum FirmwareStatusEnum {
2327    #[serde(rename = "Downloaded")]
2328    Downloaded,
2329    #[serde(rename = "DownloadFailed")]
2330    DownloadFailed,
2331    #[serde(rename = "Downloading")]
2332    Downloading,
2333    #[serde(rename = "DownloadScheduled")]
2334    DownloadScheduled,
2335    #[serde(rename = "DownloadPaused")]
2336    DownloadPaused,
2337    #[serde(rename = "Idle")]
2338    Idle,
2339    #[serde(rename = "InstallationFailed")]
2340    InstallationFailed,
2341    #[serde(rename = "Installing")]
2342    Installing,
2343    #[serde(rename = "Installed")]
2344    Installed,
2345    #[serde(rename = "InstallRebooting")]
2346    InstallRebooting,
2347    #[serde(rename = "InstallScheduled")]
2348    InstallScheduled,
2349    #[serde(rename = "InstallVerificationFailed")]
2350    InstallVerificationFailed,
2351    #[serde(rename = "InvalidSignature")]
2352    InvalidSignature,
2353    #[serde(rename = "SignatureVerified")]
2354    SignatureVerified,
2355}
2356
2357impl FirmwareStatusEnum {
2358    pub const ALL: &'static [FirmwareStatusEnum] = &[
2359        FirmwareStatusEnum::Downloaded,
2360        FirmwareStatusEnum::DownloadFailed,
2361        FirmwareStatusEnum::Downloading,
2362        FirmwareStatusEnum::DownloadScheduled,
2363        FirmwareStatusEnum::DownloadPaused,
2364        FirmwareStatusEnum::Idle,
2365        FirmwareStatusEnum::InstallationFailed,
2366        FirmwareStatusEnum::Installing,
2367        FirmwareStatusEnum::Installed,
2368        FirmwareStatusEnum::InstallRebooting,
2369        FirmwareStatusEnum::InstallScheduled,
2370        FirmwareStatusEnum::InstallVerificationFailed,
2371        FirmwareStatusEnum::InvalidSignature,
2372        FirmwareStatusEnum::SignatureVerified,
2373    ];
2374    /// Value as it appears on the wire.
2375    pub const fn as_str(&self) -> &'static str {
2376        match self {
2377            FirmwareStatusEnum::Downloaded => "Downloaded",
2378            FirmwareStatusEnum::DownloadFailed => "DownloadFailed",
2379            FirmwareStatusEnum::Downloading => "Downloading",
2380            FirmwareStatusEnum::DownloadScheduled => "DownloadScheduled",
2381            FirmwareStatusEnum::DownloadPaused => "DownloadPaused",
2382            FirmwareStatusEnum::Idle => "Idle",
2383            FirmwareStatusEnum::InstallationFailed => "InstallationFailed",
2384            FirmwareStatusEnum::Installing => "Installing",
2385            FirmwareStatusEnum::Installed => "Installed",
2386            FirmwareStatusEnum::InstallRebooting => "InstallRebooting",
2387            FirmwareStatusEnum::InstallScheduled => "InstallScheduled",
2388            FirmwareStatusEnum::InstallVerificationFailed => "InstallVerificationFailed",
2389            FirmwareStatusEnum::InvalidSignature => "InvalidSignature",
2390            FirmwareStatusEnum::SignatureVerified => "SignatureVerified",
2391        }
2392    }
2393}
2394
2395impl std::fmt::Display for FirmwareStatusEnum {
2396    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2397        f.write_str(self.as_str())
2398    }
2399}
2400
2401impl std::str::FromStr for FirmwareStatusEnum {
2402    type Err = ();
2403    fn from_str(s: &str) -> Result<Self, ()> {
2404        Self::ALL
2405            .iter()
2406            .copied()
2407            .find(|v| v.as_str() == s)
2408            .ok_or(())
2409    }
2410}
2411
2412impl Validate for FirmwareStatusEnum {
2413    #[inline]
2414    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2415        Ok(())
2416    }
2417}
2418
2419/// This indicates whether the Charging Station is able to accept this request.
2420#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2421pub enum GenericDeviceModelStatusEnum {
2422    #[serde(rename = "Accepted")]
2423    Accepted,
2424    #[serde(rename = "Rejected")]
2425    Rejected,
2426    #[serde(rename = "NotSupported")]
2427    NotSupported,
2428    #[serde(rename = "EmptyResultSet")]
2429    EmptyResultSet,
2430}
2431
2432impl GenericDeviceModelStatusEnum {
2433    pub const ALL: &'static [GenericDeviceModelStatusEnum] = &[
2434        GenericDeviceModelStatusEnum::Accepted,
2435        GenericDeviceModelStatusEnum::Rejected,
2436        GenericDeviceModelStatusEnum::NotSupported,
2437        GenericDeviceModelStatusEnum::EmptyResultSet,
2438    ];
2439    /// Value as it appears on the wire.
2440    pub const fn as_str(&self) -> &'static str {
2441        match self {
2442            GenericDeviceModelStatusEnum::Accepted => "Accepted",
2443            GenericDeviceModelStatusEnum::Rejected => "Rejected",
2444            GenericDeviceModelStatusEnum::NotSupported => "NotSupported",
2445            GenericDeviceModelStatusEnum::EmptyResultSet => "EmptyResultSet",
2446        }
2447    }
2448}
2449
2450impl std::fmt::Display for GenericDeviceModelStatusEnum {
2451    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2452        f.write_str(self.as_str())
2453    }
2454}
2455
2456impl std::str::FromStr for GenericDeviceModelStatusEnum {
2457    type Err = ();
2458    fn from_str(s: &str) -> Result<Self, ()> {
2459        Self::ALL
2460            .iter()
2461            .copied()
2462            .find(|v| v.as_str() == s)
2463            .ok_or(())
2464    }
2465}
2466
2467impl Validate for GenericDeviceModelStatusEnum {
2468    #[inline]
2469    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2470        Ok(())
2471    }
2472}
2473
2474#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2475pub enum GenericStatusEnum {
2476    #[serde(rename = "Accepted")]
2477    Accepted,
2478    #[serde(rename = "Rejected")]
2479    Rejected,
2480}
2481
2482impl GenericStatusEnum {
2483    pub const ALL: &'static [GenericStatusEnum] =
2484        &[GenericStatusEnum::Accepted, GenericStatusEnum::Rejected];
2485    /// Value as it appears on the wire.
2486    pub const fn as_str(&self) -> &'static str {
2487        match self {
2488            GenericStatusEnum::Accepted => "Accepted",
2489            GenericStatusEnum::Rejected => "Rejected",
2490        }
2491    }
2492}
2493
2494impl std::fmt::Display for GenericStatusEnum {
2495    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2496        f.write_str(self.as_str())
2497    }
2498}
2499
2500impl std::str::FromStr for GenericStatusEnum {
2501    type Err = ();
2502    fn from_str(s: &str) -> Result<Self, ()> {
2503        Self::ALL
2504            .iter()
2505            .copied()
2506            .find(|v| v.as_str() == s)
2507            .ok_or(())
2508    }
2509}
2510
2511impl Validate for GenericStatusEnum {
2512    #[inline]
2513    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2514        Ok(())
2515    }
2516}
2517
2518#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2519pub enum GetCertificateIdUseEnum {
2520    #[serde(rename = "V2GRootCertificate")]
2521    V2GRootCertificate,
2522    #[serde(rename = "MORootCertificate")]
2523    MORootCertificate,
2524    #[serde(rename = "CSMSRootCertificate")]
2525    CSMSRootCertificate,
2526    #[serde(rename = "V2GCertificateChain")]
2527    V2GCertificateChain,
2528    #[serde(rename = "ManufacturerRootCertificate")]
2529    ManufacturerRootCertificate,
2530    #[serde(rename = "OEMRootCertificate")]
2531    OEMRootCertificate,
2532}
2533
2534impl GetCertificateIdUseEnum {
2535    pub const ALL: &'static [GetCertificateIdUseEnum] = &[
2536        GetCertificateIdUseEnum::V2GRootCertificate,
2537        GetCertificateIdUseEnum::MORootCertificate,
2538        GetCertificateIdUseEnum::CSMSRootCertificate,
2539        GetCertificateIdUseEnum::V2GCertificateChain,
2540        GetCertificateIdUseEnum::ManufacturerRootCertificate,
2541        GetCertificateIdUseEnum::OEMRootCertificate,
2542    ];
2543    /// Value as it appears on the wire.
2544    pub const fn as_str(&self) -> &'static str {
2545        match self {
2546            GetCertificateIdUseEnum::V2GRootCertificate => "V2GRootCertificate",
2547            GetCertificateIdUseEnum::MORootCertificate => "MORootCertificate",
2548            GetCertificateIdUseEnum::CSMSRootCertificate => "CSMSRootCertificate",
2549            GetCertificateIdUseEnum::V2GCertificateChain => "V2GCertificateChain",
2550            GetCertificateIdUseEnum::ManufacturerRootCertificate => "ManufacturerRootCertificate",
2551            GetCertificateIdUseEnum::OEMRootCertificate => "OEMRootCertificate",
2552        }
2553    }
2554}
2555
2556impl std::fmt::Display for GetCertificateIdUseEnum {
2557    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2558        f.write_str(self.as_str())
2559    }
2560}
2561
2562impl std::str::FromStr for GetCertificateIdUseEnum {
2563    type Err = ();
2564    fn from_str(s: &str) -> Result<Self, ()> {
2565        Self::ALL
2566            .iter()
2567            .copied()
2568            .find(|v| v.as_str() == s)
2569            .ok_or(())
2570    }
2571}
2572
2573impl Validate for GetCertificateIdUseEnum {
2574    #[inline]
2575    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2576        Ok(())
2577    }
2578}
2579
2580/// This indicates whether the charging station was able to retrieve the OCSP certificate status.
2581#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2582pub enum GetCertificateStatusEnum {
2583    #[serde(rename = "Accepted")]
2584    Accepted,
2585    #[serde(rename = "Failed")]
2586    Failed,
2587}
2588
2589impl GetCertificateStatusEnum {
2590    pub const ALL: &'static [GetCertificateStatusEnum] = &[
2591        GetCertificateStatusEnum::Accepted,
2592        GetCertificateStatusEnum::Failed,
2593    ];
2594    /// Value as it appears on the wire.
2595    pub const fn as_str(&self) -> &'static str {
2596        match self {
2597            GetCertificateStatusEnum::Accepted => "Accepted",
2598            GetCertificateStatusEnum::Failed => "Failed",
2599        }
2600    }
2601}
2602
2603impl std::fmt::Display for GetCertificateStatusEnum {
2604    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2605        f.write_str(self.as_str())
2606    }
2607}
2608
2609impl std::str::FromStr for GetCertificateStatusEnum {
2610    type Err = ();
2611    fn from_str(s: &str) -> Result<Self, ()> {
2612        Self::ALL
2613            .iter()
2614            .copied()
2615            .find(|v| v.as_str() == s)
2616            .ok_or(())
2617    }
2618}
2619
2620impl Validate for GetCertificateStatusEnum {
2621    #[inline]
2622    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2623        Ok(())
2624    }
2625}
2626
2627/// This indicates whether the Charging Station is able to process this request and will send &lt;&lt;reportchargingprofilesrequest, ReportChargingProfilesRequest&gt;&gt; messages.
2628#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2629pub enum GetChargingProfileStatusEnum {
2630    #[serde(rename = "Accepted")]
2631    Accepted,
2632    #[serde(rename = "NoProfiles")]
2633    NoProfiles,
2634}
2635
2636impl GetChargingProfileStatusEnum {
2637    pub const ALL: &'static [GetChargingProfileStatusEnum] = &[
2638        GetChargingProfileStatusEnum::Accepted,
2639        GetChargingProfileStatusEnum::NoProfiles,
2640    ];
2641    /// Value as it appears on the wire.
2642    pub const fn as_str(&self) -> &'static str {
2643        match self {
2644            GetChargingProfileStatusEnum::Accepted => "Accepted",
2645            GetChargingProfileStatusEnum::NoProfiles => "NoProfiles",
2646        }
2647    }
2648}
2649
2650impl std::fmt::Display for GetChargingProfileStatusEnum {
2651    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2652        f.write_str(self.as_str())
2653    }
2654}
2655
2656impl std::str::FromStr for GetChargingProfileStatusEnum {
2657    type Err = ();
2658    fn from_str(s: &str) -> Result<Self, ()> {
2659        Self::ALL
2660            .iter()
2661            .copied()
2662            .find(|v| v.as_str() == s)
2663            .ok_or(())
2664    }
2665}
2666
2667impl Validate for GetChargingProfileStatusEnum {
2668    #[inline]
2669    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2670        Ok(())
2671    }
2672}
2673
2674/// Indicates if the Charging Station has Display Messages that match the request criteria in the &lt;&lt;getdisplaymessagesrequest,GetDisplayMessagesRequest&gt;&gt;
2675#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2676pub enum GetDisplayMessagesStatusEnum {
2677    #[serde(rename = "Accepted")]
2678    Accepted,
2679    #[serde(rename = "Unknown")]
2680    Unknown,
2681}
2682
2683impl GetDisplayMessagesStatusEnum {
2684    pub const ALL: &'static [GetDisplayMessagesStatusEnum] = &[
2685        GetDisplayMessagesStatusEnum::Accepted,
2686        GetDisplayMessagesStatusEnum::Unknown,
2687    ];
2688    /// Value as it appears on the wire.
2689    pub const fn as_str(&self) -> &'static str {
2690        match self {
2691            GetDisplayMessagesStatusEnum::Accepted => "Accepted",
2692            GetDisplayMessagesStatusEnum::Unknown => "Unknown",
2693        }
2694    }
2695}
2696
2697impl std::fmt::Display for GetDisplayMessagesStatusEnum {
2698    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2699        f.write_str(self.as_str())
2700    }
2701}
2702
2703impl std::str::FromStr for GetDisplayMessagesStatusEnum {
2704    type Err = ();
2705    fn from_str(s: &str) -> Result<Self, ()> {
2706        Self::ALL
2707            .iter()
2708            .copied()
2709            .find(|v| v.as_str() == s)
2710            .ok_or(())
2711    }
2712}
2713
2714impl Validate for GetDisplayMessagesStatusEnum {
2715    #[inline]
2716    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2717        Ok(())
2718    }
2719}
2720
2721/// Charging Station indicates if it can process the request.
2722#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2723pub enum GetInstalledCertificateStatusEnum {
2724    #[serde(rename = "Accepted")]
2725    Accepted,
2726    #[serde(rename = "NotFound")]
2727    NotFound,
2728}
2729
2730impl GetInstalledCertificateStatusEnum {
2731    pub const ALL: &'static [GetInstalledCertificateStatusEnum] = &[
2732        GetInstalledCertificateStatusEnum::Accepted,
2733        GetInstalledCertificateStatusEnum::NotFound,
2734    ];
2735    /// Value as it appears on the wire.
2736    pub const fn as_str(&self) -> &'static str {
2737        match self {
2738            GetInstalledCertificateStatusEnum::Accepted => "Accepted",
2739            GetInstalledCertificateStatusEnum::NotFound => "NotFound",
2740        }
2741    }
2742}
2743
2744impl std::fmt::Display for GetInstalledCertificateStatusEnum {
2745    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2746        f.write_str(self.as_str())
2747    }
2748}
2749
2750impl std::str::FromStr for GetInstalledCertificateStatusEnum {
2751    type Err = ();
2752    fn from_str(s: &str) -> Result<Self, ()> {
2753        Self::ALL
2754            .iter()
2755            .copied()
2756            .find(|v| v.as_str() == s)
2757            .ok_or(())
2758    }
2759}
2760
2761impl Validate for GetInstalledCertificateStatusEnum {
2762    #[inline]
2763    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2764        Ok(())
2765    }
2766}
2767
2768#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2769pub enum GetVariableStatusEnum {
2770    #[serde(rename = "Accepted")]
2771    Accepted,
2772    #[serde(rename = "Rejected")]
2773    Rejected,
2774    #[serde(rename = "UnknownComponent")]
2775    UnknownComponent,
2776    #[serde(rename = "UnknownVariable")]
2777    UnknownVariable,
2778    #[serde(rename = "NotSupportedAttributeType")]
2779    NotSupportedAttributeType,
2780}
2781
2782impl GetVariableStatusEnum {
2783    pub const ALL: &'static [GetVariableStatusEnum] = &[
2784        GetVariableStatusEnum::Accepted,
2785        GetVariableStatusEnum::Rejected,
2786        GetVariableStatusEnum::UnknownComponent,
2787        GetVariableStatusEnum::UnknownVariable,
2788        GetVariableStatusEnum::NotSupportedAttributeType,
2789    ];
2790    /// Value as it appears on the wire.
2791    pub const fn as_str(&self) -> &'static str {
2792        match self {
2793            GetVariableStatusEnum::Accepted => "Accepted",
2794            GetVariableStatusEnum::Rejected => "Rejected",
2795            GetVariableStatusEnum::UnknownComponent => "UnknownComponent",
2796            GetVariableStatusEnum::UnknownVariable => "UnknownVariable",
2797            GetVariableStatusEnum::NotSupportedAttributeType => "NotSupportedAttributeType",
2798        }
2799    }
2800}
2801
2802impl std::fmt::Display for GetVariableStatusEnum {
2803    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2804        f.write_str(self.as_str())
2805    }
2806}
2807
2808impl std::str::FromStr for GetVariableStatusEnum {
2809    type Err = ();
2810    fn from_str(s: &str) -> Result<Self, ()> {
2811        Self::ALL
2812            .iter()
2813            .copied()
2814            .find(|v| v.as_str() == s)
2815            .ok_or(())
2816    }
2817}
2818
2819impl Validate for GetVariableStatusEnum {
2820    #[inline]
2821    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2822        Ok(())
2823    }
2824}
2825
2826/// Type of grid event that caused this
2827#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2828pub enum GridEventFaultEnum {
2829    #[serde(rename = "CurrentImbalance")]
2830    CurrentImbalance,
2831    #[serde(rename = "LocalEmergency")]
2832    LocalEmergency,
2833    #[serde(rename = "LowInputPower")]
2834    LowInputPower,
2835    #[serde(rename = "OverCurrent")]
2836    OverCurrent,
2837    #[serde(rename = "OverFrequency")]
2838    OverFrequency,
2839    #[serde(rename = "OverVoltage")]
2840    OverVoltage,
2841    #[serde(rename = "PhaseRotation")]
2842    PhaseRotation,
2843    #[serde(rename = "RemoteEmergency")]
2844    RemoteEmergency,
2845    #[serde(rename = "UnderFrequency")]
2846    UnderFrequency,
2847    #[serde(rename = "UnderVoltage")]
2848    UnderVoltage,
2849    #[serde(rename = "VoltageImbalance")]
2850    VoltageImbalance,
2851}
2852
2853impl GridEventFaultEnum {
2854    pub const ALL: &'static [GridEventFaultEnum] = &[
2855        GridEventFaultEnum::CurrentImbalance,
2856        GridEventFaultEnum::LocalEmergency,
2857        GridEventFaultEnum::LowInputPower,
2858        GridEventFaultEnum::OverCurrent,
2859        GridEventFaultEnum::OverFrequency,
2860        GridEventFaultEnum::OverVoltage,
2861        GridEventFaultEnum::PhaseRotation,
2862        GridEventFaultEnum::RemoteEmergency,
2863        GridEventFaultEnum::UnderFrequency,
2864        GridEventFaultEnum::UnderVoltage,
2865        GridEventFaultEnum::VoltageImbalance,
2866    ];
2867    /// Value as it appears on the wire.
2868    pub const fn as_str(&self) -> &'static str {
2869        match self {
2870            GridEventFaultEnum::CurrentImbalance => "CurrentImbalance",
2871            GridEventFaultEnum::LocalEmergency => "LocalEmergency",
2872            GridEventFaultEnum::LowInputPower => "LowInputPower",
2873            GridEventFaultEnum::OverCurrent => "OverCurrent",
2874            GridEventFaultEnum::OverFrequency => "OverFrequency",
2875            GridEventFaultEnum::OverVoltage => "OverVoltage",
2876            GridEventFaultEnum::PhaseRotation => "PhaseRotation",
2877            GridEventFaultEnum::RemoteEmergency => "RemoteEmergency",
2878            GridEventFaultEnum::UnderFrequency => "UnderFrequency",
2879            GridEventFaultEnum::UnderVoltage => "UnderVoltage",
2880            GridEventFaultEnum::VoltageImbalance => "VoltageImbalance",
2881        }
2882    }
2883}
2884
2885impl std::fmt::Display for GridEventFaultEnum {
2886    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2887        f.write_str(self.as_str())
2888    }
2889}
2890
2891impl std::str::FromStr for GridEventFaultEnum {
2892    type Err = ();
2893    fn from_str(s: &str) -> Result<Self, ()> {
2894        Self::ALL
2895            .iter()
2896            .copied()
2897            .find(|v| v.as_str() == s)
2898            .ok_or(())
2899    }
2900}
2901
2902impl Validate for GridEventFaultEnum {
2903    #[inline]
2904    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2905        Ok(())
2906    }
2907}
2908
2909/// Used algorithms for the hashes provided.
2910#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2911pub enum HashAlgorithmEnum {
2912    #[serde(rename = "SHA256")]
2913    SHA256,
2914    #[serde(rename = "SHA384")]
2915    SHA384,
2916    #[serde(rename = "SHA512")]
2917    SHA512,
2918}
2919
2920impl HashAlgorithmEnum {
2921    pub const ALL: &'static [HashAlgorithmEnum] = &[
2922        HashAlgorithmEnum::SHA256,
2923        HashAlgorithmEnum::SHA384,
2924        HashAlgorithmEnum::SHA512,
2925    ];
2926    /// Value as it appears on the wire.
2927    pub const fn as_str(&self) -> &'static str {
2928        match self {
2929            HashAlgorithmEnum::SHA256 => "SHA256",
2930            HashAlgorithmEnum::SHA384 => "SHA384",
2931            HashAlgorithmEnum::SHA512 => "SHA512",
2932        }
2933    }
2934}
2935
2936impl std::fmt::Display for HashAlgorithmEnum {
2937    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2938        f.write_str(self.as_str())
2939    }
2940}
2941
2942impl std::str::FromStr for HashAlgorithmEnum {
2943    type Err = ();
2944    fn from_str(s: &str) -> Result<Self, ()> {
2945        Self::ALL
2946            .iter()
2947            .copied()
2948            .find(|v| v.as_str() == s)
2949            .ok_or(())
2950    }
2951}
2952
2953impl Validate for HashAlgorithmEnum {
2954    #[inline]
2955    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2956        Ok(())
2957    }
2958}
2959
2960/// Charging Station indicates if installation was successful.
2961#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2962pub enum InstallCertificateStatusEnum {
2963    #[serde(rename = "Accepted")]
2964    Accepted,
2965    #[serde(rename = "Rejected")]
2966    Rejected,
2967    #[serde(rename = "Failed")]
2968    Failed,
2969}
2970
2971impl InstallCertificateStatusEnum {
2972    pub const ALL: &'static [InstallCertificateStatusEnum] = &[
2973        InstallCertificateStatusEnum::Accepted,
2974        InstallCertificateStatusEnum::Rejected,
2975        InstallCertificateStatusEnum::Failed,
2976    ];
2977    /// Value as it appears on the wire.
2978    pub const fn as_str(&self) -> &'static str {
2979        match self {
2980            InstallCertificateStatusEnum::Accepted => "Accepted",
2981            InstallCertificateStatusEnum::Rejected => "Rejected",
2982            InstallCertificateStatusEnum::Failed => "Failed",
2983        }
2984    }
2985}
2986
2987impl std::fmt::Display for InstallCertificateStatusEnum {
2988    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2989        f.write_str(self.as_str())
2990    }
2991}
2992
2993impl std::str::FromStr for InstallCertificateStatusEnum {
2994    type Err = ();
2995    fn from_str(s: &str) -> Result<Self, ()> {
2996        Self::ALL
2997            .iter()
2998            .copied()
2999            .find(|v| v.as_str() == s)
3000            .ok_or(())
3001    }
3002}
3003
3004impl Validate for InstallCertificateStatusEnum {
3005    #[inline]
3006    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3007        Ok(())
3008    }
3009}
3010
3011/// Indicates the certificate type that is sent.
3012#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3013pub enum InstallCertificateUseEnum {
3014    #[serde(rename = "V2GRootCertificate")]
3015    V2GRootCertificate,
3016    #[serde(rename = "MORootCertificate")]
3017    MORootCertificate,
3018    #[serde(rename = "ManufacturerRootCertificate")]
3019    ManufacturerRootCertificate,
3020    #[serde(rename = "CSMSRootCertificate")]
3021    CSMSRootCertificate,
3022    #[serde(rename = "OEMRootCertificate")]
3023    OEMRootCertificate,
3024}
3025
3026impl InstallCertificateUseEnum {
3027    pub const ALL: &'static [InstallCertificateUseEnum] = &[
3028        InstallCertificateUseEnum::V2GRootCertificate,
3029        InstallCertificateUseEnum::MORootCertificate,
3030        InstallCertificateUseEnum::ManufacturerRootCertificate,
3031        InstallCertificateUseEnum::CSMSRootCertificate,
3032        InstallCertificateUseEnum::OEMRootCertificate,
3033    ];
3034    /// Value as it appears on the wire.
3035    pub const fn as_str(&self) -> &'static str {
3036        match self {
3037            InstallCertificateUseEnum::V2GRootCertificate => "V2GRootCertificate",
3038            InstallCertificateUseEnum::MORootCertificate => "MORootCertificate",
3039            InstallCertificateUseEnum::ManufacturerRootCertificate => "ManufacturerRootCertificate",
3040            InstallCertificateUseEnum::CSMSRootCertificate => "CSMSRootCertificate",
3041            InstallCertificateUseEnum::OEMRootCertificate => "OEMRootCertificate",
3042        }
3043    }
3044}
3045
3046impl std::fmt::Display for InstallCertificateUseEnum {
3047    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3048        f.write_str(self.as_str())
3049    }
3050}
3051
3052impl std::str::FromStr for InstallCertificateUseEnum {
3053    type Err = ();
3054    fn from_str(s: &str) -> Result<Self, ()> {
3055        Self::ALL
3056            .iter()
3057            .copied()
3058            .find(|v| v.as_str() == s)
3059            .ok_or(())
3060    }
3061}
3062
3063impl Validate for InstallCertificateUseEnum {
3064    #[inline]
3065    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3066        Ok(())
3067    }
3068}
3069
3070#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3071pub enum IslandingDetectionEnum {
3072    #[serde(rename = "NoAntiIslandingSupport")]
3073    NoAntiIslandingSupport,
3074    #[serde(rename = "RoCoF")]
3075    RoCoF,
3076    #[serde(rename = "UVP_OVP")]
3077    UVPOVP,
3078    #[serde(rename = "UFP_OFP")]
3079    UFPOFP,
3080    #[serde(rename = "VoltageVectorShift")]
3081    VoltageVectorShift,
3082    #[serde(rename = "ZeroCrossingDetection")]
3083    ZeroCrossingDetection,
3084    #[serde(rename = "OtherPassive")]
3085    OtherPassive,
3086    #[serde(rename = "ImpedanceMeasurement")]
3087    ImpedanceMeasurement,
3088    #[serde(rename = "ImpedanceAtFrequency")]
3089    ImpedanceAtFrequency,
3090    #[serde(rename = "SlipModeFrequencyShift")]
3091    SlipModeFrequencyShift,
3092    #[serde(rename = "SandiaFrequencyShift")]
3093    SandiaFrequencyShift,
3094    #[serde(rename = "SandiaVoltageShift")]
3095    SandiaVoltageShift,
3096    #[serde(rename = "FrequencyJump")]
3097    FrequencyJump,
3098    #[serde(rename = "RCLQFactor")]
3099    RCLQFactor,
3100    #[serde(rename = "OtherActive")]
3101    OtherActive,
3102}
3103
3104impl IslandingDetectionEnum {
3105    pub const ALL: &'static [IslandingDetectionEnum] = &[
3106        IslandingDetectionEnum::NoAntiIslandingSupport,
3107        IslandingDetectionEnum::RoCoF,
3108        IslandingDetectionEnum::UVPOVP,
3109        IslandingDetectionEnum::UFPOFP,
3110        IslandingDetectionEnum::VoltageVectorShift,
3111        IslandingDetectionEnum::ZeroCrossingDetection,
3112        IslandingDetectionEnum::OtherPassive,
3113        IslandingDetectionEnum::ImpedanceMeasurement,
3114        IslandingDetectionEnum::ImpedanceAtFrequency,
3115        IslandingDetectionEnum::SlipModeFrequencyShift,
3116        IslandingDetectionEnum::SandiaFrequencyShift,
3117        IslandingDetectionEnum::SandiaVoltageShift,
3118        IslandingDetectionEnum::FrequencyJump,
3119        IslandingDetectionEnum::RCLQFactor,
3120        IslandingDetectionEnum::OtherActive,
3121    ];
3122    /// Value as it appears on the wire.
3123    pub const fn as_str(&self) -> &'static str {
3124        match self {
3125            IslandingDetectionEnum::NoAntiIslandingSupport => "NoAntiIslandingSupport",
3126            IslandingDetectionEnum::RoCoF => "RoCoF",
3127            IslandingDetectionEnum::UVPOVP => "UVP_OVP",
3128            IslandingDetectionEnum::UFPOFP => "UFP_OFP",
3129            IslandingDetectionEnum::VoltageVectorShift => "VoltageVectorShift",
3130            IslandingDetectionEnum::ZeroCrossingDetection => "ZeroCrossingDetection",
3131            IslandingDetectionEnum::OtherPassive => "OtherPassive",
3132            IslandingDetectionEnum::ImpedanceMeasurement => "ImpedanceMeasurement",
3133            IslandingDetectionEnum::ImpedanceAtFrequency => "ImpedanceAtFrequency",
3134            IslandingDetectionEnum::SlipModeFrequencyShift => "SlipModeFrequencyShift",
3135            IslandingDetectionEnum::SandiaFrequencyShift => "SandiaFrequencyShift",
3136            IslandingDetectionEnum::SandiaVoltageShift => "SandiaVoltageShift",
3137            IslandingDetectionEnum::FrequencyJump => "FrequencyJump",
3138            IslandingDetectionEnum::RCLQFactor => "RCLQFactor",
3139            IslandingDetectionEnum::OtherActive => "OtherActive",
3140        }
3141    }
3142}
3143
3144impl std::fmt::Display for IslandingDetectionEnum {
3145    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3146        f.write_str(self.as_str())
3147    }
3148}
3149
3150impl std::str::FromStr for IslandingDetectionEnum {
3151    type Err = ();
3152    fn from_str(s: &str) -> Result<Self, ()> {
3153        Self::ALL
3154            .iter()
3155            .copied()
3156            .find(|v| v.as_str() == s)
3157            .ok_or(())
3158    }
3159}
3160
3161impl Validate for IslandingDetectionEnum {
3162    #[inline]
3163    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3164        Ok(())
3165    }
3166}
3167
3168/// Indicates whether the message was processed properly.
3169#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3170pub enum Iso15118EVCertificateStatusEnum {
3171    #[serde(rename = "Accepted")]
3172    Accepted,
3173    #[serde(rename = "Failed")]
3174    Failed,
3175}
3176
3177impl Iso15118EVCertificateStatusEnum {
3178    pub const ALL: &'static [Iso15118EVCertificateStatusEnum] = &[
3179        Iso15118EVCertificateStatusEnum::Accepted,
3180        Iso15118EVCertificateStatusEnum::Failed,
3181    ];
3182    /// Value as it appears on the wire.
3183    pub const fn as_str(&self) -> &'static str {
3184        match self {
3185            Iso15118EVCertificateStatusEnum::Accepted => "Accepted",
3186            Iso15118EVCertificateStatusEnum::Failed => "Failed",
3187        }
3188    }
3189}
3190
3191impl std::fmt::Display for Iso15118EVCertificateStatusEnum {
3192    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3193        f.write_str(self.as_str())
3194    }
3195}
3196
3197impl std::str::FromStr for Iso15118EVCertificateStatusEnum {
3198    type Err = ();
3199    fn from_str(s: &str) -> Result<Self, ()> {
3200        Self::ALL
3201            .iter()
3202            .copied()
3203            .find(|v| v.as_str() == s)
3204            .ok_or(())
3205    }
3206}
3207
3208impl Validate for Iso15118EVCertificateStatusEnum {
3209    #[inline]
3210    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3211        Ok(())
3212    }
3213}
3214
3215/// Indicates where the measured value has been sampled. Default =  "Outlet"
3216#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3217pub enum LocationEnum {
3218    #[serde(rename = "Body")]
3219    Body,
3220    #[serde(rename = "Cable")]
3221    Cable,
3222    #[serde(rename = "EV")]
3223    EV,
3224    #[serde(rename = "Inlet")]
3225    Inlet,
3226    #[serde(rename = "Outlet")]
3227    Outlet,
3228    #[serde(rename = "Upstream")]
3229    Upstream,
3230}
3231
3232impl LocationEnum {
3233    pub const ALL: &'static [LocationEnum] = &[
3234        LocationEnum::Body,
3235        LocationEnum::Cable,
3236        LocationEnum::EV,
3237        LocationEnum::Inlet,
3238        LocationEnum::Outlet,
3239        LocationEnum::Upstream,
3240    ];
3241    /// Value as it appears on the wire.
3242    pub const fn as_str(&self) -> &'static str {
3243        match self {
3244            LocationEnum::Body => "Body",
3245            LocationEnum::Cable => "Cable",
3246            LocationEnum::EV => "EV",
3247            LocationEnum::Inlet => "Inlet",
3248            LocationEnum::Outlet => "Outlet",
3249            LocationEnum::Upstream => "Upstream",
3250        }
3251    }
3252}
3253
3254impl std::fmt::Display for LocationEnum {
3255    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3256        f.write_str(self.as_str())
3257    }
3258}
3259
3260impl std::str::FromStr for LocationEnum {
3261    type Err = ();
3262    fn from_str(s: &str) -> Result<Self, ()> {
3263        Self::ALL
3264            .iter()
3265            .copied()
3266            .find(|v| v.as_str() == s)
3267            .ok_or(())
3268    }
3269}
3270
3271impl Validate for LocationEnum {
3272    #[inline]
3273    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3274        Ok(())
3275    }
3276}
3277
3278/// This contains the type of log file that the Charging Station
3279/// should send.
3280#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3281pub enum LogEnum {
3282    #[serde(rename = "DiagnosticsLog")]
3283    DiagnosticsLog,
3284    #[serde(rename = "SecurityLog")]
3285    SecurityLog,
3286    #[serde(rename = "DataCollectorLog")]
3287    DataCollectorLog,
3288}
3289
3290impl LogEnum {
3291    pub const ALL: &'static [LogEnum] = &[
3292        LogEnum::DiagnosticsLog,
3293        LogEnum::SecurityLog,
3294        LogEnum::DataCollectorLog,
3295    ];
3296    /// Value as it appears on the wire.
3297    pub const fn as_str(&self) -> &'static str {
3298        match self {
3299            LogEnum::DiagnosticsLog => "DiagnosticsLog",
3300            LogEnum::SecurityLog => "SecurityLog",
3301            LogEnum::DataCollectorLog => "DataCollectorLog",
3302        }
3303    }
3304}
3305
3306impl std::fmt::Display for LogEnum {
3307    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3308        f.write_str(self.as_str())
3309    }
3310}
3311
3312impl std::str::FromStr for LogEnum {
3313    type Err = ();
3314    fn from_str(s: &str) -> Result<Self, ()> {
3315        Self::ALL
3316            .iter()
3317            .copied()
3318            .find(|v| v.as_str() == s)
3319            .ok_or(())
3320    }
3321}
3322
3323impl Validate for LogEnum {
3324    #[inline]
3325    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3326        Ok(())
3327    }
3328}
3329
3330/// This field indicates whether the Charging Station was able to accept the request.
3331#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3332pub enum LogStatusEnum {
3333    #[serde(rename = "Accepted")]
3334    Accepted,
3335    #[serde(rename = "Rejected")]
3336    Rejected,
3337    #[serde(rename = "AcceptedCanceled")]
3338    AcceptedCanceled,
3339}
3340
3341impl LogStatusEnum {
3342    pub const ALL: &'static [LogStatusEnum] = &[
3343        LogStatusEnum::Accepted,
3344        LogStatusEnum::Rejected,
3345        LogStatusEnum::AcceptedCanceled,
3346    ];
3347    /// Value as it appears on the wire.
3348    pub const fn as_str(&self) -> &'static str {
3349        match self {
3350            LogStatusEnum::Accepted => "Accepted",
3351            LogStatusEnum::Rejected => "Rejected",
3352            LogStatusEnum::AcceptedCanceled => "AcceptedCanceled",
3353        }
3354    }
3355}
3356
3357impl std::fmt::Display for LogStatusEnum {
3358    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3359        f.write_str(self.as_str())
3360    }
3361}
3362
3363impl std::str::FromStr for LogStatusEnum {
3364    type Err = ();
3365    fn from_str(s: &str) -> Result<Self, ()> {
3366        Self::ALL
3367            .iter()
3368            .copied()
3369            .find(|v| v.as_str() == s)
3370            .ok_or(())
3371    }
3372}
3373
3374impl Validate for LogStatusEnum {
3375    #[inline]
3376    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3377        Ok(())
3378    }
3379}
3380
3381/// Type of measurement. Default = "Energy.Active.Import.Register"
3382#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3383pub enum MeasurandEnum {
3384    #[serde(rename = "Current.Export")]
3385    CurrentExport,
3386    #[serde(rename = "Current.Export.Offered")]
3387    CurrentExportOffered,
3388    #[serde(rename = "Current.Export.Minimum")]
3389    CurrentExportMinimum,
3390    #[serde(rename = "Current.Import")]
3391    CurrentImport,
3392    #[serde(rename = "Current.Import.Offered")]
3393    CurrentImportOffered,
3394    #[serde(rename = "Current.Import.Minimum")]
3395    CurrentImportMinimum,
3396    #[serde(rename = "Current.Offered")]
3397    CurrentOffered,
3398    #[serde(rename = "Display.PresentSOC")]
3399    DisplayPresentSOC,
3400    #[serde(rename = "Display.MinimumSOC")]
3401    DisplayMinimumSOC,
3402    #[serde(rename = "Display.TargetSOC")]
3403    DisplayTargetSOC,
3404    #[serde(rename = "Display.MaximumSOC")]
3405    DisplayMaximumSOC,
3406    #[serde(rename = "Display.RemainingTimeToMinimumSOC")]
3407    DisplayRemainingTimeToMinimumSOC,
3408    #[serde(rename = "Display.RemainingTimeToTargetSOC")]
3409    DisplayRemainingTimeToTargetSOC,
3410    #[serde(rename = "Display.RemainingTimeToMaximumSOC")]
3411    DisplayRemainingTimeToMaximumSOC,
3412    #[serde(rename = "Display.ChargingComplete")]
3413    DisplayChargingComplete,
3414    #[serde(rename = "Display.BatteryEnergyCapacity")]
3415    DisplayBatteryEnergyCapacity,
3416    #[serde(rename = "Display.InletHot")]
3417    DisplayInletHot,
3418    #[serde(rename = "Energy.Active.Export.Interval")]
3419    EnergyActiveExportInterval,
3420    #[serde(rename = "Energy.Active.Export.Register")]
3421    EnergyActiveExportRegister,
3422    #[serde(rename = "Energy.Active.Import.Interval")]
3423    EnergyActiveImportInterval,
3424    #[serde(rename = "Energy.Active.Import.Register")]
3425    EnergyActiveImportRegister,
3426    #[serde(rename = "Energy.Active.Import.CableLoss")]
3427    EnergyActiveImportCableLoss,
3428    #[serde(rename = "Energy.Active.Import.LocalGeneration.Register")]
3429    EnergyActiveImportLocalGenerationRegister,
3430    #[serde(rename = "Energy.Active.Net")]
3431    EnergyActiveNet,
3432    #[serde(rename = "Energy.Active.Setpoint.Interval")]
3433    EnergyActiveSetpointInterval,
3434    #[serde(rename = "Energy.Apparent.Export")]
3435    EnergyApparentExport,
3436    #[serde(rename = "Energy.Apparent.Import")]
3437    EnergyApparentImport,
3438    #[serde(rename = "Energy.Apparent.Net")]
3439    EnergyApparentNet,
3440    #[serde(rename = "Energy.Reactive.Export.Interval")]
3441    EnergyReactiveExportInterval,
3442    #[serde(rename = "Energy.Reactive.Export.Register")]
3443    EnergyReactiveExportRegister,
3444    #[serde(rename = "Energy.Reactive.Import.Interval")]
3445    EnergyReactiveImportInterval,
3446    #[serde(rename = "Energy.Reactive.Import.Register")]
3447    EnergyReactiveImportRegister,
3448    #[serde(rename = "Energy.Reactive.Net")]
3449    EnergyReactiveNet,
3450    #[serde(rename = "EnergyRequest.Target")]
3451    EnergyRequestTarget,
3452    #[serde(rename = "EnergyRequest.Minimum")]
3453    EnergyRequestMinimum,
3454    #[serde(rename = "EnergyRequest.Maximum")]
3455    EnergyRequestMaximum,
3456    #[serde(rename = "EnergyRequest.Minimum.V2X")]
3457    EnergyRequestMinimumV2X,
3458    #[serde(rename = "EnergyRequest.Maximum.V2X")]
3459    EnergyRequestMaximumV2X,
3460    #[serde(rename = "EnergyRequest.Bulk")]
3461    EnergyRequestBulk,
3462    #[serde(rename = "Frequency")]
3463    Frequency,
3464    #[serde(rename = "Power.Active.Export")]
3465    PowerActiveExport,
3466    #[serde(rename = "Power.Active.Import")]
3467    PowerActiveImport,
3468    #[serde(rename = "Power.Active.Setpoint")]
3469    PowerActiveSetpoint,
3470    #[serde(rename = "Power.Active.Residual")]
3471    PowerActiveResidual,
3472    #[serde(rename = "Power.Export.Minimum")]
3473    PowerExportMinimum,
3474    #[serde(rename = "Power.Export.Offered")]
3475    PowerExportOffered,
3476    #[serde(rename = "Power.Factor")]
3477    PowerFactor,
3478    #[serde(rename = "Power.Import.Offered")]
3479    PowerImportOffered,
3480    #[serde(rename = "Power.Import.Minimum")]
3481    PowerImportMinimum,
3482    #[serde(rename = "Power.Offered")]
3483    PowerOffered,
3484    #[serde(rename = "Power.Reactive.Export")]
3485    PowerReactiveExport,
3486    #[serde(rename = "Power.Reactive.Import")]
3487    PowerReactiveImport,
3488    #[serde(rename = "SoC")]
3489    SoC,
3490    #[serde(rename = "Voltage")]
3491    Voltage,
3492    #[serde(rename = "Voltage.Minimum")]
3493    VoltageMinimum,
3494    #[serde(rename = "Voltage.Maximum")]
3495    VoltageMaximum,
3496}
3497
3498impl MeasurandEnum {
3499    pub const ALL: &'static [MeasurandEnum] = &[
3500        MeasurandEnum::CurrentExport,
3501        MeasurandEnum::CurrentExportOffered,
3502        MeasurandEnum::CurrentExportMinimum,
3503        MeasurandEnum::CurrentImport,
3504        MeasurandEnum::CurrentImportOffered,
3505        MeasurandEnum::CurrentImportMinimum,
3506        MeasurandEnum::CurrentOffered,
3507        MeasurandEnum::DisplayPresentSOC,
3508        MeasurandEnum::DisplayMinimumSOC,
3509        MeasurandEnum::DisplayTargetSOC,
3510        MeasurandEnum::DisplayMaximumSOC,
3511        MeasurandEnum::DisplayRemainingTimeToMinimumSOC,
3512        MeasurandEnum::DisplayRemainingTimeToTargetSOC,
3513        MeasurandEnum::DisplayRemainingTimeToMaximumSOC,
3514        MeasurandEnum::DisplayChargingComplete,
3515        MeasurandEnum::DisplayBatteryEnergyCapacity,
3516        MeasurandEnum::DisplayInletHot,
3517        MeasurandEnum::EnergyActiveExportInterval,
3518        MeasurandEnum::EnergyActiveExportRegister,
3519        MeasurandEnum::EnergyActiveImportInterval,
3520        MeasurandEnum::EnergyActiveImportRegister,
3521        MeasurandEnum::EnergyActiveImportCableLoss,
3522        MeasurandEnum::EnergyActiveImportLocalGenerationRegister,
3523        MeasurandEnum::EnergyActiveNet,
3524        MeasurandEnum::EnergyActiveSetpointInterval,
3525        MeasurandEnum::EnergyApparentExport,
3526        MeasurandEnum::EnergyApparentImport,
3527        MeasurandEnum::EnergyApparentNet,
3528        MeasurandEnum::EnergyReactiveExportInterval,
3529        MeasurandEnum::EnergyReactiveExportRegister,
3530        MeasurandEnum::EnergyReactiveImportInterval,
3531        MeasurandEnum::EnergyReactiveImportRegister,
3532        MeasurandEnum::EnergyReactiveNet,
3533        MeasurandEnum::EnergyRequestTarget,
3534        MeasurandEnum::EnergyRequestMinimum,
3535        MeasurandEnum::EnergyRequestMaximum,
3536        MeasurandEnum::EnergyRequestMinimumV2X,
3537        MeasurandEnum::EnergyRequestMaximumV2X,
3538        MeasurandEnum::EnergyRequestBulk,
3539        MeasurandEnum::Frequency,
3540        MeasurandEnum::PowerActiveExport,
3541        MeasurandEnum::PowerActiveImport,
3542        MeasurandEnum::PowerActiveSetpoint,
3543        MeasurandEnum::PowerActiveResidual,
3544        MeasurandEnum::PowerExportMinimum,
3545        MeasurandEnum::PowerExportOffered,
3546        MeasurandEnum::PowerFactor,
3547        MeasurandEnum::PowerImportOffered,
3548        MeasurandEnum::PowerImportMinimum,
3549        MeasurandEnum::PowerOffered,
3550        MeasurandEnum::PowerReactiveExport,
3551        MeasurandEnum::PowerReactiveImport,
3552        MeasurandEnum::SoC,
3553        MeasurandEnum::Voltage,
3554        MeasurandEnum::VoltageMinimum,
3555        MeasurandEnum::VoltageMaximum,
3556    ];
3557    /// Value as it appears on the wire.
3558    pub const fn as_str(&self) -> &'static str {
3559        match self {
3560            MeasurandEnum::CurrentExport => "Current.Export",
3561            MeasurandEnum::CurrentExportOffered => "Current.Export.Offered",
3562            MeasurandEnum::CurrentExportMinimum => "Current.Export.Minimum",
3563            MeasurandEnum::CurrentImport => "Current.Import",
3564            MeasurandEnum::CurrentImportOffered => "Current.Import.Offered",
3565            MeasurandEnum::CurrentImportMinimum => "Current.Import.Minimum",
3566            MeasurandEnum::CurrentOffered => "Current.Offered",
3567            MeasurandEnum::DisplayPresentSOC => "Display.PresentSOC",
3568            MeasurandEnum::DisplayMinimumSOC => "Display.MinimumSOC",
3569            MeasurandEnum::DisplayTargetSOC => "Display.TargetSOC",
3570            MeasurandEnum::DisplayMaximumSOC => "Display.MaximumSOC",
3571            MeasurandEnum::DisplayRemainingTimeToMinimumSOC => "Display.RemainingTimeToMinimumSOC",
3572            MeasurandEnum::DisplayRemainingTimeToTargetSOC => "Display.RemainingTimeToTargetSOC",
3573            MeasurandEnum::DisplayRemainingTimeToMaximumSOC => "Display.RemainingTimeToMaximumSOC",
3574            MeasurandEnum::DisplayChargingComplete => "Display.ChargingComplete",
3575            MeasurandEnum::DisplayBatteryEnergyCapacity => "Display.BatteryEnergyCapacity",
3576            MeasurandEnum::DisplayInletHot => "Display.InletHot",
3577            MeasurandEnum::EnergyActiveExportInterval => "Energy.Active.Export.Interval",
3578            MeasurandEnum::EnergyActiveExportRegister => "Energy.Active.Export.Register",
3579            MeasurandEnum::EnergyActiveImportInterval => "Energy.Active.Import.Interval",
3580            MeasurandEnum::EnergyActiveImportRegister => "Energy.Active.Import.Register",
3581            MeasurandEnum::EnergyActiveImportCableLoss => "Energy.Active.Import.CableLoss",
3582            MeasurandEnum::EnergyActiveImportLocalGenerationRegister => {
3583                "Energy.Active.Import.LocalGeneration.Register"
3584            }
3585            MeasurandEnum::EnergyActiveNet => "Energy.Active.Net",
3586            MeasurandEnum::EnergyActiveSetpointInterval => "Energy.Active.Setpoint.Interval",
3587            MeasurandEnum::EnergyApparentExport => "Energy.Apparent.Export",
3588            MeasurandEnum::EnergyApparentImport => "Energy.Apparent.Import",
3589            MeasurandEnum::EnergyApparentNet => "Energy.Apparent.Net",
3590            MeasurandEnum::EnergyReactiveExportInterval => "Energy.Reactive.Export.Interval",
3591            MeasurandEnum::EnergyReactiveExportRegister => "Energy.Reactive.Export.Register",
3592            MeasurandEnum::EnergyReactiveImportInterval => "Energy.Reactive.Import.Interval",
3593            MeasurandEnum::EnergyReactiveImportRegister => "Energy.Reactive.Import.Register",
3594            MeasurandEnum::EnergyReactiveNet => "Energy.Reactive.Net",
3595            MeasurandEnum::EnergyRequestTarget => "EnergyRequest.Target",
3596            MeasurandEnum::EnergyRequestMinimum => "EnergyRequest.Minimum",
3597            MeasurandEnum::EnergyRequestMaximum => "EnergyRequest.Maximum",
3598            MeasurandEnum::EnergyRequestMinimumV2X => "EnergyRequest.Minimum.V2X",
3599            MeasurandEnum::EnergyRequestMaximumV2X => "EnergyRequest.Maximum.V2X",
3600            MeasurandEnum::EnergyRequestBulk => "EnergyRequest.Bulk",
3601            MeasurandEnum::Frequency => "Frequency",
3602            MeasurandEnum::PowerActiveExport => "Power.Active.Export",
3603            MeasurandEnum::PowerActiveImport => "Power.Active.Import",
3604            MeasurandEnum::PowerActiveSetpoint => "Power.Active.Setpoint",
3605            MeasurandEnum::PowerActiveResidual => "Power.Active.Residual",
3606            MeasurandEnum::PowerExportMinimum => "Power.Export.Minimum",
3607            MeasurandEnum::PowerExportOffered => "Power.Export.Offered",
3608            MeasurandEnum::PowerFactor => "Power.Factor",
3609            MeasurandEnum::PowerImportOffered => "Power.Import.Offered",
3610            MeasurandEnum::PowerImportMinimum => "Power.Import.Minimum",
3611            MeasurandEnum::PowerOffered => "Power.Offered",
3612            MeasurandEnum::PowerReactiveExport => "Power.Reactive.Export",
3613            MeasurandEnum::PowerReactiveImport => "Power.Reactive.Import",
3614            MeasurandEnum::SoC => "SoC",
3615            MeasurandEnum::Voltage => "Voltage",
3616            MeasurandEnum::VoltageMinimum => "Voltage.Minimum",
3617            MeasurandEnum::VoltageMaximum => "Voltage.Maximum",
3618        }
3619    }
3620}
3621
3622impl std::fmt::Display for MeasurandEnum {
3623    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3624        f.write_str(self.as_str())
3625    }
3626}
3627
3628impl std::str::FromStr for MeasurandEnum {
3629    type Err = ();
3630    fn from_str(s: &str) -> Result<Self, ()> {
3631        Self::ALL
3632            .iter()
3633            .copied()
3634            .find(|v| v.as_str() == s)
3635            .ok_or(())
3636    }
3637}
3638
3639impl Validate for MeasurandEnum {
3640    #[inline]
3641    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3642        Ok(())
3643    }
3644}
3645
3646/// Format of the message.
3647#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3648pub enum MessageFormatEnum {
3649    #[serde(rename = "ASCII")]
3650    ASCII,
3651    #[serde(rename = "HTML")]
3652    HTML,
3653    #[serde(rename = "URI")]
3654    URI,
3655    #[serde(rename = "UTF8")]
3656    UTF8,
3657    #[serde(rename = "QRCODE")]
3658    QRCODE,
3659}
3660
3661impl MessageFormatEnum {
3662    pub const ALL: &'static [MessageFormatEnum] = &[
3663        MessageFormatEnum::ASCII,
3664        MessageFormatEnum::HTML,
3665        MessageFormatEnum::URI,
3666        MessageFormatEnum::UTF8,
3667        MessageFormatEnum::QRCODE,
3668    ];
3669    /// Value as it appears on the wire.
3670    pub const fn as_str(&self) -> &'static str {
3671        match self {
3672            MessageFormatEnum::ASCII => "ASCII",
3673            MessageFormatEnum::HTML => "HTML",
3674            MessageFormatEnum::URI => "URI",
3675            MessageFormatEnum::UTF8 => "UTF8",
3676            MessageFormatEnum::QRCODE => "QRCODE",
3677        }
3678    }
3679}
3680
3681impl std::fmt::Display for MessageFormatEnum {
3682    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3683        f.write_str(self.as_str())
3684    }
3685}
3686
3687impl std::str::FromStr for MessageFormatEnum {
3688    type Err = ();
3689    fn from_str(s: &str) -> Result<Self, ()> {
3690        Self::ALL
3691            .iter()
3692            .copied()
3693            .find(|v| v.as_str() == s)
3694            .ok_or(())
3695    }
3696}
3697
3698impl Validate for MessageFormatEnum {
3699    #[inline]
3700    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3701        Ok(())
3702    }
3703}
3704
3705/// If provided the Charging Station shall return Display Messages with the given priority only.
3706#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3707pub enum MessagePriorityEnum {
3708    #[serde(rename = "AlwaysFront")]
3709    AlwaysFront,
3710    #[serde(rename = "InFront")]
3711    InFront,
3712    #[serde(rename = "NormalCycle")]
3713    NormalCycle,
3714}
3715
3716impl MessagePriorityEnum {
3717    pub const ALL: &'static [MessagePriorityEnum] = &[
3718        MessagePriorityEnum::AlwaysFront,
3719        MessagePriorityEnum::InFront,
3720        MessagePriorityEnum::NormalCycle,
3721    ];
3722    /// Value as it appears on the wire.
3723    pub const fn as_str(&self) -> &'static str {
3724        match self {
3725            MessagePriorityEnum::AlwaysFront => "AlwaysFront",
3726            MessagePriorityEnum::InFront => "InFront",
3727            MessagePriorityEnum::NormalCycle => "NormalCycle",
3728        }
3729    }
3730}
3731
3732impl std::fmt::Display for MessagePriorityEnum {
3733    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3734        f.write_str(self.as_str())
3735    }
3736}
3737
3738impl std::str::FromStr for MessagePriorityEnum {
3739    type Err = ();
3740    fn from_str(s: &str) -> Result<Self, ()> {
3741        Self::ALL
3742            .iter()
3743            .copied()
3744            .find(|v| v.as_str() == s)
3745            .ok_or(())
3746    }
3747}
3748
3749impl Validate for MessagePriorityEnum {
3750    #[inline]
3751    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3752        Ok(())
3753    }
3754}
3755
3756/// If provided the Charging Station shall return Display Messages with the given state only.
3757#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3758pub enum MessageStateEnum {
3759    #[serde(rename = "Charging")]
3760    Charging,
3761    #[serde(rename = "Faulted")]
3762    Faulted,
3763    #[serde(rename = "Idle")]
3764    Idle,
3765    #[serde(rename = "Unavailable")]
3766    Unavailable,
3767    #[serde(rename = "Suspended")]
3768    Suspended,
3769    #[serde(rename = "Discharging")]
3770    Discharging,
3771}
3772
3773impl MessageStateEnum {
3774    pub const ALL: &'static [MessageStateEnum] = &[
3775        MessageStateEnum::Charging,
3776        MessageStateEnum::Faulted,
3777        MessageStateEnum::Idle,
3778        MessageStateEnum::Unavailable,
3779        MessageStateEnum::Suspended,
3780        MessageStateEnum::Discharging,
3781    ];
3782    /// Value as it appears on the wire.
3783    pub const fn as_str(&self) -> &'static str {
3784        match self {
3785            MessageStateEnum::Charging => "Charging",
3786            MessageStateEnum::Faulted => "Faulted",
3787            MessageStateEnum::Idle => "Idle",
3788            MessageStateEnum::Unavailable => "Unavailable",
3789            MessageStateEnum::Suspended => "Suspended",
3790            MessageStateEnum::Discharging => "Discharging",
3791        }
3792    }
3793}
3794
3795impl std::fmt::Display for MessageStateEnum {
3796    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3797        f.write_str(self.as_str())
3798    }
3799}
3800
3801impl std::str::FromStr for MessageStateEnum {
3802    type Err = ();
3803    fn from_str(s: &str) -> Result<Self, ()> {
3804        Self::ALL
3805            .iter()
3806            .copied()
3807            .find(|v| v.as_str() == s)
3808            .ok_or(())
3809    }
3810}
3811
3812impl Validate for MessageStateEnum {
3813    #[inline]
3814    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3815        Ok(())
3816    }
3817}
3818
3819/// Type of message to be triggered.
3820#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3821pub enum MessageTriggerEnum {
3822    #[serde(rename = "BootNotification")]
3823    BootNotification,
3824    #[serde(rename = "LogStatusNotification")]
3825    LogStatusNotification,
3826    #[serde(rename = "FirmwareStatusNotification")]
3827    FirmwareStatusNotification,
3828    #[serde(rename = "Heartbeat")]
3829    Heartbeat,
3830    #[serde(rename = "MeterValues")]
3831    MeterValues,
3832    #[serde(rename = "SignChargingStationCertificate")]
3833    SignChargingStationCertificate,
3834    #[serde(rename = "SignV2GCertificate")]
3835    SignV2GCertificate,
3836    #[serde(rename = "SignV2G20Certificate")]
3837    SignV2G20Certificate,
3838    #[serde(rename = "StatusNotification")]
3839    StatusNotification,
3840    #[serde(rename = "TransactionEvent")]
3841    TransactionEvent,
3842    #[serde(rename = "SignCombinedCertificate")]
3843    SignCombinedCertificate,
3844    #[serde(rename = "PublishFirmwareStatusNotification")]
3845    PublishFirmwareStatusNotification,
3846    #[serde(rename = "CustomTrigger")]
3847    CustomTrigger,
3848}
3849
3850impl MessageTriggerEnum {
3851    pub const ALL: &'static [MessageTriggerEnum] = &[
3852        MessageTriggerEnum::BootNotification,
3853        MessageTriggerEnum::LogStatusNotification,
3854        MessageTriggerEnum::FirmwareStatusNotification,
3855        MessageTriggerEnum::Heartbeat,
3856        MessageTriggerEnum::MeterValues,
3857        MessageTriggerEnum::SignChargingStationCertificate,
3858        MessageTriggerEnum::SignV2GCertificate,
3859        MessageTriggerEnum::SignV2G20Certificate,
3860        MessageTriggerEnum::StatusNotification,
3861        MessageTriggerEnum::TransactionEvent,
3862        MessageTriggerEnum::SignCombinedCertificate,
3863        MessageTriggerEnum::PublishFirmwareStatusNotification,
3864        MessageTriggerEnum::CustomTrigger,
3865    ];
3866    /// Value as it appears on the wire.
3867    pub const fn as_str(&self) -> &'static str {
3868        match self {
3869            MessageTriggerEnum::BootNotification => "BootNotification",
3870            MessageTriggerEnum::LogStatusNotification => "LogStatusNotification",
3871            MessageTriggerEnum::FirmwareStatusNotification => "FirmwareStatusNotification",
3872            MessageTriggerEnum::Heartbeat => "Heartbeat",
3873            MessageTriggerEnum::MeterValues => "MeterValues",
3874            MessageTriggerEnum::SignChargingStationCertificate => "SignChargingStationCertificate",
3875            MessageTriggerEnum::SignV2GCertificate => "SignV2GCertificate",
3876            MessageTriggerEnum::SignV2G20Certificate => "SignV2G20Certificate",
3877            MessageTriggerEnum::StatusNotification => "StatusNotification",
3878            MessageTriggerEnum::TransactionEvent => "TransactionEvent",
3879            MessageTriggerEnum::SignCombinedCertificate => "SignCombinedCertificate",
3880            MessageTriggerEnum::PublishFirmwareStatusNotification => {
3881                "PublishFirmwareStatusNotification"
3882            }
3883            MessageTriggerEnum::CustomTrigger => "CustomTrigger",
3884        }
3885    }
3886}
3887
3888impl std::fmt::Display for MessageTriggerEnum {
3889    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3890        f.write_str(self.as_str())
3891    }
3892}
3893
3894impl std::str::FromStr for MessageTriggerEnum {
3895    type Err = ();
3896    fn from_str(s: &str) -> Result<Self, ()> {
3897        Self::ALL
3898            .iter()
3899            .copied()
3900            .find(|v| v.as_str() == s)
3901            .ok_or(())
3902    }
3903}
3904
3905impl Validate for MessageTriggerEnum {
3906    #[inline]
3907    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3908        Ok(())
3909    }
3910}
3911
3912/// *(2.1)* Value of EVCC indicates that EV determines min/target SOC and departure time. +
3913/// A value of EVCC_SECC indicates that charging station or CSMS may also update min/target SOC and departure time. +
3914/// *ISO 15118-20:* +
3915/// ServiceSelectionReq(SelectedEnergyTransferService)
3916#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3917pub enum MobilityNeedsModeEnum {
3918    #[serde(rename = "EVCC")]
3919    EVCC,
3920    #[serde(rename = "EVCC_SECC")]
3921    EVCCSECC,
3922}
3923
3924impl MobilityNeedsModeEnum {
3925    pub const ALL: &'static [MobilityNeedsModeEnum] =
3926        &[MobilityNeedsModeEnum::EVCC, MobilityNeedsModeEnum::EVCCSECC];
3927    /// Value as it appears on the wire.
3928    pub const fn as_str(&self) -> &'static str {
3929        match self {
3930            MobilityNeedsModeEnum::EVCC => "EVCC",
3931            MobilityNeedsModeEnum::EVCCSECC => "EVCC_SECC",
3932        }
3933    }
3934}
3935
3936impl std::fmt::Display for MobilityNeedsModeEnum {
3937    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3938        f.write_str(self.as_str())
3939    }
3940}
3941
3942impl std::str::FromStr for MobilityNeedsModeEnum {
3943    type Err = ();
3944    fn from_str(s: &str) -> Result<Self, ()> {
3945        Self::ALL
3946            .iter()
3947            .copied()
3948            .find(|v| v.as_str() == s)
3949            .ok_or(())
3950    }
3951}
3952
3953impl Validate for MobilityNeedsModeEnum {
3954    #[inline]
3955    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3956        Ok(())
3957    }
3958}
3959
3960/// The type of this monitor, e.g. a threshold, delta or periodic monitor.
3961#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3962pub enum MonitorEnum {
3963    #[serde(rename = "UpperThreshold")]
3964    UpperThreshold,
3965    #[serde(rename = "LowerThreshold")]
3966    LowerThreshold,
3967    #[serde(rename = "Delta")]
3968    Delta,
3969    #[serde(rename = "Periodic")]
3970    Periodic,
3971    #[serde(rename = "PeriodicClockAligned")]
3972    PeriodicClockAligned,
3973    #[serde(rename = "TargetDelta")]
3974    TargetDelta,
3975    #[serde(rename = "TargetDeltaRelative")]
3976    TargetDeltaRelative,
3977}
3978
3979impl MonitorEnum {
3980    pub const ALL: &'static [MonitorEnum] = &[
3981        MonitorEnum::UpperThreshold,
3982        MonitorEnum::LowerThreshold,
3983        MonitorEnum::Delta,
3984        MonitorEnum::Periodic,
3985        MonitorEnum::PeriodicClockAligned,
3986        MonitorEnum::TargetDelta,
3987        MonitorEnum::TargetDeltaRelative,
3988    ];
3989    /// Value as it appears on the wire.
3990    pub const fn as_str(&self) -> &'static str {
3991        match self {
3992            MonitorEnum::UpperThreshold => "UpperThreshold",
3993            MonitorEnum::LowerThreshold => "LowerThreshold",
3994            MonitorEnum::Delta => "Delta",
3995            MonitorEnum::Periodic => "Periodic",
3996            MonitorEnum::PeriodicClockAligned => "PeriodicClockAligned",
3997            MonitorEnum::TargetDelta => "TargetDelta",
3998            MonitorEnum::TargetDeltaRelative => "TargetDeltaRelative",
3999        }
4000    }
4001}
4002
4003impl std::fmt::Display for MonitorEnum {
4004    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4005        f.write_str(self.as_str())
4006    }
4007}
4008
4009impl std::str::FromStr for MonitorEnum {
4010    type Err = ();
4011    fn from_str(s: &str) -> Result<Self, ()> {
4012        Self::ALL
4013            .iter()
4014            .copied()
4015            .find(|v| v.as_str() == s)
4016            .ok_or(())
4017    }
4018}
4019
4020impl Validate for MonitorEnum {
4021    #[inline]
4022    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4023        Ok(())
4024    }
4025}
4026
4027/// Specify which monitoring base will be set
4028#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4029pub enum MonitoringBaseEnum {
4030    #[serde(rename = "All")]
4031    All,
4032    #[serde(rename = "FactoryDefault")]
4033    FactoryDefault,
4034    #[serde(rename = "HardWiredOnly")]
4035    HardWiredOnly,
4036}
4037
4038impl MonitoringBaseEnum {
4039    pub const ALL: &'static [MonitoringBaseEnum] = &[
4040        MonitoringBaseEnum::All,
4041        MonitoringBaseEnum::FactoryDefault,
4042        MonitoringBaseEnum::HardWiredOnly,
4043    ];
4044    /// Value as it appears on the wire.
4045    pub const fn as_str(&self) -> &'static str {
4046        match self {
4047            MonitoringBaseEnum::All => "All",
4048            MonitoringBaseEnum::FactoryDefault => "FactoryDefault",
4049            MonitoringBaseEnum::HardWiredOnly => "HardWiredOnly",
4050        }
4051    }
4052}
4053
4054impl std::fmt::Display for MonitoringBaseEnum {
4055    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4056        f.write_str(self.as_str())
4057    }
4058}
4059
4060impl std::str::FromStr for MonitoringBaseEnum {
4061    type Err = ();
4062    fn from_str(s: &str) -> Result<Self, ()> {
4063        Self::ALL
4064            .iter()
4065            .copied()
4066            .find(|v| v.as_str() == s)
4067            .ok_or(())
4068    }
4069}
4070
4071impl Validate for MonitoringBaseEnum {
4072    #[inline]
4073    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4074        Ok(())
4075    }
4076}
4077
4078#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4079pub enum MonitoringCriterionEnum {
4080    #[serde(rename = "ThresholdMonitoring")]
4081    ThresholdMonitoring,
4082    #[serde(rename = "DeltaMonitoring")]
4083    DeltaMonitoring,
4084    #[serde(rename = "PeriodicMonitoring")]
4085    PeriodicMonitoring,
4086}
4087
4088impl MonitoringCriterionEnum {
4089    pub const ALL: &'static [MonitoringCriterionEnum] = &[
4090        MonitoringCriterionEnum::ThresholdMonitoring,
4091        MonitoringCriterionEnum::DeltaMonitoring,
4092        MonitoringCriterionEnum::PeriodicMonitoring,
4093    ];
4094    /// Value as it appears on the wire.
4095    pub const fn as_str(&self) -> &'static str {
4096        match self {
4097            MonitoringCriterionEnum::ThresholdMonitoring => "ThresholdMonitoring",
4098            MonitoringCriterionEnum::DeltaMonitoring => "DeltaMonitoring",
4099            MonitoringCriterionEnum::PeriodicMonitoring => "PeriodicMonitoring",
4100        }
4101    }
4102}
4103
4104impl std::fmt::Display for MonitoringCriterionEnum {
4105    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4106        f.write_str(self.as_str())
4107    }
4108}
4109
4110impl std::str::FromStr for MonitoringCriterionEnum {
4111    type Err = ();
4112    fn from_str(s: &str) -> Result<Self, ()> {
4113        Self::ALL
4114            .iter()
4115            .copied()
4116            .find(|v| v.as_str() == s)
4117            .ok_or(())
4118    }
4119}
4120
4121impl Validate for MonitoringCriterionEnum {
4122    #[inline]
4123    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4124        Ok(())
4125    }
4126}
4127
4128/// Defines the mutability of this attribute. Default is ReadWrite when omitted.
4129#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4130pub enum MutabilityEnum {
4131    #[serde(rename = "ReadOnly")]
4132    ReadOnly,
4133    #[serde(rename = "WriteOnly")]
4134    WriteOnly,
4135    #[serde(rename = "ReadWrite")]
4136    ReadWrite,
4137}
4138
4139impl MutabilityEnum {
4140    pub const ALL: &'static [MutabilityEnum] = &[
4141        MutabilityEnum::ReadOnly,
4142        MutabilityEnum::WriteOnly,
4143        MutabilityEnum::ReadWrite,
4144    ];
4145    /// Value as it appears on the wire.
4146    pub const fn as_str(&self) -> &'static str {
4147        match self {
4148            MutabilityEnum::ReadOnly => "ReadOnly",
4149            MutabilityEnum::WriteOnly => "WriteOnly",
4150            MutabilityEnum::ReadWrite => "ReadWrite",
4151        }
4152    }
4153}
4154
4155impl std::fmt::Display for MutabilityEnum {
4156    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4157        f.write_str(self.as_str())
4158    }
4159}
4160
4161impl std::str::FromStr for MutabilityEnum {
4162    type Err = ();
4163    fn from_str(s: &str) -> Result<Self, ()> {
4164        Self::ALL
4165            .iter()
4166            .copied()
4167            .find(|v| v.as_str() == s)
4168            .ok_or(())
4169    }
4170}
4171
4172impl Validate for MutabilityEnum {
4173    #[inline]
4174    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4175        Ok(())
4176    }
4177}
4178
4179#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4180pub enum NotifyAllowedEnergyTransferStatusEnum {
4181    #[serde(rename = "Accepted")]
4182    Accepted,
4183    #[serde(rename = "Rejected")]
4184    Rejected,
4185}
4186
4187impl NotifyAllowedEnergyTransferStatusEnum {
4188    pub const ALL: &'static [NotifyAllowedEnergyTransferStatusEnum] = &[
4189        NotifyAllowedEnergyTransferStatusEnum::Accepted,
4190        NotifyAllowedEnergyTransferStatusEnum::Rejected,
4191    ];
4192    /// Value as it appears on the wire.
4193    pub const fn as_str(&self) -> &'static str {
4194        match self {
4195            NotifyAllowedEnergyTransferStatusEnum::Accepted => "Accepted",
4196            NotifyAllowedEnergyTransferStatusEnum::Rejected => "Rejected",
4197        }
4198    }
4199}
4200
4201impl std::fmt::Display for NotifyAllowedEnergyTransferStatusEnum {
4202    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4203        f.write_str(self.as_str())
4204    }
4205}
4206
4207impl std::str::FromStr for NotifyAllowedEnergyTransferStatusEnum {
4208    type Err = ();
4209    fn from_str(s: &str) -> Result<Self, ()> {
4210        Self::ALL
4211            .iter()
4212            .copied()
4213            .find(|v| v.as_str() == s)
4214            .ok_or(())
4215    }
4216}
4217
4218impl Validate for NotifyAllowedEnergyTransferStatusEnum {
4219    #[inline]
4220    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4221        Ok(())
4222    }
4223}
4224
4225/// 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.
4226#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4227pub enum NotifyEVChargingNeedsStatusEnum {
4228    #[serde(rename = "Accepted")]
4229    Accepted,
4230    #[serde(rename = "Rejected")]
4231    Rejected,
4232    #[serde(rename = "Processing")]
4233    Processing,
4234    #[serde(rename = "NoChargingProfile")]
4235    NoChargingProfile,
4236}
4237
4238impl NotifyEVChargingNeedsStatusEnum {
4239    pub const ALL: &'static [NotifyEVChargingNeedsStatusEnum] = &[
4240        NotifyEVChargingNeedsStatusEnum::Accepted,
4241        NotifyEVChargingNeedsStatusEnum::Rejected,
4242        NotifyEVChargingNeedsStatusEnum::Processing,
4243        NotifyEVChargingNeedsStatusEnum::NoChargingProfile,
4244    ];
4245    /// Value as it appears on the wire.
4246    pub const fn as_str(&self) -> &'static str {
4247        match self {
4248            NotifyEVChargingNeedsStatusEnum::Accepted => "Accepted",
4249            NotifyEVChargingNeedsStatusEnum::Rejected => "Rejected",
4250            NotifyEVChargingNeedsStatusEnum::Processing => "Processing",
4251            NotifyEVChargingNeedsStatusEnum::NoChargingProfile => "NoChargingProfile",
4252        }
4253    }
4254}
4255
4256impl std::fmt::Display for NotifyEVChargingNeedsStatusEnum {
4257    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4258        f.write_str(self.as_str())
4259    }
4260}
4261
4262impl std::str::FromStr for NotifyEVChargingNeedsStatusEnum {
4263    type Err = ();
4264    fn from_str(s: &str) -> Result<Self, ()> {
4265        Self::ALL
4266            .iter()
4267            .copied()
4268            .find(|v| v.as_str() == s)
4269            .ok_or(())
4270    }
4271}
4272
4273impl Validate for NotifyEVChargingNeedsStatusEnum {
4274    #[inline]
4275    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4276        Ok(())
4277    }
4278}
4279
4280/// Applicable Network Interface. Charging Station is allowed to use a different network interface to connect if the given one does not work.
4281#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4282pub enum OCPPInterfaceEnum {
4283    #[serde(rename = "Wired0")]
4284    Wired0,
4285    #[serde(rename = "Wired1")]
4286    Wired1,
4287    #[serde(rename = "Wired2")]
4288    Wired2,
4289    #[serde(rename = "Wired3")]
4290    Wired3,
4291    #[serde(rename = "Wireless0")]
4292    Wireless0,
4293    #[serde(rename = "Wireless1")]
4294    Wireless1,
4295    #[serde(rename = "Wireless2")]
4296    Wireless2,
4297    #[serde(rename = "Wireless3")]
4298    Wireless3,
4299    #[serde(rename = "Any")]
4300    Any,
4301}
4302
4303impl OCPPInterfaceEnum {
4304    pub const ALL: &'static [OCPPInterfaceEnum] = &[
4305        OCPPInterfaceEnum::Wired0,
4306        OCPPInterfaceEnum::Wired1,
4307        OCPPInterfaceEnum::Wired2,
4308        OCPPInterfaceEnum::Wired3,
4309        OCPPInterfaceEnum::Wireless0,
4310        OCPPInterfaceEnum::Wireless1,
4311        OCPPInterfaceEnum::Wireless2,
4312        OCPPInterfaceEnum::Wireless3,
4313        OCPPInterfaceEnum::Any,
4314    ];
4315    /// Value as it appears on the wire.
4316    pub const fn as_str(&self) -> &'static str {
4317        match self {
4318            OCPPInterfaceEnum::Wired0 => "Wired0",
4319            OCPPInterfaceEnum::Wired1 => "Wired1",
4320            OCPPInterfaceEnum::Wired2 => "Wired2",
4321            OCPPInterfaceEnum::Wired3 => "Wired3",
4322            OCPPInterfaceEnum::Wireless0 => "Wireless0",
4323            OCPPInterfaceEnum::Wireless1 => "Wireless1",
4324            OCPPInterfaceEnum::Wireless2 => "Wireless2",
4325            OCPPInterfaceEnum::Wireless3 => "Wireless3",
4326            OCPPInterfaceEnum::Any => "Any",
4327        }
4328    }
4329}
4330
4331impl std::fmt::Display for OCPPInterfaceEnum {
4332    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4333        f.write_str(self.as_str())
4334    }
4335}
4336
4337impl std::str::FromStr for OCPPInterfaceEnum {
4338    type Err = ();
4339    fn from_str(s: &str) -> Result<Self, ()> {
4340        Self::ALL
4341            .iter()
4342            .copied()
4343            .find(|v| v.as_str() == s)
4344            .ok_or(())
4345    }
4346}
4347
4348impl Validate for OCPPInterfaceEnum {
4349    #[inline]
4350    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4351        Ok(())
4352    }
4353}
4354
4355/// 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.
4356#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4357pub enum OCPPTransportEnum {
4358    #[serde(rename = "SOAP")]
4359    SOAP,
4360    #[serde(rename = "JSON")]
4361    JSON,
4362}
4363
4364impl OCPPTransportEnum {
4365    pub const ALL: &'static [OCPPTransportEnum] =
4366        &[OCPPTransportEnum::SOAP, OCPPTransportEnum::JSON];
4367    /// Value as it appears on the wire.
4368    pub const fn as_str(&self) -> &'static str {
4369        match self {
4370            OCPPTransportEnum::SOAP => "SOAP",
4371            OCPPTransportEnum::JSON => "JSON",
4372        }
4373    }
4374}
4375
4376impl std::fmt::Display for OCPPTransportEnum {
4377    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4378        f.write_str(self.as_str())
4379    }
4380}
4381
4382impl std::str::FromStr for OCPPTransportEnum {
4383    type Err = ();
4384    fn from_str(s: &str) -> Result<Self, ()> {
4385        Self::ALL
4386            .iter()
4387            .copied()
4388            .find(|v| v.as_str() == s)
4389            .ok_or(())
4390    }
4391}
4392
4393impl Validate for OCPPTransportEnum {
4394    #[inline]
4395    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4396        Ok(())
4397    }
4398}
4399
4400/// *(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.
4401#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4402pub enum OCPPVersionEnum {
4403    #[serde(rename = "OCPP12")]
4404    OCPP12,
4405    #[serde(rename = "OCPP15")]
4406    OCPP15,
4407    #[serde(rename = "OCPP16")]
4408    OCPP16,
4409    #[serde(rename = "OCPP20")]
4410    OCPP20,
4411    #[serde(rename = "OCPP201")]
4412    OCPP201,
4413    #[serde(rename = "OCPP21")]
4414    OCPP21,
4415}
4416
4417impl OCPPVersionEnum {
4418    pub const ALL: &'static [OCPPVersionEnum] = &[
4419        OCPPVersionEnum::OCPP12,
4420        OCPPVersionEnum::OCPP15,
4421        OCPPVersionEnum::OCPP16,
4422        OCPPVersionEnum::OCPP20,
4423        OCPPVersionEnum::OCPP201,
4424        OCPPVersionEnum::OCPP21,
4425    ];
4426    /// Value as it appears on the wire.
4427    pub const fn as_str(&self) -> &'static str {
4428        match self {
4429            OCPPVersionEnum::OCPP12 => "OCPP12",
4430            OCPPVersionEnum::OCPP15 => "OCPP15",
4431            OCPPVersionEnum::OCPP16 => "OCPP16",
4432            OCPPVersionEnum::OCPP20 => "OCPP20",
4433            OCPPVersionEnum::OCPP201 => "OCPP201",
4434            OCPPVersionEnum::OCPP21 => "OCPP21",
4435        }
4436    }
4437}
4438
4439impl std::fmt::Display for OCPPVersionEnum {
4440    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4441        f.write_str(self.as_str())
4442    }
4443}
4444
4445impl std::str::FromStr for OCPPVersionEnum {
4446    type Err = ();
4447    fn from_str(s: &str) -> Result<Self, ()> {
4448        Self::ALL
4449            .iter()
4450            .copied()
4451            .find(|v| v.as_str() == s)
4452            .ok_or(())
4453    }
4454}
4455
4456impl Validate for OCPPVersionEnum {
4457    #[inline]
4458    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4459        Ok(())
4460    }
4461}
4462
4463/// *(2.1)* Charging operation mode to use during this time interval. When absent defaults to `ChargingOnly`.
4464#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4465pub enum OperationModeEnum {
4466    #[serde(rename = "Idle")]
4467    Idle,
4468    #[serde(rename = "ChargingOnly")]
4469    ChargingOnly,
4470    #[serde(rename = "CentralSetpoint")]
4471    CentralSetpoint,
4472    #[serde(rename = "ExternalSetpoint")]
4473    ExternalSetpoint,
4474    #[serde(rename = "ExternalLimits")]
4475    ExternalLimits,
4476    #[serde(rename = "CentralFrequency")]
4477    CentralFrequency,
4478    #[serde(rename = "LocalFrequency")]
4479    LocalFrequency,
4480    #[serde(rename = "LocalLoadBalancing")]
4481    LocalLoadBalancing,
4482}
4483
4484impl OperationModeEnum {
4485    pub const ALL: &'static [OperationModeEnum] = &[
4486        OperationModeEnum::Idle,
4487        OperationModeEnum::ChargingOnly,
4488        OperationModeEnum::CentralSetpoint,
4489        OperationModeEnum::ExternalSetpoint,
4490        OperationModeEnum::ExternalLimits,
4491        OperationModeEnum::CentralFrequency,
4492        OperationModeEnum::LocalFrequency,
4493        OperationModeEnum::LocalLoadBalancing,
4494    ];
4495    /// Value as it appears on the wire.
4496    pub const fn as_str(&self) -> &'static str {
4497        match self {
4498            OperationModeEnum::Idle => "Idle",
4499            OperationModeEnum::ChargingOnly => "ChargingOnly",
4500            OperationModeEnum::CentralSetpoint => "CentralSetpoint",
4501            OperationModeEnum::ExternalSetpoint => "ExternalSetpoint",
4502            OperationModeEnum::ExternalLimits => "ExternalLimits",
4503            OperationModeEnum::CentralFrequency => "CentralFrequency",
4504            OperationModeEnum::LocalFrequency => "LocalFrequency",
4505            OperationModeEnum::LocalLoadBalancing => "LocalLoadBalancing",
4506        }
4507    }
4508}
4509
4510impl std::fmt::Display for OperationModeEnum {
4511    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4512        f.write_str(self.as_str())
4513    }
4514}
4515
4516impl std::str::FromStr for OperationModeEnum {
4517    type Err = ();
4518    fn from_str(s: &str) -> Result<Self, ()> {
4519        Self::ALL
4520            .iter()
4521            .copied()
4522            .find(|v| v.as_str() == s)
4523            .ok_or(())
4524    }
4525}
4526
4527impl Validate for OperationModeEnum {
4528    #[inline]
4529    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4530        Ok(())
4531    }
4532}
4533
4534/// This contains the type of availability change that the Charging Station should perform.
4535#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4536pub enum OperationalStatusEnum {
4537    #[serde(rename = "Inoperative")]
4538    Inoperative,
4539    #[serde(rename = "Operative")]
4540    Operative,
4541}
4542
4543impl OperationalStatusEnum {
4544    pub const ALL: &'static [OperationalStatusEnum] = &[
4545        OperationalStatusEnum::Inoperative,
4546        OperationalStatusEnum::Operative,
4547    ];
4548    /// Value as it appears on the wire.
4549    pub const fn as_str(&self) -> &'static str {
4550        match self {
4551            OperationalStatusEnum::Inoperative => "Inoperative",
4552            OperationalStatusEnum::Operative => "Operative",
4553        }
4554    }
4555}
4556
4557impl std::fmt::Display for OperationalStatusEnum {
4558    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4559        f.write_str(self.as_str())
4560    }
4561}
4562
4563impl std::str::FromStr for OperationalStatusEnum {
4564    type Err = ();
4565    fn from_str(s: &str) -> Result<Self, ()> {
4566        Self::ALL
4567            .iter()
4568            .copied()
4569            .find(|v| v.as_str() == s)
4570            .ok_or(())
4571    }
4572}
4573
4574impl Validate for OperationalStatusEnum {
4575    #[inline]
4576    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4577        Ok(())
4578    }
4579}
4580
4581/// The status of the settlement attempt.
4582#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4583pub enum PaymentStatusEnum {
4584    #[serde(rename = "Settled")]
4585    Settled,
4586    #[serde(rename = "Canceled")]
4587    Canceled,
4588    #[serde(rename = "Rejected")]
4589    Rejected,
4590    #[serde(rename = "Failed")]
4591    Failed,
4592}
4593
4594impl PaymentStatusEnum {
4595    pub const ALL: &'static [PaymentStatusEnum] = &[
4596        PaymentStatusEnum::Settled,
4597        PaymentStatusEnum::Canceled,
4598        PaymentStatusEnum::Rejected,
4599        PaymentStatusEnum::Failed,
4600    ];
4601    /// Value as it appears on the wire.
4602    pub const fn as_str(&self) -> &'static str {
4603        match self {
4604            PaymentStatusEnum::Settled => "Settled",
4605            PaymentStatusEnum::Canceled => "Canceled",
4606            PaymentStatusEnum::Rejected => "Rejected",
4607            PaymentStatusEnum::Failed => "Failed",
4608        }
4609    }
4610}
4611
4612impl std::fmt::Display for PaymentStatusEnum {
4613    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4614        f.write_str(self.as_str())
4615    }
4616}
4617
4618impl std::str::FromStr for PaymentStatusEnum {
4619    type Err = ();
4620    fn from_str(s: &str) -> Result<Self, ()> {
4621        Self::ALL
4622            .iter()
4623            .copied()
4624            .find(|v| v.as_str() == s)
4625            .ok_or(())
4626    }
4627}
4628
4629impl Validate for PaymentStatusEnum {
4630    #[inline]
4631    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4632        Ok(())
4633    }
4634}
4635
4636/// 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.
4637#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4638pub enum PhaseEnum {
4639    #[serde(rename = "L1")]
4640    L1,
4641    #[serde(rename = "L2")]
4642    L2,
4643    #[serde(rename = "L3")]
4644    L3,
4645    #[serde(rename = "N")]
4646    N,
4647    #[serde(rename = "L1-N")]
4648    L1N,
4649    #[serde(rename = "L2-N")]
4650    L2N,
4651    #[serde(rename = "L3-N")]
4652    L3N,
4653    #[serde(rename = "L1-L2")]
4654    L1L2,
4655    #[serde(rename = "L2-L3")]
4656    L2L3,
4657    #[serde(rename = "L3-L1")]
4658    L3L1,
4659}
4660
4661impl PhaseEnum {
4662    pub const ALL: &'static [PhaseEnum] = &[
4663        PhaseEnum::L1,
4664        PhaseEnum::L2,
4665        PhaseEnum::L3,
4666        PhaseEnum::N,
4667        PhaseEnum::L1N,
4668        PhaseEnum::L2N,
4669        PhaseEnum::L3N,
4670        PhaseEnum::L1L2,
4671        PhaseEnum::L2L3,
4672        PhaseEnum::L3L1,
4673    ];
4674    /// Value as it appears on the wire.
4675    pub const fn as_str(&self) -> &'static str {
4676        match self {
4677            PhaseEnum::L1 => "L1",
4678            PhaseEnum::L2 => "L2",
4679            PhaseEnum::L3 => "L3",
4680            PhaseEnum::N => "N",
4681            PhaseEnum::L1N => "L1-N",
4682            PhaseEnum::L2N => "L2-N",
4683            PhaseEnum::L3N => "L3-N",
4684            PhaseEnum::L1L2 => "L1-L2",
4685            PhaseEnum::L2L3 => "L2-L3",
4686            PhaseEnum::L3L1 => "L3-L1",
4687        }
4688    }
4689}
4690
4691impl std::fmt::Display for PhaseEnum {
4692    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4693        f.write_str(self.as_str())
4694    }
4695}
4696
4697impl std::str::FromStr for PhaseEnum {
4698    type Err = ();
4699    fn from_str(s: &str) -> Result<Self, ()> {
4700        Self::ALL
4701            .iter()
4702            .copied()
4703            .find(|v| v.as_str() == s)
4704            .ok_or(())
4705    }
4706}
4707
4708impl Validate for PhaseEnum {
4709    #[inline]
4710    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4711        Ok(())
4712    }
4713}
4714
4715/// 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.
4716#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4717pub enum PowerDuringCessationEnum {
4718    #[serde(rename = "Active")]
4719    Active,
4720    #[serde(rename = "Reactive")]
4721    Reactive,
4722}
4723
4724impl PowerDuringCessationEnum {
4725    pub const ALL: &'static [PowerDuringCessationEnum] = &[
4726        PowerDuringCessationEnum::Active,
4727        PowerDuringCessationEnum::Reactive,
4728    ];
4729    /// Value as it appears on the wire.
4730    pub const fn as_str(&self) -> &'static str {
4731        match self {
4732            PowerDuringCessationEnum::Active => "Active",
4733            PowerDuringCessationEnum::Reactive => "Reactive",
4734        }
4735    }
4736}
4737
4738impl std::fmt::Display for PowerDuringCessationEnum {
4739    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4740        f.write_str(self.as_str())
4741    }
4742}
4743
4744impl std::str::FromStr for PowerDuringCessationEnum {
4745    type Err = ();
4746    fn from_str(s: &str) -> Result<Self, ()> {
4747        Self::ALL
4748            .iter()
4749            .copied()
4750            .find(|v| v.as_str() == s)
4751            .ok_or(())
4752    }
4753}
4754
4755impl Validate for PowerDuringCessationEnum {
4756    #[inline]
4757    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4758        Ok(())
4759    }
4760}
4761
4762/// *(2.1)* The current preconditioning status of the BMS in the EV. Default value is Unknown.
4763#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4764pub enum PreconditioningStatusEnum {
4765    #[serde(rename = "Unknown")]
4766    Unknown,
4767    #[serde(rename = "Ready")]
4768    Ready,
4769    #[serde(rename = "NotReady")]
4770    NotReady,
4771    #[serde(rename = "Preconditioning")]
4772    Preconditioning,
4773}
4774
4775impl PreconditioningStatusEnum {
4776    pub const ALL: &'static [PreconditioningStatusEnum] = &[
4777        PreconditioningStatusEnum::Unknown,
4778        PreconditioningStatusEnum::Ready,
4779        PreconditioningStatusEnum::NotReady,
4780        PreconditioningStatusEnum::Preconditioning,
4781    ];
4782    /// Value as it appears on the wire.
4783    pub const fn as_str(&self) -> &'static str {
4784        match self {
4785            PreconditioningStatusEnum::Unknown => "Unknown",
4786            PreconditioningStatusEnum::Ready => "Ready",
4787            PreconditioningStatusEnum::NotReady => "NotReady",
4788            PreconditioningStatusEnum::Preconditioning => "Preconditioning",
4789        }
4790    }
4791}
4792
4793impl std::fmt::Display for PreconditioningStatusEnum {
4794    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4795        f.write_str(self.as_str())
4796    }
4797}
4798
4799impl std::str::FromStr for PreconditioningStatusEnum {
4800    type Err = ();
4801    fn from_str(s: &str) -> Result<Self, ()> {
4802        Self::ALL
4803            .iter()
4804            .copied()
4805            .find(|v| v.as_str() == s)
4806            .ok_or(())
4807    }
4808}
4809
4810impl Validate for PreconditioningStatusEnum {
4811    #[inline]
4812    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4813        Ok(())
4814    }
4815}
4816
4817/// Result of the request.
4818#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4819pub enum PriorityChargingStatusEnum {
4820    #[serde(rename = "Accepted")]
4821    Accepted,
4822    #[serde(rename = "Rejected")]
4823    Rejected,
4824    #[serde(rename = "NoProfile")]
4825    NoProfile,
4826}
4827
4828impl PriorityChargingStatusEnum {
4829    pub const ALL: &'static [PriorityChargingStatusEnum] = &[
4830        PriorityChargingStatusEnum::Accepted,
4831        PriorityChargingStatusEnum::Rejected,
4832        PriorityChargingStatusEnum::NoProfile,
4833    ];
4834    /// Value as it appears on the wire.
4835    pub const fn as_str(&self) -> &'static str {
4836        match self {
4837            PriorityChargingStatusEnum::Accepted => "Accepted",
4838            PriorityChargingStatusEnum::Rejected => "Rejected",
4839            PriorityChargingStatusEnum::NoProfile => "NoProfile",
4840        }
4841    }
4842}
4843
4844impl std::fmt::Display for PriorityChargingStatusEnum {
4845    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4846        f.write_str(self.as_str())
4847    }
4848}
4849
4850impl std::str::FromStr for PriorityChargingStatusEnum {
4851    type Err = ();
4852    fn from_str(s: &str) -> Result<Self, ()> {
4853        Self::ALL
4854            .iter()
4855            .copied()
4856            .find(|v| v.as_str() == s)
4857            .ok_or(())
4858    }
4859}
4860
4861impl Validate for PriorityChargingStatusEnum {
4862    #[inline]
4863    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4864        Ok(())
4865    }
4866}
4867
4868/// This contains the progress status of the publishfirmware
4869/// installation.
4870#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4871pub enum PublishFirmwareStatusEnum {
4872    #[serde(rename = "Idle")]
4873    Idle,
4874    #[serde(rename = "DownloadScheduled")]
4875    DownloadScheduled,
4876    #[serde(rename = "Downloading")]
4877    Downloading,
4878    #[serde(rename = "Downloaded")]
4879    Downloaded,
4880    #[serde(rename = "Published")]
4881    Published,
4882    #[serde(rename = "DownloadFailed")]
4883    DownloadFailed,
4884    #[serde(rename = "DownloadPaused")]
4885    DownloadPaused,
4886    #[serde(rename = "InvalidChecksum")]
4887    InvalidChecksum,
4888    #[serde(rename = "ChecksumVerified")]
4889    ChecksumVerified,
4890    #[serde(rename = "PublishFailed")]
4891    PublishFailed,
4892}
4893
4894impl PublishFirmwareStatusEnum {
4895    pub const ALL: &'static [PublishFirmwareStatusEnum] = &[
4896        PublishFirmwareStatusEnum::Idle,
4897        PublishFirmwareStatusEnum::DownloadScheduled,
4898        PublishFirmwareStatusEnum::Downloading,
4899        PublishFirmwareStatusEnum::Downloaded,
4900        PublishFirmwareStatusEnum::Published,
4901        PublishFirmwareStatusEnum::DownloadFailed,
4902        PublishFirmwareStatusEnum::DownloadPaused,
4903        PublishFirmwareStatusEnum::InvalidChecksum,
4904        PublishFirmwareStatusEnum::ChecksumVerified,
4905        PublishFirmwareStatusEnum::PublishFailed,
4906    ];
4907    /// Value as it appears on the wire.
4908    pub const fn as_str(&self) -> &'static str {
4909        match self {
4910            PublishFirmwareStatusEnum::Idle => "Idle",
4911            PublishFirmwareStatusEnum::DownloadScheduled => "DownloadScheduled",
4912            PublishFirmwareStatusEnum::Downloading => "Downloading",
4913            PublishFirmwareStatusEnum::Downloaded => "Downloaded",
4914            PublishFirmwareStatusEnum::Published => "Published",
4915            PublishFirmwareStatusEnum::DownloadFailed => "DownloadFailed",
4916            PublishFirmwareStatusEnum::DownloadPaused => "DownloadPaused",
4917            PublishFirmwareStatusEnum::InvalidChecksum => "InvalidChecksum",
4918            PublishFirmwareStatusEnum::ChecksumVerified => "ChecksumVerified",
4919            PublishFirmwareStatusEnum::PublishFailed => "PublishFailed",
4920        }
4921    }
4922}
4923
4924impl std::fmt::Display for PublishFirmwareStatusEnum {
4925    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4926        f.write_str(self.as_str())
4927    }
4928}
4929
4930impl std::str::FromStr for PublishFirmwareStatusEnum {
4931    type Err = ();
4932    fn from_str(s: &str) -> Result<Self, ()> {
4933        Self::ALL
4934            .iter()
4935            .copied()
4936            .find(|v| v.as_str() == s)
4937            .ok_or(())
4938    }
4939}
4940
4941impl Validate for PublishFirmwareStatusEnum {
4942    #[inline]
4943    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4944        Ok(())
4945    }
4946}
4947
4948/// Type of detail value: start, end or sample. Default = "Sample.Periodic"
4949#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4950pub enum ReadingContextEnum {
4951    #[serde(rename = "Interruption.Begin")]
4952    InterruptionBegin,
4953    #[serde(rename = "Interruption.End")]
4954    InterruptionEnd,
4955    #[serde(rename = "Other")]
4956    Other,
4957    #[serde(rename = "Sample.Clock")]
4958    SampleClock,
4959    #[serde(rename = "Sample.Periodic")]
4960    SamplePeriodic,
4961    #[serde(rename = "Transaction.Begin")]
4962    TransactionBegin,
4963    #[serde(rename = "Transaction.End")]
4964    TransactionEnd,
4965    #[serde(rename = "Trigger")]
4966    Trigger,
4967}
4968
4969impl ReadingContextEnum {
4970    pub const ALL: &'static [ReadingContextEnum] = &[
4971        ReadingContextEnum::InterruptionBegin,
4972        ReadingContextEnum::InterruptionEnd,
4973        ReadingContextEnum::Other,
4974        ReadingContextEnum::SampleClock,
4975        ReadingContextEnum::SamplePeriodic,
4976        ReadingContextEnum::TransactionBegin,
4977        ReadingContextEnum::TransactionEnd,
4978        ReadingContextEnum::Trigger,
4979    ];
4980    /// Value as it appears on the wire.
4981    pub const fn as_str(&self) -> &'static str {
4982        match self {
4983            ReadingContextEnum::InterruptionBegin => "Interruption.Begin",
4984            ReadingContextEnum::InterruptionEnd => "Interruption.End",
4985            ReadingContextEnum::Other => "Other",
4986            ReadingContextEnum::SampleClock => "Sample.Clock",
4987            ReadingContextEnum::SamplePeriodic => "Sample.Periodic",
4988            ReadingContextEnum::TransactionBegin => "Transaction.Begin",
4989            ReadingContextEnum::TransactionEnd => "Transaction.End",
4990            ReadingContextEnum::Trigger => "Trigger",
4991        }
4992    }
4993}
4994
4995impl std::fmt::Display for ReadingContextEnum {
4996    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4997        f.write_str(self.as_str())
4998    }
4999}
5000
5001impl std::str::FromStr for ReadingContextEnum {
5002    type Err = ();
5003    fn from_str(s: &str) -> Result<Self, ()> {
5004        Self::ALL
5005            .iter()
5006            .copied()
5007            .find(|v| v.as_str() == s)
5008            .ok_or(())
5009    }
5010}
5011
5012impl Validate for ReadingContextEnum {
5013    #[inline]
5014    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5015        Ok(())
5016    }
5017}
5018
5019/// 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. +
5020/// MAY only be omitted when _stoppedReason_ is "Local"
5021#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5022pub enum ReasonEnum {
5023    #[serde(rename = "DeAuthorized")]
5024    DeAuthorized,
5025    #[serde(rename = "EmergencyStop")]
5026    EmergencyStop,
5027    #[serde(rename = "EnergyLimitReached")]
5028    EnergyLimitReached,
5029    #[serde(rename = "EVDisconnected")]
5030    EVDisconnected,
5031    #[serde(rename = "GroundFault")]
5032    GroundFault,
5033    #[serde(rename = "ImmediateReset")]
5034    ImmediateReset,
5035    #[serde(rename = "MasterPass")]
5036    MasterPass,
5037    #[serde(rename = "Local")]
5038    Local,
5039    #[serde(rename = "LocalOutOfCredit")]
5040    LocalOutOfCredit,
5041    #[serde(rename = "Other")]
5042    Other,
5043    #[serde(rename = "OvercurrentFault")]
5044    OvercurrentFault,
5045    #[serde(rename = "PowerLoss")]
5046    PowerLoss,
5047    #[serde(rename = "PowerQuality")]
5048    PowerQuality,
5049    #[serde(rename = "Reboot")]
5050    Reboot,
5051    #[serde(rename = "Remote")]
5052    Remote,
5053    #[serde(rename = "SOCLimitReached")]
5054    SOCLimitReached,
5055    #[serde(rename = "StoppedByEV")]
5056    StoppedByEV,
5057    #[serde(rename = "TimeLimitReached")]
5058    TimeLimitReached,
5059    #[serde(rename = "Timeout")]
5060    Timeout,
5061    #[serde(rename = "ReqEnergyTransferRejected")]
5062    ReqEnergyTransferRejected,
5063}
5064
5065impl ReasonEnum {
5066    pub const ALL: &'static [ReasonEnum] = &[
5067        ReasonEnum::DeAuthorized,
5068        ReasonEnum::EmergencyStop,
5069        ReasonEnum::EnergyLimitReached,
5070        ReasonEnum::EVDisconnected,
5071        ReasonEnum::GroundFault,
5072        ReasonEnum::ImmediateReset,
5073        ReasonEnum::MasterPass,
5074        ReasonEnum::Local,
5075        ReasonEnum::LocalOutOfCredit,
5076        ReasonEnum::Other,
5077        ReasonEnum::OvercurrentFault,
5078        ReasonEnum::PowerLoss,
5079        ReasonEnum::PowerQuality,
5080        ReasonEnum::Reboot,
5081        ReasonEnum::Remote,
5082        ReasonEnum::SOCLimitReached,
5083        ReasonEnum::StoppedByEV,
5084        ReasonEnum::TimeLimitReached,
5085        ReasonEnum::Timeout,
5086        ReasonEnum::ReqEnergyTransferRejected,
5087    ];
5088    /// Value as it appears on the wire.
5089    pub const fn as_str(&self) -> &'static str {
5090        match self {
5091            ReasonEnum::DeAuthorized => "DeAuthorized",
5092            ReasonEnum::EmergencyStop => "EmergencyStop",
5093            ReasonEnum::EnergyLimitReached => "EnergyLimitReached",
5094            ReasonEnum::EVDisconnected => "EVDisconnected",
5095            ReasonEnum::GroundFault => "GroundFault",
5096            ReasonEnum::ImmediateReset => "ImmediateReset",
5097            ReasonEnum::MasterPass => "MasterPass",
5098            ReasonEnum::Local => "Local",
5099            ReasonEnum::LocalOutOfCredit => "LocalOutOfCredit",
5100            ReasonEnum::Other => "Other",
5101            ReasonEnum::OvercurrentFault => "OvercurrentFault",
5102            ReasonEnum::PowerLoss => "PowerLoss",
5103            ReasonEnum::PowerQuality => "PowerQuality",
5104            ReasonEnum::Reboot => "Reboot",
5105            ReasonEnum::Remote => "Remote",
5106            ReasonEnum::SOCLimitReached => "SOCLimitReached",
5107            ReasonEnum::StoppedByEV => "StoppedByEV",
5108            ReasonEnum::TimeLimitReached => "TimeLimitReached",
5109            ReasonEnum::Timeout => "Timeout",
5110            ReasonEnum::ReqEnergyTransferRejected => "ReqEnergyTransferRejected",
5111        }
5112    }
5113}
5114
5115impl std::fmt::Display for ReasonEnum {
5116    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5117        f.write_str(self.as_str())
5118    }
5119}
5120
5121impl std::str::FromStr for ReasonEnum {
5122    type Err = ();
5123    fn from_str(s: &str) -> Result<Self, ()> {
5124        Self::ALL
5125            .iter()
5126            .copied()
5127            .find(|v| v.as_str() == s)
5128            .ok_or(())
5129    }
5130}
5131
5132impl Validate for ReasonEnum {
5133    #[inline]
5134    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5135        Ok(())
5136    }
5137}
5138
5139/// Indicates the start point of a recurrence.
5140#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5141pub enum RecurrencyKindEnum {
5142    #[serde(rename = "Daily")]
5143    Daily,
5144    #[serde(rename = "Weekly")]
5145    Weekly,
5146}
5147
5148impl RecurrencyKindEnum {
5149    pub const ALL: &'static [RecurrencyKindEnum] =
5150        &[RecurrencyKindEnum::Daily, RecurrencyKindEnum::Weekly];
5151    /// Value as it appears on the wire.
5152    pub const fn as_str(&self) -> &'static str {
5153        match self {
5154            RecurrencyKindEnum::Daily => "Daily",
5155            RecurrencyKindEnum::Weekly => "Weekly",
5156        }
5157    }
5158}
5159
5160impl std::fmt::Display for RecurrencyKindEnum {
5161    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5162        f.write_str(self.as_str())
5163    }
5164}
5165
5166impl std::str::FromStr for RecurrencyKindEnum {
5167    type Err = ();
5168    fn from_str(s: &str) -> Result<Self, ()> {
5169        Self::ALL
5170            .iter()
5171            .copied()
5172            .find(|v| v.as_str() == s)
5173            .ok_or(())
5174    }
5175}
5176
5177impl Validate for RecurrencyKindEnum {
5178    #[inline]
5179    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5180        Ok(())
5181    }
5182}
5183
5184/// This contains whether the Charging Station has been registered
5185/// within the CSMS.
5186#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5187pub enum RegistrationStatusEnum {
5188    #[serde(rename = "Accepted")]
5189    Accepted,
5190    #[serde(rename = "Pending")]
5191    Pending,
5192    #[serde(rename = "Rejected")]
5193    Rejected,
5194}
5195
5196impl RegistrationStatusEnum {
5197    pub const ALL: &'static [RegistrationStatusEnum] = &[
5198        RegistrationStatusEnum::Accepted,
5199        RegistrationStatusEnum::Pending,
5200        RegistrationStatusEnum::Rejected,
5201    ];
5202    /// Value as it appears on the wire.
5203    pub const fn as_str(&self) -> &'static str {
5204        match self {
5205            RegistrationStatusEnum::Accepted => "Accepted",
5206            RegistrationStatusEnum::Pending => "Pending",
5207            RegistrationStatusEnum::Rejected => "Rejected",
5208        }
5209    }
5210}
5211
5212impl std::fmt::Display for RegistrationStatusEnum {
5213    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5214        f.write_str(self.as_str())
5215    }
5216}
5217
5218impl std::str::FromStr for RegistrationStatusEnum {
5219    type Err = ();
5220    fn from_str(s: &str) -> Result<Self, ()> {
5221        Self::ALL
5222            .iter()
5223            .copied()
5224            .find(|v| v.as_str() == s)
5225            .ok_or(())
5226    }
5227}
5228
5229impl Validate for RegistrationStatusEnum {
5230    #[inline]
5231    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5232        Ok(())
5233    }
5234}
5235
5236/// This field specifies the report base.
5237#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5238pub enum ReportBaseEnum {
5239    #[serde(rename = "ConfigurationInventory")]
5240    ConfigurationInventory,
5241    #[serde(rename = "FullInventory")]
5242    FullInventory,
5243    #[serde(rename = "SummaryInventory")]
5244    SummaryInventory,
5245}
5246
5247impl ReportBaseEnum {
5248    pub const ALL: &'static [ReportBaseEnum] = &[
5249        ReportBaseEnum::ConfigurationInventory,
5250        ReportBaseEnum::FullInventory,
5251        ReportBaseEnum::SummaryInventory,
5252    ];
5253    /// Value as it appears on the wire.
5254    pub const fn as_str(&self) -> &'static str {
5255        match self {
5256            ReportBaseEnum::ConfigurationInventory => "ConfigurationInventory",
5257            ReportBaseEnum::FullInventory => "FullInventory",
5258            ReportBaseEnum::SummaryInventory => "SummaryInventory",
5259        }
5260    }
5261}
5262
5263impl std::fmt::Display for ReportBaseEnum {
5264    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5265        f.write_str(self.as_str())
5266    }
5267}
5268
5269impl std::str::FromStr for ReportBaseEnum {
5270    type Err = ();
5271    fn from_str(s: &str) -> Result<Self, ()> {
5272        Self::ALL
5273            .iter()
5274            .copied()
5275            .find(|v| v.as_str() == s)
5276            .ok_or(())
5277    }
5278}
5279
5280impl Validate for ReportBaseEnum {
5281    #[inline]
5282    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5283        Ok(())
5284    }
5285}
5286
5287/// Status indicating whether the Charging Station accepts the request to start a transaction.
5288#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5289pub enum RequestStartStopStatusEnum {
5290    #[serde(rename = "Accepted")]
5291    Accepted,
5292    #[serde(rename = "Rejected")]
5293    Rejected,
5294}
5295
5296impl RequestStartStopStatusEnum {
5297    pub const ALL: &'static [RequestStartStopStatusEnum] = &[
5298        RequestStartStopStatusEnum::Accepted,
5299        RequestStartStopStatusEnum::Rejected,
5300    ];
5301    /// Value as it appears on the wire.
5302    pub const fn as_str(&self) -> &'static str {
5303        match self {
5304            RequestStartStopStatusEnum::Accepted => "Accepted",
5305            RequestStartStopStatusEnum::Rejected => "Rejected",
5306        }
5307    }
5308}
5309
5310impl std::fmt::Display for RequestStartStopStatusEnum {
5311    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5312        f.write_str(self.as_str())
5313    }
5314}
5315
5316impl std::str::FromStr for RequestStartStopStatusEnum {
5317    type Err = ();
5318    fn from_str(s: &str) -> Result<Self, ()> {
5319        Self::ALL
5320            .iter()
5321            .copied()
5322            .find(|v| v.as_str() == s)
5323            .ok_or(())
5324    }
5325}
5326
5327impl Validate for RequestStartStopStatusEnum {
5328    #[inline]
5329    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5330        Ok(())
5331    }
5332}
5333
5334/// The updated reservation status.
5335#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5336pub enum ReservationUpdateStatusEnum {
5337    #[serde(rename = "Expired")]
5338    Expired,
5339    #[serde(rename = "Removed")]
5340    Removed,
5341    #[serde(rename = "NoTransaction")]
5342    NoTransaction,
5343}
5344
5345impl ReservationUpdateStatusEnum {
5346    pub const ALL: &'static [ReservationUpdateStatusEnum] = &[
5347        ReservationUpdateStatusEnum::Expired,
5348        ReservationUpdateStatusEnum::Removed,
5349        ReservationUpdateStatusEnum::NoTransaction,
5350    ];
5351    /// Value as it appears on the wire.
5352    pub const fn as_str(&self) -> &'static str {
5353        match self {
5354            ReservationUpdateStatusEnum::Expired => "Expired",
5355            ReservationUpdateStatusEnum::Removed => "Removed",
5356            ReservationUpdateStatusEnum::NoTransaction => "NoTransaction",
5357        }
5358    }
5359}
5360
5361impl std::fmt::Display for ReservationUpdateStatusEnum {
5362    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5363        f.write_str(self.as_str())
5364    }
5365}
5366
5367impl std::str::FromStr for ReservationUpdateStatusEnum {
5368    type Err = ();
5369    fn from_str(s: &str) -> Result<Self, ()> {
5370        Self::ALL
5371            .iter()
5372            .copied()
5373            .find(|v| v.as_str() == s)
5374            .ok_or(())
5375    }
5376}
5377
5378impl Validate for ReservationUpdateStatusEnum {
5379    #[inline]
5380    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5381        Ok(())
5382    }
5383}
5384
5385/// This indicates the success or failure of the reservation.
5386#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5387pub enum ReserveNowStatusEnum {
5388    #[serde(rename = "Accepted")]
5389    Accepted,
5390    #[serde(rename = "Faulted")]
5391    Faulted,
5392    #[serde(rename = "Occupied")]
5393    Occupied,
5394    #[serde(rename = "Rejected")]
5395    Rejected,
5396    #[serde(rename = "Unavailable")]
5397    Unavailable,
5398}
5399
5400impl ReserveNowStatusEnum {
5401    pub const ALL: &'static [ReserveNowStatusEnum] = &[
5402        ReserveNowStatusEnum::Accepted,
5403        ReserveNowStatusEnum::Faulted,
5404        ReserveNowStatusEnum::Occupied,
5405        ReserveNowStatusEnum::Rejected,
5406        ReserveNowStatusEnum::Unavailable,
5407    ];
5408    /// Value as it appears on the wire.
5409    pub const fn as_str(&self) -> &'static str {
5410        match self {
5411            ReserveNowStatusEnum::Accepted => "Accepted",
5412            ReserveNowStatusEnum::Faulted => "Faulted",
5413            ReserveNowStatusEnum::Occupied => "Occupied",
5414            ReserveNowStatusEnum::Rejected => "Rejected",
5415            ReserveNowStatusEnum::Unavailable => "Unavailable",
5416        }
5417    }
5418}
5419
5420impl std::fmt::Display for ReserveNowStatusEnum {
5421    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5422        f.write_str(self.as_str())
5423    }
5424}
5425
5426impl std::str::FromStr for ReserveNowStatusEnum {
5427    type Err = ();
5428    fn from_str(s: &str) -> Result<Self, ()> {
5429        Self::ALL
5430            .iter()
5431            .copied()
5432            .find(|v| v.as_str() == s)
5433            .ok_or(())
5434    }
5435}
5436
5437impl Validate for ReserveNowStatusEnum {
5438    #[inline]
5439    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5440        Ok(())
5441    }
5442}
5443
5444/// This contains the type of reset that the Charging Station or EVSE should perform.
5445#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5446pub enum ResetEnum {
5447    #[serde(rename = "Immediate")]
5448    Immediate,
5449    #[serde(rename = "OnIdle")]
5450    OnIdle,
5451    #[serde(rename = "ImmediateAndResume")]
5452    ImmediateAndResume,
5453}
5454
5455impl ResetEnum {
5456    pub const ALL: &'static [ResetEnum] = &[
5457        ResetEnum::Immediate,
5458        ResetEnum::OnIdle,
5459        ResetEnum::ImmediateAndResume,
5460    ];
5461    /// Value as it appears on the wire.
5462    pub const fn as_str(&self) -> &'static str {
5463        match self {
5464            ResetEnum::Immediate => "Immediate",
5465            ResetEnum::OnIdle => "OnIdle",
5466            ResetEnum::ImmediateAndResume => "ImmediateAndResume",
5467        }
5468    }
5469}
5470
5471impl std::fmt::Display for ResetEnum {
5472    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5473        f.write_str(self.as_str())
5474    }
5475}
5476
5477impl std::str::FromStr for ResetEnum {
5478    type Err = ();
5479    fn from_str(s: &str) -> Result<Self, ()> {
5480        Self::ALL
5481            .iter()
5482            .copied()
5483            .find(|v| v.as_str() == s)
5484            .ok_or(())
5485    }
5486}
5487
5488impl Validate for ResetEnum {
5489    #[inline]
5490    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5491        Ok(())
5492    }
5493}
5494
5495/// This indicates whether the Charging Station is able to perform the reset.
5496#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5497pub enum ResetStatusEnum {
5498    #[serde(rename = "Accepted")]
5499    Accepted,
5500    #[serde(rename = "Rejected")]
5501    Rejected,
5502    #[serde(rename = "Scheduled")]
5503    Scheduled,
5504}
5505
5506impl ResetStatusEnum {
5507    pub const ALL: &'static [ResetStatusEnum] = &[
5508        ResetStatusEnum::Accepted,
5509        ResetStatusEnum::Rejected,
5510        ResetStatusEnum::Scheduled,
5511    ];
5512    /// Value as it appears on the wire.
5513    pub const fn as_str(&self) -> &'static str {
5514        match self {
5515            ResetStatusEnum::Accepted => "Accepted",
5516            ResetStatusEnum::Rejected => "Rejected",
5517            ResetStatusEnum::Scheduled => "Scheduled",
5518        }
5519    }
5520}
5521
5522impl std::fmt::Display for ResetStatusEnum {
5523    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5524        f.write_str(self.as_str())
5525    }
5526}
5527
5528impl std::str::FromStr for ResetStatusEnum {
5529    type Err = ();
5530    fn from_str(s: &str) -> Result<Self, ()> {
5531        Self::ALL
5532            .iter()
5533            .copied()
5534            .find(|v| v.as_str() == s)
5535            .ok_or(())
5536    }
5537}
5538
5539impl Validate for ResetStatusEnum {
5540    #[inline]
5541    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5542        Ok(())
5543    }
5544}
5545
5546/// This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
5547#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5548pub enum SendLocalListStatusEnum {
5549    #[serde(rename = "Accepted")]
5550    Accepted,
5551    #[serde(rename = "Failed")]
5552    Failed,
5553    #[serde(rename = "VersionMismatch")]
5554    VersionMismatch,
5555}
5556
5557impl SendLocalListStatusEnum {
5558    pub const ALL: &'static [SendLocalListStatusEnum] = &[
5559        SendLocalListStatusEnum::Accepted,
5560        SendLocalListStatusEnum::Failed,
5561        SendLocalListStatusEnum::VersionMismatch,
5562    ];
5563    /// Value as it appears on the wire.
5564    pub const fn as_str(&self) -> &'static str {
5565        match self {
5566            SendLocalListStatusEnum::Accepted => "Accepted",
5567            SendLocalListStatusEnum::Failed => "Failed",
5568            SendLocalListStatusEnum::VersionMismatch => "VersionMismatch",
5569        }
5570    }
5571}
5572
5573impl std::fmt::Display for SendLocalListStatusEnum {
5574    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5575        f.write_str(self.as_str())
5576    }
5577}
5578
5579impl std::str::FromStr for SendLocalListStatusEnum {
5580    type Err = ();
5581    fn from_str(s: &str) -> Result<Self, ()> {
5582        Self::ALL
5583            .iter()
5584            .copied()
5585            .find(|v| v.as_str() == s)
5586            .ok_or(())
5587    }
5588}
5589
5590impl Validate for SendLocalListStatusEnum {
5591    #[inline]
5592    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5593        Ok(())
5594    }
5595}
5596
5597/// Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
5598#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5599pub enum SetMonitoringStatusEnum {
5600    #[serde(rename = "Accepted")]
5601    Accepted,
5602    #[serde(rename = "UnknownComponent")]
5603    UnknownComponent,
5604    #[serde(rename = "UnknownVariable")]
5605    UnknownVariable,
5606    #[serde(rename = "UnsupportedMonitorType")]
5607    UnsupportedMonitorType,
5608    #[serde(rename = "Rejected")]
5609    Rejected,
5610    #[serde(rename = "Duplicate")]
5611    Duplicate,
5612}
5613
5614impl SetMonitoringStatusEnum {
5615    pub const ALL: &'static [SetMonitoringStatusEnum] = &[
5616        SetMonitoringStatusEnum::Accepted,
5617        SetMonitoringStatusEnum::UnknownComponent,
5618        SetMonitoringStatusEnum::UnknownVariable,
5619        SetMonitoringStatusEnum::UnsupportedMonitorType,
5620        SetMonitoringStatusEnum::Rejected,
5621        SetMonitoringStatusEnum::Duplicate,
5622    ];
5623    /// Value as it appears on the wire.
5624    pub const fn as_str(&self) -> &'static str {
5625        match self {
5626            SetMonitoringStatusEnum::Accepted => "Accepted",
5627            SetMonitoringStatusEnum::UnknownComponent => "UnknownComponent",
5628            SetMonitoringStatusEnum::UnknownVariable => "UnknownVariable",
5629            SetMonitoringStatusEnum::UnsupportedMonitorType => "UnsupportedMonitorType",
5630            SetMonitoringStatusEnum::Rejected => "Rejected",
5631            SetMonitoringStatusEnum::Duplicate => "Duplicate",
5632        }
5633    }
5634}
5635
5636impl std::fmt::Display for SetMonitoringStatusEnum {
5637    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5638        f.write_str(self.as_str())
5639    }
5640}
5641
5642impl std::str::FromStr for SetMonitoringStatusEnum {
5643    type Err = ();
5644    fn from_str(s: &str) -> Result<Self, ()> {
5645        Self::ALL
5646            .iter()
5647            .copied()
5648            .find(|v| v.as_str() == s)
5649            .ok_or(())
5650    }
5651}
5652
5653impl Validate for SetMonitoringStatusEnum {
5654    #[inline]
5655    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5656        Ok(())
5657    }
5658}
5659
5660/// Result of operation.
5661#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5662pub enum SetNetworkProfileStatusEnum {
5663    #[serde(rename = "Accepted")]
5664    Accepted,
5665    #[serde(rename = "Rejected")]
5666    Rejected,
5667    #[serde(rename = "Failed")]
5668    Failed,
5669}
5670
5671impl SetNetworkProfileStatusEnum {
5672    pub const ALL: &'static [SetNetworkProfileStatusEnum] = &[
5673        SetNetworkProfileStatusEnum::Accepted,
5674        SetNetworkProfileStatusEnum::Rejected,
5675        SetNetworkProfileStatusEnum::Failed,
5676    ];
5677    /// Value as it appears on the wire.
5678    pub const fn as_str(&self) -> &'static str {
5679        match self {
5680            SetNetworkProfileStatusEnum::Accepted => "Accepted",
5681            SetNetworkProfileStatusEnum::Rejected => "Rejected",
5682            SetNetworkProfileStatusEnum::Failed => "Failed",
5683        }
5684    }
5685}
5686
5687impl std::fmt::Display for SetNetworkProfileStatusEnum {
5688    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5689        f.write_str(self.as_str())
5690    }
5691}
5692
5693impl std::str::FromStr for SetNetworkProfileStatusEnum {
5694    type Err = ();
5695    fn from_str(s: &str) -> Result<Self, ()> {
5696        Self::ALL
5697            .iter()
5698            .copied()
5699            .find(|v| v.as_str() == s)
5700            .ok_or(())
5701    }
5702}
5703
5704impl Validate for SetNetworkProfileStatusEnum {
5705    #[inline]
5706    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5707        Ok(())
5708    }
5709}
5710
5711/// Result status of setting the variable.
5712#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5713pub enum SetVariableStatusEnum {
5714    #[serde(rename = "Accepted")]
5715    Accepted,
5716    #[serde(rename = "Rejected")]
5717    Rejected,
5718    #[serde(rename = "UnknownComponent")]
5719    UnknownComponent,
5720    #[serde(rename = "UnknownVariable")]
5721    UnknownVariable,
5722    #[serde(rename = "NotSupportedAttributeType")]
5723    NotSupportedAttributeType,
5724    #[serde(rename = "RebootRequired")]
5725    RebootRequired,
5726}
5727
5728impl SetVariableStatusEnum {
5729    pub const ALL: &'static [SetVariableStatusEnum] = &[
5730        SetVariableStatusEnum::Accepted,
5731        SetVariableStatusEnum::Rejected,
5732        SetVariableStatusEnum::UnknownComponent,
5733        SetVariableStatusEnum::UnknownVariable,
5734        SetVariableStatusEnum::NotSupportedAttributeType,
5735        SetVariableStatusEnum::RebootRequired,
5736    ];
5737    /// Value as it appears on the wire.
5738    pub const fn as_str(&self) -> &'static str {
5739        match self {
5740            SetVariableStatusEnum::Accepted => "Accepted",
5741            SetVariableStatusEnum::Rejected => "Rejected",
5742            SetVariableStatusEnum::UnknownComponent => "UnknownComponent",
5743            SetVariableStatusEnum::UnknownVariable => "UnknownVariable",
5744            SetVariableStatusEnum::NotSupportedAttributeType => "NotSupportedAttributeType",
5745            SetVariableStatusEnum::RebootRequired => "RebootRequired",
5746        }
5747    }
5748}
5749
5750impl std::fmt::Display for SetVariableStatusEnum {
5751    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5752        f.write_str(self.as_str())
5753    }
5754}
5755
5756impl std::str::FromStr for SetVariableStatusEnum {
5757    type Err = ();
5758    fn from_str(s: &str) -> Result<Self, ()> {
5759        Self::ALL
5760            .iter()
5761            .copied()
5762            .find(|v| v.as_str() == s)
5763            .ok_or(())
5764    }
5765}
5766
5767impl Validate for SetVariableStatusEnum {
5768    #[inline]
5769    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5770        Ok(())
5771    }
5772}
5773
5774/// Status of the operation
5775#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5776pub enum TariffChangeStatusEnum {
5777    #[serde(rename = "Accepted")]
5778    Accepted,
5779    #[serde(rename = "Rejected")]
5780    Rejected,
5781    #[serde(rename = "TooManyElements")]
5782    TooManyElements,
5783    #[serde(rename = "ConditionNotSupported")]
5784    ConditionNotSupported,
5785    #[serde(rename = "TxNotFound")]
5786    TxNotFound,
5787    #[serde(rename = "NoCurrencyChange")]
5788    NoCurrencyChange,
5789}
5790
5791impl TariffChangeStatusEnum {
5792    pub const ALL: &'static [TariffChangeStatusEnum] = &[
5793        TariffChangeStatusEnum::Accepted,
5794        TariffChangeStatusEnum::Rejected,
5795        TariffChangeStatusEnum::TooManyElements,
5796        TariffChangeStatusEnum::ConditionNotSupported,
5797        TariffChangeStatusEnum::TxNotFound,
5798        TariffChangeStatusEnum::NoCurrencyChange,
5799    ];
5800    /// Value as it appears on the wire.
5801    pub const fn as_str(&self) -> &'static str {
5802        match self {
5803            TariffChangeStatusEnum::Accepted => "Accepted",
5804            TariffChangeStatusEnum::Rejected => "Rejected",
5805            TariffChangeStatusEnum::TooManyElements => "TooManyElements",
5806            TariffChangeStatusEnum::ConditionNotSupported => "ConditionNotSupported",
5807            TariffChangeStatusEnum::TxNotFound => "TxNotFound",
5808            TariffChangeStatusEnum::NoCurrencyChange => "NoCurrencyChange",
5809        }
5810    }
5811}
5812
5813impl std::fmt::Display for TariffChangeStatusEnum {
5814    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5815        f.write_str(self.as_str())
5816    }
5817}
5818
5819impl std::str::FromStr for TariffChangeStatusEnum {
5820    type Err = ();
5821    fn from_str(s: &str) -> Result<Self, ()> {
5822        Self::ALL
5823            .iter()
5824            .copied()
5825            .find(|v| v.as_str() == s)
5826            .ok_or(())
5827    }
5828}
5829
5830impl Validate for TariffChangeStatusEnum {
5831    #[inline]
5832    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5833        Ok(())
5834    }
5835}
5836
5837#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5838pub enum TariffClearStatusEnum {
5839    #[serde(rename = "Accepted")]
5840    Accepted,
5841    #[serde(rename = "Rejected")]
5842    Rejected,
5843    #[serde(rename = "NoTariff")]
5844    NoTariff,
5845}
5846
5847impl TariffClearStatusEnum {
5848    pub const ALL: &'static [TariffClearStatusEnum] = &[
5849        TariffClearStatusEnum::Accepted,
5850        TariffClearStatusEnum::Rejected,
5851        TariffClearStatusEnum::NoTariff,
5852    ];
5853    /// Value as it appears on the wire.
5854    pub const fn as_str(&self) -> &'static str {
5855        match self {
5856            TariffClearStatusEnum::Accepted => "Accepted",
5857            TariffClearStatusEnum::Rejected => "Rejected",
5858            TariffClearStatusEnum::NoTariff => "NoTariff",
5859        }
5860    }
5861}
5862
5863impl std::fmt::Display for TariffClearStatusEnum {
5864    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5865        f.write_str(self.as_str())
5866    }
5867}
5868
5869impl std::str::FromStr for TariffClearStatusEnum {
5870    type Err = ();
5871    fn from_str(s: &str) -> Result<Self, ()> {
5872        Self::ALL
5873            .iter()
5874            .copied()
5875            .find(|v| v.as_str() == s)
5876            .ok_or(())
5877    }
5878}
5879
5880impl Validate for TariffClearStatusEnum {
5881    #[inline]
5882    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5883        Ok(())
5884    }
5885}
5886
5887/// Type of cost: normal or the minimum or maximum cost.
5888#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5889pub enum TariffCostEnum {
5890    #[serde(rename = "NormalCost")]
5891    NormalCost,
5892    #[serde(rename = "MinCost")]
5893    MinCost,
5894    #[serde(rename = "MaxCost")]
5895    MaxCost,
5896}
5897
5898impl TariffCostEnum {
5899    pub const ALL: &'static [TariffCostEnum] = &[
5900        TariffCostEnum::NormalCost,
5901        TariffCostEnum::MinCost,
5902        TariffCostEnum::MaxCost,
5903    ];
5904    /// Value as it appears on the wire.
5905    pub const fn as_str(&self) -> &'static str {
5906        match self {
5907            TariffCostEnum::NormalCost => "NormalCost",
5908            TariffCostEnum::MinCost => "MinCost",
5909            TariffCostEnum::MaxCost => "MaxCost",
5910        }
5911    }
5912}
5913
5914impl std::fmt::Display for TariffCostEnum {
5915    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5916        f.write_str(self.as_str())
5917    }
5918}
5919
5920impl std::str::FromStr for TariffCostEnum {
5921    type Err = ();
5922    fn from_str(s: &str) -> Result<Self, ()> {
5923        Self::ALL
5924            .iter()
5925            .copied()
5926            .find(|v| v.as_str() == s)
5927            .ok_or(())
5928    }
5929}
5930
5931impl Validate for TariffCostEnum {
5932    #[inline]
5933    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5934        Ok(())
5935    }
5936}
5937
5938/// Status of operation
5939#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5940pub enum TariffGetStatusEnum {
5941    #[serde(rename = "Accepted")]
5942    Accepted,
5943    #[serde(rename = "Rejected")]
5944    Rejected,
5945    #[serde(rename = "NoTariff")]
5946    NoTariff,
5947}
5948
5949impl TariffGetStatusEnum {
5950    pub const ALL: &'static [TariffGetStatusEnum] = &[
5951        TariffGetStatusEnum::Accepted,
5952        TariffGetStatusEnum::Rejected,
5953        TariffGetStatusEnum::NoTariff,
5954    ];
5955    /// Value as it appears on the wire.
5956    pub const fn as_str(&self) -> &'static str {
5957        match self {
5958            TariffGetStatusEnum::Accepted => "Accepted",
5959            TariffGetStatusEnum::Rejected => "Rejected",
5960            TariffGetStatusEnum::NoTariff => "NoTariff",
5961        }
5962    }
5963}
5964
5965impl std::fmt::Display for TariffGetStatusEnum {
5966    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5967        f.write_str(self.as_str())
5968    }
5969}
5970
5971impl std::str::FromStr for TariffGetStatusEnum {
5972    type Err = ();
5973    fn from_str(s: &str) -> Result<Self, ()> {
5974        Self::ALL
5975            .iter()
5976            .copied()
5977            .find(|v| v.as_str() == s)
5978            .ok_or(())
5979    }
5980}
5981
5982impl Validate for TariffGetStatusEnum {
5983    #[inline]
5984    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5985        Ok(())
5986    }
5987}
5988
5989/// Kind of tariff (driver/default)
5990#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5991pub enum TariffKindEnum {
5992    #[serde(rename = "DefaultTariff")]
5993    DefaultTariff,
5994    #[serde(rename = "DriverTariff")]
5995    DriverTariff,
5996}
5997
5998impl TariffKindEnum {
5999    pub const ALL: &'static [TariffKindEnum] =
6000        &[TariffKindEnum::DefaultTariff, TariffKindEnum::DriverTariff];
6001    /// Value as it appears on the wire.
6002    pub const fn as_str(&self) -> &'static str {
6003        match self {
6004            TariffKindEnum::DefaultTariff => "DefaultTariff",
6005            TariffKindEnum::DriverTariff => "DriverTariff",
6006        }
6007    }
6008}
6009
6010impl std::fmt::Display for TariffKindEnum {
6011    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6012        f.write_str(self.as_str())
6013    }
6014}
6015
6016impl std::str::FromStr for TariffKindEnum {
6017    type Err = ();
6018    fn from_str(s: &str) -> Result<Self, ()> {
6019        Self::ALL
6020            .iter()
6021            .copied()
6022            .find(|v| v.as_str() == s)
6023            .ok_or(())
6024    }
6025}
6026
6027impl Validate for TariffKindEnum {
6028    #[inline]
6029    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6030        Ok(())
6031    }
6032}
6033
6034#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6035pub enum TariffSetStatusEnum {
6036    #[serde(rename = "Accepted")]
6037    Accepted,
6038    #[serde(rename = "Rejected")]
6039    Rejected,
6040    #[serde(rename = "TooManyElements")]
6041    TooManyElements,
6042    #[serde(rename = "ConditionNotSupported")]
6043    ConditionNotSupported,
6044    #[serde(rename = "DuplicateTariffId")]
6045    DuplicateTariffId,
6046}
6047
6048impl TariffSetStatusEnum {
6049    pub const ALL: &'static [TariffSetStatusEnum] = &[
6050        TariffSetStatusEnum::Accepted,
6051        TariffSetStatusEnum::Rejected,
6052        TariffSetStatusEnum::TooManyElements,
6053        TariffSetStatusEnum::ConditionNotSupported,
6054        TariffSetStatusEnum::DuplicateTariffId,
6055    ];
6056    /// Value as it appears on the wire.
6057    pub const fn as_str(&self) -> &'static str {
6058        match self {
6059            TariffSetStatusEnum::Accepted => "Accepted",
6060            TariffSetStatusEnum::Rejected => "Rejected",
6061            TariffSetStatusEnum::TooManyElements => "TooManyElements",
6062            TariffSetStatusEnum::ConditionNotSupported => "ConditionNotSupported",
6063            TariffSetStatusEnum::DuplicateTariffId => "DuplicateTariffId",
6064        }
6065    }
6066}
6067
6068impl std::fmt::Display for TariffSetStatusEnum {
6069    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6070        f.write_str(self.as_str())
6071    }
6072}
6073
6074impl std::str::FromStr for TariffSetStatusEnum {
6075    type Err = ();
6076    fn from_str(s: &str) -> Result<Self, ()> {
6077        Self::ALL
6078            .iter()
6079            .copied()
6080            .find(|v| v.as_str() == s)
6081            .ok_or(())
6082    }
6083}
6084
6085impl Validate for TariffSetStatusEnum {
6086    #[inline]
6087    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6088        Ok(())
6089    }
6090}
6091
6092/// This contains the type of this event.
6093/// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
6094#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6095pub enum TransactionEventEnum {
6096    #[serde(rename = "Ended")]
6097    Ended,
6098    #[serde(rename = "Started")]
6099    Started,
6100    #[serde(rename = "Updated")]
6101    Updated,
6102}
6103
6104impl TransactionEventEnum {
6105    pub const ALL: &'static [TransactionEventEnum] = &[
6106        TransactionEventEnum::Ended,
6107        TransactionEventEnum::Started,
6108        TransactionEventEnum::Updated,
6109    ];
6110    /// Value as it appears on the wire.
6111    pub const fn as_str(&self) -> &'static str {
6112        match self {
6113            TransactionEventEnum::Ended => "Ended",
6114            TransactionEventEnum::Started => "Started",
6115            TransactionEventEnum::Updated => "Updated",
6116        }
6117    }
6118}
6119
6120impl std::fmt::Display for TransactionEventEnum {
6121    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6122        f.write_str(self.as_str())
6123    }
6124}
6125
6126impl std::str::FromStr for TransactionEventEnum {
6127    type Err = ();
6128    fn from_str(s: &str) -> Result<Self, ()> {
6129        Self::ALL
6130            .iter()
6131            .copied()
6132            .find(|v| v.as_str() == s)
6133            .ok_or(())
6134    }
6135}
6136
6137impl Validate for TransactionEventEnum {
6138    #[inline]
6139    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6140        Ok(())
6141    }
6142}
6143
6144/// Indicates whether the Charging Station will send the requested notification or not.
6145#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6146pub enum TriggerMessageStatusEnum {
6147    #[serde(rename = "Accepted")]
6148    Accepted,
6149    #[serde(rename = "Rejected")]
6150    Rejected,
6151    #[serde(rename = "NotImplemented")]
6152    NotImplemented,
6153}
6154
6155impl TriggerMessageStatusEnum {
6156    pub const ALL: &'static [TriggerMessageStatusEnum] = &[
6157        TriggerMessageStatusEnum::Accepted,
6158        TriggerMessageStatusEnum::Rejected,
6159        TriggerMessageStatusEnum::NotImplemented,
6160    ];
6161    /// Value as it appears on the wire.
6162    pub const fn as_str(&self) -> &'static str {
6163        match self {
6164            TriggerMessageStatusEnum::Accepted => "Accepted",
6165            TriggerMessageStatusEnum::Rejected => "Rejected",
6166            TriggerMessageStatusEnum::NotImplemented => "NotImplemented",
6167        }
6168    }
6169}
6170
6171impl std::fmt::Display for TriggerMessageStatusEnum {
6172    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6173        f.write_str(self.as_str())
6174    }
6175}
6176
6177impl std::str::FromStr for TriggerMessageStatusEnum {
6178    type Err = ();
6179    fn from_str(s: &str) -> Result<Self, ()> {
6180        Self::ALL
6181            .iter()
6182            .copied()
6183            .find(|v| v.as_str() == s)
6184            .ok_or(())
6185    }
6186}
6187
6188impl Validate for TriggerMessageStatusEnum {
6189    #[inline]
6190    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6191        Ok(())
6192    }
6193}
6194
6195/// Reason the Charging Station sends this message to the CSMS
6196#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6197pub enum TriggerReasonEnum {
6198    #[serde(rename = "AbnormalCondition")]
6199    AbnormalCondition,
6200    #[serde(rename = "Authorized")]
6201    Authorized,
6202    #[serde(rename = "CablePluggedIn")]
6203    CablePluggedIn,
6204    #[serde(rename = "ChargingRateChanged")]
6205    ChargingRateChanged,
6206    #[serde(rename = "ChargingStateChanged")]
6207    ChargingStateChanged,
6208    #[serde(rename = "CostLimitReached")]
6209    CostLimitReached,
6210    #[serde(rename = "Deauthorized")]
6211    Deauthorized,
6212    #[serde(rename = "EnergyLimitReached")]
6213    EnergyLimitReached,
6214    #[serde(rename = "EVCommunicationLost")]
6215    EVCommunicationLost,
6216    #[serde(rename = "EVConnectTimeout")]
6217    EVConnectTimeout,
6218    #[serde(rename = "EVDeparted")]
6219    EVDeparted,
6220    #[serde(rename = "EVDetected")]
6221    EVDetected,
6222    #[serde(rename = "LimitSet")]
6223    LimitSet,
6224    #[serde(rename = "MeterValueClock")]
6225    MeterValueClock,
6226    #[serde(rename = "MeterValuePeriodic")]
6227    MeterValuePeriodic,
6228    #[serde(rename = "OperationModeChanged")]
6229    OperationModeChanged,
6230    #[serde(rename = "RemoteStart")]
6231    RemoteStart,
6232    #[serde(rename = "RemoteStop")]
6233    RemoteStop,
6234    #[serde(rename = "ResetCommand")]
6235    ResetCommand,
6236    #[serde(rename = "RunningCost")]
6237    RunningCost,
6238    #[serde(rename = "SignedDataReceived")]
6239    SignedDataReceived,
6240    #[serde(rename = "SoCLimitReached")]
6241    SoCLimitReached,
6242    #[serde(rename = "StopAuthorized")]
6243    StopAuthorized,
6244    #[serde(rename = "TariffChanged")]
6245    TariffChanged,
6246    #[serde(rename = "TariffNotAccepted")]
6247    TariffNotAccepted,
6248    #[serde(rename = "TimeLimitReached")]
6249    TimeLimitReached,
6250    #[serde(rename = "Trigger")]
6251    Trigger,
6252    #[serde(rename = "TxResumed")]
6253    TxResumed,
6254    #[serde(rename = "UnlockCommand")]
6255    UnlockCommand,
6256}
6257
6258impl TriggerReasonEnum {
6259    pub const ALL: &'static [TriggerReasonEnum] = &[
6260        TriggerReasonEnum::AbnormalCondition,
6261        TriggerReasonEnum::Authorized,
6262        TriggerReasonEnum::CablePluggedIn,
6263        TriggerReasonEnum::ChargingRateChanged,
6264        TriggerReasonEnum::ChargingStateChanged,
6265        TriggerReasonEnum::CostLimitReached,
6266        TriggerReasonEnum::Deauthorized,
6267        TriggerReasonEnum::EnergyLimitReached,
6268        TriggerReasonEnum::EVCommunicationLost,
6269        TriggerReasonEnum::EVConnectTimeout,
6270        TriggerReasonEnum::EVDeparted,
6271        TriggerReasonEnum::EVDetected,
6272        TriggerReasonEnum::LimitSet,
6273        TriggerReasonEnum::MeterValueClock,
6274        TriggerReasonEnum::MeterValuePeriodic,
6275        TriggerReasonEnum::OperationModeChanged,
6276        TriggerReasonEnum::RemoteStart,
6277        TriggerReasonEnum::RemoteStop,
6278        TriggerReasonEnum::ResetCommand,
6279        TriggerReasonEnum::RunningCost,
6280        TriggerReasonEnum::SignedDataReceived,
6281        TriggerReasonEnum::SoCLimitReached,
6282        TriggerReasonEnum::StopAuthorized,
6283        TriggerReasonEnum::TariffChanged,
6284        TriggerReasonEnum::TariffNotAccepted,
6285        TriggerReasonEnum::TimeLimitReached,
6286        TriggerReasonEnum::Trigger,
6287        TriggerReasonEnum::TxResumed,
6288        TriggerReasonEnum::UnlockCommand,
6289    ];
6290    /// Value as it appears on the wire.
6291    pub const fn as_str(&self) -> &'static str {
6292        match self {
6293            TriggerReasonEnum::AbnormalCondition => "AbnormalCondition",
6294            TriggerReasonEnum::Authorized => "Authorized",
6295            TriggerReasonEnum::CablePluggedIn => "CablePluggedIn",
6296            TriggerReasonEnum::ChargingRateChanged => "ChargingRateChanged",
6297            TriggerReasonEnum::ChargingStateChanged => "ChargingStateChanged",
6298            TriggerReasonEnum::CostLimitReached => "CostLimitReached",
6299            TriggerReasonEnum::Deauthorized => "Deauthorized",
6300            TriggerReasonEnum::EnergyLimitReached => "EnergyLimitReached",
6301            TriggerReasonEnum::EVCommunicationLost => "EVCommunicationLost",
6302            TriggerReasonEnum::EVConnectTimeout => "EVConnectTimeout",
6303            TriggerReasonEnum::EVDeparted => "EVDeparted",
6304            TriggerReasonEnum::EVDetected => "EVDetected",
6305            TriggerReasonEnum::LimitSet => "LimitSet",
6306            TriggerReasonEnum::MeterValueClock => "MeterValueClock",
6307            TriggerReasonEnum::MeterValuePeriodic => "MeterValuePeriodic",
6308            TriggerReasonEnum::OperationModeChanged => "OperationModeChanged",
6309            TriggerReasonEnum::RemoteStart => "RemoteStart",
6310            TriggerReasonEnum::RemoteStop => "RemoteStop",
6311            TriggerReasonEnum::ResetCommand => "ResetCommand",
6312            TriggerReasonEnum::RunningCost => "RunningCost",
6313            TriggerReasonEnum::SignedDataReceived => "SignedDataReceived",
6314            TriggerReasonEnum::SoCLimitReached => "SoCLimitReached",
6315            TriggerReasonEnum::StopAuthorized => "StopAuthorized",
6316            TriggerReasonEnum::TariffChanged => "TariffChanged",
6317            TriggerReasonEnum::TariffNotAccepted => "TariffNotAccepted",
6318            TriggerReasonEnum::TimeLimitReached => "TimeLimitReached",
6319            TriggerReasonEnum::Trigger => "Trigger",
6320            TriggerReasonEnum::TxResumed => "TxResumed",
6321            TriggerReasonEnum::UnlockCommand => "UnlockCommand",
6322        }
6323    }
6324}
6325
6326impl std::fmt::Display for TriggerReasonEnum {
6327    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6328        f.write_str(self.as_str())
6329    }
6330}
6331
6332impl std::str::FromStr for TriggerReasonEnum {
6333    type Err = ();
6334    fn from_str(s: &str) -> Result<Self, ()> {
6335        Self::ALL
6336            .iter()
6337            .copied()
6338            .find(|v| v.as_str() == s)
6339            .ok_or(())
6340    }
6341}
6342
6343impl Validate for TriggerReasonEnum {
6344    #[inline]
6345    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6346        Ok(())
6347    }
6348}
6349
6350/// This indicates whether the Charging Station has unlocked the connector.
6351#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6352pub enum UnlockStatusEnum {
6353    #[serde(rename = "Unlocked")]
6354    Unlocked,
6355    #[serde(rename = "UnlockFailed")]
6356    UnlockFailed,
6357    #[serde(rename = "OngoingAuthorizedTransaction")]
6358    OngoingAuthorizedTransaction,
6359    #[serde(rename = "UnknownConnector")]
6360    UnknownConnector,
6361}
6362
6363impl UnlockStatusEnum {
6364    pub const ALL: &'static [UnlockStatusEnum] = &[
6365        UnlockStatusEnum::Unlocked,
6366        UnlockStatusEnum::UnlockFailed,
6367        UnlockStatusEnum::OngoingAuthorizedTransaction,
6368        UnlockStatusEnum::UnknownConnector,
6369    ];
6370    /// Value as it appears on the wire.
6371    pub const fn as_str(&self) -> &'static str {
6372        match self {
6373            UnlockStatusEnum::Unlocked => "Unlocked",
6374            UnlockStatusEnum::UnlockFailed => "UnlockFailed",
6375            UnlockStatusEnum::OngoingAuthorizedTransaction => "OngoingAuthorizedTransaction",
6376            UnlockStatusEnum::UnknownConnector => "UnknownConnector",
6377        }
6378    }
6379}
6380
6381impl std::fmt::Display for UnlockStatusEnum {
6382    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6383        f.write_str(self.as_str())
6384    }
6385}
6386
6387impl std::str::FromStr for UnlockStatusEnum {
6388    type Err = ();
6389    fn from_str(s: &str) -> Result<Self, ()> {
6390        Self::ALL
6391            .iter()
6392            .copied()
6393            .find(|v| v.as_str() == s)
6394            .ok_or(())
6395    }
6396}
6397
6398impl Validate for UnlockStatusEnum {
6399    #[inline]
6400    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6401        Ok(())
6402    }
6403}
6404
6405/// Indicates whether the Local Controller succeeded in unpublishing the firmware.
6406#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6407pub enum UnpublishFirmwareStatusEnum {
6408    #[serde(rename = "DownloadOngoing")]
6409    DownloadOngoing,
6410    #[serde(rename = "NoFirmware")]
6411    NoFirmware,
6412    #[serde(rename = "Unpublished")]
6413    Unpublished,
6414}
6415
6416impl UnpublishFirmwareStatusEnum {
6417    pub const ALL: &'static [UnpublishFirmwareStatusEnum] = &[
6418        UnpublishFirmwareStatusEnum::DownloadOngoing,
6419        UnpublishFirmwareStatusEnum::NoFirmware,
6420        UnpublishFirmwareStatusEnum::Unpublished,
6421    ];
6422    /// Value as it appears on the wire.
6423    pub const fn as_str(&self) -> &'static str {
6424        match self {
6425            UnpublishFirmwareStatusEnum::DownloadOngoing => "DownloadOngoing",
6426            UnpublishFirmwareStatusEnum::NoFirmware => "NoFirmware",
6427            UnpublishFirmwareStatusEnum::Unpublished => "Unpublished",
6428        }
6429    }
6430}
6431
6432impl std::fmt::Display for UnpublishFirmwareStatusEnum {
6433    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6434        f.write_str(self.as_str())
6435    }
6436}
6437
6438impl std::str::FromStr for UnpublishFirmwareStatusEnum {
6439    type Err = ();
6440    fn from_str(s: &str) -> Result<Self, ()> {
6441        Self::ALL
6442            .iter()
6443            .copied()
6444            .find(|v| v.as_str() == s)
6445            .ok_or(())
6446    }
6447}
6448
6449impl Validate for UnpublishFirmwareStatusEnum {
6450    #[inline]
6451    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6452        Ok(())
6453    }
6454}
6455
6456/// This contains the type of update (full or differential) of this request.
6457#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6458pub enum UpdateEnum {
6459    #[serde(rename = "Differential")]
6460    Differential,
6461    #[serde(rename = "Full")]
6462    Full,
6463}
6464
6465impl UpdateEnum {
6466    pub const ALL: &'static [UpdateEnum] = &[UpdateEnum::Differential, UpdateEnum::Full];
6467    /// Value as it appears on the wire.
6468    pub const fn as_str(&self) -> &'static str {
6469        match self {
6470            UpdateEnum::Differential => "Differential",
6471            UpdateEnum::Full => "Full",
6472        }
6473    }
6474}
6475
6476impl std::fmt::Display for UpdateEnum {
6477    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6478        f.write_str(self.as_str())
6479    }
6480}
6481
6482impl std::str::FromStr for UpdateEnum {
6483    type Err = ();
6484    fn from_str(s: &str) -> Result<Self, ()> {
6485        Self::ALL
6486            .iter()
6487            .copied()
6488            .find(|v| v.as_str() == s)
6489            .ok_or(())
6490    }
6491}
6492
6493impl Validate for UpdateEnum {
6494    #[inline]
6495    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6496        Ok(())
6497    }
6498}
6499
6500/// This field indicates whether the Charging Station was able to accept the request.
6501#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6502pub enum UpdateFirmwareStatusEnum {
6503    #[serde(rename = "Accepted")]
6504    Accepted,
6505    #[serde(rename = "Rejected")]
6506    Rejected,
6507    #[serde(rename = "AcceptedCanceled")]
6508    AcceptedCanceled,
6509    #[serde(rename = "InvalidCertificate")]
6510    InvalidCertificate,
6511    #[serde(rename = "RevokedCertificate")]
6512    RevokedCertificate,
6513}
6514
6515impl UpdateFirmwareStatusEnum {
6516    pub const ALL: &'static [UpdateFirmwareStatusEnum] = &[
6517        UpdateFirmwareStatusEnum::Accepted,
6518        UpdateFirmwareStatusEnum::Rejected,
6519        UpdateFirmwareStatusEnum::AcceptedCanceled,
6520        UpdateFirmwareStatusEnum::InvalidCertificate,
6521        UpdateFirmwareStatusEnum::RevokedCertificate,
6522    ];
6523    /// Value as it appears on the wire.
6524    pub const fn as_str(&self) -> &'static str {
6525        match self {
6526            UpdateFirmwareStatusEnum::Accepted => "Accepted",
6527            UpdateFirmwareStatusEnum::Rejected => "Rejected",
6528            UpdateFirmwareStatusEnum::AcceptedCanceled => "AcceptedCanceled",
6529            UpdateFirmwareStatusEnum::InvalidCertificate => "InvalidCertificate",
6530            UpdateFirmwareStatusEnum::RevokedCertificate => "RevokedCertificate",
6531        }
6532    }
6533}
6534
6535impl std::fmt::Display for UpdateFirmwareStatusEnum {
6536    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6537        f.write_str(self.as_str())
6538    }
6539}
6540
6541impl std::str::FromStr for UpdateFirmwareStatusEnum {
6542    type Err = ();
6543    fn from_str(s: &str) -> Result<Self, ()> {
6544        Self::ALL
6545            .iter()
6546            .copied()
6547            .find(|v| v.as_str() == s)
6548            .ok_or(())
6549    }
6550}
6551
6552impl Validate for UpdateFirmwareStatusEnum {
6553    #[inline]
6554    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6555        Ok(())
6556    }
6557}
6558
6559/// This contains the status of the log upload.
6560#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6561pub enum UploadLogStatusEnum {
6562    #[serde(rename = "BadMessage")]
6563    BadMessage,
6564    #[serde(rename = "Idle")]
6565    Idle,
6566    #[serde(rename = "NotSupportedOperation")]
6567    NotSupportedOperation,
6568    #[serde(rename = "PermissionDenied")]
6569    PermissionDenied,
6570    #[serde(rename = "Uploaded")]
6571    Uploaded,
6572    #[serde(rename = "UploadFailure")]
6573    UploadFailure,
6574    #[serde(rename = "Uploading")]
6575    Uploading,
6576    #[serde(rename = "AcceptedCanceled")]
6577    AcceptedCanceled,
6578}
6579
6580impl UploadLogStatusEnum {
6581    pub const ALL: &'static [UploadLogStatusEnum] = &[
6582        UploadLogStatusEnum::BadMessage,
6583        UploadLogStatusEnum::Idle,
6584        UploadLogStatusEnum::NotSupportedOperation,
6585        UploadLogStatusEnum::PermissionDenied,
6586        UploadLogStatusEnum::Uploaded,
6587        UploadLogStatusEnum::UploadFailure,
6588        UploadLogStatusEnum::Uploading,
6589        UploadLogStatusEnum::AcceptedCanceled,
6590    ];
6591    /// Value as it appears on the wire.
6592    pub const fn as_str(&self) -> &'static str {
6593        match self {
6594            UploadLogStatusEnum::BadMessage => "BadMessage",
6595            UploadLogStatusEnum::Idle => "Idle",
6596            UploadLogStatusEnum::NotSupportedOperation => "NotSupportedOperation",
6597            UploadLogStatusEnum::PermissionDenied => "PermissionDenied",
6598            UploadLogStatusEnum::Uploaded => "Uploaded",
6599            UploadLogStatusEnum::UploadFailure => "UploadFailure",
6600            UploadLogStatusEnum::Uploading => "Uploading",
6601            UploadLogStatusEnum::AcceptedCanceled => "AcceptedCanceled",
6602        }
6603    }
6604}
6605
6606impl std::fmt::Display for UploadLogStatusEnum {
6607    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6608        f.write_str(self.as_str())
6609    }
6610}
6611
6612impl std::str::FromStr for UploadLogStatusEnum {
6613    type Err = ();
6614    fn from_str(s: &str) -> Result<Self, ()> {
6615        Self::ALL
6616            .iter()
6617            .copied()
6618            .find(|v| v.as_str() == s)
6619            .ok_or(())
6620    }
6621}
6622
6623impl Validate for UploadLogStatusEnum {
6624    #[inline]
6625    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6626        Ok(())
6627    }
6628}
6629
6630/// Type of VPN
6631#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6632pub enum VPNEnum {
6633    #[serde(rename = "IKEv2")]
6634    IKEv2,
6635    #[serde(rename = "IPSec")]
6636    IPSec,
6637    #[serde(rename = "L2TP")]
6638    L2TP,
6639    #[serde(rename = "PPTP")]
6640    PPTP,
6641}
6642
6643impl VPNEnum {
6644    pub const ALL: &'static [VPNEnum] =
6645        &[VPNEnum::IKEv2, VPNEnum::IPSec, VPNEnum::L2TP, VPNEnum::PPTP];
6646    /// Value as it appears on the wire.
6647    pub const fn as_str(&self) -> &'static str {
6648        match self {
6649            VPNEnum::IKEv2 => "IKEv2",
6650            VPNEnum::IPSec => "IPSec",
6651            VPNEnum::L2TP => "L2TP",
6652            VPNEnum::PPTP => "PPTP",
6653        }
6654    }
6655}
6656
6657impl std::fmt::Display for VPNEnum {
6658    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6659        f.write_str(self.as_str())
6660    }
6661}
6662
6663impl std::str::FromStr for VPNEnum {
6664    type Err = ();
6665    fn from_str(s: &str) -> Result<Self, ()> {
6666        Self::ALL
6667            .iter()
6668            .copied()
6669            .find(|v| v.as_str() == s)
6670            .ok_or(())
6671    }
6672}
6673
6674impl Validate for VPNEnum {
6675    #[inline]
6676    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
6677        Ok(())
6678    }
6679}