edifact_types/d95b/
element.rs

1use super::*;
2use crate::util::{clean_num, Parser};
3use edifact_types_macros::{DisplayInnerSegment, ParseElement};
4use nom::IResult;
5use serde::{Deserialize, Serialize};
6use std::{
7    fmt::{self, Debug},
8    str::FromStr,
9};
10
11/// C002 - DOCUMENT/MESSAGE NAME
12#[derive(
13    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
14)]
15pub struct C002 {
16    pub _010: Option<String>,
17    pub _020: Option<String>,
18    pub _030: Option<String>,
19    pub _040: Option<String>,
20}
21
22/// C040 - CARRIER
23///
24/// Identification of a carrier by code and/or by name. Code
25/// preferred.
26#[derive(
27    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
28)]
29pub struct C040 {
30    /// Carrier identification
31    ///
32    /// C  an..17
33    pub _010: Option<String>,
34    /// Code list qualifier
35    ///
36    /// C  an..3
37    pub _020: Option<String>,
38    /// Code list responsible agency, coded
39    ///
40    /// C  an..3
41    pub _030: Option<String>,
42    /// Carrier name
43    ///
44    /// C  an..35
45    pub _040: Option<String>,
46}
47
48/// C056 - DEPARTMENT OR EMPLOYEE DETAILS
49///
50/// Code and/or name of a department or employee. Code
51/// preferred.
52#[derive(
53    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
54)]
55pub struct C056 {
56    /// Department or employee identification
57    ///
58    /// C  an..17
59    pub _010: Option<String>,
60    /// Department or employee
61    ///
62    /// C  an..35
63    pub _020: Option<String>,
64}
65
66/// C058 - NAME AND ADDRESS
67///
68/// Unstructured name and address: one to five lines.
69#[derive(
70    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
71)]
72pub struct C058 {
73    /// Name and address line
74    ///
75    /// M  an..35
76    pub _010: String,
77    /// Name and address line
78    ///
79    /// C  an..35
80    pub _020: Option<String>,
81    /// Name and address line
82    ///
83    /// C  an..35
84    pub _030: Option<String>,
85    /// Name and address line
86    ///
87    /// C  an..35
88    pub _040: Option<String>,
89    /// Name and address line
90    ///
91    /// C  an..35
92    pub _050: Option<String>,
93}
94
95/// C059 - STREET
96///
97/// Street address and/or PO Box number in a structured
98/// address: one to three lines.
99#[derive(
100    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
101)]
102pub struct C059 {
103    /// Street and number/p.o. box
104    ///
105    /// M  an..35
106    pub _010: String,
107    /// Street and number/p.o. box
108    ///
109    /// C  an..35
110    pub _020: Option<String>,
111    /// Street and number/p.o. box
112    ///
113    /// C  an..35
114    pub _030: Option<String>,
115}
116
117/// C080 - PARTY NAME
118///
119/// Identification of a transaction party by name, one to five
120/// lines. Party name may be formatted.
121#[derive(
122    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
123)]
124pub struct C080 {
125    /// Party name
126    ///
127    /// M  an..35
128    pub _010: String,
129    /// Party name
130    ///
131    /// C  an..35
132    pub _020: Option<String>,
133    /// Party name
134    ///
135    /// C  an..35
136    pub _030: Option<String>,
137    /// Party name
138    ///
139    /// C  an..35
140    pub _040: Option<String>,
141    /// Party name
142    ///
143    /// C  an..35
144    pub _050: Option<String>,
145    /// Party name format, coded
146    ///
147    /// C  an..3
148    pub _060: Option<String>,
149}
150
151/// C082  PARTY IDENTIFICATION DETAILS
152///
153/// Identification of a transaction party by code.
154#[derive(
155    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
156)]
157pub struct C082 {
158    /// Party id. identification
159    ///
160    /// M  an..35
161    pub _010: String,
162    /// Code list qualifier
163    ///
164    /// C  an..3
165    pub _020: Option<String>,
166    /// Code list responsible agency, coded
167    ///
168    /// C  an..3
169    pub _030: Option<String>,
170}
171
172/// C107 - TEXT REFERENCE
173///
174/// Coded reference to a standard text and its source.
175#[derive(
176    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
177)]
178pub struct C107 {
179    /// Free text, coded
180    ///
181    /// M  an..3
182    pub _010: String,
183    /// Code list qualifier
184    ///
185    /// C  an..3
186    pub _020: Option<String>,
187    /// Code list responsible agency, coded
188    ///
189    /// C  an..3
190    pub _030: Option<String>,
191}
192
193/// C108 - TEXT LITERAL
194///
195/// Free text; one to five lines.
196#[derive(
197    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
198)]
199pub struct C108 {
200    /// Free text
201    ///
202    /// M  an..70
203    pub _010: String,
204    /// Free text
205    ///
206    /// C  an..70
207    pub _020: Option<String>,
208    /// Free text
209    ///
210    /// C  an..70
211    pub _030: Option<String>,
212    /// Free text
213    ///
214    /// C  an..70
215    pub _040: Option<String>,
216    /// Free text
217    ///
218    /// C  an..70
219    pub _050: Option<String>,
220}
221
222/// C174 - VALUE/RANGE
223///
224/// Measurement value and relevant minimum and maximum
225/// tolerances in that order.
226#[derive(
227    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
228)]
229pub struct C174 {
230    /// Measure unit qualifier
231    ///
232    /// M  an..3
233    pub _010: String,
234    /// Measurement value
235    ///
236    /// C  n..18
237    pub _020: Option<String>,
238    /// Range minimum
239    ///
240    /// C  n..18
241    pub _030: Option<String>,
242    /// Range maximum
243    ///
244    /// C  n..18
245    pub _040: Option<String>,
246    /// Significant digits
247    ///
248    /// C  n..2
249    pub _050: Option<String>,
250}
251
252/// C205 - HAZARD CODE
253///
254/// The identification of the dangerous goods in code.
255#[derive(
256    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
257)]
258pub struct C205 {
259    /// Hazard code identification                        M  an..7
260    pub _010: String,
261    /// Hazard substance/item/page number                 C  an..7
262    pub _020: Option<String>,
263    /// Hazard code version number                        C  an..10
264    pub _030: Option<String>,
265}
266
267/// C211 - DIMENSIONS
268///
269/// Specification of the dimensions of a transportable unit.
270#[derive(
271    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
272)]
273pub struct C211 {
274    /// Measure unit qualifier
275    ///
276    /// M  an..3
277    pub _010: String,
278    /// Length dimension
279    ///
280    /// C  n..15
281    pub _020: Option<String>,
282    /// Width dimension
283    ///
284    /// C  n..15
285    pub _030: Option<String>,
286    /// Height dimension
287    ///
288    /// C  n..15
289    pub _040: Option<String>,
290}
291
292/// C215 - SEAL ISSUER
293///
294/// Identification of the issuer of a seal on equipment either
295/// by code or by name.
296#[derive(
297    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
298)]
299pub struct C215 {
300    /// Sealing party, coded
301    ///
302    /// C  an..3
303    pub _010: Option<String>,
304    /// Code list qualifier
305    ///
306    /// C  an..3
307    pub _020: Option<String>,
308    /// Code list responsible agency, coded
309    ///
310    /// C  an..3
311    pub _030: Option<String>,
312    /// Sealing party
313    ///
314    /// C  an..35
315    pub _040: Option<String>,
316}
317
318/// C219 - MOVEMENT TYPE
319///
320/// Description of type of service for movement of cargo.
321#[derive(
322    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
323)]
324pub struct C219 {
325    /// Movement type, coded
326    ///
327    /// C  an..3
328    pub _010: Option<String>,
329    /// Movement type
330    ///
331    /// C  an..35
332    pub _020: Option<String>,
333}
334
335/// C220 - MODE OF TRANSPORT
336///
337/// Method of transport code or name. Code preferred.
338#[derive(
339    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
340)]
341pub struct C220 {
342    /// Mode of transport, coded
343    ///
344    /// C  an..3
345    pub _010: Option<String>,
346    /// Mode of transport
347    ///
348    /// C  an..17
349    pub _020: Option<String>,
350}
351
352/// C222 - TRANSPORT IDENTIFICATION
353///
354/// Code and/or name identifying the means of transport.
355#[derive(
356    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
357)]
358pub struct C222 {
359    /// Id. of means of transport identification
360    ///
361    /// C  an..9
362    pub _010: Option<String>,
363    /// Code list qualifier
364    ///
365    /// C  an..3
366    pub _020: Option<String>,
367    /// Code list responsible agency, coded
368    ///
369    /// C  an..3
370    pub _030: Option<String>,
371    /// Id. of the means of transport
372    ///
373    /// C  an..35
374    pub _040: Option<String>,
375    /// Nationality of means of transport, coded
376    ///
377    /// C  an..3
378    pub _050: Option<String>,
379}
380
381/// C223 - DANGEROUS GOODS SHIPMENT FLASHPOINT
382///
383/// Temperature at which a vapor according to ISO 1523/73 can
384/// be ignited.
385#[derive(
386    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
387)]
388pub struct C223 {
389    /// Shipment flashpoint
390    ///
391    /// C  n3
392    pub _010: Option<String>,
393    /// Measure unit qualifier
394    ///
395    /// C  an..3
396    pub _020: Option<String>,
397}
398
399/// C224 - EQUIPMENT SIZE AND TYPE
400///
401/// Code and/or name identifying size and type of equipment
402/// used in transport. Code preferred.
403#[derive(
404    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
405)]
406pub struct C224 {
407    /// Equipment size and type identification
408    ///
409    /// C  an..10
410    pub _010: Option<String>,
411    /// Code list qualifier
412    ///
413    /// C  an..3
414    pub _020: Option<String>,
415    /// Code list responsible agency, coded
416    ///
417    /// C  an..3
418    pub _030: Option<String>,
419    /// Equipment size and type
420    ///
421    /// C  an..35
422    pub _040: Option<String>,
423}
424
425/// C228 - TRANSPORT MEANS
426///
427/// Code and/or name identifying the type of means of
428/// transport.
429#[derive(
430    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
431)]
432pub struct C228 {
433    /// Type of means of transport identification
434    ///
435    /// C  an..8
436    pub _010: Option<String>,
437    /// Type of means of transport
438    ///
439    /// C  an..17
440    pub _020: Option<String>,
441}
442
443/// C234 - UNDG INFORMATION
444///
445/// Information on United Nations Dangerous Goods
446/// classification.
447#[derive(
448    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
449)]
450pub struct C234 {
451    /// UNDG number
452    ///
453    /// C  n4
454    pub _010: Option<String>,
455    /// Dangerous goods flashpoint
456    ///
457    /// C  an..8
458    pub _020: Option<String>,
459}
460
461/// C235 - HAZARD IDENTIFICATION
462///
463/// Identification of the Orange placard required on the means
464/// of transport.
465#[derive(
466    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
467)]
468pub struct C235 {
469    /// Hazard identification number, upper part
470    ///
471    /// C  an..4
472    pub _010: Option<String>,
473    /// Substance identification number, lower part
474    ///
475    /// C  an4
476    pub _020: Option<String>,
477}
478
479/// C236 - DANGEROUS GOODS LABEL
480///
481/// Markings identifying the type of hazardous goods and
482/// similar information.
483#[derive(
484    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
485)]
486pub struct C236 {
487    /// Dangerous goods label marking                     C  an..4
488    pub _010: Option<String>,
489    /// Dangerous goods label marking                     C  an..4
490    pub _020: Option<String>,
491    /// Dangerous goods label marking                     C  an..4
492    pub _030: Option<String>,
493}
494
495/// C237 - EQUIPMENT IDENTIFICATION
496///
497/// Marks (letters and/or numbers) identifying equipment used
498/// for transport such as a container.
499#[derive(
500    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
501)]
502pub struct C237 {
503    /// Equipment identification number
504    ///
505    /// C  an..17
506    pub _010: Option<String>,
507    /// Code list qualifier
508    ///
509    /// C  an..3
510    pub _020: Option<String>,
511    /// Code list responsible agency, coded
512    ///
513    /// C  an..3
514    pub _030: Option<String>,
515    /// Country, coded
516    ///
517    /// C  an..3
518    pub _040: Option<String>,
519}
520
521/// C239 - TEMPERATURE SETTING
522///
523/// The temperature under which the goods are (to be) stored
524/// or shipped.
525#[derive(
526    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
527)]
528pub struct C239 {
529    /// Temperature setting                               C  n3
530    pub _010: Option<String>,
531    /// Measure unit qualifier                            C  an..3
532    pub _020: Option<String>,
533}
534
535/// C270 - CONTROL
536///
537/// Control total for checking integrity of a message or part
538/// of a message.
539#[derive(
540    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
541)]
542pub struct C270 {
543    /// Control qualifier
544    ///
545    /// M  an..3
546    pub _010: String,
547    /// Control value
548    ///
549    /// M  n..18
550    pub _020: String,
551    /// Measure unit qualifier
552    ///
553    /// C  an..3
554    pub _030: Option<String>,
555}
556
557/// C280 - RANGE
558///
559/// Range minimum and maximum limits.
560#[derive(
561    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
562)]
563pub struct C280 {
564    /// Measure unit qualifier                            M  an..3
565    pub _010: String,
566    /// Range minimum                                     C  n..18
567    pub _020: Option<String>,
568    /// Range maximum                                     C  n..18
569    pub _030: Option<String>,
570}
571
572/// C401 - EXCESS TRANSPORTATION INFORMATION
573///
574/// To provide details of reason for, and responsibility for,
575/// use of transportation other than normally utilized.
576#[derive(
577    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
578)]
579pub struct C401 {
580    /// Excess transportation reason, coded
581    ///
582    /// M  an..3
583    pub _010: String,
584    /// Excess transportation responsibility, coded
585    ///
586    /// M  an..3
587    pub _020: String,
588    /// Customer authorization number
589    ///
590    /// C  an..17
591    pub _030: Option<String>,
592}
593
594/// C502 - MEASUREMENT DETAILS
595///
596/// Identification of measurement type.
597#[derive(
598    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
599)]
600pub struct C502 {
601    /// Measurement dimension, coded                      C  an..3
602    pub _010: Option<String>,
603    /// Measurement significance, coded                   C  an..3
604    pub _020: Option<String>,
605    /// Measurement attribute, coded                      C  an..3
606    pub _030: Option<String>,
607    /// Measurement attribute                             C  an..70
608    pub _040: Option<String>,
609}
610
611/// C506 - REFERENCE
612///
613/// Identification of a reference.
614#[derive(
615    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
616)]
617pub struct C506 {
618    /// Reference qualifier
619    ///
620    /// M  an..3
621    pub _010: String,
622    /// Reference number
623    ///
624    /// C  an..35
625    pub _020: Option<String>,
626    /// Line number
627    ///
628    /// C  an..6
629    pub _030: Option<String>,
630    /// Reference version number
631    ///
632    /// C  an..35
633    pub _040: Option<String>,
634}
635
636/// C507 - DATE/TIME/PERIOD
637///
638/// Date and/or time, or period relevant to the specified
639/// date/time/period type.
640#[derive(
641    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
642)]
643pub struct C507 {
644    pub _010: String,
645    pub _020: Option<String>,
646    pub _030: Option<String>,
647}
648
649/// C517 - LOCATION IDENTIFICATION
650///
651/// Identification of a location by code or name.
652#[derive(
653    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
654)]
655pub struct C517 {
656    /// Place/location identification
657    ///
658    /// C  an..25
659    pub _010: Option<String>,
660    /// Code list qualifier
661    ///
662    /// C  an..3
663    pub _020: Option<String>,
664    /// Code list responsible agency, coded
665    ///
666    /// C  an..3
667    pub _030: Option<String>,
668    /// Place/location
669    ///
670    /// C  an..17
671    pub _040: Option<String>,
672}
673
674/// C519 - RELATED LOCATION ONE IDENTIFICATION
675///
676/// Identification the first related location by code or name.
677#[derive(
678    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
679)]
680pub struct C519 {
681    /// Related place/location one identification
682    ///
683    /// C  an..25
684    pub _010: Option<String>,
685    /// Code list qualifier
686    ///
687    /// C  an..3
688    pub _020: Option<String>,
689    /// Code list responsible agency, coded
690    ///
691    /// C  an..3
692    pub _030: Option<String>,
693    /// Related place/location one
694    ///
695    /// C  an..70
696    pub _040: Option<String>,
697}
698
699/// C523 - NUMBER OF UNIT DETAILS
700///
701/// Identification of number of units and its purpose.
702#[derive(
703    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
704)]
705pub struct C523 {
706    /// Number of units                                   C  n..15
707    pub _010: Option<String>,
708    /// Number of units qualifier                         C  an..3
709    pub _020: Option<String>,
710}
711
712/// C553 - RELATED LOCATION TWO IDENTIFICATION
713///
714/// Identification of second related location by code or name.
715#[derive(
716    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
717)]
718pub struct C553 {
719    /// Related place/location two identification
720    ///
721    /// C  an..25
722    pub _010: Option<String>,
723    /// Code list qualifier
724    ///
725    /// C  an..3
726    pub _020: Option<String>,
727    /// Code list responsible agency, coded
728    ///
729    /// C  an..3
730    pub _030: Option<String>,
731    /// Related place/location two
732    ///
733    /// C  an..70
734    pub _040: Option<String>,
735}
736
737/// Syntax identifier
738///
739/// Identification of the agency controlling the syntax and indication of syntax level, plus the syntax version number.
740#[derive(
741    Debug, Serialize, Deserialize, Clone, DisplayInnerSegment, ParseElement, PartialEq, Eq, Default,
742)]
743pub struct S001 {
744    pub _010: _0001,
745    pub _020: _0002,
746}
747
748/// Interchange sender
749///
750/// Identification of the sender of the interchange.
751#[derive(
752    Debug, Serialize, Deserialize, Clone, Default, DisplayInnerSegment, ParseElement, PartialEq, Eq,
753)]
754pub struct S002 {
755    /// Sender identification
756    ///
757    /// Name or coded representation of the sender of a data interchange.
758    /// Code or name as specified in IA.
759    pub _010: String,
760    pub _020: Option<_0007>,
761    /// Address for reverse routing
762    ///
763    /// Address specified by the sender of an interchange to be included by the recipient in the response interchanges to facilitate internal routing.
764    pub _030: Option<String>,
765}
766
767/// Interchange recipient
768///
769/// Identification of the recipient of the interchange.
770#[derive(
771    Debug, Serialize, Deserialize, Clone, Default, DisplayInnerSegment, ParseElement, PartialEq, Eq,
772)]
773pub struct S003 {
774    /// Recipient identification
775    ///
776    /// Name or coded representation of the recipient of a data interchange.
777    /// Code or name as specified in IA.
778    pub _010: String,
779    pub _020: Option<_0007>,
780    /// Routing address
781    ///
782    /// Address specified by the recipient of an interchange to be included by the sender and used by the recipient for routing of received interchanges inside his organization.
783    /// If used, normally coded sub-address for onward routing.
784    pub _030: Option<String>,
785}
786
787/// Date/time of preparation
788///
789/// Date/time of preparation of the interchange.
790#[derive(
791    Debug, Serialize, Deserialize, Clone, Default, DisplayInnerSegment, ParseElement, PartialEq, Eq,
792)]
793pub struct S004 {
794    /// Date of preparation
795    ///
796    /// Local date when an interchange or a functional group was prepared.
797    /// YYMMDD
798    pub _010: String,
799    /// Time of preparation
800    ///
801    /// Local time of day when an interchange or a functional group was prepared.
802    /// HHMM
803    pub _020: String,
804}
805
806/// Recipient's reference, password
807///
808/// Reference or password as agreed between the communicating partners.
809#[derive(
810    Debug, Serialize, Deserialize, Clone, Default, DisplayInnerSegment, ParseElement, PartialEq, Eq,
811)]
812pub struct S005 {
813    /// Recipient's reference/password
814    ///
815    /// Unique reference assigned by the recipient to the data interchange or a password
816    /// to the recipient's system or to a third party network as specified in the partners interchange agreement.
817    /// As specified in IA. May be password to recipient's system or to third party network.
818    pub _010: String,
819    /// Recipient's reference/password qualifier
820    ///
821    /// Qualifier for the recipient's reference or password.
822    /// Used if specified in IA.
823    pub _020: Option<_0025>,
824}
825
826#[derive(Debug, Serialize, Deserialize, Clone, Default, DisplayInnerSegment)]
827pub struct S009 {
828    /// Message type
829    ///
830    /// M   an1..6
831    pub _010: String,
832    /// Message version number
833    ///
834    /// M   an1..3
835    pub _020: String,
836    /// Message release number
837    ///
838    /// M   an1..3
839    pub _030: String,
840    /// Controlling agency, coded
841    ///
842    /// M   an1..3
843    pub _040: String,
844    /// Association assigned code
845    ///
846    /// C   an1..6
847    pub _050: Option<String>,
848}
849
850impl<'a> Parser<&'a str, S009, nom::error::Error<&'a str>> for S009 {
851    fn parse(input: &'a str) -> IResult<&'a str, S009> {
852        let (_, vars) = crate::util::parse_colon_section(input)?;
853        let v = vars.get(1).unwrap().to_string();
854        let r = vars.get(2).unwrap().to_string();
855        if format!("{v}{r}") != VERSION {
856            return Err(nom::Err::Error(nom::error::Error::new(
857                "File supplied EDIFACT Version/Release in UNH segment. Please use the correct parsing feature",
858                nom::error::ErrorKind::Verify,
859            )));
860        }
861        let output = S009 {
862            _010: vars.first().unwrap().to_string(),
863            _020: v,
864            _030: r,
865            _040: vars.get(3).unwrap().to_string(),
866            _050: vars.get(4).map(|x| x.to_string()),
867        };
868        Ok(("", output))
869    }
870}
871
872/// STATUS OF THE TRANSFER
873#[derive(
874    Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone, DisplayInnerSegment, ParseElement,
875)]
876pub struct S010 {
877    /// Sequence of transfers
878    ///
879    /// M  n..2
880    pub _010: String,
881    /// First and last transfer
882    ///
883    /// C  a1
884    pub _020: Option<String>,
885}