// Auto-generated by automapper-generator. Do not edit.

#![allow(unused_imports)]

use serde::{Deserialize, Serialize};
use super::enums::*;

// --- Domain concept types ---

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Absender {
    pub code_qualifier: Option<String>,
    pub mp_id: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum Aggregationsverantwortung {
    #[serde(rename = "ZA8")]
    Nb,
    #[serde(rename = "ZA7")]
    Lf,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum BlindarbeitZahlungsbereitschaft {
    #[serde(rename = "ZE1")]
    Bereit,
    #[serde(rename = "ZE2")]
    NichtBereit,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum Blindarbeitabrechnung {
    #[serde(rename = "ZD9")]
    AbrechnungFindetStatt,
    #[serde(rename = "ZE0")]
    AbrechnungFindetNichtStatt,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Datum {
    pub format: Option<String>,
    pub wert: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Empfaenger {
    pub code_qualifier: Option<String>,
    pub mp_id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Fallgruppe {
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FehlerPosition {
    pub datenelement: Option<String>,
    pub gruppendatenelement: Option<String>,
    pub segment: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Geraetnummer {
    pub nummer: Option<String>,
    pub teil2: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Haushaltkunde {
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct KommEinrichtung {
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Kommunikation {
    pub art: Option<String>,
    pub nummer: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Kontakt {
    pub funktion_code: Option<KontaktFunktionCode>,
    pub name: Option<String>,
    pub nummer: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Konzession {
    pub klasse: Option<String>,
    pub merkmal: Option<KonzessionMerkmal>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum Lieferrichtung {
    #[serde(rename = "Z06")]
    Erzeugend,
    #[serde(rename = "Z07")]
    Verbrauchend,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum Mengeneinheit {
    #[serde(rename = "Z16")]
    KwhProKelvin,
    #[serde(rename = "KWH")]
    Kilowattstunde,
    #[serde(rename = "KWT")]
    Kilowatt,
    #[serde(rename = "H87")]
    Stueck,
    #[serde(rename = "P1")]
    Prozent,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Mengenumwerter {
    pub klasse: Option<String>,
    pub typ: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Merkmal {
    pub code: Option<String>,
    pub code_codepflege: Option<String>,
    pub codeliste: Option<String>,
    pub eigenschaft: Option<MerkmalEigenschaft>,
    pub klasse: Option<MerkmalKlasse>,
    pub qualifier: Option<MerkmalQualifier>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum NadQualifier {
    #[serde(rename = "MS")]
    Absender,
    #[serde(rename = "MR")]
    Empfaenger,
    #[serde(rename = "Z09")]
    KundeDesLf,
    #[serde(rename = "Z47")]
    ErwarteterKundeDesLf,
    #[serde(rename = "Z48")]
    ImSystemVorhandenerKundeDesLf,
    #[serde(rename = "Z65")]
    InformativerKundeDesLf,
    #[serde(rename = "Z04")]
    KorrespondenzanschriftKundeLf,
    #[serde(rename = "Z49")]
    ErwarteteKorrespondenzanschriftKundeLf,
    #[serde(rename = "Z50")]
    ImSystemVorhandeneKorrespondenzanschriftKundeLf,
    #[serde(rename = "Z66")]
    InformativeKorrespondenzanschriftKundeLf,
    #[serde(rename = "Z07")]
    KundeDesMsb,
    #[serde(rename = "Z39")]
    ErwarteterKundeDesMsb,
    #[serde(rename = "Z40")]
    ImSystemVorhandenerKundeDesMsb,
    #[serde(rename = "Z08")]
    KorrespondenzanschriftKundeMsb,
    #[serde(rename = "Z41")]
    ErwarteteKorrespondenzanschriftKundeMsb,
    #[serde(rename = "Z42")]
    ImSystemVorhandeneKorrespondenzanschriftKundeMsb,
    #[serde(rename = "Z25")]
    KundeDesNb,
    #[serde(rename = "Z51")]
    ErwarteterKundeDesNb,
    #[serde(rename = "Z52")]
    ImSystemVorhandenerKundeDesNb,
    #[serde(rename = "Z67")]
    InformativerKundennameDesNb,
    #[serde(rename = "Z68")]
    InformativeKorrespondenzanschriftKundeNb,
    #[serde(rename = "Z69")]
    Anschlussnehmer,
    #[serde(rename = "Z70")]
    Hausverwalter,
    #[serde(rename = "Z63")]
    Standortadresse,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Netznutzung {
    pub klasse: Option<String>,
    pub vertrag: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Priorisierung {
    pub produkt_paket_ref: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum Privilegierungsgrund {
    #[serde(rename = "ZU5")]
    StromspeicherVerlustenergie,
    #[serde(rename = "ZU6")]
    Waermepumpen,
    #[serde(rename = "ZU7")]
    AnlagenVerstromung,
    #[serde(rename = "ZU8")]
    GruenerWasserstoff,
    #[serde(rename = "ZU9")]
    StromkostenintensiveUnternehmen,
    #[serde(rename = "ZV0")]
    WasserstoffStromkostenintensiv,
    #[serde(rename = "ZV1")]
    Schienenbahnen,
    #[serde(rename = "ZV2")]
    BusseLinienverkehr,
    #[serde(rename = "ZV3")]
    Landstromanlagen,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProduktIdentifikation {
    pub funktion: Option<ProduktIdentifikationFunktion>,
    pub id: Option<String>,
    pub typ: Option<ProduktIdentifikationTyp>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProduktMerkmal {
    pub code: Option<String>,
    pub code_liste: Option<String>,
    pub code_pflege: Option<String>,
    pub eigenschaft: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProduktWert {
    pub code: Option<String>,
    pub code_liste: Option<String>,
    pub code_pflege: Option<String>,
    pub wert: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PrognoseZeitraum {
    pub beginn: Option<String>,
    pub ende: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Referenz {
    pub id: Option<String>,
    pub typ: Option<ReferenzTyp>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Smgw {
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum Spannungsebene {
    #[serde(rename = "E03")]
    Hoechstspannung,
    #[serde(rename = "E04")]
    Hochspannung,
    #[serde(rename = "E05")]
    Mittelspannung,
    #[serde(rename = "E06")]
    Niederspannung,
    #[serde(rename = "E07")]
    HoesHsUmspannung,
    #[serde(rename = "E08")]
    HsMsUmspannung,
    #[serde(rename = "E09")]
    MsNsUmspannung,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum SteuerkanalZuordnung {
    #[serde(rename = "ZF2")]
    KeinSteuerkanal,
    #[serde(rename = "ZF3")]
    SteuerkanelZugeordnet,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Umsetzungsgrad {
    pub klasse: Option<UmsetzungsgradKlasse>,
    pub prioritaet: Option<UmsetzungsgradPrioritaet>,
    pub relevanz: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum VerringerungUmlage {
    #[serde(rename = "ZF9")]
    VerringerungErwartet,
    #[serde(rename = "ZG0")]
    KeineVerringerungKunde,
    #[serde(rename = "ZG1")]
    KeineVerringerungMalo,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Volumenerfassung {
    pub wert: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Wertegranularitaet {
    pub klasse: Option<WertegranularitaetKlasse>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerCci {
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum Zaehlverfahren {
    #[serde(rename = "Z52")]
    ImsAlleMesslokationen,
    #[serde(rename = "Z53")]
    KmeOderMmeVorhanden,
    #[serde(rename = "Z68")]
    KeineMesslokation,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Zeitscheibe {
    pub id: Option<String>,
    pub referenz: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum ZugeordneterMarktpartner {
    #[serde(rename = "Z88")]
    Nb,
    #[serde(rename = "Z89")]
    Lf,
    #[serde(rename = "Z90")]
    Uenb,
    #[serde(rename = "Z91")]
    Msb,
}

// --- Companion structs ---

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VorgangAbschlagBetragEdifact {
    pub betrag_qualifier: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktlokationDatenEdifact {
    pub datenqualitaet: Option<Datenqualitaet>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerMengenEdifact {
    pub datum: Option<Datum>,
    pub menge: Option<String>,
    pub mengen_qualifier: Option<String>,
    pub mengeneinheit: Option<Mengeneinheit>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FehlerNachrichtInfoEdifact {
    pub freitext: Option<String>,
    pub freitext_zusatz: Option<String>,
    pub ortsangabe: Option<String>,
    pub ortsangabe_zusatz: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktlokationMengenEdifact {
    pub menge: Option<String>,
    pub mengen_qualifier: Option<String>,
    pub mengeneinheit: Option<Mengeneinheit>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DeklarationslisteDatenZuordnungEdifact {
    pub merkmal: Option<Merkmal>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LastprofilDatenZuordnungEdifact {
    pub merkmal: Option<Merkmal>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ClearingDatenEdifact {
    pub produkt_identifikation: Option<ProduktIdentifikation>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MengenDatenEdifact {
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NetzlokationDatenEdifact {
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktlokationObisDatenEdifact {
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SeqDatenZ29Edifact {
    pub referenz: Option<Referenz>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProfilEdifact {
    pub referenz: Option<Referenz>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AbrechnungsdatenEdifact {
    pub naechste_netznutzungsabrechnung: Option<String>,
    pub nna_format: Option<String>,
    pub nna_zeitraum: Option<String>,
    pub nna_zeitraum_format: Option<String>,
    pub termin_netznutzungsabrechnung: Option<String>,
    pub termin_nna_format: Option<String>,
    pub termindaten_referenz: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AnsprechpartnerEdifact {
    pub anrede_code: Option<String>,
    pub namenszusatz1: Option<String>,
    pub namenszusatz2: Option<String>,
    pub partnerrolle: Option<Partnerrolle>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DeklarationslisteDatenEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EnfgDatenEdifact {
    pub privilegierungsgrund: Option<Privilegierungsgrund>,
    pub privilegierungsgrund2: Option<String>,
    pub verringerung_umlage: Option<VerringerungUmlage>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FehlerEdifact {
    pub abweichungs_info: Option<String>,
    pub abweichungs_info_zusatz: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FehlerNachrichtRefEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FreitextEdifact {
    pub text: Option<String>,
    pub text_referenz: Option<String>,
    pub text_zeile2: Option<String>,
    pub text_zeile3: Option<String>,
    pub text_zeile4: Option<String>,
    pub text_zeile5: Option<String>,
    pub textbezug: Option<String>,
    pub textfunktion: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GemeindeDatenEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GeschaeftspartnerEdifact {
    pub adresszusatz: Option<String>,
    pub anrede: Option<String>,
    pub anrede_code: Option<String>,
    pub codelist_code: Option<String>,
    pub codeliste_code: Option<String>,
    pub codepflege_code: Option<String>,
    pub kundennummer_alt_lf: Option<String>,
    pub kundennummer_beim_lf: Option<String>,
    pub kundennummer_lf: Option<String>,
    pub nad_qualifier: Option<NadQualifier>,
    pub name_format_code: Option<String>,
    pub name_zeile3: Option<String>,
    pub name_zeile3_feld: Option<String>,
    pub name_zeile4: Option<String>,
    pub name_zeile4_feld: Option<String>,
    pub namenszusatz1: Option<String>,
    pub namenszusatz2: Option<String>,
    pub partnerrolle: Option<Partnerrolle>,
    pub referenz: Option<Referenz>,
    pub region: Option<String>,
    pub strasse_zeile2: Option<String>,
    pub strasse_zeile4: Option<String>,
    pub strasse_zusatz: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zusatzinfo: Option<String>,
    pub zusatzinfo2: Option<String>,
    pub zusatzinfo3: Option<String>,
    pub zusatzinfo4: Option<String>,
    pub zusatzinfo5: Option<String>,
    pub zusatzinfo_zeile2: Option<String>,
    pub zusatzinfo_zeile3: Option<String>,
    pub zusatzinfo_zeile4: Option<String>,
    pub zusatzinfo_zeile5: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct KommunikationseinrichtungDatenEdifact {
    pub geraetnummer: Option<Geraetnummer>,
    pub komm_einrichtung: Option<KommEinrichtung>,
    pub kommunikationseinrichtungs_typ: Option<String>,
    pub referenz: Option<Referenz>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct KonzessionDatenEdifact {
    pub kav_betrag: Option<String>,
    pub kav_codeliste_code: Option<String>,
    pub kav_gruppe: Option<String>,
    pub kav_zusatzinfo: Option<String>,
    pub konzession: Option<Konzession>,
    pub obis_kennzahl_ref: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LastprofilDatenEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LokationsbuendelDatenEdifact {
    pub lokationsbuendel_id: Option<String>,
    pub objektcode: Option<String>,
    pub referenz: Option<Referenz>,
    pub vorgelagerte_lokation: Option<String>,
    pub vorgelagerte_lokation2: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordnete_marktlokation: Option<String>,
    pub zugeordnete_netzlokation: Option<String>,
    pub zugeordnete_steuerbare_ressource: Option<String>,
    pub zugeordnete_technische_ressource: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LokationsbuendelStrukturEdifact {
    pub referenz_qualifier: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LokationsbuendelZuordnungEdifact {
    pub lokationsbuendel_id: Option<String>,
    pub marktlokations_id: Option<String>,
    pub marktlokations_ids: Option<Vec<String>>,
    pub messlokations_id: Option<String>,
    pub messlokations_id_refs: Option<Vec<String>>,
    pub netzlokations_id: Option<String>,
    pub referenz: Option<Referenz>,
    pub technische_ressource_id: Option<String>,
    pub technische_ressource_id_refs: Option<Vec<String>>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktlokationEdifact {
    pub abrechnungsmethode: Option<String>,
    pub art_leistungserbringung: Option<String>,
    pub bilanzierungsgebiet: Option<String>,
    pub bilanzkreis: Option<String>,
    pub codeliste_code: Option<String>,
    pub codepflege_code: Option<String>,
    pub eigenschaft_msb: Option<String>,
    pub grundlage_lieferscheinpruefung: Option<String>,
    pub haushaltskunde: Option<String>,
    pub jahresverbrauchsprognose: Option<String>,
    pub land_der_foerderung: Option<String>,
    pub land_der_foerderung_codeliste: Option<String>,
    pub land_der_foerderung_codepflege: Option<String>,
    pub marktlokations_id_ref: Option<String>,
    pub mengenangabe: Option<String>,
    pub mengeneinheit: Option<Mengeneinheit>,
    pub merkmal: Option<Merkmal>,
    pub merkmal_code: Option<String>,
    pub merkmal_wert: Option<String>,
    pub netznutzungsvertrag: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub prognose_zeitraum: Option<PrognoseZeitraum>,
    pub prognosegrundlage: Option<String>,
    pub prognosegrundlage_code: Option<String>,
    pub referenz: Option<Referenz>,
    pub regelzone: Option<String>,
    pub ruhende_marktlokations_id: Option<String>,
    pub seq_zeitscheibe_z80: Option<String>,
    pub verbrauchsaufteilung: Option<String>,
    pub zahlung_netznutzung: Option<String>,
    pub zeitreihen_code: Option<String>,
    pub zeitreihentyp: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
    pub zugeordneter_mp_id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktlokationZuordnungEdifact {
    pub bilanzierungsgebiet: Option<serde_json::Value>,
    pub marktgebiet: Option<serde_json::Value>,
    pub merkmal: Option<Merkmal>,
    pub regelzone: Option<serde_json::Value>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktteilnehmerEdifact {
    pub codepflege_code: Option<String>,
    pub kommunikation: Option<Kommunikation>,
    pub kontakt: Option<Kontakt>,
    pub marktrolle: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MengenumwerterDatenEdifact {
    pub geraetnummer: Option<Geraetnummer>,
    pub mengenumwerter: Option<Mengenumwerter>,
    pub referenz: Option<Referenz>,
    pub volumenerfassung: Option<Volumenerfassung>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MessdatenregistriergeraetDatenEdifact {
    pub geraetnummer: Option<Geraetnummer>,
    pub referenz: Option<Referenz>,
    pub volumenerfassung: Option<Volumenerfassung>,
    pub zaehler_cci: Option<ZaehlerCci>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MesslokationDatenEdifact {
    pub gmsb_mp_id: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub seq_qualifier: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
    pub zugeordneter_mp_lokationstyp: Option<String>,
    pub zugeordneter_mp_merkmal: Option<String>,
    pub zugeordneter_mp_qualifier: Option<String>,
    pub zugeordneter_mp_rolle: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MesslokationEdifact {
    pub abrechnung_msb_ueber_nne: Option<String>,
    pub art_leistungserbringung: Option<String>,
    pub codeliste_code: Option<String>,
    pub codepflege_code: Option<String>,
    pub eigenschaft_msb: Option<String>,
    pub g_msb_merkmal_wert: Option<String>,
    pub g_msb_mp_id: Option<String>,
    pub gmsb_mp_id: Option<String>,
    pub jahresverbrauchsprognose: Option<String>,
    pub mengeneinheit: Option<Mengeneinheit>,
    pub merkmal: Option<Merkmal>,
    pub merkmal_code: Option<String>,
    pub merkmal_wert: Option<String>,
    pub messlokation_id: Option<String>,
    pub msb_eigenschaft: Option<String>,
    pub referenz: Option<Referenz>,
    pub seq_zeitscheibe_z18: Option<String>,
    pub seq_zeitscheibe_zg6: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MesslokationZuordnungEdifact {
    pub gmsb: Option<serde_json::Value>,
    pub marktpartner: Option<serde_json::Value>,
    pub merkmal: Option<Merkmal>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MessproduktDatenEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NachrichtEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NachrichtenpruefungEdifact {
    pub anwendungscode: Option<String>,
    pub fehler_position: Option<FehlerPosition>,
    pub freigabenummer: Option<String>,
    pub nachrichtentyp: Option<String>,
    pub service_segment_bezeichner: Option<String>,
    pub syntax_fehler_code: Option<String>,
    pub versionsnummer: Option<String>,
    pub verwaltungs_organisation: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NetzlokationEdifact {
    pub codeliste_code: Option<String>,
    pub codepflege_code: Option<String>,
    pub datenqualitaet: Option<Datenqualitaet>,
    pub eigenschaft_msb: Option<String>,
    pub merkmal: Option<Merkmal>,
    pub merkmal_code: Option<String>,
    pub merkmal_wert: Option<String>,
    pub msb_eigenschaft: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub seq_zeitscheibe_za9: Option<String>,
    pub zahler_blindarbeit: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NetznutzungsabrechnungsdatenEdifact {
    pub art_produkt_code: Option<String>,
    pub merkmal: Option<Merkmal>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisDatenMarktlokationEdifact {
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub wertegranularitaet: Option<Wertegranularitaet>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisKennzahlDatenEdifact {
    pub merkmal: Option<Merkmal>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisKennzahlEdifact {
    pub geraetereferenz_nummer: Option<String>,
    pub geraetereferenz_qualifier: Option<String>,
    pub konfigurations_id: Option<String>,
    pub merkmal: Option<Merkmal>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub rff_geraet_nummer: Option<String>,
    pub rff_qualifier_geraet: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisZaehleinrichtungEdifact {
    pub konfigurations_id: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub smartmeter_gateway_id: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PositionEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProduktpaketDatenEdifact {
    pub priorisierung: Option<Priorisierung>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub produkt_merkmal: Option<ProduktMerkmal>,
    pub produkt_wert: Option<ProduktWert>,
    pub produkteigenschaft: Option<serde_json::Value>,
    pub referenz: Option<Referenz>,
    pub umsetzungsgrad: Option<Umsetzungsgrad>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProfilDatenEdifact {
    pub klimazone_codeliste: Option<String>,
    pub klimazone_codepflege: Option<String>,
    pub klimazone_id: Option<String>,
    pub klimazone_klasse: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub profilschar: Option<String>,
    pub referenz: Option<Referenz>,
    pub standardlastprofil: Option<String>,
    pub standardlastprofil_verfahren: Option<String>,
    pub tagesparameter_profil: Option<String>,
    pub tagesparameter_verfahren: Option<String>,
    pub z08_zeitscheibe_ref: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProzessdatenEdifact {
    pub aenderungszeitpunkt: Option<String>,
    pub antwort_status_code: Option<String>,
    pub ebd_nummer: Option<String>,
    pub eingangsdatum: Option<String>,
    pub pruefschritt_code: Option<String>,
    pub transaktionsgrund_status: Option<String>,
    pub zeitraum_id_antwort: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RedispatchDatenEdifact {
    pub merkmal: Option<Merkmal>,
    pub referenz: Option<Referenz>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ReferenzEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SegmentfehlerEdifact {
    pub datenelement_fehler_code: Option<String>,
    pub fehler_position: Option<FehlerPosition>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SeqDatenZ31Edifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SeqDatenZ33Edifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SmartmeterGatewayDatenEdifact {
    pub gateway_nummer: Option<String>,
    pub geraetnummer: Option<Geraetnummer>,
    pub smgw: Option<Smgw>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SteuerbareRessourceEdifact {
    pub codeliste_code: Option<String>,
    pub codepflege_code: Option<String>,
    pub eigenschaft_msb: Option<String>,
    pub merkmal: Option<Merkmal>,
    pub merkmal_code: Option<String>,
    pub merkmal_wert: Option<String>,
    pub msb_eigenschaft: Option<String>,
    pub referenz: Option<Referenz>,
    pub seq_zeitscheibe_zb1: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SteuerbareRessourceProduktDatenEdifact {
    pub datenqualitaet: Option<Datenqualitaet>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub steuerbare_ressource_ref: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TechnischeRessourceDatenEdifact {
    pub datenqualitaet: Option<Datenqualitaet>,
    pub netzlokation_ref: Option<String>,
    pub referenz: Option<Referenz>,
    pub steuerbare_ressource_ref: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TechnischeRessourceEdifact {
    pub codeliste_code: Option<String>,
    pub codepflege_code: Option<String>,
    pub fernsteuerbarkeit_status: Option<String>,
    pub merkmal: Option<Merkmal>,
    pub netzlokation_ref: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub seq_qualifier: Option<String>,
    pub seq_zeitscheibe_z52: Option<String>,
    pub seq_zeitscheibe_zg4: Option<String>,
    pub steuerbare_ressource_ref: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TermindatenEdifact {
    pub termindaten_qualifier: Option<String>,
    pub termindaten_referenz: Option<String>,
    pub turnusablesung: Option<String>,
    pub turnusablesung_format: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TrancheEdifact {
    pub codeliste_code: Option<String>,
    pub codepflege_code: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UebertragungspruefungEdifact {
    pub absender: Option<Absender>,
    pub empfaenger: Option<Empfaenger>,
    pub fehler_position: Option<FehlerPosition>,
    pub service_segment_bezeichner: Option<String>,
    pub syntax_fehler_code: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VorgangEdifact {
    pub artikel_nummer_typ: Option<String>,
    pub auftragsdatum: Option<String>,
    pub auftragsdatum_format: Option<String>,
    pub handlung_code: Option<String>,
    pub menge_einheit: Option<String>,
    pub mmm_einheit: Option<String>,
    pub mmm_menge: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VorgangPreisEdifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VorgangReferenzEdifact {
    pub referenz_qualifier: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerDatenEdifact {
    pub datenqualitaet: Option<Datenqualitaet>,
    pub energierichtung_erz: Option<String>,
    pub energierichtung_zrz: Option<String>,
    pub geraete_nummer: Option<String>,
    pub geraete_nummer2: Option<String>,
    pub merkmal: Option<Merkmal>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub tarifart_etz: Option<String>,
    pub tarifart_ntz: Option<String>,
    pub tarifart_ztz: Option<String>,
    pub zaehlerart: Option<String>,
    pub zaehlertyp: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerEdifact {
    pub geraete_code: Option<String>,
    pub geraete_nummer: Option<String>,
    pub jahresverbrauchsprognose: Option<String>,
    pub mengeneinheit: Option<Mengeneinheit>,
    pub merkmal: Option<Merkmal>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    pub smartmeter_gateway_id: Option<String>,
    pub zaehlertyp_merkmal: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerZuordnungEdifact {
    pub geraetnummer: Option<Geraetnummer>,
    pub merkmal: Option<Merkmal>,
    pub volumenerfassung: Option<Volumenerfassung>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlzeitaenderungEdifact {
    pub zeitpunkt_format: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZeitreihenDaten47Edifact {
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZeitscheibeEdifact {
    pub datenqualitaet: Option<Datenqualitaet>,
    pub verwendung_der_daten_ab: Option<String>,
    pub verwendung_der_daten_bis: Option<String>,
    pub zeitraum_nummer: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zeitscheibe_id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZuordnungEdifact {
    pub geraete_nr1: Option<String>,
    pub geraete_nr2: Option<String>,
    pub geraete_nr3: Option<String>,
    pub geraetereferenz: Option<String>,
    pub merkmal: Option<Merkmal>,
    pub wandlerfaktor: Option<String>,
    pub wandlerfaktor_code: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

// --- Companion type aliases (identical field sets) ---

pub type VorgangBetragEdifact = VorgangAbschlagBetragEdifact;
pub type SteuerbareRessourceDatenEdifact = MarktlokationDatenEdifact;
pub type ZeitreihenDaten47MengenEdifact = ZaehlerMengenEdifact;
pub type ZeitreihenDaten48MengenEdifact = ZaehlerMengenEdifact;
pub type ZeitreihenDaten49MengenEdifact = ZaehlerMengenEdifact;
pub type FehlerVorgangInfoEdifact = FehlerNachrichtInfoEdifact;
pub type NetznutzungsabrechnungsdatenMengenEdifact = MarktlokationMengenEdifact;
pub type SeqDatenZ29MengenEdifact = MarktlokationMengenEdifact;
pub type TechnischeRessourceMengenEdifact = MarktlokationMengenEdifact;
pub type ObisKennzahlZuordnungEdifact = DeklarationslisteDatenZuordnungEdifact;
pub type ProduktpaketZuordnungEdifact = DeklarationslisteDatenZuordnungEdifact;
pub type TechnischeRessourceZuordnungEdifact = DeklarationslisteDatenZuordnungEdifact;
pub type ObisDatenZaehlerZuordnungEdifact = LastprofilDatenZuordnungEdifact;
pub type RedispatchDatenErwEdifact = ClearingDatenEdifact;
pub type SeqDatenZ30Edifact = ClearingDatenEdifact;
pub type SeqDatenZ32Edifact = ClearingDatenEdifact;
pub type MengenDatenErwEdifact = MengenDatenEdifact;
pub type NetznutzungsabrechnungsdatenErwEdifact = MengenDatenEdifact;
pub type ObisDatenZaehlerEdifact = MengenDatenEdifact;
pub type ObisMarktlokationEdifact = NetzlokationDatenEdifact;
pub type MarktlokationProduktDatenEdifact = MarktlokationObisDatenEdifact;
pub type ObisKennzahlNutzungEdifact = MarktlokationObisDatenEdifact;
pub type ProduktpaketEdifact = MarktlokationObisDatenEdifact;
pub type ZeitreihenDaten48Edifact = SeqDatenZ29Edifact;
pub type ZeitreihenDaten49Edifact = SeqDatenZ29Edifact;
pub type ReferenzprofilEdifact = ProfilEdifact;
pub type SummenzeitreihenDatenEdifact = ProfilEdifact;
pub type TrancheDatenEdifact = ProfilEdifact;

