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

/// kommunikationsart for PID 55196
#[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 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Kontaktfunktion {
    /// Informationskontakt
    #[serde(rename = "IC")]
    Informationskontakt,
}

/// mengenQualifier for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MarktlokationMengenMengenQualifier {
    /// Veranschlagte Jahresmenge Gesamt
    #[serde(rename = "31")]
    VeranschlagteJahresmengeGesamt,
    /// Tatsächlich bilanzierte Energiemenge
    #[serde(rename = "Z07")]
    TatsaechlichBilanzierteEnergiemenge,
}

/// mengeneinheit for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MarktlokationMengenMengeneinheit {
    /// Kilowattstunde
    #[serde(rename = "KWH")]
    Kilowattstunde,
}

/// marktrolle for PID 55196
#[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 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Rollencodetyp {
    /// GS1
    #[serde(rename = "9")]
    Gs1,
    /// DE, BDEW (Bundesverband der Energie- und Wasserwirtschaft e.V.)
    #[serde(rename = "293")]
    DeBdewBundesverbandEnergieWasserwirtschaftEV,
}

/// ebdNummer for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum EbdNummer {
    /// EBD Nr. E_0017
    #[serde(rename = "E_0017")]
    EbdNrE0017,
    /// EBD Nr. E_0052
    #[serde(rename = "E_0052")]
    EbdNrE0052,
}

/// ebdNummer2 for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum EbdNummer2 {
    /// EBD Nr. E_0017
    #[serde(rename = "E_0017")]
    EbdNrE0017,
    /// EBD Nr. E_0052
    #[serde(rename = "E_0052")]
    EbdNrE0052,
}

/// ideQualifier for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum IdeQualifier {
    /// Liste
    #[serde(rename = "Z01")]
    Liste,
    /// Transaktion
    #[serde(rename = "24")]
    Transaktion,
}

/// pruefidentifikator for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Pruefidentifikator {
    /// MaBiS / Antwort auf die Bilanzierungsgebietsclearingliste
    #[serde(rename = "55196")]
    MabisAntwortBilanzierungsgebietsclearingliste,
}

/// referenz for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Referenz {
    /// MaBiS / Antwort auf die Bilanzierungsgebietsclearingliste
    #[serde(rename = "55196")]
    MabisAntwortBilanzierungsgebietsclearingliste,
}

/// transaktionsnummer for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Transaktionsnummer {
    /// MaBiS / Antwort auf die Bilanzierungsgebietsclearingliste
    #[serde(rename = "55196")]
    MabisAntwortBilanzierungsgebietsclearingliste,
}

/// mengenQualifier for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SeqDatenZ29MengenMengenQualifier {
    /// Veranschlagte Jahresmenge Gesamt
    #[serde(rename = "31")]
    VeranschlagteJahresmengeGesamt,
    /// Tatsächlich bilanzierte Energiemenge
    #[serde(rename = "Z07")]
    TatsaechlichBilanzierteEnergiemenge,
}

/// mengeneinheit for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SeqDatenZ29MengenMengeneinheit {
    /// Kilowattstunde
    #[serde(rename = "KWH")]
    Kilowattstunde,
}

/// referenz.typ for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SummenzeitreihenDatenTyp {
    /// Referenz auf eine Zeitreihe
    #[serde(rename = "AUU")]
    ReferenzZeitreihe,
}

/// referenz.typ for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TrancheDatenTyp {
    /// Tranche
    #[serde(rename = "Z20")]
    Tranche,
}

/// merkmal.code for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungCode {
    /// Marktlokation liefert Energie ins Netz. --> Erzeugende Marktlokation
    #[serde(rename = "Z06")]
    MarktlokationLiefertEnergieInsNetzErzeugendeMarktlokation,
    /// Marktlokation entnimmt Energie aus dem Netz. --> Verbrauchende Marktlokation
    #[serde(rename = "Z07")]
    MarktlokationEntnimmtEnergieNetzVerbrauchendeMarktlokation,
    /// Zugeordneter Marktpartner
    #[serde(rename = "ZB3")]
    ZugeordneterMarktpartner,
    /// Summenzeitreihentyp
    #[serde(rename = "Z21")]
    Summenzeitreihentyp,
    /// ÜNB
    #[serde(rename = "ZA9")]
    Uenb,
    /// Prognose auf Basis von Werten
    #[serde(rename = "ZC0")]
    PrognoseBasisWerten,
    /// Prognose auf Basis von Profilen
    #[serde(rename = "ZA6")]
    PrognoseBasisProfilen,
    /// synthetisches Verfahren
    #[serde(rename = "E01")]
    SynthetischesVerfahren,
    /// NB
    #[serde(rename = "ZA8")]
    Nb,
}

/// merkmal.klasse for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungKlasse {
    /// Lieferrichtung
    #[serde(rename = "Z30")]
    Lieferrichtung,
}

/// merkmal.qualifier for PID 55196
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungQualifier {
    /// LF
    #[serde(rename = "Z89")]
    Lf,
    /// ÜNB
    #[serde(rename = "Z90")]
    Uenb,
    /// Beispielcode
    #[serde(rename = "XYZ")]
    DieserCodeAnwendungDurchZulaessigenCodeNbGueltigenListe,
    /// SLP/SEP
    #[serde(rename = "E02")]
    SlpSep,
}

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

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MarktlokationZeitscheibe {
    /// Optional. (an..10)
    pub referenz: Option<String>,
}

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

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisKennzahlDatenZeitscheibe {
    /// Optional. (an..10)
    pub referenz: Option<String>,
}

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

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObisMarktlokationZeitscheibe {
    /// Optional. (an..10)
    pub referenz: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProfilZeitscheibe {
    /// Optional. (an..10)
    pub referenz: Option<String>,
}

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

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

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

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

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

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

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TrancheDatenZeitscheibe {
    /// Optional. (an..10)
    pub referenz: Option<String>,
}

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

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

/// Kontakt for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[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 (([939] [321]) ∨ ([940] [322])) ∧ [514]). (an..512)
    pub kommunikationsnummer: Option<String>,
    pub kontakt: Option<KontaktKontakt>,
    /// Required (X). (an..3)
    pub kontaktfunktion: Option<Kontaktfunktion>,
}

/// Marktlokation for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Marktlokation {
    /// Required (Muss [2061]). ()
    pub codeliste_code: Option<String>,
    /// Required (Muss [2061]). ()
    pub codepflege_code: Option<String>,
    /// Optional. (an..256)
    pub lokation_zeitraum_id: Option<String>,
    /// Required (X [950]). (an..35)
    pub marktlokations_id: Option<String>,
    /// Required (X [950]). (an..70)
    pub referenz: Option<String>,
    pub zeitscheibe: Option<MarktlokationZeitscheibe>,
}

/// MarktlokationMengen for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct MarktlokationMengen {
    /// Required (X [902] ∧ [937]). (an..35)
    pub menge: Option<String>,
    /// Required (X). (an..3)
    pub mengen_qualifier: Option<MarktlokationMengenMengenQualifier>,
    /// Required (X). (an..8)
    pub mengeneinheit: Option<MarktlokationMengenMengeneinheit>,
}

/// Marktteilnehmer for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[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>,
}

/// Messlokation for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Messlokation {
    /// Required (X [951]). (an..35)
    pub mabis_zaehlpunkt_id: Option<String>,
}

/// Nachricht for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[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>,
}

/// ObisKennzahlDaten for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ObisKennzahlDaten {
    pub produkt_identifikation: Option<ObisKennzahlDatenProduktIdentifikation>,
    /// Required (X [950]). (an..70)
    pub referenz: Option<String>,
    pub zeitscheibe: Option<ObisKennzahlDatenZeitscheibe>,
}

/// ObisMarktlokation for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ObisMarktlokation {
    pub produkt_identifikation: Option<ObisMarktlokationProduktIdentifikation>,
    /// Required (X [950]). (an..70)
    pub referenz: Option<String>,
    pub zeitscheibe: Option<ObisMarktlokationZeitscheibe>,
}

/// Profil for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Profil {
    /// Required (X). (an..70)
    pub referenz: Option<String>,
    pub zeitscheibe: Option<ProfilZeitscheibe>,
}

/// Prozessdaten for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Prozessdaten {
    /// Required (X [UB1] ∧ [528]). (an..35)
    pub aenderung_bis: Option<String>,
    /// Required (X [UB1] ∧ [528]). (an..35)
    pub aenderung_von: Option<String>,
    /// Required (unknown). ()
    pub antwort_bearbeitungsstand: Option<String>,
    /// Required (unknown). ()
    pub antwort_bearbeitungsstand2: Option<String>,
    /// Required (unknown). ()
    pub codepflege_stelle: Option<String>,
    /// Required (unknown). ()
    pub codepflege_stelle2: Option<String>,
    /// Required (X). (an..35)
    pub datum_z22: Option<String>,
    /// Required (X). (an..17)
    pub ebd_nummer: Option<EbdNummer>,
    /// Required (X). (an..17)
    pub ebd_nummer2: Option<EbdNummer2>,
    /// Required (X). (an..3)
    pub ide_qualifier: Option<IdeQualifier>,
    /// Required (X). (an..70)
    pub pruefidentifikator: Option<Pruefidentifikator>,
    /// Required (X). (an..3)
    pub pruefschritt_code: Option<String>,
    /// Required (X). (an..3)
    pub pruefschritt_code2: Option<String>,
    /// Required (X). (an..70)
    pub referenz: Option<Referenz>,
    /// Required (X). (an..70)
    pub transaktionsnummer: Option<Transaktionsnummer>,
    /// Required (X). (an..35)
    pub vorgang_id: Option<String>,
    /// Required (unknown). ()
    pub zeitraum_id2: Option<String>,
    pub zeitscheibe: Option<ProzessdatenZeitscheibe>,
}

/// SeqDatenZ29 for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SeqDatenZ29 {
    /// Required (X [950]). (an..70)
    pub referenz: Option<String>,
}

/// SeqDatenZ29Mengen for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SeqDatenZ29Mengen {
    /// Required (X [902] ∧ [937]). (an..35)
    pub menge: Option<String>,
    /// Required (X). (an..3)
    pub mengen_qualifier: Option<SeqDatenZ29MengenMengenQualifier>,
    /// Required (X). (an..8)
    pub mengeneinheit: Option<SeqDatenZ29MengenMengeneinheit>,
}

/// SeqDatenZ30 for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SeqDatenZ30 {
    pub produkt_identifikation: Option<SeqDatenZ30ProduktIdentifikation>,
}

/// SeqDatenZ31 for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SeqDatenZ31 {
}

/// SeqDatenZ32 for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SeqDatenZ32 {
    pub produkt_identifikation: Option<SeqDatenZ32ProduktIdentifikation>,
}

/// SeqDatenZ33 for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SeqDatenZ33 {
}

/// SummenzeitreihenDaten for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct SummenzeitreihenDaten {
    pub referenz: Option<SummenzeitreihenDatenReferenz>,
    pub zeitscheibe: Option<SummenzeitreihenDatenZeitscheibe>,
}

/// Tranche for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Tranche {
    /// Required (Soll [54] ∧ [166] ∧ [2061]). ()
    pub codeliste_code: Option<String>,
    /// Required (Soll [54] ∧ [166] ∧ [2061]). ()
    pub codepflege_code: Option<String>,
    /// Optional. (an..256)
    pub lokation_zeitraum_id: Option<String>,
    /// Required (X [950]). (an..35)
    pub tranche_id: Option<String>,
}

/// TrancheDaten for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct TrancheDaten {
    pub referenz: Option<TrancheDatenReferenz>,
    pub zeitscheibe: Option<TrancheDatenZeitscheibe>,
}

/// Zuordnung for PID 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Zuordnung {
    pub merkmal: Option<ZuordnungMerkmal>,
    /// Required (X [611]). (an..17)
    pub zugeordneter_mp: Option<String>,
}

/// PID 55196 transaction — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Transaktion {
    /// Required (Muss [2061]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub marktlokation: Option<Vec<Marktlokation>>,
    pub marktlokation_mengen: Option<MarktlokationMengen>,
    /// Required (X).
    pub messlokation: Option<Messlokation>,
    /// Required (Muss [54] ∧ [2311] ∧ [528]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub obis_kennzahl_daten: Option<Vec<ObisKennzahlDaten>>,
    /// Required (Muss ([19] ∧ ([20] ⊻ ([54] ∧ [300]))) ∧ [528]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub obis_marktlokation: Option<Vec<ObisMarktlokation>>,
    /// Required (Muss [119] ∧ [528]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub profil: Option<Vec<Profil>>,
    pub prozessdaten: Option<Prozessdaten>,
    /// Required (Muss [2061] ∧ [606]).
    pub seq_daten_z29: Option<SeqDatenZ29>,
    pub seq_daten_z29_mengen: Option<SeqDatenZ29Mengen>,
    /// Required (Soll [31]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub seq_daten_z30: Option<Vec<SeqDatenZ30>>,
    /// Required (Soll [31]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub seq_daten_z31: Option<Vec<SeqDatenZ31>>,
    /// Required (Soll [31]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub seq_daten_z32: Option<Vec<SeqDatenZ32>>,
    /// Required (Soll [31]).
    pub seq_daten_z33: Option<SeqDatenZ33>,
    /// Required (X).
    pub summenzeitreihen_daten: Option<SummenzeitreihenDaten>,
    /// Required (Soll [54] ∧ [166] ∧ [2061]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub tranche: Option<Vec<Tranche>>,
    /// Required (Muss [54] ∧ [2307] ∧ [528]).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub tranche_daten: Option<Vec<TrancheDaten>>,
    pub zuordnung: Option<Zuordnung>,
}

/// PID 55196 message-level — Antwort auf Bilanzierungs-gebiets-clearing-liste.
#[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 55196 — Antwort auf Bilanzierungs-gebiets-clearing-liste.
pub type Interchange = crate::model::Interchange<Message, Transaktion>;
