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

/// kontakt.funktion_code for PID 19117
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum AnsprechpartnerFunktionCode {
    /// Informationskontakt
    #[serde(rename = "IC")]
    Informationskontakt,
}

/// kommunikationstyp for PID 19117
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Kommunikationstyp {
    /// 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,
}

/// ebdReferenz for PID 19117
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum EbdReferenz {
    /// EBD Nr. E_0470
    #[serde(rename = "E_0470")]
    EbdNrE0470,
    /// EBD Nr. E_0497
    #[serde(rename = "E_0497")]
    EbdNrE0497,
    /// EBD Nr. E_1000
    #[serde(rename = "E_1000")]
    EbdNrE1000,
    /// EBD Nr. E_1004
    #[serde(rename = "E_1004")]
    EbdNrE1004,
}

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

/// marktrolle for PID 19117
#[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 19117
#[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,
    /// DE, DVGW Service & Consult GmbH
    #[serde(rename = "332")]
    DeDvgwServiceConsultGmbh,
}

/// dokumenttyp for PID 19117
#[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,
    /// Bilanzierte Menge (MMMA)
    #[serde(rename = "Z23")]
    BilanzierteMengeMmma,
    /// 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,
}

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

/// qualifier for PID 19117
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Qualifier {
    /// Auftragsnummer (Einkauf)
    #[serde(rename = "ON")]
    AuftragsnummerEinkauf,
    /// Prüfidentifikator
    #[serde(rename = "Z13")]
    Pruefidentifikator,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AnsprechpartnerKontakt {
    /// Required (X). (an..3)
    pub funktion_code: Option<AnsprechpartnerFunktionCode>,
}

/// Ansprechpartner for PID 19117 — Ablehnung Sperr-/Entsperr- auftrag.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Ansprechpartner {
    /// Required (X (([939] [50]) ∨ ([940] [51])) ∧ [540]). (an..512)
    pub kommunikationsadresse: Option<String>,
    /// Required (X [1P0..1]). (an..3)
    pub kommunikationstyp: Option<Kommunikationstyp>,
    pub kontakt: Option<AnsprechpartnerKontakt>,
    /// Required (X). ()
    pub name: Option<String>,
    /// Required (X). (an..256)
    pub telefonnummer: Option<String>,
}

/// Antwortkategorie for PID 19117 — Ablehnung Sperr-/Entsperr- auftrag.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Antwortkategorie {
    /// Required (X [18]). (an..3)
    pub antwort_code: Option<String>,
    /// Required (X [24] ∧ [492]). (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 19117 — Ablehnung Sperr-/Entsperr- auftrag.
#[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). (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 19117 — Ablehnung Sperr-/Entsperr- auftrag.
#[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 19117 — Ablehnung Sperr-/Entsperr- auftrag.
#[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 19117 transaction — Ablehnung Sperr-/Entsperr- auftrag.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Transaktion {
}

/// PID 19117 message-level — Ablehnung Sperr-/Entsperr- auftrag.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Message {
    pub ansprechpartner: Option<Ansprechpartner>,
    pub antwortkategorie: Option<Antwortkategorie>,
    pub marktteilnehmer: Option<Marktteilnehmer>,
    pub nachricht: Option<Nachricht>,
    pub referenz: Option<Referenz>,
}

/// Complete interchange for PID 19117 — Ablehnung Sperr-/Entsperr- auftrag.
pub type Interchange = crate::model::Interchange<Message, Transaktion>;
