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

/// codepflegeCode for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CodepflegeCode {
    /// GS1
    #[serde(rename = "9")]
    Gs1,
    /// DE, BDEW (Bundesverband der Energie- und Wasserwirtschaft e.V.)
    #[serde(rename = "293")]
    DeBdewBundesverbandEnergieWasserwirtschaftEV,
}

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

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

/// marktrolle for PID 55075
#[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 55075
#[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,
}

/// mengeneinheit for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Mengeneinheit {
    /// Prozent
    #[serde(rename = "P1")]
    Prozent,
}

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

/// pruefidentifikator for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Pruefidentifikator {
    /// HKNR / Stammdaten aufgrund einer Änderung
    #[serde(rename = "55075")]
    HknrStammdatenAufgrundAenderung,
}

/// transaktionsgrund for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Transaktionsgrund {
    /// - Kunde bleibt an der Marktlokation, hat nur den Marktpartner gewechselt - Ma...
    #[serde(rename = "E03")]
    KundeBleibtMarktlokationMarktpartnerGewechseltMarktpartnerKunden,
    /// Stammdatenänderung
    #[serde(rename = "ZE3")]
    Stammdatenaenderung,
}

/// transaktionsgrundDetail for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TransaktionsgrundDetail {
    /// Der LFN wird einer Marktlokation vollständig zugeordnet (vollständige (100%ig...
    #[serde(rename = "ZW0")]
    LfnMarktlokationVollstaendigZugeordnetVollstaendige100IgeZuordnungDieser,
    /// Der LFN wird einer bestehenden Tranche vollständig zugeordnet (vollständige (...
    #[serde(rename = "ZW1")]
    LfnBestehendenTrancheVollstaendigZugeordnetVollstaendige100IgeZuordnung,
    /// Der LFN wird einer neu zu bildenden Tranche zugeordnet (anteiliger Zuordnungs...
    #[serde(rename = "ZW2")]
    LfnNeuBildendenTrancheZugeordnetAnteiligerZuordnungsvorgangBildungNeuer,
    /// Erzeugende Marktlokation
    #[serde(rename = "ZW3")]
    ErzeugendeMarktlokation,
    /// Verbrauchende Marktlokation
    #[serde(rename = "ZW4")]
    VerbrauchendeMarktlokation,
    /// Tranche
    #[serde(rename = "ZW5")]
    Tranche,
    /// Pauschale Marktlokation
    #[serde(rename = "ZW6")]
    PauschaleMarktlokation,
    /// Gemessene Marktlokation
    #[serde(rename = "ZW7")]
    GemesseneMarktlokation,
    /// Fall 1
    #[serde(rename = "ZW8")]
    Fall1,
    /// Fall 2
    #[serde(rename = "ZW9")]
    Fall2,
    /// Fall 3
    #[serde(rename = "ZX0")]
    Fall3,
    /// Fall 4
    #[serde(rename = "ZX1")]
    Fall4,
    /// ruhende Marktlokation
    #[serde(rename = "ZAP")]
    RuhendeMarktlokation,
}

/// transaktionsgrundErgaenzung for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TransaktionsgrundErgaenzung {
    /// Kunde verlässt eine schon bestehende Marktlokation
    #[serde(rename = "E01")]
    KundeVerlaesstBestehendeMarktlokation,
    /// - Kunde bleibt an der Marktlokation, hat nur den Marktpartner gewechselt - Ma...
    #[serde(rename = "E03")]
    KundeBleibtMarktlokationMarktpartnerGewechseltMarktpartnerKunden,
}

/// referenz.typ for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZaehlerDatenTyp {
    /// Messlokation
    #[serde(rename = "Z19")]
    Messlokation,
    /// Smartmeter-Gateway
    #[serde(rename = "Z14")]
    SmartmeterGateway,
}

/// merkmal.code for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungCode {
    /// Zugeordneter Marktpartner
    #[serde(rename = "ZB3")]
    ZugeordneterMarktpartner,
    /// Summenzeitreihentyp
    #[serde(rename = "Z21")]
    Summenzeitreihentyp,
    /// Art der erzeugenden Marktlokation
    #[serde(rename = "Z34")]
    ArtErzeugendenMarktlokation,
    /// Veräußerungsform nach § 20 Abs. 1 Nr. 3 EEG 2014 („Einspeisevergütung nach § ...
    #[serde(rename = "Z90")]
    VeraeusserungsformParagraph20Abs1Nr3Eeg2014Einspeiseverguetung,
    /// Veräußerungsform nach § 20 Abs. 1 Nr. 1 EEG 2014 („Geförderte Direktvermarktu...
    #[serde(rename = "Z91")]
    VeraeusserungsformParagraph20Abs1Nr1Eeg2014Gefoerderte,
    /// Veräußerungsform ohne gesetzliche Vergütung (z.B. nach § 20 Abs. 1 Nr. 2 EEG ...
    #[serde(rename = "Z92")]
    VeraeusserungsformOhneGesetzlicheVerguetungZBParagraph20Abs1Nr2Eeg,
    /// KWKG-Vergütung
    #[serde(rename = "Z94")]
    KwkgVerguetung,
    /// Zählertyp
    #[serde(rename = "E13")]
    Zaehlertyp,
    /// Wandler
    #[serde(rename = "Z25")]
    Wandler,
    /// Smartmeter-Gateway
    #[serde(rename = "Z75")]
    SmartmeterGateway,
    /// Steuerbox
    #[serde(rename = "Z76")]
    Steuerbox,
    /// Prozentual
    #[serde(rename = "ZD1")]
    Prozentual,
    /// Aufteilungsfaktor auf Basis von Referenzenträger/installierter Leistung
    #[serde(rename = "ZD2")]
    AufteilungsfaktorBasisReferenzentraegerInstallierterLeistung,
    /// Wertegranularität
    #[serde(rename = "ZE4")]
    Wertegranularitaet,
    /// Vor- und Nachkommastellen des Zählwerkes
    #[serde(rename = "Z33")]
    VorNachkommastellenZaehlwerkes,
}

/// merkmal.code_codepflege for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungCodeCodepflege {
    /// DE, BDEW (Bundesverband der Energie- und Wasserwirtschaft e.V.)
    #[serde(rename = "293")]
    DeBdewBundesverbandEnergieWasserwirtschaftEV,
}

/// merkmal.codeliste for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungCodeliste {
    /// EDI@Energy Codeliste der europäischen Ländercodes
    #[serde(rename = "LAND")]
    EdiEnergyCodelisteEuropaeischenLaendercodes,
}

/// merkmal.eigenschaft for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungEigenschaft {
    /// EDL40
    #[serde(rename = "Z01")]
    Edl40,
    /// EDL21
    #[serde(rename = "Z02")]
    Edl21,
    /// sonstiger EHZ
    #[serde(rename = "Z03")]
    SonstigerEhz,
    /// Standard
    #[serde(rename = "Z04")]
    Standard,
    /// MeDa-Zähler
    #[serde(rename = "Z05")]
    MedaZaehler,
}

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

/// merkmal.qualifier for PID 55075
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ZuordnungQualifier {
    /// LF
    #[serde(rename = "Z89")]
    Lf,
    /// Beispielcode
    #[serde(rename = "XYZ")]
    DieserCodeAnwendungDurchZulaessigenCodeNbGueltigenListe,
    /// EEG-Marktlokation ohne DV-Pflicht
    #[serde(rename = "Z33")]
    EegMarktlokationOhneDvPflicht,
    /// KWKG-Marktlokation ohne DV-Pflicht
    #[serde(rename = "Z34")]
    KwkgMarktlokationOhneDvPflicht,
    /// sonstige Marktlokation
    #[serde(rename = "Z35")]
    SonstigeMarktlokation,
    /// EEG-Marktlokation mit DV-Pflicht
    #[serde(rename = "Z37")]
    EegMarktlokationDvPflicht,
    /// KWKG-Marktlokation mit DV-Pflicht
    #[serde(rename = "Z46")]
    KwkgMarktlokationDvPflicht,
    /// analoger Haushaltszähler (Drehstrom)
    #[serde(rename = "AHZ")]
    AnalogerHaushaltszaehlerDrehstrom,
    /// analoger Wechselstromzähler
    #[serde(rename = "WSZ")]
    AnalogerWechselstromzaehler,
    /// Lastgangzähler
    #[serde(rename = "LAZ")]
    Lastgangzaehler,
    /// Maximumzähler
    #[serde(rename = "MAZ")]
    Maximumzaehler,
    /// moderne Messeinrichtung nach MsbG
    #[serde(rename = "MME")]
    ModerneMesseinrichtungMsbg,
    /// elektronischer Haushaltszähler
    #[serde(rename = "EHZ")]
    ElektronischerHaushaltszaehler,
    /// Individuelle Abstimmung (Sonderausstattung)
    #[serde(rename = "IVA")]
    SonderausstattungGehoertZBGasEncoder,
    /// Gerätenummer
    #[serde(rename = "Z30")]
    Geraetenummer,
    /// Eintarif
    #[serde(rename = "ETZ")]
    Eintarif,
    /// Zweitarif
    #[serde(rename = "ZTZ")]
    Zweitarif,
    /// Mehrtarif
    #[serde(rename = "NTZ")]
    Mehrtarif,
    /// Einrichtungszähler
    #[serde(rename = "ERZ")]
    Einrichtungszaehler,
    /// Zweirichtungszähler
    #[serde(rename = "ZRZ")]
    Zweirichtungszaehler,
    /// Messwandlersatz Strom
    #[serde(rename = "MIW")]
    MesswandlersatzStrom,
    /// Kombimesswandlersatz (Strom und Spannung)
    #[serde(rename = "MPW")]
    KombimesswandlersatzStromSpannung,
    /// Blockstromwandler
    #[serde(rename = "MBW")]
    Blockstromwandler,
    /// Messwandlersatz Spannung
    #[serde(rename = "MUW")]
    MesswandlersatzSpannung,
    /// Jährlich
    #[serde(rename = "ZD9")]
    Jaehrlich,
    /// Halbjährlich
    #[serde(rename = "ZE8")]
    Halbjaehrlich,
    /// Quartalsweise
    #[serde(rename = "ZE9")]
    Quartalsweise,
    /// Monatlich
    #[serde(rename = "ZB7")]
    Monatlich,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GeschaeftspartnerAdresse {
    /// Required (X). (an..35)
    pub hausnummer: Option<String>,
    /// Required (X). (an..3)
    pub landescode: Option<String>,
    /// Required (X). (an..35)
    pub ort: Option<String>,
    /// Required (X). (an..17)
    pub postleitzahl: Option<String>,
    /// Required (S [166] M [212]). (an..35)
    pub strasse: Option<String>,
}

#[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 {
    /// Required (X). (an..10)
    pub referenz: Option<String>,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MesslokationZeitscheibe {
    /// Required (X). (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 {
    /// Required (X). (an..10)
    pub referenz: Option<String>,
}

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

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

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

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

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

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ZaehlerDatenZeitscheibe {
    /// Required (X). (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 (X). (an..3)
    pub code_codepflege: Option<ZuordnungCodeCodepflege>,
    /// Required (X). (an..17)
    pub codeliste: Option<ZuordnungCodeliste>,
    /// Required (unknown). ()
    pub codepflege: Option<String>,
    /// Required (unknown). ()
    pub dimension: Option<String>,
    /// Optional. (an..35)
    pub eigenschaft: Option<ZuordnungEigenschaft>,
    /// Required (unknown). ()
    pub eigenschaft_2: Option<String>,
    /// Required (X). (an..3)
    pub klasse: Option<ZuordnungKlasse>,
    /// Required (X). (an..3)
    pub qualifier: Option<ZuordnungQualifier>,
}

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

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::Vy => write!(f, "VY"),
        }
    }
}

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

/// Geschaeftspartner for PID 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Geschaeftspartner {
    pub adresse: Option<GeschaeftspartnerAdresse>,
    /// Required (X). ()
    pub anrede: Option<String>,
    /// Required (X). ()
    pub codeliste_code: Option<String>,
    /// Required (X). (an..3)
    pub codepflege_code: Option<CodepflegeCode>,
    /// Required (X). (an..35)
    pub geschaeftspartner_id: Option<String>,
    /// Required (X). ()
    pub name1: Option<String>,
    /// Required (X). ()
    pub name2: Option<String>,
    /// Required (X). ()
    pub name_zeile3_feld: Option<String>,
    /// Required (X). ()
    pub name_zeile4_feld: Option<String>,
    /// Required (X). (an..3)
    pub partnerrolle: Option<Partnerrolle>,
    /// Required (X [950]). (an..70)
    pub referenz: Option<String>,
    /// Required (X). ()
    pub region: Option<String>,
    /// Required (X). (an..35)
    pub strasse_zeile2: Option<String>,
    /// Required (X). (an..35)
    pub strasse_zeile4: Option<String>,
    /// Required (K). (an..35)
    pub zusatzinfo: Option<String>,
    /// Required (X). (an..35)
    pub zusatzinfo2: Option<String>,
    /// Required (X). (an..35)
    pub zusatzinfo3: Option<String>,
    /// Required (X). (an..35)
    pub zusatzinfo4: Option<String>,
    /// Required (X). (an..35)
    pub zusatzinfo5: Option<String>,
}

/// Kontakt for PID 55075 — Stammdaten aufgrund einer Änderung.
#[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 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Marktlokation {
    /// Required (X). ()
    pub codeliste_code: Option<String>,
    /// Required (X). ()
    pub codepflege_code: Option<String>,
    /// Required (X). (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>,
}

/// Marktteilnehmer for PID 55075 — Stammdaten aufgrund einer Änderung.
#[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>,
}

/// Messlokation for PID 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Messlokation {
    /// Required (X). ()
    pub codeliste_code: Option<String>,
    /// Required (X). ()
    pub codepflege_code: Option<String>,
    /// Required (X [914] ∧ [930] ∧ [955]). (an..35)
    pub jahresverbrauchsprognose: Option<String>,
    /// Required (X). (an..256)
    pub lokation_zeitraum_id: Option<String>,
    /// Required (X). (an..8)
    pub mengeneinheit: Option<Mengeneinheit>,
    /// Required (X [951]). (an..35)
    pub messlokations_id: Option<String>,
    /// Required (X [950]). (an..70)
    pub referenz: Option<String>,
    pub zeitscheibe: Option<MesslokationZeitscheibe>,
}

/// Nachricht for PID 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Nachricht {
    /// Optional. (an..35)
    pub erstellungsdatum: Option<String>,
    /// Optional. ()
    pub nachrichtennummer: Option<String>,
    /// Optional. ()
    pub nachrichtentyp: Option<String>,
}

/// ObisKennzahlDaten for PID 55075 — Stammdaten aufgrund einer Änderung.
#[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 55075 — Stammdaten aufgrund einer Änderung.
#[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>,
}

/// ObisZaehleinrichtung for PID 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ObisZaehleinrichtung {
    pub produkt_identifikation: Option<ObisZaehleinrichtungProduktIdentifikation>,
    /// Required (X). (an..70)
    pub referenz: Option<String>,
    pub zeitscheibe: Option<ObisZaehleinrichtungZeitscheibe>,
}

/// Prozessdaten for PID 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Prozessdaten {
    /// Required (unknown). ()
    pub bearbeitungsstand: Option<String>,
    /// Required (X [UB1]). (an..35)
    pub beginndatum: Option<String>,
    /// Required (X). (an..3)
    pub ide_qualifier: Option<IdeQualifier>,
    /// Required (X). (an..70)
    pub pruefidentifikator: Option<Pruefidentifikator>,
    /// Required (X). (an..3)
    pub transaktionsgrund: Option<Transaktionsgrund>,
    /// Optional. (an..3)
    pub transaktionsgrund_detail: Option<TransaktionsgrundDetail>,
    /// Optional. (an..3)
    pub transaktionsgrund_ergaenzung: Option<TransaktionsgrundErgaenzung>,
    /// Required (X). (an..35)
    pub vorgang_id: Option<String>,
}

/// Tranche for PID 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Tranche {
    /// Required (X). ()
    pub codeliste_code: Option<String>,
    /// Required (X). ()
    pub codepflege_code: Option<String>,
    /// Required (X). (an..256)
    pub lokation_zeitraum_id: Option<String>,
    /// Required (X [950]). (an..35)
    pub tranche_id: Option<String>,
}

/// ZaehlerDaten for PID 55075 — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ZaehlerDaten {
    pub referenz: Option<ZaehlerDatenReferenz>,
    pub zeitscheibe: Option<ZaehlerDatenZeitscheibe>,
}

/// Zuordnung for PID 55075 — Stammdaten aufgrund einer Änderung.
#[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 55075 transaction — Stammdaten aufgrund einer Änderung.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Transaktion {
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_map_or_vec")]
    pub geschaeftspartner: Option<BTreeMap<GeschaeftspartnerKey, Geschaeftspartner>>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub marktlokation: Option<Vec<Marktlokation>>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub messlokation: Option<Vec<Messlokation>>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub obis_kennzahl_daten: Option<Vec<ObisKennzahlDaten>>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub obis_marktlokation: Option<Vec<ObisMarktlokation>>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub obis_zaehleinrichtung: Option<Vec<ObisZaehleinrichtung>>,
    pub prozessdaten: Option<Prozessdaten>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub tranche: Option<Vec<Tranche>>,
    /// Required (X).
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub zaehler_daten: Option<Vec<ZaehlerDaten>>,
    pub zuordnung: Option<Zuordnung>,
}

/// PID 55075 message-level — Stammdaten aufgrund einer Änderung.
#[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 55075 — Stammdaten aufgrund einer Änderung.
pub type Interchange = crate::model::Interchange<Message, Transaktion>;
