// 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;

/// textbezug for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Textbezug {
    /// Zusätzliche Informationen (für allgemeine Hinweise)
    #[serde(rename = "ACB")]
    AllgemeineHinweise,
    /// Information zum Zählerstand
    #[serde(rename = "ADM")]
    InformationZaehlerstand,
}

/// anredeCode for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AnredeCode {
    /// Struktur von Personennamen
    #[serde(rename = "Z01")]
    Personenname,
    /// Struktur der Firmenbezeichnung
    #[serde(rename = "Z02")]
    Firmenbezeichnung,
}

/// partnerrolle for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Partnerrolle {
    /// Lieferanschrift
    #[serde(rename = "DP")]
    Lieferanschrift,
}

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

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

/// konzession.merkmal for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum KonzessionDatenMerkmal {
    /// Konzessionsabgabe
    #[serde(rename = "Z08")]
    Konzessionsabgabe,
}

/// kavGruppe for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum KavGruppe {
    /// für alle konzessionsvertraglichen Sonderregelungen, die nicht in die Systemat...
    #[serde(rename = "KAS")]
    AlleKonzessionsvertraglichenSonderregelungenSystematik,
    /// Sondervertragskunden < 1 kV nach § 2 (7) und > 1 kV, Preis nach § 2 (3) (für ...
    #[serde(rename = "SA")]
    Sondervertragskunden1KvParagraph271KvPreisParagraph,
    /// Kennzeichnung, dass ein abweichender Preis für Sondervertragskunden vorliegt
    #[serde(rename = "SAS")]
    KennzeichnungDassAbweichenderPreisSondervertragskunden,
    /// Kennzeichnung, dass ein abweichender Preis für Tarifkunden vorliegt
    #[serde(rename = "TAS")]
    KennzeichnungDassAbweichenderPreisTarifkundenVorliegt,
    /// für Gas nach KAV § 2 (2) 2a bei ausschließlicher Nutzung zum Kochen und Warmw...
    #[serde(rename = "TK")]
    GasKavParagraph222aAusschliesslicherNutzungKochen,
    /// Kennzeichnung, wenn nach KAV § 2 (2) 2a ein anderer Preis zu verwenden ist
    #[serde(rename = "TKS")]
    KennzeichnungKavParagraph222aAndererPreisVerwenden,
}

/// merkmal.code for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum LastprofilDatenZuordnungCode {
    /// synthetisches Verfahren
    #[serde(rename = "E01")]
    SynthetischesVerfahren,
    /// analytisches Verfahren
    #[serde(rename = "Z10")]
    AnalytischesVerfahren,
}

/// merkmal.codepflege for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum LastprofilDatenZuordnungCodepflege {
    /// Vergeben vom Händler (hier Netzbetreiber)
    #[serde(rename = "89")]
    Netzbetreiber,
    /// DE, BDEW (Bundesverband der Energie- und Wasserwirtschaft e.V.)
    #[serde(rename = "293")]
    Bdew,
}

/// merkmal.klasse for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum LastprofilDatenZuordnungKlasse {
    /// Lastprofil
    #[serde(rename = "Z12")]
    Lastprofil,
}

/// merkmal.qualifier for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum LastprofilDatenZuordnungQualifier {
    /// Dieser Code ist in der Anwendung durch einen zulässigen Code zu ersetzen!
    #[serde(rename = "XYZ")]
    NbGueltigerCode,
}

/// bilanzierungsgebiet.qualifier for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MarktlokationZuordnungQualifier {
    /// 1. Priorität
    #[serde(rename = "Z75")]
    Prioritaet1,
    /// 2. Priorität
    #[serde(rename = "Z76")]
    Prioritaet2,
    /// 3. Priorität
    #[serde(rename = "Z77")]
    Prioritaet3,
    /// 4. Priorität
    #[serde(rename = "Z78")]
    Prioritaet4,
    /// 5. Priorität
    #[serde(rename = "Z79")]
    Prioritaet5,
    /// Netznutzungsvertrag
    #[serde(rename = "Z74")]
    Netznutzungsvertrag,
    /// Zahlung der Netznutzung
    #[serde(rename = "Z73")]
    ZahlungNetznutzung,
}

/// merkmal.klasse for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MarktlokationZuordnungKlasse {
    /// Bilanzkreis
    #[serde(rename = "Z19")]
    Bk,
}

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

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

/// befristungGrund for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum BefristungGrund {
    /// Kunde verlässt oder bezieht eine schon bestehende Marktlokation
    #[serde(rename = "E01")]
    Auszug,
    /// Kunde bezieht erstmals eine Marktlokation (z. B. Neubau)
    #[serde(rename = "E02")]
    Neubezug,
    /// - Kunde bleibt an der Marktlokation, hat nur den Marktpartner gewechselt
    #[serde(rename = "E03")]
    Lieferantenwechsel,
}

/// marktlokationRef for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MarktlokationRef {
    /// GeLi Gas / Anmeldung NN
    #[serde(rename = "44001")]
    GeliGasAnmeldungNn,
}

/// pruefidentifikator for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Pruefidentifikator {
    /// GeLi Gas / Anmeldung NN
    #[serde(rename = "44001")]
    GeliGasAnmeldungNn,
}

/// transaktionsgrund for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Transaktionsgrund {
    /// Kunde verlässt oder bezieht eine schon bestehende Marktlokation
    #[serde(rename = "E01")]
    Auszug,
    /// Kunde bezieht erstmals eine Marktlokation (z. B. Neubau)
    #[serde(rename = "E02")]
    Neubezug,
    /// - Kunde bleibt an der Marktlokation, hat nur den Marktpartner gewechselt
    #[serde(rename = "E03")]
    Lieferantenwechsel,
}

/// geraetnummer.qualifier for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZaehlerZuordnungQualifier {
    /// Gerätenummer
    #[serde(rename = "Z30")]
    Geraetenummer,
}

/// merkmal.code for PID 44001
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZaehlerZuordnungCode {
    /// Zählertyp
    #[serde(rename = "E13")]
    Zaehlertyp,
}

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

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

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

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LastprofilDatenZuordnungMerkmal {
    /// Required (X). ()
    pub code: Option<LastprofilDatenZuordnungCode>,
    /// Required (unknown). ()
    pub code_codepflege: Option<String>,
    /// Required (unknown). ()
    pub codeliste: Option<String>,
    /// Required (X). ()
    pub codepflege: Option<LastprofilDatenZuordnungCodepflege>,
    /// Optional. ()
    pub dimension: Option<String>,
    /// Required (X). ()
    pub klasse: Option<LastprofilDatenZuordnungKlasse>,
    /// Required (X). ()
    pub qualifier: Option<LastprofilDatenZuordnungQualifier>,
}

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

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

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

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

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

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

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

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

/// Map key for Geschaeftspartner instances.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub enum GeschaeftspartnerKey {
    #[serde(rename = "DP")]
    Dp,
    #[serde(rename = "Z04")]
    Z04,
    #[serde(rename = "Z05")]
    Z05,
    #[serde(rename = "Z09")]
    Z09,
}

impl std::fmt::Display for GeschaeftspartnerKey {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Dp => write!(f, "DP"),
            Self::Z04 => write!(f, "Z04"),
            Self::Z05 => write!(f, "Z05"),
            Self::Z09 => write!(f, "Z09"),
        }
    }
}

/// 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"),
        }
    }
}

/// Freitext for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Freitext {
    /// Required (X). ()
    pub text: Option<String>,
    /// Optional. ()
    pub text_referenz: Option<String>,
    /// Optional. ()
    pub text_zeile2: Option<String>,
    /// Optional. ()
    pub text_zeile3: Option<String>,
    /// Optional. ()
    pub text_zeile4: Option<String>,
    /// Optional. ()
    pub text_zeile5: Option<String>,
    /// Required (X). ()
    pub textbezug: Option<Textbezug>,
    /// Optional. ()
    pub textfunktion: Option<String>,
}

/// GemeindeDaten for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct GemeindeDaten {
    /// Required (X [902] ∧ [930] ∧ [938]). ()
    pub gemeinderabatt_prozent: Option<String>,
}

/// Geschaeftspartner for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Geschaeftspartner {
    /// Required (X). ()
    pub adresszusatz: Option<String>,
    /// Required (X). ()
    pub anrede: Option<String>,
    /// Required (X). ()
    pub anrede_code: Option<AnredeCode>,
    /// Required (X). ()
    pub codelist_code: Option<String>,
    /// Required (X). ()
    pub codepflege_code: Option<String>,
    /// Required (X). ()
    pub geschaeftspartner_id: Option<String>,
    /// Required (X). ()
    pub hausnummer: Option<String>,
    /// Required (X [951]). ()
    pub kundennummer_alt_lf: Option<String>,
    /// Required (X [951]). ()
    pub kundennummer_lf: Option<String>,
    /// Required (X). ()
    pub land: Option<String>,
    /// Required (X). ()
    pub name1: Option<String>,
    /// Required (X). ()
    pub name2: Option<String>,
    /// Required (X). ()
    pub name_zeile4: Option<String>,
    /// Required (X). ()
    pub namenszusatz1: Option<String>,
    /// Required (X). ()
    pub ort: Option<String>,
    /// Required (X). ()
    pub partnerrolle: Option<Partnerrolle>,
    /// Required (X). ()
    pub postleitzahl: Option<String>,
    pub referenz: Option<GeschaeftspartnerReferenz>,
    /// Required (X). ()
    pub region: Option<String>,
    /// Required (S [165] M [212]). ()
    pub strasse: Option<String>,
    /// Required (X). ()
    pub strasse_zusatz: Option<String>,
    /// Required (K). ()
    pub zusatzinfo: Option<String>,
    /// Required (X). ()
    pub zusatzinfo_zeile2: Option<String>,
    /// Required (X). ()
    pub zusatzinfo_zeile3: Option<String>,
    /// Required (X). ()
    pub zusatzinfo_zeile4: Option<String>,
    /// Required (X). ()
    pub zusatzinfo_zeile5: Option<String>,
}

/// Kontakt for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Kontakt {
    /// Required (X [1P0..1]). ()
    pub kommunikationsart: Option<Kommunikationsart>,
    /// Required (X). ()
    pub kommunikationsnummer: Option<String>,
    pub kontakt: Option<KontaktKontakt>,
    /// Required (X). ()
    pub kontaktfunktion: Option<Kontaktfunktion>,
}

/// KonzessionDaten for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct KonzessionDaten {
    /// Required (Soll [912] ∧ [902] [128] ∧ [129]). ()
    pub kav_betrag: Option<String>,
    /// Optional. ()
    pub kav_codeliste_code: Option<String>,
    /// Required (X). ()
    pub kav_gruppe: Option<KavGruppe>,
    /// Required (Kann). ()
    pub kav_zusatzinfo: Option<String>,
    pub konzession: Option<KonzessionDatenKonzession>,
    /// Required (X). ()
    pub obis_kennzahl_ref: Option<String>,
}

/// LastprofilDaten for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct LastprofilDaten {
}

/// LastprofilDatenZuordnung for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct LastprofilDatenZuordnung {
    pub merkmal: Option<LastprofilDatenZuordnungMerkmal>,
    /// Optional. ()
    pub zugeordneter_mp: Option<String>,
}

/// Marktlokation for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Marktlokation {
    /// Required (X [902] ∧ [937]). ()
    pub jahresmenge_gesamt: Option<String>,
    /// Required (X [902] ∧ [937]). ()
    pub kundenwert: Option<String>,
}

/// MarktlokationZuordnung for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct MarktlokationZuordnung {
    pub bilanzierungsgebiet: Option<MarktlokationZuordnungBilanzierungsgebiet>,
    pub marktgebiet: Option<MarktlokationZuordnungMarktgebiet>,
    pub merkmal: Option<MarktlokationZuordnungMerkmal>,
    pub regelzone: Option<MarktlokationZuordnungRegelzone>,
}

/// Marktteilnehmer for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Marktteilnehmer {
    /// Optional. ()
    pub codeliste_code: Option<String>,
    /// Required (X). ()
    pub marktrolle: Option<Marktrolle>,
    /// Required (X). ()
    pub rollencodenummer: Option<String>,
    /// Required (X). ()
    pub rollencodetyp: Option<Rollencodetyp>,
}

/// Messlokation for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Messlokation {
    /// Required (X [953]). ()
    pub meldepunkt_id: Option<String>,
}

/// Nachricht for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Nachricht {
    /// Optional. ()
    pub erstellungsdatum: Option<String>,
    /// Optional. ()
    pub nachrichtennummer: Option<String>,
    /// Optional. ()
    pub nachrichtentyp: Option<String>,
}

/// Prozessdaten for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Prozessdaten {
    /// Required (X). ()
    pub befristung_grund: Option<BefristungGrund>,
    /// Optional. ()
    pub befristung_status_code: Option<String>,
    /// Required (X [UB2]). ()
    pub gueltig_ab: Option<String>,
    /// Required (X [UB2]). ()
    pub gueltig_bis: Option<String>,
    /// Required (X). ()
    pub marktlokation_ref: Option<MarktlokationRef>,
    /// Required (X). ()
    pub pruefidentifikator: Option<Pruefidentifikator>,
    /// Optional. ()
    pub status_code: Option<String>,
    /// Required (X). ()
    pub transaktionsgrund: Option<Transaktionsgrund>,
    /// Required (X). ()
    pub vorgang_id: Option<String>,
}

/// Zaehler for PID 44001 — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Zaehler {
    pub referenz: Option<ZaehlerReferenz>,
}

/// ZaehlerZuordnung for PID 44001 — Anmeldung NN.
#[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 44001 transaction — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Transaktion {
    pub freitext: Option<Freitext>,
    /// Required (X).
    pub gemeinde_daten: Option<GemeindeDaten>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_map_or_vec")]
    pub geschaeftspartner: Option<BTreeMap<GeschaeftspartnerKey, Geschaeftspartner>>,
    /// Required (X).
    pub konzession_daten: Option<KonzessionDaten>,
    /// Required (X).
    pub lastprofil_daten: Option<LastprofilDaten>,
    pub lastprofil_daten_zuordnung: Option<LastprofilDatenZuordnung>,
    /// Required (X).
    pub marktlokation: Option<Marktlokation>,
    pub marktlokation_zuordnung: Option<MarktlokationZuordnung>,
    /// Required (X).
    pub messlokation: Option<Messlokation>,
    pub prozessdaten: Option<Prozessdaten>,
    /// Required (X).
    pub zaehler: Option<Zaehler>,
    pub zaehler_zuordnung: Option<ZaehlerZuordnung>,
}

/// PID 44001 message-level — Anmeldung NN.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Message {
    pub kontakt: Option<Kontakt>,
    #[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 44001 — Anmeldung NN.
pub type Interchange = crate::model::Interchange<Message, Transaktion>;
