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

/// kommunikationstyp for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Kommunikationstyp {
    /// E-Mail
    #[serde(rename = "EM")]
    ElektronischePost,
    /// Telefon
    #[serde(rename = "TE")]
    Telefon,
    /// Handy
    #[serde(rename = "AL")]
    Handy,
}

/// lokationsQualifier for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum LokationsQualifier {
    /// Meldepunkt
    #[serde(rename = "172")]
    Meldepunkt,
}

/// marktrolle for PID 35005
#[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,
    /// Lieferanschrift
    #[serde(rename = "DP")]
    Lieferanschrift,
    /// Kunde des LF
    #[serde(rename = "Z09")]
    KundeLf,
}

/// rollencodetyp for PID 35005
#[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,
}

/// qualifier for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MarktteilnehmerReferenzQualifier {
    /// Marktlokation
    #[serde(rename = "Z18")]
    Marktlokation,
    /// Technische Ressource
    #[serde(rename = "Z37")]
    TechnischeRessource,
}

/// dokumenttyp for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Dokumenttyp {
    /// Aufforderung zur Angebotsabgabe (Anfrage)
    #[serde(rename = "311")]
    AufforderungAngebotsabgabeAnfrage,
    /// Abrechnung des Messstellenbetriebs vom MSB an den LF
    #[serde(rename = "Z29")]
    AbrechnungMessstellenbetriebsMsbLf,
    /// Übermittlung von Werten an ESA
    #[serde(rename = "Z57")]
    UebermittlungWertenEsa,
    /// Bestellung eines Angebots einer Konfiguration
    #[serde(rename = "Z74")]
    BestellungAngebotsKonfiguration,
    /// Bestellung eines Angebots einer Konfiguration durch den LF
    #[serde(rename = "Z82")]
    BestellungAngebotsKonfigurationDurchLf,
    /// Bestellung eines Angebots Änderung der Technik der Lokation
    #[serde(rename = "Z93")]
    BestellungAngebotsAenderungTechnikLokation,
}

/// freitextQualifier for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum FreitextQualifier {
    /// Zusätzliche Informationen (für allgemeine Hinweise)
    #[serde(rename = "ACB")]
    ZusaetzlicheInformationenAllgemeineHinweise,
}

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

/// qualifier for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ReferenzQualifier {
    /// Prüfidentifikator
    #[serde(rename = "Z13")]
    Pruefidentifikator,
}

/// referenz for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ReferenzReferenz {
    /// Anfrage Angebot Änderung Technik
    #[serde(rename = "35005")]
    AnfrageAngebotAenderungTechnik,
}

/// handlungCode for PID 35005
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum HandlungCode {
    /// Erforderliches Produkt der Messlokation
    #[serde(rename = "Z19")]
    ErforderlichesProduktMesslokation,
    /// Erforderliches Produkt der Netzlokation
    #[serde(rename = "Z55")]
    ErforderlichesProduktNetzlokation,
    /// Erforderliches Produkt der Steuerbaren Ressource
    #[serde(rename = "Z56")]
    ErforderlichesProduktSteuerbarenRessource,
}

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AnsprechpartnerKontakt {
    /// Required (X). (an..3)
    pub funktion_code: Option<AnsprechpartnerFunktionCode>,
    /// 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 VorgangProduktIdentifikation {
    /// Required (X [47] ∧ (([35] ∧ [49]) ⊻ ([36] ∧ [48]))). (an..35)
    pub id: Option<String>,
}

/// Ansprechpartner for PID 35005 — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Ansprechpartner {
    /// Required (X (([939] [39]) ∨ ([940] [52])) ∧ [514]). (an..512)
    pub kommunikationsadresse: Option<String>,
    /// Required (X [1P0..1]). (an..3)
    pub kommunikationstyp: Option<Kommunikationstyp>,
    pub kontakt: Option<AnsprechpartnerKontakt>,
}

/// Marktteilnehmer for PID 35005 — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Marktteilnehmer {
    /// Required (X ([951] [503]) ⊻ ([961] [511]) ⊻ ([960] [510])). (an..35)
    pub lokations_code: Option<String>,
    /// Required (X). (an..3)
    pub lokations_qualifier: Option<LokationsQualifier>,
    /// Required (X). (an..3)
    pub marktrolle: Option<Marktrolle>,
    /// Required (X [10]). (an..35)
    pub rollencodenummer: Option<String>,
    /// Required (X). (an..3)
    pub rollencodetyp: Option<Rollencodetyp>,
}

/// MarktteilnehmerReferenz for PID 35005 — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct MarktteilnehmerReferenz {
    /// Required (X). (an..3)
    pub qualifier: Option<MarktteilnehmerReferenzQualifier>,
    /// Required (X [950]). (an..70)
    pub referenz: Option<String>,
}

/// Nachricht for PID 35005 — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Nachricht {
    /// 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>,
    /// Optional. (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 freitext_code: Option<String>,
    /// Required (unknown). ()
    pub freitext_funktion: Option<String>,
    /// Optional. (an..3)
    pub freitext_qualifier: Option<FreitextQualifier>,
    /// Required (unknown). ()
    pub produkt_leistung_code: 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 35005 — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Referenz {
    /// Required (X). (an..3)
    pub qualifier: Option<ReferenzQualifier>,
    /// Required (X). (an..70)
    pub referenz: Option<ReferenzReferenz>,
}

/// Vorgang for PID 35005 — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Vorgang {
    /// Required (X). (an..3)
    pub handlung_code: Option<HandlungCode>,
    /// Required (X [911]). (an..6)
    pub positionsnummer: Option<String>,
    pub produkt_identifikation: Option<VorgangProduktIdentifikation>,
}

/// PID 35005 transaction — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Transaktion {
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub vorgang: Option<Vec<Vorgang>>,
}

/// PID 35005 message-level — Anfrage Angebot Änderung Technik.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct Message {
    pub ansprechpartner: Option<Ansprechpartner>,
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub marktteilnehmer: Option<Vec<Marktteilnehmer>>,
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub marktteilnehmer_referenz: Option<Vec<MarktteilnehmerReferenz>>,
    pub nachricht: Option<Nachricht>,
    #[serde(default, deserialize_with = "crate::serde_helpers::deserialize_vec_or_single")]
    pub referenz: Option<Vec<Referenz>>,
}

/// Complete interchange for PID 35005 — Anfrage Angebot Änderung Technik.
pub type Interchange = crate::model::Interchange<Message, Transaktion>;
