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

#![allow(dead_code, unused_imports, non_camel_case_types)]

use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;

/// kommunikationseinrichtungsTyp for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum KommunikationseinrichtungsTyp {
    /// Gerätenummer
    #[serde(rename = "Z30")]
    Geraetenummer,
    /// GSM/GPRS/UMTS-Kom.-Einr.
    #[serde(rename = "GSM")]
    GsmGprsUmtsKomEinr,
    /// Ethernet-Kom.-Einricht. LAN/WLAN
    #[serde(rename = "ETH")]
    EthernetKomEinrichtLanWlan,
    /// PLC-Kom.-Einrichtung
    #[serde(rename = "PLC")]
    PlcKomEinrichtung,
    /// Festnetz-Kom.-Einricht. TAE
    #[serde(rename = "PST")]
    FestnetzKomEinrichtTae,
    /// DSL-Kom.Einr.
    #[serde(rename = "DSL")]
    DslKomEinr,
    /// LTE-Kom.-Einr.
    #[serde(rename = "LTE")]
    LteKomEinr,
}

/// kommunikationsart for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Kommunikationsart {
    /// Elektronische Post
    #[serde(rename = "EM")]
    ElektronischePost,
    /// Telefax
    #[serde(rename = "FX")]
    Telefax,
    /// Telefon
    #[serde(rename = "TE")]
    Telefon,
    /// weiteres Telefon
    #[serde(rename = "AJ")]
    WeiteresTelefon,
    /// Handy
    #[serde(rename = "AL")]
    Handy,
}

/// kontaktfunktion for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Kontaktfunktion {
    /// Informationskontakt
    #[serde(rename = "IC")]
    Informationskontakt,
}

/// marktrolle for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Marktrolle {
    /// Dokumenten-/Nachrichtenaussteller bzw. -absender
    #[serde(rename = "MS")]
    DokumentenNachrichtenausstellerAbsender,
    /// Nachrichtenempfänger
    #[serde(rename = "MR")]
    Nachrichtenempfaenger,
}

/// rollencodetyp for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Rollencodetyp {
    /// GS1
    #[serde(rename = "9")]
    Gs1,
    /// DE, DVGW Service & Consult GmbH
    #[serde(rename = "332")]
    DeDvgwServiceConsultGmbh,
}

/// mengenumwerter.typ for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MengenumwerterDatenTyp {
    /// Gerätenummer
    #[serde(rename = "Z30")]
    Geraetenummer,
    /// Dichtemengenumwerter
    #[serde(rename = "DMU")]
    Dichtemengenumwerter,
    /// Temperaturmengenumwerter
    #[serde(rename = "TMU")]
    Temperaturmengenumwerter,
    /// Zustandsmengenumwerter
    #[serde(rename = "ZMU")]
    Zustandsmengenumwerter,
    /// Art der Volumenerfassung
    #[serde(rename = "ZC0")]
    ArtVolumenerfassung,
}

/// merkmal.code for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ObisDatenZaehlerZuordnungCode {
    /// Wertegranularität
    #[serde(rename = "ZE4")]
    Wertegranularitaet,
    /// Vor- und Nachkommastellen des Zählwerkes
    #[serde(rename = "Z33")]
    VorNachkommastellenZaehlwerkes,
    /// Lokale Kennzeichnung zu Kontrollzwecken
    #[serde(rename = "Z63")]
    LokaleKennzeichnungKontrollzwecken,
}

/// merkmal.klasse for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ObisDatenZaehlerZuordnungKlasse {
    /// Produkt
    #[serde(rename = "11")]
    Produkt,
}

/// merkmal.qualifier for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ObisDatenZaehlerZuordnungQualifier {
    /// Jährlich
    #[serde(rename = "ZD9")]
    Jaehrlich,
    /// Halbjährlich
    #[serde(rename = "ZE8")]
    Halbjaehrlich,
    /// Quartalsweise
    #[serde(rename = "ZE9")]
    Quartalsweise,
    /// Monatlich
    #[serde(rename = "ZB7")]
    Monatlich,
}

/// pruefidentifikator for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Pruefidentifikator {
    /// SDÄ Gas / Änderung vom MSB an NB
    #[serde(rename = "44116")]
    SdaeGasAenderungMsbNb,
}

/// transaktionsgrund for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Transaktionsgrund {
    /// Änderung vom MSB mit Abhängigkeiten
    #[serde(rename = "ZE8")]
    AenderungMsbAbhaengigkeiten,
}

/// geraetnummer.qualifier for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZaehlerZuordnungQualifier {
    /// neue Messeinrichtung Gas nach MsbG
    #[serde(rename = "NMG")]
    NeueMesseinrichtungGasMsbg,
    /// Drehkolbengaszähler
    #[serde(rename = "DKZ")]
    Drehkolbengaszaehler,
    /// Balgengaszähler
    #[serde(rename = "BGZ")]
    Balgengaszaehler,
    /// Turbinenradgaszähler
    #[serde(rename = "TRZ")]
    Turbinenradgaszaehler,
    /// Ultraschallgaszähler
    #[serde(rename = "UGZ")]
    Ultraschallgaszaehler,
    /// Wirbelgaszähler
    #[serde(rename = "WGZ")]
    Wirbelgaszaehler,
    /// elektronischer Haushaltszähler
    #[serde(rename = "EHZ")]
    ElektronischerHaushaltszaehler,
    /// Zur Sonderausstattung gehört z. B. Gas-Encoder
    #[serde(rename = "IVA")]
    SonderausstattungGehoertZBGasEncoder,
    /// Gerätenummer
    #[serde(rename = "Z30")]
    Geraetenummer,
    /// Art der Volumenerfassung
    #[serde(rename = "ZC0")]
    ArtVolumenerfassung,
    /// Einstutzen-Zähler
    #[serde(rename = "Z31")]
    EinstutzenZaehler,
    /// Zweistutzen-Zähler
    #[serde(rename = "Z32")]
    ZweistutzenZaehler,
    /// fernauslesbare Zähler
    #[serde(rename = "AMR")]
    FernauslesbareZaehler,
    /// manuell ausgelesene Zähler
    #[serde(rename = "MMR")]
    ManuellAusgeleseneZaehler,
}

/// merkmal.code for PID 44116
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZaehlerZuordnungCode {
    /// Zählertyp
    #[serde(rename = "E13")]
    Zaehlertyp,
    /// Befestigungsart Zähleinrichtung
    #[serde(rename = "Z28")]
    BefestigungsartZaehleinrichtung,
    /// Messwerterfassung an der Zähleinrichtung
    #[serde(rename = "E12")]
    MesswerterfassungZaehleinrichtung,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct KommunikationseinrichtungDatenGeraetnummer {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (X). (an..35)
    pub nummer: Option<String>,
    /// Optional. (an..35)
    pub teil2: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct KommunikationseinrichtungDatenKommEinrichtung {
    /// Required (unknown). ()
    pub dimension: Option<String>,
    /// Required (unknown). ()
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct KommunikationseinrichtungDatenReferenz {
    /// Required (X). (an..70)
    pub id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct KontaktKontakt {
    /// Required (X). (an..256)
    pub name: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MengenumwerterDatenGeraetnummer {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (X). (an..35)
    pub nummer: Option<String>,
    /// Optional. (an..35)
    pub teil2: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MengenumwerterDatenMengenumwerter {
    /// Required (unknown). ()
    pub dimension: Option<String>,
    /// Required (unknown). ()
    pub klasse: Option<String>,
    /// Required (X). (an..3)
    pub typ: Option<MengenumwerterDatenTyp>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MengenumwerterDatenReferenz {
    /// Required (X). (an..70)
    pub id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MengenumwerterDatenVolumenerfassung {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (X). (an..35)
    pub wert: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MessdatenregistriergeraetDatenGeraetnummer {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (X). (an..35)
    pub nummer: Option<String>,
    /// Optional. (an..35)
    pub teil2: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MessdatenregistriergeraetDatenReferenz {
    /// Required (Soll [133] ∧ [530]). ()
    pub id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MessdatenregistriergeraetDatenVolumenerfassung {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (X). (an..35)
    pub wert: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MessdatenregistriergeraetDatenZaehlerCci {
    /// Required (unknown). ()
    pub dimension: Option<String>,
    /// Required (unknown). ()
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisDatenZaehlerProduktIdentifikation {
    /// Required (X [324]). (an..35)
    pub id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisDatenZaehlerReferenz {
    /// Required (X). (an..70)
    pub id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisDatenZaehlerZuordnungMerkmal {
    /// Required (X). (an..17)
    pub code: Option<ObisDatenZaehlerZuordnungCode>,
    /// Required (unknown). ()
    pub code_codepflege: Option<String>,
    /// Required (unknown). ()
    pub codeliste: Option<String>,
    /// Required (unknown). ()
    pub codepflege: Option<String>,
    /// Required (unknown). ()
    pub dimension: Option<String>,
    /// Required (unknown). ()
    pub eigenschaft: Option<String>,
    /// Required (unknown). ()
    pub eigenschaft_2: Option<String>,
    /// Required (X). (an..3)
    pub klasse: Option<ObisDatenZaehlerZuordnungKlasse>,
    /// Required (X). (an..3)
    pub qualifier: Option<ObisDatenZaehlerZuordnungQualifier>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SmartmeterGatewayDatenGeraetnummer {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SmartmeterGatewayDatenSmgw {
    /// Required (unknown). ()
    pub dimension: Option<String>,
    /// Required (unknown). ()
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerReferenz {
    /// Required (X [951]). (an..70)
    pub id: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerZuordnungGeraetnummer {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (unknown). ()
    pub codepflege: Option<String>,
    /// Required (unknown). ()
    pub nummer: Option<String>,
    /// Required (X). (an..3)
    pub qualifier: Option<ZaehlerZuordnungQualifier>,
    /// Required (unknown). ()
    pub teil2: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerZuordnungMerkmal {
    /// Required (X). (an..17)
    pub code: Option<ZaehlerZuordnungCode>,
    /// Required (unknown). ()
    pub dimension: Option<String>,
    /// Required (unknown). ()
    pub klasse: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerZuordnungVolumenerfassung {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (unknown). ()
    pub codepflege: Option<String>,
    /// Required (X). (an..3)
    pub qualifier: Option<ZaehlerZuordnungQualifier>,
    /// Required (unknown). ()
    pub wert: Option<String>,
}

/// Map key for Marktteilnehmer instances.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub enum MarktteilnehmerKey {
    /// Dokumenten-/Nachrichtenaussteller bzw. -absender
    #[serde(rename = "MS")]
    Ms,
    /// Nachrichtenempfänger
    #[serde(rename = "MR")]
    Mr,
}

impl std::fmt::Display for MarktteilnehmerKey {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Ms => write!(f, "MS"),
            Self::Mr => write!(f, "MR"),
        }
    }
}

/// KommunikationseinrichtungDaten for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct KommunikationseinrichtungDaten {
    pub geraetnummer: Option<KommunikationseinrichtungDatenGeraetnummer>,
    pub komm_einrichtung: Option<KommunikationseinrichtungDatenKommEinrichtung>,
    /// Required (X). (an..3)
    pub kommunikationseinrichtungs_typ: Option<KommunikationseinrichtungsTyp>,
    pub referenz: Option<KommunikationseinrichtungDatenReferenz>,
}

/// Kontakt for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Kontakt {
    /// Required (X [1P0..1]). (an..3)
    pub kommunikationsart: Option<Kommunikationsart>,
    /// Required (X). (an..512)
    pub kommunikationsnummer: Option<String>,
    pub kontakt: Option<KontaktKontakt>,
    /// Required (X). (an..3)
    pub kontaktfunktion: Option<Kontaktfunktion>,
}

/// Marktteilnehmer for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Marktteilnehmer {
    /// Required (unknown). ()
    pub codeliste_code: Option<String>,
    /// Required (X). (an..3)
    pub marktrolle: Option<Marktrolle>,
    /// Required (X). (an..35)
    pub rollencodenummer: Option<String>,
    /// Required (X). (an..3)
    pub rollencodetyp: Option<Rollencodetyp>,
    pub kontakt: Option<Kontakt>,
}

/// MengenumwerterDaten for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct MengenumwerterDaten {
    pub geraetnummer: Option<MengenumwerterDatenGeraetnummer>,
    pub mengenumwerter: Option<MengenumwerterDatenMengenumwerter>,
    pub referenz: Option<MengenumwerterDatenReferenz>,
    pub volumenerfassung: Option<MengenumwerterDatenVolumenerfassung>,
}

/// MessdatenregistriergeraetDaten for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct MessdatenregistriergeraetDaten {
    pub geraetnummer: Option<MessdatenregistriergeraetDatenGeraetnummer>,
    pub referenz: Option<MessdatenregistriergeraetDatenReferenz>,
    pub volumenerfassung: Option<MessdatenregistriergeraetDatenVolumenerfassung>,
    pub zaehler_cci: Option<MessdatenregistriergeraetDatenZaehlerCci>,
}

/// Messlokation for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Messlokation {
    /// Required (X [951]). (an..35)
    pub meldepunkt_id: Option<String>,
}

/// Nachricht for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Nachricht {
    /// Required (X [931] [494]). (an..35)
    pub erstellungsdatum: Option<String>,
    /// Optional. ()
    pub nachrichtennummer: Option<String>,
    /// Optional. ()
    pub nachrichtentyp: Option<String>,
}

/// ObisDatenZaehler for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ObisDatenZaehler {
    pub produkt_identifikation: Option<ObisDatenZaehlerProduktIdentifikation>,
    pub referenz: Option<ObisDatenZaehlerReferenz>,
}

/// ObisDatenZaehlerZuordnung for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ObisDatenZaehlerZuordnung {
    pub merkmal: Option<ObisDatenZaehlerZuordnungMerkmal>,
    /// Required (unknown). ()
    pub zugeordneter_mp: Option<String>,
}

/// Prozessdaten for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Prozessdaten {
    /// Required (X [UB2]). (an..35)
    pub aenderung_zum: Option<String>,
    /// Required (X [UB2]). (an..35)
    pub gueltig_ab: Option<String>,
    /// Required (X). (an..70)
    pub pruefidentifikator: Option<Pruefidentifikator>,
    /// Required (unknown). ()
    pub status_code: Option<String>,
    /// Required (X). (an..3)
    pub transaktionsgrund: Option<Transaktionsgrund>,
    /// Required (X). (an..35)
    pub vorgang_id: Option<String>,
}

/// SmartmeterGatewayDaten for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SmartmeterGatewayDaten {
    /// Required (X [952]). (an..35)
    pub gateway_nummer: Option<String>,
    pub geraetnummer: Option<SmartmeterGatewayDatenGeraetnummer>,
    pub smgw: Option<SmartmeterGatewayDatenSmgw>,
}

/// Zaehler for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Zaehler {
    pub referenz: Option<ZaehlerReferenz>,
}

/// ZaehlerZuordnung for PID 44116 — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ZaehlerZuordnung {
    pub geraetnummer: Option<ZaehlerZuordnungGeraetnummer>,
    pub merkmal: Option<ZaehlerZuordnungMerkmal>,
    pub volumenerfassung: Option<ZaehlerZuordnungVolumenerfassung>,
}

/// PID 44116 transaction — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Transaktion {
    /// Required (Muss [2119] Soll [133] ∧ [530]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub kommunikationseinrichtung_daten: Option<Vec<KommunikationseinrichtungDaten>>,
    /// Required (Soll [133] ∧ [530]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub mengenumwerter_daten: Option<Vec<MengenumwerterDaten>>,
    /// Required (Soll [133] ∧ [530]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub messdatenregistriergeraet_daten: Option<Vec<MessdatenregistriergeraetDaten>>,
    /// Required (Muss [2061]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub messlokation: Option<Vec<Messlokation>>,
    /// Required (Muss [530] ∧ ([2287] ∨ [2353])).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub obis_daten_zaehler: Option<Vec<ObisDatenZaehler>>,
    pub obis_daten_zaehler_zuordnung: Option<ObisDatenZaehlerZuordnung>,
    pub prozessdaten: Option<Prozessdaten>,
    /// Required (Soll [130]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub smartmeter_gateway_daten: Option<Vec<SmartmeterGatewayDaten>>,
    /// Required (Muss [530]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub zaehler: Option<Vec<Zaehler>>,
    pub zaehler_zuordnung: Option<ZaehlerZuordnung>,
}

/// PID 44116 message-level — Änderung vom MSB mit Abhängig keiten.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Message {
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_map_or_vec")]
    pub marktteilnehmer: Option<BTreeMap<MarktteilnehmerKey, Marktteilnehmer>>,
    pub nachricht: Option<Nachricht>,
}

/// Complete interchange for PID 44116 — Änderung vom MSB mit Abhängig keiten.
pub type Interchange = crate::model::Interchange<Message, Transaktion>;
