Skip to main content

ocpp_kit/v2_0_1/
enums.rs

1// @generated by `cargo xtask codegen` from the vendored OCPP JSON schemas.
2// DO NOT EDIT — re-run the generator instead. CI fails if this file is stale.
3
4//! Enumerations defined by OCPP 2.0.1, generated from the official JSON schemas.
5
6#![allow(unused_imports, clippy::doc_markdown, clippy::struct_excessive_bools)]
7#![allow(
8    clippy::too_many_lines,
9    clippy::too_many_arguments,
10    clippy::wildcard_imports
11)]
12#![allow(clippy::match_same_arms, clippy::fn_params_excessive_bools)]
13
14use alloc::string::String;
15use alloc::vec::Vec;
16
17use crate::ocpp_enum;
18
19ocpp_enum! {
20    /// APN. APN_ Authentication. APN_ Authentication_ Code
21    /// Authentication method.
22    APNAuthentication {
23        /// `CHAP`.
24        CHAP = "CHAP",
25        /// `NONE`.
26        NONE = "NONE",
27        /// `PAP`.
28        PAP = "PAP",
29        /// `AUTO`.
30        AUTO = "AUTO",
31    }
32}
33
34ocpp_enum! {
35    /// Attribute type for which value is requested. When absent, default Actual is assumed.
36    Attribute {
37        /// `Actual`.
38        Actual = "Actual",
39        /// `Target`.
40        Target = "Target",
41        /// `MinSet`.
42        MinSet = "MinSet",
43        /// `MaxSet`.
44        MaxSet = "MaxSet",
45    }
46}
47
48impl Default for Attribute {
49    /// Schema default: `Actual`.
50    fn default() -> Self {
51        Self::Actual
52    }
53}
54
55ocpp_enum! {
56    /// ID_ Token. Status. Authorization_ Status
57    /// Current status of the ID Token.
58    AuthorizationStatus {
59        /// `Accepted`.
60        Accepted = "Accepted",
61        /// `Blocked`.
62        Blocked = "Blocked",
63        /// `ConcurrentTx`.
64        ConcurrentTx = "ConcurrentTx",
65        /// `Expired`.
66        Expired = "Expired",
67        /// `Invalid`.
68        Invalid = "Invalid",
69        /// `NoCredit`.
70        NoCredit = "NoCredit",
71        /// `NotAllowedTypeEVSE`.
72        NotAllowedTypeEVSE = "NotAllowedTypeEVSE",
73        /// `NotAtThisLocation`.
74        NotAtThisLocation = "NotAtThisLocation",
75        /// `NotAtThisTime`.
76        NotAtThisTime = "NotAtThisTime",
77        /// `Unknown`.
78        Unknown = "Unknown",
79    }
80}
81
82ocpp_enum! {
83    /// Certificate status information.
84    /// - if all certificates are valid: return 'Accepted'.
85    /// - if one of the certificates was revoked, return 'CertificateRevoked'.
86    AuthorizeCertificateStatus {
87        /// `Accepted`.
88        Accepted = "Accepted",
89        /// `SignatureError`.
90        SignatureError = "SignatureError",
91        /// `CertificateExpired`.
92        CertificateExpired = "CertificateExpired",
93        /// `CertificateRevoked`.
94        CertificateRevoked = "CertificateRevoked",
95        /// `NoCertificateAvailable`.
96        NoCertificateAvailable = "NoCertificateAvailable",
97        /// `CertChainError`.
98        CertChainError = "CertChainError",
99        /// `ContractCancelled`.
100        ContractCancelled = "ContractCancelled",
101    }
102}
103
104ocpp_enum! {
105    /// This contains the reason for sending this message to the CSMS.
106    BootReason {
107        /// `ApplicationReset`.
108        ApplicationReset = "ApplicationReset",
109        /// `FirmwareUpdate`.
110        FirmwareUpdate = "FirmwareUpdate",
111        /// `LocalReset`.
112        LocalReset = "LocalReset",
113        /// `PowerUp`.
114        PowerUp = "PowerUp",
115        /// `RemoteReset`.
116        RemoteReset = "RemoteReset",
117        /// `ScheduledReset`.
118        ScheduledReset = "ScheduledReset",
119        /// `Triggered`.
120        Triggered = "Triggered",
121        /// `Unknown`.
122        Unknown = "Unknown",
123        /// `Watchdog`.
124        Watchdog = "Watchdog",
125    }
126}
127
128ocpp_enum! {
129    /// This indicates the success or failure of the canceling of a reservation by CSMS.
130    CancelReservationStatus {
131        /// `Accepted`.
132        Accepted = "Accepted",
133        /// `Rejected`.
134        Rejected = "Rejected",
135    }
136}
137
138ocpp_enum! {
139    /// Defines whether certificate needs to be installed or updated.
140    CertificateAction {
141        /// `Install`.
142        Install = "Install",
143        /// `Update`.
144        Update = "Update",
145    }
146}
147
148ocpp_enum! {
149    /// Returns whether certificate signing has been accepted, otherwise rejected.
150    CertificateSignedStatus {
151        /// `Accepted`.
152        Accepted = "Accepted",
153        /// `Rejected`.
154        Rejected = "Rejected",
155    }
156}
157
158ocpp_enum! {
159    /// 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 <<signcertificaterequest,SignCertificateRequest>> that requested this certificate to be signed AND both the 15118 connection and the Charging Station connection are implemented.
160    CertificateSigningUse {
161        /// `ChargingStationCertificate`.
162        ChargingStationCertificate = "ChargingStationCertificate",
163        /// `V2GCertificate`.
164        V2GCertificate = "V2GCertificate",
165    }
166}
167
168ocpp_enum! {
169    /// This indicates whether the Charging Station is able to perform the availability change.
170    ChangeAvailabilityStatus {
171        /// `Accepted`.
172        Accepted = "Accepted",
173        /// `Rejected`.
174        Rejected = "Rejected",
175        /// `Scheduled`.
176        Scheduled = "Scheduled",
177    }
178}
179
180ocpp_enum! {
181    /// Source of the charging limit.
182    ChargingLimitSource {
183        /// `EMS`.
184        EMS = "EMS",
185        /// `Other`.
186        Other = "Other",
187        /// `SO`.
188        SO = "SO",
189        /// `CSO`.
190        CSO = "CSO",
191    }
192}
193
194ocpp_enum! {
195    /// Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code
196    /// Indicates the kind of schedule.
197    ChargingProfileKind {
198        /// `Absolute`.
199        Absolute = "Absolute",
200        /// `Recurring`.
201        Recurring = "Recurring",
202        /// `Relative`.
203        Relative = "Relative",
204    }
205}
206
207ocpp_enum! {
208    /// Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code
209    /// Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request.
210    ChargingProfilePurpose {
211        /// `ChargingStationExternalConstraints`.
212        ChargingStationExternalConstraints = "ChargingStationExternalConstraints",
213        /// `ChargingStationMaxProfile`.
214        ChargingStationMaxProfile = "ChargingStationMaxProfile",
215        /// `TxDefaultProfile`.
216        TxDefaultProfile = "TxDefaultProfile",
217        /// `TxProfile`.
218        TxProfile = "TxProfile",
219    }
220}
221
222ocpp_enum! {
223    /// 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.
224    ChargingProfileStatus {
225        /// `Accepted`.
226        Accepted = "Accepted",
227        /// `Rejected`.
228        Rejected = "Rejected",
229    }
230}
231
232ocpp_enum! {
233    /// Can be used to force a power or current profile.
234    ChargingRateUnit {
235        /// `W`.
236        W = "W",
237        /// `A`.
238        A = "A",
239    }
240}
241
242ocpp_enum! {
243    /// Transaction. State. Transaction_ State_ Code
244    /// Current charging state, is required when state
245    /// has changed.
246    ChargingState {
247        /// `Charging`.
248        Charging = "Charging",
249        /// `EVConnected`.
250        EVConnected = "EVConnected",
251        /// `SuspendedEV`.
252        SuspendedEV = "SuspendedEV",
253        /// `SuspendedEVSE`.
254        SuspendedEVSE = "SuspendedEVSE",
255        /// `Idle`.
256        Idle = "Idle",
257    }
258}
259
260ocpp_enum! {
261    /// Accepted if the Charging Station has executed the request, otherwise rejected.
262    ClearCacheStatus {
263        /// `Accepted`.
264        Accepted = "Accepted",
265        /// `Rejected`.
266        Rejected = "Rejected",
267    }
268}
269
270ocpp_enum! {
271    /// Indicates if the Charging Station was able to execute the request.
272    ClearChargingProfileStatus {
273        /// `Accepted`.
274        Accepted = "Accepted",
275        /// `Unknown`.
276        Unknown = "Unknown",
277    }
278}
279
280ocpp_enum! {
281    /// Returns whether the Charging Station has been able to remove the message.
282    ClearMessageStatus {
283        /// `Accepted`.
284        Accepted = "Accepted",
285        /// `Unknown`.
286        Unknown = "Unknown",
287    }
288}
289
290ocpp_enum! {
291    /// Result of the clear request for this monitor, identified by its Id.
292    ClearMonitoringStatus {
293        /// `Accepted`.
294        Accepted = "Accepted",
295        /// `Rejected`.
296        Rejected = "Rejected",
297        /// `NotFound`.
298        NotFound = "NotFound",
299    }
300}
301
302ocpp_enum! {
303    /// The OCPP 2.0.1 `ComponentCriterion` enumeration.
304    ComponentCriterion {
305        /// `Active`.
306        Active = "Active",
307        /// `Available`.
308        Available = "Available",
309        /// `Enabled`.
310        Enabled = "Enabled",
311        /// `Problem`.
312        Problem = "Problem",
313    }
314}
315
316ocpp_enum! {
317    /// This field specifies the connector type.
318    Connector {
319        /// `cCCS1`.
320        CCCS1 = "cCCS1",
321        /// `cCCS2`.
322        CCCS2 = "cCCS2",
323        /// `cG105`.
324        CG105 = "cG105",
325        /// `cTesla`.
326        CTesla = "cTesla",
327        /// `cType1`.
328        CType1 = "cType1",
329        /// `cType2`.
330        CType2 = "cType2",
331        /// `s309-1P-16A`.
332        S3091P16A = "s309-1P-16A",
333        /// `s309-1P-32A`.
334        S3091P32A = "s309-1P-32A",
335        /// `s309-3P-16A`.
336        S3093P16A = "s309-3P-16A",
337        /// `s309-3P-32A`.
338        S3093P32A = "s309-3P-32A",
339        /// `sBS1361`.
340        SBS1361 = "sBS1361",
341        /// `sCEE-7-7`.
342        SCEE77 = "sCEE-7-7",
343        /// `sType2`.
344        SType2 = "sType2",
345        /// `sType3`.
346        SType3 = "sType3",
347        /// `Other1PhMax16A`.
348        Other1PhMax16A = "Other1PhMax16A",
349        /// `Other1PhOver16A`.
350        Other1PhOver16A = "Other1PhOver16A",
351        /// `Other3Ph`.
352        Other3Ph = "Other3Ph",
353        /// `Pan`.
354        Pan = "Pan",
355        /// `wInductive`.
356        WInductive = "wInductive",
357        /// `wResonant`.
358        WResonant = "wResonant",
359        /// `Undetermined`.
360        Undetermined = "Undetermined",
361        /// `Unknown`.
362        Unknown = "Unknown",
363    }
364}
365
366ocpp_enum! {
367    /// This contains the current status of the Connector.
368    ConnectorStatus {
369        /// `Available`.
370        Available = "Available",
371        /// `Occupied`.
372        Occupied = "Occupied",
373        /// `Reserved`.
374        Reserved = "Reserved",
375        /// `Unavailable`.
376        Unavailable = "Unavailable",
377        /// `Faulted`.
378        Faulted = "Faulted",
379    }
380}
381
382ocpp_enum! {
383    /// Cost. Cost_ Kind. Cost_ Kind_ Code
384    /// The kind of cost referred to in the message element amount
385    CostKind {
386        /// `CarbonDioxideEmission`.
387        CarbonDioxideEmission = "CarbonDioxideEmission",
388        /// `RelativePricePercentage`.
389        RelativePricePercentage = "RelativePricePercentage",
390        /// `RenewableGenerationPercentage`.
391        RenewableGenerationPercentage = "RenewableGenerationPercentage",
392    }
393}
394
395ocpp_enum! {
396    /// Indicates whether the request was accepted.
397    CustomerInformationStatus {
398        /// `Accepted`.
399        Accepted = "Accepted",
400        /// `Rejected`.
401        Rejected = "Rejected",
402        /// `Invalid`.
403        Invalid = "Invalid",
404    }
405}
406
407ocpp_enum! {
408    /// Data type of this variable.
409    Data {
410        /// `string`.
411        String = "string",
412        /// `decimal`.
413        Decimal = "decimal",
414        /// `integer`.
415        Integer = "integer",
416        /// `dateTime`.
417        DateTime = "dateTime",
418        /// `boolean`.
419        Boolean = "boolean",
420        /// `OptionList`.
421        OptionList = "OptionList",
422        /// `SequenceList`.
423        SequenceList = "SequenceList",
424        /// `MemberList`.
425        MemberList = "MemberList",
426    }
427}
428
429ocpp_enum! {
430    /// This indicates the success or failure of the data transfer.
431    DataTransferStatus {
432        /// `Accepted`.
433        Accepted = "Accepted",
434        /// `Rejected`.
435        Rejected = "Rejected",
436        /// `UnknownMessageId`.
437        UnknownMessageId = "UnknownMessageId",
438        /// `UnknownVendorId`.
439        UnknownVendorId = "UnknownVendorId",
440    }
441}
442
443ocpp_enum! {
444    /// Charging Station indicates if it can process the request.
445    DeleteCertificateStatus {
446        /// `Accepted`.
447        Accepted = "Accepted",
448        /// `Failed`.
449        Failed = "Failed",
450        /// `NotFound`.
451        NotFound = "NotFound",
452    }
453}
454
455ocpp_enum! {
456    /// This indicates whether the Charging Station is able to display the message.
457    DisplayMessageStatus {
458        /// `Accepted`.
459        Accepted = "Accepted",
460        /// `NotSupportedMessageFormat`.
461        NotSupportedMessageFormat = "NotSupportedMessageFormat",
462        /// `Rejected`.
463        Rejected = "Rejected",
464        /// `NotSupportedPriority`.
465        NotSupportedPriority = "NotSupportedPriority",
466        /// `NotSupportedState`.
467        NotSupportedState = "NotSupportedState",
468        /// `UnknownTransaction`.
469        UnknownTransaction = "UnknownTransaction",
470    }
471}
472
473ocpp_enum! {
474    /// Charging_ Needs. Requested. Energy_ Transfer_ Mode_ Code
475    /// Mode of energy transfer requested by the EV.
476    EnergyTransferMode {
477        /// `DC`.
478        DC = "DC",
479        /// `AC_single_phase`.
480        ACSinglePhase = "AC_single_phase",
481        /// `AC_two_phase`.
482        ACTwoPhase = "AC_two_phase",
483        /// `AC_three_phase`.
484        ACThreePhase = "AC_three_phase",
485    }
486}
487
488ocpp_enum! {
489    /// Specifies the event notification type of the message.
490    EventNotification {
491        /// `HardWiredNotification`.
492        HardWiredNotification = "HardWiredNotification",
493        /// `HardWiredMonitor`.
494        HardWiredMonitor = "HardWiredMonitor",
495        /// `PreconfiguredMonitor`.
496        PreconfiguredMonitor = "PreconfiguredMonitor",
497        /// `CustomMonitor`.
498        CustomMonitor = "CustomMonitor",
499    }
500}
501
502ocpp_enum! {
503    /// Type of monitor that triggered this event, e.g. exceeding a threshold value.
504    EventTrigger {
505        /// `Alerting`.
506        Alerting = "Alerting",
507        /// `Delta`.
508        Delta = "Delta",
509        /// `Periodic`.
510        Periodic = "Periodic",
511    }
512}
513
514ocpp_enum! {
515    /// This contains the progress status of the firmware installation.
516    FirmwareStatus {
517        /// `Downloaded`.
518        Downloaded = "Downloaded",
519        /// `DownloadFailed`.
520        DownloadFailed = "DownloadFailed",
521        /// `Downloading`.
522        Downloading = "Downloading",
523        /// `DownloadScheduled`.
524        DownloadScheduled = "DownloadScheduled",
525        /// `DownloadPaused`.
526        DownloadPaused = "DownloadPaused",
527        /// `Idle`.
528        Idle = "Idle",
529        /// `InstallationFailed`.
530        InstallationFailed = "InstallationFailed",
531        /// `Installing`.
532        Installing = "Installing",
533        /// `Installed`.
534        Installed = "Installed",
535        /// `InstallRebooting`.
536        InstallRebooting = "InstallRebooting",
537        /// `InstallScheduled`.
538        InstallScheduled = "InstallScheduled",
539        /// `InstallVerificationFailed`.
540        InstallVerificationFailed = "InstallVerificationFailed",
541        /// `InvalidSignature`.
542        InvalidSignature = "InvalidSignature",
543        /// `SignatureVerified`.
544        SignatureVerified = "SignatureVerified",
545    }
546}
547
548ocpp_enum! {
549    /// This indicates whether the Charging Station is able to accept this request.
550    GenericDeviceModelStatus {
551        /// `Accepted`.
552        Accepted = "Accepted",
553        /// `Rejected`.
554        Rejected = "Rejected",
555        /// `NotSupported`.
556        NotSupported = "NotSupported",
557        /// `EmptyResultSet`.
558        EmptyResultSet = "EmptyResultSet",
559    }
560}
561
562ocpp_enum! {
563    /// The Charging Station will indicate if it was
564    /// able to process the request
565    GenericStatus {
566        /// `Accepted`.
567        Accepted = "Accepted",
568        /// `Rejected`.
569        Rejected = "Rejected",
570    }
571}
572
573ocpp_enum! {
574    /// Indicates the type of the requested certificate(s).
575    GetCertificateIdUse {
576        /// `V2GRootCertificate`.
577        V2GRootCertificate = "V2GRootCertificate",
578        /// `MORootCertificate`.
579        MORootCertificate = "MORootCertificate",
580        /// `CSMSRootCertificate`.
581        CSMSRootCertificate = "CSMSRootCertificate",
582        /// `V2GCertificateChain`.
583        V2GCertificateChain = "V2GCertificateChain",
584        /// `ManufacturerRootCertificate`.
585        ManufacturerRootCertificate = "ManufacturerRootCertificate",
586    }
587}
588
589ocpp_enum! {
590    /// This indicates whether the charging station was able to retrieve the OCSP certificate status.
591    GetCertificateStatusEnum {
592        /// `Accepted`.
593        Accepted = "Accepted",
594        /// `Failed`.
595        Failed = "Failed",
596    }
597}
598
599ocpp_enum! {
600    /// This indicates whether the Charging Station is able to process this request and will send <<reportchargingprofilesrequest, ReportChargingProfilesRequest>> messages.
601    GetChargingProfileStatus {
602        /// `Accepted`.
603        Accepted = "Accepted",
604        /// `NoProfiles`.
605        NoProfiles = "NoProfiles",
606    }
607}
608
609ocpp_enum! {
610    /// Indicates if the Charging Station has Display Messages that match the request criteria in the <<getdisplaymessagesrequest,GetDisplayMessagesRequest>>
611    GetDisplayMessagesStatus {
612        /// `Accepted`.
613        Accepted = "Accepted",
614        /// `Unknown`.
615        Unknown = "Unknown",
616    }
617}
618
619ocpp_enum! {
620    /// Charging Station indicates if it can process the request.
621    GetInstalledCertificateStatus {
622        /// `Accepted`.
623        Accepted = "Accepted",
624        /// `NotFound`.
625        NotFound = "NotFound",
626    }
627}
628
629ocpp_enum! {
630    /// Result status of getting the variable.
631    GetVariableStatus {
632        /// `Accepted`.
633        Accepted = "Accepted",
634        /// `Rejected`.
635        Rejected = "Rejected",
636        /// `UnknownComponent`.
637        UnknownComponent = "UnknownComponent",
638        /// `UnknownVariable`.
639        UnknownVariable = "UnknownVariable",
640        /// `NotSupportedAttributeType`.
641        NotSupportedAttributeType = "NotSupportedAttributeType",
642    }
643}
644
645ocpp_enum! {
646    /// Used algorithms for the hashes provided.
647    HashAlgorithm {
648        /// `SHA256`.
649        SHA256 = "SHA256",
650        /// `SHA384`.
651        SHA384 = "SHA384",
652        /// `SHA512`.
653        SHA512 = "SHA512",
654    }
655}
656
657ocpp_enum! {
658    /// Enumeration of possible idToken types.
659    IdTokenEnum {
660        /// `Central`.
661        Central = "Central",
662        /// `eMAID`.
663        EMAID = "eMAID",
664        /// `ISO14443`.
665        ISO14443 = "ISO14443",
666        /// `ISO15693`.
667        ISO15693 = "ISO15693",
668        /// `KeyCode`.
669        KeyCode = "KeyCode",
670        /// `Local`.
671        Local = "Local",
672        /// `MacAddress`.
673        MacAddress = "MacAddress",
674        /// `NoAuthorization`.
675        NoAuthorization = "NoAuthorization",
676    }
677}
678
679ocpp_enum! {
680    /// Charging Station indicates if installation was successful.
681    InstallCertificateStatus {
682        /// `Accepted`.
683        Accepted = "Accepted",
684        /// `Rejected`.
685        Rejected = "Rejected",
686        /// `Failed`.
687        Failed = "Failed",
688    }
689}
690
691ocpp_enum! {
692    /// Indicates the certificate type that is sent.
693    InstallCertificateUse {
694        /// `V2GRootCertificate`.
695        V2GRootCertificate = "V2GRootCertificate",
696        /// `MORootCertificate`.
697        MORootCertificate = "MORootCertificate",
698        /// `CSMSRootCertificate`.
699        CSMSRootCertificate = "CSMSRootCertificate",
700        /// `ManufacturerRootCertificate`.
701        ManufacturerRootCertificate = "ManufacturerRootCertificate",
702    }
703}
704
705ocpp_enum! {
706    /// Indicates whether the message was processed properly.
707    Iso15118EVCertificateStatus {
708        /// `Accepted`.
709        Accepted = "Accepted",
710        /// `Failed`.
711        Failed = "Failed",
712    }
713}
714
715ocpp_enum! {
716    /// Sampled_ Value. Location. Location_ Code
717    /// Indicates where the measured value has been sampled. Default =  "Outlet"
718    Location {
719        /// `Body`.
720        Body = "Body",
721        /// `Cable`.
722        Cable = "Cable",
723        /// `EV`.
724        EV = "EV",
725        /// `Inlet`.
726        Inlet = "Inlet",
727        /// `Outlet`.
728        Outlet = "Outlet",
729    }
730}
731
732impl Default for Location {
733    /// Schema default: `Outlet`.
734    fn default() -> Self {
735        Self::Outlet
736    }
737}
738
739ocpp_enum! {
740    /// This contains the type of log file that the Charging Station
741    /// should send.
742    Log {
743        /// `DiagnosticsLog`.
744        DiagnosticsLog = "DiagnosticsLog",
745        /// `SecurityLog`.
746        SecurityLog = "SecurityLog",
747    }
748}
749
750ocpp_enum! {
751    /// This field indicates whether the Charging Station was able to accept the request.
752    LogStatus {
753        /// `Accepted`.
754        Accepted = "Accepted",
755        /// `Rejected`.
756        Rejected = "Rejected",
757        /// `AcceptedCanceled`.
758        AcceptedCanceled = "AcceptedCanceled",
759    }
760}
761
762ocpp_enum! {
763    /// Sampled_ Value. Measurand. Measurand_ Code
764    /// Type of measurement. Default = "Energy.Active.Import.Register"
765    Measurand {
766        /// `Current.Export`.
767        CurrentExport = "Current.Export",
768        /// `Current.Import`.
769        CurrentImport = "Current.Import",
770        /// `Current.Offered`.
771        CurrentOffered = "Current.Offered",
772        /// `Energy.Active.Export.Register`.
773        EnergyActiveExportRegister = "Energy.Active.Export.Register",
774        /// `Energy.Active.Import.Register`.
775        EnergyActiveImportRegister = "Energy.Active.Import.Register",
776        /// `Energy.Reactive.Export.Register`.
777        EnergyReactiveExportRegister = "Energy.Reactive.Export.Register",
778        /// `Energy.Reactive.Import.Register`.
779        EnergyReactiveImportRegister = "Energy.Reactive.Import.Register",
780        /// `Energy.Active.Export.Interval`.
781        EnergyActiveExportInterval = "Energy.Active.Export.Interval",
782        /// `Energy.Active.Import.Interval`.
783        EnergyActiveImportInterval = "Energy.Active.Import.Interval",
784        /// `Energy.Active.Net`.
785        EnergyActiveNet = "Energy.Active.Net",
786        /// `Energy.Reactive.Export.Interval`.
787        EnergyReactiveExportInterval = "Energy.Reactive.Export.Interval",
788        /// `Energy.Reactive.Import.Interval`.
789        EnergyReactiveImportInterval = "Energy.Reactive.Import.Interval",
790        /// `Energy.Reactive.Net`.
791        EnergyReactiveNet = "Energy.Reactive.Net",
792        /// `Energy.Apparent.Net`.
793        EnergyApparentNet = "Energy.Apparent.Net",
794        /// `Energy.Apparent.Import`.
795        EnergyApparentImport = "Energy.Apparent.Import",
796        /// `Energy.Apparent.Export`.
797        EnergyApparentExport = "Energy.Apparent.Export",
798        /// `Frequency`.
799        Frequency = "Frequency",
800        /// `Power.Active.Export`.
801        PowerActiveExport = "Power.Active.Export",
802        /// `Power.Active.Import`.
803        PowerActiveImport = "Power.Active.Import",
804        /// `Power.Factor`.
805        PowerFactor = "Power.Factor",
806        /// `Power.Offered`.
807        PowerOffered = "Power.Offered",
808        /// `Power.Reactive.Export`.
809        PowerReactiveExport = "Power.Reactive.Export",
810        /// `Power.Reactive.Import`.
811        PowerReactiveImport = "Power.Reactive.Import",
812        /// `SoC`.
813        SoC = "SoC",
814        /// `Voltage`.
815        Voltage = "Voltage",
816    }
817}
818
819impl Default for Measurand {
820    /// Schema default: `Energy.Active.Import.Register`.
821    fn default() -> Self {
822        Self::EnergyActiveImportRegister
823    }
824}
825
826ocpp_enum! {
827    /// Message_ Content. Format. Message_ Format_ Code
828    /// urn:x-enexis:ecdm:uid:1:570848
829    /// Format of the message.
830    MessageFormat {
831        /// `ASCII`.
832        ASCII = "ASCII",
833        /// `HTML`.
834        HTML = "HTML",
835        /// `URI`.
836        URI = "URI",
837        /// `UTF8`.
838        UTF8 = "UTF8",
839    }
840}
841
842ocpp_enum! {
843    /// If provided the Charging Station shall return Display Messages with the given priority only.
844    MessagePriority {
845        /// `AlwaysFront`.
846        AlwaysFront = "AlwaysFront",
847        /// `InFront`.
848        InFront = "InFront",
849        /// `NormalCycle`.
850        NormalCycle = "NormalCycle",
851    }
852}
853
854ocpp_enum! {
855    /// If provided the Charging Station shall return Display Messages with the given state only.
856    MessageState {
857        /// `Charging`.
858        Charging = "Charging",
859        /// `Faulted`.
860        Faulted = "Faulted",
861        /// `Idle`.
862        Idle = "Idle",
863        /// `Unavailable`.
864        Unavailable = "Unavailable",
865    }
866}
867
868ocpp_enum! {
869    /// Type of message to be triggered.
870    MessageTrigger {
871        /// `BootNotification`.
872        BootNotification = "BootNotification",
873        /// `LogStatusNotification`.
874        LogStatusNotification = "LogStatusNotification",
875        /// `FirmwareStatusNotification`.
876        FirmwareStatusNotification = "FirmwareStatusNotification",
877        /// `Heartbeat`.
878        Heartbeat = "Heartbeat",
879        /// `MeterValues`.
880        MeterValues = "MeterValues",
881        /// `SignChargingStationCertificate`.
882        SignChargingStationCertificate = "SignChargingStationCertificate",
883        /// `SignV2GCertificate`.
884        SignV2GCertificate = "SignV2GCertificate",
885        /// `StatusNotification`.
886        StatusNotification = "StatusNotification",
887        /// `TransactionEvent`.
888        TransactionEvent = "TransactionEvent",
889        /// `SignCombinedCertificate`.
890        SignCombinedCertificate = "SignCombinedCertificate",
891        /// `PublishFirmwareStatusNotification`.
892        PublishFirmwareStatusNotification = "PublishFirmwareStatusNotification",
893    }
894}
895
896ocpp_enum! {
897    /// The type of this monitor, e.g. a threshold, delta or periodic monitor.
898    Monitor {
899        /// `UpperThreshold`.
900        UpperThreshold = "UpperThreshold",
901        /// `LowerThreshold`.
902        LowerThreshold = "LowerThreshold",
903        /// `Delta`.
904        Delta = "Delta",
905        /// `Periodic`.
906        Periodic = "Periodic",
907        /// `PeriodicClockAligned`.
908        PeriodicClockAligned = "PeriodicClockAligned",
909    }
910}
911
912ocpp_enum! {
913    /// Specify which monitoring base will be set
914    MonitoringBase {
915        /// `All`.
916        All = "All",
917        /// `FactoryDefault`.
918        FactoryDefault = "FactoryDefault",
919        /// `HardWiredOnly`.
920        HardWiredOnly = "HardWiredOnly",
921    }
922}
923
924ocpp_enum! {
925    /// The OCPP 2.0.1 `MonitoringCriterion` enumeration.
926    MonitoringCriterion {
927        /// `ThresholdMonitoring`.
928        ThresholdMonitoring = "ThresholdMonitoring",
929        /// `DeltaMonitoring`.
930        DeltaMonitoring = "DeltaMonitoring",
931        /// `PeriodicMonitoring`.
932        PeriodicMonitoring = "PeriodicMonitoring",
933    }
934}
935
936ocpp_enum! {
937    /// Defines the mutability of this attribute. Default is ReadWrite when omitted.
938    Mutability {
939        /// `ReadOnly`.
940        ReadOnly = "ReadOnly",
941        /// `WriteOnly`.
942        WriteOnly = "WriteOnly",
943        /// `ReadWrite`.
944        ReadWrite = "ReadWrite",
945    }
946}
947
948impl Default for Mutability {
949    /// Schema default: `ReadWrite`.
950    fn default() -> Self {
951        Self::ReadWrite
952    }
953}
954
955ocpp_enum! {
956    /// 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.
957    NotifyEVChargingNeedsStatus {
958        /// `Accepted`.
959        Accepted = "Accepted",
960        /// `Rejected`.
961        Rejected = "Rejected",
962        /// `Processing`.
963        Processing = "Processing",
964    }
965}
966
967ocpp_enum! {
968    /// Applicable Network Interface.
969    OCPPInterface {
970        /// `Wired0`.
971        Wired0 = "Wired0",
972        /// `Wired1`.
973        Wired1 = "Wired1",
974        /// `Wired2`.
975        Wired2 = "Wired2",
976        /// `Wired3`.
977        Wired3 = "Wired3",
978        /// `Wireless0`.
979        Wireless0 = "Wireless0",
980        /// `Wireless1`.
981        Wireless1 = "Wireless1",
982        /// `Wireless2`.
983        Wireless2 = "Wireless2",
984        /// `Wireless3`.
985        Wireless3 = "Wireless3",
986    }
987}
988
989ocpp_enum! {
990    /// Communication_ Function. OCPP_ Transport. OCPP_ Transport_ Code
991    /// 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.
992    OCPPTransport {
993        /// `JSON`.
994        JSON = "JSON",
995        /// `SOAP`.
996        SOAP = "SOAP",
997    }
998}
999
1000ocpp_enum! {
1001    /// Communication_ Function. OCPP_ Version. OCPP_ Version_ Code
1002    /// Defines the OCPP version used for this communication function.
1003    OCPPVersion {
1004        /// `OCPP12`.
1005        OCPP12 = "OCPP12",
1006        /// `OCPP15`.
1007        OCPP15 = "OCPP15",
1008        /// `OCPP16`.
1009        OCPP16 = "OCPP16",
1010        /// `OCPP20`.
1011        OCPP20 = "OCPP20",
1012    }
1013}
1014
1015ocpp_enum! {
1016    /// This contains the type of availability change that the Charging Station should perform.
1017    OperationalStatus {
1018        /// `Inoperative`.
1019        Inoperative = "Inoperative",
1020        /// `Operative`.
1021        Operative = "Operative",
1022    }
1023}
1024
1025ocpp_enum! {
1026    /// Sampled_ Value. Phase. Phase_ Code
1027    /// 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.
1028    Phase {
1029        /// `L1`.
1030        L1 = "L1",
1031        /// `L2`.
1032        L2 = "L2",
1033        /// `L3`.
1034        L3 = "L3",
1035        /// `N`.
1036        N = "N",
1037        /// `L1-N`.
1038        L1N = "L1-N",
1039        /// `L2-N`.
1040        L2N = "L2-N",
1041        /// `L3-N`.
1042        L3N = "L3-N",
1043        /// `L1-L2`.
1044        L1L2 = "L1-L2",
1045        /// `L2-L3`.
1046        L2L3 = "L2-L3",
1047        /// `L3-L1`.
1048        L3L1 = "L3-L1",
1049    }
1050}
1051
1052ocpp_enum! {
1053    /// This contains the progress status of the publishfirmware
1054    /// installation.
1055    PublishFirmwareStatus {
1056        /// `Idle`.
1057        Idle = "Idle",
1058        /// `DownloadScheduled`.
1059        DownloadScheduled = "DownloadScheduled",
1060        /// `Downloading`.
1061        Downloading = "Downloading",
1062        /// `Downloaded`.
1063        Downloaded = "Downloaded",
1064        /// `Published`.
1065        Published = "Published",
1066        /// `DownloadFailed`.
1067        DownloadFailed = "DownloadFailed",
1068        /// `DownloadPaused`.
1069        DownloadPaused = "DownloadPaused",
1070        /// `InvalidChecksum`.
1071        InvalidChecksum = "InvalidChecksum",
1072        /// `ChecksumVerified`.
1073        ChecksumVerified = "ChecksumVerified",
1074        /// `PublishFailed`.
1075        PublishFailed = "PublishFailed",
1076    }
1077}
1078
1079ocpp_enum! {
1080    /// Sampled_ Value. Context. Reading_ Context_ Code
1081    /// Type of detail value: start, end or sample. Default = "Sample.Periodic"
1082    ReadingContext {
1083        /// `Interruption.Begin`.
1084        InterruptionBegin = "Interruption.Begin",
1085        /// `Interruption.End`.
1086        InterruptionEnd = "Interruption.End",
1087        /// `Other`.
1088        Other = "Other",
1089        /// `Sample.Clock`.
1090        SampleClock = "Sample.Clock",
1091        /// `Sample.Periodic`.
1092        SamplePeriodic = "Sample.Periodic",
1093        /// `Transaction.Begin`.
1094        TransactionBegin = "Transaction.Begin",
1095        /// `Transaction.End`.
1096        TransactionEnd = "Transaction.End",
1097        /// `Trigger`.
1098        Trigger = "Trigger",
1099    }
1100}
1101
1102impl Default for ReadingContext {
1103    /// Schema default: `Sample.Periodic`.
1104    fn default() -> Self {
1105        Self::SamplePeriodic
1106    }
1107}
1108
1109ocpp_enum! {
1110    /// Transaction. Stopped_ Reason. EOT_ Reason_ Code
1111    /// This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local".
1112    Reason {
1113        /// `DeAuthorized`.
1114        DeAuthorized = "DeAuthorized",
1115        /// `EmergencyStop`.
1116        EmergencyStop = "EmergencyStop",
1117        /// `EnergyLimitReached`.
1118        EnergyLimitReached = "EnergyLimitReached",
1119        /// `EVDisconnected`.
1120        EVDisconnected = "EVDisconnected",
1121        /// `GroundFault`.
1122        GroundFault = "GroundFault",
1123        /// `ImmediateReset`.
1124        ImmediateReset = "ImmediateReset",
1125        /// `Local`.
1126        Local = "Local",
1127        /// `LocalOutOfCredit`.
1128        LocalOutOfCredit = "LocalOutOfCredit",
1129        /// `MasterPass`.
1130        MasterPass = "MasterPass",
1131        /// `Other`.
1132        Other = "Other",
1133        /// `OvercurrentFault`.
1134        OvercurrentFault = "OvercurrentFault",
1135        /// `PowerLoss`.
1136        PowerLoss = "PowerLoss",
1137        /// `PowerQuality`.
1138        PowerQuality = "PowerQuality",
1139        /// `Reboot`.
1140        Reboot = "Reboot",
1141        /// `Remote`.
1142        Remote = "Remote",
1143        /// `SOCLimitReached`.
1144        SOCLimitReached = "SOCLimitReached",
1145        /// `StoppedByEV`.
1146        StoppedByEV = "StoppedByEV",
1147        /// `TimeLimitReached`.
1148        TimeLimitReached = "TimeLimitReached",
1149        /// `Timeout`.
1150        Timeout = "Timeout",
1151    }
1152}
1153
1154ocpp_enum! {
1155    /// Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code
1156    /// Indicates the start point of a recurrence.
1157    RecurrencyKind {
1158        /// `Daily`.
1159        Daily = "Daily",
1160        /// `Weekly`.
1161        Weekly = "Weekly",
1162    }
1163}
1164
1165ocpp_enum! {
1166    /// This contains whether the Charging Station has been registered
1167    /// within the CSMS.
1168    RegistrationStatus {
1169        /// `Accepted`.
1170        Accepted = "Accepted",
1171        /// `Pending`.
1172        Pending = "Pending",
1173        /// `Rejected`.
1174        Rejected = "Rejected",
1175    }
1176}
1177
1178ocpp_enum! {
1179    /// This field specifies the report base.
1180    ReportBase {
1181        /// `ConfigurationInventory`.
1182        ConfigurationInventory = "ConfigurationInventory",
1183        /// `FullInventory`.
1184        FullInventory = "FullInventory",
1185        /// `SummaryInventory`.
1186        SummaryInventory = "SummaryInventory",
1187    }
1188}
1189
1190ocpp_enum! {
1191    /// Status indicating whether the Charging Station accepts the request to start a transaction.
1192    RequestStartStopStatus {
1193        /// `Accepted`.
1194        Accepted = "Accepted",
1195        /// `Rejected`.
1196        Rejected = "Rejected",
1197    }
1198}
1199
1200ocpp_enum! {
1201    /// The updated reservation status.
1202    ReservationUpdateStatus {
1203        /// `Expired`.
1204        Expired = "Expired",
1205        /// `Removed`.
1206        Removed = "Removed",
1207    }
1208}
1209
1210ocpp_enum! {
1211    /// This indicates the success or failure of the reservation.
1212    ReserveNowStatus {
1213        /// `Accepted`.
1214        Accepted = "Accepted",
1215        /// `Faulted`.
1216        Faulted = "Faulted",
1217        /// `Occupied`.
1218        Occupied = "Occupied",
1219        /// `Rejected`.
1220        Rejected = "Rejected",
1221        /// `Unavailable`.
1222        Unavailable = "Unavailable",
1223    }
1224}
1225
1226ocpp_enum! {
1227    /// This contains the type of reset that the Charging Station or EVSE should perform.
1228    ResetEnum {
1229        /// `Immediate`.
1230        Immediate = "Immediate",
1231        /// `OnIdle`.
1232        OnIdle = "OnIdle",
1233    }
1234}
1235
1236ocpp_enum! {
1237    /// This indicates whether the Charging Station is able to perform the reset.
1238    ResetStatus {
1239        /// `Accepted`.
1240        Accepted = "Accepted",
1241        /// `Rejected`.
1242        Rejected = "Rejected",
1243        /// `Scheduled`.
1244        Scheduled = "Scheduled",
1245    }
1246}
1247
1248ocpp_enum! {
1249    /// This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
1250    SendLocalListStatus {
1251        /// `Accepted`.
1252        Accepted = "Accepted",
1253        /// `Failed`.
1254        Failed = "Failed",
1255        /// `VersionMismatch`.
1256        VersionMismatch = "VersionMismatch",
1257    }
1258}
1259
1260ocpp_enum! {
1261    /// Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
1262    SetMonitoringStatus {
1263        /// `Accepted`.
1264        Accepted = "Accepted",
1265        /// `UnknownComponent`.
1266        UnknownComponent = "UnknownComponent",
1267        /// `UnknownVariable`.
1268        UnknownVariable = "UnknownVariable",
1269        /// `UnsupportedMonitorType`.
1270        UnsupportedMonitorType = "UnsupportedMonitorType",
1271        /// `Rejected`.
1272        Rejected = "Rejected",
1273        /// `Duplicate`.
1274        Duplicate = "Duplicate",
1275    }
1276}
1277
1278ocpp_enum! {
1279    /// Result of operation.
1280    SetNetworkProfileStatus {
1281        /// `Accepted`.
1282        Accepted = "Accepted",
1283        /// `Rejected`.
1284        Rejected = "Rejected",
1285        /// `Failed`.
1286        Failed = "Failed",
1287    }
1288}
1289
1290ocpp_enum! {
1291    /// Result status of setting the variable.
1292    SetVariableStatus {
1293        /// `Accepted`.
1294        Accepted = "Accepted",
1295        /// `Rejected`.
1296        Rejected = "Rejected",
1297        /// `UnknownComponent`.
1298        UnknownComponent = "UnknownComponent",
1299        /// `UnknownVariable`.
1300        UnknownVariable = "UnknownVariable",
1301        /// `NotSupportedAttributeType`.
1302        NotSupportedAttributeType = "NotSupportedAttributeType",
1303        /// `RebootRequired`.
1304        RebootRequired = "RebootRequired",
1305    }
1306}
1307
1308ocpp_enum! {
1309    /// This contains the type of this event.
1310    /// The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
1311    TransactionEventEnum {
1312        /// `Ended`.
1313        Ended = "Ended",
1314        /// `Started`.
1315        Started = "Started",
1316        /// `Updated`.
1317        Updated = "Updated",
1318    }
1319}
1320
1321ocpp_enum! {
1322    /// Indicates whether the Charging Station will send the requested notification or not.
1323    TriggerMessageStatus {
1324        /// `Accepted`.
1325        Accepted = "Accepted",
1326        /// `Rejected`.
1327        Rejected = "Rejected",
1328        /// `NotImplemented`.
1329        NotImplemented = "NotImplemented",
1330    }
1331}
1332
1333ocpp_enum! {
1334    /// Reason the Charging Station sends this message to the CSMS
1335    TriggerReason {
1336        /// `Authorized`.
1337        Authorized = "Authorized",
1338        /// `CablePluggedIn`.
1339        CablePluggedIn = "CablePluggedIn",
1340        /// `ChargingRateChanged`.
1341        ChargingRateChanged = "ChargingRateChanged",
1342        /// `ChargingStateChanged`.
1343        ChargingStateChanged = "ChargingStateChanged",
1344        /// `Deauthorized`.
1345        Deauthorized = "Deauthorized",
1346        /// `EnergyLimitReached`.
1347        EnergyLimitReached = "EnergyLimitReached",
1348        /// `EVCommunicationLost`.
1349        EVCommunicationLost = "EVCommunicationLost",
1350        /// `EVConnectTimeout`.
1351        EVConnectTimeout = "EVConnectTimeout",
1352        /// `MeterValueClock`.
1353        MeterValueClock = "MeterValueClock",
1354        /// `MeterValuePeriodic`.
1355        MeterValuePeriodic = "MeterValuePeriodic",
1356        /// `TimeLimitReached`.
1357        TimeLimitReached = "TimeLimitReached",
1358        /// `Trigger`.
1359        Trigger = "Trigger",
1360        /// `UnlockCommand`.
1361        UnlockCommand = "UnlockCommand",
1362        /// `StopAuthorized`.
1363        StopAuthorized = "StopAuthorized",
1364        /// `EVDeparted`.
1365        EVDeparted = "EVDeparted",
1366        /// `EVDetected`.
1367        EVDetected = "EVDetected",
1368        /// `RemoteStop`.
1369        RemoteStop = "RemoteStop",
1370        /// `RemoteStart`.
1371        RemoteStart = "RemoteStart",
1372        /// `AbnormalCondition`.
1373        AbnormalCondition = "AbnormalCondition",
1374        /// `SignedDataReceived`.
1375        SignedDataReceived = "SignedDataReceived",
1376        /// `ResetCommand`.
1377        ResetCommand = "ResetCommand",
1378    }
1379}
1380
1381ocpp_enum! {
1382    /// This indicates whether the Charging Station has unlocked the connector.
1383    UnlockStatus {
1384        /// `Unlocked`.
1385        Unlocked = "Unlocked",
1386        /// `UnlockFailed`.
1387        UnlockFailed = "UnlockFailed",
1388        /// `OngoingAuthorizedTransaction`.
1389        OngoingAuthorizedTransaction = "OngoingAuthorizedTransaction",
1390        /// `UnknownConnector`.
1391        UnknownConnector = "UnknownConnector",
1392    }
1393}
1394
1395ocpp_enum! {
1396    /// Indicates whether the Local Controller succeeded in unpublishing the firmware.
1397    UnpublishFirmwareStatus {
1398        /// `DownloadOngoing`.
1399        DownloadOngoing = "DownloadOngoing",
1400        /// `NoFirmware`.
1401        NoFirmware = "NoFirmware",
1402        /// `Unpublished`.
1403        Unpublished = "Unpublished",
1404    }
1405}
1406
1407ocpp_enum! {
1408    /// This contains the type of update (full or differential) of this request.
1409    Update {
1410        /// `Differential`.
1411        Differential = "Differential",
1412        /// `Full`.
1413        Full = "Full",
1414    }
1415}
1416
1417ocpp_enum! {
1418    /// This field indicates whether the Charging Station was able to accept the request.
1419    UpdateFirmwareStatus {
1420        /// `Accepted`.
1421        Accepted = "Accepted",
1422        /// `Rejected`.
1423        Rejected = "Rejected",
1424        /// `AcceptedCanceled`.
1425        AcceptedCanceled = "AcceptedCanceled",
1426        /// `InvalidCertificate`.
1427        InvalidCertificate = "InvalidCertificate",
1428        /// `RevokedCertificate`.
1429        RevokedCertificate = "RevokedCertificate",
1430    }
1431}
1432
1433ocpp_enum! {
1434    /// This contains the status of the log upload.
1435    UploadLogStatus {
1436        /// `BadMessage`.
1437        BadMessage = "BadMessage",
1438        /// `Idle`.
1439        Idle = "Idle",
1440        /// `NotSupportedOperation`.
1441        NotSupportedOperation = "NotSupportedOperation",
1442        /// `PermissionDenied`.
1443        PermissionDenied = "PermissionDenied",
1444        /// `Uploaded`.
1445        Uploaded = "Uploaded",
1446        /// `UploadFailure`.
1447        UploadFailure = "UploadFailure",
1448        /// `Uploading`.
1449        Uploading = "Uploading",
1450        /// `AcceptedCanceled`.
1451        AcceptedCanceled = "AcceptedCanceled",
1452    }
1453}
1454
1455ocpp_enum! {
1456    /// VPN. Type. VPN_ Code
1457    /// Type of VPN
1458    VPNEnum {
1459        /// `IKEv2`.
1460        IKEv2 = "IKEv2",
1461        /// `IPSec`.
1462        IPSec = "IPSec",
1463        /// `L2TP`.
1464        L2TP = "L2TP",
1465        /// `PPTP`.
1466        PPTP = "PPTP",
1467    }
1468}