zugferd_code_lists/zugferd_2_3_3/
enum1001.rs

1#![allow(non_camel_case_types)]
2
3#[cfg_attr(feature = "specta", derive(specta::Type))]
4#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
6pub enum Enum1001 {
7    /// Request for payment
8    ///
9    /// Invoice
10    RequestForPayment,
11    /// Debit note related to goods or services
12    ///
13    /// Invoice
14    DebitNoteRelatedToGoodsOrServices,
15    /// Credit note related to goods or services
16    ///
17    /// Credit Note
18    CreditNoteRelatedToGoodsOrServices,
19    /// Metered services invoice
20    ///
21    /// Invoice
22    MeteredServicesInvoice,
23    /// Credit note related to financial adjustments
24    ///
25    /// Credit Note
26    CreditNoteRelatedToFinancialAdjustments,
27    /// Debit note related to financial adjustments
28    ///
29    /// Invoice
30    DebitNoteRelatedToFinancialAdjustments,
31    /// Tax notification
32    ///
33    /// Invoice
34    TaxNotification,
35    /// Invoicing data sheet
36    ///
37    /// Invoice
38    InvoicingDataSheet,
39    /// Direct payment valuation
40    ///
41    /// Invoice
42    DirectPaymentValuation,
43    /// Provisional payment valuation
44    ///
45    /// Invoice
46    ProvisionalPaymentValuation,
47    /// Payment valuation
48    ///
49    /// Invoice
50    PaymentValuation,
51    /// Interim application for payment
52    ///
53    /// Invoice
54    InterimApplicationForPayment,
55    /// Final payment request based on completion of work
56    ///
57    /// Invoice
58    FinalPaymentRequestBasedOnCompletionWork,
59    /// Payment request for completed units
60    ///
61    /// Invoice
62    PaymentRequestForCompletedUnits,
63    /// Self billed credit note
64    ///
65    /// Credit Note
66    SelfBilledCreditNote,
67    /// Consolidated credit note - goods and services
68    ///
69    /// Credit Note
70    ConsolidatedCreditNoteGoodsAndServices,
71    /// Price variation invoice
72    ///
73    /// Invoice
74    PriceVariationInvoice,
75    /// Credit note for price variation
76    ///
77    /// Credit Note
78    CreditNoteForPriceVariation,
79    /// Delcredere credit note
80    ///
81    /// Credit Note
82    DelcredereCreditNote,
83    /// Proforma invoice
84    ///
85    /// Invoice
86    ProformaInvoice,
87    /// Partial invoice
88    ///
89    /// Invoice
90    PartialInvoice,
91    /// Commercial invoice which includes a packing list
92    ///
93    /// Invoice
94    CommercialInvoiceWhichIncludesAPackingList,
95    /// Commercial invoice
96    ///
97    /// Invoice
98    CommercialInvoice,
99    /// Credit note
100    ///
101    /// Credit Note
102    CreditNote,
103    /// Commission note
104    ///
105    /// Invoice
106    CommissionNote,
107    /// Debit note
108    ///
109    /// Invoice
110    DebitNote,
111    /// Corrected invoice
112    ///
113    /// Invoice
114    CorrectedInvoice,
115    /// Consolidated invoice
116    ///
117    /// Invoice
118    ConsolidatedInvoice,
119    /// Prepayment invoice
120    ///
121    /// Invoice
122    PrepaymentInvoice,
123    /// Hire invoice
124    ///
125    /// Invoice
126    HireInvoice,
127    /// Tax invoice
128    ///
129    /// Invoice
130    TaxInvoice,
131    /// Self-billed invoice
132    ///
133    /// Invoice
134    SelfBilledInvoice,
135    /// Delcredere invoice
136    ///
137    /// Invoice
138    DelcredereInvoice,
139    /// Factored invoice
140    ///
141    /// Invoice
142    FactoredInvoice,
143    /// Lease invoice
144    ///
145    /// Invoice
146    LeaseInvoice,
147    /// Consignment invoice
148    ///
149    /// Invoice
150    ConsignmentInvoice,
151    /// Factored credit note
152    ///
153    /// Credit Note
154    FactoredCreditNote,
155    /// Optical Character Reading (OCR) payment credit note
156    ///
157    /// Credit Note
158    OpticalCharacterReadingOcrPaymentCreditNote,
159    /// Debit advice
160    ///
161    /// Invoice
162    DebitAdvice,
163    /// Reversal of debit
164    ///
165    /// Invoice
166    ReversalDebit,
167    /// Reversal of credit
168    ///
169    /// Credit Note
170    ReversalCredit,
171    ///  Self-billed corrective invoice, invoice type, Corrected
172    ///
173    /// Invoice
174    SelfBilledCorrectiveInvoiceInvoiceTypeCorrected,
175    ///  Factored Corrective Invoice, invoice type, Corrected
176    ///
177    /// Invoice
178    FactoredCorrectiveInvoiceInvoiceTypeCorrected,
179    ///  Self billed Factored corrective invoice, invoice type, Corrected
180    ///
181    /// Invoice
182    SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected,
183    ///  Self Prepayment invoice, invoice type, Original
184    ///
185    /// Invoice
186    SelfPrepaymentInvoiceInvoiceTypeOriginal,
187    ///  Self billed factored invoice, invoice type, Original
188    ///
189    /// Invoice
190    SelfBilledFactoredInvoiceInvoiceTypeOriginal,
191    ///  Self billet factored Credit Note, Credit note type, Corrected
192    ///
193    /// Credit Note
194    SelfBilletFactoredCreditNoteCreditNoteTypeCorrected,
195    ///  Prepayment credit note, credit note type, Corrected
196    ///
197    /// Credit Note
198    PrepaymentCreditNoteCreditNoteTypeCorrected,
199    /// Self billed debit note
200    ///
201    /// Invoice
202    SelfBilledDebitNote,
203    /// Forwarder's credit note
204    ///
205    /// Credit Note
206    ForwardersCreditNote,
207    /// Forwarder's invoice discrepancy report
208    ///
209    /// Invoice
210    ForwardersInvoiceDiscrepancyReport,
211    /// Insurer's invoice
212    ///
213    /// Invoice
214    InsurersInvoice,
215    /// Forwarder's invoice
216    ///
217    /// Invoice
218    ForwardersInvoice,
219    /// Port charges documents
220    ///
221    /// Invoice
222    PortChargesDocuments,
223    /// Invoice information for accounting purposes
224    ///
225    /// Invoice
226    InvoiceInformationForAccountingPurposes,
227    /// Freight invoice
228    ///
229    /// Invoice
230    FreightInvoice,
231    /// Claim notification
232    ///
233    /// Invoice
234    ClaimNotification,
235    /// Consular invoice
236    ///
237    /// Invoice
238    ConsularInvoice,
239    /// Partial construction invoice
240    ///
241    /// Invoice
242    PartialConstructionInvoice,
243    /// Partial final construction invoice
244    ///
245    /// Invoice
246    PartialFinalConstructionInvoice,
247    /// Final construction invoice
248    ///
249    /// Invoice
250    FinalConstructionInvoice,
251    /// Customs invoice
252    ///
253    /// Invoice
254    CustomsInvoice,
255}
256
257impl std::fmt::Display for Enum1001 {
258    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
259        write!(f, "{}", <Self as crate::Code>::code(*self))
260    }
261}
262
263impl std::str::FromStr for Enum1001 {
264    type Err = crate::ParseError<Self>;
265    fn from_str(s: &str) -> Result<Self, Self::Err> {
266        <Self as crate::FromCode>::from_code(s)
267            .ok_or_else(|| crate::ParseError::<Self>::new(s.to_owned()))
268    }
269}
270
271impl crate::Code for Enum1001 {
272    fn code(self) -> &'static str {
273        match self {
274            Enum1001::RequestForPayment => "71",
275            Enum1001::DebitNoteRelatedToGoodsOrServices => "80",
276            Enum1001::CreditNoteRelatedToGoodsOrServices => "81",
277            Enum1001::MeteredServicesInvoice => "82",
278            Enum1001::CreditNoteRelatedToFinancialAdjustments => "83",
279            Enum1001::DebitNoteRelatedToFinancialAdjustments => "84",
280            Enum1001::TaxNotification => "102",
281            Enum1001::InvoicingDataSheet => "130",
282            Enum1001::DirectPaymentValuation => "202",
283            Enum1001::ProvisionalPaymentValuation => "203",
284            Enum1001::PaymentValuation => "204",
285            Enum1001::InterimApplicationForPayment => "211",
286            Enum1001::FinalPaymentRequestBasedOnCompletionWork => "218",
287            Enum1001::PaymentRequestForCompletedUnits => "219",
288            Enum1001::SelfBilledCreditNote => "261",
289            Enum1001::ConsolidatedCreditNoteGoodsAndServices => "262",
290            Enum1001::PriceVariationInvoice => "295",
291            Enum1001::CreditNoteForPriceVariation => "296",
292            Enum1001::DelcredereCreditNote => "308",
293            Enum1001::ProformaInvoice => "325",
294            Enum1001::PartialInvoice => "326",
295            Enum1001::CommercialInvoiceWhichIncludesAPackingList => "331",
296            Enum1001::CommercialInvoice => "380",
297            Enum1001::CreditNote => "381",
298            Enum1001::CommissionNote => "382",
299            Enum1001::DebitNote => "383",
300            Enum1001::CorrectedInvoice => "384",
301            Enum1001::ConsolidatedInvoice => "385",
302            Enum1001::PrepaymentInvoice => "386",
303            Enum1001::HireInvoice => "387",
304            Enum1001::TaxInvoice => "388",
305            Enum1001::SelfBilledInvoice => "389",
306            Enum1001::DelcredereInvoice => "390",
307            Enum1001::FactoredInvoice => "393",
308            Enum1001::LeaseInvoice => "394",
309            Enum1001::ConsignmentInvoice => "395",
310            Enum1001::FactoredCreditNote => "396",
311            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => "420",
312            Enum1001::DebitAdvice => "456",
313            Enum1001::ReversalDebit => "457",
314            Enum1001::ReversalCredit => "458",
315            Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected => "471",
316            Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected => "472",
317            Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected => "473",
318            Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal => "500",
319            Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal => "501",
320            Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected => "502",
321            Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected => "503",
322            Enum1001::SelfBilledDebitNote => "527",
323            Enum1001::ForwardersCreditNote => "532",
324            Enum1001::ForwardersInvoiceDiscrepancyReport => "553",
325            Enum1001::InsurersInvoice => "575",
326            Enum1001::ForwardersInvoice => "623",
327            Enum1001::PortChargesDocuments => "633",
328            Enum1001::InvoiceInformationForAccountingPurposes => "751",
329            Enum1001::FreightInvoice => "780",
330            Enum1001::ClaimNotification => "817",
331            Enum1001::ConsularInvoice => "870",
332            Enum1001::PartialConstructionInvoice => "875",
333            Enum1001::PartialFinalConstructionInvoice => "876",
334            Enum1001::FinalConstructionInvoice => "877",
335            Enum1001::CustomsInvoice => "935",
336        }
337    }
338}
339
340impl crate::Description for Enum1001 {
341    fn description(self) -> &'static str {
342        match self {
343            Enum1001::RequestForPayment => "Request for payment",
344            Enum1001::DebitNoteRelatedToGoodsOrServices => {
345                "Debit note related to goods or services"
346            }
347            Enum1001::CreditNoteRelatedToGoodsOrServices => {
348                "Credit note related to goods or services"
349            }
350            Enum1001::MeteredServicesInvoice => "Metered services invoice",
351            Enum1001::CreditNoteRelatedToFinancialAdjustments => {
352                "Credit note related to financial adjustments"
353            }
354            Enum1001::DebitNoteRelatedToFinancialAdjustments => {
355                "Debit note related to financial adjustments"
356            }
357            Enum1001::TaxNotification => "Tax notification",
358            Enum1001::InvoicingDataSheet => "Invoicing data sheet",
359            Enum1001::DirectPaymentValuation => "Direct payment valuation",
360            Enum1001::ProvisionalPaymentValuation => "Provisional payment valuation",
361            Enum1001::PaymentValuation => "Payment valuation",
362            Enum1001::InterimApplicationForPayment => "Interim application for payment",
363            Enum1001::FinalPaymentRequestBasedOnCompletionWork => {
364                "Final payment request based on completion of work"
365            }
366            Enum1001::PaymentRequestForCompletedUnits => "Payment request for completed units",
367            Enum1001::SelfBilledCreditNote => "Self billed credit note",
368            Enum1001::ConsolidatedCreditNoteGoodsAndServices => {
369                "Consolidated credit note - goods and services"
370            }
371            Enum1001::PriceVariationInvoice => "Price variation invoice",
372            Enum1001::CreditNoteForPriceVariation => "Credit note for price variation",
373            Enum1001::DelcredereCreditNote => "Delcredere credit note",
374            Enum1001::ProformaInvoice => "Proforma invoice",
375            Enum1001::PartialInvoice => "Partial invoice",
376            Enum1001::CommercialInvoiceWhichIncludesAPackingList => {
377                "Commercial invoice which includes a packing list"
378            }
379            Enum1001::CommercialInvoice => "Commercial invoice",
380            Enum1001::CreditNote => "Credit note",
381            Enum1001::CommissionNote => "Commission note",
382            Enum1001::DebitNote => "Debit note",
383            Enum1001::CorrectedInvoice => "Corrected invoice",
384            Enum1001::ConsolidatedInvoice => "Consolidated invoice",
385            Enum1001::PrepaymentInvoice => "Prepayment invoice",
386            Enum1001::HireInvoice => "Hire invoice",
387            Enum1001::TaxInvoice => "Tax invoice",
388            Enum1001::SelfBilledInvoice => "Self-billed invoice",
389            Enum1001::DelcredereInvoice => "Delcredere invoice",
390            Enum1001::FactoredInvoice => "Factored invoice",
391            Enum1001::LeaseInvoice => "Lease invoice",
392            Enum1001::ConsignmentInvoice => "Consignment invoice",
393            Enum1001::FactoredCreditNote => "Factored credit note",
394            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => {
395                "Optical Character Reading (OCR) payment credit note"
396            }
397            Enum1001::DebitAdvice => "Debit advice",
398            Enum1001::ReversalDebit => "Reversal of debit",
399            Enum1001::ReversalCredit => "Reversal of credit",
400            Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected => {
401                " Self-billed corrective invoice, invoice type, Corrected"
402            }
403            Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected => {
404                " Factored Corrective Invoice, invoice type, Corrected"
405            }
406            Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected => {
407                " Self billed Factored corrective invoice, invoice type, Corrected"
408            }
409            Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal => {
410                " Self Prepayment invoice, invoice type, Original"
411            }
412            Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal => {
413                " Self billed factored invoice, invoice type, Original"
414            }
415            Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected => {
416                " Self billet factored Credit Note, Credit note type, Corrected"
417            }
418            Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected => {
419                " Prepayment credit note, credit note type, Corrected"
420            }
421            Enum1001::SelfBilledDebitNote => "Self billed debit note",
422            Enum1001::ForwardersCreditNote => "Forwarder's credit note",
423            Enum1001::ForwardersInvoiceDiscrepancyReport => {
424                "Forwarder's invoice discrepancy report"
425            }
426            Enum1001::InsurersInvoice => "Insurer's invoice",
427            Enum1001::ForwardersInvoice => "Forwarder's invoice",
428            Enum1001::PortChargesDocuments => "Port charges documents",
429            Enum1001::InvoiceInformationForAccountingPurposes => {
430                "Invoice information for accounting purposes"
431            }
432            Enum1001::FreightInvoice => "Freight invoice",
433            Enum1001::ClaimNotification => "Claim notification",
434            Enum1001::ConsularInvoice => "Consular invoice",
435            Enum1001::PartialConstructionInvoice => "Partial construction invoice",
436            Enum1001::PartialFinalConstructionInvoice => "Partial final construction invoice",
437            Enum1001::FinalConstructionInvoice => "Final construction invoice",
438            Enum1001::CustomsInvoice => "Customs invoice",
439        }
440    }
441}
442
443impl crate::FromCode for Enum1001 {
444    fn from_code(code: &str) -> Option<Self>
445    where
446        Self: Sized,
447    {
448        match code {
449            "71" => Some(Enum1001::RequestForPayment),
450            "80" => Some(Enum1001::DebitNoteRelatedToGoodsOrServices),
451            "81" => Some(Enum1001::CreditNoteRelatedToGoodsOrServices),
452            "82" => Some(Enum1001::MeteredServicesInvoice),
453            "83" => Some(Enum1001::CreditNoteRelatedToFinancialAdjustments),
454            "84" => Some(Enum1001::DebitNoteRelatedToFinancialAdjustments),
455            "102" => Some(Enum1001::TaxNotification),
456            "130" => Some(Enum1001::InvoicingDataSheet),
457            "202" => Some(Enum1001::DirectPaymentValuation),
458            "203" => Some(Enum1001::ProvisionalPaymentValuation),
459            "204" => Some(Enum1001::PaymentValuation),
460            "211" => Some(Enum1001::InterimApplicationForPayment),
461            "218" => Some(Enum1001::FinalPaymentRequestBasedOnCompletionWork),
462            "219" => Some(Enum1001::PaymentRequestForCompletedUnits),
463            "261" => Some(Enum1001::SelfBilledCreditNote),
464            "262" => Some(Enum1001::ConsolidatedCreditNoteGoodsAndServices),
465            "295" => Some(Enum1001::PriceVariationInvoice),
466            "296" => Some(Enum1001::CreditNoteForPriceVariation),
467            "308" => Some(Enum1001::DelcredereCreditNote),
468            "325" => Some(Enum1001::ProformaInvoice),
469            "326" => Some(Enum1001::PartialInvoice),
470            "331" => Some(Enum1001::CommercialInvoiceWhichIncludesAPackingList),
471            "380" => Some(Enum1001::CommercialInvoice),
472            "381" => Some(Enum1001::CreditNote),
473            "382" => Some(Enum1001::CommissionNote),
474            "383" => Some(Enum1001::DebitNote),
475            "384" => Some(Enum1001::CorrectedInvoice),
476            "385" => Some(Enum1001::ConsolidatedInvoice),
477            "386" => Some(Enum1001::PrepaymentInvoice),
478            "387" => Some(Enum1001::HireInvoice),
479            "388" => Some(Enum1001::TaxInvoice),
480            "389" => Some(Enum1001::SelfBilledInvoice),
481            "390" => Some(Enum1001::DelcredereInvoice),
482            "393" => Some(Enum1001::FactoredInvoice),
483            "394" => Some(Enum1001::LeaseInvoice),
484            "395" => Some(Enum1001::ConsignmentInvoice),
485            "396" => Some(Enum1001::FactoredCreditNote),
486            "420" => Some(Enum1001::OpticalCharacterReadingOcrPaymentCreditNote),
487            "456" => Some(Enum1001::DebitAdvice),
488            "457" => Some(Enum1001::ReversalDebit),
489            "458" => Some(Enum1001::ReversalCredit),
490            "471" => Some(Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected),
491            "472" => Some(Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected),
492            "473" => Some(Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected),
493            "500" => Some(Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal),
494            "501" => Some(Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal),
495            "502" => Some(Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected),
496            "503" => Some(Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected),
497            "527" => Some(Enum1001::SelfBilledDebitNote),
498            "532" => Some(Enum1001::ForwardersCreditNote),
499            "553" => Some(Enum1001::ForwardersInvoiceDiscrepancyReport),
500            "575" => Some(Enum1001::InsurersInvoice),
501            "623" => Some(Enum1001::ForwardersInvoice),
502            "633" => Some(Enum1001::PortChargesDocuments),
503            "751" => Some(Enum1001::InvoiceInformationForAccountingPurposes),
504            "780" => Some(Enum1001::FreightInvoice),
505            "817" => Some(Enum1001::ClaimNotification),
506            "870" => Some(Enum1001::ConsularInvoice),
507            "875" => Some(Enum1001::PartialConstructionInvoice),
508            "876" => Some(Enum1001::PartialFinalConstructionInvoice),
509            "877" => Some(Enum1001::FinalConstructionInvoice),
510            "935" => Some(Enum1001::CustomsInvoice),
511            _ => None,
512        }
513    }
514}
515
516// Start: (Version) TryFrom Enum1001 to crate::zugferd_2_3_2::Enum1001
517impl std::convert::TryFrom<Enum1001> for crate::zugferd_2_3_2::Enum1001 {
518    type Error = ErrFromEnum1001ToCrateZugferd232Enum1001;
519    fn try_from(value: Enum1001) -> Result<Self, Self::Error> {
520        match value {
521            Enum1001::RequestForPayment => Ok(crate::zugferd_2_3_2::Enum1001::RequestForPayment),
522            Enum1001::DebitNoteRelatedToGoodsOrServices => Ok(crate::zugferd_2_3_2::Enum1001::DebitNoteRelatedToGoodsOrServices),
523            Enum1001::CreditNoteRelatedToGoodsOrServices => Ok(crate::zugferd_2_3_2::Enum1001::CreditNoteRelatedToGoodsOrServices),
524            Enum1001::MeteredServicesInvoice => Ok(crate::zugferd_2_3_2::Enum1001::MeteredServicesInvoice),
525            Enum1001::CreditNoteRelatedToFinancialAdjustments => Ok(crate::zugferd_2_3_2::Enum1001::CreditNoteRelatedToFinancialAdjustments),
526            Enum1001::DebitNoteRelatedToFinancialAdjustments => Ok(crate::zugferd_2_3_2::Enum1001::DebitNoteRelatedToFinancialAdjustments),
527            Enum1001::TaxNotification => Ok(crate::zugferd_2_3_2::Enum1001::TaxNotification),
528            Enum1001::InvoicingDataSheet => Ok(crate::zugferd_2_3_2::Enum1001::InvoicingDataSheet),
529            Enum1001::DirectPaymentValuation => Ok(crate::zugferd_2_3_2::Enum1001::DirectPaymentValuation),
530            Enum1001::ProvisionalPaymentValuation => Ok(crate::zugferd_2_3_2::Enum1001::ProvisionalPaymentValuation),
531            Enum1001::PaymentValuation => Ok(crate::zugferd_2_3_2::Enum1001::PaymentValuation),
532            Enum1001::InterimApplicationForPayment => Ok(crate::zugferd_2_3_2::Enum1001::InterimApplicationForPayment),
533            Enum1001::FinalPaymentRequestBasedOnCompletionWork => Ok(crate::zugferd_2_3_2::Enum1001::FinalPaymentRequestBasedOnCompletionWork),
534            Enum1001::PaymentRequestForCompletedUnits => Ok(crate::zugferd_2_3_2::Enum1001::PaymentRequestForCompletedUnits),
535            Enum1001::SelfBilledCreditNote => Ok(crate::zugferd_2_3_2::Enum1001::SelfBilledCreditNote),
536            Enum1001::ConsolidatedCreditNoteGoodsAndServices => Ok(crate::zugferd_2_3_2::Enum1001::ConsolidatedCreditNoteGoodsAndServices),
537            Enum1001::PriceVariationInvoice => Ok(crate::zugferd_2_3_2::Enum1001::PriceVariationInvoice),
538            Enum1001::CreditNoteForPriceVariation => Ok(crate::zugferd_2_3_2::Enum1001::CreditNoteForPriceVariation),
539            Enum1001::DelcredereCreditNote => Ok(crate::zugferd_2_3_2::Enum1001::DelcredereCreditNote),
540            Enum1001::ProformaInvoice => Ok(crate::zugferd_2_3_2::Enum1001::ProformaInvoice),
541            Enum1001::PartialInvoice => Ok(crate::zugferd_2_3_2::Enum1001::PartialInvoice),
542            Enum1001::CommercialInvoiceWhichIncludesAPackingList => Ok(crate::zugferd_2_3_2::Enum1001::CommercialInvoiceWhichIncludesAPackingList),
543            Enum1001::CommercialInvoice => Ok(crate::zugferd_2_3_2::Enum1001::CommercialInvoice),
544            Enum1001::CreditNote => Ok(crate::zugferd_2_3_2::Enum1001::CreditNote),
545            Enum1001::CommissionNote => Ok(crate::zugferd_2_3_2::Enum1001::CommissionNote),
546            Enum1001::DebitNote => Ok(crate::zugferd_2_3_2::Enum1001::DebitNote),
547            Enum1001::CorrectedInvoice => Ok(crate::zugferd_2_3_2::Enum1001::CorrectedInvoice),
548            Enum1001::ConsolidatedInvoice => Ok(crate::zugferd_2_3_2::Enum1001::ConsolidatedInvoice),
549            Enum1001::PrepaymentInvoice => Ok(crate::zugferd_2_3_2::Enum1001::PrepaymentInvoice),
550            Enum1001::HireInvoice => Ok(crate::zugferd_2_3_2::Enum1001::HireInvoice),
551            Enum1001::TaxInvoice => Ok(crate::zugferd_2_3_2::Enum1001::TaxInvoice),
552            Enum1001::SelfBilledInvoice => Ok(crate::zugferd_2_3_2::Enum1001::SelfBilledInvoice),
553            Enum1001::DelcredereInvoice => Ok(crate::zugferd_2_3_2::Enum1001::DelcredereInvoice),
554            Enum1001::FactoredInvoice => Ok(crate::zugferd_2_3_2::Enum1001::FactoredInvoice),
555            Enum1001::LeaseInvoice => Ok(crate::zugferd_2_3_2::Enum1001::LeaseInvoice),
556            Enum1001::ConsignmentInvoice => Ok(crate::zugferd_2_3_2::Enum1001::ConsignmentInvoice),
557            Enum1001::FactoredCreditNote => Ok(crate::zugferd_2_3_2::Enum1001::FactoredCreditNote),
558            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => Ok(crate::zugferd_2_3_2::Enum1001::OpticalCharacterReadingOcrPaymentCreditNote),
559            Enum1001::DebitAdvice => Ok(crate::zugferd_2_3_2::Enum1001::DebitAdvice),
560            Enum1001::ReversalDebit => Ok(crate::zugferd_2_3_2::Enum1001::ReversalDebit),
561            Enum1001::ReversalCredit => Ok(crate::zugferd_2_3_2::Enum1001::ReversalCredit),
562            Enum1001::SelfBilledDebitNote => Ok(crate::zugferd_2_3_2::Enum1001::SelfBilledDebitNote),
563            Enum1001::ForwardersCreditNote => Ok(crate::zugferd_2_3_2::Enum1001::ForwardersCreditNote),
564            Enum1001::ForwardersInvoiceDiscrepancyReport => Ok(crate::zugferd_2_3_2::Enum1001::ForwardersInvoiceDiscrepancyReport),
565            Enum1001::InsurersInvoice => Ok(crate::zugferd_2_3_2::Enum1001::InsurersInvoice),
566            Enum1001::ForwardersInvoice => Ok(crate::zugferd_2_3_2::Enum1001::ForwardersInvoice),
567            Enum1001::PortChargesDocuments => Ok(crate::zugferd_2_3_2::Enum1001::PortChargesDocuments),
568            Enum1001::InvoiceInformationForAccountingPurposes => Ok(crate::zugferd_2_3_2::Enum1001::InvoiceInformationForAccountingPurposes),
569            Enum1001::FreightInvoice => Ok(crate::zugferd_2_3_2::Enum1001::FreightInvoice),
570            Enum1001::ClaimNotification => Ok(crate::zugferd_2_3_2::Enum1001::ClaimNotification),
571            Enum1001::ConsularInvoice => Ok(crate::zugferd_2_3_2::Enum1001::ConsularInvoice),
572            Enum1001::PartialConstructionInvoice => Ok(crate::zugferd_2_3_2::Enum1001::PartialConstructionInvoice),
573            Enum1001::PartialFinalConstructionInvoice => Ok(crate::zugferd_2_3_2::Enum1001::PartialFinalConstructionInvoice),
574            Enum1001::FinalConstructionInvoice => Ok(crate::zugferd_2_3_2::Enum1001::FinalConstructionInvoice),
575            Enum1001::CustomsInvoice => Ok(crate::zugferd_2_3_2::Enum1001::CustomsInvoice),
576            Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected => Err(ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected),
577            Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected => Err(ErrFromEnum1001ToCrateZugferd232Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected),
578            Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected => Err(ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected),
579            Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal => Err(ErrFromEnum1001ToCrateZugferd232Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal),
580            Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal => Err(ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal),
581            Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected => Err(ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected),
582            Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected => Err(ErrFromEnum1001ToCrateZugferd232Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected),
583        }
584    }
585}
586
587/// All the variants of Enum1001 that are not matched to any variant of crate::zugferd_2_3_2::Enum1001
588#[derive(Debug, PartialEq, Eq, Hash)]
589pub enum ErrFromEnum1001ToCrateZugferd232Enum1001 {
590    SelfBilledCorrectiveInvoiceInvoiceTypeCorrected,
591    FactoredCorrectiveInvoiceInvoiceTypeCorrected,
592    SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected,
593    SelfPrepaymentInvoiceInvoiceTypeOriginal,
594    SelfBilledFactoredInvoiceInvoiceTypeOriginal,
595    SelfBilletFactoredCreditNoteCreditNoteTypeCorrected,
596    PrepaymentCreditNoteCreditNoteTypeCorrected,
597}
598
599impl std::fmt::Display for ErrFromEnum1001ToCrateZugferd232Enum1001 {
600    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
601        match self {
602            ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected => write!(f, "SelfBilledCorrectiveInvoiceInvoiceTypeCorrected has no corresponding value in crate::zugferd_2_3_2::Enum1001"),
603            ErrFromEnum1001ToCrateZugferd232Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected => write!(f, "FactoredCorrectiveInvoiceInvoiceTypeCorrected has no corresponding value in crate::zugferd_2_3_2::Enum1001"),
604            ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected => write!(f, "SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected has no corresponding value in crate::zugferd_2_3_2::Enum1001"),
605            ErrFromEnum1001ToCrateZugferd232Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal => write!(f, "SelfPrepaymentInvoiceInvoiceTypeOriginal has no corresponding value in crate::zugferd_2_3_2::Enum1001"),
606            ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal => write!(f, "SelfBilledFactoredInvoiceInvoiceTypeOriginal has no corresponding value in crate::zugferd_2_3_2::Enum1001"),
607            ErrFromEnum1001ToCrateZugferd232Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected => write!(f, "SelfBilletFactoredCreditNoteCreditNoteTypeCorrected has no corresponding value in crate::zugferd_2_3_2::Enum1001"),
608            ErrFromEnum1001ToCrateZugferd232Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected => write!(f, "PrepaymentCreditNoteCreditNoteTypeCorrected has no corresponding value in crate::zugferd_2_3_2::Enum1001"),
609        }
610    }
611}
612
613impl std::error::Error for ErrFromEnum1001ToCrateZugferd232Enum1001 {}
614
615impl std::convert::TryFrom<crate::zugferd_2_3_2::Enum1001> for Enum1001 {
616    type Error = std::convert::Infallible;
617    fn try_from(value: crate::zugferd_2_3_2::Enum1001) -> Result<Enum1001, Self::Error> {
618        match value {
619            crate::zugferd_2_3_2::Enum1001::RequestForPayment => Ok(Enum1001::RequestForPayment),
620            crate::zugferd_2_3_2::Enum1001::DebitNoteRelatedToGoodsOrServices => {
621                Ok(Enum1001::DebitNoteRelatedToGoodsOrServices)
622            }
623            crate::zugferd_2_3_2::Enum1001::CreditNoteRelatedToGoodsOrServices => {
624                Ok(Enum1001::CreditNoteRelatedToGoodsOrServices)
625            }
626            crate::zugferd_2_3_2::Enum1001::MeteredServicesInvoice => {
627                Ok(Enum1001::MeteredServicesInvoice)
628            }
629            crate::zugferd_2_3_2::Enum1001::CreditNoteRelatedToFinancialAdjustments => {
630                Ok(Enum1001::CreditNoteRelatedToFinancialAdjustments)
631            }
632            crate::zugferd_2_3_2::Enum1001::DebitNoteRelatedToFinancialAdjustments => {
633                Ok(Enum1001::DebitNoteRelatedToFinancialAdjustments)
634            }
635            crate::zugferd_2_3_2::Enum1001::TaxNotification => Ok(Enum1001::TaxNotification),
636            crate::zugferd_2_3_2::Enum1001::InvoicingDataSheet => Ok(Enum1001::InvoicingDataSheet),
637            crate::zugferd_2_3_2::Enum1001::DirectPaymentValuation => {
638                Ok(Enum1001::DirectPaymentValuation)
639            }
640            crate::zugferd_2_3_2::Enum1001::ProvisionalPaymentValuation => {
641                Ok(Enum1001::ProvisionalPaymentValuation)
642            }
643            crate::zugferd_2_3_2::Enum1001::PaymentValuation => Ok(Enum1001::PaymentValuation),
644            crate::zugferd_2_3_2::Enum1001::InterimApplicationForPayment => {
645                Ok(Enum1001::InterimApplicationForPayment)
646            }
647            crate::zugferd_2_3_2::Enum1001::FinalPaymentRequestBasedOnCompletionWork => {
648                Ok(Enum1001::FinalPaymentRequestBasedOnCompletionWork)
649            }
650            crate::zugferd_2_3_2::Enum1001::PaymentRequestForCompletedUnits => {
651                Ok(Enum1001::PaymentRequestForCompletedUnits)
652            }
653            crate::zugferd_2_3_2::Enum1001::SelfBilledCreditNote => {
654                Ok(Enum1001::SelfBilledCreditNote)
655            }
656            crate::zugferd_2_3_2::Enum1001::ConsolidatedCreditNoteGoodsAndServices => {
657                Ok(Enum1001::ConsolidatedCreditNoteGoodsAndServices)
658            }
659            crate::zugferd_2_3_2::Enum1001::PriceVariationInvoice => {
660                Ok(Enum1001::PriceVariationInvoice)
661            }
662            crate::zugferd_2_3_2::Enum1001::CreditNoteForPriceVariation => {
663                Ok(Enum1001::CreditNoteForPriceVariation)
664            }
665            crate::zugferd_2_3_2::Enum1001::DelcredereCreditNote => {
666                Ok(Enum1001::DelcredereCreditNote)
667            }
668            crate::zugferd_2_3_2::Enum1001::ProformaInvoice => Ok(Enum1001::ProformaInvoice),
669            crate::zugferd_2_3_2::Enum1001::PartialInvoice => Ok(Enum1001::PartialInvoice),
670            crate::zugferd_2_3_2::Enum1001::CommercialInvoiceWhichIncludesAPackingList => {
671                Ok(Enum1001::CommercialInvoiceWhichIncludesAPackingList)
672            }
673            crate::zugferd_2_3_2::Enum1001::CommercialInvoice => Ok(Enum1001::CommercialInvoice),
674            crate::zugferd_2_3_2::Enum1001::CreditNote => Ok(Enum1001::CreditNote),
675            crate::zugferd_2_3_2::Enum1001::CommissionNote => Ok(Enum1001::CommissionNote),
676            crate::zugferd_2_3_2::Enum1001::DebitNote => Ok(Enum1001::DebitNote),
677            crate::zugferd_2_3_2::Enum1001::CorrectedInvoice => Ok(Enum1001::CorrectedInvoice),
678            crate::zugferd_2_3_2::Enum1001::ConsolidatedInvoice => {
679                Ok(Enum1001::ConsolidatedInvoice)
680            }
681            crate::zugferd_2_3_2::Enum1001::PrepaymentInvoice => Ok(Enum1001::PrepaymentInvoice),
682            crate::zugferd_2_3_2::Enum1001::HireInvoice => Ok(Enum1001::HireInvoice),
683            crate::zugferd_2_3_2::Enum1001::TaxInvoice => Ok(Enum1001::TaxInvoice),
684            crate::zugferd_2_3_2::Enum1001::SelfBilledInvoice => Ok(Enum1001::SelfBilledInvoice),
685            crate::zugferd_2_3_2::Enum1001::DelcredereInvoice => Ok(Enum1001::DelcredereInvoice),
686            crate::zugferd_2_3_2::Enum1001::FactoredInvoice => Ok(Enum1001::FactoredInvoice),
687            crate::zugferd_2_3_2::Enum1001::LeaseInvoice => Ok(Enum1001::LeaseInvoice),
688            crate::zugferd_2_3_2::Enum1001::ConsignmentInvoice => Ok(Enum1001::ConsignmentInvoice),
689            crate::zugferd_2_3_2::Enum1001::FactoredCreditNote => Ok(Enum1001::FactoredCreditNote),
690            crate::zugferd_2_3_2::Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => {
691                Ok(Enum1001::OpticalCharacterReadingOcrPaymentCreditNote)
692            }
693            crate::zugferd_2_3_2::Enum1001::DebitAdvice => Ok(Enum1001::DebitAdvice),
694            crate::zugferd_2_3_2::Enum1001::ReversalDebit => Ok(Enum1001::ReversalDebit),
695            crate::zugferd_2_3_2::Enum1001::ReversalCredit => Ok(Enum1001::ReversalCredit),
696            crate::zugferd_2_3_2::Enum1001::SelfBilledDebitNote => {
697                Ok(Enum1001::SelfBilledDebitNote)
698            }
699            crate::zugferd_2_3_2::Enum1001::ForwardersCreditNote => {
700                Ok(Enum1001::ForwardersCreditNote)
701            }
702            crate::zugferd_2_3_2::Enum1001::ForwardersInvoiceDiscrepancyReport => {
703                Ok(Enum1001::ForwardersInvoiceDiscrepancyReport)
704            }
705            crate::zugferd_2_3_2::Enum1001::InsurersInvoice => Ok(Enum1001::InsurersInvoice),
706            crate::zugferd_2_3_2::Enum1001::ForwardersInvoice => Ok(Enum1001::ForwardersInvoice),
707            crate::zugferd_2_3_2::Enum1001::PortChargesDocuments => {
708                Ok(Enum1001::PortChargesDocuments)
709            }
710            crate::zugferd_2_3_2::Enum1001::InvoiceInformationForAccountingPurposes => {
711                Ok(Enum1001::InvoiceInformationForAccountingPurposes)
712            }
713            crate::zugferd_2_3_2::Enum1001::FreightInvoice => Ok(Enum1001::FreightInvoice),
714            crate::zugferd_2_3_2::Enum1001::ClaimNotification => Ok(Enum1001::ClaimNotification),
715            crate::zugferd_2_3_2::Enum1001::ConsularInvoice => Ok(Enum1001::ConsularInvoice),
716            crate::zugferd_2_3_2::Enum1001::PartialConstructionInvoice => {
717                Ok(Enum1001::PartialConstructionInvoice)
718            }
719            crate::zugferd_2_3_2::Enum1001::PartialFinalConstructionInvoice => {
720                Ok(Enum1001::PartialFinalConstructionInvoice)
721            }
722            crate::zugferd_2_3_2::Enum1001::FinalConstructionInvoice => {
723                Ok(Enum1001::FinalConstructionInvoice)
724            }
725            crate::zugferd_2_3_2::Enum1001::CustomsInvoice => Ok(Enum1001::CustomsInvoice),
726        }
727    }
728}
729// End: (Version) TryFrom crate::zugferd_2_3_2::Enum1001 to Enum1001