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

/// ebdReferenz for PID 19123
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum EbdReferenz {
    /// EBD Nr. E_0544
    #[serde(rename = "E_0544")]
    EbdNrE0544,
    /// EBD Nr. E_0545
    #[serde(rename = "E_0545")]
    EbdNrE0545,
    /// EBD Nr. E_0546
    #[serde(rename = "E_0546")]
    EbdNrE0546,
    /// EBD Nr. E_0547
    #[serde(rename = "E_0547")]
    EbdNrE0547,
    /// EBD Nr. E_0548
    #[serde(rename = "E_0548")]
    EbdNrE0548,
    /// EBD Nr. E_0549
    #[serde(rename = "E_0549")]
    EbdNrE0549,
    /// EBD Nr. E_0550
    #[serde(rename = "E_0550")]
    EbdNrE0550,
    /// EBD Nr. E_0551
    #[serde(rename = "E_0551")]
    EbdNrE0551,
}

/// textQualifier for PID 19123
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TextQualifier {
    /// Antwort (Freier Text)
    #[serde(rename = "AAP")]
    AntwortFreierText,
}

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

/// dokumenttyp for PID 19123
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Dokumenttyp {
    /// Prozessdatenbericht
    #[serde(rename = "7")]
    Prozessdatenbericht,
    /// Zeitreihen im Rahmen der Bilanzkreisabrechnung
    #[serde(rename = "BK")]
    ZeitreihenRahmenBilanzkreisabrechnung,
    /// Geräteübernahme
    #[serde(rename = "Z10")]
    Geraeteuebernahme,
    /// Weiterverpflichtung zum Betrieb der Messlokation
    #[serde(rename = "Z11")]
    WeiterverpflichtungBetriebMesslokation,
    /// Änderung der Technik der Lokation
    #[serde(rename = "Z12")]
    AenderungTechnikLokation,
    /// Gerätewechselabsicht
    #[serde(rename = "Z13")]
    Geraetewechselabsicht,
    /// Stammdaten der Markt- oder Messlokation
    #[serde(rename = "Z14")]
    StammdatenMarktMesslokation,
    /// Allokationsliste (MMMA)
    #[serde(rename = "Z24")]
    AllokationslisteMmma,
    /// Energiemenge und Leistungsmaximum
    #[serde(rename = "Z28")]
    EnergiemengeLeistungsmaximum,
    /// Abrechnung des Messstellenbetriebs vom MSB an den LF
    #[serde(rename = "Z29")]
    AbrechnungMessstellenbetriebsMsbLf,
    /// Änderung Prognosegrundlage
    #[serde(rename = "Z30")]
    AenderungPrognosegrundlage,
    /// Änderung Gerätekonfiguration
    #[serde(rename = "Z31")]
    AenderungGeraetekonfiguration,
    /// Reklamation von Werten
    #[serde(rename = "Z34")]
    ReklamationWerten,
    /// Lastgang Marktlokation, Tranche
    #[serde(rename = "Z48")]
    LastgangMarktlokationTranche,
    /// Sperrung
    #[serde(rename = "Z51")]
    Sperrung,
    /// Entsperrung
    #[serde(rename = "Z52")]
    Entsperrung,
    /// Reklamation der Übersicht der Definitionen oder einer Definition
    #[serde(rename = "Z55")]
    ReklamationUebersichtDefinitionenDefinition,
    /// Änderung individueller Konfiguration
    #[serde(rename = "Z56")]
    AenderungIndividuellerKonfiguration,
    /// Übermittlung von Werten an ESA
    #[serde(rename = "Z57")]
    UebermittlungWertenEsa,
    /// Änderung
    #[serde(rename = "Z68")]
    Aenderung,
    /// Beendigung einer Konfiguration
    #[serde(rename = "Z72")]
    BeendigungKonfiguration,
    /// Bestellung einer Konfiguration
    #[serde(rename = "Z73")]
    BestellungKonfiguration,
    /// Bestellung eines Angebots einer Konfiguration
    #[serde(rename = "Z74")]
    BestellungAngebotsKonfiguration,
    /// Reklamation einer Konfiguration
    #[serde(rename = "Z76")]
    ReklamationKonfiguration,
    /// Bestellung Änderung Abrechnungsdaten
    #[serde(rename = "Z91")]
    BestellungAenderungAbrechnungsdaten,
    /// Bestellung eines Angebots Änderung der Technik der Lokation
    #[serde(rename = "Z93")]
    BestellungAngebotsAenderungTechnikLokation,
}

/// unsKennung for PID 19123
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum UnsKennung {
    /// Trennung von Positions- und Summenteil
    #[serde(rename = "S")]
    TrennungPositionsSummenteil,
}

/// qualifier for PID 19123
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Qualifier {
    /// Auftragsnummer (Einkauf)
    #[serde(rename = "ON")]
    AuftragsnummerEinkauf,
    /// Referenznummer einer vorangegangenen Nachricht
    #[serde(rename = "ACW")]
    ReferenznummerVorangegangenenNachricht,
    /// Transaktions-Referenznummer
    #[serde(rename = "TN")]
    TransaktionsReferenznummer,
    /// Prüfidentifikator
    #[serde(rename = "Z13")]
    Pruefidentifikator,
}

/// Antwortkategorie for PID 19123 — Ablehnung Reklamation einer Definition.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Antwortkategorie {
    /// Required (X). (an..3)
    pub antwort_code: Option<String>,
    /// Required (X [3P0..1]). (an..6)
    pub ebd_referenz: Option<EbdReferenz>,
    /// Required (X). (an..512)
    pub freitext1: Option<String>,
    /// Optional. (an..512)
    pub freitext2: Option<String>,
    /// Optional. (an..512)
    pub freitext3: Option<String>,
    /// Optional. (an..512)
    pub freitext4: Option<String>,
    /// Optional. (an..512)
    pub freitext5: Option<String>,
    /// Required (unknown). ()
    pub text_funktion: Option<String>,
    /// Required (X). (an..3)
    pub text_qualifier: Option<TextQualifier>,
    /// Required (unknown). ()
    pub text_referenz: Option<String>,
}

/// Marktteilnehmer for PID 19123 — Ablehnung Reklamation einer Definition.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Marktteilnehmer {
    /// Required (unknown). ()
    pub anrede: Option<String>,
    /// Required (unknown). ()
    pub hausnummer: Option<String>,
    /// Required (unknown). ()
    pub land: Option<String>,
    /// Required (X). (an..3)
    pub marktrolle: Option<Marktrolle>,
    /// Required (unknown). ()
    pub nachname: Option<String>,
    /// Required (unknown). ()
    pub name_format_code: Option<String>,
    /// Required (unknown). ()
    pub namenformat_code: Option<String>,
    /// Required (unknown). ()
    pub ort: Option<String>,
    /// Required (unknown). ()
    pub postleitzahl: Option<String>,
    /// Required (unknown). ()
    pub region: Option<String>,
    /// Required (X [30]). (an..35)
    pub rollencodenummer: Option<String>,
    /// Required (X). (an..3)
    pub rollencodetyp: Option<Rollencodetyp>,
    /// Required (unknown). ()
    pub strasse: Option<String>,
    /// Required (unknown). ()
    pub strasse2: Option<String>,
    /// Required (unknown). ()
    pub strasse4: Option<String>,
    /// Required (unknown). ()
    pub titel: Option<String>,
    /// Required (unknown). ()
    pub vorname: Option<String>,
    /// Required (unknown). ()
    pub zusatzinfo: Option<String>,
    /// Required (unknown). ()
    pub zusatzinfo2: Option<String>,
    /// Required (unknown). ()
    pub zusatzinfo3: Option<String>,
    /// Required (unknown). ()
    pub zusatzinfo4: Option<String>,
    /// Required (unknown). ()
    pub zusatzinfo5: Option<String>,
}

/// Nachricht for PID 19123 — Ablehnung Reklamation einer Definition.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Nachricht {
    /// Required (unknown). ()
    pub abonnement: Option<String>,
    /// Optional. (an..35)
    pub auftragsdatum: Option<String>,
    /// Required (unknown). ()
    pub beschreibungsformat: Option<String>,
    /// Optional. (an..70)
    pub dokumentennummer: Option<String>,
    /// Optional. (an..3)
    pub dokumenttyp: Option<Dokumenttyp>,
    /// Optional. (an..35)
    pub erstellungsdatum: Option<String>,
    /// Required (unknown). ()
    pub geldbetrag: Option<String>,
    /// Required (unknown). ()
    pub geldbetrag_qualifier: Option<String>,
    /// Optional. (an..35)
    pub sperrdatum: Option<String>,
    /// Optional. (a1)
    pub uns_kennung: Option<UnsKennung>,
    /// Optional. (an..35)
    pub vertragsenddatum: Option<String>,
}

/// Referenz for PID 19123 — Ablehnung Reklamation einer Definition.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Referenz {
    /// Required (X). (an..3)
    pub qualifier: Option<Qualifier>,
    /// Required (X [529]). (an..70)
    pub referenz: Option<String>,
}

/// PID 19123 transaction — Ablehnung Reklamation einer Definition.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Transaktion {
}

/// PID 19123 message-level — Ablehnung Reklamation einer Definition.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Message {
    pub antwortkategorie: Option<Antwortkategorie>,
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub marktteilnehmer: Option<Vec<Marktteilnehmer>>,
    pub nachricht: Option<Nachricht>,
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub referenz: Option<Vec<Referenz>>,
}

/// Complete interchange for PID 19123 — Ablehnung Reklamation einer Definition.
pub type Interchange = crate::model::Interchange<Message, Transaktion>;
