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

#![allow(unused_imports)]

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

// --- 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<NetznutzungVertrag>,
}

#[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 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 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 MarktlokationObisDatenEdifact {
    pub datenqualitaet: Option<Datenqualitaet>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    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 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 MesslokationDatenEdifact {
    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 ObisKennzahlNutzungEdifact {
    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 LokationsbuendelDatenEdifact {
    pub referenz: Option<Referenz>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

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

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AbrechnungsdatenEdifact {
    pub naechste_netznutzungsabrechnung: Option<String>,
    pub nna_zeitraum: Option<String>,
    pub termin_netznutzungsabrechnung: 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 BetreiberEdifact {
    pub partnerrolle: Option<Partnerrolle>,
}

#[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 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_lf: Option<String>,
    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 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 betriebszustand: Option<String>,
    pub fallgruppe: Option<Fallgruppe>,
    pub fallgruppenzuordnung: Option<String>,
    pub haushaltkunde: Option<Haushaltkunde>,
    pub jahresverbrauchsprognose: Option<String>,
    pub marktlokations_id_ref: Option<String>,
    pub mengenangabe: Option<String>,
    pub mengeneinheit: Option<Mengeneinheit>,
    pub merkmal: Option<Merkmal>,
    pub netznutzung: Option<Netznutzung>,
    pub netznutzungsabrechnung_codeliste_code: Option<String>,
    pub netznutzungsabrechnungsvariante: Option<String>,
    pub paket_id: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub prognose_zeitraum: Option<PrognoseZeitraum>,
    pub referenz: Option<Referenz>,
    pub ruhende_marktlokations_id: Option<String>,
    pub zahlung_netznutzung: Option<String>,
    pub zahlung_netznutzung_codeliste_code: Option<String>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktteilnehmerEdifact {
    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 MesslokationEdifact {
    pub abrechnung_msb_ueber_nne: Option<String>,
    pub art_leistungserbringung: Option<String>,
    pub gmsb_mp_id: Option<String>,
    pub jahresverbrauchsprognose: Option<String>,
    pub mengeneinheit: Option<Mengeneinheit>,
    pub merkmal: Option<Merkmal>,
    pub messlokation_id: Option<String>,
    pub msb_eigenschaft: Option<String>,
    pub referenz: Option<Referenz>,
    pub zeitscheibe: Option<Zeitscheibe>,
    pub zugeordneter_mp: Option<String>,
}

#[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 datenqualitaet: Option<Datenqualitaet>,
    pub merkmal: Option<Merkmal>,
    pub msb_eigenschaft: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    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 produkt_identifikation: Option<ProduktIdentifikation>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[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 ObisDatenZaehlerEdifact {
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    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 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 merkmal: Option<Merkmal>,
    pub msb_eigenschaft: Option<String>,
    pub referenz: Option<Referenz>,
    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 referenz: Option<Referenz>,
    pub zeitscheibe: Option<Zeitscheibe>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TechnischeRessourceEdifact {
    pub merkmal: Option<Merkmal>,
    pub netzlokation_ref: Option<String>,
    pub produkt_identifikation: Option<ProduktIdentifikation>,
    pub referenz: Option<Referenz>,
    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_referenz: Option<String>,
    pub turnusablesung: Option<String>,
}

#[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 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 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 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>,
}

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

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

pub type VorgangBetragEdifact = VorgangAbschlagBetragEdifact;
pub type ProfilDatenEdifact = MarktlokationDatenEdifact;
pub type SteuerbareRessourceDatenEdifact = MarktlokationDatenEdifact;
pub type ZaehlerDatenEdifact = MarktlokationDatenEdifact;
pub type MarktlokationProduktDatenEdifact = MarktlokationObisDatenEdifact;
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 RedispatchDatenErwEdifact = ClearingDatenEdifact;
pub type SeqDatenZ30Edifact = ClearingDatenEdifact;
pub type SeqDatenZ32Edifact = ClearingDatenEdifact;
pub type MengenDatenErwEdifact = MengenDatenEdifact;
pub type NetznutzungsabrechnungsdatenErwEdifact = MengenDatenEdifact;
pub type NetzlokationDatenEdifact = MesslokationDatenEdifact;
pub type ObisMarktlokationEdifact = MesslokationDatenEdifact;
pub type ProduktpaketDatenEdifact = MesslokationDatenEdifact;
pub type ProduktpaketEdifact = ObisKennzahlNutzungEdifact;
pub type ZeitreihenDaten48Edifact = SeqDatenZ29Edifact;
pub type ZeitreihenDaten49Edifact = SeqDatenZ29Edifact;
pub type ProfilEdifact = LokationsbuendelDatenEdifact;
pub type ReferenzprofilEdifact = LokationsbuendelDatenEdifact;
pub type SummenzeitreihenDatenEdifact = LokationsbuendelDatenEdifact;
pub type TrancheDatenEdifact = LokationsbuendelDatenEdifact;
pub type TrancheEdifact = EnfgDatenEdifact;
