Skip to main content

codetics_ocpp201/
enums.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Kevin Vavelin, Codetics (https://codetics.fr)
3
4//! OCPP 2.0.1 enumerations.
5
6use ocpp_core::validate::{Path, Validate, Violation};
7use serde::{Deserialize, Serialize};
8
9/// APN. APN_ Authentication. APN_ Authentication_ Code
10/// Authentication method.
11#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
12pub enum APNAuthenticationEnum {
13    #[serde(rename = "CHAP")]
14    CHAP,
15    #[serde(rename = "NONE")]
16    NONE,
17    #[serde(rename = "PAP")]
18    PAP,
19    #[serde(rename = "AUTO")]
20    AUTO,
21}
22
23impl APNAuthenticationEnum {
24    pub const ALL: &'static [APNAuthenticationEnum] = &[
25        APNAuthenticationEnum::CHAP,
26        APNAuthenticationEnum::NONE,
27        APNAuthenticationEnum::PAP,
28        APNAuthenticationEnum::AUTO,
29    ];
30    /// Value as it appears on the wire.
31    pub const fn as_str(&self) -> &'static str {
32        match self {
33            APNAuthenticationEnum::CHAP => "CHAP",
34            APNAuthenticationEnum::NONE => "NONE",
35            APNAuthenticationEnum::PAP => "PAP",
36            APNAuthenticationEnum::AUTO => "AUTO",
37        }
38    }
39}
40
41impl std::fmt::Display for APNAuthenticationEnum {
42    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
43        f.write_str(self.as_str())
44    }
45}
46
47impl std::str::FromStr for APNAuthenticationEnum {
48    type Err = ();
49    fn from_str(s: &str) -> Result<Self, ()> {
50        Self::ALL
51            .iter()
52            .copied()
53            .find(|v| v.as_str() == s)
54            .ok_or(())
55    }
56}
57
58impl Validate for APNAuthenticationEnum {
59    #[inline]
60    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
61        Ok(())
62    }
63}
64
65/// Attribute type for which value is requested. When absent, default Actual is assumed.
66#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
67pub enum AttributeEnum {
68    #[serde(rename = "Actual")]
69    Actual,
70    #[serde(rename = "Target")]
71    Target,
72    #[serde(rename = "MinSet")]
73    MinSet,
74    #[serde(rename = "MaxSet")]
75    MaxSet,
76}
77
78impl AttributeEnum {
79    pub const ALL: &'static [AttributeEnum] = &[
80        AttributeEnum::Actual,
81        AttributeEnum::Target,
82        AttributeEnum::MinSet,
83        AttributeEnum::MaxSet,
84    ];
85    /// Value as it appears on the wire.
86    pub const fn as_str(&self) -> &'static str {
87        match self {
88            AttributeEnum::Actual => "Actual",
89            AttributeEnum::Target => "Target",
90            AttributeEnum::MinSet => "MinSet",
91            AttributeEnum::MaxSet => "MaxSet",
92        }
93    }
94}
95
96impl std::fmt::Display for AttributeEnum {
97    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
98        f.write_str(self.as_str())
99    }
100}
101
102impl std::str::FromStr for AttributeEnum {
103    type Err = ();
104    fn from_str(s: &str) -> Result<Self, ()> {
105        Self::ALL
106            .iter()
107            .copied()
108            .find(|v| v.as_str() == s)
109            .ok_or(())
110    }
111}
112
113impl Validate for AttributeEnum {
114    #[inline]
115    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
116        Ok(())
117    }
118}
119
120/// ID_ Token. Status. Authorization_ Status
121/// Current status of the ID Token.
122#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
123pub enum AuthorizationStatusEnum {
124    #[serde(rename = "Accepted")]
125    Accepted,
126    #[serde(rename = "Blocked")]
127    Blocked,
128    #[serde(rename = "ConcurrentTx")]
129    ConcurrentTx,
130    #[serde(rename = "Expired")]
131    Expired,
132    #[serde(rename = "Invalid")]
133    Invalid,
134    #[serde(rename = "NoCredit")]
135    NoCredit,
136    #[serde(rename = "NotAllowedTypeEVSE")]
137    NotAllowedTypeEVSE,
138    #[serde(rename = "NotAtThisLocation")]
139    NotAtThisLocation,
140    #[serde(rename = "NotAtThisTime")]
141    NotAtThisTime,
142    #[serde(rename = "Unknown")]
143    Unknown,
144}
145
146impl AuthorizationStatusEnum {
147    pub const ALL: &'static [AuthorizationStatusEnum] = &[
148        AuthorizationStatusEnum::Accepted,
149        AuthorizationStatusEnum::Blocked,
150        AuthorizationStatusEnum::ConcurrentTx,
151        AuthorizationStatusEnum::Expired,
152        AuthorizationStatusEnum::Invalid,
153        AuthorizationStatusEnum::NoCredit,
154        AuthorizationStatusEnum::NotAllowedTypeEVSE,
155        AuthorizationStatusEnum::NotAtThisLocation,
156        AuthorizationStatusEnum::NotAtThisTime,
157        AuthorizationStatusEnum::Unknown,
158    ];
159    /// Value as it appears on the wire.
160    pub const fn as_str(&self) -> &'static str {
161        match self {
162            AuthorizationStatusEnum::Accepted => "Accepted",
163            AuthorizationStatusEnum::Blocked => "Blocked",
164            AuthorizationStatusEnum::ConcurrentTx => "ConcurrentTx",
165            AuthorizationStatusEnum::Expired => "Expired",
166            AuthorizationStatusEnum::Invalid => "Invalid",
167            AuthorizationStatusEnum::NoCredit => "NoCredit",
168            AuthorizationStatusEnum::NotAllowedTypeEVSE => "NotAllowedTypeEVSE",
169            AuthorizationStatusEnum::NotAtThisLocation => "NotAtThisLocation",
170            AuthorizationStatusEnum::NotAtThisTime => "NotAtThisTime",
171            AuthorizationStatusEnum::Unknown => "Unknown",
172        }
173    }
174}
175
176impl std::fmt::Display for AuthorizationStatusEnum {
177    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
178        f.write_str(self.as_str())
179    }
180}
181
182impl std::str::FromStr for AuthorizationStatusEnum {
183    type Err = ();
184    fn from_str(s: &str) -> Result<Self, ()> {
185        Self::ALL
186            .iter()
187            .copied()
188            .find(|v| v.as_str() == s)
189            .ok_or(())
190    }
191}
192
193impl Validate for AuthorizationStatusEnum {
194    #[inline]
195    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
196        Ok(())
197    }
198}
199
200/// Certificate status information.
201/// - if all certificates are valid: return 'Accepted'.
202/// - if one of the certificates was revoked, return 'CertificateRevoked'.
203#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
204pub enum AuthorizeCertificateStatusEnum {
205    #[serde(rename = "Accepted")]
206    Accepted,
207    #[serde(rename = "SignatureError")]
208    SignatureError,
209    #[serde(rename = "CertificateExpired")]
210    CertificateExpired,
211    #[serde(rename = "CertificateRevoked")]
212    CertificateRevoked,
213    #[serde(rename = "NoCertificateAvailable")]
214    NoCertificateAvailable,
215    #[serde(rename = "CertChainError")]
216    CertChainError,
217    #[serde(rename = "ContractCancelled")]
218    ContractCancelled,
219}
220
221impl AuthorizeCertificateStatusEnum {
222    pub const ALL: &'static [AuthorizeCertificateStatusEnum] = &[
223        AuthorizeCertificateStatusEnum::Accepted,
224        AuthorizeCertificateStatusEnum::SignatureError,
225        AuthorizeCertificateStatusEnum::CertificateExpired,
226        AuthorizeCertificateStatusEnum::CertificateRevoked,
227        AuthorizeCertificateStatusEnum::NoCertificateAvailable,
228        AuthorizeCertificateStatusEnum::CertChainError,
229        AuthorizeCertificateStatusEnum::ContractCancelled,
230    ];
231    /// Value as it appears on the wire.
232    pub const fn as_str(&self) -> &'static str {
233        match self {
234            AuthorizeCertificateStatusEnum::Accepted => "Accepted",
235            AuthorizeCertificateStatusEnum::SignatureError => "SignatureError",
236            AuthorizeCertificateStatusEnum::CertificateExpired => "CertificateExpired",
237            AuthorizeCertificateStatusEnum::CertificateRevoked => "CertificateRevoked",
238            AuthorizeCertificateStatusEnum::NoCertificateAvailable => "NoCertificateAvailable",
239            AuthorizeCertificateStatusEnum::CertChainError => "CertChainError",
240            AuthorizeCertificateStatusEnum::ContractCancelled => "ContractCancelled",
241        }
242    }
243}
244
245impl std::fmt::Display for AuthorizeCertificateStatusEnum {
246    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
247        f.write_str(self.as_str())
248    }
249}
250
251impl std::str::FromStr for AuthorizeCertificateStatusEnum {
252    type Err = ();
253    fn from_str(s: &str) -> Result<Self, ()> {
254        Self::ALL
255            .iter()
256            .copied()
257            .find(|v| v.as_str() == s)
258            .ok_or(())
259    }
260}
261
262impl Validate for AuthorizeCertificateStatusEnum {
263    #[inline]
264    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
265        Ok(())
266    }
267}
268
269/// This contains the reason for sending this message to the CSMS.
270#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
271pub enum BootReasonEnum {
272    #[serde(rename = "ApplicationReset")]
273    ApplicationReset,
274    #[serde(rename = "FirmwareUpdate")]
275    FirmwareUpdate,
276    #[serde(rename = "LocalReset")]
277    LocalReset,
278    #[serde(rename = "PowerUp")]
279    PowerUp,
280    #[serde(rename = "RemoteReset")]
281    RemoteReset,
282    #[serde(rename = "ScheduledReset")]
283    ScheduledReset,
284    #[serde(rename = "Triggered")]
285    Triggered,
286    #[serde(rename = "Unknown")]
287    Unknown,
288    #[serde(rename = "Watchdog")]
289    Watchdog,
290}
291
292impl BootReasonEnum {
293    pub const ALL: &'static [BootReasonEnum] = &[
294        BootReasonEnum::ApplicationReset,
295        BootReasonEnum::FirmwareUpdate,
296        BootReasonEnum::LocalReset,
297        BootReasonEnum::PowerUp,
298        BootReasonEnum::RemoteReset,
299        BootReasonEnum::ScheduledReset,
300        BootReasonEnum::Triggered,
301        BootReasonEnum::Unknown,
302        BootReasonEnum::Watchdog,
303    ];
304    /// Value as it appears on the wire.
305    pub const fn as_str(&self) -> &'static str {
306        match self {
307            BootReasonEnum::ApplicationReset => "ApplicationReset",
308            BootReasonEnum::FirmwareUpdate => "FirmwareUpdate",
309            BootReasonEnum::LocalReset => "LocalReset",
310            BootReasonEnum::PowerUp => "PowerUp",
311            BootReasonEnum::RemoteReset => "RemoteReset",
312            BootReasonEnum::ScheduledReset => "ScheduledReset",
313            BootReasonEnum::Triggered => "Triggered",
314            BootReasonEnum::Unknown => "Unknown",
315            BootReasonEnum::Watchdog => "Watchdog",
316        }
317    }
318}
319
320impl std::fmt::Display for BootReasonEnum {
321    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
322        f.write_str(self.as_str())
323    }
324}
325
326impl std::str::FromStr for BootReasonEnum {
327    type Err = ();
328    fn from_str(s: &str) -> Result<Self, ()> {
329        Self::ALL
330            .iter()
331            .copied()
332            .find(|v| v.as_str() == s)
333            .ok_or(())
334    }
335}
336
337impl Validate for BootReasonEnum {
338    #[inline]
339    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
340        Ok(())
341    }
342}
343
344/// This indicates the success or failure of the canceling of a reservation by CSMS.
345#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
346pub enum CancelReservationStatusEnum {
347    #[serde(rename = "Accepted")]
348    Accepted,
349    #[serde(rename = "Rejected")]
350    Rejected,
351}
352
353impl CancelReservationStatusEnum {
354    pub const ALL: &'static [CancelReservationStatusEnum] = &[
355        CancelReservationStatusEnum::Accepted,
356        CancelReservationStatusEnum::Rejected,
357    ];
358    /// Value as it appears on the wire.
359    pub const fn as_str(&self) -> &'static str {
360        match self {
361            CancelReservationStatusEnum::Accepted => "Accepted",
362            CancelReservationStatusEnum::Rejected => "Rejected",
363        }
364    }
365}
366
367impl std::fmt::Display for CancelReservationStatusEnum {
368    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
369        f.write_str(self.as_str())
370    }
371}
372
373impl std::str::FromStr for CancelReservationStatusEnum {
374    type Err = ();
375    fn from_str(s: &str) -> Result<Self, ()> {
376        Self::ALL
377            .iter()
378            .copied()
379            .find(|v| v.as_str() == s)
380            .ok_or(())
381    }
382}
383
384impl Validate for CancelReservationStatusEnum {
385    #[inline]
386    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
387        Ok(())
388    }
389}
390
391/// Defines whether certificate needs to be installed or updated.
392#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
393pub enum CertificateActionEnum {
394    #[serde(rename = "Install")]
395    Install,
396    #[serde(rename = "Update")]
397    Update,
398}
399
400impl CertificateActionEnum {
401    pub const ALL: &'static [CertificateActionEnum] = &[
402        CertificateActionEnum::Install,
403        CertificateActionEnum::Update,
404    ];
405    /// Value as it appears on the wire.
406    pub const fn as_str(&self) -> &'static str {
407        match self {
408            CertificateActionEnum::Install => "Install",
409            CertificateActionEnum::Update => "Update",
410        }
411    }
412}
413
414impl std::fmt::Display for CertificateActionEnum {
415    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
416        f.write_str(self.as_str())
417    }
418}
419
420impl std::str::FromStr for CertificateActionEnum {
421    type Err = ();
422    fn from_str(s: &str) -> Result<Self, ()> {
423        Self::ALL
424            .iter()
425            .copied()
426            .find(|v| v.as_str() == s)
427            .ok_or(())
428    }
429}
430
431impl Validate for CertificateActionEnum {
432    #[inline]
433    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
434        Ok(())
435    }
436}
437
438/// Returns whether certificate signing has been accepted, otherwise rejected.
439#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
440pub enum CertificateSignedStatusEnum {
441    #[serde(rename = "Accepted")]
442    Accepted,
443    #[serde(rename = "Rejected")]
444    Rejected,
445}
446
447impl CertificateSignedStatusEnum {
448    pub const ALL: &'static [CertificateSignedStatusEnum] = &[
449        CertificateSignedStatusEnum::Accepted,
450        CertificateSignedStatusEnum::Rejected,
451    ];
452    /// Value as it appears on the wire.
453    pub const fn as_str(&self) -> &'static str {
454        match self {
455            CertificateSignedStatusEnum::Accepted => "Accepted",
456            CertificateSignedStatusEnum::Rejected => "Rejected",
457        }
458    }
459}
460
461impl std::fmt::Display for CertificateSignedStatusEnum {
462    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
463        f.write_str(self.as_str())
464    }
465}
466
467impl std::str::FromStr for CertificateSignedStatusEnum {
468    type Err = ();
469    fn from_str(s: &str) -> Result<Self, ()> {
470        Self::ALL
471            .iter()
472            .copied()
473            .find(|v| v.as_str() == s)
474            .ok_or(())
475    }
476}
477
478impl Validate for CertificateSignedStatusEnum {
479    #[inline]
480    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
481        Ok(())
482    }
483}
484
485/// 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.
486#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
487pub enum CertificateSigningUseEnum {
488    #[serde(rename = "ChargingStationCertificate")]
489    ChargingStationCertificate,
490    #[serde(rename = "V2GCertificate")]
491    V2GCertificate,
492}
493
494impl CertificateSigningUseEnum {
495    pub const ALL: &'static [CertificateSigningUseEnum] = &[
496        CertificateSigningUseEnum::ChargingStationCertificate,
497        CertificateSigningUseEnum::V2GCertificate,
498    ];
499    /// Value as it appears on the wire.
500    pub const fn as_str(&self) -> &'static str {
501        match self {
502            CertificateSigningUseEnum::ChargingStationCertificate => "ChargingStationCertificate",
503            CertificateSigningUseEnum::V2GCertificate => "V2GCertificate",
504        }
505    }
506}
507
508impl std::fmt::Display for CertificateSigningUseEnum {
509    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
510        f.write_str(self.as_str())
511    }
512}
513
514impl std::str::FromStr for CertificateSigningUseEnum {
515    type Err = ();
516    fn from_str(s: &str) -> Result<Self, ()> {
517        Self::ALL
518            .iter()
519            .copied()
520            .find(|v| v.as_str() == s)
521            .ok_or(())
522    }
523}
524
525impl Validate for CertificateSigningUseEnum {
526    #[inline]
527    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
528        Ok(())
529    }
530}
531
532/// This indicates whether the Charging Station is able to perform the availability change.
533#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
534pub enum ChangeAvailabilityStatusEnum {
535    #[serde(rename = "Accepted")]
536    Accepted,
537    #[serde(rename = "Rejected")]
538    Rejected,
539    #[serde(rename = "Scheduled")]
540    Scheduled,
541}
542
543impl ChangeAvailabilityStatusEnum {
544    pub const ALL: &'static [ChangeAvailabilityStatusEnum] = &[
545        ChangeAvailabilityStatusEnum::Accepted,
546        ChangeAvailabilityStatusEnum::Rejected,
547        ChangeAvailabilityStatusEnum::Scheduled,
548    ];
549    /// Value as it appears on the wire.
550    pub const fn as_str(&self) -> &'static str {
551        match self {
552            ChangeAvailabilityStatusEnum::Accepted => "Accepted",
553            ChangeAvailabilityStatusEnum::Rejected => "Rejected",
554            ChangeAvailabilityStatusEnum::Scheduled => "Scheduled",
555        }
556    }
557}
558
559impl std::fmt::Display for ChangeAvailabilityStatusEnum {
560    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
561        f.write_str(self.as_str())
562    }
563}
564
565impl std::str::FromStr for ChangeAvailabilityStatusEnum {
566    type Err = ();
567    fn from_str(s: &str) -> Result<Self, ()> {
568        Self::ALL
569            .iter()
570            .copied()
571            .find(|v| v.as_str() == s)
572            .ok_or(())
573    }
574}
575
576impl Validate for ChangeAvailabilityStatusEnum {
577    #[inline]
578    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
579        Ok(())
580    }
581}
582
583/// Source of the charging limit.
584#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
585pub enum ChargingLimitSourceEnum {
586    #[serde(rename = "EMS")]
587    EMS,
588    #[serde(rename = "Other")]
589    Other,
590    #[serde(rename = "SO")]
591    SO,
592    #[serde(rename = "CSO")]
593    CSO,
594}
595
596impl ChargingLimitSourceEnum {
597    pub const ALL: &'static [ChargingLimitSourceEnum] = &[
598        ChargingLimitSourceEnum::EMS,
599        ChargingLimitSourceEnum::Other,
600        ChargingLimitSourceEnum::SO,
601        ChargingLimitSourceEnum::CSO,
602    ];
603    /// Value as it appears on the wire.
604    pub const fn as_str(&self) -> &'static str {
605        match self {
606            ChargingLimitSourceEnum::EMS => "EMS",
607            ChargingLimitSourceEnum::Other => "Other",
608            ChargingLimitSourceEnum::SO => "SO",
609            ChargingLimitSourceEnum::CSO => "CSO",
610        }
611    }
612}
613
614impl std::fmt::Display for ChargingLimitSourceEnum {
615    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
616        f.write_str(self.as_str())
617    }
618}
619
620impl std::str::FromStr for ChargingLimitSourceEnum {
621    type Err = ();
622    fn from_str(s: &str) -> Result<Self, ()> {
623        Self::ALL
624            .iter()
625            .copied()
626            .find(|v| v.as_str() == s)
627            .ok_or(())
628    }
629}
630
631impl Validate for ChargingLimitSourceEnum {
632    #[inline]
633    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
634        Ok(())
635    }
636}
637
638/// Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code
639/// Indicates the kind of schedule.
640#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
641pub enum ChargingProfileKindEnum {
642    #[serde(rename = "Absolute")]
643    Absolute,
644    #[serde(rename = "Recurring")]
645    Recurring,
646    #[serde(rename = "Relative")]
647    Relative,
648}
649
650impl ChargingProfileKindEnum {
651    pub const ALL: &'static [ChargingProfileKindEnum] = &[
652        ChargingProfileKindEnum::Absolute,
653        ChargingProfileKindEnum::Recurring,
654        ChargingProfileKindEnum::Relative,
655    ];
656    /// Value as it appears on the wire.
657    pub const fn as_str(&self) -> &'static str {
658        match self {
659            ChargingProfileKindEnum::Absolute => "Absolute",
660            ChargingProfileKindEnum::Recurring => "Recurring",
661            ChargingProfileKindEnum::Relative => "Relative",
662        }
663    }
664}
665
666impl std::fmt::Display for ChargingProfileKindEnum {
667    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
668        f.write_str(self.as_str())
669    }
670}
671
672impl std::str::FromStr for ChargingProfileKindEnum {
673    type Err = ();
674    fn from_str(s: &str) -> Result<Self, ()> {
675        Self::ALL
676            .iter()
677            .copied()
678            .find(|v| v.as_str() == s)
679            .ok_or(())
680    }
681}
682
683impl Validate for ChargingProfileKindEnum {
684    #[inline]
685    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
686        Ok(())
687    }
688}
689
690/// Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code
691/// Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request.
692#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
693pub enum ChargingProfilePurposeEnum {
694    #[serde(rename = "ChargingStationExternalConstraints")]
695    ChargingStationExternalConstraints,
696    #[serde(rename = "ChargingStationMaxProfile")]
697    ChargingStationMaxProfile,
698    #[serde(rename = "TxDefaultProfile")]
699    TxDefaultProfile,
700    #[serde(rename = "TxProfile")]
701    TxProfile,
702}
703
704impl ChargingProfilePurposeEnum {
705    pub const ALL: &'static [ChargingProfilePurposeEnum] = &[
706        ChargingProfilePurposeEnum::ChargingStationExternalConstraints,
707        ChargingProfilePurposeEnum::ChargingStationMaxProfile,
708        ChargingProfilePurposeEnum::TxDefaultProfile,
709        ChargingProfilePurposeEnum::TxProfile,
710    ];
711    /// Value as it appears on the wire.
712    pub const fn as_str(&self) -> &'static str {
713        match self {
714            ChargingProfilePurposeEnum::ChargingStationExternalConstraints => {
715                "ChargingStationExternalConstraints"
716            }
717            ChargingProfilePurposeEnum::ChargingStationMaxProfile => "ChargingStationMaxProfile",
718            ChargingProfilePurposeEnum::TxDefaultProfile => "TxDefaultProfile",
719            ChargingProfilePurposeEnum::TxProfile => "TxProfile",
720        }
721    }
722}
723
724impl std::fmt::Display for ChargingProfilePurposeEnum {
725    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
726        f.write_str(self.as_str())
727    }
728}
729
730impl std::str::FromStr for ChargingProfilePurposeEnum {
731    type Err = ();
732    fn from_str(s: &str) -> Result<Self, ()> {
733        Self::ALL
734            .iter()
735            .copied()
736            .find(|v| v.as_str() == s)
737            .ok_or(())
738    }
739}
740
741impl Validate for ChargingProfilePurposeEnum {
742    #[inline]
743    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
744        Ok(())
745    }
746}
747
748/// Returns whether the Charging Station has been able to process the message successfully. This does not guarantee the schedule will be followed to the letter. There might be other constraints the Charging Station may need to take into account.
749#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
750pub enum ChargingProfileStatusEnum {
751    #[serde(rename = "Accepted")]
752    Accepted,
753    #[serde(rename = "Rejected")]
754    Rejected,
755}
756
757impl ChargingProfileStatusEnum {
758    pub const ALL: &'static [ChargingProfileStatusEnum] = &[
759        ChargingProfileStatusEnum::Accepted,
760        ChargingProfileStatusEnum::Rejected,
761    ];
762    /// Value as it appears on the wire.
763    pub const fn as_str(&self) -> &'static str {
764        match self {
765            ChargingProfileStatusEnum::Accepted => "Accepted",
766            ChargingProfileStatusEnum::Rejected => "Rejected",
767        }
768    }
769}
770
771impl std::fmt::Display for ChargingProfileStatusEnum {
772    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
773        f.write_str(self.as_str())
774    }
775}
776
777impl std::str::FromStr for ChargingProfileStatusEnum {
778    type Err = ();
779    fn from_str(s: &str) -> Result<Self, ()> {
780        Self::ALL
781            .iter()
782            .copied()
783            .find(|v| v.as_str() == s)
784            .ok_or(())
785    }
786}
787
788impl Validate for ChargingProfileStatusEnum {
789    #[inline]
790    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
791        Ok(())
792    }
793}
794
795/// Can be used to force a power or current profile.
796#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
797pub enum ChargingRateUnitEnum {
798    #[serde(rename = "W")]
799    W,
800    #[serde(rename = "A")]
801    A,
802}
803
804impl ChargingRateUnitEnum {
805    pub const ALL: &'static [ChargingRateUnitEnum] =
806        &[ChargingRateUnitEnum::W, ChargingRateUnitEnum::A];
807    /// Value as it appears on the wire.
808    pub const fn as_str(&self) -> &'static str {
809        match self {
810            ChargingRateUnitEnum::W => "W",
811            ChargingRateUnitEnum::A => "A",
812        }
813    }
814}
815
816impl std::fmt::Display for ChargingRateUnitEnum {
817    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
818        f.write_str(self.as_str())
819    }
820}
821
822impl std::str::FromStr for ChargingRateUnitEnum {
823    type Err = ();
824    fn from_str(s: &str) -> Result<Self, ()> {
825        Self::ALL
826            .iter()
827            .copied()
828            .find(|v| v.as_str() == s)
829            .ok_or(())
830    }
831}
832
833impl Validate for ChargingRateUnitEnum {
834    #[inline]
835    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
836        Ok(())
837    }
838}
839
840/// Transaction. State. Transaction_ State_ Code
841/// Current charging state, is required when state
842/// has changed.
843#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
844pub enum ChargingStateEnum {
845    #[serde(rename = "Charging")]
846    Charging,
847    #[serde(rename = "EVConnected")]
848    EVConnected,
849    #[serde(rename = "SuspendedEV")]
850    SuspendedEV,
851    #[serde(rename = "SuspendedEVSE")]
852    SuspendedEVSE,
853    #[serde(rename = "Idle")]
854    Idle,
855}
856
857impl ChargingStateEnum {
858    pub const ALL: &'static [ChargingStateEnum] = &[
859        ChargingStateEnum::Charging,
860        ChargingStateEnum::EVConnected,
861        ChargingStateEnum::SuspendedEV,
862        ChargingStateEnum::SuspendedEVSE,
863        ChargingStateEnum::Idle,
864    ];
865    /// Value as it appears on the wire.
866    pub const fn as_str(&self) -> &'static str {
867        match self {
868            ChargingStateEnum::Charging => "Charging",
869            ChargingStateEnum::EVConnected => "EVConnected",
870            ChargingStateEnum::SuspendedEV => "SuspendedEV",
871            ChargingStateEnum::SuspendedEVSE => "SuspendedEVSE",
872            ChargingStateEnum::Idle => "Idle",
873        }
874    }
875}
876
877impl std::fmt::Display for ChargingStateEnum {
878    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
879        f.write_str(self.as_str())
880    }
881}
882
883impl std::str::FromStr for ChargingStateEnum {
884    type Err = ();
885    fn from_str(s: &str) -> Result<Self, ()> {
886        Self::ALL
887            .iter()
888            .copied()
889            .find(|v| v.as_str() == s)
890            .ok_or(())
891    }
892}
893
894impl Validate for ChargingStateEnum {
895    #[inline]
896    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
897        Ok(())
898    }
899}
900
901/// Accepted if the Charging Station has executed the request, otherwise rejected.
902#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
903pub enum ClearCacheStatusEnum {
904    #[serde(rename = "Accepted")]
905    Accepted,
906    #[serde(rename = "Rejected")]
907    Rejected,
908}
909
910impl ClearCacheStatusEnum {
911    pub const ALL: &'static [ClearCacheStatusEnum] = &[
912        ClearCacheStatusEnum::Accepted,
913        ClearCacheStatusEnum::Rejected,
914    ];
915    /// Value as it appears on the wire.
916    pub const fn as_str(&self) -> &'static str {
917        match self {
918            ClearCacheStatusEnum::Accepted => "Accepted",
919            ClearCacheStatusEnum::Rejected => "Rejected",
920        }
921    }
922}
923
924impl std::fmt::Display for ClearCacheStatusEnum {
925    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
926        f.write_str(self.as_str())
927    }
928}
929
930impl std::str::FromStr for ClearCacheStatusEnum {
931    type Err = ();
932    fn from_str(s: &str) -> Result<Self, ()> {
933        Self::ALL
934            .iter()
935            .copied()
936            .find(|v| v.as_str() == s)
937            .ok_or(())
938    }
939}
940
941impl Validate for ClearCacheStatusEnum {
942    #[inline]
943    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
944        Ok(())
945    }
946}
947
948/// Indicates if the Charging Station was able to execute the request.
949#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
950pub enum ClearChargingProfileStatusEnum {
951    #[serde(rename = "Accepted")]
952    Accepted,
953    #[serde(rename = "Unknown")]
954    Unknown,
955}
956
957impl ClearChargingProfileStatusEnum {
958    pub const ALL: &'static [ClearChargingProfileStatusEnum] = &[
959        ClearChargingProfileStatusEnum::Accepted,
960        ClearChargingProfileStatusEnum::Unknown,
961    ];
962    /// Value as it appears on the wire.
963    pub const fn as_str(&self) -> &'static str {
964        match self {
965            ClearChargingProfileStatusEnum::Accepted => "Accepted",
966            ClearChargingProfileStatusEnum::Unknown => "Unknown",
967        }
968    }
969}
970
971impl std::fmt::Display for ClearChargingProfileStatusEnum {
972    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
973        f.write_str(self.as_str())
974    }
975}
976
977impl std::str::FromStr for ClearChargingProfileStatusEnum {
978    type Err = ();
979    fn from_str(s: &str) -> Result<Self, ()> {
980        Self::ALL
981            .iter()
982            .copied()
983            .find(|v| v.as_str() == s)
984            .ok_or(())
985    }
986}
987
988impl Validate for ClearChargingProfileStatusEnum {
989    #[inline]
990    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
991        Ok(())
992    }
993}
994
995/// Returns whether the Charging Station has been able to remove the message.
996#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
997pub enum ClearMessageStatusEnum {
998    #[serde(rename = "Accepted")]
999    Accepted,
1000    #[serde(rename = "Unknown")]
1001    Unknown,
1002}
1003
1004impl ClearMessageStatusEnum {
1005    pub const ALL: &'static [ClearMessageStatusEnum] = &[
1006        ClearMessageStatusEnum::Accepted,
1007        ClearMessageStatusEnum::Unknown,
1008    ];
1009    /// Value as it appears on the wire.
1010    pub const fn as_str(&self) -> &'static str {
1011        match self {
1012            ClearMessageStatusEnum::Accepted => "Accepted",
1013            ClearMessageStatusEnum::Unknown => "Unknown",
1014        }
1015    }
1016}
1017
1018impl std::fmt::Display for ClearMessageStatusEnum {
1019    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1020        f.write_str(self.as_str())
1021    }
1022}
1023
1024impl std::str::FromStr for ClearMessageStatusEnum {
1025    type Err = ();
1026    fn from_str(s: &str) -> Result<Self, ()> {
1027        Self::ALL
1028            .iter()
1029            .copied()
1030            .find(|v| v.as_str() == s)
1031            .ok_or(())
1032    }
1033}
1034
1035impl Validate for ClearMessageStatusEnum {
1036    #[inline]
1037    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1038        Ok(())
1039    }
1040}
1041
1042/// Result of the clear request for this monitor, identified by its Id.
1043#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1044pub enum ClearMonitoringStatusEnum {
1045    #[serde(rename = "Accepted")]
1046    Accepted,
1047    #[serde(rename = "Rejected")]
1048    Rejected,
1049    #[serde(rename = "NotFound")]
1050    NotFound,
1051}
1052
1053impl ClearMonitoringStatusEnum {
1054    pub const ALL: &'static [ClearMonitoringStatusEnum] = &[
1055        ClearMonitoringStatusEnum::Accepted,
1056        ClearMonitoringStatusEnum::Rejected,
1057        ClearMonitoringStatusEnum::NotFound,
1058    ];
1059    /// Value as it appears on the wire.
1060    pub const fn as_str(&self) -> &'static str {
1061        match self {
1062            ClearMonitoringStatusEnum::Accepted => "Accepted",
1063            ClearMonitoringStatusEnum::Rejected => "Rejected",
1064            ClearMonitoringStatusEnum::NotFound => "NotFound",
1065        }
1066    }
1067}
1068
1069impl std::fmt::Display for ClearMonitoringStatusEnum {
1070    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1071        f.write_str(self.as_str())
1072    }
1073}
1074
1075impl std::str::FromStr for ClearMonitoringStatusEnum {
1076    type Err = ();
1077    fn from_str(s: &str) -> Result<Self, ()> {
1078        Self::ALL
1079            .iter()
1080            .copied()
1081            .find(|v| v.as_str() == s)
1082            .ok_or(())
1083    }
1084}
1085
1086impl Validate for ClearMonitoringStatusEnum {
1087    #[inline]
1088    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1089        Ok(())
1090    }
1091}
1092
1093#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1094pub enum ComponentCriterionEnum {
1095    #[serde(rename = "Active")]
1096    Active,
1097    #[serde(rename = "Available")]
1098    Available,
1099    #[serde(rename = "Enabled")]
1100    Enabled,
1101    #[serde(rename = "Problem")]
1102    Problem,
1103}
1104
1105impl ComponentCriterionEnum {
1106    pub const ALL: &'static [ComponentCriterionEnum] = &[
1107        ComponentCriterionEnum::Active,
1108        ComponentCriterionEnum::Available,
1109        ComponentCriterionEnum::Enabled,
1110        ComponentCriterionEnum::Problem,
1111    ];
1112    /// Value as it appears on the wire.
1113    pub const fn as_str(&self) -> &'static str {
1114        match self {
1115            ComponentCriterionEnum::Active => "Active",
1116            ComponentCriterionEnum::Available => "Available",
1117            ComponentCriterionEnum::Enabled => "Enabled",
1118            ComponentCriterionEnum::Problem => "Problem",
1119        }
1120    }
1121}
1122
1123impl std::fmt::Display for ComponentCriterionEnum {
1124    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1125        f.write_str(self.as_str())
1126    }
1127}
1128
1129impl std::str::FromStr for ComponentCriterionEnum {
1130    type Err = ();
1131    fn from_str(s: &str) -> Result<Self, ()> {
1132        Self::ALL
1133            .iter()
1134            .copied()
1135            .find(|v| v.as_str() == s)
1136            .ok_or(())
1137    }
1138}
1139
1140impl Validate for ComponentCriterionEnum {
1141    #[inline]
1142    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1143        Ok(())
1144    }
1145}
1146
1147/// This field specifies the connector type.
1148#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1149pub enum ConnectorEnum {
1150    #[serde(rename = "cCCS1")]
1151    CCCS1,
1152    #[serde(rename = "cCCS2")]
1153    CCCS2,
1154    #[serde(rename = "cG105")]
1155    CG105,
1156    #[serde(rename = "cTesla")]
1157    CTesla,
1158    #[serde(rename = "cType1")]
1159    CType1,
1160    #[serde(rename = "cType2")]
1161    CType2,
1162    #[serde(rename = "s309-1P-16A")]
1163    S3091P16A,
1164    #[serde(rename = "s309-1P-32A")]
1165    S3091P32A,
1166    #[serde(rename = "s309-3P-16A")]
1167    S3093P16A,
1168    #[serde(rename = "s309-3P-32A")]
1169    S3093P32A,
1170    #[serde(rename = "sBS1361")]
1171    SBS1361,
1172    #[serde(rename = "sCEE-7-7")]
1173    SCEE77,
1174    #[serde(rename = "sType2")]
1175    SType2,
1176    #[serde(rename = "sType3")]
1177    SType3,
1178    #[serde(rename = "Other1PhMax16A")]
1179    Other1PhMax16A,
1180    #[serde(rename = "Other1PhOver16A")]
1181    Other1PhOver16A,
1182    #[serde(rename = "Other3Ph")]
1183    Other3Ph,
1184    #[serde(rename = "Pan")]
1185    Pan,
1186    #[serde(rename = "wInductive")]
1187    WInductive,
1188    #[serde(rename = "wResonant")]
1189    WResonant,
1190    #[serde(rename = "Undetermined")]
1191    Undetermined,
1192    #[serde(rename = "Unknown")]
1193    Unknown,
1194}
1195
1196impl ConnectorEnum {
1197    pub const ALL: &'static [ConnectorEnum] = &[
1198        ConnectorEnum::CCCS1,
1199        ConnectorEnum::CCCS2,
1200        ConnectorEnum::CG105,
1201        ConnectorEnum::CTesla,
1202        ConnectorEnum::CType1,
1203        ConnectorEnum::CType2,
1204        ConnectorEnum::S3091P16A,
1205        ConnectorEnum::S3091P32A,
1206        ConnectorEnum::S3093P16A,
1207        ConnectorEnum::S3093P32A,
1208        ConnectorEnum::SBS1361,
1209        ConnectorEnum::SCEE77,
1210        ConnectorEnum::SType2,
1211        ConnectorEnum::SType3,
1212        ConnectorEnum::Other1PhMax16A,
1213        ConnectorEnum::Other1PhOver16A,
1214        ConnectorEnum::Other3Ph,
1215        ConnectorEnum::Pan,
1216        ConnectorEnum::WInductive,
1217        ConnectorEnum::WResonant,
1218        ConnectorEnum::Undetermined,
1219        ConnectorEnum::Unknown,
1220    ];
1221    /// Value as it appears on the wire.
1222    pub const fn as_str(&self) -> &'static str {
1223        match self {
1224            ConnectorEnum::CCCS1 => "cCCS1",
1225            ConnectorEnum::CCCS2 => "cCCS2",
1226            ConnectorEnum::CG105 => "cG105",
1227            ConnectorEnum::CTesla => "cTesla",
1228            ConnectorEnum::CType1 => "cType1",
1229            ConnectorEnum::CType2 => "cType2",
1230            ConnectorEnum::S3091P16A => "s309-1P-16A",
1231            ConnectorEnum::S3091P32A => "s309-1P-32A",
1232            ConnectorEnum::S3093P16A => "s309-3P-16A",
1233            ConnectorEnum::S3093P32A => "s309-3P-32A",
1234            ConnectorEnum::SBS1361 => "sBS1361",
1235            ConnectorEnum::SCEE77 => "sCEE-7-7",
1236            ConnectorEnum::SType2 => "sType2",
1237            ConnectorEnum::SType3 => "sType3",
1238            ConnectorEnum::Other1PhMax16A => "Other1PhMax16A",
1239            ConnectorEnum::Other1PhOver16A => "Other1PhOver16A",
1240            ConnectorEnum::Other3Ph => "Other3Ph",
1241            ConnectorEnum::Pan => "Pan",
1242            ConnectorEnum::WInductive => "wInductive",
1243            ConnectorEnum::WResonant => "wResonant",
1244            ConnectorEnum::Undetermined => "Undetermined",
1245            ConnectorEnum::Unknown => "Unknown",
1246        }
1247    }
1248}
1249
1250impl std::fmt::Display for ConnectorEnum {
1251    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1252        f.write_str(self.as_str())
1253    }
1254}
1255
1256impl std::str::FromStr for ConnectorEnum {
1257    type Err = ();
1258    fn from_str(s: &str) -> Result<Self, ()> {
1259        Self::ALL
1260            .iter()
1261            .copied()
1262            .find(|v| v.as_str() == s)
1263            .ok_or(())
1264    }
1265}
1266
1267impl Validate for ConnectorEnum {
1268    #[inline]
1269    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1270        Ok(())
1271    }
1272}
1273
1274/// This contains the current status of the Connector.
1275#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1276pub enum ConnectorStatusEnum {
1277    #[serde(rename = "Available")]
1278    Available,
1279    #[serde(rename = "Occupied")]
1280    Occupied,
1281    #[serde(rename = "Reserved")]
1282    Reserved,
1283    #[serde(rename = "Unavailable")]
1284    Unavailable,
1285    #[serde(rename = "Faulted")]
1286    Faulted,
1287}
1288
1289impl ConnectorStatusEnum {
1290    pub const ALL: &'static [ConnectorStatusEnum] = &[
1291        ConnectorStatusEnum::Available,
1292        ConnectorStatusEnum::Occupied,
1293        ConnectorStatusEnum::Reserved,
1294        ConnectorStatusEnum::Unavailable,
1295        ConnectorStatusEnum::Faulted,
1296    ];
1297    /// Value as it appears on the wire.
1298    pub const fn as_str(&self) -> &'static str {
1299        match self {
1300            ConnectorStatusEnum::Available => "Available",
1301            ConnectorStatusEnum::Occupied => "Occupied",
1302            ConnectorStatusEnum::Reserved => "Reserved",
1303            ConnectorStatusEnum::Unavailable => "Unavailable",
1304            ConnectorStatusEnum::Faulted => "Faulted",
1305        }
1306    }
1307}
1308
1309impl std::fmt::Display for ConnectorStatusEnum {
1310    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1311        f.write_str(self.as_str())
1312    }
1313}
1314
1315impl std::str::FromStr for ConnectorStatusEnum {
1316    type Err = ();
1317    fn from_str(s: &str) -> Result<Self, ()> {
1318        Self::ALL
1319            .iter()
1320            .copied()
1321            .find(|v| v.as_str() == s)
1322            .ok_or(())
1323    }
1324}
1325
1326impl Validate for ConnectorStatusEnum {
1327    #[inline]
1328    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1329        Ok(())
1330    }
1331}
1332
1333/// Cost. Cost_ Kind. Cost_ Kind_ Code
1334/// The kind of cost referred to in the message element amount
1335#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1336pub enum CostKindEnum {
1337    #[serde(rename = "CarbonDioxideEmission")]
1338    CarbonDioxideEmission,
1339    #[serde(rename = "RelativePricePercentage")]
1340    RelativePricePercentage,
1341    #[serde(rename = "RenewableGenerationPercentage")]
1342    RenewableGenerationPercentage,
1343}
1344
1345impl CostKindEnum {
1346    pub const ALL: &'static [CostKindEnum] = &[
1347        CostKindEnum::CarbonDioxideEmission,
1348        CostKindEnum::RelativePricePercentage,
1349        CostKindEnum::RenewableGenerationPercentage,
1350    ];
1351    /// Value as it appears on the wire.
1352    pub const fn as_str(&self) -> &'static str {
1353        match self {
1354            CostKindEnum::CarbonDioxideEmission => "CarbonDioxideEmission",
1355            CostKindEnum::RelativePricePercentage => "RelativePricePercentage",
1356            CostKindEnum::RenewableGenerationPercentage => "RenewableGenerationPercentage",
1357        }
1358    }
1359}
1360
1361impl std::fmt::Display for CostKindEnum {
1362    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1363        f.write_str(self.as_str())
1364    }
1365}
1366
1367impl std::str::FromStr for CostKindEnum {
1368    type Err = ();
1369    fn from_str(s: &str) -> Result<Self, ()> {
1370        Self::ALL
1371            .iter()
1372            .copied()
1373            .find(|v| v.as_str() == s)
1374            .ok_or(())
1375    }
1376}
1377
1378impl Validate for CostKindEnum {
1379    #[inline]
1380    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1381        Ok(())
1382    }
1383}
1384
1385/// Indicates whether the request was accepted.
1386#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1387pub enum CustomerInformationStatusEnum {
1388    #[serde(rename = "Accepted")]
1389    Accepted,
1390    #[serde(rename = "Rejected")]
1391    Rejected,
1392    #[serde(rename = "Invalid")]
1393    Invalid,
1394}
1395
1396impl CustomerInformationStatusEnum {
1397    pub const ALL: &'static [CustomerInformationStatusEnum] = &[
1398        CustomerInformationStatusEnum::Accepted,
1399        CustomerInformationStatusEnum::Rejected,
1400        CustomerInformationStatusEnum::Invalid,
1401    ];
1402    /// Value as it appears on the wire.
1403    pub const fn as_str(&self) -> &'static str {
1404        match self {
1405            CustomerInformationStatusEnum::Accepted => "Accepted",
1406            CustomerInformationStatusEnum::Rejected => "Rejected",
1407            CustomerInformationStatusEnum::Invalid => "Invalid",
1408        }
1409    }
1410}
1411
1412impl std::fmt::Display for CustomerInformationStatusEnum {
1413    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1414        f.write_str(self.as_str())
1415    }
1416}
1417
1418impl std::str::FromStr for CustomerInformationStatusEnum {
1419    type Err = ();
1420    fn from_str(s: &str) -> Result<Self, ()> {
1421        Self::ALL
1422            .iter()
1423            .copied()
1424            .find(|v| v.as_str() == s)
1425            .ok_or(())
1426    }
1427}
1428
1429impl Validate for CustomerInformationStatusEnum {
1430    #[inline]
1431    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1432        Ok(())
1433    }
1434}
1435
1436/// Data type of this variable.
1437#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1438pub enum DataEnum {
1439    #[serde(rename = "string")]
1440    String,
1441    #[serde(rename = "decimal")]
1442    Decimal,
1443    #[serde(rename = "integer")]
1444    Integer,
1445    #[serde(rename = "dateTime")]
1446    DateTime,
1447    #[serde(rename = "boolean")]
1448    Boolean,
1449    #[serde(rename = "OptionList")]
1450    OptionList,
1451    #[serde(rename = "SequenceList")]
1452    SequenceList,
1453    #[serde(rename = "MemberList")]
1454    MemberList,
1455}
1456
1457impl DataEnum {
1458    pub const ALL: &'static [DataEnum] = &[
1459        DataEnum::String,
1460        DataEnum::Decimal,
1461        DataEnum::Integer,
1462        DataEnum::DateTime,
1463        DataEnum::Boolean,
1464        DataEnum::OptionList,
1465        DataEnum::SequenceList,
1466        DataEnum::MemberList,
1467    ];
1468    /// Value as it appears on the wire.
1469    pub const fn as_str(&self) -> &'static str {
1470        match self {
1471            DataEnum::String => "string",
1472            DataEnum::Decimal => "decimal",
1473            DataEnum::Integer => "integer",
1474            DataEnum::DateTime => "dateTime",
1475            DataEnum::Boolean => "boolean",
1476            DataEnum::OptionList => "OptionList",
1477            DataEnum::SequenceList => "SequenceList",
1478            DataEnum::MemberList => "MemberList",
1479        }
1480    }
1481}
1482
1483impl std::fmt::Display for DataEnum {
1484    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1485        f.write_str(self.as_str())
1486    }
1487}
1488
1489impl std::str::FromStr for DataEnum {
1490    type Err = ();
1491    fn from_str(s: &str) -> Result<Self, ()> {
1492        Self::ALL
1493            .iter()
1494            .copied()
1495            .find(|v| v.as_str() == s)
1496            .ok_or(())
1497    }
1498}
1499
1500impl Validate for DataEnum {
1501    #[inline]
1502    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1503        Ok(())
1504    }
1505}
1506
1507/// This indicates the success or failure of the data transfer.
1508#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1509pub enum DataTransferStatusEnum {
1510    #[serde(rename = "Accepted")]
1511    Accepted,
1512    #[serde(rename = "Rejected")]
1513    Rejected,
1514    #[serde(rename = "UnknownMessageId")]
1515    UnknownMessageId,
1516    #[serde(rename = "UnknownVendorId")]
1517    UnknownVendorId,
1518}
1519
1520impl DataTransferStatusEnum {
1521    pub const ALL: &'static [DataTransferStatusEnum] = &[
1522        DataTransferStatusEnum::Accepted,
1523        DataTransferStatusEnum::Rejected,
1524        DataTransferStatusEnum::UnknownMessageId,
1525        DataTransferStatusEnum::UnknownVendorId,
1526    ];
1527    /// Value as it appears on the wire.
1528    pub const fn as_str(&self) -> &'static str {
1529        match self {
1530            DataTransferStatusEnum::Accepted => "Accepted",
1531            DataTransferStatusEnum::Rejected => "Rejected",
1532            DataTransferStatusEnum::UnknownMessageId => "UnknownMessageId",
1533            DataTransferStatusEnum::UnknownVendorId => "UnknownVendorId",
1534        }
1535    }
1536}
1537
1538impl std::fmt::Display for DataTransferStatusEnum {
1539    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1540        f.write_str(self.as_str())
1541    }
1542}
1543
1544impl std::str::FromStr for DataTransferStatusEnum {
1545    type Err = ();
1546    fn from_str(s: &str) -> Result<Self, ()> {
1547        Self::ALL
1548            .iter()
1549            .copied()
1550            .find(|v| v.as_str() == s)
1551            .ok_or(())
1552    }
1553}
1554
1555impl Validate for DataTransferStatusEnum {
1556    #[inline]
1557    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1558        Ok(())
1559    }
1560}
1561
1562/// Charging Station indicates if it can process the request.
1563#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1564pub enum DeleteCertificateStatusEnum {
1565    #[serde(rename = "Accepted")]
1566    Accepted,
1567    #[serde(rename = "Failed")]
1568    Failed,
1569    #[serde(rename = "NotFound")]
1570    NotFound,
1571}
1572
1573impl DeleteCertificateStatusEnum {
1574    pub const ALL: &'static [DeleteCertificateStatusEnum] = &[
1575        DeleteCertificateStatusEnum::Accepted,
1576        DeleteCertificateStatusEnum::Failed,
1577        DeleteCertificateStatusEnum::NotFound,
1578    ];
1579    /// Value as it appears on the wire.
1580    pub const fn as_str(&self) -> &'static str {
1581        match self {
1582            DeleteCertificateStatusEnum::Accepted => "Accepted",
1583            DeleteCertificateStatusEnum::Failed => "Failed",
1584            DeleteCertificateStatusEnum::NotFound => "NotFound",
1585        }
1586    }
1587}
1588
1589impl std::fmt::Display for DeleteCertificateStatusEnum {
1590    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1591        f.write_str(self.as_str())
1592    }
1593}
1594
1595impl std::str::FromStr for DeleteCertificateStatusEnum {
1596    type Err = ();
1597    fn from_str(s: &str) -> Result<Self, ()> {
1598        Self::ALL
1599            .iter()
1600            .copied()
1601            .find(|v| v.as_str() == s)
1602            .ok_or(())
1603    }
1604}
1605
1606impl Validate for DeleteCertificateStatusEnum {
1607    #[inline]
1608    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1609        Ok(())
1610    }
1611}
1612
1613/// This indicates whether the Charging Station is able to display the message.
1614#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1615pub enum DisplayMessageStatusEnum {
1616    #[serde(rename = "Accepted")]
1617    Accepted,
1618    #[serde(rename = "NotSupportedMessageFormat")]
1619    NotSupportedMessageFormat,
1620    #[serde(rename = "Rejected")]
1621    Rejected,
1622    #[serde(rename = "NotSupportedPriority")]
1623    NotSupportedPriority,
1624    #[serde(rename = "NotSupportedState")]
1625    NotSupportedState,
1626    #[serde(rename = "UnknownTransaction")]
1627    UnknownTransaction,
1628}
1629
1630impl DisplayMessageStatusEnum {
1631    pub const ALL: &'static [DisplayMessageStatusEnum] = &[
1632        DisplayMessageStatusEnum::Accepted,
1633        DisplayMessageStatusEnum::NotSupportedMessageFormat,
1634        DisplayMessageStatusEnum::Rejected,
1635        DisplayMessageStatusEnum::NotSupportedPriority,
1636        DisplayMessageStatusEnum::NotSupportedState,
1637        DisplayMessageStatusEnum::UnknownTransaction,
1638    ];
1639    /// Value as it appears on the wire.
1640    pub const fn as_str(&self) -> &'static str {
1641        match self {
1642            DisplayMessageStatusEnum::Accepted => "Accepted",
1643            DisplayMessageStatusEnum::NotSupportedMessageFormat => "NotSupportedMessageFormat",
1644            DisplayMessageStatusEnum::Rejected => "Rejected",
1645            DisplayMessageStatusEnum::NotSupportedPriority => "NotSupportedPriority",
1646            DisplayMessageStatusEnum::NotSupportedState => "NotSupportedState",
1647            DisplayMessageStatusEnum::UnknownTransaction => "UnknownTransaction",
1648        }
1649    }
1650}
1651
1652impl std::fmt::Display for DisplayMessageStatusEnum {
1653    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1654        f.write_str(self.as_str())
1655    }
1656}
1657
1658impl std::str::FromStr for DisplayMessageStatusEnum {
1659    type Err = ();
1660    fn from_str(s: &str) -> Result<Self, ()> {
1661        Self::ALL
1662            .iter()
1663            .copied()
1664            .find(|v| v.as_str() == s)
1665            .ok_or(())
1666    }
1667}
1668
1669impl Validate for DisplayMessageStatusEnum {
1670    #[inline]
1671    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1672        Ok(())
1673    }
1674}
1675
1676/// Charging_ Needs. Requested. Energy_ Transfer_ Mode_ Code
1677/// Mode of energy transfer requested by the EV.
1678#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1679pub enum EnergyTransferModeEnum {
1680    #[serde(rename = "DC")]
1681    DC,
1682    #[serde(rename = "AC_single_phase")]
1683    ACSinglePhase,
1684    #[serde(rename = "AC_two_phase")]
1685    ACTwoPhase,
1686    #[serde(rename = "AC_three_phase")]
1687    ACThreePhase,
1688}
1689
1690impl EnergyTransferModeEnum {
1691    pub const ALL: &'static [EnergyTransferModeEnum] = &[
1692        EnergyTransferModeEnum::DC,
1693        EnergyTransferModeEnum::ACSinglePhase,
1694        EnergyTransferModeEnum::ACTwoPhase,
1695        EnergyTransferModeEnum::ACThreePhase,
1696    ];
1697    /// Value as it appears on the wire.
1698    pub const fn as_str(&self) -> &'static str {
1699        match self {
1700            EnergyTransferModeEnum::DC => "DC",
1701            EnergyTransferModeEnum::ACSinglePhase => "AC_single_phase",
1702            EnergyTransferModeEnum::ACTwoPhase => "AC_two_phase",
1703            EnergyTransferModeEnum::ACThreePhase => "AC_three_phase",
1704        }
1705    }
1706}
1707
1708impl std::fmt::Display for EnergyTransferModeEnum {
1709    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1710        f.write_str(self.as_str())
1711    }
1712}
1713
1714impl std::str::FromStr for EnergyTransferModeEnum {
1715    type Err = ();
1716    fn from_str(s: &str) -> Result<Self, ()> {
1717        Self::ALL
1718            .iter()
1719            .copied()
1720            .find(|v| v.as_str() == s)
1721            .ok_or(())
1722    }
1723}
1724
1725impl Validate for EnergyTransferModeEnum {
1726    #[inline]
1727    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1728        Ok(())
1729    }
1730}
1731
1732/// Specifies the event notification type of the message.
1733#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1734pub enum EventNotificationEnum {
1735    #[serde(rename = "HardWiredNotification")]
1736    HardWiredNotification,
1737    #[serde(rename = "HardWiredMonitor")]
1738    HardWiredMonitor,
1739    #[serde(rename = "PreconfiguredMonitor")]
1740    PreconfiguredMonitor,
1741    #[serde(rename = "CustomMonitor")]
1742    CustomMonitor,
1743}
1744
1745impl EventNotificationEnum {
1746    pub const ALL: &'static [EventNotificationEnum] = &[
1747        EventNotificationEnum::HardWiredNotification,
1748        EventNotificationEnum::HardWiredMonitor,
1749        EventNotificationEnum::PreconfiguredMonitor,
1750        EventNotificationEnum::CustomMonitor,
1751    ];
1752    /// Value as it appears on the wire.
1753    pub const fn as_str(&self) -> &'static str {
1754        match self {
1755            EventNotificationEnum::HardWiredNotification => "HardWiredNotification",
1756            EventNotificationEnum::HardWiredMonitor => "HardWiredMonitor",
1757            EventNotificationEnum::PreconfiguredMonitor => "PreconfiguredMonitor",
1758            EventNotificationEnum::CustomMonitor => "CustomMonitor",
1759        }
1760    }
1761}
1762
1763impl std::fmt::Display for EventNotificationEnum {
1764    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1765        f.write_str(self.as_str())
1766    }
1767}
1768
1769impl std::str::FromStr for EventNotificationEnum {
1770    type Err = ();
1771    fn from_str(s: &str) -> Result<Self, ()> {
1772        Self::ALL
1773            .iter()
1774            .copied()
1775            .find(|v| v.as_str() == s)
1776            .ok_or(())
1777    }
1778}
1779
1780impl Validate for EventNotificationEnum {
1781    #[inline]
1782    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1783        Ok(())
1784    }
1785}
1786
1787/// Type of monitor that triggered this event, e.g. exceeding a threshold value.
1788#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1789pub enum EventTriggerEnum {
1790    #[serde(rename = "Alerting")]
1791    Alerting,
1792    #[serde(rename = "Delta")]
1793    Delta,
1794    #[serde(rename = "Periodic")]
1795    Periodic,
1796}
1797
1798impl EventTriggerEnum {
1799    pub const ALL: &'static [EventTriggerEnum] = &[
1800        EventTriggerEnum::Alerting,
1801        EventTriggerEnum::Delta,
1802        EventTriggerEnum::Periodic,
1803    ];
1804    /// Value as it appears on the wire.
1805    pub const fn as_str(&self) -> &'static str {
1806        match self {
1807            EventTriggerEnum::Alerting => "Alerting",
1808            EventTriggerEnum::Delta => "Delta",
1809            EventTriggerEnum::Periodic => "Periodic",
1810        }
1811    }
1812}
1813
1814impl std::fmt::Display for EventTriggerEnum {
1815    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1816        f.write_str(self.as_str())
1817    }
1818}
1819
1820impl std::str::FromStr for EventTriggerEnum {
1821    type Err = ();
1822    fn from_str(s: &str) -> Result<Self, ()> {
1823        Self::ALL
1824            .iter()
1825            .copied()
1826            .find(|v| v.as_str() == s)
1827            .ok_or(())
1828    }
1829}
1830
1831impl Validate for EventTriggerEnum {
1832    #[inline]
1833    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1834        Ok(())
1835    }
1836}
1837
1838/// This contains the progress status of the firmware installation.
1839#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1840pub enum FirmwareStatusEnum {
1841    #[serde(rename = "Downloaded")]
1842    Downloaded,
1843    #[serde(rename = "DownloadFailed")]
1844    DownloadFailed,
1845    #[serde(rename = "Downloading")]
1846    Downloading,
1847    #[serde(rename = "DownloadScheduled")]
1848    DownloadScheduled,
1849    #[serde(rename = "DownloadPaused")]
1850    DownloadPaused,
1851    #[serde(rename = "Idle")]
1852    Idle,
1853    #[serde(rename = "InstallationFailed")]
1854    InstallationFailed,
1855    #[serde(rename = "Installing")]
1856    Installing,
1857    #[serde(rename = "Installed")]
1858    Installed,
1859    #[serde(rename = "InstallRebooting")]
1860    InstallRebooting,
1861    #[serde(rename = "InstallScheduled")]
1862    InstallScheduled,
1863    #[serde(rename = "InstallVerificationFailed")]
1864    InstallVerificationFailed,
1865    #[serde(rename = "InvalidSignature")]
1866    InvalidSignature,
1867    #[serde(rename = "SignatureVerified")]
1868    SignatureVerified,
1869}
1870
1871impl FirmwareStatusEnum {
1872    pub const ALL: &'static [FirmwareStatusEnum] = &[
1873        FirmwareStatusEnum::Downloaded,
1874        FirmwareStatusEnum::DownloadFailed,
1875        FirmwareStatusEnum::Downloading,
1876        FirmwareStatusEnum::DownloadScheduled,
1877        FirmwareStatusEnum::DownloadPaused,
1878        FirmwareStatusEnum::Idle,
1879        FirmwareStatusEnum::InstallationFailed,
1880        FirmwareStatusEnum::Installing,
1881        FirmwareStatusEnum::Installed,
1882        FirmwareStatusEnum::InstallRebooting,
1883        FirmwareStatusEnum::InstallScheduled,
1884        FirmwareStatusEnum::InstallVerificationFailed,
1885        FirmwareStatusEnum::InvalidSignature,
1886        FirmwareStatusEnum::SignatureVerified,
1887    ];
1888    /// Value as it appears on the wire.
1889    pub const fn as_str(&self) -> &'static str {
1890        match self {
1891            FirmwareStatusEnum::Downloaded => "Downloaded",
1892            FirmwareStatusEnum::DownloadFailed => "DownloadFailed",
1893            FirmwareStatusEnum::Downloading => "Downloading",
1894            FirmwareStatusEnum::DownloadScheduled => "DownloadScheduled",
1895            FirmwareStatusEnum::DownloadPaused => "DownloadPaused",
1896            FirmwareStatusEnum::Idle => "Idle",
1897            FirmwareStatusEnum::InstallationFailed => "InstallationFailed",
1898            FirmwareStatusEnum::Installing => "Installing",
1899            FirmwareStatusEnum::Installed => "Installed",
1900            FirmwareStatusEnum::InstallRebooting => "InstallRebooting",
1901            FirmwareStatusEnum::InstallScheduled => "InstallScheduled",
1902            FirmwareStatusEnum::InstallVerificationFailed => "InstallVerificationFailed",
1903            FirmwareStatusEnum::InvalidSignature => "InvalidSignature",
1904            FirmwareStatusEnum::SignatureVerified => "SignatureVerified",
1905        }
1906    }
1907}
1908
1909impl std::fmt::Display for FirmwareStatusEnum {
1910    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1911        f.write_str(self.as_str())
1912    }
1913}
1914
1915impl std::str::FromStr for FirmwareStatusEnum {
1916    type Err = ();
1917    fn from_str(s: &str) -> Result<Self, ()> {
1918        Self::ALL
1919            .iter()
1920            .copied()
1921            .find(|v| v.as_str() == s)
1922            .ok_or(())
1923    }
1924}
1925
1926impl Validate for FirmwareStatusEnum {
1927    #[inline]
1928    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1929        Ok(())
1930    }
1931}
1932
1933/// This indicates whether the Charging Station is able to accept this request.
1934#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1935pub enum GenericDeviceModelStatusEnum {
1936    #[serde(rename = "Accepted")]
1937    Accepted,
1938    #[serde(rename = "Rejected")]
1939    Rejected,
1940    #[serde(rename = "NotSupported")]
1941    NotSupported,
1942    #[serde(rename = "EmptyResultSet")]
1943    EmptyResultSet,
1944}
1945
1946impl GenericDeviceModelStatusEnum {
1947    pub const ALL: &'static [GenericDeviceModelStatusEnum] = &[
1948        GenericDeviceModelStatusEnum::Accepted,
1949        GenericDeviceModelStatusEnum::Rejected,
1950        GenericDeviceModelStatusEnum::NotSupported,
1951        GenericDeviceModelStatusEnum::EmptyResultSet,
1952    ];
1953    /// Value as it appears on the wire.
1954    pub const fn as_str(&self) -> &'static str {
1955        match self {
1956            GenericDeviceModelStatusEnum::Accepted => "Accepted",
1957            GenericDeviceModelStatusEnum::Rejected => "Rejected",
1958            GenericDeviceModelStatusEnum::NotSupported => "NotSupported",
1959            GenericDeviceModelStatusEnum::EmptyResultSet => "EmptyResultSet",
1960        }
1961    }
1962}
1963
1964impl std::fmt::Display for GenericDeviceModelStatusEnum {
1965    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1966        f.write_str(self.as_str())
1967    }
1968}
1969
1970impl std::str::FromStr for GenericDeviceModelStatusEnum {
1971    type Err = ();
1972    fn from_str(s: &str) -> Result<Self, ()> {
1973        Self::ALL
1974            .iter()
1975            .copied()
1976            .find(|v| v.as_str() == s)
1977            .ok_or(())
1978    }
1979}
1980
1981impl Validate for GenericDeviceModelStatusEnum {
1982    #[inline]
1983    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
1984        Ok(())
1985    }
1986}
1987
1988/// The Charging Station will indicate if it was
1989/// able to process the request
1990#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
1991pub enum GenericStatusEnum {
1992    #[serde(rename = "Accepted")]
1993    Accepted,
1994    #[serde(rename = "Rejected")]
1995    Rejected,
1996}
1997
1998impl GenericStatusEnum {
1999    pub const ALL: &'static [GenericStatusEnum] =
2000        &[GenericStatusEnum::Accepted, GenericStatusEnum::Rejected];
2001    /// Value as it appears on the wire.
2002    pub const fn as_str(&self) -> &'static str {
2003        match self {
2004            GenericStatusEnum::Accepted => "Accepted",
2005            GenericStatusEnum::Rejected => "Rejected",
2006        }
2007    }
2008}
2009
2010impl std::fmt::Display for GenericStatusEnum {
2011    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2012        f.write_str(self.as_str())
2013    }
2014}
2015
2016impl std::str::FromStr for GenericStatusEnum {
2017    type Err = ();
2018    fn from_str(s: &str) -> Result<Self, ()> {
2019        Self::ALL
2020            .iter()
2021            .copied()
2022            .find(|v| v.as_str() == s)
2023            .ok_or(())
2024    }
2025}
2026
2027impl Validate for GenericStatusEnum {
2028    #[inline]
2029    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2030        Ok(())
2031    }
2032}
2033
2034#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2035pub enum GetCertificateIdUseEnum {
2036    #[serde(rename = "V2GRootCertificate")]
2037    V2GRootCertificate,
2038    #[serde(rename = "MORootCertificate")]
2039    MORootCertificate,
2040    #[serde(rename = "CSMSRootCertificate")]
2041    CSMSRootCertificate,
2042    #[serde(rename = "V2GCertificateChain")]
2043    V2GCertificateChain,
2044    #[serde(rename = "ManufacturerRootCertificate")]
2045    ManufacturerRootCertificate,
2046}
2047
2048impl GetCertificateIdUseEnum {
2049    pub const ALL: &'static [GetCertificateIdUseEnum] = &[
2050        GetCertificateIdUseEnum::V2GRootCertificate,
2051        GetCertificateIdUseEnum::MORootCertificate,
2052        GetCertificateIdUseEnum::CSMSRootCertificate,
2053        GetCertificateIdUseEnum::V2GCertificateChain,
2054        GetCertificateIdUseEnum::ManufacturerRootCertificate,
2055    ];
2056    /// Value as it appears on the wire.
2057    pub const fn as_str(&self) -> &'static str {
2058        match self {
2059            GetCertificateIdUseEnum::V2GRootCertificate => "V2GRootCertificate",
2060            GetCertificateIdUseEnum::MORootCertificate => "MORootCertificate",
2061            GetCertificateIdUseEnum::CSMSRootCertificate => "CSMSRootCertificate",
2062            GetCertificateIdUseEnum::V2GCertificateChain => "V2GCertificateChain",
2063            GetCertificateIdUseEnum::ManufacturerRootCertificate => "ManufacturerRootCertificate",
2064        }
2065    }
2066}
2067
2068impl std::fmt::Display for GetCertificateIdUseEnum {
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 GetCertificateIdUseEnum {
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 GetCertificateIdUseEnum {
2086    #[inline]
2087    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2088        Ok(())
2089    }
2090}
2091
2092/// This indicates whether the charging station was able to retrieve the OCSP certificate status.
2093#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2094pub enum GetCertificateStatusEnum {
2095    #[serde(rename = "Accepted")]
2096    Accepted,
2097    #[serde(rename = "Failed")]
2098    Failed,
2099}
2100
2101impl GetCertificateStatusEnum {
2102    pub const ALL: &'static [GetCertificateStatusEnum] = &[
2103        GetCertificateStatusEnum::Accepted,
2104        GetCertificateStatusEnum::Failed,
2105    ];
2106    /// Value as it appears on the wire.
2107    pub const fn as_str(&self) -> &'static str {
2108        match self {
2109            GetCertificateStatusEnum::Accepted => "Accepted",
2110            GetCertificateStatusEnum::Failed => "Failed",
2111        }
2112    }
2113}
2114
2115impl std::fmt::Display for GetCertificateStatusEnum {
2116    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2117        f.write_str(self.as_str())
2118    }
2119}
2120
2121impl std::str::FromStr for GetCertificateStatusEnum {
2122    type Err = ();
2123    fn from_str(s: &str) -> Result<Self, ()> {
2124        Self::ALL
2125            .iter()
2126            .copied()
2127            .find(|v| v.as_str() == s)
2128            .ok_or(())
2129    }
2130}
2131
2132impl Validate for GetCertificateStatusEnum {
2133    #[inline]
2134    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2135        Ok(())
2136    }
2137}
2138
2139/// This indicates whether the Charging Station is able to process this request and will send &lt;&lt;reportchargingprofilesrequest, ReportChargingProfilesRequest&gt;&gt; messages.
2140#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2141pub enum GetChargingProfileStatusEnum {
2142    #[serde(rename = "Accepted")]
2143    Accepted,
2144    #[serde(rename = "NoProfiles")]
2145    NoProfiles,
2146}
2147
2148impl GetChargingProfileStatusEnum {
2149    pub const ALL: &'static [GetChargingProfileStatusEnum] = &[
2150        GetChargingProfileStatusEnum::Accepted,
2151        GetChargingProfileStatusEnum::NoProfiles,
2152    ];
2153    /// Value as it appears on the wire.
2154    pub const fn as_str(&self) -> &'static str {
2155        match self {
2156            GetChargingProfileStatusEnum::Accepted => "Accepted",
2157            GetChargingProfileStatusEnum::NoProfiles => "NoProfiles",
2158        }
2159    }
2160}
2161
2162impl std::fmt::Display for GetChargingProfileStatusEnum {
2163    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2164        f.write_str(self.as_str())
2165    }
2166}
2167
2168impl std::str::FromStr for GetChargingProfileStatusEnum {
2169    type Err = ();
2170    fn from_str(s: &str) -> Result<Self, ()> {
2171        Self::ALL
2172            .iter()
2173            .copied()
2174            .find(|v| v.as_str() == s)
2175            .ok_or(())
2176    }
2177}
2178
2179impl Validate for GetChargingProfileStatusEnum {
2180    #[inline]
2181    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2182        Ok(())
2183    }
2184}
2185
2186/// Indicates if the Charging Station has Display Messages that match the request criteria in the &lt;&lt;getdisplaymessagesrequest,GetDisplayMessagesRequest&gt;&gt;
2187#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2188pub enum GetDisplayMessagesStatusEnum {
2189    #[serde(rename = "Accepted")]
2190    Accepted,
2191    #[serde(rename = "Unknown")]
2192    Unknown,
2193}
2194
2195impl GetDisplayMessagesStatusEnum {
2196    pub const ALL: &'static [GetDisplayMessagesStatusEnum] = &[
2197        GetDisplayMessagesStatusEnum::Accepted,
2198        GetDisplayMessagesStatusEnum::Unknown,
2199    ];
2200    /// Value as it appears on the wire.
2201    pub const fn as_str(&self) -> &'static str {
2202        match self {
2203            GetDisplayMessagesStatusEnum::Accepted => "Accepted",
2204            GetDisplayMessagesStatusEnum::Unknown => "Unknown",
2205        }
2206    }
2207}
2208
2209impl std::fmt::Display for GetDisplayMessagesStatusEnum {
2210    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2211        f.write_str(self.as_str())
2212    }
2213}
2214
2215impl std::str::FromStr for GetDisplayMessagesStatusEnum {
2216    type Err = ();
2217    fn from_str(s: &str) -> Result<Self, ()> {
2218        Self::ALL
2219            .iter()
2220            .copied()
2221            .find(|v| v.as_str() == s)
2222            .ok_or(())
2223    }
2224}
2225
2226impl Validate for GetDisplayMessagesStatusEnum {
2227    #[inline]
2228    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2229        Ok(())
2230    }
2231}
2232
2233/// Charging Station indicates if it can process the request.
2234#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2235pub enum GetInstalledCertificateStatusEnum {
2236    #[serde(rename = "Accepted")]
2237    Accepted,
2238    #[serde(rename = "NotFound")]
2239    NotFound,
2240}
2241
2242impl GetInstalledCertificateStatusEnum {
2243    pub const ALL: &'static [GetInstalledCertificateStatusEnum] = &[
2244        GetInstalledCertificateStatusEnum::Accepted,
2245        GetInstalledCertificateStatusEnum::NotFound,
2246    ];
2247    /// Value as it appears on the wire.
2248    pub const fn as_str(&self) -> &'static str {
2249        match self {
2250            GetInstalledCertificateStatusEnum::Accepted => "Accepted",
2251            GetInstalledCertificateStatusEnum::NotFound => "NotFound",
2252        }
2253    }
2254}
2255
2256impl std::fmt::Display for GetInstalledCertificateStatusEnum {
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 GetInstalledCertificateStatusEnum {
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 GetInstalledCertificateStatusEnum {
2274    #[inline]
2275    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2276        Ok(())
2277    }
2278}
2279
2280/// Result status of getting the variable.
2281#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2282pub enum GetVariableStatusEnum {
2283    #[serde(rename = "Accepted")]
2284    Accepted,
2285    #[serde(rename = "Rejected")]
2286    Rejected,
2287    #[serde(rename = "UnknownComponent")]
2288    UnknownComponent,
2289    #[serde(rename = "UnknownVariable")]
2290    UnknownVariable,
2291    #[serde(rename = "NotSupportedAttributeType")]
2292    NotSupportedAttributeType,
2293}
2294
2295impl GetVariableStatusEnum {
2296    pub const ALL: &'static [GetVariableStatusEnum] = &[
2297        GetVariableStatusEnum::Accepted,
2298        GetVariableStatusEnum::Rejected,
2299        GetVariableStatusEnum::UnknownComponent,
2300        GetVariableStatusEnum::UnknownVariable,
2301        GetVariableStatusEnum::NotSupportedAttributeType,
2302    ];
2303    /// Value as it appears on the wire.
2304    pub const fn as_str(&self) -> &'static str {
2305        match self {
2306            GetVariableStatusEnum::Accepted => "Accepted",
2307            GetVariableStatusEnum::Rejected => "Rejected",
2308            GetVariableStatusEnum::UnknownComponent => "UnknownComponent",
2309            GetVariableStatusEnum::UnknownVariable => "UnknownVariable",
2310            GetVariableStatusEnum::NotSupportedAttributeType => "NotSupportedAttributeType",
2311        }
2312    }
2313}
2314
2315impl std::fmt::Display for GetVariableStatusEnum {
2316    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2317        f.write_str(self.as_str())
2318    }
2319}
2320
2321impl std::str::FromStr for GetVariableStatusEnum {
2322    type Err = ();
2323    fn from_str(s: &str) -> Result<Self, ()> {
2324        Self::ALL
2325            .iter()
2326            .copied()
2327            .find(|v| v.as_str() == s)
2328            .ok_or(())
2329    }
2330}
2331
2332impl Validate for GetVariableStatusEnum {
2333    #[inline]
2334    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2335        Ok(())
2336    }
2337}
2338
2339/// Used algorithms for the hashes provided.
2340#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2341pub enum HashAlgorithmEnum {
2342    #[serde(rename = "SHA256")]
2343    SHA256,
2344    #[serde(rename = "SHA384")]
2345    SHA384,
2346    #[serde(rename = "SHA512")]
2347    SHA512,
2348}
2349
2350impl HashAlgorithmEnum {
2351    pub const ALL: &'static [HashAlgorithmEnum] = &[
2352        HashAlgorithmEnum::SHA256,
2353        HashAlgorithmEnum::SHA384,
2354        HashAlgorithmEnum::SHA512,
2355    ];
2356    /// Value as it appears on the wire.
2357    pub const fn as_str(&self) -> &'static str {
2358        match self {
2359            HashAlgorithmEnum::SHA256 => "SHA256",
2360            HashAlgorithmEnum::SHA384 => "SHA384",
2361            HashAlgorithmEnum::SHA512 => "SHA512",
2362        }
2363    }
2364}
2365
2366impl std::fmt::Display for HashAlgorithmEnum {
2367    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2368        f.write_str(self.as_str())
2369    }
2370}
2371
2372impl std::str::FromStr for HashAlgorithmEnum {
2373    type Err = ();
2374    fn from_str(s: &str) -> Result<Self, ()> {
2375        Self::ALL
2376            .iter()
2377            .copied()
2378            .find(|v| v.as_str() == s)
2379            .ok_or(())
2380    }
2381}
2382
2383impl Validate for HashAlgorithmEnum {
2384    #[inline]
2385    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2386        Ok(())
2387    }
2388}
2389
2390/// Enumeration of possible idToken types.
2391#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2392pub enum IdTokenEnum {
2393    #[serde(rename = "Central")]
2394    Central,
2395    #[serde(rename = "eMAID")]
2396    EMAID,
2397    #[serde(rename = "ISO14443")]
2398    ISO14443,
2399    #[serde(rename = "ISO15693")]
2400    ISO15693,
2401    #[serde(rename = "KeyCode")]
2402    KeyCode,
2403    #[serde(rename = "Local")]
2404    Local,
2405    #[serde(rename = "MacAddress")]
2406    MacAddress,
2407    #[serde(rename = "NoAuthorization")]
2408    NoAuthorization,
2409}
2410
2411impl IdTokenEnum {
2412    pub const ALL: &'static [IdTokenEnum] = &[
2413        IdTokenEnum::Central,
2414        IdTokenEnum::EMAID,
2415        IdTokenEnum::ISO14443,
2416        IdTokenEnum::ISO15693,
2417        IdTokenEnum::KeyCode,
2418        IdTokenEnum::Local,
2419        IdTokenEnum::MacAddress,
2420        IdTokenEnum::NoAuthorization,
2421    ];
2422    /// Value as it appears on the wire.
2423    pub const fn as_str(&self) -> &'static str {
2424        match self {
2425            IdTokenEnum::Central => "Central",
2426            IdTokenEnum::EMAID => "eMAID",
2427            IdTokenEnum::ISO14443 => "ISO14443",
2428            IdTokenEnum::ISO15693 => "ISO15693",
2429            IdTokenEnum::KeyCode => "KeyCode",
2430            IdTokenEnum::Local => "Local",
2431            IdTokenEnum::MacAddress => "MacAddress",
2432            IdTokenEnum::NoAuthorization => "NoAuthorization",
2433        }
2434    }
2435}
2436
2437impl std::fmt::Display for IdTokenEnum {
2438    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2439        f.write_str(self.as_str())
2440    }
2441}
2442
2443impl std::str::FromStr for IdTokenEnum {
2444    type Err = ();
2445    fn from_str(s: &str) -> Result<Self, ()> {
2446        Self::ALL
2447            .iter()
2448            .copied()
2449            .find(|v| v.as_str() == s)
2450            .ok_or(())
2451    }
2452}
2453
2454impl Validate for IdTokenEnum {
2455    #[inline]
2456    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2457        Ok(())
2458    }
2459}
2460
2461/// Charging Station indicates if installation was successful.
2462#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2463pub enum InstallCertificateStatusEnum {
2464    #[serde(rename = "Accepted")]
2465    Accepted,
2466    #[serde(rename = "Rejected")]
2467    Rejected,
2468    #[serde(rename = "Failed")]
2469    Failed,
2470}
2471
2472impl InstallCertificateStatusEnum {
2473    pub const ALL: &'static [InstallCertificateStatusEnum] = &[
2474        InstallCertificateStatusEnum::Accepted,
2475        InstallCertificateStatusEnum::Rejected,
2476        InstallCertificateStatusEnum::Failed,
2477    ];
2478    /// Value as it appears on the wire.
2479    pub const fn as_str(&self) -> &'static str {
2480        match self {
2481            InstallCertificateStatusEnum::Accepted => "Accepted",
2482            InstallCertificateStatusEnum::Rejected => "Rejected",
2483            InstallCertificateStatusEnum::Failed => "Failed",
2484        }
2485    }
2486}
2487
2488impl std::fmt::Display for InstallCertificateStatusEnum {
2489    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2490        f.write_str(self.as_str())
2491    }
2492}
2493
2494impl std::str::FromStr for InstallCertificateStatusEnum {
2495    type Err = ();
2496    fn from_str(s: &str) -> Result<Self, ()> {
2497        Self::ALL
2498            .iter()
2499            .copied()
2500            .find(|v| v.as_str() == s)
2501            .ok_or(())
2502    }
2503}
2504
2505impl Validate for InstallCertificateStatusEnum {
2506    #[inline]
2507    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2508        Ok(())
2509    }
2510}
2511
2512/// Indicates the certificate type that is sent.
2513#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2514pub enum InstallCertificateUseEnum {
2515    #[serde(rename = "V2GRootCertificate")]
2516    V2GRootCertificate,
2517    #[serde(rename = "MORootCertificate")]
2518    MORootCertificate,
2519    #[serde(rename = "CSMSRootCertificate")]
2520    CSMSRootCertificate,
2521    #[serde(rename = "ManufacturerRootCertificate")]
2522    ManufacturerRootCertificate,
2523}
2524
2525impl InstallCertificateUseEnum {
2526    pub const ALL: &'static [InstallCertificateUseEnum] = &[
2527        InstallCertificateUseEnum::V2GRootCertificate,
2528        InstallCertificateUseEnum::MORootCertificate,
2529        InstallCertificateUseEnum::CSMSRootCertificate,
2530        InstallCertificateUseEnum::ManufacturerRootCertificate,
2531    ];
2532    /// Value as it appears on the wire.
2533    pub const fn as_str(&self) -> &'static str {
2534        match self {
2535            InstallCertificateUseEnum::V2GRootCertificate => "V2GRootCertificate",
2536            InstallCertificateUseEnum::MORootCertificate => "MORootCertificate",
2537            InstallCertificateUseEnum::CSMSRootCertificate => "CSMSRootCertificate",
2538            InstallCertificateUseEnum::ManufacturerRootCertificate => "ManufacturerRootCertificate",
2539        }
2540    }
2541}
2542
2543impl std::fmt::Display for InstallCertificateUseEnum {
2544    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2545        f.write_str(self.as_str())
2546    }
2547}
2548
2549impl std::str::FromStr for InstallCertificateUseEnum {
2550    type Err = ();
2551    fn from_str(s: &str) -> Result<Self, ()> {
2552        Self::ALL
2553            .iter()
2554            .copied()
2555            .find(|v| v.as_str() == s)
2556            .ok_or(())
2557    }
2558}
2559
2560impl Validate for InstallCertificateUseEnum {
2561    #[inline]
2562    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2563        Ok(())
2564    }
2565}
2566
2567/// Indicates whether the message was processed properly.
2568#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2569pub enum Iso15118EVCertificateStatusEnum {
2570    #[serde(rename = "Accepted")]
2571    Accepted,
2572    #[serde(rename = "Failed")]
2573    Failed,
2574}
2575
2576impl Iso15118EVCertificateStatusEnum {
2577    pub const ALL: &'static [Iso15118EVCertificateStatusEnum] = &[
2578        Iso15118EVCertificateStatusEnum::Accepted,
2579        Iso15118EVCertificateStatusEnum::Failed,
2580    ];
2581    /// Value as it appears on the wire.
2582    pub const fn as_str(&self) -> &'static str {
2583        match self {
2584            Iso15118EVCertificateStatusEnum::Accepted => "Accepted",
2585            Iso15118EVCertificateStatusEnum::Failed => "Failed",
2586        }
2587    }
2588}
2589
2590impl std::fmt::Display for Iso15118EVCertificateStatusEnum {
2591    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2592        f.write_str(self.as_str())
2593    }
2594}
2595
2596impl std::str::FromStr for Iso15118EVCertificateStatusEnum {
2597    type Err = ();
2598    fn from_str(s: &str) -> Result<Self, ()> {
2599        Self::ALL
2600            .iter()
2601            .copied()
2602            .find(|v| v.as_str() == s)
2603            .ok_or(())
2604    }
2605}
2606
2607impl Validate for Iso15118EVCertificateStatusEnum {
2608    #[inline]
2609    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2610        Ok(())
2611    }
2612}
2613
2614/// Sampled_ Value. Location. Location_ Code
2615/// Indicates where the measured value has been sampled. Default =  "Outlet"
2616#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2617pub enum LocationEnum {
2618    #[serde(rename = "Body")]
2619    Body,
2620    #[serde(rename = "Cable")]
2621    Cable,
2622    #[serde(rename = "EV")]
2623    EV,
2624    #[serde(rename = "Inlet")]
2625    Inlet,
2626    #[serde(rename = "Outlet")]
2627    Outlet,
2628}
2629
2630impl LocationEnum {
2631    pub const ALL: &'static [LocationEnum] = &[
2632        LocationEnum::Body,
2633        LocationEnum::Cable,
2634        LocationEnum::EV,
2635        LocationEnum::Inlet,
2636        LocationEnum::Outlet,
2637    ];
2638    /// Value as it appears on the wire.
2639    pub const fn as_str(&self) -> &'static str {
2640        match self {
2641            LocationEnum::Body => "Body",
2642            LocationEnum::Cable => "Cable",
2643            LocationEnum::EV => "EV",
2644            LocationEnum::Inlet => "Inlet",
2645            LocationEnum::Outlet => "Outlet",
2646        }
2647    }
2648}
2649
2650impl std::fmt::Display for LocationEnum {
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 LocationEnum {
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 LocationEnum {
2668    #[inline]
2669    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2670        Ok(())
2671    }
2672}
2673
2674/// This contains the type of log file that the Charging Station
2675/// should send.
2676#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2677pub enum LogEnum {
2678    #[serde(rename = "DiagnosticsLog")]
2679    DiagnosticsLog,
2680    #[serde(rename = "SecurityLog")]
2681    SecurityLog,
2682}
2683
2684impl LogEnum {
2685    pub const ALL: &'static [LogEnum] = &[LogEnum::DiagnosticsLog, LogEnum::SecurityLog];
2686    /// Value as it appears on the wire.
2687    pub const fn as_str(&self) -> &'static str {
2688        match self {
2689            LogEnum::DiagnosticsLog => "DiagnosticsLog",
2690            LogEnum::SecurityLog => "SecurityLog",
2691        }
2692    }
2693}
2694
2695impl std::fmt::Display for LogEnum {
2696    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2697        f.write_str(self.as_str())
2698    }
2699}
2700
2701impl std::str::FromStr for LogEnum {
2702    type Err = ();
2703    fn from_str(s: &str) -> Result<Self, ()> {
2704        Self::ALL
2705            .iter()
2706            .copied()
2707            .find(|v| v.as_str() == s)
2708            .ok_or(())
2709    }
2710}
2711
2712impl Validate for LogEnum {
2713    #[inline]
2714    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2715        Ok(())
2716    }
2717}
2718
2719/// This field indicates whether the Charging Station was able to accept the request.
2720#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2721pub enum LogStatusEnum {
2722    #[serde(rename = "Accepted")]
2723    Accepted,
2724    #[serde(rename = "Rejected")]
2725    Rejected,
2726    #[serde(rename = "AcceptedCanceled")]
2727    AcceptedCanceled,
2728}
2729
2730impl LogStatusEnum {
2731    pub const ALL: &'static [LogStatusEnum] = &[
2732        LogStatusEnum::Accepted,
2733        LogStatusEnum::Rejected,
2734        LogStatusEnum::AcceptedCanceled,
2735    ];
2736    /// Value as it appears on the wire.
2737    pub const fn as_str(&self) -> &'static str {
2738        match self {
2739            LogStatusEnum::Accepted => "Accepted",
2740            LogStatusEnum::Rejected => "Rejected",
2741            LogStatusEnum::AcceptedCanceled => "AcceptedCanceled",
2742        }
2743    }
2744}
2745
2746impl std::fmt::Display for LogStatusEnum {
2747    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2748        f.write_str(self.as_str())
2749    }
2750}
2751
2752impl std::str::FromStr for LogStatusEnum {
2753    type Err = ();
2754    fn from_str(s: &str) -> Result<Self, ()> {
2755        Self::ALL
2756            .iter()
2757            .copied()
2758            .find(|v| v.as_str() == s)
2759            .ok_or(())
2760    }
2761}
2762
2763impl Validate for LogStatusEnum {
2764    #[inline]
2765    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2766        Ok(())
2767    }
2768}
2769
2770/// Sampled_ Value. Measurand. Measurand_ Code
2771/// Type of measurement. Default = "Energy.Active.Import.Register"
2772#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2773pub enum MeasurandEnum {
2774    #[serde(rename = "Current.Export")]
2775    CurrentExport,
2776    #[serde(rename = "Current.Import")]
2777    CurrentImport,
2778    #[serde(rename = "Current.Offered")]
2779    CurrentOffered,
2780    #[serde(rename = "Energy.Active.Export.Register")]
2781    EnergyActiveExportRegister,
2782    #[serde(rename = "Energy.Active.Import.Register")]
2783    EnergyActiveImportRegister,
2784    #[serde(rename = "Energy.Reactive.Export.Register")]
2785    EnergyReactiveExportRegister,
2786    #[serde(rename = "Energy.Reactive.Import.Register")]
2787    EnergyReactiveImportRegister,
2788    #[serde(rename = "Energy.Active.Export.Interval")]
2789    EnergyActiveExportInterval,
2790    #[serde(rename = "Energy.Active.Import.Interval")]
2791    EnergyActiveImportInterval,
2792    #[serde(rename = "Energy.Active.Net")]
2793    EnergyActiveNet,
2794    #[serde(rename = "Energy.Reactive.Export.Interval")]
2795    EnergyReactiveExportInterval,
2796    #[serde(rename = "Energy.Reactive.Import.Interval")]
2797    EnergyReactiveImportInterval,
2798    #[serde(rename = "Energy.Reactive.Net")]
2799    EnergyReactiveNet,
2800    #[serde(rename = "Energy.Apparent.Net")]
2801    EnergyApparentNet,
2802    #[serde(rename = "Energy.Apparent.Import")]
2803    EnergyApparentImport,
2804    #[serde(rename = "Energy.Apparent.Export")]
2805    EnergyApparentExport,
2806    #[serde(rename = "Frequency")]
2807    Frequency,
2808    #[serde(rename = "Power.Active.Export")]
2809    PowerActiveExport,
2810    #[serde(rename = "Power.Active.Import")]
2811    PowerActiveImport,
2812    #[serde(rename = "Power.Factor")]
2813    PowerFactor,
2814    #[serde(rename = "Power.Offered")]
2815    PowerOffered,
2816    #[serde(rename = "Power.Reactive.Export")]
2817    PowerReactiveExport,
2818    #[serde(rename = "Power.Reactive.Import")]
2819    PowerReactiveImport,
2820    #[serde(rename = "SoC")]
2821    SoC,
2822    #[serde(rename = "Voltage")]
2823    Voltage,
2824}
2825
2826impl MeasurandEnum {
2827    pub const ALL: &'static [MeasurandEnum] = &[
2828        MeasurandEnum::CurrentExport,
2829        MeasurandEnum::CurrentImport,
2830        MeasurandEnum::CurrentOffered,
2831        MeasurandEnum::EnergyActiveExportRegister,
2832        MeasurandEnum::EnergyActiveImportRegister,
2833        MeasurandEnum::EnergyReactiveExportRegister,
2834        MeasurandEnum::EnergyReactiveImportRegister,
2835        MeasurandEnum::EnergyActiveExportInterval,
2836        MeasurandEnum::EnergyActiveImportInterval,
2837        MeasurandEnum::EnergyActiveNet,
2838        MeasurandEnum::EnergyReactiveExportInterval,
2839        MeasurandEnum::EnergyReactiveImportInterval,
2840        MeasurandEnum::EnergyReactiveNet,
2841        MeasurandEnum::EnergyApparentNet,
2842        MeasurandEnum::EnergyApparentImport,
2843        MeasurandEnum::EnergyApparentExport,
2844        MeasurandEnum::Frequency,
2845        MeasurandEnum::PowerActiveExport,
2846        MeasurandEnum::PowerActiveImport,
2847        MeasurandEnum::PowerFactor,
2848        MeasurandEnum::PowerOffered,
2849        MeasurandEnum::PowerReactiveExport,
2850        MeasurandEnum::PowerReactiveImport,
2851        MeasurandEnum::SoC,
2852        MeasurandEnum::Voltage,
2853    ];
2854    /// Value as it appears on the wire.
2855    pub const fn as_str(&self) -> &'static str {
2856        match self {
2857            MeasurandEnum::CurrentExport => "Current.Export",
2858            MeasurandEnum::CurrentImport => "Current.Import",
2859            MeasurandEnum::CurrentOffered => "Current.Offered",
2860            MeasurandEnum::EnergyActiveExportRegister => "Energy.Active.Export.Register",
2861            MeasurandEnum::EnergyActiveImportRegister => "Energy.Active.Import.Register",
2862            MeasurandEnum::EnergyReactiveExportRegister => "Energy.Reactive.Export.Register",
2863            MeasurandEnum::EnergyReactiveImportRegister => "Energy.Reactive.Import.Register",
2864            MeasurandEnum::EnergyActiveExportInterval => "Energy.Active.Export.Interval",
2865            MeasurandEnum::EnergyActiveImportInterval => "Energy.Active.Import.Interval",
2866            MeasurandEnum::EnergyActiveNet => "Energy.Active.Net",
2867            MeasurandEnum::EnergyReactiveExportInterval => "Energy.Reactive.Export.Interval",
2868            MeasurandEnum::EnergyReactiveImportInterval => "Energy.Reactive.Import.Interval",
2869            MeasurandEnum::EnergyReactiveNet => "Energy.Reactive.Net",
2870            MeasurandEnum::EnergyApparentNet => "Energy.Apparent.Net",
2871            MeasurandEnum::EnergyApparentImport => "Energy.Apparent.Import",
2872            MeasurandEnum::EnergyApparentExport => "Energy.Apparent.Export",
2873            MeasurandEnum::Frequency => "Frequency",
2874            MeasurandEnum::PowerActiveExport => "Power.Active.Export",
2875            MeasurandEnum::PowerActiveImport => "Power.Active.Import",
2876            MeasurandEnum::PowerFactor => "Power.Factor",
2877            MeasurandEnum::PowerOffered => "Power.Offered",
2878            MeasurandEnum::PowerReactiveExport => "Power.Reactive.Export",
2879            MeasurandEnum::PowerReactiveImport => "Power.Reactive.Import",
2880            MeasurandEnum::SoC => "SoC",
2881            MeasurandEnum::Voltage => "Voltage",
2882        }
2883    }
2884}
2885
2886impl std::fmt::Display for MeasurandEnum {
2887    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2888        f.write_str(self.as_str())
2889    }
2890}
2891
2892impl std::str::FromStr for MeasurandEnum {
2893    type Err = ();
2894    fn from_str(s: &str) -> Result<Self, ()> {
2895        Self::ALL
2896            .iter()
2897            .copied()
2898            .find(|v| v.as_str() == s)
2899            .ok_or(())
2900    }
2901}
2902
2903impl Validate for MeasurandEnum {
2904    #[inline]
2905    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2906        Ok(())
2907    }
2908}
2909
2910/// Message_ Content. Format. Message_ Format_ Code
2911/// Format of the message.
2912#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2913pub enum MessageFormatEnum {
2914    #[serde(rename = "ASCII")]
2915    ASCII,
2916    #[serde(rename = "HTML")]
2917    HTML,
2918    #[serde(rename = "URI")]
2919    URI,
2920    #[serde(rename = "UTF8")]
2921    UTF8,
2922}
2923
2924impl MessageFormatEnum {
2925    pub const ALL: &'static [MessageFormatEnum] = &[
2926        MessageFormatEnum::ASCII,
2927        MessageFormatEnum::HTML,
2928        MessageFormatEnum::URI,
2929        MessageFormatEnum::UTF8,
2930    ];
2931    /// Value as it appears on the wire.
2932    pub const fn as_str(&self) -> &'static str {
2933        match self {
2934            MessageFormatEnum::ASCII => "ASCII",
2935            MessageFormatEnum::HTML => "HTML",
2936            MessageFormatEnum::URI => "URI",
2937            MessageFormatEnum::UTF8 => "UTF8",
2938        }
2939    }
2940}
2941
2942impl std::fmt::Display for MessageFormatEnum {
2943    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2944        f.write_str(self.as_str())
2945    }
2946}
2947
2948impl std::str::FromStr for MessageFormatEnum {
2949    type Err = ();
2950    fn from_str(s: &str) -> Result<Self, ()> {
2951        Self::ALL
2952            .iter()
2953            .copied()
2954            .find(|v| v.as_str() == s)
2955            .ok_or(())
2956    }
2957}
2958
2959impl Validate for MessageFormatEnum {
2960    #[inline]
2961    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
2962        Ok(())
2963    }
2964}
2965
2966/// If provided the Charging Station shall return Display Messages with the given priority only.
2967#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
2968pub enum MessagePriorityEnum {
2969    #[serde(rename = "AlwaysFront")]
2970    AlwaysFront,
2971    #[serde(rename = "InFront")]
2972    InFront,
2973    #[serde(rename = "NormalCycle")]
2974    NormalCycle,
2975}
2976
2977impl MessagePriorityEnum {
2978    pub const ALL: &'static [MessagePriorityEnum] = &[
2979        MessagePriorityEnum::AlwaysFront,
2980        MessagePriorityEnum::InFront,
2981        MessagePriorityEnum::NormalCycle,
2982    ];
2983    /// Value as it appears on the wire.
2984    pub const fn as_str(&self) -> &'static str {
2985        match self {
2986            MessagePriorityEnum::AlwaysFront => "AlwaysFront",
2987            MessagePriorityEnum::InFront => "InFront",
2988            MessagePriorityEnum::NormalCycle => "NormalCycle",
2989        }
2990    }
2991}
2992
2993impl std::fmt::Display for MessagePriorityEnum {
2994    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2995        f.write_str(self.as_str())
2996    }
2997}
2998
2999impl std::str::FromStr for MessagePriorityEnum {
3000    type Err = ();
3001    fn from_str(s: &str) -> Result<Self, ()> {
3002        Self::ALL
3003            .iter()
3004            .copied()
3005            .find(|v| v.as_str() == s)
3006            .ok_or(())
3007    }
3008}
3009
3010impl Validate for MessagePriorityEnum {
3011    #[inline]
3012    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3013        Ok(())
3014    }
3015}
3016
3017/// If provided the Charging Station shall return Display Messages with the given state only.
3018#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3019pub enum MessageStateEnum {
3020    #[serde(rename = "Charging")]
3021    Charging,
3022    #[serde(rename = "Faulted")]
3023    Faulted,
3024    #[serde(rename = "Idle")]
3025    Idle,
3026    #[serde(rename = "Unavailable")]
3027    Unavailable,
3028}
3029
3030impl MessageStateEnum {
3031    pub const ALL: &'static [MessageStateEnum] = &[
3032        MessageStateEnum::Charging,
3033        MessageStateEnum::Faulted,
3034        MessageStateEnum::Idle,
3035        MessageStateEnum::Unavailable,
3036    ];
3037    /// Value as it appears on the wire.
3038    pub const fn as_str(&self) -> &'static str {
3039        match self {
3040            MessageStateEnum::Charging => "Charging",
3041            MessageStateEnum::Faulted => "Faulted",
3042            MessageStateEnum::Idle => "Idle",
3043            MessageStateEnum::Unavailable => "Unavailable",
3044        }
3045    }
3046}
3047
3048impl std::fmt::Display for MessageStateEnum {
3049    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3050        f.write_str(self.as_str())
3051    }
3052}
3053
3054impl std::str::FromStr for MessageStateEnum {
3055    type Err = ();
3056    fn from_str(s: &str) -> Result<Self, ()> {
3057        Self::ALL
3058            .iter()
3059            .copied()
3060            .find(|v| v.as_str() == s)
3061            .ok_or(())
3062    }
3063}
3064
3065impl Validate for MessageStateEnum {
3066    #[inline]
3067    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3068        Ok(())
3069    }
3070}
3071
3072/// Type of message to be triggered.
3073#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3074pub enum MessageTriggerEnum {
3075    #[serde(rename = "BootNotification")]
3076    BootNotification,
3077    #[serde(rename = "LogStatusNotification")]
3078    LogStatusNotification,
3079    #[serde(rename = "FirmwareStatusNotification")]
3080    FirmwareStatusNotification,
3081    #[serde(rename = "Heartbeat")]
3082    Heartbeat,
3083    #[serde(rename = "MeterValues")]
3084    MeterValues,
3085    #[serde(rename = "SignChargingStationCertificate")]
3086    SignChargingStationCertificate,
3087    #[serde(rename = "SignV2GCertificate")]
3088    SignV2GCertificate,
3089    #[serde(rename = "StatusNotification")]
3090    StatusNotification,
3091    #[serde(rename = "TransactionEvent")]
3092    TransactionEvent,
3093    #[serde(rename = "SignCombinedCertificate")]
3094    SignCombinedCertificate,
3095    #[serde(rename = "PublishFirmwareStatusNotification")]
3096    PublishFirmwareStatusNotification,
3097}
3098
3099impl MessageTriggerEnum {
3100    pub const ALL: &'static [MessageTriggerEnum] = &[
3101        MessageTriggerEnum::BootNotification,
3102        MessageTriggerEnum::LogStatusNotification,
3103        MessageTriggerEnum::FirmwareStatusNotification,
3104        MessageTriggerEnum::Heartbeat,
3105        MessageTriggerEnum::MeterValues,
3106        MessageTriggerEnum::SignChargingStationCertificate,
3107        MessageTriggerEnum::SignV2GCertificate,
3108        MessageTriggerEnum::StatusNotification,
3109        MessageTriggerEnum::TransactionEvent,
3110        MessageTriggerEnum::SignCombinedCertificate,
3111        MessageTriggerEnum::PublishFirmwareStatusNotification,
3112    ];
3113    /// Value as it appears on the wire.
3114    pub const fn as_str(&self) -> &'static str {
3115        match self {
3116            MessageTriggerEnum::BootNotification => "BootNotification",
3117            MessageTriggerEnum::LogStatusNotification => "LogStatusNotification",
3118            MessageTriggerEnum::FirmwareStatusNotification => "FirmwareStatusNotification",
3119            MessageTriggerEnum::Heartbeat => "Heartbeat",
3120            MessageTriggerEnum::MeterValues => "MeterValues",
3121            MessageTriggerEnum::SignChargingStationCertificate => "SignChargingStationCertificate",
3122            MessageTriggerEnum::SignV2GCertificate => "SignV2GCertificate",
3123            MessageTriggerEnum::StatusNotification => "StatusNotification",
3124            MessageTriggerEnum::TransactionEvent => "TransactionEvent",
3125            MessageTriggerEnum::SignCombinedCertificate => "SignCombinedCertificate",
3126            MessageTriggerEnum::PublishFirmwareStatusNotification => {
3127                "PublishFirmwareStatusNotification"
3128            }
3129        }
3130    }
3131}
3132
3133impl std::fmt::Display for MessageTriggerEnum {
3134    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3135        f.write_str(self.as_str())
3136    }
3137}
3138
3139impl std::str::FromStr for MessageTriggerEnum {
3140    type Err = ();
3141    fn from_str(s: &str) -> Result<Self, ()> {
3142        Self::ALL
3143            .iter()
3144            .copied()
3145            .find(|v| v.as_str() == s)
3146            .ok_or(())
3147    }
3148}
3149
3150impl Validate for MessageTriggerEnum {
3151    #[inline]
3152    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3153        Ok(())
3154    }
3155}
3156
3157/// The type of this monitor, e.g. a threshold, delta or periodic monitor.
3158#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3159pub enum MonitorEnum {
3160    #[serde(rename = "UpperThreshold")]
3161    UpperThreshold,
3162    #[serde(rename = "LowerThreshold")]
3163    LowerThreshold,
3164    #[serde(rename = "Delta")]
3165    Delta,
3166    #[serde(rename = "Periodic")]
3167    Periodic,
3168    #[serde(rename = "PeriodicClockAligned")]
3169    PeriodicClockAligned,
3170}
3171
3172impl MonitorEnum {
3173    pub const ALL: &'static [MonitorEnum] = &[
3174        MonitorEnum::UpperThreshold,
3175        MonitorEnum::LowerThreshold,
3176        MonitorEnum::Delta,
3177        MonitorEnum::Periodic,
3178        MonitorEnum::PeriodicClockAligned,
3179    ];
3180    /// Value as it appears on the wire.
3181    pub const fn as_str(&self) -> &'static str {
3182        match self {
3183            MonitorEnum::UpperThreshold => "UpperThreshold",
3184            MonitorEnum::LowerThreshold => "LowerThreshold",
3185            MonitorEnum::Delta => "Delta",
3186            MonitorEnum::Periodic => "Periodic",
3187            MonitorEnum::PeriodicClockAligned => "PeriodicClockAligned",
3188        }
3189    }
3190}
3191
3192impl std::fmt::Display for MonitorEnum {
3193    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3194        f.write_str(self.as_str())
3195    }
3196}
3197
3198impl std::str::FromStr for MonitorEnum {
3199    type Err = ();
3200    fn from_str(s: &str) -> Result<Self, ()> {
3201        Self::ALL
3202            .iter()
3203            .copied()
3204            .find(|v| v.as_str() == s)
3205            .ok_or(())
3206    }
3207}
3208
3209impl Validate for MonitorEnum {
3210    #[inline]
3211    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3212        Ok(())
3213    }
3214}
3215
3216/// Specify which monitoring base will be set
3217#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3218pub enum MonitoringBaseEnum {
3219    #[serde(rename = "All")]
3220    All,
3221    #[serde(rename = "FactoryDefault")]
3222    FactoryDefault,
3223    #[serde(rename = "HardWiredOnly")]
3224    HardWiredOnly,
3225}
3226
3227impl MonitoringBaseEnum {
3228    pub const ALL: &'static [MonitoringBaseEnum] = &[
3229        MonitoringBaseEnum::All,
3230        MonitoringBaseEnum::FactoryDefault,
3231        MonitoringBaseEnum::HardWiredOnly,
3232    ];
3233    /// Value as it appears on the wire.
3234    pub const fn as_str(&self) -> &'static str {
3235        match self {
3236            MonitoringBaseEnum::All => "All",
3237            MonitoringBaseEnum::FactoryDefault => "FactoryDefault",
3238            MonitoringBaseEnum::HardWiredOnly => "HardWiredOnly",
3239        }
3240    }
3241}
3242
3243impl std::fmt::Display for MonitoringBaseEnum {
3244    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3245        f.write_str(self.as_str())
3246    }
3247}
3248
3249impl std::str::FromStr for MonitoringBaseEnum {
3250    type Err = ();
3251    fn from_str(s: &str) -> Result<Self, ()> {
3252        Self::ALL
3253            .iter()
3254            .copied()
3255            .find(|v| v.as_str() == s)
3256            .ok_or(())
3257    }
3258}
3259
3260impl Validate for MonitoringBaseEnum {
3261    #[inline]
3262    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3263        Ok(())
3264    }
3265}
3266
3267#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3268pub enum MonitoringCriterionEnum {
3269    #[serde(rename = "ThresholdMonitoring")]
3270    ThresholdMonitoring,
3271    #[serde(rename = "DeltaMonitoring")]
3272    DeltaMonitoring,
3273    #[serde(rename = "PeriodicMonitoring")]
3274    PeriodicMonitoring,
3275}
3276
3277impl MonitoringCriterionEnum {
3278    pub const ALL: &'static [MonitoringCriterionEnum] = &[
3279        MonitoringCriterionEnum::ThresholdMonitoring,
3280        MonitoringCriterionEnum::DeltaMonitoring,
3281        MonitoringCriterionEnum::PeriodicMonitoring,
3282    ];
3283    /// Value as it appears on the wire.
3284    pub const fn as_str(&self) -> &'static str {
3285        match self {
3286            MonitoringCriterionEnum::ThresholdMonitoring => "ThresholdMonitoring",
3287            MonitoringCriterionEnum::DeltaMonitoring => "DeltaMonitoring",
3288            MonitoringCriterionEnum::PeriodicMonitoring => "PeriodicMonitoring",
3289        }
3290    }
3291}
3292
3293impl std::fmt::Display for MonitoringCriterionEnum {
3294    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3295        f.write_str(self.as_str())
3296    }
3297}
3298
3299impl std::str::FromStr for MonitoringCriterionEnum {
3300    type Err = ();
3301    fn from_str(s: &str) -> Result<Self, ()> {
3302        Self::ALL
3303            .iter()
3304            .copied()
3305            .find(|v| v.as_str() == s)
3306            .ok_or(())
3307    }
3308}
3309
3310impl Validate for MonitoringCriterionEnum {
3311    #[inline]
3312    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3313        Ok(())
3314    }
3315}
3316
3317/// Defines the mutability of this attribute. Default is ReadWrite when omitted.
3318#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3319pub enum MutabilityEnum {
3320    #[serde(rename = "ReadOnly")]
3321    ReadOnly,
3322    #[serde(rename = "WriteOnly")]
3323    WriteOnly,
3324    #[serde(rename = "ReadWrite")]
3325    ReadWrite,
3326}
3327
3328impl MutabilityEnum {
3329    pub const ALL: &'static [MutabilityEnum] = &[
3330        MutabilityEnum::ReadOnly,
3331        MutabilityEnum::WriteOnly,
3332        MutabilityEnum::ReadWrite,
3333    ];
3334    /// Value as it appears on the wire.
3335    pub const fn as_str(&self) -> &'static str {
3336        match self {
3337            MutabilityEnum::ReadOnly => "ReadOnly",
3338            MutabilityEnum::WriteOnly => "WriteOnly",
3339            MutabilityEnum::ReadWrite => "ReadWrite",
3340        }
3341    }
3342}
3343
3344impl std::fmt::Display for MutabilityEnum {
3345    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3346        f.write_str(self.as_str())
3347    }
3348}
3349
3350impl std::str::FromStr for MutabilityEnum {
3351    type Err = ();
3352    fn from_str(s: &str) -> Result<Self, ()> {
3353        Self::ALL
3354            .iter()
3355            .copied()
3356            .find(|v| v.as_str() == s)
3357            .ok_or(())
3358    }
3359}
3360
3361impl Validate for MutabilityEnum {
3362    #[inline]
3363    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3364        Ok(())
3365    }
3366}
3367
3368/// 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.
3369#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3370pub enum NotifyEVChargingNeedsStatusEnum {
3371    #[serde(rename = "Accepted")]
3372    Accepted,
3373    #[serde(rename = "Rejected")]
3374    Rejected,
3375    #[serde(rename = "Processing")]
3376    Processing,
3377}
3378
3379impl NotifyEVChargingNeedsStatusEnum {
3380    pub const ALL: &'static [NotifyEVChargingNeedsStatusEnum] = &[
3381        NotifyEVChargingNeedsStatusEnum::Accepted,
3382        NotifyEVChargingNeedsStatusEnum::Rejected,
3383        NotifyEVChargingNeedsStatusEnum::Processing,
3384    ];
3385    /// Value as it appears on the wire.
3386    pub const fn as_str(&self) -> &'static str {
3387        match self {
3388            NotifyEVChargingNeedsStatusEnum::Accepted => "Accepted",
3389            NotifyEVChargingNeedsStatusEnum::Rejected => "Rejected",
3390            NotifyEVChargingNeedsStatusEnum::Processing => "Processing",
3391        }
3392    }
3393}
3394
3395impl std::fmt::Display for NotifyEVChargingNeedsStatusEnum {
3396    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3397        f.write_str(self.as_str())
3398    }
3399}
3400
3401impl std::str::FromStr for NotifyEVChargingNeedsStatusEnum {
3402    type Err = ();
3403    fn from_str(s: &str) -> Result<Self, ()> {
3404        Self::ALL
3405            .iter()
3406            .copied()
3407            .find(|v| v.as_str() == s)
3408            .ok_or(())
3409    }
3410}
3411
3412impl Validate for NotifyEVChargingNeedsStatusEnum {
3413    #[inline]
3414    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3415        Ok(())
3416    }
3417}
3418
3419/// Applicable Network Interface.
3420#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3421pub enum OCPPInterfaceEnum {
3422    #[serde(rename = "Wired0")]
3423    Wired0,
3424    #[serde(rename = "Wired1")]
3425    Wired1,
3426    #[serde(rename = "Wired2")]
3427    Wired2,
3428    #[serde(rename = "Wired3")]
3429    Wired3,
3430    #[serde(rename = "Wireless0")]
3431    Wireless0,
3432    #[serde(rename = "Wireless1")]
3433    Wireless1,
3434    #[serde(rename = "Wireless2")]
3435    Wireless2,
3436    #[serde(rename = "Wireless3")]
3437    Wireless3,
3438}
3439
3440impl OCPPInterfaceEnum {
3441    pub const ALL: &'static [OCPPInterfaceEnum] = &[
3442        OCPPInterfaceEnum::Wired0,
3443        OCPPInterfaceEnum::Wired1,
3444        OCPPInterfaceEnum::Wired2,
3445        OCPPInterfaceEnum::Wired3,
3446        OCPPInterfaceEnum::Wireless0,
3447        OCPPInterfaceEnum::Wireless1,
3448        OCPPInterfaceEnum::Wireless2,
3449        OCPPInterfaceEnum::Wireless3,
3450    ];
3451    /// Value as it appears on the wire.
3452    pub const fn as_str(&self) -> &'static str {
3453        match self {
3454            OCPPInterfaceEnum::Wired0 => "Wired0",
3455            OCPPInterfaceEnum::Wired1 => "Wired1",
3456            OCPPInterfaceEnum::Wired2 => "Wired2",
3457            OCPPInterfaceEnum::Wired3 => "Wired3",
3458            OCPPInterfaceEnum::Wireless0 => "Wireless0",
3459            OCPPInterfaceEnum::Wireless1 => "Wireless1",
3460            OCPPInterfaceEnum::Wireless2 => "Wireless2",
3461            OCPPInterfaceEnum::Wireless3 => "Wireless3",
3462        }
3463    }
3464}
3465
3466impl std::fmt::Display for OCPPInterfaceEnum {
3467    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3468        f.write_str(self.as_str())
3469    }
3470}
3471
3472impl std::str::FromStr for OCPPInterfaceEnum {
3473    type Err = ();
3474    fn from_str(s: &str) -> Result<Self, ()> {
3475        Self::ALL
3476            .iter()
3477            .copied()
3478            .find(|v| v.as_str() == s)
3479            .ok_or(())
3480    }
3481}
3482
3483impl Validate for OCPPInterfaceEnum {
3484    #[inline]
3485    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3486        Ok(())
3487    }
3488}
3489
3490/// Communication_ Function. OCPP_ Transport. OCPP_ Transport_ Code
3491/// Defines the transport protocol (e.g. SOAP or JSON). Note: SOAP is not supported in OCPP 2.0, but is supported by other versions of OCPP.
3492#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3493pub enum OCPPTransportEnum {
3494    #[serde(rename = "JSON")]
3495    JSON,
3496    #[serde(rename = "SOAP")]
3497    SOAP,
3498}
3499
3500impl OCPPTransportEnum {
3501    pub const ALL: &'static [OCPPTransportEnum] =
3502        &[OCPPTransportEnum::JSON, OCPPTransportEnum::SOAP];
3503    /// Value as it appears on the wire.
3504    pub const fn as_str(&self) -> &'static str {
3505        match self {
3506            OCPPTransportEnum::JSON => "JSON",
3507            OCPPTransportEnum::SOAP => "SOAP",
3508        }
3509    }
3510}
3511
3512impl std::fmt::Display for OCPPTransportEnum {
3513    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3514        f.write_str(self.as_str())
3515    }
3516}
3517
3518impl std::str::FromStr for OCPPTransportEnum {
3519    type Err = ();
3520    fn from_str(s: &str) -> Result<Self, ()> {
3521        Self::ALL
3522            .iter()
3523            .copied()
3524            .find(|v| v.as_str() == s)
3525            .ok_or(())
3526    }
3527}
3528
3529impl Validate for OCPPTransportEnum {
3530    #[inline]
3531    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3532        Ok(())
3533    }
3534}
3535
3536/// Communication_ Function. OCPP_ Version. OCPP_ Version_ Code
3537/// Defines the OCPP version used for this communication function.
3538#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3539pub enum OCPPVersionEnum {
3540    #[serde(rename = "OCPP12")]
3541    OCPP12,
3542    #[serde(rename = "OCPP15")]
3543    OCPP15,
3544    #[serde(rename = "OCPP16")]
3545    OCPP16,
3546    #[serde(rename = "OCPP20")]
3547    OCPP20,
3548}
3549
3550impl OCPPVersionEnum {
3551    pub const ALL: &'static [OCPPVersionEnum] = &[
3552        OCPPVersionEnum::OCPP12,
3553        OCPPVersionEnum::OCPP15,
3554        OCPPVersionEnum::OCPP16,
3555        OCPPVersionEnum::OCPP20,
3556    ];
3557    /// Value as it appears on the wire.
3558    pub const fn as_str(&self) -> &'static str {
3559        match self {
3560            OCPPVersionEnum::OCPP12 => "OCPP12",
3561            OCPPVersionEnum::OCPP15 => "OCPP15",
3562            OCPPVersionEnum::OCPP16 => "OCPP16",
3563            OCPPVersionEnum::OCPP20 => "OCPP20",
3564        }
3565    }
3566}
3567
3568impl std::fmt::Display for OCPPVersionEnum {
3569    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3570        f.write_str(self.as_str())
3571    }
3572}
3573
3574impl std::str::FromStr for OCPPVersionEnum {
3575    type Err = ();
3576    fn from_str(s: &str) -> Result<Self, ()> {
3577        Self::ALL
3578            .iter()
3579            .copied()
3580            .find(|v| v.as_str() == s)
3581            .ok_or(())
3582    }
3583}
3584
3585impl Validate for OCPPVersionEnum {
3586    #[inline]
3587    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3588        Ok(())
3589    }
3590}
3591
3592/// This contains the type of availability change that the Charging Station should perform.
3593#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3594pub enum OperationalStatusEnum {
3595    #[serde(rename = "Inoperative")]
3596    Inoperative,
3597    #[serde(rename = "Operative")]
3598    Operative,
3599}
3600
3601impl OperationalStatusEnum {
3602    pub const ALL: &'static [OperationalStatusEnum] = &[
3603        OperationalStatusEnum::Inoperative,
3604        OperationalStatusEnum::Operative,
3605    ];
3606    /// Value as it appears on the wire.
3607    pub const fn as_str(&self) -> &'static str {
3608        match self {
3609            OperationalStatusEnum::Inoperative => "Inoperative",
3610            OperationalStatusEnum::Operative => "Operative",
3611        }
3612    }
3613}
3614
3615impl std::fmt::Display for OperationalStatusEnum {
3616    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3617        f.write_str(self.as_str())
3618    }
3619}
3620
3621impl std::str::FromStr for OperationalStatusEnum {
3622    type Err = ();
3623    fn from_str(s: &str) -> Result<Self, ()> {
3624        Self::ALL
3625            .iter()
3626            .copied()
3627            .find(|v| v.as_str() == s)
3628            .ok_or(())
3629    }
3630}
3631
3632impl Validate for OperationalStatusEnum {
3633    #[inline]
3634    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3635        Ok(())
3636    }
3637}
3638
3639/// Sampled_ Value. Phase. Phase_ Code
3640/// 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.
3641#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3642pub enum PhaseEnum {
3643    #[serde(rename = "L1")]
3644    L1,
3645    #[serde(rename = "L2")]
3646    L2,
3647    #[serde(rename = "L3")]
3648    L3,
3649    #[serde(rename = "N")]
3650    N,
3651    #[serde(rename = "L1-N")]
3652    L1N,
3653    #[serde(rename = "L2-N")]
3654    L2N,
3655    #[serde(rename = "L3-N")]
3656    L3N,
3657    #[serde(rename = "L1-L2")]
3658    L1L2,
3659    #[serde(rename = "L2-L3")]
3660    L2L3,
3661    #[serde(rename = "L3-L1")]
3662    L3L1,
3663}
3664
3665impl PhaseEnum {
3666    pub const ALL: &'static [PhaseEnum] = &[
3667        PhaseEnum::L1,
3668        PhaseEnum::L2,
3669        PhaseEnum::L3,
3670        PhaseEnum::N,
3671        PhaseEnum::L1N,
3672        PhaseEnum::L2N,
3673        PhaseEnum::L3N,
3674        PhaseEnum::L1L2,
3675        PhaseEnum::L2L3,
3676        PhaseEnum::L3L1,
3677    ];
3678    /// Value as it appears on the wire.
3679    pub const fn as_str(&self) -> &'static str {
3680        match self {
3681            PhaseEnum::L1 => "L1",
3682            PhaseEnum::L2 => "L2",
3683            PhaseEnum::L3 => "L3",
3684            PhaseEnum::N => "N",
3685            PhaseEnum::L1N => "L1-N",
3686            PhaseEnum::L2N => "L2-N",
3687            PhaseEnum::L3N => "L3-N",
3688            PhaseEnum::L1L2 => "L1-L2",
3689            PhaseEnum::L2L3 => "L2-L3",
3690            PhaseEnum::L3L1 => "L3-L1",
3691        }
3692    }
3693}
3694
3695impl std::fmt::Display for PhaseEnum {
3696    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3697        f.write_str(self.as_str())
3698    }
3699}
3700
3701impl std::str::FromStr for PhaseEnum {
3702    type Err = ();
3703    fn from_str(s: &str) -> Result<Self, ()> {
3704        Self::ALL
3705            .iter()
3706            .copied()
3707            .find(|v| v.as_str() == s)
3708            .ok_or(())
3709    }
3710}
3711
3712impl Validate for PhaseEnum {
3713    #[inline]
3714    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3715        Ok(())
3716    }
3717}
3718
3719/// This contains the progress status of the publishfirmware
3720/// installation.
3721#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3722pub enum PublishFirmwareStatusEnum {
3723    #[serde(rename = "Idle")]
3724    Idle,
3725    #[serde(rename = "DownloadScheduled")]
3726    DownloadScheduled,
3727    #[serde(rename = "Downloading")]
3728    Downloading,
3729    #[serde(rename = "Downloaded")]
3730    Downloaded,
3731    #[serde(rename = "Published")]
3732    Published,
3733    #[serde(rename = "DownloadFailed")]
3734    DownloadFailed,
3735    #[serde(rename = "DownloadPaused")]
3736    DownloadPaused,
3737    #[serde(rename = "InvalidChecksum")]
3738    InvalidChecksum,
3739    #[serde(rename = "ChecksumVerified")]
3740    ChecksumVerified,
3741    #[serde(rename = "PublishFailed")]
3742    PublishFailed,
3743}
3744
3745impl PublishFirmwareStatusEnum {
3746    pub const ALL: &'static [PublishFirmwareStatusEnum] = &[
3747        PublishFirmwareStatusEnum::Idle,
3748        PublishFirmwareStatusEnum::DownloadScheduled,
3749        PublishFirmwareStatusEnum::Downloading,
3750        PublishFirmwareStatusEnum::Downloaded,
3751        PublishFirmwareStatusEnum::Published,
3752        PublishFirmwareStatusEnum::DownloadFailed,
3753        PublishFirmwareStatusEnum::DownloadPaused,
3754        PublishFirmwareStatusEnum::InvalidChecksum,
3755        PublishFirmwareStatusEnum::ChecksumVerified,
3756        PublishFirmwareStatusEnum::PublishFailed,
3757    ];
3758    /// Value as it appears on the wire.
3759    pub const fn as_str(&self) -> &'static str {
3760        match self {
3761            PublishFirmwareStatusEnum::Idle => "Idle",
3762            PublishFirmwareStatusEnum::DownloadScheduled => "DownloadScheduled",
3763            PublishFirmwareStatusEnum::Downloading => "Downloading",
3764            PublishFirmwareStatusEnum::Downloaded => "Downloaded",
3765            PublishFirmwareStatusEnum::Published => "Published",
3766            PublishFirmwareStatusEnum::DownloadFailed => "DownloadFailed",
3767            PublishFirmwareStatusEnum::DownloadPaused => "DownloadPaused",
3768            PublishFirmwareStatusEnum::InvalidChecksum => "InvalidChecksum",
3769            PublishFirmwareStatusEnum::ChecksumVerified => "ChecksumVerified",
3770            PublishFirmwareStatusEnum::PublishFailed => "PublishFailed",
3771        }
3772    }
3773}
3774
3775impl std::fmt::Display for PublishFirmwareStatusEnum {
3776    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3777        f.write_str(self.as_str())
3778    }
3779}
3780
3781impl std::str::FromStr for PublishFirmwareStatusEnum {
3782    type Err = ();
3783    fn from_str(s: &str) -> Result<Self, ()> {
3784        Self::ALL
3785            .iter()
3786            .copied()
3787            .find(|v| v.as_str() == s)
3788            .ok_or(())
3789    }
3790}
3791
3792impl Validate for PublishFirmwareStatusEnum {
3793    #[inline]
3794    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3795        Ok(())
3796    }
3797}
3798
3799/// Sampled_ Value. Context. Reading_ Context_ Code
3800/// Type of detail value: start, end or sample. Default = "Sample.Periodic"
3801#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3802pub enum ReadingContextEnum {
3803    #[serde(rename = "Interruption.Begin")]
3804    InterruptionBegin,
3805    #[serde(rename = "Interruption.End")]
3806    InterruptionEnd,
3807    #[serde(rename = "Other")]
3808    Other,
3809    #[serde(rename = "Sample.Clock")]
3810    SampleClock,
3811    #[serde(rename = "Sample.Periodic")]
3812    SamplePeriodic,
3813    #[serde(rename = "Transaction.Begin")]
3814    TransactionBegin,
3815    #[serde(rename = "Transaction.End")]
3816    TransactionEnd,
3817    #[serde(rename = "Trigger")]
3818    Trigger,
3819}
3820
3821impl ReadingContextEnum {
3822    pub const ALL: &'static [ReadingContextEnum] = &[
3823        ReadingContextEnum::InterruptionBegin,
3824        ReadingContextEnum::InterruptionEnd,
3825        ReadingContextEnum::Other,
3826        ReadingContextEnum::SampleClock,
3827        ReadingContextEnum::SamplePeriodic,
3828        ReadingContextEnum::TransactionBegin,
3829        ReadingContextEnum::TransactionEnd,
3830        ReadingContextEnum::Trigger,
3831    ];
3832    /// Value as it appears on the wire.
3833    pub const fn as_str(&self) -> &'static str {
3834        match self {
3835            ReadingContextEnum::InterruptionBegin => "Interruption.Begin",
3836            ReadingContextEnum::InterruptionEnd => "Interruption.End",
3837            ReadingContextEnum::Other => "Other",
3838            ReadingContextEnum::SampleClock => "Sample.Clock",
3839            ReadingContextEnum::SamplePeriodic => "Sample.Periodic",
3840            ReadingContextEnum::TransactionBegin => "Transaction.Begin",
3841            ReadingContextEnum::TransactionEnd => "Transaction.End",
3842            ReadingContextEnum::Trigger => "Trigger",
3843        }
3844    }
3845}
3846
3847impl std::fmt::Display for ReadingContextEnum {
3848    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3849        f.write_str(self.as_str())
3850    }
3851}
3852
3853impl std::str::FromStr for ReadingContextEnum {
3854    type Err = ();
3855    fn from_str(s: &str) -> Result<Self, ()> {
3856        Self::ALL
3857            .iter()
3858            .copied()
3859            .find(|v| v.as_str() == s)
3860            .ok_or(())
3861    }
3862}
3863
3864impl Validate for ReadingContextEnum {
3865    #[inline]
3866    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3867        Ok(())
3868    }
3869}
3870
3871/// Transaction. Stopped_ Reason. EOT_ Reason_ Code
3872/// This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local".
3873#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3874pub enum ReasonEnum {
3875    #[serde(rename = "DeAuthorized")]
3876    DeAuthorized,
3877    #[serde(rename = "EmergencyStop")]
3878    EmergencyStop,
3879    #[serde(rename = "EnergyLimitReached")]
3880    EnergyLimitReached,
3881    #[serde(rename = "EVDisconnected")]
3882    EVDisconnected,
3883    #[serde(rename = "GroundFault")]
3884    GroundFault,
3885    #[serde(rename = "ImmediateReset")]
3886    ImmediateReset,
3887    #[serde(rename = "Local")]
3888    Local,
3889    #[serde(rename = "LocalOutOfCredit")]
3890    LocalOutOfCredit,
3891    #[serde(rename = "MasterPass")]
3892    MasterPass,
3893    #[serde(rename = "Other")]
3894    Other,
3895    #[serde(rename = "OvercurrentFault")]
3896    OvercurrentFault,
3897    #[serde(rename = "PowerLoss")]
3898    PowerLoss,
3899    #[serde(rename = "PowerQuality")]
3900    PowerQuality,
3901    #[serde(rename = "Reboot")]
3902    Reboot,
3903    #[serde(rename = "Remote")]
3904    Remote,
3905    #[serde(rename = "SOCLimitReached")]
3906    SOCLimitReached,
3907    #[serde(rename = "StoppedByEV")]
3908    StoppedByEV,
3909    #[serde(rename = "TimeLimitReached")]
3910    TimeLimitReached,
3911    #[serde(rename = "Timeout")]
3912    Timeout,
3913}
3914
3915impl ReasonEnum {
3916    pub const ALL: &'static [ReasonEnum] = &[
3917        ReasonEnum::DeAuthorized,
3918        ReasonEnum::EmergencyStop,
3919        ReasonEnum::EnergyLimitReached,
3920        ReasonEnum::EVDisconnected,
3921        ReasonEnum::GroundFault,
3922        ReasonEnum::ImmediateReset,
3923        ReasonEnum::Local,
3924        ReasonEnum::LocalOutOfCredit,
3925        ReasonEnum::MasterPass,
3926        ReasonEnum::Other,
3927        ReasonEnum::OvercurrentFault,
3928        ReasonEnum::PowerLoss,
3929        ReasonEnum::PowerQuality,
3930        ReasonEnum::Reboot,
3931        ReasonEnum::Remote,
3932        ReasonEnum::SOCLimitReached,
3933        ReasonEnum::StoppedByEV,
3934        ReasonEnum::TimeLimitReached,
3935        ReasonEnum::Timeout,
3936    ];
3937    /// Value as it appears on the wire.
3938    pub const fn as_str(&self) -> &'static str {
3939        match self {
3940            ReasonEnum::DeAuthorized => "DeAuthorized",
3941            ReasonEnum::EmergencyStop => "EmergencyStop",
3942            ReasonEnum::EnergyLimitReached => "EnergyLimitReached",
3943            ReasonEnum::EVDisconnected => "EVDisconnected",
3944            ReasonEnum::GroundFault => "GroundFault",
3945            ReasonEnum::ImmediateReset => "ImmediateReset",
3946            ReasonEnum::Local => "Local",
3947            ReasonEnum::LocalOutOfCredit => "LocalOutOfCredit",
3948            ReasonEnum::MasterPass => "MasterPass",
3949            ReasonEnum::Other => "Other",
3950            ReasonEnum::OvercurrentFault => "OvercurrentFault",
3951            ReasonEnum::PowerLoss => "PowerLoss",
3952            ReasonEnum::PowerQuality => "PowerQuality",
3953            ReasonEnum::Reboot => "Reboot",
3954            ReasonEnum::Remote => "Remote",
3955            ReasonEnum::SOCLimitReached => "SOCLimitReached",
3956            ReasonEnum::StoppedByEV => "StoppedByEV",
3957            ReasonEnum::TimeLimitReached => "TimeLimitReached",
3958            ReasonEnum::Timeout => "Timeout",
3959        }
3960    }
3961}
3962
3963impl std::fmt::Display for ReasonEnum {
3964    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3965        f.write_str(self.as_str())
3966    }
3967}
3968
3969impl std::str::FromStr for ReasonEnum {
3970    type Err = ();
3971    fn from_str(s: &str) -> Result<Self, ()> {
3972        Self::ALL
3973            .iter()
3974            .copied()
3975            .find(|v| v.as_str() == s)
3976            .ok_or(())
3977    }
3978}
3979
3980impl Validate for ReasonEnum {
3981    #[inline]
3982    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
3983        Ok(())
3984    }
3985}
3986
3987/// Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code
3988/// Indicates the start point of a recurrence.
3989#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
3990pub enum RecurrencyKindEnum {
3991    #[serde(rename = "Daily")]
3992    Daily,
3993    #[serde(rename = "Weekly")]
3994    Weekly,
3995}
3996
3997impl RecurrencyKindEnum {
3998    pub const ALL: &'static [RecurrencyKindEnum] =
3999        &[RecurrencyKindEnum::Daily, RecurrencyKindEnum::Weekly];
4000    /// Value as it appears on the wire.
4001    pub const fn as_str(&self) -> &'static str {
4002        match self {
4003            RecurrencyKindEnum::Daily => "Daily",
4004            RecurrencyKindEnum::Weekly => "Weekly",
4005        }
4006    }
4007}
4008
4009impl std::fmt::Display for RecurrencyKindEnum {
4010    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4011        f.write_str(self.as_str())
4012    }
4013}
4014
4015impl std::str::FromStr for RecurrencyKindEnum {
4016    type Err = ();
4017    fn from_str(s: &str) -> Result<Self, ()> {
4018        Self::ALL
4019            .iter()
4020            .copied()
4021            .find(|v| v.as_str() == s)
4022            .ok_or(())
4023    }
4024}
4025
4026impl Validate for RecurrencyKindEnum {
4027    #[inline]
4028    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4029        Ok(())
4030    }
4031}
4032
4033/// This contains whether the Charging Station has been registered
4034/// within the CSMS.
4035#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4036pub enum RegistrationStatusEnum {
4037    #[serde(rename = "Accepted")]
4038    Accepted,
4039    #[serde(rename = "Pending")]
4040    Pending,
4041    #[serde(rename = "Rejected")]
4042    Rejected,
4043}
4044
4045impl RegistrationStatusEnum {
4046    pub const ALL: &'static [RegistrationStatusEnum] = &[
4047        RegistrationStatusEnum::Accepted,
4048        RegistrationStatusEnum::Pending,
4049        RegistrationStatusEnum::Rejected,
4050    ];
4051    /// Value as it appears on the wire.
4052    pub const fn as_str(&self) -> &'static str {
4053        match self {
4054            RegistrationStatusEnum::Accepted => "Accepted",
4055            RegistrationStatusEnum::Pending => "Pending",
4056            RegistrationStatusEnum::Rejected => "Rejected",
4057        }
4058    }
4059}
4060
4061impl std::fmt::Display for RegistrationStatusEnum {
4062    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4063        f.write_str(self.as_str())
4064    }
4065}
4066
4067impl std::str::FromStr for RegistrationStatusEnum {
4068    type Err = ();
4069    fn from_str(s: &str) -> Result<Self, ()> {
4070        Self::ALL
4071            .iter()
4072            .copied()
4073            .find(|v| v.as_str() == s)
4074            .ok_or(())
4075    }
4076}
4077
4078impl Validate for RegistrationStatusEnum {
4079    #[inline]
4080    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4081        Ok(())
4082    }
4083}
4084
4085/// This field specifies the report base.
4086#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4087pub enum ReportBaseEnum {
4088    #[serde(rename = "ConfigurationInventory")]
4089    ConfigurationInventory,
4090    #[serde(rename = "FullInventory")]
4091    FullInventory,
4092    #[serde(rename = "SummaryInventory")]
4093    SummaryInventory,
4094}
4095
4096impl ReportBaseEnum {
4097    pub const ALL: &'static [ReportBaseEnum] = &[
4098        ReportBaseEnum::ConfigurationInventory,
4099        ReportBaseEnum::FullInventory,
4100        ReportBaseEnum::SummaryInventory,
4101    ];
4102    /// Value as it appears on the wire.
4103    pub const fn as_str(&self) -> &'static str {
4104        match self {
4105            ReportBaseEnum::ConfigurationInventory => "ConfigurationInventory",
4106            ReportBaseEnum::FullInventory => "FullInventory",
4107            ReportBaseEnum::SummaryInventory => "SummaryInventory",
4108        }
4109    }
4110}
4111
4112impl std::fmt::Display for ReportBaseEnum {
4113    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4114        f.write_str(self.as_str())
4115    }
4116}
4117
4118impl std::str::FromStr for ReportBaseEnum {
4119    type Err = ();
4120    fn from_str(s: &str) -> Result<Self, ()> {
4121        Self::ALL
4122            .iter()
4123            .copied()
4124            .find(|v| v.as_str() == s)
4125            .ok_or(())
4126    }
4127}
4128
4129impl Validate for ReportBaseEnum {
4130    #[inline]
4131    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4132        Ok(())
4133    }
4134}
4135
4136/// Status indicating whether the Charging Station accepts the request to start a transaction.
4137#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4138pub enum RequestStartStopStatusEnum {
4139    #[serde(rename = "Accepted")]
4140    Accepted,
4141    #[serde(rename = "Rejected")]
4142    Rejected,
4143}
4144
4145impl RequestStartStopStatusEnum {
4146    pub const ALL: &'static [RequestStartStopStatusEnum] = &[
4147        RequestStartStopStatusEnum::Accepted,
4148        RequestStartStopStatusEnum::Rejected,
4149    ];
4150    /// Value as it appears on the wire.
4151    pub const fn as_str(&self) -> &'static str {
4152        match self {
4153            RequestStartStopStatusEnum::Accepted => "Accepted",
4154            RequestStartStopStatusEnum::Rejected => "Rejected",
4155        }
4156    }
4157}
4158
4159impl std::fmt::Display for RequestStartStopStatusEnum {
4160    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4161        f.write_str(self.as_str())
4162    }
4163}
4164
4165impl std::str::FromStr for RequestStartStopStatusEnum {
4166    type Err = ();
4167    fn from_str(s: &str) -> Result<Self, ()> {
4168        Self::ALL
4169            .iter()
4170            .copied()
4171            .find(|v| v.as_str() == s)
4172            .ok_or(())
4173    }
4174}
4175
4176impl Validate for RequestStartStopStatusEnum {
4177    #[inline]
4178    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4179        Ok(())
4180    }
4181}
4182
4183/// The updated reservation status.
4184#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4185pub enum ReservationUpdateStatusEnum {
4186    #[serde(rename = "Expired")]
4187    Expired,
4188    #[serde(rename = "Removed")]
4189    Removed,
4190}
4191
4192impl ReservationUpdateStatusEnum {
4193    pub const ALL: &'static [ReservationUpdateStatusEnum] = &[
4194        ReservationUpdateStatusEnum::Expired,
4195        ReservationUpdateStatusEnum::Removed,
4196    ];
4197    /// Value as it appears on the wire.
4198    pub const fn as_str(&self) -> &'static str {
4199        match self {
4200            ReservationUpdateStatusEnum::Expired => "Expired",
4201            ReservationUpdateStatusEnum::Removed => "Removed",
4202        }
4203    }
4204}
4205
4206impl std::fmt::Display for ReservationUpdateStatusEnum {
4207    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4208        f.write_str(self.as_str())
4209    }
4210}
4211
4212impl std::str::FromStr for ReservationUpdateStatusEnum {
4213    type Err = ();
4214    fn from_str(s: &str) -> Result<Self, ()> {
4215        Self::ALL
4216            .iter()
4217            .copied()
4218            .find(|v| v.as_str() == s)
4219            .ok_or(())
4220    }
4221}
4222
4223impl Validate for ReservationUpdateStatusEnum {
4224    #[inline]
4225    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4226        Ok(())
4227    }
4228}
4229
4230/// This indicates the success or failure of the reservation.
4231#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4232pub enum ReserveNowStatusEnum {
4233    #[serde(rename = "Accepted")]
4234    Accepted,
4235    #[serde(rename = "Faulted")]
4236    Faulted,
4237    #[serde(rename = "Occupied")]
4238    Occupied,
4239    #[serde(rename = "Rejected")]
4240    Rejected,
4241    #[serde(rename = "Unavailable")]
4242    Unavailable,
4243}
4244
4245impl ReserveNowStatusEnum {
4246    pub const ALL: &'static [ReserveNowStatusEnum] = &[
4247        ReserveNowStatusEnum::Accepted,
4248        ReserveNowStatusEnum::Faulted,
4249        ReserveNowStatusEnum::Occupied,
4250        ReserveNowStatusEnum::Rejected,
4251        ReserveNowStatusEnum::Unavailable,
4252    ];
4253    /// Value as it appears on the wire.
4254    pub const fn as_str(&self) -> &'static str {
4255        match self {
4256            ReserveNowStatusEnum::Accepted => "Accepted",
4257            ReserveNowStatusEnum::Faulted => "Faulted",
4258            ReserveNowStatusEnum::Occupied => "Occupied",
4259            ReserveNowStatusEnum::Rejected => "Rejected",
4260            ReserveNowStatusEnum::Unavailable => "Unavailable",
4261        }
4262    }
4263}
4264
4265impl std::fmt::Display for ReserveNowStatusEnum {
4266    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4267        f.write_str(self.as_str())
4268    }
4269}
4270
4271impl std::str::FromStr for ReserveNowStatusEnum {
4272    type Err = ();
4273    fn from_str(s: &str) -> Result<Self, ()> {
4274        Self::ALL
4275            .iter()
4276            .copied()
4277            .find(|v| v.as_str() == s)
4278            .ok_or(())
4279    }
4280}
4281
4282impl Validate for ReserveNowStatusEnum {
4283    #[inline]
4284    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4285        Ok(())
4286    }
4287}
4288
4289/// This contains the type of reset that the Charging Station or EVSE should perform.
4290#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4291pub enum ResetEnum {
4292    #[serde(rename = "Immediate")]
4293    Immediate,
4294    #[serde(rename = "OnIdle")]
4295    OnIdle,
4296}
4297
4298impl ResetEnum {
4299    pub const ALL: &'static [ResetEnum] = &[ResetEnum::Immediate, ResetEnum::OnIdle];
4300    /// Value as it appears on the wire.
4301    pub const fn as_str(&self) -> &'static str {
4302        match self {
4303            ResetEnum::Immediate => "Immediate",
4304            ResetEnum::OnIdle => "OnIdle",
4305        }
4306    }
4307}
4308
4309impl std::fmt::Display for ResetEnum {
4310    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4311        f.write_str(self.as_str())
4312    }
4313}
4314
4315impl std::str::FromStr for ResetEnum {
4316    type Err = ();
4317    fn from_str(s: &str) -> Result<Self, ()> {
4318        Self::ALL
4319            .iter()
4320            .copied()
4321            .find(|v| v.as_str() == s)
4322            .ok_or(())
4323    }
4324}
4325
4326impl Validate for ResetEnum {
4327    #[inline]
4328    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4329        Ok(())
4330    }
4331}
4332
4333/// This indicates whether the Charging Station is able to perform the reset.
4334#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4335pub enum ResetStatusEnum {
4336    #[serde(rename = "Accepted")]
4337    Accepted,
4338    #[serde(rename = "Rejected")]
4339    Rejected,
4340    #[serde(rename = "Scheduled")]
4341    Scheduled,
4342}
4343
4344impl ResetStatusEnum {
4345    pub const ALL: &'static [ResetStatusEnum] = &[
4346        ResetStatusEnum::Accepted,
4347        ResetStatusEnum::Rejected,
4348        ResetStatusEnum::Scheduled,
4349    ];
4350    /// Value as it appears on the wire.
4351    pub const fn as_str(&self) -> &'static str {
4352        match self {
4353            ResetStatusEnum::Accepted => "Accepted",
4354            ResetStatusEnum::Rejected => "Rejected",
4355            ResetStatusEnum::Scheduled => "Scheduled",
4356        }
4357    }
4358}
4359
4360impl std::fmt::Display for ResetStatusEnum {
4361    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4362        f.write_str(self.as_str())
4363    }
4364}
4365
4366impl std::str::FromStr for ResetStatusEnum {
4367    type Err = ();
4368    fn from_str(s: &str) -> Result<Self, ()> {
4369        Self::ALL
4370            .iter()
4371            .copied()
4372            .find(|v| v.as_str() == s)
4373            .ok_or(())
4374    }
4375}
4376
4377impl Validate for ResetStatusEnum {
4378    #[inline]
4379    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4380        Ok(())
4381    }
4382}
4383
4384/// This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
4385#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4386pub enum SendLocalListStatusEnum {
4387    #[serde(rename = "Accepted")]
4388    Accepted,
4389    #[serde(rename = "Failed")]
4390    Failed,
4391    #[serde(rename = "VersionMismatch")]
4392    VersionMismatch,
4393}
4394
4395impl SendLocalListStatusEnum {
4396    pub const ALL: &'static [SendLocalListStatusEnum] = &[
4397        SendLocalListStatusEnum::Accepted,
4398        SendLocalListStatusEnum::Failed,
4399        SendLocalListStatusEnum::VersionMismatch,
4400    ];
4401    /// Value as it appears on the wire.
4402    pub const fn as_str(&self) -> &'static str {
4403        match self {
4404            SendLocalListStatusEnum::Accepted => "Accepted",
4405            SendLocalListStatusEnum::Failed => "Failed",
4406            SendLocalListStatusEnum::VersionMismatch => "VersionMismatch",
4407        }
4408    }
4409}
4410
4411impl std::fmt::Display for SendLocalListStatusEnum {
4412    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4413        f.write_str(self.as_str())
4414    }
4415}
4416
4417impl std::str::FromStr for SendLocalListStatusEnum {
4418    type Err = ();
4419    fn from_str(s: &str) -> Result<Self, ()> {
4420        Self::ALL
4421            .iter()
4422            .copied()
4423            .find(|v| v.as_str() == s)
4424            .ok_or(())
4425    }
4426}
4427
4428impl Validate for SendLocalListStatusEnum {
4429    #[inline]
4430    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4431        Ok(())
4432    }
4433}
4434
4435/// Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
4436#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4437pub enum SetMonitoringStatusEnum {
4438    #[serde(rename = "Accepted")]
4439    Accepted,
4440    #[serde(rename = "UnknownComponent")]
4441    UnknownComponent,
4442    #[serde(rename = "UnknownVariable")]
4443    UnknownVariable,
4444    #[serde(rename = "UnsupportedMonitorType")]
4445    UnsupportedMonitorType,
4446    #[serde(rename = "Rejected")]
4447    Rejected,
4448    #[serde(rename = "Duplicate")]
4449    Duplicate,
4450}
4451
4452impl SetMonitoringStatusEnum {
4453    pub const ALL: &'static [SetMonitoringStatusEnum] = &[
4454        SetMonitoringStatusEnum::Accepted,
4455        SetMonitoringStatusEnum::UnknownComponent,
4456        SetMonitoringStatusEnum::UnknownVariable,
4457        SetMonitoringStatusEnum::UnsupportedMonitorType,
4458        SetMonitoringStatusEnum::Rejected,
4459        SetMonitoringStatusEnum::Duplicate,
4460    ];
4461    /// Value as it appears on the wire.
4462    pub const fn as_str(&self) -> &'static str {
4463        match self {
4464            SetMonitoringStatusEnum::Accepted => "Accepted",
4465            SetMonitoringStatusEnum::UnknownComponent => "UnknownComponent",
4466            SetMonitoringStatusEnum::UnknownVariable => "UnknownVariable",
4467            SetMonitoringStatusEnum::UnsupportedMonitorType => "UnsupportedMonitorType",
4468            SetMonitoringStatusEnum::Rejected => "Rejected",
4469            SetMonitoringStatusEnum::Duplicate => "Duplicate",
4470        }
4471    }
4472}
4473
4474impl std::fmt::Display for SetMonitoringStatusEnum {
4475    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4476        f.write_str(self.as_str())
4477    }
4478}
4479
4480impl std::str::FromStr for SetMonitoringStatusEnum {
4481    type Err = ();
4482    fn from_str(s: &str) -> Result<Self, ()> {
4483        Self::ALL
4484            .iter()
4485            .copied()
4486            .find(|v| v.as_str() == s)
4487            .ok_or(())
4488    }
4489}
4490
4491impl Validate for SetMonitoringStatusEnum {
4492    #[inline]
4493    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4494        Ok(())
4495    }
4496}
4497
4498/// Result of operation.
4499#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4500pub enum SetNetworkProfileStatusEnum {
4501    #[serde(rename = "Accepted")]
4502    Accepted,
4503    #[serde(rename = "Rejected")]
4504    Rejected,
4505    #[serde(rename = "Failed")]
4506    Failed,
4507}
4508
4509impl SetNetworkProfileStatusEnum {
4510    pub const ALL: &'static [SetNetworkProfileStatusEnum] = &[
4511        SetNetworkProfileStatusEnum::Accepted,
4512        SetNetworkProfileStatusEnum::Rejected,
4513        SetNetworkProfileStatusEnum::Failed,
4514    ];
4515    /// Value as it appears on the wire.
4516    pub const fn as_str(&self) -> &'static str {
4517        match self {
4518            SetNetworkProfileStatusEnum::Accepted => "Accepted",
4519            SetNetworkProfileStatusEnum::Rejected => "Rejected",
4520            SetNetworkProfileStatusEnum::Failed => "Failed",
4521        }
4522    }
4523}
4524
4525impl std::fmt::Display for SetNetworkProfileStatusEnum {
4526    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4527        f.write_str(self.as_str())
4528    }
4529}
4530
4531impl std::str::FromStr for SetNetworkProfileStatusEnum {
4532    type Err = ();
4533    fn from_str(s: &str) -> Result<Self, ()> {
4534        Self::ALL
4535            .iter()
4536            .copied()
4537            .find(|v| v.as_str() == s)
4538            .ok_or(())
4539    }
4540}
4541
4542impl Validate for SetNetworkProfileStatusEnum {
4543    #[inline]
4544    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4545        Ok(())
4546    }
4547}
4548
4549/// Result status of setting the variable.
4550#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4551pub enum SetVariableStatusEnum {
4552    #[serde(rename = "Accepted")]
4553    Accepted,
4554    #[serde(rename = "Rejected")]
4555    Rejected,
4556    #[serde(rename = "UnknownComponent")]
4557    UnknownComponent,
4558    #[serde(rename = "UnknownVariable")]
4559    UnknownVariable,
4560    #[serde(rename = "NotSupportedAttributeType")]
4561    NotSupportedAttributeType,
4562    #[serde(rename = "RebootRequired")]
4563    RebootRequired,
4564}
4565
4566impl SetVariableStatusEnum {
4567    pub const ALL: &'static [SetVariableStatusEnum] = &[
4568        SetVariableStatusEnum::Accepted,
4569        SetVariableStatusEnum::Rejected,
4570        SetVariableStatusEnum::UnknownComponent,
4571        SetVariableStatusEnum::UnknownVariable,
4572        SetVariableStatusEnum::NotSupportedAttributeType,
4573        SetVariableStatusEnum::RebootRequired,
4574    ];
4575    /// Value as it appears on the wire.
4576    pub const fn as_str(&self) -> &'static str {
4577        match self {
4578            SetVariableStatusEnum::Accepted => "Accepted",
4579            SetVariableStatusEnum::Rejected => "Rejected",
4580            SetVariableStatusEnum::UnknownComponent => "UnknownComponent",
4581            SetVariableStatusEnum::UnknownVariable => "UnknownVariable",
4582            SetVariableStatusEnum::NotSupportedAttributeType => "NotSupportedAttributeType",
4583            SetVariableStatusEnum::RebootRequired => "RebootRequired",
4584        }
4585    }
4586}
4587
4588impl std::fmt::Display for SetVariableStatusEnum {
4589    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4590        f.write_str(self.as_str())
4591    }
4592}
4593
4594impl std::str::FromStr for SetVariableStatusEnum {
4595    type Err = ();
4596    fn from_str(s: &str) -> Result<Self, ()> {
4597        Self::ALL
4598            .iter()
4599            .copied()
4600            .find(|v| v.as_str() == s)
4601            .ok_or(())
4602    }
4603}
4604
4605impl Validate for SetVariableStatusEnum {
4606    #[inline]
4607    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4608        Ok(())
4609    }
4610}
4611
4612/// This contains the type of this event.
4613/// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
4614#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4615pub enum TransactionEventEnum {
4616    #[serde(rename = "Ended")]
4617    Ended,
4618    #[serde(rename = "Started")]
4619    Started,
4620    #[serde(rename = "Updated")]
4621    Updated,
4622}
4623
4624impl TransactionEventEnum {
4625    pub const ALL: &'static [TransactionEventEnum] = &[
4626        TransactionEventEnum::Ended,
4627        TransactionEventEnum::Started,
4628        TransactionEventEnum::Updated,
4629    ];
4630    /// Value as it appears on the wire.
4631    pub const fn as_str(&self) -> &'static str {
4632        match self {
4633            TransactionEventEnum::Ended => "Ended",
4634            TransactionEventEnum::Started => "Started",
4635            TransactionEventEnum::Updated => "Updated",
4636        }
4637    }
4638}
4639
4640impl std::fmt::Display for TransactionEventEnum {
4641    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4642        f.write_str(self.as_str())
4643    }
4644}
4645
4646impl std::str::FromStr for TransactionEventEnum {
4647    type Err = ();
4648    fn from_str(s: &str) -> Result<Self, ()> {
4649        Self::ALL
4650            .iter()
4651            .copied()
4652            .find(|v| v.as_str() == s)
4653            .ok_or(())
4654    }
4655}
4656
4657impl Validate for TransactionEventEnum {
4658    #[inline]
4659    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4660        Ok(())
4661    }
4662}
4663
4664/// Indicates whether the Charging Station will send the requested notification or not.
4665#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4666pub enum TriggerMessageStatusEnum {
4667    #[serde(rename = "Accepted")]
4668    Accepted,
4669    #[serde(rename = "Rejected")]
4670    Rejected,
4671    #[serde(rename = "NotImplemented")]
4672    NotImplemented,
4673}
4674
4675impl TriggerMessageStatusEnum {
4676    pub const ALL: &'static [TriggerMessageStatusEnum] = &[
4677        TriggerMessageStatusEnum::Accepted,
4678        TriggerMessageStatusEnum::Rejected,
4679        TriggerMessageStatusEnum::NotImplemented,
4680    ];
4681    /// Value as it appears on the wire.
4682    pub const fn as_str(&self) -> &'static str {
4683        match self {
4684            TriggerMessageStatusEnum::Accepted => "Accepted",
4685            TriggerMessageStatusEnum::Rejected => "Rejected",
4686            TriggerMessageStatusEnum::NotImplemented => "NotImplemented",
4687        }
4688    }
4689}
4690
4691impl std::fmt::Display for TriggerMessageStatusEnum {
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 TriggerMessageStatusEnum {
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 TriggerMessageStatusEnum {
4709    #[inline]
4710    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4711        Ok(())
4712    }
4713}
4714
4715/// Reason the Charging Station sends this message to the CSMS
4716#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4717pub enum TriggerReasonEnum {
4718    #[serde(rename = "Authorized")]
4719    Authorized,
4720    #[serde(rename = "CablePluggedIn")]
4721    CablePluggedIn,
4722    #[serde(rename = "ChargingRateChanged")]
4723    ChargingRateChanged,
4724    #[serde(rename = "ChargingStateChanged")]
4725    ChargingStateChanged,
4726    #[serde(rename = "Deauthorized")]
4727    Deauthorized,
4728    #[serde(rename = "EnergyLimitReached")]
4729    EnergyLimitReached,
4730    #[serde(rename = "EVCommunicationLost")]
4731    EVCommunicationLost,
4732    #[serde(rename = "EVConnectTimeout")]
4733    EVConnectTimeout,
4734    #[serde(rename = "MeterValueClock")]
4735    MeterValueClock,
4736    #[serde(rename = "MeterValuePeriodic")]
4737    MeterValuePeriodic,
4738    #[serde(rename = "TimeLimitReached")]
4739    TimeLimitReached,
4740    #[serde(rename = "Trigger")]
4741    Trigger,
4742    #[serde(rename = "UnlockCommand")]
4743    UnlockCommand,
4744    #[serde(rename = "StopAuthorized")]
4745    StopAuthorized,
4746    #[serde(rename = "EVDeparted")]
4747    EVDeparted,
4748    #[serde(rename = "EVDetected")]
4749    EVDetected,
4750    #[serde(rename = "RemoteStop")]
4751    RemoteStop,
4752    #[serde(rename = "RemoteStart")]
4753    RemoteStart,
4754    #[serde(rename = "AbnormalCondition")]
4755    AbnormalCondition,
4756    #[serde(rename = "SignedDataReceived")]
4757    SignedDataReceived,
4758    #[serde(rename = "ResetCommand")]
4759    ResetCommand,
4760}
4761
4762impl TriggerReasonEnum {
4763    pub const ALL: &'static [TriggerReasonEnum] = &[
4764        TriggerReasonEnum::Authorized,
4765        TriggerReasonEnum::CablePluggedIn,
4766        TriggerReasonEnum::ChargingRateChanged,
4767        TriggerReasonEnum::ChargingStateChanged,
4768        TriggerReasonEnum::Deauthorized,
4769        TriggerReasonEnum::EnergyLimitReached,
4770        TriggerReasonEnum::EVCommunicationLost,
4771        TriggerReasonEnum::EVConnectTimeout,
4772        TriggerReasonEnum::MeterValueClock,
4773        TriggerReasonEnum::MeterValuePeriodic,
4774        TriggerReasonEnum::TimeLimitReached,
4775        TriggerReasonEnum::Trigger,
4776        TriggerReasonEnum::UnlockCommand,
4777        TriggerReasonEnum::StopAuthorized,
4778        TriggerReasonEnum::EVDeparted,
4779        TriggerReasonEnum::EVDetected,
4780        TriggerReasonEnum::RemoteStop,
4781        TriggerReasonEnum::RemoteStart,
4782        TriggerReasonEnum::AbnormalCondition,
4783        TriggerReasonEnum::SignedDataReceived,
4784        TriggerReasonEnum::ResetCommand,
4785    ];
4786    /// Value as it appears on the wire.
4787    pub const fn as_str(&self) -> &'static str {
4788        match self {
4789            TriggerReasonEnum::Authorized => "Authorized",
4790            TriggerReasonEnum::CablePluggedIn => "CablePluggedIn",
4791            TriggerReasonEnum::ChargingRateChanged => "ChargingRateChanged",
4792            TriggerReasonEnum::ChargingStateChanged => "ChargingStateChanged",
4793            TriggerReasonEnum::Deauthorized => "Deauthorized",
4794            TriggerReasonEnum::EnergyLimitReached => "EnergyLimitReached",
4795            TriggerReasonEnum::EVCommunicationLost => "EVCommunicationLost",
4796            TriggerReasonEnum::EVConnectTimeout => "EVConnectTimeout",
4797            TriggerReasonEnum::MeterValueClock => "MeterValueClock",
4798            TriggerReasonEnum::MeterValuePeriodic => "MeterValuePeriodic",
4799            TriggerReasonEnum::TimeLimitReached => "TimeLimitReached",
4800            TriggerReasonEnum::Trigger => "Trigger",
4801            TriggerReasonEnum::UnlockCommand => "UnlockCommand",
4802            TriggerReasonEnum::StopAuthorized => "StopAuthorized",
4803            TriggerReasonEnum::EVDeparted => "EVDeparted",
4804            TriggerReasonEnum::EVDetected => "EVDetected",
4805            TriggerReasonEnum::RemoteStop => "RemoteStop",
4806            TriggerReasonEnum::RemoteStart => "RemoteStart",
4807            TriggerReasonEnum::AbnormalCondition => "AbnormalCondition",
4808            TriggerReasonEnum::SignedDataReceived => "SignedDataReceived",
4809            TriggerReasonEnum::ResetCommand => "ResetCommand",
4810        }
4811    }
4812}
4813
4814impl std::fmt::Display for TriggerReasonEnum {
4815    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4816        f.write_str(self.as_str())
4817    }
4818}
4819
4820impl std::str::FromStr for TriggerReasonEnum {
4821    type Err = ();
4822    fn from_str(s: &str) -> Result<Self, ()> {
4823        Self::ALL
4824            .iter()
4825            .copied()
4826            .find(|v| v.as_str() == s)
4827            .ok_or(())
4828    }
4829}
4830
4831impl Validate for TriggerReasonEnum {
4832    #[inline]
4833    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4834        Ok(())
4835    }
4836}
4837
4838/// This indicates whether the Charging Station has unlocked the connector.
4839#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4840pub enum UnlockStatusEnum {
4841    #[serde(rename = "Unlocked")]
4842    Unlocked,
4843    #[serde(rename = "UnlockFailed")]
4844    UnlockFailed,
4845    #[serde(rename = "OngoingAuthorizedTransaction")]
4846    OngoingAuthorizedTransaction,
4847    #[serde(rename = "UnknownConnector")]
4848    UnknownConnector,
4849}
4850
4851impl UnlockStatusEnum {
4852    pub const ALL: &'static [UnlockStatusEnum] = &[
4853        UnlockStatusEnum::Unlocked,
4854        UnlockStatusEnum::UnlockFailed,
4855        UnlockStatusEnum::OngoingAuthorizedTransaction,
4856        UnlockStatusEnum::UnknownConnector,
4857    ];
4858    /// Value as it appears on the wire.
4859    pub const fn as_str(&self) -> &'static str {
4860        match self {
4861            UnlockStatusEnum::Unlocked => "Unlocked",
4862            UnlockStatusEnum::UnlockFailed => "UnlockFailed",
4863            UnlockStatusEnum::OngoingAuthorizedTransaction => "OngoingAuthorizedTransaction",
4864            UnlockStatusEnum::UnknownConnector => "UnknownConnector",
4865        }
4866    }
4867}
4868
4869impl std::fmt::Display for UnlockStatusEnum {
4870    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4871        f.write_str(self.as_str())
4872    }
4873}
4874
4875impl std::str::FromStr for UnlockStatusEnum {
4876    type Err = ();
4877    fn from_str(s: &str) -> Result<Self, ()> {
4878        Self::ALL
4879            .iter()
4880            .copied()
4881            .find(|v| v.as_str() == s)
4882            .ok_or(())
4883    }
4884}
4885
4886impl Validate for UnlockStatusEnum {
4887    #[inline]
4888    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4889        Ok(())
4890    }
4891}
4892
4893/// Indicates whether the Local Controller succeeded in unpublishing the firmware.
4894#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4895pub enum UnpublishFirmwareStatusEnum {
4896    #[serde(rename = "DownloadOngoing")]
4897    DownloadOngoing,
4898    #[serde(rename = "NoFirmware")]
4899    NoFirmware,
4900    #[serde(rename = "Unpublished")]
4901    Unpublished,
4902}
4903
4904impl UnpublishFirmwareStatusEnum {
4905    pub const ALL: &'static [UnpublishFirmwareStatusEnum] = &[
4906        UnpublishFirmwareStatusEnum::DownloadOngoing,
4907        UnpublishFirmwareStatusEnum::NoFirmware,
4908        UnpublishFirmwareStatusEnum::Unpublished,
4909    ];
4910    /// Value as it appears on the wire.
4911    pub const fn as_str(&self) -> &'static str {
4912        match self {
4913            UnpublishFirmwareStatusEnum::DownloadOngoing => "DownloadOngoing",
4914            UnpublishFirmwareStatusEnum::NoFirmware => "NoFirmware",
4915            UnpublishFirmwareStatusEnum::Unpublished => "Unpublished",
4916        }
4917    }
4918}
4919
4920impl std::fmt::Display for UnpublishFirmwareStatusEnum {
4921    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4922        f.write_str(self.as_str())
4923    }
4924}
4925
4926impl std::str::FromStr for UnpublishFirmwareStatusEnum {
4927    type Err = ();
4928    fn from_str(s: &str) -> Result<Self, ()> {
4929        Self::ALL
4930            .iter()
4931            .copied()
4932            .find(|v| v.as_str() == s)
4933            .ok_or(())
4934    }
4935}
4936
4937impl Validate for UnpublishFirmwareStatusEnum {
4938    #[inline]
4939    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4940        Ok(())
4941    }
4942}
4943
4944/// This contains the type of update (full or differential) of this request.
4945#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4946pub enum UpdateEnum {
4947    #[serde(rename = "Differential")]
4948    Differential,
4949    #[serde(rename = "Full")]
4950    Full,
4951}
4952
4953impl UpdateEnum {
4954    pub const ALL: &'static [UpdateEnum] = &[UpdateEnum::Differential, UpdateEnum::Full];
4955    /// Value as it appears on the wire.
4956    pub const fn as_str(&self) -> &'static str {
4957        match self {
4958            UpdateEnum::Differential => "Differential",
4959            UpdateEnum::Full => "Full",
4960        }
4961    }
4962}
4963
4964impl std::fmt::Display for UpdateEnum {
4965    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4966        f.write_str(self.as_str())
4967    }
4968}
4969
4970impl std::str::FromStr for UpdateEnum {
4971    type Err = ();
4972    fn from_str(s: &str) -> Result<Self, ()> {
4973        Self::ALL
4974            .iter()
4975            .copied()
4976            .find(|v| v.as_str() == s)
4977            .ok_or(())
4978    }
4979}
4980
4981impl Validate for UpdateEnum {
4982    #[inline]
4983    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
4984        Ok(())
4985    }
4986}
4987
4988/// This field indicates whether the Charging Station was able to accept the request.
4989#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
4990pub enum UpdateFirmwareStatusEnum {
4991    #[serde(rename = "Accepted")]
4992    Accepted,
4993    #[serde(rename = "Rejected")]
4994    Rejected,
4995    #[serde(rename = "AcceptedCanceled")]
4996    AcceptedCanceled,
4997    #[serde(rename = "InvalidCertificate")]
4998    InvalidCertificate,
4999    #[serde(rename = "RevokedCertificate")]
5000    RevokedCertificate,
5001}
5002
5003impl UpdateFirmwareStatusEnum {
5004    pub const ALL: &'static [UpdateFirmwareStatusEnum] = &[
5005        UpdateFirmwareStatusEnum::Accepted,
5006        UpdateFirmwareStatusEnum::Rejected,
5007        UpdateFirmwareStatusEnum::AcceptedCanceled,
5008        UpdateFirmwareStatusEnum::InvalidCertificate,
5009        UpdateFirmwareStatusEnum::RevokedCertificate,
5010    ];
5011    /// Value as it appears on the wire.
5012    pub const fn as_str(&self) -> &'static str {
5013        match self {
5014            UpdateFirmwareStatusEnum::Accepted => "Accepted",
5015            UpdateFirmwareStatusEnum::Rejected => "Rejected",
5016            UpdateFirmwareStatusEnum::AcceptedCanceled => "AcceptedCanceled",
5017            UpdateFirmwareStatusEnum::InvalidCertificate => "InvalidCertificate",
5018            UpdateFirmwareStatusEnum::RevokedCertificate => "RevokedCertificate",
5019        }
5020    }
5021}
5022
5023impl std::fmt::Display for UpdateFirmwareStatusEnum {
5024    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5025        f.write_str(self.as_str())
5026    }
5027}
5028
5029impl std::str::FromStr for UpdateFirmwareStatusEnum {
5030    type Err = ();
5031    fn from_str(s: &str) -> Result<Self, ()> {
5032        Self::ALL
5033            .iter()
5034            .copied()
5035            .find(|v| v.as_str() == s)
5036            .ok_or(())
5037    }
5038}
5039
5040impl Validate for UpdateFirmwareStatusEnum {
5041    #[inline]
5042    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5043        Ok(())
5044    }
5045}
5046
5047/// This contains the status of the log upload.
5048#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5049pub enum UploadLogStatusEnum {
5050    #[serde(rename = "BadMessage")]
5051    BadMessage,
5052    #[serde(rename = "Idle")]
5053    Idle,
5054    #[serde(rename = "NotSupportedOperation")]
5055    NotSupportedOperation,
5056    #[serde(rename = "PermissionDenied")]
5057    PermissionDenied,
5058    #[serde(rename = "Uploaded")]
5059    Uploaded,
5060    #[serde(rename = "UploadFailure")]
5061    UploadFailure,
5062    #[serde(rename = "Uploading")]
5063    Uploading,
5064    #[serde(rename = "AcceptedCanceled")]
5065    AcceptedCanceled,
5066}
5067
5068impl UploadLogStatusEnum {
5069    pub const ALL: &'static [UploadLogStatusEnum] = &[
5070        UploadLogStatusEnum::BadMessage,
5071        UploadLogStatusEnum::Idle,
5072        UploadLogStatusEnum::NotSupportedOperation,
5073        UploadLogStatusEnum::PermissionDenied,
5074        UploadLogStatusEnum::Uploaded,
5075        UploadLogStatusEnum::UploadFailure,
5076        UploadLogStatusEnum::Uploading,
5077        UploadLogStatusEnum::AcceptedCanceled,
5078    ];
5079    /// Value as it appears on the wire.
5080    pub const fn as_str(&self) -> &'static str {
5081        match self {
5082            UploadLogStatusEnum::BadMessage => "BadMessage",
5083            UploadLogStatusEnum::Idle => "Idle",
5084            UploadLogStatusEnum::NotSupportedOperation => "NotSupportedOperation",
5085            UploadLogStatusEnum::PermissionDenied => "PermissionDenied",
5086            UploadLogStatusEnum::Uploaded => "Uploaded",
5087            UploadLogStatusEnum::UploadFailure => "UploadFailure",
5088            UploadLogStatusEnum::Uploading => "Uploading",
5089            UploadLogStatusEnum::AcceptedCanceled => "AcceptedCanceled",
5090        }
5091    }
5092}
5093
5094impl std::fmt::Display for UploadLogStatusEnum {
5095    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5096        f.write_str(self.as_str())
5097    }
5098}
5099
5100impl std::str::FromStr for UploadLogStatusEnum {
5101    type Err = ();
5102    fn from_str(s: &str) -> Result<Self, ()> {
5103        Self::ALL
5104            .iter()
5105            .copied()
5106            .find(|v| v.as_str() == s)
5107            .ok_or(())
5108    }
5109}
5110
5111impl Validate for UploadLogStatusEnum {
5112    #[inline]
5113    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5114        Ok(())
5115    }
5116}
5117
5118/// VPN. Type. VPN_ Code
5119/// Type of VPN
5120#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
5121pub enum VPNEnum {
5122    #[serde(rename = "IKEv2")]
5123    IKEv2,
5124    #[serde(rename = "IPSec")]
5125    IPSec,
5126    #[serde(rename = "L2TP")]
5127    L2TP,
5128    #[serde(rename = "PPTP")]
5129    PPTP,
5130}
5131
5132impl VPNEnum {
5133    pub const ALL: &'static [VPNEnum] =
5134        &[VPNEnum::IKEv2, VPNEnum::IPSec, VPNEnum::L2TP, VPNEnum::PPTP];
5135    /// Value as it appears on the wire.
5136    pub const fn as_str(&self) -> &'static str {
5137        match self {
5138            VPNEnum::IKEv2 => "IKEv2",
5139            VPNEnum::IPSec => "IPSec",
5140            VPNEnum::L2TP => "L2TP",
5141            VPNEnum::PPTP => "PPTP",
5142        }
5143    }
5144}
5145
5146impl std::fmt::Display for VPNEnum {
5147    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5148        f.write_str(self.as_str())
5149    }
5150}
5151
5152impl std::str::FromStr for VPNEnum {
5153    type Err = ();
5154    fn from_str(s: &str) -> Result<Self, ()> {
5155        Self::ALL
5156            .iter()
5157            .copied()
5158            .find(|v| v.as_str() == s)
5159            .ok_or(())
5160    }
5161}
5162
5163impl Validate for VPNEnum {
5164    #[inline]
5165    fn validate(&self, _: &Path<'_>) -> Result<(), Violation> {
5166        Ok(())
5167    }
5168}