Skip to main content

mx20022_model/generated/pacs/
pacs_009_001_10.rs

1/*! Generated from ISO 20022 XSD schema.
2Namespace: `urn:iso:std:iso:20022:tech:xsd:pacs.009.001.10`*/
3/// Fraction digits: 5
4/// Total digits: 18
5/// Minimum value (inclusive): 0
6#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7#[serde(transparent)]
8pub struct ActiveCurrencyAndAmountSimpleType(pub String);
9impl TryFrom<String> for ActiveCurrencyAndAmountSimpleType {
10    type Error = crate::common::validate::ConstraintError;
11    #[allow(clippy::unreadable_literal)]
12    fn try_from(value: String) -> Result<Self, Self::Error> {
13        {
14            let value: &str = &value;
15            {
16                let frac_count = value.find('.').map_or(0, |dot| {
17                    value[dot + 1..]
18                        .chars()
19                        .filter(char::is_ascii_digit)
20                        .count()
21                });
22                let violated = frac_count > 5usize;
23                if violated {
24                    return Err(crate::common::validate::ConstraintError {
25                        kind: crate::common::validate::ConstraintKind::FractionDigits,
26                        message: format!(
27                            "{} (got {})",
28                            "value exceeds maximum fraction digits 5", frac_count
29                        ),
30                    });
31                }
32            }
33            {
34                let digit_count = value.chars().filter(char::is_ascii_digit).count();
35                let violated = digit_count > 18usize;
36                if violated {
37                    return Err(crate::common::validate::ConstraintError {
38                        kind: crate::common::validate::ConstraintKind::TotalDigits,
39                        message: format!(
40                            "{} (got {})",
41                            "value exceeds maximum total digits 18", digit_count
42                        ),
43                    });
44                }
45            }
46        }
47        Ok(Self(value))
48    }
49}
50impl ActiveCurrencyAndAmountSimpleType {
51    /// Construct a validated instance, checking all XSD constraints.
52    #[allow(clippy::unreadable_literal)]
53    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
54        Self::try_from(value.into())
55    }
56}
57impl From<ActiveCurrencyAndAmountSimpleType> for String {
58    fn from(v: ActiveCurrencyAndAmountSimpleType) -> Self {
59        v.0
60    }
61}
62/// Pattern: `[A-Z]{3,3}`
63#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
64#[serde(transparent)]
65pub struct ActiveCurrencyCode(pub String);
66impl TryFrom<String> for ActiveCurrencyCode {
67    type Error = crate::common::validate::ConstraintError;
68    #[allow(clippy::unreadable_literal)]
69    fn try_from(value: String) -> Result<Self, Self::Error> {
70        {
71            let value: &str = &value;
72            {
73                let violated = {
74                    let bytes = value.as_bytes();
75                    bytes.len() != 3usize
76                        || ({
77                            let b = bytes[0usize];
78                            !(65u8..=90u8).contains(&b)
79                        })
80                        || ({
81                            let b = bytes[1usize];
82                            !(65u8..=90u8).contains(&b)
83                        })
84                        || ({
85                            let b = bytes[2usize];
86                            !(65u8..=90u8).contains(&b)
87                        })
88                };
89                if violated {
90                    return Err(crate::common::validate::ConstraintError {
91                        kind: crate::common::validate::ConstraintKind::Pattern,
92                        message: "value does not match pattern [A-Z]{3,3}".to_string(),
93                    });
94                }
95            }
96        }
97        Ok(Self(value))
98    }
99}
100impl ActiveCurrencyCode {
101    /// Construct a validated instance, checking all XSD constraints.
102    #[allow(clippy::unreadable_literal)]
103    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
104        Self::try_from(value.into())
105    }
106}
107impl From<ActiveCurrencyCode> for String {
108    fn from(v: ActiveCurrencyCode) -> Self {
109        v.0
110    }
111}
112/// Fraction digits: 5
113/// Total digits: 18
114/// Minimum value (inclusive): 0
115#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
116#[serde(transparent)]
117pub struct ActiveOrHistoricCurrencyAndAmountSimpleType(pub String);
118impl TryFrom<String> for ActiveOrHistoricCurrencyAndAmountSimpleType {
119    type Error = crate::common::validate::ConstraintError;
120    #[allow(clippy::unreadable_literal)]
121    fn try_from(value: String) -> Result<Self, Self::Error> {
122        {
123            let value: &str = &value;
124            {
125                let frac_count = value.find('.').map_or(0, |dot| {
126                    value[dot + 1..]
127                        .chars()
128                        .filter(char::is_ascii_digit)
129                        .count()
130                });
131                let violated = frac_count > 5usize;
132                if violated {
133                    return Err(crate::common::validate::ConstraintError {
134                        kind: crate::common::validate::ConstraintKind::FractionDigits,
135                        message: format!(
136                            "{} (got {})",
137                            "value exceeds maximum fraction digits 5", frac_count
138                        ),
139                    });
140                }
141            }
142            {
143                let digit_count = value.chars().filter(char::is_ascii_digit).count();
144                let violated = digit_count > 18usize;
145                if violated {
146                    return Err(crate::common::validate::ConstraintError {
147                        kind: crate::common::validate::ConstraintKind::TotalDigits,
148                        message: format!(
149                            "{} (got {})",
150                            "value exceeds maximum total digits 18", digit_count
151                        ),
152                    });
153                }
154            }
155        }
156        Ok(Self(value))
157    }
158}
159impl ActiveOrHistoricCurrencyAndAmountSimpleType {
160    /// Construct a validated instance, checking all XSD constraints.
161    #[allow(clippy::unreadable_literal)]
162    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
163        Self::try_from(value.into())
164    }
165}
166impl From<ActiveOrHistoricCurrencyAndAmountSimpleType> for String {
167    fn from(v: ActiveOrHistoricCurrencyAndAmountSimpleType) -> Self {
168        v.0
169    }
170}
171/// Pattern: `[A-Z]{3,3}`
172#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
173#[serde(transparent)]
174pub struct ActiveOrHistoricCurrencyCode(pub String);
175impl TryFrom<String> for ActiveOrHistoricCurrencyCode {
176    type Error = crate::common::validate::ConstraintError;
177    #[allow(clippy::unreadable_literal)]
178    fn try_from(value: String) -> Result<Self, Self::Error> {
179        {
180            let value: &str = &value;
181            {
182                let violated = {
183                    let bytes = value.as_bytes();
184                    bytes.len() != 3usize
185                        || ({
186                            let b = bytes[0usize];
187                            !(65u8..=90u8).contains(&b)
188                        })
189                        || ({
190                            let b = bytes[1usize];
191                            !(65u8..=90u8).contains(&b)
192                        })
193                        || ({
194                            let b = bytes[2usize];
195                            !(65u8..=90u8).contains(&b)
196                        })
197                };
198                if violated {
199                    return Err(crate::common::validate::ConstraintError {
200                        kind: crate::common::validate::ConstraintKind::Pattern,
201                        message: "value does not match pattern [A-Z]{3,3}".to_string(),
202                    });
203                }
204            }
205        }
206        Ok(Self(value))
207    }
208}
209impl ActiveOrHistoricCurrencyCode {
210    /// Construct a validated instance, checking all XSD constraints.
211    #[allow(clippy::unreadable_literal)]
212    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
213        Self::try_from(value.into())
214    }
215}
216impl From<ActiveOrHistoricCurrencyCode> for String {
217    fn from(v: ActiveOrHistoricCurrencyCode) -> Self {
218        v.0
219    }
220}
221#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
222pub enum AddressType2Code {
223    #[serde(rename = "ADDR")]
224    Addr,
225    #[serde(rename = "PBOX")]
226    Pbox,
227    #[serde(rename = "HOME")]
228    Home,
229    #[serde(rename = "BIZZ")]
230    Bizz,
231    #[serde(rename = "MLTO")]
232    Mlto,
233    #[serde(rename = "DLVY")]
234    Dlvy,
235}
236/// Pattern: `[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}`
237#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
238#[serde(transparent)]
239pub struct AnyBICDec2014Identifier(pub String);
240impl TryFrom<String> for AnyBICDec2014Identifier {
241    type Error = crate::common::validate::ConstraintError;
242    #[allow(clippy::unreadable_literal)]
243    fn try_from(value: String) -> Result<Self, Self::Error> {
244        {
245            let value: &str = &value;
246            {
247                let violated = {
248                    let bytes = value.as_bytes();
249                    let len = bytes.len();
250                    let result: bool = (|| -> bool {
251                        let mut pos: usize = 0;
252                        if !(8usize..=11usize).contains(&len) {
253                            return true;
254                        }
255                        {
256                            let end = pos + 4usize;
257                            if end > len {
258                                return true;
259                            }
260                            for &b in &bytes[pos..end] {
261                                if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
262                                    return true;
263                                }
264                            }
265                            pos = end;
266                        }
267                        {
268                            let end = pos + 2usize;
269                            if end > len {
270                                return true;
271                            }
272                            for &b in &bytes[pos..end] {
273                                if !(65u8..=90u8).contains(&b) {
274                                    return true;
275                                }
276                            }
277                            pos = end;
278                        }
279                        {
280                            let end = pos + 2usize;
281                            if end > len {
282                                return true;
283                            }
284                            for &b in &bytes[pos..end] {
285                                if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
286                                    return true;
287                                }
288                            }
289                            pos = end;
290                        }
291                        {
292                            let saved = pos;
293                            let matched: bool = (|| -> bool {
294                                {
295                                    let end = pos + 3usize;
296                                    if end > len {
297                                        return true;
298                                    }
299                                    for &b in &bytes[pos..end] {
300                                        if !(65u8..=90u8).contains(&b)
301                                            && !(48u8..=57u8).contains(&b)
302                                        {
303                                            return true;
304                                        }
305                                    }
306                                    pos = end;
307                                }
308                                false
309                            })();
310                            if matched {
311                                pos = saved;
312                            }
313                        }
314                        if pos != len {
315                            return true;
316                        }
317                        false
318                    })();
319                    result
320                };
321                if violated {
322                    return Err(crate::common::validate::ConstraintError {
323                        kind: crate::common::validate::ConstraintKind::Pattern,
324                        message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
325                            .to_string(),
326                    });
327                }
328            }
329        }
330        Ok(Self(value))
331    }
332}
333impl AnyBICDec2014Identifier {
334    /// Construct a validated instance, checking all XSD constraints.
335    #[allow(clippy::unreadable_literal)]
336    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
337        Self::try_from(value.into())
338    }
339}
340impl From<AnyBICDec2014Identifier> for String {
341    fn from(v: AnyBICDec2014Identifier) -> Self {
342        v.0
343    }
344}
345/// Pattern: `[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}`
346#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
347#[serde(transparent)]
348pub struct BICFIDec2014Identifier(pub String);
349impl TryFrom<String> for BICFIDec2014Identifier {
350    type Error = crate::common::validate::ConstraintError;
351    #[allow(clippy::unreadable_literal)]
352    fn try_from(value: String) -> Result<Self, Self::Error> {
353        {
354            let value: &str = &value;
355            {
356                let violated = {
357                    let bytes = value.as_bytes();
358                    let len = bytes.len();
359                    let result: bool = (|| -> bool {
360                        let mut pos: usize = 0;
361                        if !(8usize..=11usize).contains(&len) {
362                            return true;
363                        }
364                        {
365                            let end = pos + 4usize;
366                            if end > len {
367                                return true;
368                            }
369                            for &b in &bytes[pos..end] {
370                                if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
371                                    return true;
372                                }
373                            }
374                            pos = end;
375                        }
376                        {
377                            let end = pos + 2usize;
378                            if end > len {
379                                return true;
380                            }
381                            for &b in &bytes[pos..end] {
382                                if !(65u8..=90u8).contains(&b) {
383                                    return true;
384                                }
385                            }
386                            pos = end;
387                        }
388                        {
389                            let end = pos + 2usize;
390                            if end > len {
391                                return true;
392                            }
393                            for &b in &bytes[pos..end] {
394                                if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
395                                    return true;
396                                }
397                            }
398                            pos = end;
399                        }
400                        {
401                            let saved = pos;
402                            let matched: bool = (|| -> bool {
403                                {
404                                    let end = pos + 3usize;
405                                    if end > len {
406                                        return true;
407                                    }
408                                    for &b in &bytes[pos..end] {
409                                        if !(65u8..=90u8).contains(&b)
410                                            && !(48u8..=57u8).contains(&b)
411                                        {
412                                            return true;
413                                        }
414                                    }
415                                    pos = end;
416                                }
417                                false
418                            })();
419                            if matched {
420                                pos = saved;
421                            }
422                        }
423                        if pos != len {
424                            return true;
425                        }
426                        false
427                    })();
428                    result
429                };
430                if violated {
431                    return Err(crate::common::validate::ConstraintError {
432                        kind: crate::common::validate::ConstraintKind::Pattern,
433                        message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
434                            .to_string(),
435                    });
436                }
437            }
438        }
439        Ok(Self(value))
440    }
441}
442impl BICFIDec2014Identifier {
443    /// Construct a validated instance, checking all XSD constraints.
444    #[allow(clippy::unreadable_literal)]
445    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
446        Self::try_from(value.into())
447    }
448}
449impl From<BICFIDec2014Identifier> for String {
450    fn from(v: BICFIDec2014Identifier) -> Self {
451        v.0
452    }
453}
454#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
455#[serde(transparent)]
456pub struct BatchBookingIndicator(pub bool);
457#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
458pub enum ClearingChannel2Code {
459    #[serde(rename = "RTGS")]
460    Rtgs,
461    #[serde(rename = "RTNS")]
462    Rtns,
463    #[serde(rename = "MPNS")]
464    Mpns,
465    #[serde(rename = "BOOK")]
466    Book,
467}
468/// Pattern: `[A-Z]{2,2}`
469#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
470#[serde(transparent)]
471pub struct CountryCode(pub String);
472impl TryFrom<String> for CountryCode {
473    type Error = crate::common::validate::ConstraintError;
474    #[allow(clippy::unreadable_literal)]
475    fn try_from(value: String) -> Result<Self, Self::Error> {
476        {
477            let value: &str = &value;
478            {
479                let violated = {
480                    let bytes = value.as_bytes();
481                    bytes.len() != 2usize
482                        || ({
483                            let b = bytes[0usize];
484                            !(65u8..=90u8).contains(&b)
485                        })
486                        || ({
487                            let b = bytes[1usize];
488                            !(65u8..=90u8).contains(&b)
489                        })
490                };
491                if violated {
492                    return Err(crate::common::validate::ConstraintError {
493                        kind: crate::common::validate::ConstraintKind::Pattern,
494                        message: "value does not match pattern [A-Z]{2,2}".to_string(),
495                    });
496                }
497            }
498        }
499        Ok(Self(value))
500    }
501}
502impl CountryCode {
503    /// Construct a validated instance, checking all XSD constraints.
504    #[allow(clippy::unreadable_literal)]
505    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
506        Self::try_from(value.into())
507    }
508}
509impl From<CountryCode> for String {
510    fn from(v: CountryCode) -> Self {
511        v.0
512    }
513}
514#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
515pub enum CreditDebitCode {
516    #[serde(rename = "CRDT")]
517    Crdt,
518    #[serde(rename = "DBIT")]
519    Dbit,
520}
521/// Fraction digits: 17
522/// Total digits: 18
523#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
524#[serde(transparent)]
525pub struct DecimalNumber(pub String);
526impl TryFrom<String> for DecimalNumber {
527    type Error = crate::common::validate::ConstraintError;
528    #[allow(clippy::unreadable_literal)]
529    fn try_from(value: String) -> Result<Self, Self::Error> {
530        {
531            let value: &str = &value;
532            {
533                let frac_count = value.find('.').map_or(0, |dot| {
534                    value[dot + 1..]
535                        .chars()
536                        .filter(char::is_ascii_digit)
537                        .count()
538                });
539                let violated = frac_count > 17usize;
540                if violated {
541                    return Err(crate::common::validate::ConstraintError {
542                        kind: crate::common::validate::ConstraintKind::FractionDigits,
543                        message: format!(
544                            "{} (got {})",
545                            "value exceeds maximum fraction digits 17", frac_count
546                        ),
547                    });
548                }
549            }
550            {
551                let digit_count = value.chars().filter(char::is_ascii_digit).count();
552                let violated = digit_count > 18usize;
553                if violated {
554                    return Err(crate::common::validate::ConstraintError {
555                        kind: crate::common::validate::ConstraintKind::TotalDigits,
556                        message: format!(
557                            "{} (got {})",
558                            "value exceeds maximum total digits 18", digit_count
559                        ),
560                    });
561                }
562            }
563        }
564        Ok(Self(value))
565    }
566}
567impl DecimalNumber {
568    /// Construct a validated instance, checking all XSD constraints.
569    #[allow(clippy::unreadable_literal)]
570    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
571        Self::try_from(value.into())
572    }
573}
574impl From<DecimalNumber> for String {
575    fn from(v: DecimalNumber) -> Self {
576        v.0
577    }
578}
579#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
580pub enum DocumentType3Code {
581    #[serde(rename = "RADM")]
582    Radm,
583    #[serde(rename = "RPIN")]
584    Rpin,
585    #[serde(rename = "FXDR")]
586    Fxdr,
587    #[serde(rename = "DISP")]
588    Disp,
589    #[serde(rename = "PUOR")]
590    Puor,
591    #[serde(rename = "SCOR")]
592    Scor,
593}
594#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
595pub enum DocumentType6Code {
596    #[serde(rename = "MSIN")]
597    Msin,
598    #[serde(rename = "CNFA")]
599    Cnfa,
600    #[serde(rename = "DNFA")]
601    Dnfa,
602    #[serde(rename = "CINV")]
603    Cinv,
604    #[serde(rename = "CREN")]
605    Cren,
606    #[serde(rename = "DEBN")]
607    Debn,
608    #[serde(rename = "HIRI")]
609    Hiri,
610    #[serde(rename = "SBIN")]
611    Sbin,
612    #[serde(rename = "CMCN")]
613    Cmcn,
614    #[serde(rename = "SOAC")]
615    Soac,
616    #[serde(rename = "DISP")]
617    Disp,
618    #[serde(rename = "BOLD")]
619    Bold,
620    #[serde(rename = "VCHR")]
621    Vchr,
622    #[serde(rename = "AROI")]
623    Aroi,
624    #[serde(rename = "TSUT")]
625    Tsut,
626    #[serde(rename = "PUOR")]
627    Puor,
628}
629/// Pattern: `[a-zA-Z0-9]{4}`
630#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
631#[serde(transparent)]
632pub struct Exact4AlphaNumericText(pub String);
633impl TryFrom<String> for Exact4AlphaNumericText {
634    type Error = crate::common::validate::ConstraintError;
635    #[allow(clippy::unreadable_literal)]
636    fn try_from(value: String) -> Result<Self, Self::Error> {
637        {
638            let value: &str = &value;
639            {
640                let violated = {
641                    let bytes = value.as_bytes();
642                    bytes.len() != 4usize
643                        || ({
644                            let b = bytes[0usize];
645                            !(97u8..=122u8).contains(&b)
646                                && !(65u8..=90u8).contains(&b)
647                                && !(48u8..=57u8).contains(&b)
648                        })
649                        || ({
650                            let b = bytes[1usize];
651                            !(97u8..=122u8).contains(&b)
652                                && !(65u8..=90u8).contains(&b)
653                                && !(48u8..=57u8).contains(&b)
654                        })
655                        || ({
656                            let b = bytes[2usize];
657                            !(97u8..=122u8).contains(&b)
658                                && !(65u8..=90u8).contains(&b)
659                                && !(48u8..=57u8).contains(&b)
660                        })
661                        || ({
662                            let b = bytes[3usize];
663                            !(97u8..=122u8).contains(&b)
664                                && !(65u8..=90u8).contains(&b)
665                                && !(48u8..=57u8).contains(&b)
666                        })
667                };
668                if violated {
669                    return Err(crate::common::validate::ConstraintError {
670                        kind: crate::common::validate::ConstraintKind::Pattern,
671                        message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
672                    });
673                }
674            }
675        }
676        Ok(Self(value))
677    }
678}
679impl Exact4AlphaNumericText {
680    /// Construct a validated instance, checking all XSD constraints.
681    #[allow(clippy::unreadable_literal)]
682    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
683        Self::try_from(value.into())
684    }
685}
686impl From<Exact4AlphaNumericText> for String {
687    fn from(v: Exact4AlphaNumericText) -> Self {
688        v.0
689    }
690}
691/// Minimum length: 1
692/// Maximum length: 4
693#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
694#[serde(transparent)]
695pub struct ExternalAccountIdentification1Code(pub String);
696impl TryFrom<String> for ExternalAccountIdentification1Code {
697    type Error = crate::common::validate::ConstraintError;
698    #[allow(clippy::unreadable_literal)]
699    fn try_from(value: String) -> Result<Self, Self::Error> {
700        {
701            let value: &str = &value;
702            {
703                let len = value.chars().count();
704                let violated = len < 1usize;
705                if violated {
706                    return Err(crate::common::validate::ConstraintError {
707                        kind: crate::common::validate::ConstraintKind::MinLength,
708                        message: format!(
709                            "{} (got {})",
710                            "value is shorter than minimum length 1", len
711                        ),
712                    });
713                }
714            }
715            {
716                let len = value.chars().count();
717                let violated = len > 4usize;
718                if violated {
719                    return Err(crate::common::validate::ConstraintError {
720                        kind: crate::common::validate::ConstraintKind::MaxLength,
721                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
722                    });
723                }
724            }
725        }
726        Ok(Self(value))
727    }
728}
729impl ExternalAccountIdentification1Code {
730    /// Construct a validated instance, checking all XSD constraints.
731    #[allow(clippy::unreadable_literal)]
732    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
733        Self::try_from(value.into())
734    }
735}
736impl From<ExternalAccountIdentification1Code> for String {
737    fn from(v: ExternalAccountIdentification1Code) -> Self {
738        v.0
739    }
740}
741/// Minimum length: 1
742/// Maximum length: 4
743#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
744#[serde(transparent)]
745pub struct ExternalCashAccountType1Code(pub String);
746impl TryFrom<String> for ExternalCashAccountType1Code {
747    type Error = crate::common::validate::ConstraintError;
748    #[allow(clippy::unreadable_literal)]
749    fn try_from(value: String) -> Result<Self, Self::Error> {
750        {
751            let value: &str = &value;
752            {
753                let len = value.chars().count();
754                let violated = len < 1usize;
755                if violated {
756                    return Err(crate::common::validate::ConstraintError {
757                        kind: crate::common::validate::ConstraintKind::MinLength,
758                        message: format!(
759                            "{} (got {})",
760                            "value is shorter than minimum length 1", len
761                        ),
762                    });
763                }
764            }
765            {
766                let len = value.chars().count();
767                let violated = len > 4usize;
768                if violated {
769                    return Err(crate::common::validate::ConstraintError {
770                        kind: crate::common::validate::ConstraintKind::MaxLength,
771                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
772                    });
773                }
774            }
775        }
776        Ok(Self(value))
777    }
778}
779impl ExternalCashAccountType1Code {
780    /// Construct a validated instance, checking all XSD constraints.
781    #[allow(clippy::unreadable_literal)]
782    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
783        Self::try_from(value.into())
784    }
785}
786impl From<ExternalCashAccountType1Code> for String {
787    fn from(v: ExternalCashAccountType1Code) -> Self {
788        v.0
789    }
790}
791/// Minimum length: 1
792/// Maximum length: 3
793#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
794#[serde(transparent)]
795pub struct ExternalCashClearingSystem1Code(pub String);
796impl TryFrom<String> for ExternalCashClearingSystem1Code {
797    type Error = crate::common::validate::ConstraintError;
798    #[allow(clippy::unreadable_literal)]
799    fn try_from(value: String) -> Result<Self, Self::Error> {
800        {
801            let value: &str = &value;
802            {
803                let len = value.chars().count();
804                let violated = len < 1usize;
805                if violated {
806                    return Err(crate::common::validate::ConstraintError {
807                        kind: crate::common::validate::ConstraintKind::MinLength,
808                        message: format!(
809                            "{} (got {})",
810                            "value is shorter than minimum length 1", len
811                        ),
812                    });
813                }
814            }
815            {
816                let len = value.chars().count();
817                let violated = len > 3usize;
818                if violated {
819                    return Err(crate::common::validate::ConstraintError {
820                        kind: crate::common::validate::ConstraintKind::MaxLength,
821                        message: format!("{} (got {})", "value exceeds maximum length 3", len),
822                    });
823                }
824            }
825        }
826        Ok(Self(value))
827    }
828}
829impl ExternalCashClearingSystem1Code {
830    /// Construct a validated instance, checking all XSD constraints.
831    #[allow(clippy::unreadable_literal)]
832    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
833        Self::try_from(value.into())
834    }
835}
836impl From<ExternalCashClearingSystem1Code> for String {
837    fn from(v: ExternalCashClearingSystem1Code) -> Self {
838        v.0
839    }
840}
841/// Minimum length: 1
842/// Maximum length: 4
843#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
844#[serde(transparent)]
845pub struct ExternalCategoryPurpose1Code(pub String);
846impl TryFrom<String> for ExternalCategoryPurpose1Code {
847    type Error = crate::common::validate::ConstraintError;
848    #[allow(clippy::unreadable_literal)]
849    fn try_from(value: String) -> Result<Self, Self::Error> {
850        {
851            let value: &str = &value;
852            {
853                let len = value.chars().count();
854                let violated = len < 1usize;
855                if violated {
856                    return Err(crate::common::validate::ConstraintError {
857                        kind: crate::common::validate::ConstraintKind::MinLength,
858                        message: format!(
859                            "{} (got {})",
860                            "value is shorter than minimum length 1", len
861                        ),
862                    });
863                }
864            }
865            {
866                let len = value.chars().count();
867                let violated = len > 4usize;
868                if violated {
869                    return Err(crate::common::validate::ConstraintError {
870                        kind: crate::common::validate::ConstraintKind::MaxLength,
871                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
872                    });
873                }
874            }
875        }
876        Ok(Self(value))
877    }
878}
879impl ExternalCategoryPurpose1Code {
880    /// Construct a validated instance, checking all XSD constraints.
881    #[allow(clippy::unreadable_literal)]
882    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
883        Self::try_from(value.into())
884    }
885}
886impl From<ExternalCategoryPurpose1Code> for String {
887    fn from(v: ExternalCategoryPurpose1Code) -> Self {
888        v.0
889    }
890}
891/// Minimum length: 1
892/// Maximum length: 5
893#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
894#[serde(transparent)]
895pub struct ExternalClearingSystemIdentification1Code(pub String);
896impl TryFrom<String> for ExternalClearingSystemIdentification1Code {
897    type Error = crate::common::validate::ConstraintError;
898    #[allow(clippy::unreadable_literal)]
899    fn try_from(value: String) -> Result<Self, Self::Error> {
900        {
901            let value: &str = &value;
902            {
903                let len = value.chars().count();
904                let violated = len < 1usize;
905                if violated {
906                    return Err(crate::common::validate::ConstraintError {
907                        kind: crate::common::validate::ConstraintKind::MinLength,
908                        message: format!(
909                            "{} (got {})",
910                            "value is shorter than minimum length 1", len
911                        ),
912                    });
913                }
914            }
915            {
916                let len = value.chars().count();
917                let violated = len > 5usize;
918                if violated {
919                    return Err(crate::common::validate::ConstraintError {
920                        kind: crate::common::validate::ConstraintKind::MaxLength,
921                        message: format!("{} (got {})", "value exceeds maximum length 5", len),
922                    });
923                }
924            }
925        }
926        Ok(Self(value))
927    }
928}
929impl ExternalClearingSystemIdentification1Code {
930    /// Construct a validated instance, checking all XSD constraints.
931    #[allow(clippy::unreadable_literal)]
932    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
933        Self::try_from(value.into())
934    }
935}
936impl From<ExternalClearingSystemIdentification1Code> for String {
937    fn from(v: ExternalClearingSystemIdentification1Code) -> Self {
938        v.0
939    }
940}
941/// Minimum length: 1
942/// Maximum length: 4
943#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
944#[serde(transparent)]
945pub struct ExternalCreditorAgentInstruction1Code(pub String);
946impl TryFrom<String> for ExternalCreditorAgentInstruction1Code {
947    type Error = crate::common::validate::ConstraintError;
948    #[allow(clippy::unreadable_literal)]
949    fn try_from(value: String) -> Result<Self, Self::Error> {
950        {
951            let value: &str = &value;
952            {
953                let len = value.chars().count();
954                let violated = len < 1usize;
955                if violated {
956                    return Err(crate::common::validate::ConstraintError {
957                        kind: crate::common::validate::ConstraintKind::MinLength,
958                        message: format!(
959                            "{} (got {})",
960                            "value is shorter than minimum length 1", len
961                        ),
962                    });
963                }
964            }
965            {
966                let len = value.chars().count();
967                let violated = len > 4usize;
968                if violated {
969                    return Err(crate::common::validate::ConstraintError {
970                        kind: crate::common::validate::ConstraintKind::MaxLength,
971                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
972                    });
973                }
974            }
975        }
976        Ok(Self(value))
977    }
978}
979impl ExternalCreditorAgentInstruction1Code {
980    /// Construct a validated instance, checking all XSD constraints.
981    #[allow(clippy::unreadable_literal)]
982    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
983        Self::try_from(value.into())
984    }
985}
986impl From<ExternalCreditorAgentInstruction1Code> for String {
987    fn from(v: ExternalCreditorAgentInstruction1Code) -> Self {
988        v.0
989    }
990}
991/// Minimum length: 1
992/// Maximum length: 4
993#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
994#[serde(transparent)]
995pub struct ExternalDiscountAmountType1Code(pub String);
996impl TryFrom<String> for ExternalDiscountAmountType1Code {
997    type Error = crate::common::validate::ConstraintError;
998    #[allow(clippy::unreadable_literal)]
999    fn try_from(value: String) -> Result<Self, Self::Error> {
1000        {
1001            let value: &str = &value;
1002            {
1003                let len = value.chars().count();
1004                let violated = len < 1usize;
1005                if violated {
1006                    return Err(crate::common::validate::ConstraintError {
1007                        kind: crate::common::validate::ConstraintKind::MinLength,
1008                        message: format!(
1009                            "{} (got {})",
1010                            "value is shorter than minimum length 1", len
1011                        ),
1012                    });
1013                }
1014            }
1015            {
1016                let len = value.chars().count();
1017                let violated = len > 4usize;
1018                if violated {
1019                    return Err(crate::common::validate::ConstraintError {
1020                        kind: crate::common::validate::ConstraintKind::MaxLength,
1021                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1022                    });
1023                }
1024            }
1025        }
1026        Ok(Self(value))
1027    }
1028}
1029impl ExternalDiscountAmountType1Code {
1030    /// Construct a validated instance, checking all XSD constraints.
1031    #[allow(clippy::unreadable_literal)]
1032    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1033        Self::try_from(value.into())
1034    }
1035}
1036impl From<ExternalDiscountAmountType1Code> for String {
1037    fn from(v: ExternalDiscountAmountType1Code) -> Self {
1038        v.0
1039    }
1040}
1041/// Minimum length: 1
1042/// Maximum length: 4
1043#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1044#[serde(transparent)]
1045pub struct ExternalDocumentLineType1Code(pub String);
1046impl TryFrom<String> for ExternalDocumentLineType1Code {
1047    type Error = crate::common::validate::ConstraintError;
1048    #[allow(clippy::unreadable_literal)]
1049    fn try_from(value: String) -> Result<Self, Self::Error> {
1050        {
1051            let value: &str = &value;
1052            {
1053                let len = value.chars().count();
1054                let violated = len < 1usize;
1055                if violated {
1056                    return Err(crate::common::validate::ConstraintError {
1057                        kind: crate::common::validate::ConstraintKind::MinLength,
1058                        message: format!(
1059                            "{} (got {})",
1060                            "value is shorter than minimum length 1", len
1061                        ),
1062                    });
1063                }
1064            }
1065            {
1066                let len = value.chars().count();
1067                let violated = len > 4usize;
1068                if violated {
1069                    return Err(crate::common::validate::ConstraintError {
1070                        kind: crate::common::validate::ConstraintKind::MaxLength,
1071                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1072                    });
1073                }
1074            }
1075        }
1076        Ok(Self(value))
1077    }
1078}
1079impl ExternalDocumentLineType1Code {
1080    /// Construct a validated instance, checking all XSD constraints.
1081    #[allow(clippy::unreadable_literal)]
1082    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1083        Self::try_from(value.into())
1084    }
1085}
1086impl From<ExternalDocumentLineType1Code> for String {
1087    fn from(v: ExternalDocumentLineType1Code) -> Self {
1088        v.0
1089    }
1090}
1091/// Minimum length: 1
1092/// Maximum length: 4
1093#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1094#[serde(transparent)]
1095pub struct ExternalFinancialInstitutionIdentification1Code(pub String);
1096impl TryFrom<String> for ExternalFinancialInstitutionIdentification1Code {
1097    type Error = crate::common::validate::ConstraintError;
1098    #[allow(clippy::unreadable_literal)]
1099    fn try_from(value: String) -> Result<Self, Self::Error> {
1100        {
1101            let value: &str = &value;
1102            {
1103                let len = value.chars().count();
1104                let violated = len < 1usize;
1105                if violated {
1106                    return Err(crate::common::validate::ConstraintError {
1107                        kind: crate::common::validate::ConstraintKind::MinLength,
1108                        message: format!(
1109                            "{} (got {})",
1110                            "value is shorter than minimum length 1", len
1111                        ),
1112                    });
1113                }
1114            }
1115            {
1116                let len = value.chars().count();
1117                let violated = len > 4usize;
1118                if violated {
1119                    return Err(crate::common::validate::ConstraintError {
1120                        kind: crate::common::validate::ConstraintKind::MaxLength,
1121                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1122                    });
1123                }
1124            }
1125        }
1126        Ok(Self(value))
1127    }
1128}
1129impl ExternalFinancialInstitutionIdentification1Code {
1130    /// Construct a validated instance, checking all XSD constraints.
1131    #[allow(clippy::unreadable_literal)]
1132    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1133        Self::try_from(value.into())
1134    }
1135}
1136impl From<ExternalFinancialInstitutionIdentification1Code> for String {
1137    fn from(v: ExternalFinancialInstitutionIdentification1Code) -> Self {
1138        v.0
1139    }
1140}
1141/// Minimum length: 1
1142/// Maximum length: 4
1143#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1144#[serde(transparent)]
1145pub struct ExternalGarnishmentType1Code(pub String);
1146impl TryFrom<String> for ExternalGarnishmentType1Code {
1147    type Error = crate::common::validate::ConstraintError;
1148    #[allow(clippy::unreadable_literal)]
1149    fn try_from(value: String) -> Result<Self, Self::Error> {
1150        {
1151            let value: &str = &value;
1152            {
1153                let len = value.chars().count();
1154                let violated = len < 1usize;
1155                if violated {
1156                    return Err(crate::common::validate::ConstraintError {
1157                        kind: crate::common::validate::ConstraintKind::MinLength,
1158                        message: format!(
1159                            "{} (got {})",
1160                            "value is shorter than minimum length 1", len
1161                        ),
1162                    });
1163                }
1164            }
1165            {
1166                let len = value.chars().count();
1167                let violated = len > 4usize;
1168                if violated {
1169                    return Err(crate::common::validate::ConstraintError {
1170                        kind: crate::common::validate::ConstraintKind::MaxLength,
1171                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1172                    });
1173                }
1174            }
1175        }
1176        Ok(Self(value))
1177    }
1178}
1179impl ExternalGarnishmentType1Code {
1180    /// Construct a validated instance, checking all XSD constraints.
1181    #[allow(clippy::unreadable_literal)]
1182    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1183        Self::try_from(value.into())
1184    }
1185}
1186impl From<ExternalGarnishmentType1Code> for String {
1187    fn from(v: ExternalGarnishmentType1Code) -> Self {
1188        v.0
1189    }
1190}
1191/// Minimum length: 1
1192/// Maximum length: 35
1193#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1194#[serde(transparent)]
1195pub struct ExternalLocalInstrument1Code(pub String);
1196impl TryFrom<String> for ExternalLocalInstrument1Code {
1197    type Error = crate::common::validate::ConstraintError;
1198    #[allow(clippy::unreadable_literal)]
1199    fn try_from(value: String) -> Result<Self, Self::Error> {
1200        {
1201            let value: &str = &value;
1202            {
1203                let len = value.chars().count();
1204                let violated = len < 1usize;
1205                if violated {
1206                    return Err(crate::common::validate::ConstraintError {
1207                        kind: crate::common::validate::ConstraintKind::MinLength,
1208                        message: format!(
1209                            "{} (got {})",
1210                            "value is shorter than minimum length 1", len
1211                        ),
1212                    });
1213                }
1214            }
1215            {
1216                let len = value.chars().count();
1217                let violated = len > 35usize;
1218                if violated {
1219                    return Err(crate::common::validate::ConstraintError {
1220                        kind: crate::common::validate::ConstraintKind::MaxLength,
1221                        message: format!("{} (got {})", "value exceeds maximum length 35", len),
1222                    });
1223                }
1224            }
1225        }
1226        Ok(Self(value))
1227    }
1228}
1229impl ExternalLocalInstrument1Code {
1230    /// Construct a validated instance, checking all XSD constraints.
1231    #[allow(clippy::unreadable_literal)]
1232    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1233        Self::try_from(value.into())
1234    }
1235}
1236impl From<ExternalLocalInstrument1Code> for String {
1237    fn from(v: ExternalLocalInstrument1Code) -> Self {
1238        v.0
1239    }
1240}
1241/// Minimum length: 1
1242/// Maximum length: 4
1243#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1244#[serde(transparent)]
1245pub struct ExternalOrganisationIdentification1Code(pub String);
1246impl TryFrom<String> for ExternalOrganisationIdentification1Code {
1247    type Error = crate::common::validate::ConstraintError;
1248    #[allow(clippy::unreadable_literal)]
1249    fn try_from(value: String) -> Result<Self, Self::Error> {
1250        {
1251            let value: &str = &value;
1252            {
1253                let len = value.chars().count();
1254                let violated = len < 1usize;
1255                if violated {
1256                    return Err(crate::common::validate::ConstraintError {
1257                        kind: crate::common::validate::ConstraintKind::MinLength,
1258                        message: format!(
1259                            "{} (got {})",
1260                            "value is shorter than minimum length 1", len
1261                        ),
1262                    });
1263                }
1264            }
1265            {
1266                let len = value.chars().count();
1267                let violated = len > 4usize;
1268                if violated {
1269                    return Err(crate::common::validate::ConstraintError {
1270                        kind: crate::common::validate::ConstraintKind::MaxLength,
1271                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1272                    });
1273                }
1274            }
1275        }
1276        Ok(Self(value))
1277    }
1278}
1279impl ExternalOrganisationIdentification1Code {
1280    /// Construct a validated instance, checking all XSD constraints.
1281    #[allow(clippy::unreadable_literal)]
1282    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1283        Self::try_from(value.into())
1284    }
1285}
1286impl From<ExternalOrganisationIdentification1Code> for String {
1287    fn from(v: ExternalOrganisationIdentification1Code) -> Self {
1288        v.0
1289    }
1290}
1291/// Minimum length: 1
1292/// Maximum length: 4
1293#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1294#[serde(transparent)]
1295pub struct ExternalPersonIdentification1Code(pub String);
1296impl TryFrom<String> for ExternalPersonIdentification1Code {
1297    type Error = crate::common::validate::ConstraintError;
1298    #[allow(clippy::unreadable_literal)]
1299    fn try_from(value: String) -> Result<Self, Self::Error> {
1300        {
1301            let value: &str = &value;
1302            {
1303                let len = value.chars().count();
1304                let violated = len < 1usize;
1305                if violated {
1306                    return Err(crate::common::validate::ConstraintError {
1307                        kind: crate::common::validate::ConstraintKind::MinLength,
1308                        message: format!(
1309                            "{} (got {})",
1310                            "value is shorter than minimum length 1", len
1311                        ),
1312                    });
1313                }
1314            }
1315            {
1316                let len = value.chars().count();
1317                let violated = len > 4usize;
1318                if violated {
1319                    return Err(crate::common::validate::ConstraintError {
1320                        kind: crate::common::validate::ConstraintKind::MaxLength,
1321                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1322                    });
1323                }
1324            }
1325        }
1326        Ok(Self(value))
1327    }
1328}
1329impl ExternalPersonIdentification1Code {
1330    /// Construct a validated instance, checking all XSD constraints.
1331    #[allow(clippy::unreadable_literal)]
1332    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1333        Self::try_from(value.into())
1334    }
1335}
1336impl From<ExternalPersonIdentification1Code> for String {
1337    fn from(v: ExternalPersonIdentification1Code) -> Self {
1338        v.0
1339    }
1340}
1341/// Minimum length: 1
1342/// Maximum length: 4
1343#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1344#[serde(transparent)]
1345pub struct ExternalProxyAccountType1Code(pub String);
1346impl TryFrom<String> for ExternalProxyAccountType1Code {
1347    type Error = crate::common::validate::ConstraintError;
1348    #[allow(clippy::unreadable_literal)]
1349    fn try_from(value: String) -> Result<Self, Self::Error> {
1350        {
1351            let value: &str = &value;
1352            {
1353                let len = value.chars().count();
1354                let violated = len < 1usize;
1355                if violated {
1356                    return Err(crate::common::validate::ConstraintError {
1357                        kind: crate::common::validate::ConstraintKind::MinLength,
1358                        message: format!(
1359                            "{} (got {})",
1360                            "value is shorter than minimum length 1", len
1361                        ),
1362                    });
1363                }
1364            }
1365            {
1366                let len = value.chars().count();
1367                let violated = len > 4usize;
1368                if violated {
1369                    return Err(crate::common::validate::ConstraintError {
1370                        kind: crate::common::validate::ConstraintKind::MaxLength,
1371                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1372                    });
1373                }
1374            }
1375        }
1376        Ok(Self(value))
1377    }
1378}
1379impl ExternalProxyAccountType1Code {
1380    /// Construct a validated instance, checking all XSD constraints.
1381    #[allow(clippy::unreadable_literal)]
1382    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1383        Self::try_from(value.into())
1384    }
1385}
1386impl From<ExternalProxyAccountType1Code> for String {
1387    fn from(v: ExternalProxyAccountType1Code) -> Self {
1388        v.0
1389    }
1390}
1391/// Minimum length: 1
1392/// Maximum length: 4
1393#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1394#[serde(transparent)]
1395pub struct ExternalPurpose1Code(pub String);
1396impl TryFrom<String> for ExternalPurpose1Code {
1397    type Error = crate::common::validate::ConstraintError;
1398    #[allow(clippy::unreadable_literal)]
1399    fn try_from(value: String) -> Result<Self, Self::Error> {
1400        {
1401            let value: &str = &value;
1402            {
1403                let len = value.chars().count();
1404                let violated = len < 1usize;
1405                if violated {
1406                    return Err(crate::common::validate::ConstraintError {
1407                        kind: crate::common::validate::ConstraintKind::MinLength,
1408                        message: format!(
1409                            "{} (got {})",
1410                            "value is shorter than minimum length 1", len
1411                        ),
1412                    });
1413                }
1414            }
1415            {
1416                let len = value.chars().count();
1417                let violated = len > 4usize;
1418                if violated {
1419                    return Err(crate::common::validate::ConstraintError {
1420                        kind: crate::common::validate::ConstraintKind::MaxLength,
1421                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1422                    });
1423                }
1424            }
1425        }
1426        Ok(Self(value))
1427    }
1428}
1429impl ExternalPurpose1Code {
1430    /// Construct a validated instance, checking all XSD constraints.
1431    #[allow(clippy::unreadable_literal)]
1432    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1433        Self::try_from(value.into())
1434    }
1435}
1436impl From<ExternalPurpose1Code> for String {
1437    fn from(v: ExternalPurpose1Code) -> Self {
1438        v.0
1439    }
1440}
1441/// Minimum length: 1
1442/// Maximum length: 4
1443#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1444#[serde(transparent)]
1445pub struct ExternalServiceLevel1Code(pub String);
1446impl TryFrom<String> for ExternalServiceLevel1Code {
1447    type Error = crate::common::validate::ConstraintError;
1448    #[allow(clippy::unreadable_literal)]
1449    fn try_from(value: String) -> Result<Self, Self::Error> {
1450        {
1451            let value: &str = &value;
1452            {
1453                let len = value.chars().count();
1454                let violated = len < 1usize;
1455                if violated {
1456                    return Err(crate::common::validate::ConstraintError {
1457                        kind: crate::common::validate::ConstraintKind::MinLength,
1458                        message: format!(
1459                            "{} (got {})",
1460                            "value is shorter than minimum length 1", len
1461                        ),
1462                    });
1463                }
1464            }
1465            {
1466                let len = value.chars().count();
1467                let violated = len > 4usize;
1468                if violated {
1469                    return Err(crate::common::validate::ConstraintError {
1470                        kind: crate::common::validate::ConstraintKind::MaxLength,
1471                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1472                    });
1473                }
1474            }
1475        }
1476        Ok(Self(value))
1477    }
1478}
1479impl ExternalServiceLevel1Code {
1480    /// Construct a validated instance, checking all XSD constraints.
1481    #[allow(clippy::unreadable_literal)]
1482    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1483        Self::try_from(value.into())
1484    }
1485}
1486impl From<ExternalServiceLevel1Code> for String {
1487    fn from(v: ExternalServiceLevel1Code) -> Self {
1488        v.0
1489    }
1490}
1491/// Minimum length: 1
1492/// Maximum length: 4
1493#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1494#[serde(transparent)]
1495pub struct ExternalTaxAmountType1Code(pub String);
1496impl TryFrom<String> for ExternalTaxAmountType1Code {
1497    type Error = crate::common::validate::ConstraintError;
1498    #[allow(clippy::unreadable_literal)]
1499    fn try_from(value: String) -> Result<Self, Self::Error> {
1500        {
1501            let value: &str = &value;
1502            {
1503                let len = value.chars().count();
1504                let violated = len < 1usize;
1505                if violated {
1506                    return Err(crate::common::validate::ConstraintError {
1507                        kind: crate::common::validate::ConstraintKind::MinLength,
1508                        message: format!(
1509                            "{} (got {})",
1510                            "value is shorter than minimum length 1", len
1511                        ),
1512                    });
1513                }
1514            }
1515            {
1516                let len = value.chars().count();
1517                let violated = len > 4usize;
1518                if violated {
1519                    return Err(crate::common::validate::ConstraintError {
1520                        kind: crate::common::validate::ConstraintKind::MaxLength,
1521                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1522                    });
1523                }
1524            }
1525        }
1526        Ok(Self(value))
1527    }
1528}
1529impl ExternalTaxAmountType1Code {
1530    /// Construct a validated instance, checking all XSD constraints.
1531    #[allow(clippy::unreadable_literal)]
1532    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1533        Self::try_from(value.into())
1534    }
1535}
1536impl From<ExternalTaxAmountType1Code> for String {
1537    fn from(v: ExternalTaxAmountType1Code) -> Self {
1538        v.0
1539    }
1540}
1541/// Pattern: `[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}`
1542#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1543#[serde(transparent)]
1544pub struct IBAN2007Identifier(pub String);
1545impl TryFrom<String> for IBAN2007Identifier {
1546    type Error = crate::common::validate::ConstraintError;
1547    #[allow(clippy::unreadable_literal)]
1548    fn try_from(value: String) -> Result<Self, Self::Error> {
1549        {
1550            let value: &str = &value;
1551            {
1552                let violated = {
1553                    let bytes = value.as_bytes();
1554                    let len = bytes.len();
1555                    let result: bool = (|| -> bool {
1556                        let mut pos: usize = 0;
1557                        if !(5usize..=34usize).contains(&len) {
1558                            return true;
1559                        }
1560                        {
1561                            let end = pos + 2usize;
1562                            if end > len {
1563                                return true;
1564                            }
1565                            for &b in &bytes[pos..end] {
1566                                if !(65u8..=90u8).contains(&b) {
1567                                    return true;
1568                                }
1569                            }
1570                            pos = end;
1571                        }
1572                        {
1573                            let end = pos + 2usize;
1574                            if end > len {
1575                                return true;
1576                            }
1577                            for &b in &bytes[pos..end] {
1578                                if !(48u8..=57u8).contains(&b) {
1579                                    return true;
1580                                }
1581                            }
1582                            pos = end;
1583                        }
1584                        {
1585                            let start = pos;
1586                            let limit = if pos + 30usize < len {
1587                                pos + 30usize
1588                            } else {
1589                                len
1590                            };
1591                            while pos < limit {
1592                                let b = bytes[pos];
1593                                if !(97u8..=122u8).contains(&b)
1594                                    && !(65u8..=90u8).contains(&b)
1595                                    && !(48u8..=57u8).contains(&b)
1596                                {
1597                                    break;
1598                                }
1599                                pos += 1;
1600                            }
1601                            let matched = pos - start;
1602                            if matched < 1usize {
1603                                return true;
1604                            }
1605                        }
1606                        if pos != len {
1607                            return true;
1608                        }
1609                        false
1610                    })();
1611                    result
1612                };
1613                if violated {
1614                    return Err(crate::common::validate::ConstraintError {
1615                        kind: crate::common::validate::ConstraintKind::Pattern,
1616                        message:
1617                            "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
1618                                .to_string(),
1619                    });
1620                }
1621            }
1622        }
1623        Ok(Self(value))
1624    }
1625}
1626impl IBAN2007Identifier {
1627    /// Construct a validated instance, checking all XSD constraints.
1628    #[allow(clippy::unreadable_literal)]
1629    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1630        Self::try_from(value.into())
1631    }
1632}
1633impl From<IBAN2007Identifier> for String {
1634    fn from(v: IBAN2007Identifier) -> Self {
1635        v.0
1636    }
1637}
1638#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1639#[serde(transparent)]
1640pub struct ISODate(pub String);
1641#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1642#[serde(transparent)]
1643pub struct ISODateTime(pub String);
1644#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1645#[serde(transparent)]
1646pub struct ISOTime(pub String);
1647#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1648#[serde(transparent)]
1649pub struct ISOYear(pub String);
1650#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1651pub enum Instruction4Code {
1652    #[serde(rename = "PHOA")]
1653    Phoa,
1654    #[serde(rename = "TELA")]
1655    Tela,
1656}
1657/// Pattern: `[A-Z0-9]{18,18}[0-9]{2,2}`
1658#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1659#[serde(transparent)]
1660pub struct LEIIdentifier(pub String);
1661impl TryFrom<String> for LEIIdentifier {
1662    type Error = crate::common::validate::ConstraintError;
1663    #[allow(clippy::unreadable_literal)]
1664    fn try_from(value: String) -> Result<Self, Self::Error> {
1665        {
1666            let value: &str = &value;
1667            {
1668                let violated = {
1669                    let bytes = value.as_bytes();
1670                    bytes.len() != 20usize
1671                        || ({
1672                            let b = bytes[0usize];
1673                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1674                        })
1675                        || ({
1676                            let b = bytes[1usize];
1677                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1678                        })
1679                        || ({
1680                            let b = bytes[2usize];
1681                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1682                        })
1683                        || ({
1684                            let b = bytes[3usize];
1685                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1686                        })
1687                        || ({
1688                            let b = bytes[4usize];
1689                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1690                        })
1691                        || ({
1692                            let b = bytes[5usize];
1693                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1694                        })
1695                        || ({
1696                            let b = bytes[6usize];
1697                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1698                        })
1699                        || ({
1700                            let b = bytes[7usize];
1701                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1702                        })
1703                        || ({
1704                            let b = bytes[8usize];
1705                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1706                        })
1707                        || ({
1708                            let b = bytes[9usize];
1709                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1710                        })
1711                        || ({
1712                            let b = bytes[10usize];
1713                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1714                        })
1715                        || ({
1716                            let b = bytes[11usize];
1717                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1718                        })
1719                        || ({
1720                            let b = bytes[12usize];
1721                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1722                        })
1723                        || ({
1724                            let b = bytes[13usize];
1725                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1726                        })
1727                        || ({
1728                            let b = bytes[14usize];
1729                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1730                        })
1731                        || ({
1732                            let b = bytes[15usize];
1733                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1734                        })
1735                        || ({
1736                            let b = bytes[16usize];
1737                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1738                        })
1739                        || ({
1740                            let b = bytes[17usize];
1741                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1742                        })
1743                        || ({
1744                            let b = bytes[18usize];
1745                            !(48u8..=57u8).contains(&b)
1746                        })
1747                        || ({
1748                            let b = bytes[19usize];
1749                            !(48u8..=57u8).contains(&b)
1750                        })
1751                };
1752                if violated {
1753                    return Err(crate::common::validate::ConstraintError {
1754                        kind: crate::common::validate::ConstraintKind::Pattern,
1755                        message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}"
1756                            .to_string(),
1757                    });
1758                }
1759            }
1760        }
1761        Ok(Self(value))
1762    }
1763}
1764impl LEIIdentifier {
1765    /// Construct a validated instance, checking all XSD constraints.
1766    #[allow(clippy::unreadable_literal)]
1767    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1768        Self::try_from(value.into())
1769    }
1770}
1771impl From<LEIIdentifier> for String {
1772    fn from(v: LEIIdentifier) -> Self {
1773        v.0
1774    }
1775}
1776/// Minimum length: 1
1777/// Maximum length: 128
1778#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1779#[serde(transparent)]
1780pub struct Max128Text(pub String);
1781impl TryFrom<String> for Max128Text {
1782    type Error = crate::common::validate::ConstraintError;
1783    #[allow(clippy::unreadable_literal)]
1784    fn try_from(value: String) -> Result<Self, Self::Error> {
1785        {
1786            let value: &str = &value;
1787            {
1788                let len = value.chars().count();
1789                let violated = len < 1usize;
1790                if violated {
1791                    return Err(crate::common::validate::ConstraintError {
1792                        kind: crate::common::validate::ConstraintKind::MinLength,
1793                        message: format!(
1794                            "{} (got {})",
1795                            "value is shorter than minimum length 1", len
1796                        ),
1797                    });
1798                }
1799            }
1800            {
1801                let len = value.chars().count();
1802                let violated = len > 128usize;
1803                if violated {
1804                    return Err(crate::common::validate::ConstraintError {
1805                        kind: crate::common::validate::ConstraintKind::MaxLength,
1806                        message: format!("{} (got {})", "value exceeds maximum length 128", len),
1807                    });
1808                }
1809            }
1810        }
1811        Ok(Self(value))
1812    }
1813}
1814impl Max128Text {
1815    /// Construct a validated instance, checking all XSD constraints.
1816    #[allow(clippy::unreadable_literal)]
1817    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1818        Self::try_from(value.into())
1819    }
1820}
1821impl From<Max128Text> for String {
1822    fn from(v: Max128Text) -> Self {
1823        v.0
1824    }
1825}
1826/// Minimum length: 1
1827/// Maximum length: 140
1828#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1829#[serde(transparent)]
1830pub struct Max140Text(pub String);
1831impl TryFrom<String> for Max140Text {
1832    type Error = crate::common::validate::ConstraintError;
1833    #[allow(clippy::unreadable_literal)]
1834    fn try_from(value: String) -> Result<Self, Self::Error> {
1835        {
1836            let value: &str = &value;
1837            {
1838                let len = value.chars().count();
1839                let violated = len < 1usize;
1840                if violated {
1841                    return Err(crate::common::validate::ConstraintError {
1842                        kind: crate::common::validate::ConstraintKind::MinLength,
1843                        message: format!(
1844                            "{} (got {})",
1845                            "value is shorter than minimum length 1", len
1846                        ),
1847                    });
1848                }
1849            }
1850            {
1851                let len = value.chars().count();
1852                let violated = len > 140usize;
1853                if violated {
1854                    return Err(crate::common::validate::ConstraintError {
1855                        kind: crate::common::validate::ConstraintKind::MaxLength,
1856                        message: format!("{} (got {})", "value exceeds maximum length 140", len),
1857                    });
1858                }
1859            }
1860        }
1861        Ok(Self(value))
1862    }
1863}
1864impl Max140Text {
1865    /// Construct a validated instance, checking all XSD constraints.
1866    #[allow(clippy::unreadable_literal)]
1867    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1868        Self::try_from(value.into())
1869    }
1870}
1871impl From<Max140Text> for String {
1872    fn from(v: Max140Text) -> Self {
1873        v.0
1874    }
1875}
1876/// Pattern: `[0-9]{1,15}`
1877#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1878#[serde(transparent)]
1879pub struct Max15NumericText(pub String);
1880impl TryFrom<String> for Max15NumericText {
1881    type Error = crate::common::validate::ConstraintError;
1882    #[allow(clippy::unreadable_literal)]
1883    fn try_from(value: String) -> Result<Self, Self::Error> {
1884        {
1885            let value: &str = &value;
1886            {
1887                let violated = {
1888                    let bytes = value.as_bytes();
1889                    let len = bytes.len();
1890                    let result: bool = (|| -> bool {
1891                        let mut pos: usize = 0;
1892                        if !(1usize..=15usize).contains(&len) {
1893                            return true;
1894                        }
1895                        {
1896                            let start = pos;
1897                            let limit = if pos + 15usize < len {
1898                                pos + 15usize
1899                            } else {
1900                                len
1901                            };
1902                            while pos < limit {
1903                                let b = bytes[pos];
1904                                if !(48u8..=57u8).contains(&b) {
1905                                    break;
1906                                }
1907                                pos += 1;
1908                            }
1909                            let matched = pos - start;
1910                            if matched < 1usize {
1911                                return true;
1912                            }
1913                        }
1914                        if pos != len {
1915                            return true;
1916                        }
1917                        false
1918                    })();
1919                    result
1920                };
1921                if violated {
1922                    return Err(crate::common::validate::ConstraintError {
1923                        kind: crate::common::validate::ConstraintKind::Pattern,
1924                        message: "value does not match pattern [0-9]{1,15}".to_string(),
1925                    });
1926                }
1927            }
1928        }
1929        Ok(Self(value))
1930    }
1931}
1932impl Max15NumericText {
1933    /// Construct a validated instance, checking all XSD constraints.
1934    #[allow(clippy::unreadable_literal)]
1935    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1936        Self::try_from(value.into())
1937    }
1938}
1939impl From<Max15NumericText> for String {
1940    fn from(v: Max15NumericText) -> Self {
1941        v.0
1942    }
1943}
1944/// Minimum length: 1
1945/// Maximum length: 16
1946#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1947#[serde(transparent)]
1948pub struct Max16Text(pub String);
1949impl TryFrom<String> for Max16Text {
1950    type Error = crate::common::validate::ConstraintError;
1951    #[allow(clippy::unreadable_literal)]
1952    fn try_from(value: String) -> Result<Self, Self::Error> {
1953        {
1954            let value: &str = &value;
1955            {
1956                let len = value.chars().count();
1957                let violated = len < 1usize;
1958                if violated {
1959                    return Err(crate::common::validate::ConstraintError {
1960                        kind: crate::common::validate::ConstraintKind::MinLength,
1961                        message: format!(
1962                            "{} (got {})",
1963                            "value is shorter than minimum length 1", len
1964                        ),
1965                    });
1966                }
1967            }
1968            {
1969                let len = value.chars().count();
1970                let violated = len > 16usize;
1971                if violated {
1972                    return Err(crate::common::validate::ConstraintError {
1973                        kind: crate::common::validate::ConstraintKind::MaxLength,
1974                        message: format!("{} (got {})", "value exceeds maximum length 16", len),
1975                    });
1976                }
1977            }
1978        }
1979        Ok(Self(value))
1980    }
1981}
1982impl Max16Text {
1983    /// Construct a validated instance, checking all XSD constraints.
1984    #[allow(clippy::unreadable_literal)]
1985    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1986        Self::try_from(value.into())
1987    }
1988}
1989impl From<Max16Text> for String {
1990    fn from(v: Max16Text) -> Self {
1991        v.0
1992    }
1993}
1994/// Minimum length: 1
1995/// Maximum length: 2048
1996#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1997#[serde(transparent)]
1998pub struct Max2048Text(pub String);
1999impl TryFrom<String> for Max2048Text {
2000    type Error = crate::common::validate::ConstraintError;
2001    #[allow(clippy::unreadable_literal)]
2002    fn try_from(value: String) -> Result<Self, Self::Error> {
2003        {
2004            let value: &str = &value;
2005            {
2006                let len = value.chars().count();
2007                let violated = len < 1usize;
2008                if violated {
2009                    return Err(crate::common::validate::ConstraintError {
2010                        kind: crate::common::validate::ConstraintKind::MinLength,
2011                        message: format!(
2012                            "{} (got {})",
2013                            "value is shorter than minimum length 1", len
2014                        ),
2015                    });
2016                }
2017            }
2018            {
2019                let len = value.chars().count();
2020                let violated = len > 2048usize;
2021                if violated {
2022                    return Err(crate::common::validate::ConstraintError {
2023                        kind: crate::common::validate::ConstraintKind::MaxLength,
2024                        message: format!("{} (got {})", "value exceeds maximum length 2048", len),
2025                    });
2026                }
2027            }
2028        }
2029        Ok(Self(value))
2030    }
2031}
2032impl Max2048Text {
2033    /// Construct a validated instance, checking all XSD constraints.
2034    #[allow(clippy::unreadable_literal)]
2035    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2036        Self::try_from(value.into())
2037    }
2038}
2039impl From<Max2048Text> for String {
2040    fn from(v: Max2048Text) -> Self {
2041        v.0
2042    }
2043}
2044/// Minimum length: 1
2045/// Maximum length: 34
2046#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2047#[serde(transparent)]
2048pub struct Max34Text(pub String);
2049impl TryFrom<String> for Max34Text {
2050    type Error = crate::common::validate::ConstraintError;
2051    #[allow(clippy::unreadable_literal)]
2052    fn try_from(value: String) -> Result<Self, Self::Error> {
2053        {
2054            let value: &str = &value;
2055            {
2056                let len = value.chars().count();
2057                let violated = len < 1usize;
2058                if violated {
2059                    return Err(crate::common::validate::ConstraintError {
2060                        kind: crate::common::validate::ConstraintKind::MinLength,
2061                        message: format!(
2062                            "{} (got {})",
2063                            "value is shorter than minimum length 1", len
2064                        ),
2065                    });
2066                }
2067            }
2068            {
2069                let len = value.chars().count();
2070                let violated = len > 34usize;
2071                if violated {
2072                    return Err(crate::common::validate::ConstraintError {
2073                        kind: crate::common::validate::ConstraintKind::MaxLength,
2074                        message: format!("{} (got {})", "value exceeds maximum length 34", len),
2075                    });
2076                }
2077            }
2078        }
2079        Ok(Self(value))
2080    }
2081}
2082impl Max34Text {
2083    /// Construct a validated instance, checking all XSD constraints.
2084    #[allow(clippy::unreadable_literal)]
2085    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2086        Self::try_from(value.into())
2087    }
2088}
2089impl From<Max34Text> for String {
2090    fn from(v: Max34Text) -> Self {
2091        v.0
2092    }
2093}
2094/// Minimum length: 1
2095/// Maximum length: 350
2096#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2097#[serde(transparent)]
2098pub struct Max350Text(pub String);
2099impl TryFrom<String> for Max350Text {
2100    type Error = crate::common::validate::ConstraintError;
2101    #[allow(clippy::unreadable_literal)]
2102    fn try_from(value: String) -> Result<Self, Self::Error> {
2103        {
2104            let value: &str = &value;
2105            {
2106                let len = value.chars().count();
2107                let violated = len < 1usize;
2108                if violated {
2109                    return Err(crate::common::validate::ConstraintError {
2110                        kind: crate::common::validate::ConstraintKind::MinLength,
2111                        message: format!(
2112                            "{} (got {})",
2113                            "value is shorter than minimum length 1", len
2114                        ),
2115                    });
2116                }
2117            }
2118            {
2119                let len = value.chars().count();
2120                let violated = len > 350usize;
2121                if violated {
2122                    return Err(crate::common::validate::ConstraintError {
2123                        kind: crate::common::validate::ConstraintKind::MaxLength,
2124                        message: format!("{} (got {})", "value exceeds maximum length 350", len),
2125                    });
2126                }
2127            }
2128        }
2129        Ok(Self(value))
2130    }
2131}
2132impl Max350Text {
2133    /// Construct a validated instance, checking all XSD constraints.
2134    #[allow(clippy::unreadable_literal)]
2135    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2136        Self::try_from(value.into())
2137    }
2138}
2139impl From<Max350Text> for String {
2140    fn from(v: Max350Text) -> Self {
2141        v.0
2142    }
2143}
2144/// Minimum length: 1
2145/// Maximum length: 35
2146#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2147#[serde(transparent)]
2148pub struct Max35Text(pub String);
2149impl TryFrom<String> for Max35Text {
2150    type Error = crate::common::validate::ConstraintError;
2151    #[allow(clippy::unreadable_literal)]
2152    fn try_from(value: String) -> Result<Self, Self::Error> {
2153        {
2154            let value: &str = &value;
2155            {
2156                let len = value.chars().count();
2157                let violated = len < 1usize;
2158                if violated {
2159                    return Err(crate::common::validate::ConstraintError {
2160                        kind: crate::common::validate::ConstraintKind::MinLength,
2161                        message: format!(
2162                            "{} (got {})",
2163                            "value is shorter than minimum length 1", len
2164                        ),
2165                    });
2166                }
2167            }
2168            {
2169                let len = value.chars().count();
2170                let violated = len > 35usize;
2171                if violated {
2172                    return Err(crate::common::validate::ConstraintError {
2173                        kind: crate::common::validate::ConstraintKind::MaxLength,
2174                        message: format!("{} (got {})", "value exceeds maximum length 35", len),
2175                    });
2176                }
2177            }
2178        }
2179        Ok(Self(value))
2180    }
2181}
2182impl Max35Text {
2183    /// Construct a validated instance, checking all XSD constraints.
2184    #[allow(clippy::unreadable_literal)]
2185    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2186        Self::try_from(value.into())
2187    }
2188}
2189impl From<Max35Text> for String {
2190    fn from(v: Max35Text) -> Self {
2191        v.0
2192    }
2193}
2194/// Minimum length: 1
2195/// Maximum length: 4
2196#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2197#[serde(transparent)]
2198pub struct Max4Text(pub String);
2199impl TryFrom<String> for Max4Text {
2200    type Error = crate::common::validate::ConstraintError;
2201    #[allow(clippy::unreadable_literal)]
2202    fn try_from(value: String) -> Result<Self, Self::Error> {
2203        {
2204            let value: &str = &value;
2205            {
2206                let len = value.chars().count();
2207                let violated = len < 1usize;
2208                if violated {
2209                    return Err(crate::common::validate::ConstraintError {
2210                        kind: crate::common::validate::ConstraintKind::MinLength,
2211                        message: format!(
2212                            "{} (got {})",
2213                            "value is shorter than minimum length 1", len
2214                        ),
2215                    });
2216                }
2217            }
2218            {
2219                let len = value.chars().count();
2220                let violated = len > 4usize;
2221                if violated {
2222                    return Err(crate::common::validate::ConstraintError {
2223                        kind: crate::common::validate::ConstraintKind::MaxLength,
2224                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
2225                    });
2226                }
2227            }
2228        }
2229        Ok(Self(value))
2230    }
2231}
2232impl Max4Text {
2233    /// Construct a validated instance, checking all XSD constraints.
2234    #[allow(clippy::unreadable_literal)]
2235    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2236        Self::try_from(value.into())
2237    }
2238}
2239impl From<Max4Text> for String {
2240    fn from(v: Max4Text) -> Self {
2241        v.0
2242    }
2243}
2244/// Minimum length: 1
2245/// Maximum length: 70
2246#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2247#[serde(transparent)]
2248pub struct Max70Text(pub String);
2249impl TryFrom<String> for Max70Text {
2250    type Error = crate::common::validate::ConstraintError;
2251    #[allow(clippy::unreadable_literal)]
2252    fn try_from(value: String) -> Result<Self, Self::Error> {
2253        {
2254            let value: &str = &value;
2255            {
2256                let len = value.chars().count();
2257                let violated = len < 1usize;
2258                if violated {
2259                    return Err(crate::common::validate::ConstraintError {
2260                        kind: crate::common::validate::ConstraintKind::MinLength,
2261                        message: format!(
2262                            "{} (got {})",
2263                            "value is shorter than minimum length 1", len
2264                        ),
2265                    });
2266                }
2267            }
2268            {
2269                let len = value.chars().count();
2270                let violated = len > 70usize;
2271                if violated {
2272                    return Err(crate::common::validate::ConstraintError {
2273                        kind: crate::common::validate::ConstraintKind::MaxLength,
2274                        message: format!("{} (got {})", "value exceeds maximum length 70", len),
2275                    });
2276                }
2277            }
2278        }
2279        Ok(Self(value))
2280    }
2281}
2282impl Max70Text {
2283    /// Construct a validated instance, checking all XSD constraints.
2284    #[allow(clippy::unreadable_literal)]
2285    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2286        Self::try_from(value.into())
2287    }
2288}
2289impl From<Max70Text> for String {
2290    fn from(v: Max70Text) -> Self {
2291        v.0
2292    }
2293}
2294#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2295pub enum NamePrefix2Code {
2296    #[serde(rename = "DOCT")]
2297    Doct,
2298    #[serde(rename = "MADM")]
2299    Madm,
2300    #[serde(rename = "MISS")]
2301    Miss,
2302    #[serde(rename = "MIST")]
2303    Mist,
2304    #[serde(rename = "MIKS")]
2305    Miks,
2306}
2307/// Fraction digits: 0
2308/// Total digits: 18
2309#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2310#[serde(transparent)]
2311pub struct Number(pub String);
2312impl TryFrom<String> for Number {
2313    type Error = crate::common::validate::ConstraintError;
2314    #[allow(clippy::unreadable_literal)]
2315    fn try_from(value: String) -> Result<Self, Self::Error> {
2316        {
2317            let value: &str = &value;
2318            {
2319                let frac_count = value.find('.').map_or(0, |dot| {
2320                    value[dot + 1..]
2321                        .chars()
2322                        .filter(char::is_ascii_digit)
2323                        .count()
2324                });
2325                let violated = frac_count > 0usize;
2326                if violated {
2327                    return Err(crate::common::validate::ConstraintError {
2328                        kind: crate::common::validate::ConstraintKind::FractionDigits,
2329                        message: format!(
2330                            "{} (got {})",
2331                            "value exceeds maximum fraction digits 0", frac_count
2332                        ),
2333                    });
2334                }
2335            }
2336            {
2337                let digit_count = value.chars().filter(char::is_ascii_digit).count();
2338                let violated = digit_count > 18usize;
2339                if violated {
2340                    return Err(crate::common::validate::ConstraintError {
2341                        kind: crate::common::validate::ConstraintKind::TotalDigits,
2342                        message: format!(
2343                            "{} (got {})",
2344                            "value exceeds maximum total digits 18", digit_count
2345                        ),
2346                    });
2347                }
2348            }
2349        }
2350        Ok(Self(value))
2351    }
2352}
2353impl Number {
2354    /// Construct a validated instance, checking all XSD constraints.
2355    #[allow(clippy::unreadable_literal)]
2356    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2357        Self::try_from(value.into())
2358    }
2359}
2360impl From<Number> for String {
2361    fn from(v: Number) -> Self {
2362        v.0
2363    }
2364}
2365/// Fraction digits: 10
2366/// Total digits: 11
2367#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2368#[serde(transparent)]
2369pub struct PercentageRate(pub String);
2370impl TryFrom<String> for PercentageRate {
2371    type Error = crate::common::validate::ConstraintError;
2372    #[allow(clippy::unreadable_literal)]
2373    fn try_from(value: String) -> Result<Self, Self::Error> {
2374        {
2375            let value: &str = &value;
2376            {
2377                let frac_count = value.find('.').map_or(0, |dot| {
2378                    value[dot + 1..]
2379                        .chars()
2380                        .filter(char::is_ascii_digit)
2381                        .count()
2382                });
2383                let violated = frac_count > 10usize;
2384                if violated {
2385                    return Err(crate::common::validate::ConstraintError {
2386                        kind: crate::common::validate::ConstraintKind::FractionDigits,
2387                        message: format!(
2388                            "{} (got {})",
2389                            "value exceeds maximum fraction digits 10", frac_count
2390                        ),
2391                    });
2392                }
2393            }
2394            {
2395                let digit_count = value.chars().filter(char::is_ascii_digit).count();
2396                let violated = digit_count > 11usize;
2397                if violated {
2398                    return Err(crate::common::validate::ConstraintError {
2399                        kind: crate::common::validate::ConstraintKind::TotalDigits,
2400                        message: format!(
2401                            "{} (got {})",
2402                            "value exceeds maximum total digits 11", digit_count
2403                        ),
2404                    });
2405                }
2406            }
2407        }
2408        Ok(Self(value))
2409    }
2410}
2411impl PercentageRate {
2412    /// Construct a validated instance, checking all XSD constraints.
2413    #[allow(clippy::unreadable_literal)]
2414    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2415        Self::try_from(value.into())
2416    }
2417}
2418impl From<PercentageRate> for String {
2419    fn from(v: PercentageRate) -> Self {
2420        v.0
2421    }
2422}
2423/// Pattern: `\+[0-9]{1,3}-[0-9()+\-]{1,30}`
2424#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2425#[serde(transparent)]
2426pub struct PhoneNumber(pub String);
2427impl TryFrom<String> for PhoneNumber {
2428    type Error = crate::common::validate::ConstraintError;
2429    #[allow(clippy::unreadable_literal)]
2430    fn try_from(value: String) -> Result<Self, Self::Error> {
2431        {
2432            let value: &str = &value;
2433            {
2434                let violated = {
2435                    let bytes = value.as_bytes();
2436                    let len = bytes.len();
2437                    let result: bool = (|| -> bool {
2438                        let mut pos: usize = 0;
2439                        if !(4usize..=35usize).contains(&len) {
2440                            return true;
2441                        }
2442                        if pos >= len || bytes[pos] != 43u8 {
2443                            return true;
2444                        }
2445                        pos += 1;
2446                        {
2447                            let start = pos;
2448                            let limit = if pos + 3usize < len {
2449                                pos + 3usize
2450                            } else {
2451                                len
2452                            };
2453                            while pos < limit {
2454                                let b = bytes[pos];
2455                                if !(48u8..=57u8).contains(&b) {
2456                                    break;
2457                                }
2458                                pos += 1;
2459                            }
2460                            let matched = pos - start;
2461                            if matched < 1usize {
2462                                return true;
2463                            }
2464                        }
2465                        if pos >= len || bytes[pos] != 45u8 {
2466                            return true;
2467                        }
2468                        pos += 1;
2469                        {
2470                            let start = pos;
2471                            let limit = if pos + 30usize < len {
2472                                pos + 30usize
2473                            } else {
2474                                len
2475                            };
2476                            while pos < limit {
2477                                let b = bytes[pos];
2478                                if !(48u8..=57u8).contains(&b)
2479                                    && b != 40u8
2480                                    && b != 41u8
2481                                    && b != 43u8
2482                                    && b != 45u8
2483                                {
2484                                    break;
2485                                }
2486                                pos += 1;
2487                            }
2488                            let matched = pos - start;
2489                            if matched < 1usize {
2490                                return true;
2491                            }
2492                        }
2493                        if pos != len {
2494                            return true;
2495                        }
2496                        false
2497                    })();
2498                    result
2499                };
2500                if violated {
2501                    return Err(crate::common::validate::ConstraintError {
2502                        kind: crate::common::validate::ConstraintKind::Pattern,
2503                        message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
2504                            .to_string(),
2505                    });
2506                }
2507            }
2508        }
2509        Ok(Self(value))
2510    }
2511}
2512impl PhoneNumber {
2513    /// Construct a validated instance, checking all XSD constraints.
2514    #[allow(clippy::unreadable_literal)]
2515    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2516        Self::try_from(value.into())
2517    }
2518}
2519impl From<PhoneNumber> for String {
2520    fn from(v: PhoneNumber) -> Self {
2521        v.0
2522    }
2523}
2524#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2525pub enum PreferredContactMethod1Code {
2526    #[serde(rename = "LETT")]
2527    Lett,
2528    #[serde(rename = "MAIL")]
2529    Mail,
2530    #[serde(rename = "PHON")]
2531    Phon,
2532    #[serde(rename = "FAXX")]
2533    Faxx,
2534    #[serde(rename = "CELL")]
2535    Cell,
2536}
2537#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2538pub enum Priority2Code {
2539    #[serde(rename = "HIGH")]
2540    High,
2541    #[serde(rename = "NORM")]
2542    Norm,
2543}
2544#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2545pub enum Priority3Code {
2546    #[serde(rename = "URGT")]
2547    Urgt,
2548    #[serde(rename = "HIGH")]
2549    High,
2550    #[serde(rename = "NORM")]
2551    Norm,
2552}
2553#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2554pub enum SettlementMethod1Code {
2555    #[serde(rename = "INDA")]
2556    Inda,
2557    #[serde(rename = "INGA")]
2558    Inga,
2559    #[serde(rename = "COVE")]
2560    Cove,
2561    #[serde(rename = "CLRG")]
2562    Clrg,
2563}
2564#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2565pub enum TaxRecordPeriod1Code {
2566    #[serde(rename = "MM01")]
2567    Mm01,
2568    #[serde(rename = "MM02")]
2569    Mm02,
2570    #[serde(rename = "MM03")]
2571    Mm03,
2572    #[serde(rename = "MM04")]
2573    Mm04,
2574    #[serde(rename = "MM05")]
2575    Mm05,
2576    #[serde(rename = "MM06")]
2577    Mm06,
2578    #[serde(rename = "MM07")]
2579    Mm07,
2580    #[serde(rename = "MM08")]
2581    Mm08,
2582    #[serde(rename = "MM09")]
2583    Mm09,
2584    #[serde(rename = "MM10")]
2585    Mm10,
2586    #[serde(rename = "MM11")]
2587    Mm11,
2588    #[serde(rename = "MM12")]
2589    Mm12,
2590    #[serde(rename = "QTR1")]
2591    Qtr1,
2592    #[serde(rename = "QTR2")]
2593    Qtr2,
2594    #[serde(rename = "QTR3")]
2595    Qtr3,
2596    #[serde(rename = "QTR4")]
2597    Qtr4,
2598    #[serde(rename = "HLF1")]
2599    Hlf1,
2600    #[serde(rename = "HLF2")]
2601    Hlf2,
2602}
2603#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2604#[serde(transparent)]
2605pub struct TrueFalseIndicator(pub bool);
2606/// Pattern: `[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}`
2607#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2608#[serde(transparent)]
2609pub struct UUIDv4Identifier(pub String);
2610impl TryFrom<String> for UUIDv4Identifier {
2611    type Error = crate::common::validate::ConstraintError;
2612    #[allow(clippy::unreadable_literal)]
2613    fn try_from(value: String) -> Result<Self, Self::Error> {
2614        {
2615            let value: &str = &value;
2616            {
2617                let violated = {
2618                    let bytes = value.as_bytes();
2619                    bytes.len() != 36usize
2620                        || ({
2621                            let b = bytes[0usize];
2622                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2623                        })
2624                        || ({
2625                            let b = bytes[1usize];
2626                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2627                        })
2628                        || ({
2629                            let b = bytes[2usize];
2630                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2631                        })
2632                        || ({
2633                            let b = bytes[3usize];
2634                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2635                        })
2636                        || ({
2637                            let b = bytes[4usize];
2638                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2639                        })
2640                        || ({
2641                            let b = bytes[5usize];
2642                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2643                        })
2644                        || ({
2645                            let b = bytes[6usize];
2646                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2647                        })
2648                        || ({
2649                            let b = bytes[7usize];
2650                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2651                        })
2652                        || bytes[8usize] != 45u8
2653                        || ({
2654                            let b = bytes[9usize];
2655                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2656                        })
2657                        || ({
2658                            let b = bytes[10usize];
2659                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2660                        })
2661                        || ({
2662                            let b = bytes[11usize];
2663                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2664                        })
2665                        || ({
2666                            let b = bytes[12usize];
2667                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2668                        })
2669                        || bytes[13usize] != 45u8
2670                        || bytes[14usize] != 52u8
2671                        || ({
2672                            let b = bytes[15usize];
2673                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2674                        })
2675                        || ({
2676                            let b = bytes[16usize];
2677                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2678                        })
2679                        || ({
2680                            let b = bytes[17usize];
2681                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2682                        })
2683                        || bytes[18usize] != 45u8
2684                        || ({
2685                            let b = bytes[19usize];
2686                            b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
2687                        })
2688                        || ({
2689                            let b = bytes[20usize];
2690                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2691                        })
2692                        || ({
2693                            let b = bytes[21usize];
2694                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2695                        })
2696                        || ({
2697                            let b = bytes[22usize];
2698                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2699                        })
2700                        || bytes[23usize] != 45u8
2701                        || ({
2702                            let b = bytes[24usize];
2703                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2704                        })
2705                        || ({
2706                            let b = bytes[25usize];
2707                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2708                        })
2709                        || ({
2710                            let b = bytes[26usize];
2711                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2712                        })
2713                        || ({
2714                            let b = bytes[27usize];
2715                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2716                        })
2717                        || ({
2718                            let b = bytes[28usize];
2719                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2720                        })
2721                        || ({
2722                            let b = bytes[29usize];
2723                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2724                        })
2725                        || ({
2726                            let b = bytes[30usize];
2727                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2728                        })
2729                        || ({
2730                            let b = bytes[31usize];
2731                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2732                        })
2733                        || ({
2734                            let b = bytes[32usize];
2735                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2736                        })
2737                        || ({
2738                            let b = bytes[33usize];
2739                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2740                        })
2741                        || ({
2742                            let b = bytes[34usize];
2743                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2744                        })
2745                        || ({
2746                            let b = bytes[35usize];
2747                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2748                        })
2749                };
2750                if violated {
2751                    return Err(crate::common::validate::ConstraintError {
2752                        kind: crate::common::validate::ConstraintKind::Pattern,
2753                        message: "value does not match pattern [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}"
2754                            .to_string(),
2755                    });
2756                }
2757            }
2758        }
2759        Ok(Self(value))
2760    }
2761}
2762impl UUIDv4Identifier {
2763    /// Construct a validated instance, checking all XSD constraints.
2764    #[allow(clippy::unreadable_literal)]
2765    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2766        Self::try_from(value.into())
2767    }
2768}
2769impl From<UUIDv4Identifier> for String {
2770    fn from(v: UUIDv4Identifier) -> Self {
2771        v.0
2772    }
2773}
2774#[allow(clippy::large_enum_variant)]
2775#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2776pub enum AccountIdentification4Choice {
2777    #[serde(rename = "IBAN")]
2778    IBAN(IBAN2007Identifier),
2779    #[serde(rename = "Othr")]
2780    Othr(GenericAccountIdentification1),
2781}
2782#[allow(clippy::large_enum_variant)]
2783#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2784pub enum AccountSchemeName1Choice {
2785    #[serde(rename = "Cd")]
2786    Cd(ExternalAccountIdentification1Code),
2787    #[serde(rename = "Prtry")]
2788    Prtry(Max35Text),
2789}
2790#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2791pub struct ActiveCurrencyAndAmount {
2792    #[serde(rename = "$value")]
2793    pub value: ActiveCurrencyAndAmountSimpleType,
2794    #[serde(rename = "@Ccy")]
2795    pub ccy: ActiveCurrencyCode,
2796}
2797#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2798pub struct ActiveOrHistoricCurrencyAndAmount {
2799    #[serde(rename = "$value")]
2800    pub value: ActiveOrHistoricCurrencyAndAmountSimpleType,
2801    #[serde(rename = "@Ccy")]
2802    pub ccy: ActiveOrHistoricCurrencyCode,
2803}
2804#[allow(clippy::large_enum_variant)]
2805#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2806pub enum AddressType3Choice {
2807    #[serde(rename = "Cd")]
2808    Cd(AddressType2Code),
2809    #[serde(rename = "Prtry")]
2810    Prtry(GenericIdentification30),
2811}
2812#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2813pub struct BranchAndFinancialInstitutionIdentification6 {
2814    #[serde(rename = "FinInstnId")]
2815    pub fin_instn_id: FinancialInstitutionIdentification18,
2816    #[serde(rename = "BrnchId")]
2817    #[serde(skip_serializing_if = "Option::is_none")]
2818    pub brnch_id: Option<BranchData3>,
2819}
2820/// Builder for [`BranchAndFinancialInstitutionIdentification6`]. Construct via [`BranchAndFinancialInstitutionIdentification6::builder()`].
2821#[allow(clippy::struct_field_names)]
2822#[derive(Default)]
2823pub struct BranchAndFinancialInstitutionIdentification6Builder {
2824    fin_instn_id: ::std::option::Option<FinancialInstitutionIdentification18>,
2825    brnch_id: ::std::option::Option<BranchData3>,
2826}
2827impl BranchAndFinancialInstitutionIdentification6Builder {
2828    /// Set the `fin_instn_id` field.
2829    #[must_use]
2830    pub fn fin_instn_id(
2831        mut self,
2832        value: FinancialInstitutionIdentification18,
2833    ) -> BranchAndFinancialInstitutionIdentification6Builder {
2834        self.fin_instn_id = ::std::option::Option::Some(value);
2835        self
2836    }
2837    /// Set the `brnch_id` field.
2838    #[must_use]
2839    pub fn brnch_id(
2840        mut self,
2841        value: BranchData3,
2842    ) -> BranchAndFinancialInstitutionIdentification6Builder {
2843        self.brnch_id = ::std::option::Option::Some(value);
2844        self
2845    }
2846    /// Validate required fields and construct the type.
2847    ///
2848    /// # Errors
2849    ///
2850    /// Returns [`crate::common::BuilderError`] listing the names of any
2851    /// required fields that were not set.
2852    ///
2853    /// # Panics
2854    ///
2855    /// Does not panic — all `.unwrap()` calls are guarded by the
2856    /// missing-field check above.
2857    pub fn build(
2858        self,
2859    ) -> ::std::result::Result<
2860        BranchAndFinancialInstitutionIdentification6,
2861        crate::common::BuilderError,
2862    > {
2863        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
2864        if self.fin_instn_id.is_none() {
2865            missing.push("fin_instn_id".to_owned());
2866        }
2867        if !missing.is_empty() {
2868            return ::std::result::Result::Err(crate::common::BuilderError {
2869                type_name: "BranchAndFinancialInstitutionIdentification6".to_owned(),
2870                missing_fields: missing,
2871            });
2872        }
2873        ::std::result::Result::Ok(BranchAndFinancialInstitutionIdentification6 {
2874            fin_instn_id: self.fin_instn_id.unwrap(),
2875            brnch_id: self.brnch_id,
2876        })
2877    }
2878}
2879impl BranchAndFinancialInstitutionIdentification6 {
2880    /// Return a new builder for this type.
2881    #[must_use]
2882    pub fn builder() -> BranchAndFinancialInstitutionIdentification6Builder {
2883        BranchAndFinancialInstitutionIdentification6Builder::default()
2884    }
2885}
2886#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2887pub struct BranchData3 {
2888    #[serde(rename = "Id")]
2889    #[serde(skip_serializing_if = "Option::is_none")]
2890    pub id: Option<Max35Text>,
2891    #[serde(rename = "LEI")]
2892    #[serde(skip_serializing_if = "Option::is_none")]
2893    pub lei: Option<LEIIdentifier>,
2894    #[serde(rename = "Nm")]
2895    #[serde(skip_serializing_if = "Option::is_none")]
2896    pub nm: Option<Max140Text>,
2897    #[serde(rename = "PstlAdr")]
2898    #[serde(skip_serializing_if = "Option::is_none")]
2899    pub pstl_adr: Option<PostalAddress24>,
2900}
2901/// Builder for [`BranchData3`]. Construct via [`BranchData3::builder()`].
2902#[allow(clippy::struct_field_names)]
2903#[derive(Default)]
2904pub struct BranchData3Builder {
2905    id: ::std::option::Option<Max35Text>,
2906    lei: ::std::option::Option<LEIIdentifier>,
2907    nm: ::std::option::Option<Max140Text>,
2908    pstl_adr: ::std::option::Option<PostalAddress24>,
2909}
2910impl BranchData3Builder {
2911    /// Set the `id` field.
2912    #[must_use]
2913    pub fn id(mut self, value: Max35Text) -> BranchData3Builder {
2914        self.id = ::std::option::Option::Some(value);
2915        self
2916    }
2917    /// Set the `lei` field.
2918    #[must_use]
2919    pub fn lei(mut self, value: LEIIdentifier) -> BranchData3Builder {
2920        self.lei = ::std::option::Option::Some(value);
2921        self
2922    }
2923    /// Set the `nm` field.
2924    #[must_use]
2925    pub fn nm(mut self, value: Max140Text) -> BranchData3Builder {
2926        self.nm = ::std::option::Option::Some(value);
2927        self
2928    }
2929    /// Set the `pstl_adr` field.
2930    #[must_use]
2931    pub fn pstl_adr(mut self, value: PostalAddress24) -> BranchData3Builder {
2932        self.pstl_adr = ::std::option::Option::Some(value);
2933        self
2934    }
2935    /// Validate required fields and construct the type.
2936    ///
2937    /// # Errors
2938    ///
2939    /// Returns [`crate::common::BuilderError`] listing the names of any
2940    /// required fields that were not set.
2941    ///
2942    /// # Panics
2943    ///
2944    /// Does not panic — all `.unwrap()` calls are guarded by the
2945    /// missing-field check above.
2946    pub fn build(self) -> ::std::result::Result<BranchData3, crate::common::BuilderError> {
2947        ::std::result::Result::Ok(BranchData3 {
2948            id: self.id,
2949            lei: self.lei,
2950            nm: self.nm,
2951            pstl_adr: self.pstl_adr,
2952        })
2953    }
2954}
2955impl BranchData3 {
2956    /// Return a new builder for this type.
2957    #[must_use]
2958    pub fn builder() -> BranchData3Builder {
2959        BranchData3Builder::default()
2960    }
2961}
2962#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2963pub struct CashAccount40 {
2964    #[serde(rename = "Id")]
2965    #[serde(skip_serializing_if = "Option::is_none")]
2966    pub id: Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
2967    #[serde(rename = "Tp")]
2968    #[serde(skip_serializing_if = "Option::is_none")]
2969    pub tp: Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
2970    #[serde(rename = "Ccy")]
2971    #[serde(skip_serializing_if = "Option::is_none")]
2972    pub ccy: Option<ActiveOrHistoricCurrencyCode>,
2973    #[serde(rename = "Nm")]
2974    #[serde(skip_serializing_if = "Option::is_none")]
2975    pub nm: Option<Max70Text>,
2976    #[serde(rename = "Prxy")]
2977    #[serde(skip_serializing_if = "Option::is_none")]
2978    pub prxy: Option<ProxyAccountIdentification1>,
2979}
2980/// Builder for [`CashAccount40`]. Construct via [`CashAccount40::builder()`].
2981#[allow(clippy::struct_field_names)]
2982#[derive(Default)]
2983pub struct CashAccount40Builder {
2984    id: ::std::option::Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
2985    tp: ::std::option::Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
2986    ccy: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
2987    nm: ::std::option::Option<Max70Text>,
2988    prxy: ::std::option::Option<ProxyAccountIdentification1>,
2989}
2990impl CashAccount40Builder {
2991    /// Set the `id` field.
2992    #[must_use]
2993    pub fn id(
2994        mut self,
2995        value: crate::common::ChoiceWrapper<AccountIdentification4Choice>,
2996    ) -> CashAccount40Builder {
2997        self.id = ::std::option::Option::Some(value);
2998        self
2999    }
3000    /// Set the `tp` field.
3001    #[must_use]
3002    pub fn tp(
3003        mut self,
3004        value: crate::common::ChoiceWrapper<CashAccountType2Choice>,
3005    ) -> CashAccount40Builder {
3006        self.tp = ::std::option::Option::Some(value);
3007        self
3008    }
3009    /// Set the `ccy` field.
3010    #[must_use]
3011    pub fn ccy(mut self, value: ActiveOrHistoricCurrencyCode) -> CashAccount40Builder {
3012        self.ccy = ::std::option::Option::Some(value);
3013        self
3014    }
3015    /// Set the `nm` field.
3016    #[must_use]
3017    pub fn nm(mut self, value: Max70Text) -> CashAccount40Builder {
3018        self.nm = ::std::option::Option::Some(value);
3019        self
3020    }
3021    /// Set the `prxy` field.
3022    #[must_use]
3023    pub fn prxy(mut self, value: ProxyAccountIdentification1) -> CashAccount40Builder {
3024        self.prxy = ::std::option::Option::Some(value);
3025        self
3026    }
3027    /// Validate required fields and construct the type.
3028    ///
3029    /// # Errors
3030    ///
3031    /// Returns [`crate::common::BuilderError`] listing the names of any
3032    /// required fields that were not set.
3033    ///
3034    /// # Panics
3035    ///
3036    /// Does not panic — all `.unwrap()` calls are guarded by the
3037    /// missing-field check above.
3038    pub fn build(self) -> ::std::result::Result<CashAccount40, crate::common::BuilderError> {
3039        ::std::result::Result::Ok(CashAccount40 {
3040            id: self.id,
3041            tp: self.tp,
3042            ccy: self.ccy,
3043            nm: self.nm,
3044            prxy: self.prxy,
3045        })
3046    }
3047}
3048impl CashAccount40 {
3049    /// Return a new builder for this type.
3050    #[must_use]
3051    pub fn builder() -> CashAccount40Builder {
3052        CashAccount40Builder::default()
3053    }
3054}
3055#[allow(clippy::large_enum_variant)]
3056#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3057pub enum CashAccountType2Choice {
3058    #[serde(rename = "Cd")]
3059    Cd(ExternalCashAccountType1Code),
3060    #[serde(rename = "Prtry")]
3061    Prtry(Max35Text),
3062}
3063#[allow(clippy::large_enum_variant)]
3064#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3065pub enum CategoryPurpose1Choice {
3066    #[serde(rename = "Cd")]
3067    Cd(ExternalCategoryPurpose1Code),
3068    #[serde(rename = "Prtry")]
3069    Prtry(Max35Text),
3070}
3071#[allow(clippy::large_enum_variant)]
3072#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3073pub enum ClearingSystemIdentification2Choice {
3074    #[serde(rename = "Cd")]
3075    Cd(ExternalClearingSystemIdentification1Code),
3076    #[serde(rename = "Prtry")]
3077    Prtry(Max35Text),
3078}
3079#[allow(clippy::large_enum_variant)]
3080#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3081pub enum ClearingSystemIdentification3Choice {
3082    #[serde(rename = "Cd")]
3083    Cd(ExternalCashClearingSystem1Code),
3084    #[serde(rename = "Prtry")]
3085    Prtry(Max35Text),
3086}
3087#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3088pub struct ClearingSystemMemberIdentification2 {
3089    #[serde(rename = "ClrSysId")]
3090    #[serde(skip_serializing_if = "Option::is_none")]
3091    pub clr_sys_id: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3092    #[serde(rename = "MmbId")]
3093    pub mmb_id: Max35Text,
3094}
3095/// Builder for [`ClearingSystemMemberIdentification2`]. Construct via [`ClearingSystemMemberIdentification2::builder()`].
3096#[allow(clippy::struct_field_names)]
3097#[derive(Default)]
3098pub struct ClearingSystemMemberIdentification2Builder {
3099    clr_sys_id:
3100        ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3101    mmb_id: ::std::option::Option<Max35Text>,
3102}
3103impl ClearingSystemMemberIdentification2Builder {
3104    /// Set the `clr_sys_id` field.
3105    #[must_use]
3106    pub fn clr_sys_id(
3107        mut self,
3108        value: crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>,
3109    ) -> ClearingSystemMemberIdentification2Builder {
3110        self.clr_sys_id = ::std::option::Option::Some(value);
3111        self
3112    }
3113    /// Set the `mmb_id` field.
3114    #[must_use]
3115    pub fn mmb_id(mut self, value: Max35Text) -> ClearingSystemMemberIdentification2Builder {
3116        self.mmb_id = ::std::option::Option::Some(value);
3117        self
3118    }
3119    /// Validate required fields and construct the type.
3120    ///
3121    /// # Errors
3122    ///
3123    /// Returns [`crate::common::BuilderError`] listing the names of any
3124    /// required fields that were not set.
3125    ///
3126    /// # Panics
3127    ///
3128    /// Does not panic — all `.unwrap()` calls are guarded by the
3129    /// missing-field check above.
3130    pub fn build(
3131        self,
3132    ) -> ::std::result::Result<ClearingSystemMemberIdentification2, crate::common::BuilderError>
3133    {
3134        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3135        if self.mmb_id.is_none() {
3136            missing.push("mmb_id".to_owned());
3137        }
3138        if !missing.is_empty() {
3139            return ::std::result::Result::Err(crate::common::BuilderError {
3140                type_name: "ClearingSystemMemberIdentification2".to_owned(),
3141                missing_fields: missing,
3142            });
3143        }
3144        ::std::result::Result::Ok(ClearingSystemMemberIdentification2 {
3145            clr_sys_id: self.clr_sys_id,
3146            mmb_id: self.mmb_id.unwrap(),
3147        })
3148    }
3149}
3150impl ClearingSystemMemberIdentification2 {
3151    /// Return a new builder for this type.
3152    #[must_use]
3153    pub fn builder() -> ClearingSystemMemberIdentification2Builder {
3154        ClearingSystemMemberIdentification2Builder::default()
3155    }
3156}
3157#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3158pub struct Contact4 {
3159    #[serde(rename = "NmPrfx")]
3160    #[serde(skip_serializing_if = "Option::is_none")]
3161    pub nm_prfx: Option<NamePrefix2Code>,
3162    #[serde(rename = "Nm")]
3163    #[serde(skip_serializing_if = "Option::is_none")]
3164    pub nm: Option<Max140Text>,
3165    #[serde(rename = "PhneNb")]
3166    #[serde(skip_serializing_if = "Option::is_none")]
3167    pub phne_nb: Option<PhoneNumber>,
3168    #[serde(rename = "MobNb")]
3169    #[serde(skip_serializing_if = "Option::is_none")]
3170    pub mob_nb: Option<PhoneNumber>,
3171    #[serde(rename = "FaxNb")]
3172    #[serde(skip_serializing_if = "Option::is_none")]
3173    pub fax_nb: Option<PhoneNumber>,
3174    #[serde(rename = "EmailAdr")]
3175    #[serde(skip_serializing_if = "Option::is_none")]
3176    pub email_adr: Option<Max2048Text>,
3177    #[serde(rename = "EmailPurp")]
3178    #[serde(skip_serializing_if = "Option::is_none")]
3179    pub email_purp: Option<Max35Text>,
3180    #[serde(rename = "JobTitl")]
3181    #[serde(skip_serializing_if = "Option::is_none")]
3182    pub job_titl: Option<Max35Text>,
3183    #[serde(rename = "Rspnsblty")]
3184    #[serde(skip_serializing_if = "Option::is_none")]
3185    pub rspnsblty: Option<Max35Text>,
3186    #[serde(rename = "Dept")]
3187    #[serde(skip_serializing_if = "Option::is_none")]
3188    pub dept: Option<Max70Text>,
3189    #[serde(rename = "Othr")]
3190    #[serde(default)]
3191    #[serde(skip_serializing_if = "Vec::is_empty")]
3192    pub othr: Vec<OtherContact1>,
3193    #[serde(rename = "PrefrdMtd")]
3194    #[serde(skip_serializing_if = "Option::is_none")]
3195    pub prefrd_mtd: Option<PreferredContactMethod1Code>,
3196}
3197/// Builder for [`Contact4`]. Construct via [`Contact4::builder()`].
3198#[allow(clippy::struct_field_names)]
3199#[derive(Default)]
3200pub struct Contact4Builder {
3201    nm_prfx: ::std::option::Option<NamePrefix2Code>,
3202    nm: ::std::option::Option<Max140Text>,
3203    phne_nb: ::std::option::Option<PhoneNumber>,
3204    mob_nb: ::std::option::Option<PhoneNumber>,
3205    fax_nb: ::std::option::Option<PhoneNumber>,
3206    email_adr: ::std::option::Option<Max2048Text>,
3207    email_purp: ::std::option::Option<Max35Text>,
3208    job_titl: ::std::option::Option<Max35Text>,
3209    rspnsblty: ::std::option::Option<Max35Text>,
3210    dept: ::std::option::Option<Max70Text>,
3211    othr: ::std::vec::Vec<OtherContact1>,
3212    prefrd_mtd: ::std::option::Option<PreferredContactMethod1Code>,
3213}
3214impl Contact4Builder {
3215    /// Set the `nm_prfx` field.
3216    #[must_use]
3217    pub fn nm_prfx(mut self, value: NamePrefix2Code) -> Contact4Builder {
3218        self.nm_prfx = ::std::option::Option::Some(value);
3219        self
3220    }
3221    /// Set the `nm` field.
3222    #[must_use]
3223    pub fn nm(mut self, value: Max140Text) -> Contact4Builder {
3224        self.nm = ::std::option::Option::Some(value);
3225        self
3226    }
3227    /// Set the `phne_nb` field.
3228    #[must_use]
3229    pub fn phne_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3230        self.phne_nb = ::std::option::Option::Some(value);
3231        self
3232    }
3233    /// Set the `mob_nb` field.
3234    #[must_use]
3235    pub fn mob_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3236        self.mob_nb = ::std::option::Option::Some(value);
3237        self
3238    }
3239    /// Set the `fax_nb` field.
3240    #[must_use]
3241    pub fn fax_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3242        self.fax_nb = ::std::option::Option::Some(value);
3243        self
3244    }
3245    /// Set the `email_adr` field.
3246    #[must_use]
3247    pub fn email_adr(mut self, value: Max2048Text) -> Contact4Builder {
3248        self.email_adr = ::std::option::Option::Some(value);
3249        self
3250    }
3251    /// Set the `email_purp` field.
3252    #[must_use]
3253    pub fn email_purp(mut self, value: Max35Text) -> Contact4Builder {
3254        self.email_purp = ::std::option::Option::Some(value);
3255        self
3256    }
3257    /// Set the `job_titl` field.
3258    #[must_use]
3259    pub fn job_titl(mut self, value: Max35Text) -> Contact4Builder {
3260        self.job_titl = ::std::option::Option::Some(value);
3261        self
3262    }
3263    /// Set the `rspnsblty` field.
3264    #[must_use]
3265    pub fn rspnsblty(mut self, value: Max35Text) -> Contact4Builder {
3266        self.rspnsblty = ::std::option::Option::Some(value);
3267        self
3268    }
3269    /// Set the `dept` field.
3270    #[must_use]
3271    pub fn dept(mut self, value: Max70Text) -> Contact4Builder {
3272        self.dept = ::std::option::Option::Some(value);
3273        self
3274    }
3275    /// Set the `othr` field (replaces any previously added items).
3276    #[must_use]
3277    pub fn othr(mut self, value: ::std::vec::Vec<OtherContact1>) -> Contact4Builder {
3278        self.othr = value;
3279        self
3280    }
3281    /// Append one item to the `othr` field.
3282    #[must_use]
3283    pub fn add_othr(mut self, value: OtherContact1) -> Contact4Builder {
3284        self.othr.push(value);
3285        self
3286    }
3287    /// Set the `prefrd_mtd` field.
3288    #[must_use]
3289    pub fn prefrd_mtd(mut self, value: PreferredContactMethod1Code) -> Contact4Builder {
3290        self.prefrd_mtd = ::std::option::Option::Some(value);
3291        self
3292    }
3293    /// Validate required fields and construct the type.
3294    ///
3295    /// # Errors
3296    ///
3297    /// Returns [`crate::common::BuilderError`] listing the names of any
3298    /// required fields that were not set.
3299    ///
3300    /// # Panics
3301    ///
3302    /// Does not panic — all `.unwrap()` calls are guarded by the
3303    /// missing-field check above.
3304    pub fn build(self) -> ::std::result::Result<Contact4, crate::common::BuilderError> {
3305        ::std::result::Result::Ok(Contact4 {
3306            nm_prfx: self.nm_prfx,
3307            nm: self.nm,
3308            phne_nb: self.phne_nb,
3309            mob_nb: self.mob_nb,
3310            fax_nb: self.fax_nb,
3311            email_adr: self.email_adr,
3312            email_purp: self.email_purp,
3313            job_titl: self.job_titl,
3314            rspnsblty: self.rspnsblty,
3315            dept: self.dept,
3316            othr: self.othr,
3317            prefrd_mtd: self.prefrd_mtd,
3318        })
3319    }
3320}
3321impl Contact4 {
3322    /// Return a new builder for this type.
3323    #[must_use]
3324    pub fn builder() -> Contact4Builder {
3325        Contact4Builder::default()
3326    }
3327}
3328#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3329pub struct CreditTransferTransaction52 {
3330    #[serde(rename = "UltmtDbtr")]
3331    #[serde(skip_serializing_if = "Option::is_none")]
3332    pub ultmt_dbtr: Option<PartyIdentification135>,
3333    #[serde(rename = "InitgPty")]
3334    #[serde(skip_serializing_if = "Option::is_none")]
3335    pub initg_pty: Option<PartyIdentification135>,
3336    #[serde(rename = "Dbtr")]
3337    pub dbtr: PartyIdentification135,
3338    #[serde(rename = "DbtrAcct")]
3339    #[serde(skip_serializing_if = "Option::is_none")]
3340    pub dbtr_acct: Option<CashAccount40>,
3341    #[serde(rename = "DbtrAgt")]
3342    pub dbtr_agt: BranchAndFinancialInstitutionIdentification6,
3343    #[serde(rename = "DbtrAgtAcct")]
3344    #[serde(skip_serializing_if = "Option::is_none")]
3345    pub dbtr_agt_acct: Option<CashAccount40>,
3346    #[serde(rename = "PrvsInstgAgt1")]
3347    #[serde(skip_serializing_if = "Option::is_none")]
3348    pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
3349    #[serde(rename = "PrvsInstgAgt1Acct")]
3350    #[serde(skip_serializing_if = "Option::is_none")]
3351    pub prvs_instg_agt1acct: Option<CashAccount40>,
3352    #[serde(rename = "PrvsInstgAgt2")]
3353    #[serde(skip_serializing_if = "Option::is_none")]
3354    pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
3355    #[serde(rename = "PrvsInstgAgt2Acct")]
3356    #[serde(skip_serializing_if = "Option::is_none")]
3357    pub prvs_instg_agt2acct: Option<CashAccount40>,
3358    #[serde(rename = "PrvsInstgAgt3")]
3359    #[serde(skip_serializing_if = "Option::is_none")]
3360    pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
3361    #[serde(rename = "PrvsInstgAgt3Acct")]
3362    #[serde(skip_serializing_if = "Option::is_none")]
3363    pub prvs_instg_agt3acct: Option<CashAccount40>,
3364    #[serde(rename = "IntrmyAgt1")]
3365    #[serde(skip_serializing_if = "Option::is_none")]
3366    pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
3367    #[serde(rename = "IntrmyAgt1Acct")]
3368    #[serde(skip_serializing_if = "Option::is_none")]
3369    pub intrmy_agt1acct: Option<CashAccount40>,
3370    #[serde(rename = "IntrmyAgt2")]
3371    #[serde(skip_serializing_if = "Option::is_none")]
3372    pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
3373    #[serde(rename = "IntrmyAgt2Acct")]
3374    #[serde(skip_serializing_if = "Option::is_none")]
3375    pub intrmy_agt2acct: Option<CashAccount40>,
3376    #[serde(rename = "IntrmyAgt3")]
3377    #[serde(skip_serializing_if = "Option::is_none")]
3378    pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
3379    #[serde(rename = "IntrmyAgt3Acct")]
3380    #[serde(skip_serializing_if = "Option::is_none")]
3381    pub intrmy_agt3acct: Option<CashAccount40>,
3382    #[serde(rename = "CdtrAgt")]
3383    pub cdtr_agt: BranchAndFinancialInstitutionIdentification6,
3384    #[serde(rename = "CdtrAgtAcct")]
3385    #[serde(skip_serializing_if = "Option::is_none")]
3386    pub cdtr_agt_acct: Option<CashAccount40>,
3387    #[serde(rename = "Cdtr")]
3388    pub cdtr: PartyIdentification135,
3389    #[serde(rename = "CdtrAcct")]
3390    #[serde(skip_serializing_if = "Option::is_none")]
3391    pub cdtr_acct: Option<CashAccount40>,
3392    #[serde(rename = "UltmtCdtr")]
3393    #[serde(skip_serializing_if = "Option::is_none")]
3394    pub ultmt_cdtr: Option<PartyIdentification135>,
3395    #[serde(rename = "InstrForCdtrAgt")]
3396    #[serde(default)]
3397    #[serde(skip_serializing_if = "Vec::is_empty")]
3398    pub instr_for_cdtr_agt: Vec<InstructionForCreditorAgent3>,
3399    #[serde(rename = "InstrForNxtAgt")]
3400    #[serde(default)]
3401    #[serde(skip_serializing_if = "Vec::is_empty")]
3402    pub instr_for_nxt_agt: Vec<InstructionForNextAgent1>,
3403    #[serde(rename = "Tax")]
3404    #[serde(skip_serializing_if = "Option::is_none")]
3405    pub tax: Option<TaxInformation10>,
3406    #[serde(rename = "RmtInf")]
3407    #[serde(skip_serializing_if = "Option::is_none")]
3408    pub rmt_inf: Option<RemittanceInformation21>,
3409    #[serde(rename = "InstdAmt")]
3410    #[serde(skip_serializing_if = "Option::is_none")]
3411    pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
3412}
3413/// Builder for [`CreditTransferTransaction52`]. Construct via [`CreditTransferTransaction52::builder()`].
3414#[allow(clippy::struct_field_names)]
3415#[derive(Default)]
3416pub struct CreditTransferTransaction52Builder {
3417    ultmt_dbtr: ::std::option::Option<PartyIdentification135>,
3418    initg_pty: ::std::option::Option<PartyIdentification135>,
3419    dbtr: ::std::option::Option<PartyIdentification135>,
3420    dbtr_acct: ::std::option::Option<CashAccount40>,
3421    dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3422    dbtr_agt_acct: ::std::option::Option<CashAccount40>,
3423    prvs_instg_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3424    prvs_instg_agt1acct: ::std::option::Option<CashAccount40>,
3425    prvs_instg_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3426    prvs_instg_agt2acct: ::std::option::Option<CashAccount40>,
3427    prvs_instg_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3428    prvs_instg_agt3acct: ::std::option::Option<CashAccount40>,
3429    intrmy_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3430    intrmy_agt1acct: ::std::option::Option<CashAccount40>,
3431    intrmy_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3432    intrmy_agt2acct: ::std::option::Option<CashAccount40>,
3433    intrmy_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3434    intrmy_agt3acct: ::std::option::Option<CashAccount40>,
3435    cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3436    cdtr_agt_acct: ::std::option::Option<CashAccount40>,
3437    cdtr: ::std::option::Option<PartyIdentification135>,
3438    cdtr_acct: ::std::option::Option<CashAccount40>,
3439    ultmt_cdtr: ::std::option::Option<PartyIdentification135>,
3440    instr_for_cdtr_agt: ::std::vec::Vec<InstructionForCreditorAgent3>,
3441    instr_for_nxt_agt: ::std::vec::Vec<InstructionForNextAgent1>,
3442    tax: ::std::option::Option<TaxInformation10>,
3443    rmt_inf: ::std::option::Option<RemittanceInformation21>,
3444    instd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
3445}
3446impl CreditTransferTransaction52Builder {
3447    /// Set the `ultmt_dbtr` field.
3448    #[must_use]
3449    pub fn ultmt_dbtr(
3450        mut self,
3451        value: PartyIdentification135,
3452    ) -> CreditTransferTransaction52Builder {
3453        self.ultmt_dbtr = ::std::option::Option::Some(value);
3454        self
3455    }
3456    /// Set the `initg_pty` field.
3457    #[must_use]
3458    pub fn initg_pty(
3459        mut self,
3460        value: PartyIdentification135,
3461    ) -> CreditTransferTransaction52Builder {
3462        self.initg_pty = ::std::option::Option::Some(value);
3463        self
3464    }
3465    /// Set the `dbtr` field.
3466    #[must_use]
3467    pub fn dbtr(mut self, value: PartyIdentification135) -> CreditTransferTransaction52Builder {
3468        self.dbtr = ::std::option::Option::Some(value);
3469        self
3470    }
3471    /// Set the `dbtr_acct` field.
3472    #[must_use]
3473    pub fn dbtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
3474        self.dbtr_acct = ::std::option::Option::Some(value);
3475        self
3476    }
3477    /// Set the `dbtr_agt` field.
3478    #[must_use]
3479    pub fn dbtr_agt(
3480        mut self,
3481        value: BranchAndFinancialInstitutionIdentification6,
3482    ) -> CreditTransferTransaction52Builder {
3483        self.dbtr_agt = ::std::option::Option::Some(value);
3484        self
3485    }
3486    /// Set the `dbtr_agt_acct` field.
3487    #[must_use]
3488    pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
3489        self.dbtr_agt_acct = ::std::option::Option::Some(value);
3490        self
3491    }
3492    /// Set the `prvs_instg_agt1` field.
3493    #[must_use]
3494    pub fn prvs_instg_agt1(
3495        mut self,
3496        value: BranchAndFinancialInstitutionIdentification6,
3497    ) -> CreditTransferTransaction52Builder {
3498        self.prvs_instg_agt1 = ::std::option::Option::Some(value);
3499        self
3500    }
3501    /// Set the `prvs_instg_agt1acct` field.
3502    #[must_use]
3503    pub fn prvs_instg_agt1acct(
3504        mut self,
3505        value: CashAccount40,
3506    ) -> CreditTransferTransaction52Builder {
3507        self.prvs_instg_agt1acct = ::std::option::Option::Some(value);
3508        self
3509    }
3510    /// Set the `prvs_instg_agt2` field.
3511    #[must_use]
3512    pub fn prvs_instg_agt2(
3513        mut self,
3514        value: BranchAndFinancialInstitutionIdentification6,
3515    ) -> CreditTransferTransaction52Builder {
3516        self.prvs_instg_agt2 = ::std::option::Option::Some(value);
3517        self
3518    }
3519    /// Set the `prvs_instg_agt2acct` field.
3520    #[must_use]
3521    pub fn prvs_instg_agt2acct(
3522        mut self,
3523        value: CashAccount40,
3524    ) -> CreditTransferTransaction52Builder {
3525        self.prvs_instg_agt2acct = ::std::option::Option::Some(value);
3526        self
3527    }
3528    /// Set the `prvs_instg_agt3` field.
3529    #[must_use]
3530    pub fn prvs_instg_agt3(
3531        mut self,
3532        value: BranchAndFinancialInstitutionIdentification6,
3533    ) -> CreditTransferTransaction52Builder {
3534        self.prvs_instg_agt3 = ::std::option::Option::Some(value);
3535        self
3536    }
3537    /// Set the `prvs_instg_agt3acct` field.
3538    #[must_use]
3539    pub fn prvs_instg_agt3acct(
3540        mut self,
3541        value: CashAccount40,
3542    ) -> CreditTransferTransaction52Builder {
3543        self.prvs_instg_agt3acct = ::std::option::Option::Some(value);
3544        self
3545    }
3546    /// Set the `intrmy_agt1` field.
3547    #[must_use]
3548    pub fn intrmy_agt1(
3549        mut self,
3550        value: BranchAndFinancialInstitutionIdentification6,
3551    ) -> CreditTransferTransaction52Builder {
3552        self.intrmy_agt1 = ::std::option::Option::Some(value);
3553        self
3554    }
3555    /// Set the `intrmy_agt1acct` field.
3556    #[must_use]
3557    pub fn intrmy_agt1acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
3558        self.intrmy_agt1acct = ::std::option::Option::Some(value);
3559        self
3560    }
3561    /// Set the `intrmy_agt2` field.
3562    #[must_use]
3563    pub fn intrmy_agt2(
3564        mut self,
3565        value: BranchAndFinancialInstitutionIdentification6,
3566    ) -> CreditTransferTransaction52Builder {
3567        self.intrmy_agt2 = ::std::option::Option::Some(value);
3568        self
3569    }
3570    /// Set the `intrmy_agt2acct` field.
3571    #[must_use]
3572    pub fn intrmy_agt2acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
3573        self.intrmy_agt2acct = ::std::option::Option::Some(value);
3574        self
3575    }
3576    /// Set the `intrmy_agt3` field.
3577    #[must_use]
3578    pub fn intrmy_agt3(
3579        mut self,
3580        value: BranchAndFinancialInstitutionIdentification6,
3581    ) -> CreditTransferTransaction52Builder {
3582        self.intrmy_agt3 = ::std::option::Option::Some(value);
3583        self
3584    }
3585    /// Set the `intrmy_agt3acct` field.
3586    #[must_use]
3587    pub fn intrmy_agt3acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
3588        self.intrmy_agt3acct = ::std::option::Option::Some(value);
3589        self
3590    }
3591    /// Set the `cdtr_agt` field.
3592    #[must_use]
3593    pub fn cdtr_agt(
3594        mut self,
3595        value: BranchAndFinancialInstitutionIdentification6,
3596    ) -> CreditTransferTransaction52Builder {
3597        self.cdtr_agt = ::std::option::Option::Some(value);
3598        self
3599    }
3600    /// Set the `cdtr_agt_acct` field.
3601    #[must_use]
3602    pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
3603        self.cdtr_agt_acct = ::std::option::Option::Some(value);
3604        self
3605    }
3606    /// Set the `cdtr` field.
3607    #[must_use]
3608    pub fn cdtr(mut self, value: PartyIdentification135) -> CreditTransferTransaction52Builder {
3609        self.cdtr = ::std::option::Option::Some(value);
3610        self
3611    }
3612    /// Set the `cdtr_acct` field.
3613    #[must_use]
3614    pub fn cdtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
3615        self.cdtr_acct = ::std::option::Option::Some(value);
3616        self
3617    }
3618    /// Set the `ultmt_cdtr` field.
3619    #[must_use]
3620    pub fn ultmt_cdtr(
3621        mut self,
3622        value: PartyIdentification135,
3623    ) -> CreditTransferTransaction52Builder {
3624        self.ultmt_cdtr = ::std::option::Option::Some(value);
3625        self
3626    }
3627    /// Set the `instr_for_cdtr_agt` field (replaces any previously added items).
3628    #[must_use]
3629    pub fn instr_for_cdtr_agt(
3630        mut self,
3631        value: ::std::vec::Vec<InstructionForCreditorAgent3>,
3632    ) -> CreditTransferTransaction52Builder {
3633        self.instr_for_cdtr_agt = value;
3634        self
3635    }
3636    /// Append one item to the `instr_for_cdtr_agt` field.
3637    #[must_use]
3638    pub fn add_instr_for_cdtr_agt(
3639        mut self,
3640        value: InstructionForCreditorAgent3,
3641    ) -> CreditTransferTransaction52Builder {
3642        self.instr_for_cdtr_agt.push(value);
3643        self
3644    }
3645    /// Set the `instr_for_nxt_agt` field (replaces any previously added items).
3646    #[must_use]
3647    pub fn instr_for_nxt_agt(
3648        mut self,
3649        value: ::std::vec::Vec<InstructionForNextAgent1>,
3650    ) -> CreditTransferTransaction52Builder {
3651        self.instr_for_nxt_agt = value;
3652        self
3653    }
3654    /// Append one item to the `instr_for_nxt_agt` field.
3655    #[must_use]
3656    pub fn add_instr_for_nxt_agt(
3657        mut self,
3658        value: InstructionForNextAgent1,
3659    ) -> CreditTransferTransaction52Builder {
3660        self.instr_for_nxt_agt.push(value);
3661        self
3662    }
3663    /// Set the `tax` field.
3664    #[must_use]
3665    pub fn tax(mut self, value: TaxInformation10) -> CreditTransferTransaction52Builder {
3666        self.tax = ::std::option::Option::Some(value);
3667        self
3668    }
3669    /// Set the `rmt_inf` field.
3670    #[must_use]
3671    pub fn rmt_inf(mut self, value: RemittanceInformation21) -> CreditTransferTransaction52Builder {
3672        self.rmt_inf = ::std::option::Option::Some(value);
3673        self
3674    }
3675    /// Set the `instd_amt` field.
3676    #[must_use]
3677    pub fn instd_amt(
3678        mut self,
3679        value: ActiveOrHistoricCurrencyAndAmount,
3680    ) -> CreditTransferTransaction52Builder {
3681        self.instd_amt = ::std::option::Option::Some(value);
3682        self
3683    }
3684    /// Validate required fields and construct the type.
3685    ///
3686    /// # Errors
3687    ///
3688    /// Returns [`crate::common::BuilderError`] listing the names of any
3689    /// required fields that were not set.
3690    ///
3691    /// # Panics
3692    ///
3693    /// Does not panic — all `.unwrap()` calls are guarded by the
3694    /// missing-field check above.
3695    pub fn build(
3696        self,
3697    ) -> ::std::result::Result<CreditTransferTransaction52, crate::common::BuilderError> {
3698        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3699        if self.dbtr.is_none() {
3700            missing.push("dbtr".to_owned());
3701        }
3702        if self.dbtr_agt.is_none() {
3703            missing.push("dbtr_agt".to_owned());
3704        }
3705        if self.cdtr_agt.is_none() {
3706            missing.push("cdtr_agt".to_owned());
3707        }
3708        if self.cdtr.is_none() {
3709            missing.push("cdtr".to_owned());
3710        }
3711        if !missing.is_empty() {
3712            return ::std::result::Result::Err(crate::common::BuilderError {
3713                type_name: "CreditTransferTransaction52".to_owned(),
3714                missing_fields: missing,
3715            });
3716        }
3717        ::std::result::Result::Ok(CreditTransferTransaction52 {
3718            ultmt_dbtr: self.ultmt_dbtr,
3719            initg_pty: self.initg_pty,
3720            dbtr: self.dbtr.unwrap(),
3721            dbtr_acct: self.dbtr_acct,
3722            dbtr_agt: self.dbtr_agt.unwrap(),
3723            dbtr_agt_acct: self.dbtr_agt_acct,
3724            prvs_instg_agt1: self.prvs_instg_agt1,
3725            prvs_instg_agt1acct: self.prvs_instg_agt1acct,
3726            prvs_instg_agt2: self.prvs_instg_agt2,
3727            prvs_instg_agt2acct: self.prvs_instg_agt2acct,
3728            prvs_instg_agt3: self.prvs_instg_agt3,
3729            prvs_instg_agt3acct: self.prvs_instg_agt3acct,
3730            intrmy_agt1: self.intrmy_agt1,
3731            intrmy_agt1acct: self.intrmy_agt1acct,
3732            intrmy_agt2: self.intrmy_agt2,
3733            intrmy_agt2acct: self.intrmy_agt2acct,
3734            intrmy_agt3: self.intrmy_agt3,
3735            intrmy_agt3acct: self.intrmy_agt3acct,
3736            cdtr_agt: self.cdtr_agt.unwrap(),
3737            cdtr_agt_acct: self.cdtr_agt_acct,
3738            cdtr: self.cdtr.unwrap(),
3739            cdtr_acct: self.cdtr_acct,
3740            ultmt_cdtr: self.ultmt_cdtr,
3741            instr_for_cdtr_agt: self.instr_for_cdtr_agt,
3742            instr_for_nxt_agt: self.instr_for_nxt_agt,
3743            tax: self.tax,
3744            rmt_inf: self.rmt_inf,
3745            instd_amt: self.instd_amt,
3746        })
3747    }
3748}
3749impl CreditTransferTransaction52 {
3750    /// Return a new builder for this type.
3751    #[must_use]
3752    pub fn builder() -> CreditTransferTransaction52Builder {
3753        CreditTransferTransaction52Builder::default()
3754    }
3755}
3756#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3757pub struct CreditTransferTransaction56 {
3758    #[serde(rename = "PmtId")]
3759    pub pmt_id: PaymentIdentification13,
3760    #[serde(rename = "PmtTpInf")]
3761    #[serde(skip_serializing_if = "Option::is_none")]
3762    pub pmt_tp_inf: Option<PaymentTypeInformation28>,
3763    #[serde(rename = "IntrBkSttlmAmt")]
3764    pub intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
3765    #[serde(rename = "IntrBkSttlmDt")]
3766    #[serde(skip_serializing_if = "Option::is_none")]
3767    pub intr_bk_sttlm_dt: Option<ISODate>,
3768    #[serde(rename = "SttlmPrty")]
3769    #[serde(skip_serializing_if = "Option::is_none")]
3770    pub sttlm_prty: Option<Priority3Code>,
3771    #[serde(rename = "SttlmTmIndctn")]
3772    #[serde(skip_serializing_if = "Option::is_none")]
3773    pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
3774    #[serde(rename = "SttlmTmReq")]
3775    #[serde(skip_serializing_if = "Option::is_none")]
3776    pub sttlm_tm_req: Option<SettlementTimeRequest2>,
3777    #[serde(rename = "PrvsInstgAgt1")]
3778    #[serde(skip_serializing_if = "Option::is_none")]
3779    pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
3780    #[serde(rename = "PrvsInstgAgt1Acct")]
3781    #[serde(skip_serializing_if = "Option::is_none")]
3782    pub prvs_instg_agt1acct: Option<CashAccount40>,
3783    #[serde(rename = "PrvsInstgAgt2")]
3784    #[serde(skip_serializing_if = "Option::is_none")]
3785    pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
3786    #[serde(rename = "PrvsInstgAgt2Acct")]
3787    #[serde(skip_serializing_if = "Option::is_none")]
3788    pub prvs_instg_agt2acct: Option<CashAccount40>,
3789    #[serde(rename = "PrvsInstgAgt3")]
3790    #[serde(skip_serializing_if = "Option::is_none")]
3791    pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
3792    #[serde(rename = "PrvsInstgAgt3Acct")]
3793    #[serde(skip_serializing_if = "Option::is_none")]
3794    pub prvs_instg_agt3acct: Option<CashAccount40>,
3795    #[serde(rename = "InstgAgt")]
3796    #[serde(skip_serializing_if = "Option::is_none")]
3797    pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
3798    #[serde(rename = "InstdAgt")]
3799    #[serde(skip_serializing_if = "Option::is_none")]
3800    pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
3801    #[serde(rename = "IntrmyAgt1")]
3802    #[serde(skip_serializing_if = "Option::is_none")]
3803    pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
3804    #[serde(rename = "IntrmyAgt1Acct")]
3805    #[serde(skip_serializing_if = "Option::is_none")]
3806    pub intrmy_agt1acct: Option<CashAccount40>,
3807    #[serde(rename = "IntrmyAgt2")]
3808    #[serde(skip_serializing_if = "Option::is_none")]
3809    pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
3810    #[serde(rename = "IntrmyAgt2Acct")]
3811    #[serde(skip_serializing_if = "Option::is_none")]
3812    pub intrmy_agt2acct: Option<CashAccount40>,
3813    #[serde(rename = "IntrmyAgt3")]
3814    #[serde(skip_serializing_if = "Option::is_none")]
3815    pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
3816    #[serde(rename = "IntrmyAgt3Acct")]
3817    #[serde(skip_serializing_if = "Option::is_none")]
3818    pub intrmy_agt3acct: Option<CashAccount40>,
3819    #[serde(rename = "UltmtDbtr")]
3820    #[serde(skip_serializing_if = "Option::is_none")]
3821    pub ultmt_dbtr: Option<BranchAndFinancialInstitutionIdentification6>,
3822    #[serde(rename = "Dbtr")]
3823    pub dbtr: BranchAndFinancialInstitutionIdentification6,
3824    #[serde(rename = "DbtrAcct")]
3825    #[serde(skip_serializing_if = "Option::is_none")]
3826    pub dbtr_acct: Option<CashAccount40>,
3827    #[serde(rename = "DbtrAgt")]
3828    #[serde(skip_serializing_if = "Option::is_none")]
3829    pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
3830    #[serde(rename = "DbtrAgtAcct")]
3831    #[serde(skip_serializing_if = "Option::is_none")]
3832    pub dbtr_agt_acct: Option<CashAccount40>,
3833    #[serde(rename = "CdtrAgt")]
3834    #[serde(skip_serializing_if = "Option::is_none")]
3835    pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
3836    #[serde(rename = "CdtrAgtAcct")]
3837    #[serde(skip_serializing_if = "Option::is_none")]
3838    pub cdtr_agt_acct: Option<CashAccount40>,
3839    #[serde(rename = "Cdtr")]
3840    pub cdtr: BranchAndFinancialInstitutionIdentification6,
3841    #[serde(rename = "CdtrAcct")]
3842    #[serde(skip_serializing_if = "Option::is_none")]
3843    pub cdtr_acct: Option<CashAccount40>,
3844    #[serde(rename = "UltmtCdtr")]
3845    #[serde(skip_serializing_if = "Option::is_none")]
3846    pub ultmt_cdtr: Option<BranchAndFinancialInstitutionIdentification6>,
3847    #[serde(rename = "InstrForCdtrAgt")]
3848    #[serde(default)]
3849    #[serde(skip_serializing_if = "Vec::is_empty")]
3850    pub instr_for_cdtr_agt: Vec<InstructionForCreditorAgent3>,
3851    #[serde(rename = "InstrForNxtAgt")]
3852    #[serde(default)]
3853    #[serde(skip_serializing_if = "Vec::is_empty")]
3854    pub instr_for_nxt_agt: Vec<InstructionForNextAgent1>,
3855    #[serde(rename = "Purp")]
3856    #[serde(skip_serializing_if = "Option::is_none")]
3857    pub purp: Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
3858    #[serde(rename = "RmtInf")]
3859    #[serde(skip_serializing_if = "Option::is_none")]
3860    pub rmt_inf: Option<RemittanceInformation2>,
3861    #[serde(rename = "UndrlygCstmrCdtTrf")]
3862    #[serde(skip_serializing_if = "Option::is_none")]
3863    pub undrlyg_cstmr_cdt_trf: Option<CreditTransferTransaction52>,
3864    #[serde(rename = "SplmtryData")]
3865    #[serde(default)]
3866    #[serde(skip_serializing_if = "Vec::is_empty")]
3867    pub splmtry_data: Vec<SupplementaryData1>,
3868}
3869/// Builder for [`CreditTransferTransaction56`]. Construct via [`CreditTransferTransaction56::builder()`].
3870#[allow(clippy::struct_field_names)]
3871#[derive(Default)]
3872pub struct CreditTransferTransaction56Builder {
3873    pmt_id: ::std::option::Option<PaymentIdentification13>,
3874    pmt_tp_inf: ::std::option::Option<PaymentTypeInformation28>,
3875    intr_bk_sttlm_amt: ::std::option::Option<ActiveCurrencyAndAmount>,
3876    intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
3877    sttlm_prty: ::std::option::Option<Priority3Code>,
3878    sttlm_tm_indctn: ::std::option::Option<SettlementDateTimeIndication1>,
3879    sttlm_tm_req: ::std::option::Option<SettlementTimeRequest2>,
3880    prvs_instg_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3881    prvs_instg_agt1acct: ::std::option::Option<CashAccount40>,
3882    prvs_instg_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3883    prvs_instg_agt2acct: ::std::option::Option<CashAccount40>,
3884    prvs_instg_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3885    prvs_instg_agt3acct: ::std::option::Option<CashAccount40>,
3886    instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3887    instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3888    intrmy_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3889    intrmy_agt1acct: ::std::option::Option<CashAccount40>,
3890    intrmy_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3891    intrmy_agt2acct: ::std::option::Option<CashAccount40>,
3892    intrmy_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3893    intrmy_agt3acct: ::std::option::Option<CashAccount40>,
3894    ultmt_dbtr: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3895    dbtr: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3896    dbtr_acct: ::std::option::Option<CashAccount40>,
3897    dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3898    dbtr_agt_acct: ::std::option::Option<CashAccount40>,
3899    cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3900    cdtr_agt_acct: ::std::option::Option<CashAccount40>,
3901    cdtr: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3902    cdtr_acct: ::std::option::Option<CashAccount40>,
3903    ultmt_cdtr: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3904    instr_for_cdtr_agt: ::std::vec::Vec<InstructionForCreditorAgent3>,
3905    instr_for_nxt_agt: ::std::vec::Vec<InstructionForNextAgent1>,
3906    purp: ::std::option::Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
3907    rmt_inf: ::std::option::Option<RemittanceInformation2>,
3908    undrlyg_cstmr_cdt_trf: ::std::option::Option<CreditTransferTransaction52>,
3909    splmtry_data: ::std::vec::Vec<SupplementaryData1>,
3910}
3911impl CreditTransferTransaction56Builder {
3912    /// Set the `pmt_id` field.
3913    #[must_use]
3914    pub fn pmt_id(mut self, value: PaymentIdentification13) -> CreditTransferTransaction56Builder {
3915        self.pmt_id = ::std::option::Option::Some(value);
3916        self
3917    }
3918    /// Set the `pmt_tp_inf` field.
3919    #[must_use]
3920    pub fn pmt_tp_inf(
3921        mut self,
3922        value: PaymentTypeInformation28,
3923    ) -> CreditTransferTransaction56Builder {
3924        self.pmt_tp_inf = ::std::option::Option::Some(value);
3925        self
3926    }
3927    /// Set the `intr_bk_sttlm_amt` field.
3928    #[must_use]
3929    pub fn intr_bk_sttlm_amt(
3930        mut self,
3931        value: ActiveCurrencyAndAmount,
3932    ) -> CreditTransferTransaction56Builder {
3933        self.intr_bk_sttlm_amt = ::std::option::Option::Some(value);
3934        self
3935    }
3936    /// Set the `intr_bk_sttlm_dt` field.
3937    #[must_use]
3938    pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> CreditTransferTransaction56Builder {
3939        self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
3940        self
3941    }
3942    /// Set the `sttlm_prty` field.
3943    #[must_use]
3944    pub fn sttlm_prty(mut self, value: Priority3Code) -> CreditTransferTransaction56Builder {
3945        self.sttlm_prty = ::std::option::Option::Some(value);
3946        self
3947    }
3948    /// Set the `sttlm_tm_indctn` field.
3949    #[must_use]
3950    pub fn sttlm_tm_indctn(
3951        mut self,
3952        value: SettlementDateTimeIndication1,
3953    ) -> CreditTransferTransaction56Builder {
3954        self.sttlm_tm_indctn = ::std::option::Option::Some(value);
3955        self
3956    }
3957    /// Set the `sttlm_tm_req` field.
3958    #[must_use]
3959    pub fn sttlm_tm_req(
3960        mut self,
3961        value: SettlementTimeRequest2,
3962    ) -> CreditTransferTransaction56Builder {
3963        self.sttlm_tm_req = ::std::option::Option::Some(value);
3964        self
3965    }
3966    /// Set the `prvs_instg_agt1` field.
3967    #[must_use]
3968    pub fn prvs_instg_agt1(
3969        mut self,
3970        value: BranchAndFinancialInstitutionIdentification6,
3971    ) -> CreditTransferTransaction56Builder {
3972        self.prvs_instg_agt1 = ::std::option::Option::Some(value);
3973        self
3974    }
3975    /// Set the `prvs_instg_agt1acct` field.
3976    #[must_use]
3977    pub fn prvs_instg_agt1acct(
3978        mut self,
3979        value: CashAccount40,
3980    ) -> CreditTransferTransaction56Builder {
3981        self.prvs_instg_agt1acct = ::std::option::Option::Some(value);
3982        self
3983    }
3984    /// Set the `prvs_instg_agt2` field.
3985    #[must_use]
3986    pub fn prvs_instg_agt2(
3987        mut self,
3988        value: BranchAndFinancialInstitutionIdentification6,
3989    ) -> CreditTransferTransaction56Builder {
3990        self.prvs_instg_agt2 = ::std::option::Option::Some(value);
3991        self
3992    }
3993    /// Set the `prvs_instg_agt2acct` field.
3994    #[must_use]
3995    pub fn prvs_instg_agt2acct(
3996        mut self,
3997        value: CashAccount40,
3998    ) -> CreditTransferTransaction56Builder {
3999        self.prvs_instg_agt2acct = ::std::option::Option::Some(value);
4000        self
4001    }
4002    /// Set the `prvs_instg_agt3` field.
4003    #[must_use]
4004    pub fn prvs_instg_agt3(
4005        mut self,
4006        value: BranchAndFinancialInstitutionIdentification6,
4007    ) -> CreditTransferTransaction56Builder {
4008        self.prvs_instg_agt3 = ::std::option::Option::Some(value);
4009        self
4010    }
4011    /// Set the `prvs_instg_agt3acct` field.
4012    #[must_use]
4013    pub fn prvs_instg_agt3acct(
4014        mut self,
4015        value: CashAccount40,
4016    ) -> CreditTransferTransaction56Builder {
4017        self.prvs_instg_agt3acct = ::std::option::Option::Some(value);
4018        self
4019    }
4020    /// Set the `instg_agt` field.
4021    #[must_use]
4022    pub fn instg_agt(
4023        mut self,
4024        value: BranchAndFinancialInstitutionIdentification6,
4025    ) -> CreditTransferTransaction56Builder {
4026        self.instg_agt = ::std::option::Option::Some(value);
4027        self
4028    }
4029    /// Set the `instd_agt` field.
4030    #[must_use]
4031    pub fn instd_agt(
4032        mut self,
4033        value: BranchAndFinancialInstitutionIdentification6,
4034    ) -> CreditTransferTransaction56Builder {
4035        self.instd_agt = ::std::option::Option::Some(value);
4036        self
4037    }
4038    /// Set the `intrmy_agt1` field.
4039    #[must_use]
4040    pub fn intrmy_agt1(
4041        mut self,
4042        value: BranchAndFinancialInstitutionIdentification6,
4043    ) -> CreditTransferTransaction56Builder {
4044        self.intrmy_agt1 = ::std::option::Option::Some(value);
4045        self
4046    }
4047    /// Set the `intrmy_agt1acct` field.
4048    #[must_use]
4049    pub fn intrmy_agt1acct(mut self, value: CashAccount40) -> CreditTransferTransaction56Builder {
4050        self.intrmy_agt1acct = ::std::option::Option::Some(value);
4051        self
4052    }
4053    /// Set the `intrmy_agt2` field.
4054    #[must_use]
4055    pub fn intrmy_agt2(
4056        mut self,
4057        value: BranchAndFinancialInstitutionIdentification6,
4058    ) -> CreditTransferTransaction56Builder {
4059        self.intrmy_agt2 = ::std::option::Option::Some(value);
4060        self
4061    }
4062    /// Set the `intrmy_agt2acct` field.
4063    #[must_use]
4064    pub fn intrmy_agt2acct(mut self, value: CashAccount40) -> CreditTransferTransaction56Builder {
4065        self.intrmy_agt2acct = ::std::option::Option::Some(value);
4066        self
4067    }
4068    /// Set the `intrmy_agt3` field.
4069    #[must_use]
4070    pub fn intrmy_agt3(
4071        mut self,
4072        value: BranchAndFinancialInstitutionIdentification6,
4073    ) -> CreditTransferTransaction56Builder {
4074        self.intrmy_agt3 = ::std::option::Option::Some(value);
4075        self
4076    }
4077    /// Set the `intrmy_agt3acct` field.
4078    #[must_use]
4079    pub fn intrmy_agt3acct(mut self, value: CashAccount40) -> CreditTransferTransaction56Builder {
4080        self.intrmy_agt3acct = ::std::option::Option::Some(value);
4081        self
4082    }
4083    /// Set the `ultmt_dbtr` field.
4084    #[must_use]
4085    pub fn ultmt_dbtr(
4086        mut self,
4087        value: BranchAndFinancialInstitutionIdentification6,
4088    ) -> CreditTransferTransaction56Builder {
4089        self.ultmt_dbtr = ::std::option::Option::Some(value);
4090        self
4091    }
4092    /// Set the `dbtr` field.
4093    #[must_use]
4094    pub fn dbtr(
4095        mut self,
4096        value: BranchAndFinancialInstitutionIdentification6,
4097    ) -> CreditTransferTransaction56Builder {
4098        self.dbtr = ::std::option::Option::Some(value);
4099        self
4100    }
4101    /// Set the `dbtr_acct` field.
4102    #[must_use]
4103    pub fn dbtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction56Builder {
4104        self.dbtr_acct = ::std::option::Option::Some(value);
4105        self
4106    }
4107    /// Set the `dbtr_agt` field.
4108    #[must_use]
4109    pub fn dbtr_agt(
4110        mut self,
4111        value: BranchAndFinancialInstitutionIdentification6,
4112    ) -> CreditTransferTransaction56Builder {
4113        self.dbtr_agt = ::std::option::Option::Some(value);
4114        self
4115    }
4116    /// Set the `dbtr_agt_acct` field.
4117    #[must_use]
4118    pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction56Builder {
4119        self.dbtr_agt_acct = ::std::option::Option::Some(value);
4120        self
4121    }
4122    /// Set the `cdtr_agt` field.
4123    #[must_use]
4124    pub fn cdtr_agt(
4125        mut self,
4126        value: BranchAndFinancialInstitutionIdentification6,
4127    ) -> CreditTransferTransaction56Builder {
4128        self.cdtr_agt = ::std::option::Option::Some(value);
4129        self
4130    }
4131    /// Set the `cdtr_agt_acct` field.
4132    #[must_use]
4133    pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction56Builder {
4134        self.cdtr_agt_acct = ::std::option::Option::Some(value);
4135        self
4136    }
4137    /// Set the `cdtr` field.
4138    #[must_use]
4139    pub fn cdtr(
4140        mut self,
4141        value: BranchAndFinancialInstitutionIdentification6,
4142    ) -> CreditTransferTransaction56Builder {
4143        self.cdtr = ::std::option::Option::Some(value);
4144        self
4145    }
4146    /// Set the `cdtr_acct` field.
4147    #[must_use]
4148    pub fn cdtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction56Builder {
4149        self.cdtr_acct = ::std::option::Option::Some(value);
4150        self
4151    }
4152    /// Set the `ultmt_cdtr` field.
4153    #[must_use]
4154    pub fn ultmt_cdtr(
4155        mut self,
4156        value: BranchAndFinancialInstitutionIdentification6,
4157    ) -> CreditTransferTransaction56Builder {
4158        self.ultmt_cdtr = ::std::option::Option::Some(value);
4159        self
4160    }
4161    /// Set the `instr_for_cdtr_agt` field (replaces any previously added items).
4162    #[must_use]
4163    pub fn instr_for_cdtr_agt(
4164        mut self,
4165        value: ::std::vec::Vec<InstructionForCreditorAgent3>,
4166    ) -> CreditTransferTransaction56Builder {
4167        self.instr_for_cdtr_agt = value;
4168        self
4169    }
4170    /// Append one item to the `instr_for_cdtr_agt` field.
4171    #[must_use]
4172    pub fn add_instr_for_cdtr_agt(
4173        mut self,
4174        value: InstructionForCreditorAgent3,
4175    ) -> CreditTransferTransaction56Builder {
4176        self.instr_for_cdtr_agt.push(value);
4177        self
4178    }
4179    /// Set the `instr_for_nxt_agt` field (replaces any previously added items).
4180    #[must_use]
4181    pub fn instr_for_nxt_agt(
4182        mut self,
4183        value: ::std::vec::Vec<InstructionForNextAgent1>,
4184    ) -> CreditTransferTransaction56Builder {
4185        self.instr_for_nxt_agt = value;
4186        self
4187    }
4188    /// Append one item to the `instr_for_nxt_agt` field.
4189    #[must_use]
4190    pub fn add_instr_for_nxt_agt(
4191        mut self,
4192        value: InstructionForNextAgent1,
4193    ) -> CreditTransferTransaction56Builder {
4194        self.instr_for_nxt_agt.push(value);
4195        self
4196    }
4197    /// Set the `purp` field.
4198    #[must_use]
4199    pub fn purp(
4200        mut self,
4201        value: crate::common::ChoiceWrapper<Purpose2Choice>,
4202    ) -> CreditTransferTransaction56Builder {
4203        self.purp = ::std::option::Option::Some(value);
4204        self
4205    }
4206    /// Set the `rmt_inf` field.
4207    #[must_use]
4208    pub fn rmt_inf(mut self, value: RemittanceInformation2) -> CreditTransferTransaction56Builder {
4209        self.rmt_inf = ::std::option::Option::Some(value);
4210        self
4211    }
4212    /// Set the `undrlyg_cstmr_cdt_trf` field.
4213    #[must_use]
4214    pub fn undrlyg_cstmr_cdt_trf(
4215        mut self,
4216        value: CreditTransferTransaction52,
4217    ) -> CreditTransferTransaction56Builder {
4218        self.undrlyg_cstmr_cdt_trf = ::std::option::Option::Some(value);
4219        self
4220    }
4221    /// Set the `splmtry_data` field (replaces any previously added items).
4222    #[must_use]
4223    pub fn splmtry_data(
4224        mut self,
4225        value: ::std::vec::Vec<SupplementaryData1>,
4226    ) -> CreditTransferTransaction56Builder {
4227        self.splmtry_data = value;
4228        self
4229    }
4230    /// Append one item to the `splmtry_data` field.
4231    #[must_use]
4232    pub fn add_splmtry_data(
4233        mut self,
4234        value: SupplementaryData1,
4235    ) -> CreditTransferTransaction56Builder {
4236        self.splmtry_data.push(value);
4237        self
4238    }
4239    /// Validate required fields and construct the type.
4240    ///
4241    /// # Errors
4242    ///
4243    /// Returns [`crate::common::BuilderError`] listing the names of any
4244    /// required fields that were not set.
4245    ///
4246    /// # Panics
4247    ///
4248    /// Does not panic — all `.unwrap()` calls are guarded by the
4249    /// missing-field check above.
4250    pub fn build(
4251        self,
4252    ) -> ::std::result::Result<CreditTransferTransaction56, crate::common::BuilderError> {
4253        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4254        if self.pmt_id.is_none() {
4255            missing.push("pmt_id".to_owned());
4256        }
4257        if self.intr_bk_sttlm_amt.is_none() {
4258            missing.push("intr_bk_sttlm_amt".to_owned());
4259        }
4260        if self.dbtr.is_none() {
4261            missing.push("dbtr".to_owned());
4262        }
4263        if self.cdtr.is_none() {
4264            missing.push("cdtr".to_owned());
4265        }
4266        if !missing.is_empty() {
4267            return ::std::result::Result::Err(crate::common::BuilderError {
4268                type_name: "CreditTransferTransaction56".to_owned(),
4269                missing_fields: missing,
4270            });
4271        }
4272        ::std::result::Result::Ok(CreditTransferTransaction56 {
4273            pmt_id: self.pmt_id.unwrap(),
4274            pmt_tp_inf: self.pmt_tp_inf,
4275            intr_bk_sttlm_amt: self.intr_bk_sttlm_amt.unwrap(),
4276            intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
4277            sttlm_prty: self.sttlm_prty,
4278            sttlm_tm_indctn: self.sttlm_tm_indctn,
4279            sttlm_tm_req: self.sttlm_tm_req,
4280            prvs_instg_agt1: self.prvs_instg_agt1,
4281            prvs_instg_agt1acct: self.prvs_instg_agt1acct,
4282            prvs_instg_agt2: self.prvs_instg_agt2,
4283            prvs_instg_agt2acct: self.prvs_instg_agt2acct,
4284            prvs_instg_agt3: self.prvs_instg_agt3,
4285            prvs_instg_agt3acct: self.prvs_instg_agt3acct,
4286            instg_agt: self.instg_agt,
4287            instd_agt: self.instd_agt,
4288            intrmy_agt1: self.intrmy_agt1,
4289            intrmy_agt1acct: self.intrmy_agt1acct,
4290            intrmy_agt2: self.intrmy_agt2,
4291            intrmy_agt2acct: self.intrmy_agt2acct,
4292            intrmy_agt3: self.intrmy_agt3,
4293            intrmy_agt3acct: self.intrmy_agt3acct,
4294            ultmt_dbtr: self.ultmt_dbtr,
4295            dbtr: self.dbtr.unwrap(),
4296            dbtr_acct: self.dbtr_acct,
4297            dbtr_agt: self.dbtr_agt,
4298            dbtr_agt_acct: self.dbtr_agt_acct,
4299            cdtr_agt: self.cdtr_agt,
4300            cdtr_agt_acct: self.cdtr_agt_acct,
4301            cdtr: self.cdtr.unwrap(),
4302            cdtr_acct: self.cdtr_acct,
4303            ultmt_cdtr: self.ultmt_cdtr,
4304            instr_for_cdtr_agt: self.instr_for_cdtr_agt,
4305            instr_for_nxt_agt: self.instr_for_nxt_agt,
4306            purp: self.purp,
4307            rmt_inf: self.rmt_inf,
4308            undrlyg_cstmr_cdt_trf: self.undrlyg_cstmr_cdt_trf,
4309            splmtry_data: self.splmtry_data,
4310        })
4311    }
4312}
4313impl CreditTransferTransaction56 {
4314    /// Return a new builder for this type.
4315    #[must_use]
4316    pub fn builder() -> CreditTransferTransaction56Builder {
4317        CreditTransferTransaction56Builder::default()
4318    }
4319}
4320#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4321pub struct CreditorReferenceInformation2 {
4322    #[serde(rename = "Tp")]
4323    #[serde(skip_serializing_if = "Option::is_none")]
4324    pub tp: Option<CreditorReferenceType2>,
4325    #[serde(rename = "Ref")]
4326    #[serde(skip_serializing_if = "Option::is_none")]
4327    pub r#ref: Option<Max35Text>,
4328}
4329/// Builder for [`CreditorReferenceInformation2`]. Construct via [`CreditorReferenceInformation2::builder()`].
4330#[allow(clippy::struct_field_names)]
4331#[derive(Default)]
4332pub struct CreditorReferenceInformation2Builder {
4333    tp: ::std::option::Option<CreditorReferenceType2>,
4334    r#ref: ::std::option::Option<Max35Text>,
4335}
4336impl CreditorReferenceInformation2Builder {
4337    /// Set the `tp` field.
4338    #[must_use]
4339    pub fn tp(mut self, value: CreditorReferenceType2) -> CreditorReferenceInformation2Builder {
4340        self.tp = ::std::option::Option::Some(value);
4341        self
4342    }
4343    /// Set the `ref` field.
4344    #[must_use]
4345    pub fn r#ref(mut self, value: Max35Text) -> CreditorReferenceInformation2Builder {
4346        self.r#ref = ::std::option::Option::Some(value);
4347        self
4348    }
4349    /// Validate required fields and construct the type.
4350    ///
4351    /// # Errors
4352    ///
4353    /// Returns [`crate::common::BuilderError`] listing the names of any
4354    /// required fields that were not set.
4355    ///
4356    /// # Panics
4357    ///
4358    /// Does not panic — all `.unwrap()` calls are guarded by the
4359    /// missing-field check above.
4360    pub fn build(
4361        self,
4362    ) -> ::std::result::Result<CreditorReferenceInformation2, crate::common::BuilderError> {
4363        ::std::result::Result::Ok(CreditorReferenceInformation2 {
4364            tp: self.tp,
4365            r#ref: self.r#ref,
4366        })
4367    }
4368}
4369impl CreditorReferenceInformation2 {
4370    /// Return a new builder for this type.
4371    #[must_use]
4372    pub fn builder() -> CreditorReferenceInformation2Builder {
4373        CreditorReferenceInformation2Builder::default()
4374    }
4375}
4376#[allow(clippy::large_enum_variant)]
4377#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4378pub enum CreditorReferenceType1Choice {
4379    #[serde(rename = "Cd")]
4380    Cd(DocumentType3Code),
4381    #[serde(rename = "Prtry")]
4382    Prtry(Max35Text),
4383}
4384#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4385pub struct CreditorReferenceType2 {
4386    #[serde(rename = "CdOrPrtry")]
4387    pub cd_or_prtry: crate::common::ChoiceWrapper<CreditorReferenceType1Choice>,
4388    #[serde(rename = "Issr")]
4389    #[serde(skip_serializing_if = "Option::is_none")]
4390    pub issr: Option<Max35Text>,
4391}
4392/// Builder for [`CreditorReferenceType2`]. Construct via [`CreditorReferenceType2::builder()`].
4393#[allow(clippy::struct_field_names)]
4394#[derive(Default)]
4395pub struct CreditorReferenceType2Builder {
4396    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<CreditorReferenceType1Choice>>,
4397    issr: ::std::option::Option<Max35Text>,
4398}
4399impl CreditorReferenceType2Builder {
4400    /// Set the `cd_or_prtry` field.
4401    #[must_use]
4402    pub fn cd_or_prtry(
4403        mut self,
4404        value: crate::common::ChoiceWrapper<CreditorReferenceType1Choice>,
4405    ) -> CreditorReferenceType2Builder {
4406        self.cd_or_prtry = ::std::option::Option::Some(value);
4407        self
4408    }
4409    /// Set the `issr` field.
4410    #[must_use]
4411    pub fn issr(mut self, value: Max35Text) -> CreditorReferenceType2Builder {
4412        self.issr = ::std::option::Option::Some(value);
4413        self
4414    }
4415    /// Validate required fields and construct the type.
4416    ///
4417    /// # Errors
4418    ///
4419    /// Returns [`crate::common::BuilderError`] listing the names of any
4420    /// required fields that were not set.
4421    ///
4422    /// # Panics
4423    ///
4424    /// Does not panic — all `.unwrap()` calls are guarded by the
4425    /// missing-field check above.
4426    pub fn build(
4427        self,
4428    ) -> ::std::result::Result<CreditorReferenceType2, crate::common::BuilderError> {
4429        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4430        if self.cd_or_prtry.is_none() {
4431            missing.push("cd_or_prtry".to_owned());
4432        }
4433        if !missing.is_empty() {
4434            return ::std::result::Result::Err(crate::common::BuilderError {
4435                type_name: "CreditorReferenceType2".to_owned(),
4436                missing_fields: missing,
4437            });
4438        }
4439        ::std::result::Result::Ok(CreditorReferenceType2 {
4440            cd_or_prtry: self.cd_or_prtry.unwrap(),
4441            issr: self.issr,
4442        })
4443    }
4444}
4445impl CreditorReferenceType2 {
4446    /// Return a new builder for this type.
4447    #[must_use]
4448    pub fn builder() -> CreditorReferenceType2Builder {
4449        CreditorReferenceType2Builder::default()
4450    }
4451}
4452#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4453pub struct DateAndPlaceOfBirth1 {
4454    #[serde(rename = "BirthDt")]
4455    pub birth_dt: ISODate,
4456    #[serde(rename = "PrvcOfBirth")]
4457    #[serde(skip_serializing_if = "Option::is_none")]
4458    pub prvc_of_birth: Option<Max35Text>,
4459    #[serde(rename = "CityOfBirth")]
4460    pub city_of_birth: Max35Text,
4461    #[serde(rename = "CtryOfBirth")]
4462    pub ctry_of_birth: CountryCode,
4463}
4464/// Builder for [`DateAndPlaceOfBirth1`]. Construct via [`DateAndPlaceOfBirth1::builder()`].
4465#[allow(clippy::struct_field_names)]
4466#[derive(Default)]
4467pub struct DateAndPlaceOfBirth1Builder {
4468    birth_dt: ::std::option::Option<ISODate>,
4469    prvc_of_birth: ::std::option::Option<Max35Text>,
4470    city_of_birth: ::std::option::Option<Max35Text>,
4471    ctry_of_birth: ::std::option::Option<CountryCode>,
4472}
4473impl DateAndPlaceOfBirth1Builder {
4474    /// Set the `birth_dt` field.
4475    #[must_use]
4476    pub fn birth_dt(mut self, value: ISODate) -> DateAndPlaceOfBirth1Builder {
4477        self.birth_dt = ::std::option::Option::Some(value);
4478        self
4479    }
4480    /// Set the `prvc_of_birth` field.
4481    #[must_use]
4482    pub fn prvc_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
4483        self.prvc_of_birth = ::std::option::Option::Some(value);
4484        self
4485    }
4486    /// Set the `city_of_birth` field.
4487    #[must_use]
4488    pub fn city_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
4489        self.city_of_birth = ::std::option::Option::Some(value);
4490        self
4491    }
4492    /// Set the `ctry_of_birth` field.
4493    #[must_use]
4494    pub fn ctry_of_birth(mut self, value: CountryCode) -> DateAndPlaceOfBirth1Builder {
4495        self.ctry_of_birth = ::std::option::Option::Some(value);
4496        self
4497    }
4498    /// Validate required fields and construct the type.
4499    ///
4500    /// # Errors
4501    ///
4502    /// Returns [`crate::common::BuilderError`] listing the names of any
4503    /// required fields that were not set.
4504    ///
4505    /// # Panics
4506    ///
4507    /// Does not panic — all `.unwrap()` calls are guarded by the
4508    /// missing-field check above.
4509    pub fn build(self) -> ::std::result::Result<DateAndPlaceOfBirth1, crate::common::BuilderError> {
4510        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4511        if self.birth_dt.is_none() {
4512            missing.push("birth_dt".to_owned());
4513        }
4514        if self.city_of_birth.is_none() {
4515            missing.push("city_of_birth".to_owned());
4516        }
4517        if self.ctry_of_birth.is_none() {
4518            missing.push("ctry_of_birth".to_owned());
4519        }
4520        if !missing.is_empty() {
4521            return ::std::result::Result::Err(crate::common::BuilderError {
4522                type_name: "DateAndPlaceOfBirth1".to_owned(),
4523                missing_fields: missing,
4524            });
4525        }
4526        ::std::result::Result::Ok(DateAndPlaceOfBirth1 {
4527            birth_dt: self.birth_dt.unwrap(),
4528            prvc_of_birth: self.prvc_of_birth,
4529            city_of_birth: self.city_of_birth.unwrap(),
4530            ctry_of_birth: self.ctry_of_birth.unwrap(),
4531        })
4532    }
4533}
4534impl DateAndPlaceOfBirth1 {
4535    /// Return a new builder for this type.
4536    #[must_use]
4537    pub fn builder() -> DateAndPlaceOfBirth1Builder {
4538        DateAndPlaceOfBirth1Builder::default()
4539    }
4540}
4541#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4542pub struct DatePeriod2 {
4543    #[serde(rename = "FrDt")]
4544    pub fr_dt: ISODate,
4545    #[serde(rename = "ToDt")]
4546    pub to_dt: ISODate,
4547}
4548/// Builder for [`DatePeriod2`]. Construct via [`DatePeriod2::builder()`].
4549#[allow(clippy::struct_field_names)]
4550#[derive(Default)]
4551pub struct DatePeriod2Builder {
4552    fr_dt: ::std::option::Option<ISODate>,
4553    to_dt: ::std::option::Option<ISODate>,
4554}
4555impl DatePeriod2Builder {
4556    /// Set the `fr_dt` field.
4557    #[must_use]
4558    pub fn fr_dt(mut self, value: ISODate) -> DatePeriod2Builder {
4559        self.fr_dt = ::std::option::Option::Some(value);
4560        self
4561    }
4562    /// Set the `to_dt` field.
4563    #[must_use]
4564    pub fn to_dt(mut self, value: ISODate) -> DatePeriod2Builder {
4565        self.to_dt = ::std::option::Option::Some(value);
4566        self
4567    }
4568    /// Validate required fields and construct the type.
4569    ///
4570    /// # Errors
4571    ///
4572    /// Returns [`crate::common::BuilderError`] listing the names of any
4573    /// required fields that were not set.
4574    ///
4575    /// # Panics
4576    ///
4577    /// Does not panic — all `.unwrap()` calls are guarded by the
4578    /// missing-field check above.
4579    pub fn build(self) -> ::std::result::Result<DatePeriod2, crate::common::BuilderError> {
4580        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4581        if self.fr_dt.is_none() {
4582            missing.push("fr_dt".to_owned());
4583        }
4584        if self.to_dt.is_none() {
4585            missing.push("to_dt".to_owned());
4586        }
4587        if !missing.is_empty() {
4588            return ::std::result::Result::Err(crate::common::BuilderError {
4589                type_name: "DatePeriod2".to_owned(),
4590                missing_fields: missing,
4591            });
4592        }
4593        ::std::result::Result::Ok(DatePeriod2 {
4594            fr_dt: self.fr_dt.unwrap(),
4595            to_dt: self.to_dt.unwrap(),
4596        })
4597    }
4598}
4599impl DatePeriod2 {
4600    /// Return a new builder for this type.
4601    #[must_use]
4602    pub fn builder() -> DatePeriod2Builder {
4603        DatePeriod2Builder::default()
4604    }
4605}
4606#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4607pub struct DiscountAmountAndType1 {
4608    #[serde(rename = "Tp")]
4609    #[serde(skip_serializing_if = "Option::is_none")]
4610    pub tp: Option<crate::common::ChoiceWrapper<DiscountAmountType1Choice>>,
4611    #[serde(rename = "Amt")]
4612    pub amt: ActiveOrHistoricCurrencyAndAmount,
4613}
4614/// Builder for [`DiscountAmountAndType1`]. Construct via [`DiscountAmountAndType1::builder()`].
4615#[allow(clippy::struct_field_names)]
4616#[derive(Default)]
4617pub struct DiscountAmountAndType1Builder {
4618    tp: ::std::option::Option<crate::common::ChoiceWrapper<DiscountAmountType1Choice>>,
4619    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4620}
4621impl DiscountAmountAndType1Builder {
4622    /// Set the `tp` field.
4623    #[must_use]
4624    pub fn tp(
4625        mut self,
4626        value: crate::common::ChoiceWrapper<DiscountAmountType1Choice>,
4627    ) -> DiscountAmountAndType1Builder {
4628        self.tp = ::std::option::Option::Some(value);
4629        self
4630    }
4631    /// Set the `amt` field.
4632    #[must_use]
4633    pub fn amt(
4634        mut self,
4635        value: ActiveOrHistoricCurrencyAndAmount,
4636    ) -> DiscountAmountAndType1Builder {
4637        self.amt = ::std::option::Option::Some(value);
4638        self
4639    }
4640    /// Validate required fields and construct the type.
4641    ///
4642    /// # Errors
4643    ///
4644    /// Returns [`crate::common::BuilderError`] listing the names of any
4645    /// required fields that were not set.
4646    ///
4647    /// # Panics
4648    ///
4649    /// Does not panic — all `.unwrap()` calls are guarded by the
4650    /// missing-field check above.
4651    pub fn build(
4652        self,
4653    ) -> ::std::result::Result<DiscountAmountAndType1, crate::common::BuilderError> {
4654        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4655        if self.amt.is_none() {
4656            missing.push("amt".to_owned());
4657        }
4658        if !missing.is_empty() {
4659            return ::std::result::Result::Err(crate::common::BuilderError {
4660                type_name: "DiscountAmountAndType1".to_owned(),
4661                missing_fields: missing,
4662            });
4663        }
4664        ::std::result::Result::Ok(DiscountAmountAndType1 {
4665            tp: self.tp,
4666            amt: self.amt.unwrap(),
4667        })
4668    }
4669}
4670impl DiscountAmountAndType1 {
4671    /// Return a new builder for this type.
4672    #[must_use]
4673    pub fn builder() -> DiscountAmountAndType1Builder {
4674        DiscountAmountAndType1Builder::default()
4675    }
4676}
4677#[allow(clippy::large_enum_variant)]
4678#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4679pub enum DiscountAmountType1Choice {
4680    #[serde(rename = "Cd")]
4681    Cd(ExternalDiscountAmountType1Code),
4682    #[serde(rename = "Prtry")]
4683    Prtry(Max35Text),
4684}
4685#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4686pub struct Document {
4687    #[serde(rename = "FICdtTrf")]
4688    pub fi_cdt_trf: FinancialInstitutionCreditTransferV10,
4689}
4690/// Builder for [`Document`]. Construct via [`Document::builder()`].
4691#[allow(clippy::struct_field_names)]
4692#[derive(Default)]
4693pub struct DocumentBuilder {
4694    fi_cdt_trf: ::std::option::Option<FinancialInstitutionCreditTransferV10>,
4695}
4696impl DocumentBuilder {
4697    /// Set the `fi_cdt_trf` field.
4698    #[must_use]
4699    pub fn fi_cdt_trf(mut self, value: FinancialInstitutionCreditTransferV10) -> DocumentBuilder {
4700        self.fi_cdt_trf = ::std::option::Option::Some(value);
4701        self
4702    }
4703    /// Validate required fields and construct the type.
4704    ///
4705    /// # Errors
4706    ///
4707    /// Returns [`crate::common::BuilderError`] listing the names of any
4708    /// required fields that were not set.
4709    ///
4710    /// # Panics
4711    ///
4712    /// Does not panic — all `.unwrap()` calls are guarded by the
4713    /// missing-field check above.
4714    pub fn build(self) -> ::std::result::Result<Document, crate::common::BuilderError> {
4715        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4716        if self.fi_cdt_trf.is_none() {
4717            missing.push("fi_cdt_trf".to_owned());
4718        }
4719        if !missing.is_empty() {
4720            return ::std::result::Result::Err(crate::common::BuilderError {
4721                type_name: "Document".to_owned(),
4722                missing_fields: missing,
4723            });
4724        }
4725        ::std::result::Result::Ok(Document {
4726            fi_cdt_trf: self.fi_cdt_trf.unwrap(),
4727        })
4728    }
4729}
4730impl Document {
4731    /// Return a new builder for this type.
4732    #[must_use]
4733    pub fn builder() -> DocumentBuilder {
4734        DocumentBuilder::default()
4735    }
4736}
4737#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4738pub struct DocumentAdjustment1 {
4739    #[serde(rename = "Amt")]
4740    pub amt: ActiveOrHistoricCurrencyAndAmount,
4741    #[serde(rename = "CdtDbtInd")]
4742    #[serde(skip_serializing_if = "Option::is_none")]
4743    pub cdt_dbt_ind: Option<CreditDebitCode>,
4744    #[serde(rename = "Rsn")]
4745    #[serde(skip_serializing_if = "Option::is_none")]
4746    pub rsn: Option<Max4Text>,
4747    #[serde(rename = "AddtlInf")]
4748    #[serde(skip_serializing_if = "Option::is_none")]
4749    pub addtl_inf: Option<Max140Text>,
4750}
4751/// Builder for [`DocumentAdjustment1`]. Construct via [`DocumentAdjustment1::builder()`].
4752#[allow(clippy::struct_field_names)]
4753#[derive(Default)]
4754pub struct DocumentAdjustment1Builder {
4755    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4756    cdt_dbt_ind: ::std::option::Option<CreditDebitCode>,
4757    rsn: ::std::option::Option<Max4Text>,
4758    addtl_inf: ::std::option::Option<Max140Text>,
4759}
4760impl DocumentAdjustment1Builder {
4761    /// Set the `amt` field.
4762    #[must_use]
4763    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> DocumentAdjustment1Builder {
4764        self.amt = ::std::option::Option::Some(value);
4765        self
4766    }
4767    /// Set the `cdt_dbt_ind` field.
4768    #[must_use]
4769    pub fn cdt_dbt_ind(mut self, value: CreditDebitCode) -> DocumentAdjustment1Builder {
4770        self.cdt_dbt_ind = ::std::option::Option::Some(value);
4771        self
4772    }
4773    /// Set the `rsn` field.
4774    #[must_use]
4775    pub fn rsn(mut self, value: Max4Text) -> DocumentAdjustment1Builder {
4776        self.rsn = ::std::option::Option::Some(value);
4777        self
4778    }
4779    /// Set the `addtl_inf` field.
4780    #[must_use]
4781    pub fn addtl_inf(mut self, value: Max140Text) -> DocumentAdjustment1Builder {
4782        self.addtl_inf = ::std::option::Option::Some(value);
4783        self
4784    }
4785    /// Validate required fields and construct the type.
4786    ///
4787    /// # Errors
4788    ///
4789    /// Returns [`crate::common::BuilderError`] listing the names of any
4790    /// required fields that were not set.
4791    ///
4792    /// # Panics
4793    ///
4794    /// Does not panic — all `.unwrap()` calls are guarded by the
4795    /// missing-field check above.
4796    pub fn build(self) -> ::std::result::Result<DocumentAdjustment1, crate::common::BuilderError> {
4797        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4798        if self.amt.is_none() {
4799            missing.push("amt".to_owned());
4800        }
4801        if !missing.is_empty() {
4802            return ::std::result::Result::Err(crate::common::BuilderError {
4803                type_name: "DocumentAdjustment1".to_owned(),
4804                missing_fields: missing,
4805            });
4806        }
4807        ::std::result::Result::Ok(DocumentAdjustment1 {
4808            amt: self.amt.unwrap(),
4809            cdt_dbt_ind: self.cdt_dbt_ind,
4810            rsn: self.rsn,
4811            addtl_inf: self.addtl_inf,
4812        })
4813    }
4814}
4815impl DocumentAdjustment1 {
4816    /// Return a new builder for this type.
4817    #[must_use]
4818    pub fn builder() -> DocumentAdjustment1Builder {
4819        DocumentAdjustment1Builder::default()
4820    }
4821}
4822#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4823pub struct DocumentLineIdentification1 {
4824    #[serde(rename = "Tp")]
4825    #[serde(skip_serializing_if = "Option::is_none")]
4826    pub tp: Option<DocumentLineType1>,
4827    #[serde(rename = "Nb")]
4828    #[serde(skip_serializing_if = "Option::is_none")]
4829    pub nb: Option<Max35Text>,
4830    #[serde(rename = "RltdDt")]
4831    #[serde(skip_serializing_if = "Option::is_none")]
4832    pub rltd_dt: Option<ISODate>,
4833}
4834/// Builder for [`DocumentLineIdentification1`]. Construct via [`DocumentLineIdentification1::builder()`].
4835#[allow(clippy::struct_field_names)]
4836#[derive(Default)]
4837pub struct DocumentLineIdentification1Builder {
4838    tp: ::std::option::Option<DocumentLineType1>,
4839    nb: ::std::option::Option<Max35Text>,
4840    rltd_dt: ::std::option::Option<ISODate>,
4841}
4842impl DocumentLineIdentification1Builder {
4843    /// Set the `tp` field.
4844    #[must_use]
4845    pub fn tp(mut self, value: DocumentLineType1) -> DocumentLineIdentification1Builder {
4846        self.tp = ::std::option::Option::Some(value);
4847        self
4848    }
4849    /// Set the `nb` field.
4850    #[must_use]
4851    pub fn nb(mut self, value: Max35Text) -> DocumentLineIdentification1Builder {
4852        self.nb = ::std::option::Option::Some(value);
4853        self
4854    }
4855    /// Set the `rltd_dt` field.
4856    #[must_use]
4857    pub fn rltd_dt(mut self, value: ISODate) -> DocumentLineIdentification1Builder {
4858        self.rltd_dt = ::std::option::Option::Some(value);
4859        self
4860    }
4861    /// Validate required fields and construct the type.
4862    ///
4863    /// # Errors
4864    ///
4865    /// Returns [`crate::common::BuilderError`] listing the names of any
4866    /// required fields that were not set.
4867    ///
4868    /// # Panics
4869    ///
4870    /// Does not panic — all `.unwrap()` calls are guarded by the
4871    /// missing-field check above.
4872    pub fn build(
4873        self,
4874    ) -> ::std::result::Result<DocumentLineIdentification1, crate::common::BuilderError> {
4875        ::std::result::Result::Ok(DocumentLineIdentification1 {
4876            tp: self.tp,
4877            nb: self.nb,
4878            rltd_dt: self.rltd_dt,
4879        })
4880    }
4881}
4882impl DocumentLineIdentification1 {
4883    /// Return a new builder for this type.
4884    #[must_use]
4885    pub fn builder() -> DocumentLineIdentification1Builder {
4886        DocumentLineIdentification1Builder::default()
4887    }
4888}
4889#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4890pub struct DocumentLineInformation1 {
4891    #[serde(rename = "Id")]
4892    #[serde(default)]
4893    #[serde(skip_serializing_if = "Vec::is_empty")]
4894    pub id: Vec<DocumentLineIdentification1>,
4895    #[serde(rename = "Desc")]
4896    #[serde(skip_serializing_if = "Option::is_none")]
4897    pub desc: Option<Max2048Text>,
4898    #[serde(rename = "Amt")]
4899    #[serde(skip_serializing_if = "Option::is_none")]
4900    pub amt: Option<RemittanceAmount3>,
4901}
4902/// Builder for [`DocumentLineInformation1`]. Construct via [`DocumentLineInformation1::builder()`].
4903#[allow(clippy::struct_field_names)]
4904#[derive(Default)]
4905pub struct DocumentLineInformation1Builder {
4906    id: ::std::vec::Vec<DocumentLineIdentification1>,
4907    desc: ::std::option::Option<Max2048Text>,
4908    amt: ::std::option::Option<RemittanceAmount3>,
4909}
4910impl DocumentLineInformation1Builder {
4911    /// Set the `id` field (replaces any previously added items).
4912    #[must_use]
4913    pub fn id(
4914        mut self,
4915        value: ::std::vec::Vec<DocumentLineIdentification1>,
4916    ) -> DocumentLineInformation1Builder {
4917        self.id = value;
4918        self
4919    }
4920    /// Append one item to the `id` field.
4921    #[must_use]
4922    pub fn add_id(mut self, value: DocumentLineIdentification1) -> DocumentLineInformation1Builder {
4923        self.id.push(value);
4924        self
4925    }
4926    /// Set the `desc` field.
4927    #[must_use]
4928    pub fn desc(mut self, value: Max2048Text) -> DocumentLineInformation1Builder {
4929        self.desc = ::std::option::Option::Some(value);
4930        self
4931    }
4932    /// Set the `amt` field.
4933    #[must_use]
4934    pub fn amt(mut self, value: RemittanceAmount3) -> DocumentLineInformation1Builder {
4935        self.amt = ::std::option::Option::Some(value);
4936        self
4937    }
4938    /// Validate required fields and construct the type.
4939    ///
4940    /// # Errors
4941    ///
4942    /// Returns [`crate::common::BuilderError`] listing the names of any
4943    /// required fields that were not set.
4944    ///
4945    /// # Panics
4946    ///
4947    /// Does not panic — all `.unwrap()` calls are guarded by the
4948    /// missing-field check above.
4949    pub fn build(
4950        self,
4951    ) -> ::std::result::Result<DocumentLineInformation1, crate::common::BuilderError> {
4952        ::std::result::Result::Ok(DocumentLineInformation1 {
4953            id: self.id,
4954            desc: self.desc,
4955            amt: self.amt,
4956        })
4957    }
4958}
4959impl DocumentLineInformation1 {
4960    /// Return a new builder for this type.
4961    #[must_use]
4962    pub fn builder() -> DocumentLineInformation1Builder {
4963        DocumentLineInformation1Builder::default()
4964    }
4965}
4966#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4967pub struct DocumentLineType1 {
4968    #[serde(rename = "CdOrPrtry")]
4969    pub cd_or_prtry: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
4970    #[serde(rename = "Issr")]
4971    #[serde(skip_serializing_if = "Option::is_none")]
4972    pub issr: Option<Max35Text>,
4973}
4974/// Builder for [`DocumentLineType1`]. Construct via [`DocumentLineType1::builder()`].
4975#[allow(clippy::struct_field_names)]
4976#[derive(Default)]
4977pub struct DocumentLineType1Builder {
4978    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<DocumentLineType1Choice>>,
4979    issr: ::std::option::Option<Max35Text>,
4980}
4981impl DocumentLineType1Builder {
4982    /// Set the `cd_or_prtry` field.
4983    #[must_use]
4984    pub fn cd_or_prtry(
4985        mut self,
4986        value: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
4987    ) -> DocumentLineType1Builder {
4988        self.cd_or_prtry = ::std::option::Option::Some(value);
4989        self
4990    }
4991    /// Set the `issr` field.
4992    #[must_use]
4993    pub fn issr(mut self, value: Max35Text) -> DocumentLineType1Builder {
4994        self.issr = ::std::option::Option::Some(value);
4995        self
4996    }
4997    /// Validate required fields and construct the type.
4998    ///
4999    /// # Errors
5000    ///
5001    /// Returns [`crate::common::BuilderError`] listing the names of any
5002    /// required fields that were not set.
5003    ///
5004    /// # Panics
5005    ///
5006    /// Does not panic — all `.unwrap()` calls are guarded by the
5007    /// missing-field check above.
5008    pub fn build(self) -> ::std::result::Result<DocumentLineType1, crate::common::BuilderError> {
5009        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5010        if self.cd_or_prtry.is_none() {
5011            missing.push("cd_or_prtry".to_owned());
5012        }
5013        if !missing.is_empty() {
5014            return ::std::result::Result::Err(crate::common::BuilderError {
5015                type_name: "DocumentLineType1".to_owned(),
5016                missing_fields: missing,
5017            });
5018        }
5019        ::std::result::Result::Ok(DocumentLineType1 {
5020            cd_or_prtry: self.cd_or_prtry.unwrap(),
5021            issr: self.issr,
5022        })
5023    }
5024}
5025impl DocumentLineType1 {
5026    /// Return a new builder for this type.
5027    #[must_use]
5028    pub fn builder() -> DocumentLineType1Builder {
5029        DocumentLineType1Builder::default()
5030    }
5031}
5032#[allow(clippy::large_enum_variant)]
5033#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5034pub enum DocumentLineType1Choice {
5035    #[serde(rename = "Cd")]
5036    Cd(ExternalDocumentLineType1Code),
5037    #[serde(rename = "Prtry")]
5038    Prtry(Max35Text),
5039}
5040#[allow(clippy::large_enum_variant)]
5041#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5042pub enum FinancialIdentificationSchemeName1Choice {
5043    #[serde(rename = "Cd")]
5044    Cd(ExternalFinancialInstitutionIdentification1Code),
5045    #[serde(rename = "Prtry")]
5046    Prtry(Max35Text),
5047}
5048#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5049pub struct FinancialInstitutionCreditTransferV10 {
5050    #[serde(rename = "GrpHdr")]
5051    pub grp_hdr: GroupHeader96,
5052    #[serde(rename = "CdtTrfTxInf")]
5053    #[serde(default)]
5054    #[serde(skip_serializing_if = "Vec::is_empty")]
5055    pub cdt_trf_tx_inf: Vec<CreditTransferTransaction56>,
5056    #[serde(rename = "SplmtryData")]
5057    #[serde(default)]
5058    #[serde(skip_serializing_if = "Vec::is_empty")]
5059    pub splmtry_data: Vec<SupplementaryData1>,
5060}
5061/// Builder for [`FinancialInstitutionCreditTransferV10`]. Construct via [`FinancialInstitutionCreditTransferV10::builder()`].
5062#[allow(clippy::struct_field_names)]
5063#[derive(Default)]
5064pub struct FinancialInstitutionCreditTransferV10Builder {
5065    grp_hdr: ::std::option::Option<GroupHeader96>,
5066    cdt_trf_tx_inf: ::std::vec::Vec<CreditTransferTransaction56>,
5067    splmtry_data: ::std::vec::Vec<SupplementaryData1>,
5068}
5069impl FinancialInstitutionCreditTransferV10Builder {
5070    /// Set the `grp_hdr` field.
5071    #[must_use]
5072    pub fn grp_hdr(mut self, value: GroupHeader96) -> FinancialInstitutionCreditTransferV10Builder {
5073        self.grp_hdr = ::std::option::Option::Some(value);
5074        self
5075    }
5076    /// Set the `cdt_trf_tx_inf` field (replaces any previously added items).
5077    #[must_use]
5078    pub fn cdt_trf_tx_inf(
5079        mut self,
5080        value: ::std::vec::Vec<CreditTransferTransaction56>,
5081    ) -> FinancialInstitutionCreditTransferV10Builder {
5082        self.cdt_trf_tx_inf = value;
5083        self
5084    }
5085    /// Append one item to the `cdt_trf_tx_inf` field.
5086    #[must_use]
5087    pub fn add_cdt_trf_tx_inf(
5088        mut self,
5089        value: CreditTransferTransaction56,
5090    ) -> FinancialInstitutionCreditTransferV10Builder {
5091        self.cdt_trf_tx_inf.push(value);
5092        self
5093    }
5094    /// Set the `splmtry_data` field (replaces any previously added items).
5095    #[must_use]
5096    pub fn splmtry_data(
5097        mut self,
5098        value: ::std::vec::Vec<SupplementaryData1>,
5099    ) -> FinancialInstitutionCreditTransferV10Builder {
5100        self.splmtry_data = value;
5101        self
5102    }
5103    /// Append one item to the `splmtry_data` field.
5104    #[must_use]
5105    pub fn add_splmtry_data(
5106        mut self,
5107        value: SupplementaryData1,
5108    ) -> FinancialInstitutionCreditTransferV10Builder {
5109        self.splmtry_data.push(value);
5110        self
5111    }
5112    /// Validate required fields and construct the type.
5113    ///
5114    /// # Errors
5115    ///
5116    /// Returns [`crate::common::BuilderError`] listing the names of any
5117    /// required fields that were not set.
5118    ///
5119    /// # Panics
5120    ///
5121    /// Does not panic — all `.unwrap()` calls are guarded by the
5122    /// missing-field check above.
5123    pub fn build(
5124        self,
5125    ) -> ::std::result::Result<FinancialInstitutionCreditTransferV10, crate::common::BuilderError>
5126    {
5127        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5128        if self.grp_hdr.is_none() {
5129            missing.push("grp_hdr".to_owned());
5130        }
5131        if !missing.is_empty() {
5132            return ::std::result::Result::Err(crate::common::BuilderError {
5133                type_name: "FinancialInstitutionCreditTransferV10".to_owned(),
5134                missing_fields: missing,
5135            });
5136        }
5137        ::std::result::Result::Ok(FinancialInstitutionCreditTransferV10 {
5138            grp_hdr: self.grp_hdr.unwrap(),
5139            cdt_trf_tx_inf: self.cdt_trf_tx_inf,
5140            splmtry_data: self.splmtry_data,
5141        })
5142    }
5143}
5144impl FinancialInstitutionCreditTransferV10 {
5145    /// Return a new builder for this type.
5146    #[must_use]
5147    pub fn builder() -> FinancialInstitutionCreditTransferV10Builder {
5148        FinancialInstitutionCreditTransferV10Builder::default()
5149    }
5150}
5151#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5152pub struct FinancialInstitutionIdentification18 {
5153    #[serde(rename = "BICFI")]
5154    #[serde(skip_serializing_if = "Option::is_none")]
5155    pub bicfi: Option<BICFIDec2014Identifier>,
5156    #[serde(rename = "ClrSysMmbId")]
5157    #[serde(skip_serializing_if = "Option::is_none")]
5158    pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
5159    #[serde(rename = "LEI")]
5160    #[serde(skip_serializing_if = "Option::is_none")]
5161    pub lei: Option<LEIIdentifier>,
5162    #[serde(rename = "Nm")]
5163    #[serde(skip_serializing_if = "Option::is_none")]
5164    pub nm: Option<Max140Text>,
5165    #[serde(rename = "PstlAdr")]
5166    #[serde(skip_serializing_if = "Option::is_none")]
5167    pub pstl_adr: Option<PostalAddress24>,
5168    #[serde(rename = "Othr")]
5169    #[serde(skip_serializing_if = "Option::is_none")]
5170    pub othr: Option<GenericFinancialIdentification1>,
5171}
5172/// Builder for [`FinancialInstitutionIdentification18`]. Construct via [`FinancialInstitutionIdentification18::builder()`].
5173#[allow(clippy::struct_field_names)]
5174#[derive(Default)]
5175pub struct FinancialInstitutionIdentification18Builder {
5176    bicfi: ::std::option::Option<BICFIDec2014Identifier>,
5177    clr_sys_mmb_id: ::std::option::Option<ClearingSystemMemberIdentification2>,
5178    lei: ::std::option::Option<LEIIdentifier>,
5179    nm: ::std::option::Option<Max140Text>,
5180    pstl_adr: ::std::option::Option<PostalAddress24>,
5181    othr: ::std::option::Option<GenericFinancialIdentification1>,
5182}
5183impl FinancialInstitutionIdentification18Builder {
5184    /// Set the `bicfi` field.
5185    #[must_use]
5186    pub fn bicfi(
5187        mut self,
5188        value: BICFIDec2014Identifier,
5189    ) -> FinancialInstitutionIdentification18Builder {
5190        self.bicfi = ::std::option::Option::Some(value);
5191        self
5192    }
5193    /// Set the `clr_sys_mmb_id` field.
5194    #[must_use]
5195    pub fn clr_sys_mmb_id(
5196        mut self,
5197        value: ClearingSystemMemberIdentification2,
5198    ) -> FinancialInstitutionIdentification18Builder {
5199        self.clr_sys_mmb_id = ::std::option::Option::Some(value);
5200        self
5201    }
5202    /// Set the `lei` field.
5203    #[must_use]
5204    pub fn lei(mut self, value: LEIIdentifier) -> FinancialInstitutionIdentification18Builder {
5205        self.lei = ::std::option::Option::Some(value);
5206        self
5207    }
5208    /// Set the `nm` field.
5209    #[must_use]
5210    pub fn nm(mut self, value: Max140Text) -> FinancialInstitutionIdentification18Builder {
5211        self.nm = ::std::option::Option::Some(value);
5212        self
5213    }
5214    /// Set the `pstl_adr` field.
5215    #[must_use]
5216    pub fn pstl_adr(
5217        mut self,
5218        value: PostalAddress24,
5219    ) -> FinancialInstitutionIdentification18Builder {
5220        self.pstl_adr = ::std::option::Option::Some(value);
5221        self
5222    }
5223    /// Set the `othr` field.
5224    #[must_use]
5225    pub fn othr(
5226        mut self,
5227        value: GenericFinancialIdentification1,
5228    ) -> FinancialInstitutionIdentification18Builder {
5229        self.othr = ::std::option::Option::Some(value);
5230        self
5231    }
5232    /// Validate required fields and construct the type.
5233    ///
5234    /// # Errors
5235    ///
5236    /// Returns [`crate::common::BuilderError`] listing the names of any
5237    /// required fields that were not set.
5238    ///
5239    /// # Panics
5240    ///
5241    /// Does not panic — all `.unwrap()` calls are guarded by the
5242    /// missing-field check above.
5243    pub fn build(
5244        self,
5245    ) -> ::std::result::Result<FinancialInstitutionIdentification18, crate::common::BuilderError>
5246    {
5247        ::std::result::Result::Ok(FinancialInstitutionIdentification18 {
5248            bicfi: self.bicfi,
5249            clr_sys_mmb_id: self.clr_sys_mmb_id,
5250            lei: self.lei,
5251            nm: self.nm,
5252            pstl_adr: self.pstl_adr,
5253            othr: self.othr,
5254        })
5255    }
5256}
5257impl FinancialInstitutionIdentification18 {
5258    /// Return a new builder for this type.
5259    #[must_use]
5260    pub fn builder() -> FinancialInstitutionIdentification18Builder {
5261        FinancialInstitutionIdentification18Builder::default()
5262    }
5263}
5264#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5265pub struct Garnishment3 {
5266    #[serde(rename = "Tp")]
5267    pub tp: GarnishmentType1,
5268    #[serde(rename = "Grnshee")]
5269    #[serde(skip_serializing_if = "Option::is_none")]
5270    pub grnshee: Option<PartyIdentification135>,
5271    #[serde(rename = "GrnshmtAdmstr")]
5272    #[serde(skip_serializing_if = "Option::is_none")]
5273    pub grnshmt_admstr: Option<PartyIdentification135>,
5274    #[serde(rename = "RefNb")]
5275    #[serde(skip_serializing_if = "Option::is_none")]
5276    pub ref_nb: Option<Max140Text>,
5277    #[serde(rename = "Dt")]
5278    #[serde(skip_serializing_if = "Option::is_none")]
5279    pub dt: Option<ISODate>,
5280    #[serde(rename = "RmtdAmt")]
5281    #[serde(skip_serializing_if = "Option::is_none")]
5282    pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
5283    #[serde(rename = "FmlyMdclInsrncInd")]
5284    #[serde(skip_serializing_if = "Option::is_none")]
5285    pub fmly_mdcl_insrnc_ind: Option<TrueFalseIndicator>,
5286    #[serde(rename = "MplyeeTermntnInd")]
5287    #[serde(skip_serializing_if = "Option::is_none")]
5288    pub mplyee_termntn_ind: Option<TrueFalseIndicator>,
5289}
5290/// Builder for [`Garnishment3`]. Construct via [`Garnishment3::builder()`].
5291#[allow(clippy::struct_field_names)]
5292#[derive(Default)]
5293pub struct Garnishment3Builder {
5294    tp: ::std::option::Option<GarnishmentType1>,
5295    grnshee: ::std::option::Option<PartyIdentification135>,
5296    grnshmt_admstr: ::std::option::Option<PartyIdentification135>,
5297    ref_nb: ::std::option::Option<Max140Text>,
5298    dt: ::std::option::Option<ISODate>,
5299    rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5300    fmly_mdcl_insrnc_ind: ::std::option::Option<TrueFalseIndicator>,
5301    mplyee_termntn_ind: ::std::option::Option<TrueFalseIndicator>,
5302}
5303impl Garnishment3Builder {
5304    /// Set the `tp` field.
5305    #[must_use]
5306    pub fn tp(mut self, value: GarnishmentType1) -> Garnishment3Builder {
5307        self.tp = ::std::option::Option::Some(value);
5308        self
5309    }
5310    /// Set the `grnshee` field.
5311    #[must_use]
5312    pub fn grnshee(mut self, value: PartyIdentification135) -> Garnishment3Builder {
5313        self.grnshee = ::std::option::Option::Some(value);
5314        self
5315    }
5316    /// Set the `grnshmt_admstr` field.
5317    #[must_use]
5318    pub fn grnshmt_admstr(mut self, value: PartyIdentification135) -> Garnishment3Builder {
5319        self.grnshmt_admstr = ::std::option::Option::Some(value);
5320        self
5321    }
5322    /// Set the `ref_nb` field.
5323    #[must_use]
5324    pub fn ref_nb(mut self, value: Max140Text) -> Garnishment3Builder {
5325        self.ref_nb = ::std::option::Option::Some(value);
5326        self
5327    }
5328    /// Set the `dt` field.
5329    #[must_use]
5330    pub fn dt(mut self, value: ISODate) -> Garnishment3Builder {
5331        self.dt = ::std::option::Option::Some(value);
5332        self
5333    }
5334    /// Set the `rmtd_amt` field.
5335    #[must_use]
5336    pub fn rmtd_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Garnishment3Builder {
5337        self.rmtd_amt = ::std::option::Option::Some(value);
5338        self
5339    }
5340    /// Set the `fmly_mdcl_insrnc_ind` field.
5341    #[must_use]
5342    pub fn fmly_mdcl_insrnc_ind(mut self, value: TrueFalseIndicator) -> Garnishment3Builder {
5343        self.fmly_mdcl_insrnc_ind = ::std::option::Option::Some(value);
5344        self
5345    }
5346    /// Set the `mplyee_termntn_ind` field.
5347    #[must_use]
5348    pub fn mplyee_termntn_ind(mut self, value: TrueFalseIndicator) -> Garnishment3Builder {
5349        self.mplyee_termntn_ind = ::std::option::Option::Some(value);
5350        self
5351    }
5352    /// Validate required fields and construct the type.
5353    ///
5354    /// # Errors
5355    ///
5356    /// Returns [`crate::common::BuilderError`] listing the names of any
5357    /// required fields that were not set.
5358    ///
5359    /// # Panics
5360    ///
5361    /// Does not panic — all `.unwrap()` calls are guarded by the
5362    /// missing-field check above.
5363    pub fn build(self) -> ::std::result::Result<Garnishment3, crate::common::BuilderError> {
5364        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5365        if self.tp.is_none() {
5366            missing.push("tp".to_owned());
5367        }
5368        if !missing.is_empty() {
5369            return ::std::result::Result::Err(crate::common::BuilderError {
5370                type_name: "Garnishment3".to_owned(),
5371                missing_fields: missing,
5372            });
5373        }
5374        ::std::result::Result::Ok(Garnishment3 {
5375            tp: self.tp.unwrap(),
5376            grnshee: self.grnshee,
5377            grnshmt_admstr: self.grnshmt_admstr,
5378            ref_nb: self.ref_nb,
5379            dt: self.dt,
5380            rmtd_amt: self.rmtd_amt,
5381            fmly_mdcl_insrnc_ind: self.fmly_mdcl_insrnc_ind,
5382            mplyee_termntn_ind: self.mplyee_termntn_ind,
5383        })
5384    }
5385}
5386impl Garnishment3 {
5387    /// Return a new builder for this type.
5388    #[must_use]
5389    pub fn builder() -> Garnishment3Builder {
5390        Garnishment3Builder::default()
5391    }
5392}
5393#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5394pub struct GarnishmentType1 {
5395    #[serde(rename = "CdOrPrtry")]
5396    pub cd_or_prtry: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5397    #[serde(rename = "Issr")]
5398    #[serde(skip_serializing_if = "Option::is_none")]
5399    pub issr: Option<Max35Text>,
5400}
5401/// Builder for [`GarnishmentType1`]. Construct via [`GarnishmentType1::builder()`].
5402#[allow(clippy::struct_field_names)]
5403#[derive(Default)]
5404pub struct GarnishmentType1Builder {
5405    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<GarnishmentType1Choice>>,
5406    issr: ::std::option::Option<Max35Text>,
5407}
5408impl GarnishmentType1Builder {
5409    /// Set the `cd_or_prtry` field.
5410    #[must_use]
5411    pub fn cd_or_prtry(
5412        mut self,
5413        value: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5414    ) -> GarnishmentType1Builder {
5415        self.cd_or_prtry = ::std::option::Option::Some(value);
5416        self
5417    }
5418    /// Set the `issr` field.
5419    #[must_use]
5420    pub fn issr(mut self, value: Max35Text) -> GarnishmentType1Builder {
5421        self.issr = ::std::option::Option::Some(value);
5422        self
5423    }
5424    /// Validate required fields and construct the type.
5425    ///
5426    /// # Errors
5427    ///
5428    /// Returns [`crate::common::BuilderError`] listing the names of any
5429    /// required fields that were not set.
5430    ///
5431    /// # Panics
5432    ///
5433    /// Does not panic — all `.unwrap()` calls are guarded by the
5434    /// missing-field check above.
5435    pub fn build(self) -> ::std::result::Result<GarnishmentType1, crate::common::BuilderError> {
5436        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5437        if self.cd_or_prtry.is_none() {
5438            missing.push("cd_or_prtry".to_owned());
5439        }
5440        if !missing.is_empty() {
5441            return ::std::result::Result::Err(crate::common::BuilderError {
5442                type_name: "GarnishmentType1".to_owned(),
5443                missing_fields: missing,
5444            });
5445        }
5446        ::std::result::Result::Ok(GarnishmentType1 {
5447            cd_or_prtry: self.cd_or_prtry.unwrap(),
5448            issr: self.issr,
5449        })
5450    }
5451}
5452impl GarnishmentType1 {
5453    /// Return a new builder for this type.
5454    #[must_use]
5455    pub fn builder() -> GarnishmentType1Builder {
5456        GarnishmentType1Builder::default()
5457    }
5458}
5459#[allow(clippy::large_enum_variant)]
5460#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5461pub enum GarnishmentType1Choice {
5462    #[serde(rename = "Cd")]
5463    Cd(ExternalGarnishmentType1Code),
5464    #[serde(rename = "Prtry")]
5465    Prtry(Max35Text),
5466}
5467#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5468pub struct GenericAccountIdentification1 {
5469    #[serde(rename = "Id")]
5470    pub id: Max34Text,
5471    #[serde(rename = "SchmeNm")]
5472    #[serde(skip_serializing_if = "Option::is_none")]
5473    pub schme_nm: Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5474    #[serde(rename = "Issr")]
5475    #[serde(skip_serializing_if = "Option::is_none")]
5476    pub issr: Option<Max35Text>,
5477}
5478/// Builder for [`GenericAccountIdentification1`]. Construct via [`GenericAccountIdentification1::builder()`].
5479#[allow(clippy::struct_field_names)]
5480#[derive(Default)]
5481pub struct GenericAccountIdentification1Builder {
5482    id: ::std::option::Option<Max34Text>,
5483    schme_nm: ::std::option::Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5484    issr: ::std::option::Option<Max35Text>,
5485}
5486impl GenericAccountIdentification1Builder {
5487    /// Set the `id` field.
5488    #[must_use]
5489    pub fn id(mut self, value: Max34Text) -> GenericAccountIdentification1Builder {
5490        self.id = ::std::option::Option::Some(value);
5491        self
5492    }
5493    /// Set the `schme_nm` field.
5494    #[must_use]
5495    pub fn schme_nm(
5496        mut self,
5497        value: crate::common::ChoiceWrapper<AccountSchemeName1Choice>,
5498    ) -> GenericAccountIdentification1Builder {
5499        self.schme_nm = ::std::option::Option::Some(value);
5500        self
5501    }
5502    /// Set the `issr` field.
5503    #[must_use]
5504    pub fn issr(mut self, value: Max35Text) -> GenericAccountIdentification1Builder {
5505        self.issr = ::std::option::Option::Some(value);
5506        self
5507    }
5508    /// Validate required fields and construct the type.
5509    ///
5510    /// # Errors
5511    ///
5512    /// Returns [`crate::common::BuilderError`] listing the names of any
5513    /// required fields that were not set.
5514    ///
5515    /// # Panics
5516    ///
5517    /// Does not panic — all `.unwrap()` calls are guarded by the
5518    /// missing-field check above.
5519    pub fn build(
5520        self,
5521    ) -> ::std::result::Result<GenericAccountIdentification1, crate::common::BuilderError> {
5522        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5523        if self.id.is_none() {
5524            missing.push("id".to_owned());
5525        }
5526        if !missing.is_empty() {
5527            return ::std::result::Result::Err(crate::common::BuilderError {
5528                type_name: "GenericAccountIdentification1".to_owned(),
5529                missing_fields: missing,
5530            });
5531        }
5532        ::std::result::Result::Ok(GenericAccountIdentification1 {
5533            id: self.id.unwrap(),
5534            schme_nm: self.schme_nm,
5535            issr: self.issr,
5536        })
5537    }
5538}
5539impl GenericAccountIdentification1 {
5540    /// Return a new builder for this type.
5541    #[must_use]
5542    pub fn builder() -> GenericAccountIdentification1Builder {
5543        GenericAccountIdentification1Builder::default()
5544    }
5545}
5546#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5547pub struct GenericFinancialIdentification1 {
5548    #[serde(rename = "Id")]
5549    pub id: Max35Text,
5550    #[serde(rename = "SchmeNm")]
5551    #[serde(skip_serializing_if = "Option::is_none")]
5552    pub schme_nm: Option<crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>>,
5553    #[serde(rename = "Issr")]
5554    #[serde(skip_serializing_if = "Option::is_none")]
5555    pub issr: Option<Max35Text>,
5556}
5557/// Builder for [`GenericFinancialIdentification1`]. Construct via [`GenericFinancialIdentification1::builder()`].
5558#[allow(clippy::struct_field_names)]
5559#[derive(Default)]
5560pub struct GenericFinancialIdentification1Builder {
5561    id: ::std::option::Option<Max35Text>,
5562    schme_nm: ::std::option::Option<
5563        crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5564    >,
5565    issr: ::std::option::Option<Max35Text>,
5566}
5567impl GenericFinancialIdentification1Builder {
5568    /// Set the `id` field.
5569    #[must_use]
5570    pub fn id(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5571        self.id = ::std::option::Option::Some(value);
5572        self
5573    }
5574    /// Set the `schme_nm` field.
5575    #[must_use]
5576    pub fn schme_nm(
5577        mut self,
5578        value: crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5579    ) -> GenericFinancialIdentification1Builder {
5580        self.schme_nm = ::std::option::Option::Some(value);
5581        self
5582    }
5583    /// Set the `issr` field.
5584    #[must_use]
5585    pub fn issr(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5586        self.issr = ::std::option::Option::Some(value);
5587        self
5588    }
5589    /// Validate required fields and construct the type.
5590    ///
5591    /// # Errors
5592    ///
5593    /// Returns [`crate::common::BuilderError`] listing the names of any
5594    /// required fields that were not set.
5595    ///
5596    /// # Panics
5597    ///
5598    /// Does not panic — all `.unwrap()` calls are guarded by the
5599    /// missing-field check above.
5600    pub fn build(
5601        self,
5602    ) -> ::std::result::Result<GenericFinancialIdentification1, crate::common::BuilderError> {
5603        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5604        if self.id.is_none() {
5605            missing.push("id".to_owned());
5606        }
5607        if !missing.is_empty() {
5608            return ::std::result::Result::Err(crate::common::BuilderError {
5609                type_name: "GenericFinancialIdentification1".to_owned(),
5610                missing_fields: missing,
5611            });
5612        }
5613        ::std::result::Result::Ok(GenericFinancialIdentification1 {
5614            id: self.id.unwrap(),
5615            schme_nm: self.schme_nm,
5616            issr: self.issr,
5617        })
5618    }
5619}
5620impl GenericFinancialIdentification1 {
5621    /// Return a new builder for this type.
5622    #[must_use]
5623    pub fn builder() -> GenericFinancialIdentification1Builder {
5624        GenericFinancialIdentification1Builder::default()
5625    }
5626}
5627#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5628pub struct GenericIdentification30 {
5629    #[serde(rename = "Id")]
5630    pub id: Exact4AlphaNumericText,
5631    #[serde(rename = "Issr")]
5632    pub issr: Max35Text,
5633    #[serde(rename = "SchmeNm")]
5634    #[serde(skip_serializing_if = "Option::is_none")]
5635    pub schme_nm: Option<Max35Text>,
5636}
5637/// Builder for [`GenericIdentification30`]. Construct via [`GenericIdentification30::builder()`].
5638#[allow(clippy::struct_field_names)]
5639#[derive(Default)]
5640pub struct GenericIdentification30Builder {
5641    id: ::std::option::Option<Exact4AlphaNumericText>,
5642    issr: ::std::option::Option<Max35Text>,
5643    schme_nm: ::std::option::Option<Max35Text>,
5644}
5645impl GenericIdentification30Builder {
5646    /// Set the `id` field.
5647    #[must_use]
5648    pub fn id(mut self, value: Exact4AlphaNumericText) -> GenericIdentification30Builder {
5649        self.id = ::std::option::Option::Some(value);
5650        self
5651    }
5652    /// Set the `issr` field.
5653    #[must_use]
5654    pub fn issr(mut self, value: Max35Text) -> GenericIdentification30Builder {
5655        self.issr = ::std::option::Option::Some(value);
5656        self
5657    }
5658    /// Set the `schme_nm` field.
5659    #[must_use]
5660    pub fn schme_nm(mut self, value: Max35Text) -> GenericIdentification30Builder {
5661        self.schme_nm = ::std::option::Option::Some(value);
5662        self
5663    }
5664    /// Validate required fields and construct the type.
5665    ///
5666    /// # Errors
5667    ///
5668    /// Returns [`crate::common::BuilderError`] listing the names of any
5669    /// required fields that were not set.
5670    ///
5671    /// # Panics
5672    ///
5673    /// Does not panic — all `.unwrap()` calls are guarded by the
5674    /// missing-field check above.
5675    pub fn build(
5676        self,
5677    ) -> ::std::result::Result<GenericIdentification30, crate::common::BuilderError> {
5678        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5679        if self.id.is_none() {
5680            missing.push("id".to_owned());
5681        }
5682        if self.issr.is_none() {
5683            missing.push("issr".to_owned());
5684        }
5685        if !missing.is_empty() {
5686            return ::std::result::Result::Err(crate::common::BuilderError {
5687                type_name: "GenericIdentification30".to_owned(),
5688                missing_fields: missing,
5689            });
5690        }
5691        ::std::result::Result::Ok(GenericIdentification30 {
5692            id: self.id.unwrap(),
5693            issr: self.issr.unwrap(),
5694            schme_nm: self.schme_nm,
5695        })
5696    }
5697}
5698impl GenericIdentification30 {
5699    /// Return a new builder for this type.
5700    #[must_use]
5701    pub fn builder() -> GenericIdentification30Builder {
5702        GenericIdentification30Builder::default()
5703    }
5704}
5705#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5706pub struct GenericOrganisationIdentification1 {
5707    #[serde(rename = "Id")]
5708    pub id: Max35Text,
5709    #[serde(rename = "SchmeNm")]
5710    #[serde(skip_serializing_if = "Option::is_none")]
5711    pub schme_nm: Option<crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>>,
5712    #[serde(rename = "Issr")]
5713    #[serde(skip_serializing_if = "Option::is_none")]
5714    pub issr: Option<Max35Text>,
5715}
5716/// Builder for [`GenericOrganisationIdentification1`]. Construct via [`GenericOrganisationIdentification1::builder()`].
5717#[allow(clippy::struct_field_names)]
5718#[derive(Default)]
5719pub struct GenericOrganisationIdentification1Builder {
5720    id: ::std::option::Option<Max35Text>,
5721    schme_nm: ::std::option::Option<
5722        crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
5723    >,
5724    issr: ::std::option::Option<Max35Text>,
5725}
5726impl GenericOrganisationIdentification1Builder {
5727    /// Set the `id` field.
5728    #[must_use]
5729    pub fn id(mut self, value: Max35Text) -> GenericOrganisationIdentification1Builder {
5730        self.id = ::std::option::Option::Some(value);
5731        self
5732    }
5733    /// Set the `schme_nm` field.
5734    #[must_use]
5735    pub fn schme_nm(
5736        mut self,
5737        value: crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
5738    ) -> GenericOrganisationIdentification1Builder {
5739        self.schme_nm = ::std::option::Option::Some(value);
5740        self
5741    }
5742    /// Set the `issr` field.
5743    #[must_use]
5744    pub fn issr(mut self, value: Max35Text) -> GenericOrganisationIdentification1Builder {
5745        self.issr = ::std::option::Option::Some(value);
5746        self
5747    }
5748    /// Validate required fields and construct the type.
5749    ///
5750    /// # Errors
5751    ///
5752    /// Returns [`crate::common::BuilderError`] listing the names of any
5753    /// required fields that were not set.
5754    ///
5755    /// # Panics
5756    ///
5757    /// Does not panic — all `.unwrap()` calls are guarded by the
5758    /// missing-field check above.
5759    pub fn build(
5760        self,
5761    ) -> ::std::result::Result<GenericOrganisationIdentification1, crate::common::BuilderError>
5762    {
5763        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5764        if self.id.is_none() {
5765            missing.push("id".to_owned());
5766        }
5767        if !missing.is_empty() {
5768            return ::std::result::Result::Err(crate::common::BuilderError {
5769                type_name: "GenericOrganisationIdentification1".to_owned(),
5770                missing_fields: missing,
5771            });
5772        }
5773        ::std::result::Result::Ok(GenericOrganisationIdentification1 {
5774            id: self.id.unwrap(),
5775            schme_nm: self.schme_nm,
5776            issr: self.issr,
5777        })
5778    }
5779}
5780impl GenericOrganisationIdentification1 {
5781    /// Return a new builder for this type.
5782    #[must_use]
5783    pub fn builder() -> GenericOrganisationIdentification1Builder {
5784        GenericOrganisationIdentification1Builder::default()
5785    }
5786}
5787#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5788pub struct GenericPersonIdentification1 {
5789    #[serde(rename = "Id")]
5790    pub id: Max35Text,
5791    #[serde(rename = "SchmeNm")]
5792    #[serde(skip_serializing_if = "Option::is_none")]
5793    pub schme_nm: Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
5794    #[serde(rename = "Issr")]
5795    #[serde(skip_serializing_if = "Option::is_none")]
5796    pub issr: Option<Max35Text>,
5797}
5798/// Builder for [`GenericPersonIdentification1`]. Construct via [`GenericPersonIdentification1::builder()`].
5799#[allow(clippy::struct_field_names)]
5800#[derive(Default)]
5801pub struct GenericPersonIdentification1Builder {
5802    id: ::std::option::Option<Max35Text>,
5803    schme_nm:
5804        ::std::option::Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
5805    issr: ::std::option::Option<Max35Text>,
5806}
5807impl GenericPersonIdentification1Builder {
5808    /// Set the `id` field.
5809    #[must_use]
5810    pub fn id(mut self, value: Max35Text) -> GenericPersonIdentification1Builder {
5811        self.id = ::std::option::Option::Some(value);
5812        self
5813    }
5814    /// Set the `schme_nm` field.
5815    #[must_use]
5816    pub fn schme_nm(
5817        mut self,
5818        value: crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>,
5819    ) -> GenericPersonIdentification1Builder {
5820        self.schme_nm = ::std::option::Option::Some(value);
5821        self
5822    }
5823    /// Set the `issr` field.
5824    #[must_use]
5825    pub fn issr(mut self, value: Max35Text) -> GenericPersonIdentification1Builder {
5826        self.issr = ::std::option::Option::Some(value);
5827        self
5828    }
5829    /// Validate required fields and construct the type.
5830    ///
5831    /// # Errors
5832    ///
5833    /// Returns [`crate::common::BuilderError`] listing the names of any
5834    /// required fields that were not set.
5835    ///
5836    /// # Panics
5837    ///
5838    /// Does not panic — all `.unwrap()` calls are guarded by the
5839    /// missing-field check above.
5840    pub fn build(
5841        self,
5842    ) -> ::std::result::Result<GenericPersonIdentification1, crate::common::BuilderError> {
5843        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5844        if self.id.is_none() {
5845            missing.push("id".to_owned());
5846        }
5847        if !missing.is_empty() {
5848            return ::std::result::Result::Err(crate::common::BuilderError {
5849                type_name: "GenericPersonIdentification1".to_owned(),
5850                missing_fields: missing,
5851            });
5852        }
5853        ::std::result::Result::Ok(GenericPersonIdentification1 {
5854            id: self.id.unwrap(),
5855            schme_nm: self.schme_nm,
5856            issr: self.issr,
5857        })
5858    }
5859}
5860impl GenericPersonIdentification1 {
5861    /// Return a new builder for this type.
5862    #[must_use]
5863    pub fn builder() -> GenericPersonIdentification1Builder {
5864        GenericPersonIdentification1Builder::default()
5865    }
5866}
5867#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5868pub struct GroupHeader96 {
5869    #[serde(rename = "MsgId")]
5870    pub msg_id: Max35Text,
5871    #[serde(rename = "CreDtTm")]
5872    pub cre_dt_tm: ISODateTime,
5873    #[serde(rename = "BtchBookg")]
5874    #[serde(skip_serializing_if = "Option::is_none")]
5875    pub btch_bookg: Option<BatchBookingIndicator>,
5876    #[serde(rename = "NbOfTxs")]
5877    pub nb_of_txs: Max15NumericText,
5878    #[serde(rename = "CtrlSum")]
5879    #[serde(skip_serializing_if = "Option::is_none")]
5880    pub ctrl_sum: Option<DecimalNumber>,
5881    #[serde(rename = "TtlIntrBkSttlmAmt")]
5882    #[serde(skip_serializing_if = "Option::is_none")]
5883    pub ttl_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
5884    #[serde(rename = "IntrBkSttlmDt")]
5885    #[serde(skip_serializing_if = "Option::is_none")]
5886    pub intr_bk_sttlm_dt: Option<ISODate>,
5887    #[serde(rename = "SttlmInf")]
5888    pub sttlm_inf: SettlementInstruction11,
5889    #[serde(rename = "PmtTpInf")]
5890    #[serde(skip_serializing_if = "Option::is_none")]
5891    pub pmt_tp_inf: Option<PaymentTypeInformation28>,
5892    #[serde(rename = "InstgAgt")]
5893    #[serde(skip_serializing_if = "Option::is_none")]
5894    pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
5895    #[serde(rename = "InstdAgt")]
5896    #[serde(skip_serializing_if = "Option::is_none")]
5897    pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
5898}
5899/// Builder for [`GroupHeader96`]. Construct via [`GroupHeader96::builder()`].
5900#[allow(clippy::struct_field_names)]
5901#[derive(Default)]
5902pub struct GroupHeader96Builder {
5903    msg_id: ::std::option::Option<Max35Text>,
5904    cre_dt_tm: ::std::option::Option<ISODateTime>,
5905    btch_bookg: ::std::option::Option<BatchBookingIndicator>,
5906    nb_of_txs: ::std::option::Option<Max15NumericText>,
5907    ctrl_sum: ::std::option::Option<DecimalNumber>,
5908    ttl_intr_bk_sttlm_amt: ::std::option::Option<ActiveCurrencyAndAmount>,
5909    intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
5910    sttlm_inf: ::std::option::Option<SettlementInstruction11>,
5911    pmt_tp_inf: ::std::option::Option<PaymentTypeInformation28>,
5912    instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
5913    instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
5914}
5915impl GroupHeader96Builder {
5916    /// Set the `msg_id` field.
5917    #[must_use]
5918    pub fn msg_id(mut self, value: Max35Text) -> GroupHeader96Builder {
5919        self.msg_id = ::std::option::Option::Some(value);
5920        self
5921    }
5922    /// Set the `cre_dt_tm` field.
5923    #[must_use]
5924    pub fn cre_dt_tm(mut self, value: ISODateTime) -> GroupHeader96Builder {
5925        self.cre_dt_tm = ::std::option::Option::Some(value);
5926        self
5927    }
5928    /// Set the `btch_bookg` field.
5929    #[must_use]
5930    pub fn btch_bookg(mut self, value: BatchBookingIndicator) -> GroupHeader96Builder {
5931        self.btch_bookg = ::std::option::Option::Some(value);
5932        self
5933    }
5934    /// Set the `nb_of_txs` field.
5935    #[must_use]
5936    pub fn nb_of_txs(mut self, value: Max15NumericText) -> GroupHeader96Builder {
5937        self.nb_of_txs = ::std::option::Option::Some(value);
5938        self
5939    }
5940    /// Set the `ctrl_sum` field.
5941    #[must_use]
5942    pub fn ctrl_sum(mut self, value: DecimalNumber) -> GroupHeader96Builder {
5943        self.ctrl_sum = ::std::option::Option::Some(value);
5944        self
5945    }
5946    /// Set the `ttl_intr_bk_sttlm_amt` field.
5947    #[must_use]
5948    pub fn ttl_intr_bk_sttlm_amt(mut self, value: ActiveCurrencyAndAmount) -> GroupHeader96Builder {
5949        self.ttl_intr_bk_sttlm_amt = ::std::option::Option::Some(value);
5950        self
5951    }
5952    /// Set the `intr_bk_sttlm_dt` field.
5953    #[must_use]
5954    pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> GroupHeader96Builder {
5955        self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
5956        self
5957    }
5958    /// Set the `sttlm_inf` field.
5959    #[must_use]
5960    pub fn sttlm_inf(mut self, value: SettlementInstruction11) -> GroupHeader96Builder {
5961        self.sttlm_inf = ::std::option::Option::Some(value);
5962        self
5963    }
5964    /// Set the `pmt_tp_inf` field.
5965    #[must_use]
5966    pub fn pmt_tp_inf(mut self, value: PaymentTypeInformation28) -> GroupHeader96Builder {
5967        self.pmt_tp_inf = ::std::option::Option::Some(value);
5968        self
5969    }
5970    /// Set the `instg_agt` field.
5971    #[must_use]
5972    pub fn instg_agt(
5973        mut self,
5974        value: BranchAndFinancialInstitutionIdentification6,
5975    ) -> GroupHeader96Builder {
5976        self.instg_agt = ::std::option::Option::Some(value);
5977        self
5978    }
5979    /// Set the `instd_agt` field.
5980    #[must_use]
5981    pub fn instd_agt(
5982        mut self,
5983        value: BranchAndFinancialInstitutionIdentification6,
5984    ) -> GroupHeader96Builder {
5985        self.instd_agt = ::std::option::Option::Some(value);
5986        self
5987    }
5988    /// Validate required fields and construct the type.
5989    ///
5990    /// # Errors
5991    ///
5992    /// Returns [`crate::common::BuilderError`] listing the names of any
5993    /// required fields that were not set.
5994    ///
5995    /// # Panics
5996    ///
5997    /// Does not panic — all `.unwrap()` calls are guarded by the
5998    /// missing-field check above.
5999    pub fn build(self) -> ::std::result::Result<GroupHeader96, crate::common::BuilderError> {
6000        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6001        if self.msg_id.is_none() {
6002            missing.push("msg_id".to_owned());
6003        }
6004        if self.cre_dt_tm.is_none() {
6005            missing.push("cre_dt_tm".to_owned());
6006        }
6007        if self.nb_of_txs.is_none() {
6008            missing.push("nb_of_txs".to_owned());
6009        }
6010        if self.sttlm_inf.is_none() {
6011            missing.push("sttlm_inf".to_owned());
6012        }
6013        if !missing.is_empty() {
6014            return ::std::result::Result::Err(crate::common::BuilderError {
6015                type_name: "GroupHeader96".to_owned(),
6016                missing_fields: missing,
6017            });
6018        }
6019        ::std::result::Result::Ok(GroupHeader96 {
6020            msg_id: self.msg_id.unwrap(),
6021            cre_dt_tm: self.cre_dt_tm.unwrap(),
6022            btch_bookg: self.btch_bookg,
6023            nb_of_txs: self.nb_of_txs.unwrap(),
6024            ctrl_sum: self.ctrl_sum,
6025            ttl_intr_bk_sttlm_amt: self.ttl_intr_bk_sttlm_amt,
6026            intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
6027            sttlm_inf: self.sttlm_inf.unwrap(),
6028            pmt_tp_inf: self.pmt_tp_inf,
6029            instg_agt: self.instg_agt,
6030            instd_agt: self.instd_agt,
6031        })
6032    }
6033}
6034impl GroupHeader96 {
6035    /// Return a new builder for this type.
6036    #[must_use]
6037    pub fn builder() -> GroupHeader96Builder {
6038        GroupHeader96Builder::default()
6039    }
6040}
6041#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6042pub struct InstructionForCreditorAgent3 {
6043    #[serde(rename = "Cd")]
6044    #[serde(skip_serializing_if = "Option::is_none")]
6045    pub cd: Option<ExternalCreditorAgentInstruction1Code>,
6046    #[serde(rename = "InstrInf")]
6047    #[serde(skip_serializing_if = "Option::is_none")]
6048    pub instr_inf: Option<Max140Text>,
6049}
6050/// Builder for [`InstructionForCreditorAgent3`]. Construct via [`InstructionForCreditorAgent3::builder()`].
6051#[allow(clippy::struct_field_names)]
6052#[derive(Default)]
6053pub struct InstructionForCreditorAgent3Builder {
6054    cd: ::std::option::Option<ExternalCreditorAgentInstruction1Code>,
6055    instr_inf: ::std::option::Option<Max140Text>,
6056}
6057impl InstructionForCreditorAgent3Builder {
6058    /// Set the `cd` field.
6059    #[must_use]
6060    pub fn cd(
6061        mut self,
6062        value: ExternalCreditorAgentInstruction1Code,
6063    ) -> InstructionForCreditorAgent3Builder {
6064        self.cd = ::std::option::Option::Some(value);
6065        self
6066    }
6067    /// Set the `instr_inf` field.
6068    #[must_use]
6069    pub fn instr_inf(mut self, value: Max140Text) -> InstructionForCreditorAgent3Builder {
6070        self.instr_inf = ::std::option::Option::Some(value);
6071        self
6072    }
6073    /// Validate required fields and construct the type.
6074    ///
6075    /// # Errors
6076    ///
6077    /// Returns [`crate::common::BuilderError`] listing the names of any
6078    /// required fields that were not set.
6079    ///
6080    /// # Panics
6081    ///
6082    /// Does not panic — all `.unwrap()` calls are guarded by the
6083    /// missing-field check above.
6084    pub fn build(
6085        self,
6086    ) -> ::std::result::Result<InstructionForCreditorAgent3, crate::common::BuilderError> {
6087        ::std::result::Result::Ok(InstructionForCreditorAgent3 {
6088            cd: self.cd,
6089            instr_inf: self.instr_inf,
6090        })
6091    }
6092}
6093impl InstructionForCreditorAgent3 {
6094    /// Return a new builder for this type.
6095    #[must_use]
6096    pub fn builder() -> InstructionForCreditorAgent3Builder {
6097        InstructionForCreditorAgent3Builder::default()
6098    }
6099}
6100#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6101pub struct InstructionForNextAgent1 {
6102    #[serde(rename = "Cd")]
6103    #[serde(skip_serializing_if = "Option::is_none")]
6104    pub cd: Option<Instruction4Code>,
6105    #[serde(rename = "InstrInf")]
6106    #[serde(skip_serializing_if = "Option::is_none")]
6107    pub instr_inf: Option<Max140Text>,
6108}
6109/// Builder for [`InstructionForNextAgent1`]. Construct via [`InstructionForNextAgent1::builder()`].
6110#[allow(clippy::struct_field_names)]
6111#[derive(Default)]
6112pub struct InstructionForNextAgent1Builder {
6113    cd: ::std::option::Option<Instruction4Code>,
6114    instr_inf: ::std::option::Option<Max140Text>,
6115}
6116impl InstructionForNextAgent1Builder {
6117    /// Set the `cd` field.
6118    #[must_use]
6119    pub fn cd(mut self, value: Instruction4Code) -> InstructionForNextAgent1Builder {
6120        self.cd = ::std::option::Option::Some(value);
6121        self
6122    }
6123    /// Set the `instr_inf` field.
6124    #[must_use]
6125    pub fn instr_inf(mut self, value: Max140Text) -> InstructionForNextAgent1Builder {
6126        self.instr_inf = ::std::option::Option::Some(value);
6127        self
6128    }
6129    /// Validate required fields and construct the type.
6130    ///
6131    /// # Errors
6132    ///
6133    /// Returns [`crate::common::BuilderError`] listing the names of any
6134    /// required fields that were not set.
6135    ///
6136    /// # Panics
6137    ///
6138    /// Does not panic — all `.unwrap()` calls are guarded by the
6139    /// missing-field check above.
6140    pub fn build(
6141        self,
6142    ) -> ::std::result::Result<InstructionForNextAgent1, crate::common::BuilderError> {
6143        ::std::result::Result::Ok(InstructionForNextAgent1 {
6144            cd: self.cd,
6145            instr_inf: self.instr_inf,
6146        })
6147    }
6148}
6149impl InstructionForNextAgent1 {
6150    /// Return a new builder for this type.
6151    #[must_use]
6152    pub fn builder() -> InstructionForNextAgent1Builder {
6153        InstructionForNextAgent1Builder::default()
6154    }
6155}
6156#[allow(clippy::large_enum_variant)]
6157#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6158pub enum LocalInstrument2Choice {
6159    #[serde(rename = "Cd")]
6160    Cd(ExternalLocalInstrument1Code),
6161    #[serde(rename = "Prtry")]
6162    Prtry(Max35Text),
6163}
6164#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6165pub struct OrganisationIdentification29 {
6166    #[serde(rename = "AnyBIC")]
6167    #[serde(skip_serializing_if = "Option::is_none")]
6168    pub any_bic: Option<AnyBICDec2014Identifier>,
6169    #[serde(rename = "LEI")]
6170    #[serde(skip_serializing_if = "Option::is_none")]
6171    pub lei: Option<LEIIdentifier>,
6172    #[serde(rename = "Othr")]
6173    #[serde(default)]
6174    #[serde(skip_serializing_if = "Vec::is_empty")]
6175    pub othr: Vec<GenericOrganisationIdentification1>,
6176}
6177/// Builder for [`OrganisationIdentification29`]. Construct via [`OrganisationIdentification29::builder()`].
6178#[allow(clippy::struct_field_names)]
6179#[derive(Default)]
6180pub struct OrganisationIdentification29Builder {
6181    any_bic: ::std::option::Option<AnyBICDec2014Identifier>,
6182    lei: ::std::option::Option<LEIIdentifier>,
6183    othr: ::std::vec::Vec<GenericOrganisationIdentification1>,
6184}
6185impl OrganisationIdentification29Builder {
6186    /// Set the `any_bic` field.
6187    #[must_use]
6188    pub fn any_bic(
6189        mut self,
6190        value: AnyBICDec2014Identifier,
6191    ) -> OrganisationIdentification29Builder {
6192        self.any_bic = ::std::option::Option::Some(value);
6193        self
6194    }
6195    /// Set the `lei` field.
6196    #[must_use]
6197    pub fn lei(mut self, value: LEIIdentifier) -> OrganisationIdentification29Builder {
6198        self.lei = ::std::option::Option::Some(value);
6199        self
6200    }
6201    /// Set the `othr` field (replaces any previously added items).
6202    #[must_use]
6203    pub fn othr(
6204        mut self,
6205        value: ::std::vec::Vec<GenericOrganisationIdentification1>,
6206    ) -> OrganisationIdentification29Builder {
6207        self.othr = value;
6208        self
6209    }
6210    /// Append one item to the `othr` field.
6211    #[must_use]
6212    pub fn add_othr(
6213        mut self,
6214        value: GenericOrganisationIdentification1,
6215    ) -> OrganisationIdentification29Builder {
6216        self.othr.push(value);
6217        self
6218    }
6219    /// Validate required fields and construct the type.
6220    ///
6221    /// # Errors
6222    ///
6223    /// Returns [`crate::common::BuilderError`] listing the names of any
6224    /// required fields that were not set.
6225    ///
6226    /// # Panics
6227    ///
6228    /// Does not panic — all `.unwrap()` calls are guarded by the
6229    /// missing-field check above.
6230    pub fn build(
6231        self,
6232    ) -> ::std::result::Result<OrganisationIdentification29, crate::common::BuilderError> {
6233        ::std::result::Result::Ok(OrganisationIdentification29 {
6234            any_bic: self.any_bic,
6235            lei: self.lei,
6236            othr: self.othr,
6237        })
6238    }
6239}
6240impl OrganisationIdentification29 {
6241    /// Return a new builder for this type.
6242    #[must_use]
6243    pub fn builder() -> OrganisationIdentification29Builder {
6244        OrganisationIdentification29Builder::default()
6245    }
6246}
6247#[allow(clippy::large_enum_variant)]
6248#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6249pub enum OrganisationIdentificationSchemeName1Choice {
6250    #[serde(rename = "Cd")]
6251    Cd(ExternalOrganisationIdentification1Code),
6252    #[serde(rename = "Prtry")]
6253    Prtry(Max35Text),
6254}
6255#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6256pub struct OtherContact1 {
6257    #[serde(rename = "ChanlTp")]
6258    pub chanl_tp: Max4Text,
6259    #[serde(rename = "Id")]
6260    #[serde(skip_serializing_if = "Option::is_none")]
6261    pub id: Option<Max128Text>,
6262}
6263/// Builder for [`OtherContact1`]. Construct via [`OtherContact1::builder()`].
6264#[allow(clippy::struct_field_names)]
6265#[derive(Default)]
6266pub struct OtherContact1Builder {
6267    chanl_tp: ::std::option::Option<Max4Text>,
6268    id: ::std::option::Option<Max128Text>,
6269}
6270impl OtherContact1Builder {
6271    /// Set the `chanl_tp` field.
6272    #[must_use]
6273    pub fn chanl_tp(mut self, value: Max4Text) -> OtherContact1Builder {
6274        self.chanl_tp = ::std::option::Option::Some(value);
6275        self
6276    }
6277    /// Set the `id` field.
6278    #[must_use]
6279    pub fn id(mut self, value: Max128Text) -> OtherContact1Builder {
6280        self.id = ::std::option::Option::Some(value);
6281        self
6282    }
6283    /// Validate required fields and construct the type.
6284    ///
6285    /// # Errors
6286    ///
6287    /// Returns [`crate::common::BuilderError`] listing the names of any
6288    /// required fields that were not set.
6289    ///
6290    /// # Panics
6291    ///
6292    /// Does not panic — all `.unwrap()` calls are guarded by the
6293    /// missing-field check above.
6294    pub fn build(self) -> ::std::result::Result<OtherContact1, crate::common::BuilderError> {
6295        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6296        if self.chanl_tp.is_none() {
6297            missing.push("chanl_tp".to_owned());
6298        }
6299        if !missing.is_empty() {
6300            return ::std::result::Result::Err(crate::common::BuilderError {
6301                type_name: "OtherContact1".to_owned(),
6302                missing_fields: missing,
6303            });
6304        }
6305        ::std::result::Result::Ok(OtherContact1 {
6306            chanl_tp: self.chanl_tp.unwrap(),
6307            id: self.id,
6308        })
6309    }
6310}
6311impl OtherContact1 {
6312    /// Return a new builder for this type.
6313    #[must_use]
6314    pub fn builder() -> OtherContact1Builder {
6315        OtherContact1Builder::default()
6316    }
6317}
6318#[allow(clippy::large_enum_variant)]
6319#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6320pub enum Party38Choice {
6321    #[serde(rename = "OrgId")]
6322    OrgId(OrganisationIdentification29),
6323    #[serde(rename = "PrvtId")]
6324    PrvtId(PersonIdentification13),
6325}
6326#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6327pub struct PartyIdentification135 {
6328    #[serde(rename = "Nm")]
6329    #[serde(skip_serializing_if = "Option::is_none")]
6330    pub nm: Option<Max140Text>,
6331    #[serde(rename = "PstlAdr")]
6332    #[serde(skip_serializing_if = "Option::is_none")]
6333    pub pstl_adr: Option<PostalAddress24>,
6334    #[serde(rename = "Id")]
6335    #[serde(skip_serializing_if = "Option::is_none")]
6336    pub id: Option<crate::common::ChoiceWrapper<Party38Choice>>,
6337    #[serde(rename = "CtryOfRes")]
6338    #[serde(skip_serializing_if = "Option::is_none")]
6339    pub ctry_of_res: Option<CountryCode>,
6340    #[serde(rename = "CtctDtls")]
6341    #[serde(skip_serializing_if = "Option::is_none")]
6342    pub ctct_dtls: Option<Contact4>,
6343}
6344/// Builder for [`PartyIdentification135`]. Construct via [`PartyIdentification135::builder()`].
6345#[allow(clippy::struct_field_names)]
6346#[derive(Default)]
6347pub struct PartyIdentification135Builder {
6348    nm: ::std::option::Option<Max140Text>,
6349    pstl_adr: ::std::option::Option<PostalAddress24>,
6350    id: ::std::option::Option<crate::common::ChoiceWrapper<Party38Choice>>,
6351    ctry_of_res: ::std::option::Option<CountryCode>,
6352    ctct_dtls: ::std::option::Option<Contact4>,
6353}
6354impl PartyIdentification135Builder {
6355    /// Set the `nm` field.
6356    #[must_use]
6357    pub fn nm(mut self, value: Max140Text) -> PartyIdentification135Builder {
6358        self.nm = ::std::option::Option::Some(value);
6359        self
6360    }
6361    /// Set the `pstl_adr` field.
6362    #[must_use]
6363    pub fn pstl_adr(mut self, value: PostalAddress24) -> PartyIdentification135Builder {
6364        self.pstl_adr = ::std::option::Option::Some(value);
6365        self
6366    }
6367    /// Set the `id` field.
6368    #[must_use]
6369    pub fn id(
6370        mut self,
6371        value: crate::common::ChoiceWrapper<Party38Choice>,
6372    ) -> PartyIdentification135Builder {
6373        self.id = ::std::option::Option::Some(value);
6374        self
6375    }
6376    /// Set the `ctry_of_res` field.
6377    #[must_use]
6378    pub fn ctry_of_res(mut self, value: CountryCode) -> PartyIdentification135Builder {
6379        self.ctry_of_res = ::std::option::Option::Some(value);
6380        self
6381    }
6382    /// Set the `ctct_dtls` field.
6383    #[must_use]
6384    pub fn ctct_dtls(mut self, value: Contact4) -> PartyIdentification135Builder {
6385        self.ctct_dtls = ::std::option::Option::Some(value);
6386        self
6387    }
6388    /// Validate required fields and construct the type.
6389    ///
6390    /// # Errors
6391    ///
6392    /// Returns [`crate::common::BuilderError`] listing the names of any
6393    /// required fields that were not set.
6394    ///
6395    /// # Panics
6396    ///
6397    /// Does not panic — all `.unwrap()` calls are guarded by the
6398    /// missing-field check above.
6399    pub fn build(
6400        self,
6401    ) -> ::std::result::Result<PartyIdentification135, crate::common::BuilderError> {
6402        ::std::result::Result::Ok(PartyIdentification135 {
6403            nm: self.nm,
6404            pstl_adr: self.pstl_adr,
6405            id: self.id,
6406            ctry_of_res: self.ctry_of_res,
6407            ctct_dtls: self.ctct_dtls,
6408        })
6409    }
6410}
6411impl PartyIdentification135 {
6412    /// Return a new builder for this type.
6413    #[must_use]
6414    pub fn builder() -> PartyIdentification135Builder {
6415        PartyIdentification135Builder::default()
6416    }
6417}
6418#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6419pub struct PaymentIdentification13 {
6420    #[serde(rename = "InstrId")]
6421    #[serde(skip_serializing_if = "Option::is_none")]
6422    pub instr_id: Option<Max35Text>,
6423    #[serde(rename = "EndToEndId")]
6424    pub end_to_end_id: Max35Text,
6425    #[serde(rename = "TxId")]
6426    #[serde(skip_serializing_if = "Option::is_none")]
6427    pub tx_id: Option<Max35Text>,
6428    #[serde(rename = "UETR")]
6429    #[serde(skip_serializing_if = "Option::is_none")]
6430    pub uetr: Option<UUIDv4Identifier>,
6431    #[serde(rename = "ClrSysRef")]
6432    #[serde(skip_serializing_if = "Option::is_none")]
6433    pub clr_sys_ref: Option<Max35Text>,
6434}
6435/// Builder for [`PaymentIdentification13`]. Construct via [`PaymentIdentification13::builder()`].
6436#[allow(clippy::struct_field_names)]
6437#[derive(Default)]
6438pub struct PaymentIdentification13Builder {
6439    instr_id: ::std::option::Option<Max35Text>,
6440    end_to_end_id: ::std::option::Option<Max35Text>,
6441    tx_id: ::std::option::Option<Max35Text>,
6442    uetr: ::std::option::Option<UUIDv4Identifier>,
6443    clr_sys_ref: ::std::option::Option<Max35Text>,
6444}
6445impl PaymentIdentification13Builder {
6446    /// Set the `instr_id` field.
6447    #[must_use]
6448    pub fn instr_id(mut self, value: Max35Text) -> PaymentIdentification13Builder {
6449        self.instr_id = ::std::option::Option::Some(value);
6450        self
6451    }
6452    /// Set the `end_to_end_id` field.
6453    #[must_use]
6454    pub fn end_to_end_id(mut self, value: Max35Text) -> PaymentIdentification13Builder {
6455        self.end_to_end_id = ::std::option::Option::Some(value);
6456        self
6457    }
6458    /// Set the `tx_id` field.
6459    #[must_use]
6460    pub fn tx_id(mut self, value: Max35Text) -> PaymentIdentification13Builder {
6461        self.tx_id = ::std::option::Option::Some(value);
6462        self
6463    }
6464    /// Set the `uetr` field.
6465    #[must_use]
6466    pub fn uetr(mut self, value: UUIDv4Identifier) -> PaymentIdentification13Builder {
6467        self.uetr = ::std::option::Option::Some(value);
6468        self
6469    }
6470    /// Set the `clr_sys_ref` field.
6471    #[must_use]
6472    pub fn clr_sys_ref(mut self, value: Max35Text) -> PaymentIdentification13Builder {
6473        self.clr_sys_ref = ::std::option::Option::Some(value);
6474        self
6475    }
6476    /// Validate required fields and construct the type.
6477    ///
6478    /// # Errors
6479    ///
6480    /// Returns [`crate::common::BuilderError`] listing the names of any
6481    /// required fields that were not set.
6482    ///
6483    /// # Panics
6484    ///
6485    /// Does not panic — all `.unwrap()` calls are guarded by the
6486    /// missing-field check above.
6487    pub fn build(
6488        self,
6489    ) -> ::std::result::Result<PaymentIdentification13, crate::common::BuilderError> {
6490        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6491        if self.end_to_end_id.is_none() {
6492            missing.push("end_to_end_id".to_owned());
6493        }
6494        if !missing.is_empty() {
6495            return ::std::result::Result::Err(crate::common::BuilderError {
6496                type_name: "PaymentIdentification13".to_owned(),
6497                missing_fields: missing,
6498            });
6499        }
6500        ::std::result::Result::Ok(PaymentIdentification13 {
6501            instr_id: self.instr_id,
6502            end_to_end_id: self.end_to_end_id.unwrap(),
6503            tx_id: self.tx_id,
6504            uetr: self.uetr,
6505            clr_sys_ref: self.clr_sys_ref,
6506        })
6507    }
6508}
6509impl PaymentIdentification13 {
6510    /// Return a new builder for this type.
6511    #[must_use]
6512    pub fn builder() -> PaymentIdentification13Builder {
6513        PaymentIdentification13Builder::default()
6514    }
6515}
6516#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6517pub struct PaymentTypeInformation28 {
6518    #[serde(rename = "InstrPrty")]
6519    #[serde(skip_serializing_if = "Option::is_none")]
6520    pub instr_prty: Option<Priority2Code>,
6521    #[serde(rename = "ClrChanl")]
6522    #[serde(skip_serializing_if = "Option::is_none")]
6523    pub clr_chanl: Option<ClearingChannel2Code>,
6524    #[serde(rename = "SvcLvl")]
6525    #[serde(default)]
6526    #[serde(skip_serializing_if = "Vec::is_empty")]
6527    pub svc_lvl: Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6528    #[serde(rename = "LclInstrm")]
6529    #[serde(skip_serializing_if = "Option::is_none")]
6530    pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6531    #[serde(rename = "CtgyPurp")]
6532    #[serde(skip_serializing_if = "Option::is_none")]
6533    pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6534}
6535/// Builder for [`PaymentTypeInformation28`]. Construct via [`PaymentTypeInformation28::builder()`].
6536#[allow(clippy::struct_field_names)]
6537#[derive(Default)]
6538pub struct PaymentTypeInformation28Builder {
6539    instr_prty: ::std::option::Option<Priority2Code>,
6540    clr_chanl: ::std::option::Option<ClearingChannel2Code>,
6541    svc_lvl: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6542    lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6543    ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6544}
6545impl PaymentTypeInformation28Builder {
6546    /// Set the `instr_prty` field.
6547    #[must_use]
6548    pub fn instr_prty(mut self, value: Priority2Code) -> PaymentTypeInformation28Builder {
6549        self.instr_prty = ::std::option::Option::Some(value);
6550        self
6551    }
6552    /// Set the `clr_chanl` field.
6553    #[must_use]
6554    pub fn clr_chanl(mut self, value: ClearingChannel2Code) -> PaymentTypeInformation28Builder {
6555        self.clr_chanl = ::std::option::Option::Some(value);
6556        self
6557    }
6558    /// Set the `svc_lvl` field (replaces any previously added items).
6559    #[must_use]
6560    pub fn svc_lvl(
6561        mut self,
6562        value: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6563    ) -> PaymentTypeInformation28Builder {
6564        self.svc_lvl = value;
6565        self
6566    }
6567    /// Append one item to the `svc_lvl` field.
6568    #[must_use]
6569    pub fn add_svc_lvl(
6570        mut self,
6571        value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
6572    ) -> PaymentTypeInformation28Builder {
6573        self.svc_lvl.push(value);
6574        self
6575    }
6576    /// Set the `lcl_instrm` field.
6577    #[must_use]
6578    pub fn lcl_instrm(
6579        mut self,
6580        value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
6581    ) -> PaymentTypeInformation28Builder {
6582        self.lcl_instrm = ::std::option::Option::Some(value);
6583        self
6584    }
6585    /// Set the `ctgy_purp` field.
6586    #[must_use]
6587    pub fn ctgy_purp(
6588        mut self,
6589        value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
6590    ) -> PaymentTypeInformation28Builder {
6591        self.ctgy_purp = ::std::option::Option::Some(value);
6592        self
6593    }
6594    /// Validate required fields and construct the type.
6595    ///
6596    /// # Errors
6597    ///
6598    /// Returns [`crate::common::BuilderError`] listing the names of any
6599    /// required fields that were not set.
6600    ///
6601    /// # Panics
6602    ///
6603    /// Does not panic — all `.unwrap()` calls are guarded by the
6604    /// missing-field check above.
6605    pub fn build(
6606        self,
6607    ) -> ::std::result::Result<PaymentTypeInformation28, crate::common::BuilderError> {
6608        ::std::result::Result::Ok(PaymentTypeInformation28 {
6609            instr_prty: self.instr_prty,
6610            clr_chanl: self.clr_chanl,
6611            svc_lvl: self.svc_lvl,
6612            lcl_instrm: self.lcl_instrm,
6613            ctgy_purp: self.ctgy_purp,
6614        })
6615    }
6616}
6617impl PaymentTypeInformation28 {
6618    /// Return a new builder for this type.
6619    #[must_use]
6620    pub fn builder() -> PaymentTypeInformation28Builder {
6621        PaymentTypeInformation28Builder::default()
6622    }
6623}
6624#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6625pub struct PersonIdentification13 {
6626    #[serde(rename = "DtAndPlcOfBirth")]
6627    #[serde(skip_serializing_if = "Option::is_none")]
6628    pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
6629    #[serde(rename = "Othr")]
6630    #[serde(default)]
6631    #[serde(skip_serializing_if = "Vec::is_empty")]
6632    pub othr: Vec<GenericPersonIdentification1>,
6633}
6634/// Builder for [`PersonIdentification13`]. Construct via [`PersonIdentification13::builder()`].
6635#[allow(clippy::struct_field_names)]
6636#[derive(Default)]
6637pub struct PersonIdentification13Builder {
6638    dt_and_plc_of_birth: ::std::option::Option<DateAndPlaceOfBirth1>,
6639    othr: ::std::vec::Vec<GenericPersonIdentification1>,
6640}
6641impl PersonIdentification13Builder {
6642    /// Set the `dt_and_plc_of_birth` field.
6643    #[must_use]
6644    pub fn dt_and_plc_of_birth(
6645        mut self,
6646        value: DateAndPlaceOfBirth1,
6647    ) -> PersonIdentification13Builder {
6648        self.dt_and_plc_of_birth = ::std::option::Option::Some(value);
6649        self
6650    }
6651    /// Set the `othr` field (replaces any previously added items).
6652    #[must_use]
6653    pub fn othr(
6654        mut self,
6655        value: ::std::vec::Vec<GenericPersonIdentification1>,
6656    ) -> PersonIdentification13Builder {
6657        self.othr = value;
6658        self
6659    }
6660    /// Append one item to the `othr` field.
6661    #[must_use]
6662    pub fn add_othr(
6663        mut self,
6664        value: GenericPersonIdentification1,
6665    ) -> PersonIdentification13Builder {
6666        self.othr.push(value);
6667        self
6668    }
6669    /// Validate required fields and construct the type.
6670    ///
6671    /// # Errors
6672    ///
6673    /// Returns [`crate::common::BuilderError`] listing the names of any
6674    /// required fields that were not set.
6675    ///
6676    /// # Panics
6677    ///
6678    /// Does not panic — all `.unwrap()` calls are guarded by the
6679    /// missing-field check above.
6680    pub fn build(
6681        self,
6682    ) -> ::std::result::Result<PersonIdentification13, crate::common::BuilderError> {
6683        ::std::result::Result::Ok(PersonIdentification13 {
6684            dt_and_plc_of_birth: self.dt_and_plc_of_birth,
6685            othr: self.othr,
6686        })
6687    }
6688}
6689impl PersonIdentification13 {
6690    /// Return a new builder for this type.
6691    #[must_use]
6692    pub fn builder() -> PersonIdentification13Builder {
6693        PersonIdentification13Builder::default()
6694    }
6695}
6696#[allow(clippy::large_enum_variant)]
6697#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6698pub enum PersonIdentificationSchemeName1Choice {
6699    #[serde(rename = "Cd")]
6700    Cd(ExternalPersonIdentification1Code),
6701    #[serde(rename = "Prtry")]
6702    Prtry(Max35Text),
6703}
6704#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6705pub struct PostalAddress24 {
6706    #[serde(rename = "AdrTp")]
6707    #[serde(skip_serializing_if = "Option::is_none")]
6708    pub adr_tp: Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
6709    #[serde(rename = "Dept")]
6710    #[serde(skip_serializing_if = "Option::is_none")]
6711    pub dept: Option<Max70Text>,
6712    #[serde(rename = "SubDept")]
6713    #[serde(skip_serializing_if = "Option::is_none")]
6714    pub sub_dept: Option<Max70Text>,
6715    #[serde(rename = "StrtNm")]
6716    #[serde(skip_serializing_if = "Option::is_none")]
6717    pub strt_nm: Option<Max70Text>,
6718    #[serde(rename = "BldgNb")]
6719    #[serde(skip_serializing_if = "Option::is_none")]
6720    pub bldg_nb: Option<Max16Text>,
6721    #[serde(rename = "BldgNm")]
6722    #[serde(skip_serializing_if = "Option::is_none")]
6723    pub bldg_nm: Option<Max35Text>,
6724    #[serde(rename = "Flr")]
6725    #[serde(skip_serializing_if = "Option::is_none")]
6726    pub flr: Option<Max70Text>,
6727    #[serde(rename = "PstBx")]
6728    #[serde(skip_serializing_if = "Option::is_none")]
6729    pub pst_bx: Option<Max16Text>,
6730    #[serde(rename = "Room")]
6731    #[serde(skip_serializing_if = "Option::is_none")]
6732    pub room: Option<Max70Text>,
6733    #[serde(rename = "PstCd")]
6734    #[serde(skip_serializing_if = "Option::is_none")]
6735    pub pst_cd: Option<Max16Text>,
6736    #[serde(rename = "TwnNm")]
6737    #[serde(skip_serializing_if = "Option::is_none")]
6738    pub twn_nm: Option<Max35Text>,
6739    #[serde(rename = "TwnLctnNm")]
6740    #[serde(skip_serializing_if = "Option::is_none")]
6741    pub twn_lctn_nm: Option<Max35Text>,
6742    #[serde(rename = "DstrctNm")]
6743    #[serde(skip_serializing_if = "Option::is_none")]
6744    pub dstrct_nm: Option<Max35Text>,
6745    #[serde(rename = "CtrySubDvsn")]
6746    #[serde(skip_serializing_if = "Option::is_none")]
6747    pub ctry_sub_dvsn: Option<Max35Text>,
6748    #[serde(rename = "Ctry")]
6749    #[serde(skip_serializing_if = "Option::is_none")]
6750    pub ctry: Option<CountryCode>,
6751    #[serde(rename = "AdrLine")]
6752    /// Maximum 7 occurrences.
6753    #[serde(default)]
6754    #[serde(skip_serializing_if = "Vec::is_empty")]
6755    pub adr_line: Vec<Max70Text>,
6756}
6757/// Builder for [`PostalAddress24`]. Construct via [`PostalAddress24::builder()`].
6758#[allow(clippy::struct_field_names)]
6759#[derive(Default)]
6760pub struct PostalAddress24Builder {
6761    adr_tp: ::std::option::Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
6762    dept: ::std::option::Option<Max70Text>,
6763    sub_dept: ::std::option::Option<Max70Text>,
6764    strt_nm: ::std::option::Option<Max70Text>,
6765    bldg_nb: ::std::option::Option<Max16Text>,
6766    bldg_nm: ::std::option::Option<Max35Text>,
6767    flr: ::std::option::Option<Max70Text>,
6768    pst_bx: ::std::option::Option<Max16Text>,
6769    room: ::std::option::Option<Max70Text>,
6770    pst_cd: ::std::option::Option<Max16Text>,
6771    twn_nm: ::std::option::Option<Max35Text>,
6772    twn_lctn_nm: ::std::option::Option<Max35Text>,
6773    dstrct_nm: ::std::option::Option<Max35Text>,
6774    ctry_sub_dvsn: ::std::option::Option<Max35Text>,
6775    ctry: ::std::option::Option<CountryCode>,
6776    adr_line: ::std::vec::Vec<Max70Text>,
6777}
6778impl PostalAddress24Builder {
6779    /// Set the `adr_tp` field.
6780    #[must_use]
6781    pub fn adr_tp(
6782        mut self,
6783        value: crate::common::ChoiceWrapper<AddressType3Choice>,
6784    ) -> PostalAddress24Builder {
6785        self.adr_tp = ::std::option::Option::Some(value);
6786        self
6787    }
6788    /// Set the `dept` field.
6789    #[must_use]
6790    pub fn dept(mut self, value: Max70Text) -> PostalAddress24Builder {
6791        self.dept = ::std::option::Option::Some(value);
6792        self
6793    }
6794    /// Set the `sub_dept` field.
6795    #[must_use]
6796    pub fn sub_dept(mut self, value: Max70Text) -> PostalAddress24Builder {
6797        self.sub_dept = ::std::option::Option::Some(value);
6798        self
6799    }
6800    /// Set the `strt_nm` field.
6801    #[must_use]
6802    pub fn strt_nm(mut self, value: Max70Text) -> PostalAddress24Builder {
6803        self.strt_nm = ::std::option::Option::Some(value);
6804        self
6805    }
6806    /// Set the `bldg_nb` field.
6807    #[must_use]
6808    pub fn bldg_nb(mut self, value: Max16Text) -> PostalAddress24Builder {
6809        self.bldg_nb = ::std::option::Option::Some(value);
6810        self
6811    }
6812    /// Set the `bldg_nm` field.
6813    #[must_use]
6814    pub fn bldg_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
6815        self.bldg_nm = ::std::option::Option::Some(value);
6816        self
6817    }
6818    /// Set the `flr` field.
6819    #[must_use]
6820    pub fn flr(mut self, value: Max70Text) -> PostalAddress24Builder {
6821        self.flr = ::std::option::Option::Some(value);
6822        self
6823    }
6824    /// Set the `pst_bx` field.
6825    #[must_use]
6826    pub fn pst_bx(mut self, value: Max16Text) -> PostalAddress24Builder {
6827        self.pst_bx = ::std::option::Option::Some(value);
6828        self
6829    }
6830    /// Set the `room` field.
6831    #[must_use]
6832    pub fn room(mut self, value: Max70Text) -> PostalAddress24Builder {
6833        self.room = ::std::option::Option::Some(value);
6834        self
6835    }
6836    /// Set the `pst_cd` field.
6837    #[must_use]
6838    pub fn pst_cd(mut self, value: Max16Text) -> PostalAddress24Builder {
6839        self.pst_cd = ::std::option::Option::Some(value);
6840        self
6841    }
6842    /// Set the `twn_nm` field.
6843    #[must_use]
6844    pub fn twn_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
6845        self.twn_nm = ::std::option::Option::Some(value);
6846        self
6847    }
6848    /// Set the `twn_lctn_nm` field.
6849    #[must_use]
6850    pub fn twn_lctn_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
6851        self.twn_lctn_nm = ::std::option::Option::Some(value);
6852        self
6853    }
6854    /// Set the `dstrct_nm` field.
6855    #[must_use]
6856    pub fn dstrct_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
6857        self.dstrct_nm = ::std::option::Option::Some(value);
6858        self
6859    }
6860    /// Set the `ctry_sub_dvsn` field.
6861    #[must_use]
6862    pub fn ctry_sub_dvsn(mut self, value: Max35Text) -> PostalAddress24Builder {
6863        self.ctry_sub_dvsn = ::std::option::Option::Some(value);
6864        self
6865    }
6866    /// Set the `ctry` field.
6867    #[must_use]
6868    pub fn ctry(mut self, value: CountryCode) -> PostalAddress24Builder {
6869        self.ctry = ::std::option::Option::Some(value);
6870        self
6871    }
6872    /// Set the `adr_line` field (replaces any previously added items).
6873    #[must_use]
6874    pub fn adr_line(mut self, value: ::std::vec::Vec<Max70Text>) -> PostalAddress24Builder {
6875        self.adr_line = value;
6876        self
6877    }
6878    /// Append one item to the `adr_line` field.
6879    #[must_use]
6880    pub fn add_adr_line(mut self, value: Max70Text) -> PostalAddress24Builder {
6881        self.adr_line.push(value);
6882        self
6883    }
6884    /// Validate required fields and construct the type.
6885    ///
6886    /// # Errors
6887    ///
6888    /// Returns [`crate::common::BuilderError`] listing the names of any
6889    /// required fields that were not set.
6890    ///
6891    /// # Panics
6892    ///
6893    /// Does not panic — all `.unwrap()` calls are guarded by the
6894    /// missing-field check above.
6895    pub fn build(self) -> ::std::result::Result<PostalAddress24, crate::common::BuilderError> {
6896        ::std::result::Result::Ok(PostalAddress24 {
6897            adr_tp: self.adr_tp,
6898            dept: self.dept,
6899            sub_dept: self.sub_dept,
6900            strt_nm: self.strt_nm,
6901            bldg_nb: self.bldg_nb,
6902            bldg_nm: self.bldg_nm,
6903            flr: self.flr,
6904            pst_bx: self.pst_bx,
6905            room: self.room,
6906            pst_cd: self.pst_cd,
6907            twn_nm: self.twn_nm,
6908            twn_lctn_nm: self.twn_lctn_nm,
6909            dstrct_nm: self.dstrct_nm,
6910            ctry_sub_dvsn: self.ctry_sub_dvsn,
6911            ctry: self.ctry,
6912            adr_line: self.adr_line,
6913        })
6914    }
6915}
6916impl PostalAddress24 {
6917    /// Return a new builder for this type.
6918    #[must_use]
6919    pub fn builder() -> PostalAddress24Builder {
6920        PostalAddress24Builder::default()
6921    }
6922}
6923#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6924pub struct ProxyAccountIdentification1 {
6925    #[serde(rename = "Tp")]
6926    #[serde(skip_serializing_if = "Option::is_none")]
6927    pub tp: Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
6928    #[serde(rename = "Id")]
6929    pub id: Max2048Text,
6930}
6931/// Builder for [`ProxyAccountIdentification1`]. Construct via [`ProxyAccountIdentification1::builder()`].
6932#[allow(clippy::struct_field_names)]
6933#[derive(Default)]
6934pub struct ProxyAccountIdentification1Builder {
6935    tp: ::std::option::Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
6936    id: ::std::option::Option<Max2048Text>,
6937}
6938impl ProxyAccountIdentification1Builder {
6939    /// Set the `tp` field.
6940    #[must_use]
6941    pub fn tp(
6942        mut self,
6943        value: crate::common::ChoiceWrapper<ProxyAccountType1Choice>,
6944    ) -> ProxyAccountIdentification1Builder {
6945        self.tp = ::std::option::Option::Some(value);
6946        self
6947    }
6948    /// Set the `id` field.
6949    #[must_use]
6950    pub fn id(mut self, value: Max2048Text) -> ProxyAccountIdentification1Builder {
6951        self.id = ::std::option::Option::Some(value);
6952        self
6953    }
6954    /// Validate required fields and construct the type.
6955    ///
6956    /// # Errors
6957    ///
6958    /// Returns [`crate::common::BuilderError`] listing the names of any
6959    /// required fields that were not set.
6960    ///
6961    /// # Panics
6962    ///
6963    /// Does not panic — all `.unwrap()` calls are guarded by the
6964    /// missing-field check above.
6965    pub fn build(
6966        self,
6967    ) -> ::std::result::Result<ProxyAccountIdentification1, crate::common::BuilderError> {
6968        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6969        if self.id.is_none() {
6970            missing.push("id".to_owned());
6971        }
6972        if !missing.is_empty() {
6973            return ::std::result::Result::Err(crate::common::BuilderError {
6974                type_name: "ProxyAccountIdentification1".to_owned(),
6975                missing_fields: missing,
6976            });
6977        }
6978        ::std::result::Result::Ok(ProxyAccountIdentification1 {
6979            tp: self.tp,
6980            id: self.id.unwrap(),
6981        })
6982    }
6983}
6984impl ProxyAccountIdentification1 {
6985    /// Return a new builder for this type.
6986    #[must_use]
6987    pub fn builder() -> ProxyAccountIdentification1Builder {
6988        ProxyAccountIdentification1Builder::default()
6989    }
6990}
6991#[allow(clippy::large_enum_variant)]
6992#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6993pub enum ProxyAccountType1Choice {
6994    #[serde(rename = "Cd")]
6995    Cd(ExternalProxyAccountType1Code),
6996    #[serde(rename = "Prtry")]
6997    Prtry(Max35Text),
6998}
6999#[allow(clippy::large_enum_variant)]
7000#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7001pub enum Purpose2Choice {
7002    #[serde(rename = "Cd")]
7003    Cd(ExternalPurpose1Code),
7004    #[serde(rename = "Prtry")]
7005    Prtry(Max35Text),
7006}
7007#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7008pub struct ReferredDocumentInformation7 {
7009    #[serde(rename = "Tp")]
7010    #[serde(skip_serializing_if = "Option::is_none")]
7011    pub tp: Option<ReferredDocumentType4>,
7012    #[serde(rename = "Nb")]
7013    #[serde(skip_serializing_if = "Option::is_none")]
7014    pub nb: Option<Max35Text>,
7015    #[serde(rename = "RltdDt")]
7016    #[serde(skip_serializing_if = "Option::is_none")]
7017    pub rltd_dt: Option<ISODate>,
7018    #[serde(rename = "LineDtls")]
7019    #[serde(default)]
7020    #[serde(skip_serializing_if = "Vec::is_empty")]
7021    pub line_dtls: Vec<DocumentLineInformation1>,
7022}
7023/// Builder for [`ReferredDocumentInformation7`]. Construct via [`ReferredDocumentInformation7::builder()`].
7024#[allow(clippy::struct_field_names)]
7025#[derive(Default)]
7026pub struct ReferredDocumentInformation7Builder {
7027    tp: ::std::option::Option<ReferredDocumentType4>,
7028    nb: ::std::option::Option<Max35Text>,
7029    rltd_dt: ::std::option::Option<ISODate>,
7030    line_dtls: ::std::vec::Vec<DocumentLineInformation1>,
7031}
7032impl ReferredDocumentInformation7Builder {
7033    /// Set the `tp` field.
7034    #[must_use]
7035    pub fn tp(mut self, value: ReferredDocumentType4) -> ReferredDocumentInformation7Builder {
7036        self.tp = ::std::option::Option::Some(value);
7037        self
7038    }
7039    /// Set the `nb` field.
7040    #[must_use]
7041    pub fn nb(mut self, value: Max35Text) -> ReferredDocumentInformation7Builder {
7042        self.nb = ::std::option::Option::Some(value);
7043        self
7044    }
7045    /// Set the `rltd_dt` field.
7046    #[must_use]
7047    pub fn rltd_dt(mut self, value: ISODate) -> ReferredDocumentInformation7Builder {
7048        self.rltd_dt = ::std::option::Option::Some(value);
7049        self
7050    }
7051    /// Set the `line_dtls` field (replaces any previously added items).
7052    #[must_use]
7053    pub fn line_dtls(
7054        mut self,
7055        value: ::std::vec::Vec<DocumentLineInformation1>,
7056    ) -> ReferredDocumentInformation7Builder {
7057        self.line_dtls = value;
7058        self
7059    }
7060    /// Append one item to the `line_dtls` field.
7061    #[must_use]
7062    pub fn add_line_dtls(
7063        mut self,
7064        value: DocumentLineInformation1,
7065    ) -> ReferredDocumentInformation7Builder {
7066        self.line_dtls.push(value);
7067        self
7068    }
7069    /// Validate required fields and construct the type.
7070    ///
7071    /// # Errors
7072    ///
7073    /// Returns [`crate::common::BuilderError`] listing the names of any
7074    /// required fields that were not set.
7075    ///
7076    /// # Panics
7077    ///
7078    /// Does not panic — all `.unwrap()` calls are guarded by the
7079    /// missing-field check above.
7080    pub fn build(
7081        self,
7082    ) -> ::std::result::Result<ReferredDocumentInformation7, crate::common::BuilderError> {
7083        ::std::result::Result::Ok(ReferredDocumentInformation7 {
7084            tp: self.tp,
7085            nb: self.nb,
7086            rltd_dt: self.rltd_dt,
7087            line_dtls: self.line_dtls,
7088        })
7089    }
7090}
7091impl ReferredDocumentInformation7 {
7092    /// Return a new builder for this type.
7093    #[must_use]
7094    pub fn builder() -> ReferredDocumentInformation7Builder {
7095        ReferredDocumentInformation7Builder::default()
7096    }
7097}
7098#[allow(clippy::large_enum_variant)]
7099#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7100pub enum ReferredDocumentType3Choice {
7101    #[serde(rename = "Cd")]
7102    Cd(DocumentType6Code),
7103    #[serde(rename = "Prtry")]
7104    Prtry(Max35Text),
7105}
7106#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7107pub struct ReferredDocumentType4 {
7108    #[serde(rename = "CdOrPrtry")]
7109    pub cd_or_prtry: crate::common::ChoiceWrapper<ReferredDocumentType3Choice>,
7110    #[serde(rename = "Issr")]
7111    #[serde(skip_serializing_if = "Option::is_none")]
7112    pub issr: Option<Max35Text>,
7113}
7114/// Builder for [`ReferredDocumentType4`]. Construct via [`ReferredDocumentType4::builder()`].
7115#[allow(clippy::struct_field_names)]
7116#[derive(Default)]
7117pub struct ReferredDocumentType4Builder {
7118    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<ReferredDocumentType3Choice>>,
7119    issr: ::std::option::Option<Max35Text>,
7120}
7121impl ReferredDocumentType4Builder {
7122    /// Set the `cd_or_prtry` field.
7123    #[must_use]
7124    pub fn cd_or_prtry(
7125        mut self,
7126        value: crate::common::ChoiceWrapper<ReferredDocumentType3Choice>,
7127    ) -> ReferredDocumentType4Builder {
7128        self.cd_or_prtry = ::std::option::Option::Some(value);
7129        self
7130    }
7131    /// Set the `issr` field.
7132    #[must_use]
7133    pub fn issr(mut self, value: Max35Text) -> ReferredDocumentType4Builder {
7134        self.issr = ::std::option::Option::Some(value);
7135        self
7136    }
7137    /// Validate required fields and construct the type.
7138    ///
7139    /// # Errors
7140    ///
7141    /// Returns [`crate::common::BuilderError`] listing the names of any
7142    /// required fields that were not set.
7143    ///
7144    /// # Panics
7145    ///
7146    /// Does not panic — all `.unwrap()` calls are guarded by the
7147    /// missing-field check above.
7148    pub fn build(
7149        self,
7150    ) -> ::std::result::Result<ReferredDocumentType4, crate::common::BuilderError> {
7151        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7152        if self.cd_or_prtry.is_none() {
7153            missing.push("cd_or_prtry".to_owned());
7154        }
7155        if !missing.is_empty() {
7156            return ::std::result::Result::Err(crate::common::BuilderError {
7157                type_name: "ReferredDocumentType4".to_owned(),
7158                missing_fields: missing,
7159            });
7160        }
7161        ::std::result::Result::Ok(ReferredDocumentType4 {
7162            cd_or_prtry: self.cd_or_prtry.unwrap(),
7163            issr: self.issr,
7164        })
7165    }
7166}
7167impl ReferredDocumentType4 {
7168    /// Return a new builder for this type.
7169    #[must_use]
7170    pub fn builder() -> ReferredDocumentType4Builder {
7171        ReferredDocumentType4Builder::default()
7172    }
7173}
7174#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7175pub struct RemittanceAmount2 {
7176    #[serde(rename = "DuePyblAmt")]
7177    #[serde(skip_serializing_if = "Option::is_none")]
7178    pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7179    #[serde(rename = "DscntApldAmt")]
7180    #[serde(default)]
7181    #[serde(skip_serializing_if = "Vec::is_empty")]
7182    pub dscnt_apld_amt: Vec<DiscountAmountAndType1>,
7183    #[serde(rename = "CdtNoteAmt")]
7184    #[serde(skip_serializing_if = "Option::is_none")]
7185    pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7186    #[serde(rename = "TaxAmt")]
7187    #[serde(default)]
7188    #[serde(skip_serializing_if = "Vec::is_empty")]
7189    pub tax_amt: Vec<TaxAmountAndType1>,
7190    #[serde(rename = "AdjstmntAmtAndRsn")]
7191    #[serde(default)]
7192    #[serde(skip_serializing_if = "Vec::is_empty")]
7193    pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
7194    #[serde(rename = "RmtdAmt")]
7195    #[serde(skip_serializing_if = "Option::is_none")]
7196    pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7197}
7198/// Builder for [`RemittanceAmount2`]. Construct via [`RemittanceAmount2::builder()`].
7199#[allow(clippy::struct_field_names)]
7200#[derive(Default)]
7201pub struct RemittanceAmount2Builder {
7202    due_pybl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7203    dscnt_apld_amt: ::std::vec::Vec<DiscountAmountAndType1>,
7204    cdt_note_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7205    tax_amt: ::std::vec::Vec<TaxAmountAndType1>,
7206    adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
7207    rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7208}
7209impl RemittanceAmount2Builder {
7210    /// Set the `due_pybl_amt` field.
7211    #[must_use]
7212    pub fn due_pybl_amt(
7213        mut self,
7214        value: ActiveOrHistoricCurrencyAndAmount,
7215    ) -> RemittanceAmount2Builder {
7216        self.due_pybl_amt = ::std::option::Option::Some(value);
7217        self
7218    }
7219    /// Set the `dscnt_apld_amt` field (replaces any previously added items).
7220    #[must_use]
7221    pub fn dscnt_apld_amt(
7222        mut self,
7223        value: ::std::vec::Vec<DiscountAmountAndType1>,
7224    ) -> RemittanceAmount2Builder {
7225        self.dscnt_apld_amt = value;
7226        self
7227    }
7228    /// Append one item to the `dscnt_apld_amt` field.
7229    #[must_use]
7230    pub fn add_dscnt_apld_amt(mut self, value: DiscountAmountAndType1) -> RemittanceAmount2Builder {
7231        self.dscnt_apld_amt.push(value);
7232        self
7233    }
7234    /// Set the `cdt_note_amt` field.
7235    #[must_use]
7236    pub fn cdt_note_amt(
7237        mut self,
7238        value: ActiveOrHistoricCurrencyAndAmount,
7239    ) -> RemittanceAmount2Builder {
7240        self.cdt_note_amt = ::std::option::Option::Some(value);
7241        self
7242    }
7243    /// Set the `tax_amt` field (replaces any previously added items).
7244    #[must_use]
7245    pub fn tax_amt(
7246        mut self,
7247        value: ::std::vec::Vec<TaxAmountAndType1>,
7248    ) -> RemittanceAmount2Builder {
7249        self.tax_amt = value;
7250        self
7251    }
7252    /// Append one item to the `tax_amt` field.
7253    #[must_use]
7254    pub fn add_tax_amt(mut self, value: TaxAmountAndType1) -> RemittanceAmount2Builder {
7255        self.tax_amt.push(value);
7256        self
7257    }
7258    /// Set the `adjstmnt_amt_and_rsn` field (replaces any previously added items).
7259    #[must_use]
7260    pub fn adjstmnt_amt_and_rsn(
7261        mut self,
7262        value: ::std::vec::Vec<DocumentAdjustment1>,
7263    ) -> RemittanceAmount2Builder {
7264        self.adjstmnt_amt_and_rsn = value;
7265        self
7266    }
7267    /// Append one item to the `adjstmnt_amt_and_rsn` field.
7268    #[must_use]
7269    pub fn add_adjstmnt_amt_and_rsn(
7270        mut self,
7271        value: DocumentAdjustment1,
7272    ) -> RemittanceAmount2Builder {
7273        self.adjstmnt_amt_and_rsn.push(value);
7274        self
7275    }
7276    /// Set the `rmtd_amt` field.
7277    #[must_use]
7278    pub fn rmtd_amt(
7279        mut self,
7280        value: ActiveOrHistoricCurrencyAndAmount,
7281    ) -> RemittanceAmount2Builder {
7282        self.rmtd_amt = ::std::option::Option::Some(value);
7283        self
7284    }
7285    /// Validate required fields and construct the type.
7286    ///
7287    /// # Errors
7288    ///
7289    /// Returns [`crate::common::BuilderError`] listing the names of any
7290    /// required fields that were not set.
7291    ///
7292    /// # Panics
7293    ///
7294    /// Does not panic — all `.unwrap()` calls are guarded by the
7295    /// missing-field check above.
7296    pub fn build(self) -> ::std::result::Result<RemittanceAmount2, crate::common::BuilderError> {
7297        ::std::result::Result::Ok(RemittanceAmount2 {
7298            due_pybl_amt: self.due_pybl_amt,
7299            dscnt_apld_amt: self.dscnt_apld_amt,
7300            cdt_note_amt: self.cdt_note_amt,
7301            tax_amt: self.tax_amt,
7302            adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
7303            rmtd_amt: self.rmtd_amt,
7304        })
7305    }
7306}
7307impl RemittanceAmount2 {
7308    /// Return a new builder for this type.
7309    #[must_use]
7310    pub fn builder() -> RemittanceAmount2Builder {
7311        RemittanceAmount2Builder::default()
7312    }
7313}
7314#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7315pub struct RemittanceAmount3 {
7316    #[serde(rename = "DuePyblAmt")]
7317    #[serde(skip_serializing_if = "Option::is_none")]
7318    pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7319    #[serde(rename = "DscntApldAmt")]
7320    #[serde(default)]
7321    #[serde(skip_serializing_if = "Vec::is_empty")]
7322    pub dscnt_apld_amt: Vec<DiscountAmountAndType1>,
7323    #[serde(rename = "CdtNoteAmt")]
7324    #[serde(skip_serializing_if = "Option::is_none")]
7325    pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7326    #[serde(rename = "TaxAmt")]
7327    #[serde(default)]
7328    #[serde(skip_serializing_if = "Vec::is_empty")]
7329    pub tax_amt: Vec<TaxAmountAndType1>,
7330    #[serde(rename = "AdjstmntAmtAndRsn")]
7331    #[serde(default)]
7332    #[serde(skip_serializing_if = "Vec::is_empty")]
7333    pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
7334    #[serde(rename = "RmtdAmt")]
7335    #[serde(skip_serializing_if = "Option::is_none")]
7336    pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7337}
7338/// Builder for [`RemittanceAmount3`]. Construct via [`RemittanceAmount3::builder()`].
7339#[allow(clippy::struct_field_names)]
7340#[derive(Default)]
7341pub struct RemittanceAmount3Builder {
7342    due_pybl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7343    dscnt_apld_amt: ::std::vec::Vec<DiscountAmountAndType1>,
7344    cdt_note_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7345    tax_amt: ::std::vec::Vec<TaxAmountAndType1>,
7346    adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
7347    rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7348}
7349impl RemittanceAmount3Builder {
7350    /// Set the `due_pybl_amt` field.
7351    #[must_use]
7352    pub fn due_pybl_amt(
7353        mut self,
7354        value: ActiveOrHistoricCurrencyAndAmount,
7355    ) -> RemittanceAmount3Builder {
7356        self.due_pybl_amt = ::std::option::Option::Some(value);
7357        self
7358    }
7359    /// Set the `dscnt_apld_amt` field (replaces any previously added items).
7360    #[must_use]
7361    pub fn dscnt_apld_amt(
7362        mut self,
7363        value: ::std::vec::Vec<DiscountAmountAndType1>,
7364    ) -> RemittanceAmount3Builder {
7365        self.dscnt_apld_amt = value;
7366        self
7367    }
7368    /// Append one item to the `dscnt_apld_amt` field.
7369    #[must_use]
7370    pub fn add_dscnt_apld_amt(mut self, value: DiscountAmountAndType1) -> RemittanceAmount3Builder {
7371        self.dscnt_apld_amt.push(value);
7372        self
7373    }
7374    /// Set the `cdt_note_amt` field.
7375    #[must_use]
7376    pub fn cdt_note_amt(
7377        mut self,
7378        value: ActiveOrHistoricCurrencyAndAmount,
7379    ) -> RemittanceAmount3Builder {
7380        self.cdt_note_amt = ::std::option::Option::Some(value);
7381        self
7382    }
7383    /// Set the `tax_amt` field (replaces any previously added items).
7384    #[must_use]
7385    pub fn tax_amt(
7386        mut self,
7387        value: ::std::vec::Vec<TaxAmountAndType1>,
7388    ) -> RemittanceAmount3Builder {
7389        self.tax_amt = value;
7390        self
7391    }
7392    /// Append one item to the `tax_amt` field.
7393    #[must_use]
7394    pub fn add_tax_amt(mut self, value: TaxAmountAndType1) -> RemittanceAmount3Builder {
7395        self.tax_amt.push(value);
7396        self
7397    }
7398    /// Set the `adjstmnt_amt_and_rsn` field (replaces any previously added items).
7399    #[must_use]
7400    pub fn adjstmnt_amt_and_rsn(
7401        mut self,
7402        value: ::std::vec::Vec<DocumentAdjustment1>,
7403    ) -> RemittanceAmount3Builder {
7404        self.adjstmnt_amt_and_rsn = value;
7405        self
7406    }
7407    /// Append one item to the `adjstmnt_amt_and_rsn` field.
7408    #[must_use]
7409    pub fn add_adjstmnt_amt_and_rsn(
7410        mut self,
7411        value: DocumentAdjustment1,
7412    ) -> RemittanceAmount3Builder {
7413        self.adjstmnt_amt_and_rsn.push(value);
7414        self
7415    }
7416    /// Set the `rmtd_amt` field.
7417    #[must_use]
7418    pub fn rmtd_amt(
7419        mut self,
7420        value: ActiveOrHistoricCurrencyAndAmount,
7421    ) -> RemittanceAmount3Builder {
7422        self.rmtd_amt = ::std::option::Option::Some(value);
7423        self
7424    }
7425    /// Validate required fields and construct the type.
7426    ///
7427    /// # Errors
7428    ///
7429    /// Returns [`crate::common::BuilderError`] listing the names of any
7430    /// required fields that were not set.
7431    ///
7432    /// # Panics
7433    ///
7434    /// Does not panic — all `.unwrap()` calls are guarded by the
7435    /// missing-field check above.
7436    pub fn build(self) -> ::std::result::Result<RemittanceAmount3, crate::common::BuilderError> {
7437        ::std::result::Result::Ok(RemittanceAmount3 {
7438            due_pybl_amt: self.due_pybl_amt,
7439            dscnt_apld_amt: self.dscnt_apld_amt,
7440            cdt_note_amt: self.cdt_note_amt,
7441            tax_amt: self.tax_amt,
7442            adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
7443            rmtd_amt: self.rmtd_amt,
7444        })
7445    }
7446}
7447impl RemittanceAmount3 {
7448    /// Return a new builder for this type.
7449    #[must_use]
7450    pub fn builder() -> RemittanceAmount3Builder {
7451        RemittanceAmount3Builder::default()
7452    }
7453}
7454#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7455pub struct RemittanceInformation2 {
7456    #[serde(rename = "Ustrd")]
7457    #[serde(default)]
7458    #[serde(skip_serializing_if = "Vec::is_empty")]
7459    pub ustrd: Vec<Max140Text>,
7460}
7461/// Builder for [`RemittanceInformation2`]. Construct via [`RemittanceInformation2::builder()`].
7462#[allow(clippy::struct_field_names)]
7463#[derive(Default)]
7464pub struct RemittanceInformation2Builder {
7465    ustrd: ::std::vec::Vec<Max140Text>,
7466}
7467impl RemittanceInformation2Builder {
7468    /// Set the `ustrd` field (replaces any previously added items).
7469    #[must_use]
7470    pub fn ustrd(mut self, value: ::std::vec::Vec<Max140Text>) -> RemittanceInformation2Builder {
7471        self.ustrd = value;
7472        self
7473    }
7474    /// Append one item to the `ustrd` field.
7475    #[must_use]
7476    pub fn add_ustrd(mut self, value: Max140Text) -> RemittanceInformation2Builder {
7477        self.ustrd.push(value);
7478        self
7479    }
7480    /// Validate required fields and construct the type.
7481    ///
7482    /// # Errors
7483    ///
7484    /// Returns [`crate::common::BuilderError`] listing the names of any
7485    /// required fields that were not set.
7486    ///
7487    /// # Panics
7488    ///
7489    /// Does not panic — all `.unwrap()` calls are guarded by the
7490    /// missing-field check above.
7491    pub fn build(
7492        self,
7493    ) -> ::std::result::Result<RemittanceInformation2, crate::common::BuilderError> {
7494        ::std::result::Result::Ok(RemittanceInformation2 { ustrd: self.ustrd })
7495    }
7496}
7497impl RemittanceInformation2 {
7498    /// Return a new builder for this type.
7499    #[must_use]
7500    pub fn builder() -> RemittanceInformation2Builder {
7501        RemittanceInformation2Builder::default()
7502    }
7503}
7504#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7505pub struct RemittanceInformation21 {
7506    #[serde(rename = "Ustrd")]
7507    #[serde(default)]
7508    #[serde(skip_serializing_if = "Vec::is_empty")]
7509    pub ustrd: Vec<Max140Text>,
7510    #[serde(rename = "Strd")]
7511    #[serde(default)]
7512    #[serde(skip_serializing_if = "Vec::is_empty")]
7513    pub strd: Vec<StructuredRemittanceInformation17>,
7514}
7515/// Builder for [`RemittanceInformation21`]. Construct via [`RemittanceInformation21::builder()`].
7516#[allow(clippy::struct_field_names)]
7517#[derive(Default)]
7518pub struct RemittanceInformation21Builder {
7519    ustrd: ::std::vec::Vec<Max140Text>,
7520    strd: ::std::vec::Vec<StructuredRemittanceInformation17>,
7521}
7522impl RemittanceInformation21Builder {
7523    /// Set the `ustrd` field (replaces any previously added items).
7524    #[must_use]
7525    pub fn ustrd(mut self, value: ::std::vec::Vec<Max140Text>) -> RemittanceInformation21Builder {
7526        self.ustrd = value;
7527        self
7528    }
7529    /// Append one item to the `ustrd` field.
7530    #[must_use]
7531    pub fn add_ustrd(mut self, value: Max140Text) -> RemittanceInformation21Builder {
7532        self.ustrd.push(value);
7533        self
7534    }
7535    /// Set the `strd` field (replaces any previously added items).
7536    #[must_use]
7537    pub fn strd(
7538        mut self,
7539        value: ::std::vec::Vec<StructuredRemittanceInformation17>,
7540    ) -> RemittanceInformation21Builder {
7541        self.strd = value;
7542        self
7543    }
7544    /// Append one item to the `strd` field.
7545    #[must_use]
7546    pub fn add_strd(
7547        mut self,
7548        value: StructuredRemittanceInformation17,
7549    ) -> RemittanceInformation21Builder {
7550        self.strd.push(value);
7551        self
7552    }
7553    /// Validate required fields and construct the type.
7554    ///
7555    /// # Errors
7556    ///
7557    /// Returns [`crate::common::BuilderError`] listing the names of any
7558    /// required fields that were not set.
7559    ///
7560    /// # Panics
7561    ///
7562    /// Does not panic — all `.unwrap()` calls are guarded by the
7563    /// missing-field check above.
7564    pub fn build(
7565        self,
7566    ) -> ::std::result::Result<RemittanceInformation21, crate::common::BuilderError> {
7567        ::std::result::Result::Ok(RemittanceInformation21 {
7568            ustrd: self.ustrd,
7569            strd: self.strd,
7570        })
7571    }
7572}
7573impl RemittanceInformation21 {
7574    /// Return a new builder for this type.
7575    #[must_use]
7576    pub fn builder() -> RemittanceInformation21Builder {
7577        RemittanceInformation21Builder::default()
7578    }
7579}
7580#[allow(clippy::large_enum_variant)]
7581#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7582pub enum ServiceLevel8Choice {
7583    #[serde(rename = "Cd")]
7584    Cd(ExternalServiceLevel1Code),
7585    #[serde(rename = "Prtry")]
7586    Prtry(Max35Text),
7587}
7588#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7589pub struct SettlementDateTimeIndication1 {
7590    #[serde(rename = "DbtDtTm")]
7591    #[serde(skip_serializing_if = "Option::is_none")]
7592    pub dbt_dt_tm: Option<ISODateTime>,
7593    #[serde(rename = "CdtDtTm")]
7594    #[serde(skip_serializing_if = "Option::is_none")]
7595    pub cdt_dt_tm: Option<ISODateTime>,
7596}
7597/// Builder for [`SettlementDateTimeIndication1`]. Construct via [`SettlementDateTimeIndication1::builder()`].
7598#[allow(clippy::struct_field_names)]
7599#[derive(Default)]
7600pub struct SettlementDateTimeIndication1Builder {
7601    dbt_dt_tm: ::std::option::Option<ISODateTime>,
7602    cdt_dt_tm: ::std::option::Option<ISODateTime>,
7603}
7604impl SettlementDateTimeIndication1Builder {
7605    /// Set the `dbt_dt_tm` field.
7606    #[must_use]
7607    pub fn dbt_dt_tm(mut self, value: ISODateTime) -> SettlementDateTimeIndication1Builder {
7608        self.dbt_dt_tm = ::std::option::Option::Some(value);
7609        self
7610    }
7611    /// Set the `cdt_dt_tm` field.
7612    #[must_use]
7613    pub fn cdt_dt_tm(mut self, value: ISODateTime) -> SettlementDateTimeIndication1Builder {
7614        self.cdt_dt_tm = ::std::option::Option::Some(value);
7615        self
7616    }
7617    /// Validate required fields and construct the type.
7618    ///
7619    /// # Errors
7620    ///
7621    /// Returns [`crate::common::BuilderError`] listing the names of any
7622    /// required fields that were not set.
7623    ///
7624    /// # Panics
7625    ///
7626    /// Does not panic — all `.unwrap()` calls are guarded by the
7627    /// missing-field check above.
7628    pub fn build(
7629        self,
7630    ) -> ::std::result::Result<SettlementDateTimeIndication1, crate::common::BuilderError> {
7631        ::std::result::Result::Ok(SettlementDateTimeIndication1 {
7632            dbt_dt_tm: self.dbt_dt_tm,
7633            cdt_dt_tm: self.cdt_dt_tm,
7634        })
7635    }
7636}
7637impl SettlementDateTimeIndication1 {
7638    /// Return a new builder for this type.
7639    #[must_use]
7640    pub fn builder() -> SettlementDateTimeIndication1Builder {
7641        SettlementDateTimeIndication1Builder::default()
7642    }
7643}
7644#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7645pub struct SettlementInstruction11 {
7646    #[serde(rename = "SttlmMtd")]
7647    pub sttlm_mtd: SettlementMethod1Code,
7648    #[serde(rename = "SttlmAcct")]
7649    #[serde(skip_serializing_if = "Option::is_none")]
7650    pub sttlm_acct: Option<CashAccount40>,
7651    #[serde(rename = "ClrSys")]
7652    #[serde(skip_serializing_if = "Option::is_none")]
7653    pub clr_sys: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
7654    #[serde(rename = "InstgRmbrsmntAgt")]
7655    #[serde(skip_serializing_if = "Option::is_none")]
7656    pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7657    #[serde(rename = "InstgRmbrsmntAgtAcct")]
7658    #[serde(skip_serializing_if = "Option::is_none")]
7659    pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
7660    #[serde(rename = "InstdRmbrsmntAgt")]
7661    #[serde(skip_serializing_if = "Option::is_none")]
7662    pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7663    #[serde(rename = "InstdRmbrsmntAgtAcct")]
7664    #[serde(skip_serializing_if = "Option::is_none")]
7665    pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
7666    #[serde(rename = "ThrdRmbrsmntAgt")]
7667    #[serde(skip_serializing_if = "Option::is_none")]
7668    pub thrd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7669    #[serde(rename = "ThrdRmbrsmntAgtAcct")]
7670    #[serde(skip_serializing_if = "Option::is_none")]
7671    pub thrd_rmbrsmnt_agt_acct: Option<CashAccount40>,
7672}
7673/// Builder for [`SettlementInstruction11`]. Construct via [`SettlementInstruction11::builder()`].
7674#[allow(clippy::struct_field_names)]
7675#[derive(Default)]
7676pub struct SettlementInstruction11Builder {
7677    sttlm_mtd: ::std::option::Option<SettlementMethod1Code>,
7678    sttlm_acct: ::std::option::Option<CashAccount40>,
7679    clr_sys:
7680        ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
7681    instg_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7682    instg_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
7683    instd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7684    instd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
7685    thrd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7686    thrd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
7687}
7688impl SettlementInstruction11Builder {
7689    /// Set the `sttlm_mtd` field.
7690    #[must_use]
7691    pub fn sttlm_mtd(mut self, value: SettlementMethod1Code) -> SettlementInstruction11Builder {
7692        self.sttlm_mtd = ::std::option::Option::Some(value);
7693        self
7694    }
7695    /// Set the `sttlm_acct` field.
7696    #[must_use]
7697    pub fn sttlm_acct(mut self, value: CashAccount40) -> SettlementInstruction11Builder {
7698        self.sttlm_acct = ::std::option::Option::Some(value);
7699        self
7700    }
7701    /// Set the `clr_sys` field.
7702    #[must_use]
7703    pub fn clr_sys(
7704        mut self,
7705        value: crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>,
7706    ) -> SettlementInstruction11Builder {
7707        self.clr_sys = ::std::option::Option::Some(value);
7708        self
7709    }
7710    /// Set the `instg_rmbrsmnt_agt` field.
7711    #[must_use]
7712    pub fn instg_rmbrsmnt_agt(
7713        mut self,
7714        value: BranchAndFinancialInstitutionIdentification6,
7715    ) -> SettlementInstruction11Builder {
7716        self.instg_rmbrsmnt_agt = ::std::option::Option::Some(value);
7717        self
7718    }
7719    /// Set the `instg_rmbrsmnt_agt_acct` field.
7720    #[must_use]
7721    pub fn instg_rmbrsmnt_agt_acct(
7722        mut self,
7723        value: CashAccount40,
7724    ) -> SettlementInstruction11Builder {
7725        self.instg_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
7726        self
7727    }
7728    /// Set the `instd_rmbrsmnt_agt` field.
7729    #[must_use]
7730    pub fn instd_rmbrsmnt_agt(
7731        mut self,
7732        value: BranchAndFinancialInstitutionIdentification6,
7733    ) -> SettlementInstruction11Builder {
7734        self.instd_rmbrsmnt_agt = ::std::option::Option::Some(value);
7735        self
7736    }
7737    /// Set the `instd_rmbrsmnt_agt_acct` field.
7738    #[must_use]
7739    pub fn instd_rmbrsmnt_agt_acct(
7740        mut self,
7741        value: CashAccount40,
7742    ) -> SettlementInstruction11Builder {
7743        self.instd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
7744        self
7745    }
7746    /// Set the `thrd_rmbrsmnt_agt` field.
7747    #[must_use]
7748    pub fn thrd_rmbrsmnt_agt(
7749        mut self,
7750        value: BranchAndFinancialInstitutionIdentification6,
7751    ) -> SettlementInstruction11Builder {
7752        self.thrd_rmbrsmnt_agt = ::std::option::Option::Some(value);
7753        self
7754    }
7755    /// Set the `thrd_rmbrsmnt_agt_acct` field.
7756    #[must_use]
7757    pub fn thrd_rmbrsmnt_agt_acct(
7758        mut self,
7759        value: CashAccount40,
7760    ) -> SettlementInstruction11Builder {
7761        self.thrd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
7762        self
7763    }
7764    /// Validate required fields and construct the type.
7765    ///
7766    /// # Errors
7767    ///
7768    /// Returns [`crate::common::BuilderError`] listing the names of any
7769    /// required fields that were not set.
7770    ///
7771    /// # Panics
7772    ///
7773    /// Does not panic — all `.unwrap()` calls are guarded by the
7774    /// missing-field check above.
7775    pub fn build(
7776        self,
7777    ) -> ::std::result::Result<SettlementInstruction11, crate::common::BuilderError> {
7778        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7779        if self.sttlm_mtd.is_none() {
7780            missing.push("sttlm_mtd".to_owned());
7781        }
7782        if !missing.is_empty() {
7783            return ::std::result::Result::Err(crate::common::BuilderError {
7784                type_name: "SettlementInstruction11".to_owned(),
7785                missing_fields: missing,
7786            });
7787        }
7788        ::std::result::Result::Ok(SettlementInstruction11 {
7789            sttlm_mtd: self.sttlm_mtd.unwrap(),
7790            sttlm_acct: self.sttlm_acct,
7791            clr_sys: self.clr_sys,
7792            instg_rmbrsmnt_agt: self.instg_rmbrsmnt_agt,
7793            instg_rmbrsmnt_agt_acct: self.instg_rmbrsmnt_agt_acct,
7794            instd_rmbrsmnt_agt: self.instd_rmbrsmnt_agt,
7795            instd_rmbrsmnt_agt_acct: self.instd_rmbrsmnt_agt_acct,
7796            thrd_rmbrsmnt_agt: self.thrd_rmbrsmnt_agt,
7797            thrd_rmbrsmnt_agt_acct: self.thrd_rmbrsmnt_agt_acct,
7798        })
7799    }
7800}
7801impl SettlementInstruction11 {
7802    /// Return a new builder for this type.
7803    #[must_use]
7804    pub fn builder() -> SettlementInstruction11Builder {
7805        SettlementInstruction11Builder::default()
7806    }
7807}
7808#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7809pub struct SettlementTimeRequest2 {
7810    #[serde(rename = "CLSTm")]
7811    #[serde(skip_serializing_if = "Option::is_none")]
7812    pub cls_tm: Option<ISOTime>,
7813    #[serde(rename = "TillTm")]
7814    #[serde(skip_serializing_if = "Option::is_none")]
7815    pub till_tm: Option<ISOTime>,
7816    #[serde(rename = "FrTm")]
7817    #[serde(skip_serializing_if = "Option::is_none")]
7818    pub fr_tm: Option<ISOTime>,
7819    #[serde(rename = "RjctTm")]
7820    #[serde(skip_serializing_if = "Option::is_none")]
7821    pub rjct_tm: Option<ISOTime>,
7822}
7823/// Builder for [`SettlementTimeRequest2`]. Construct via [`SettlementTimeRequest2::builder()`].
7824#[allow(clippy::struct_field_names)]
7825#[derive(Default)]
7826pub struct SettlementTimeRequest2Builder {
7827    cls_tm: ::std::option::Option<ISOTime>,
7828    till_tm: ::std::option::Option<ISOTime>,
7829    fr_tm: ::std::option::Option<ISOTime>,
7830    rjct_tm: ::std::option::Option<ISOTime>,
7831}
7832impl SettlementTimeRequest2Builder {
7833    /// Set the `cls_tm` field.
7834    #[must_use]
7835    pub fn cls_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
7836        self.cls_tm = ::std::option::Option::Some(value);
7837        self
7838    }
7839    /// Set the `till_tm` field.
7840    #[must_use]
7841    pub fn till_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
7842        self.till_tm = ::std::option::Option::Some(value);
7843        self
7844    }
7845    /// Set the `fr_tm` field.
7846    #[must_use]
7847    pub fn fr_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
7848        self.fr_tm = ::std::option::Option::Some(value);
7849        self
7850    }
7851    /// Set the `rjct_tm` field.
7852    #[must_use]
7853    pub fn rjct_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
7854        self.rjct_tm = ::std::option::Option::Some(value);
7855        self
7856    }
7857    /// Validate required fields and construct the type.
7858    ///
7859    /// # Errors
7860    ///
7861    /// Returns [`crate::common::BuilderError`] listing the names of any
7862    /// required fields that were not set.
7863    ///
7864    /// # Panics
7865    ///
7866    /// Does not panic — all `.unwrap()` calls are guarded by the
7867    /// missing-field check above.
7868    pub fn build(
7869        self,
7870    ) -> ::std::result::Result<SettlementTimeRequest2, crate::common::BuilderError> {
7871        ::std::result::Result::Ok(SettlementTimeRequest2 {
7872            cls_tm: self.cls_tm,
7873            till_tm: self.till_tm,
7874            fr_tm: self.fr_tm,
7875            rjct_tm: self.rjct_tm,
7876        })
7877    }
7878}
7879impl SettlementTimeRequest2 {
7880    /// Return a new builder for this type.
7881    #[must_use]
7882    pub fn builder() -> SettlementTimeRequest2Builder {
7883        SettlementTimeRequest2Builder::default()
7884    }
7885}
7886#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7887pub struct StructuredRemittanceInformation17 {
7888    #[serde(rename = "RfrdDocInf")]
7889    #[serde(default)]
7890    #[serde(skip_serializing_if = "Vec::is_empty")]
7891    pub rfrd_doc_inf: Vec<ReferredDocumentInformation7>,
7892    #[serde(rename = "RfrdDocAmt")]
7893    #[serde(skip_serializing_if = "Option::is_none")]
7894    pub rfrd_doc_amt: Option<RemittanceAmount2>,
7895    #[serde(rename = "CdtrRefInf")]
7896    #[serde(skip_serializing_if = "Option::is_none")]
7897    pub cdtr_ref_inf: Option<CreditorReferenceInformation2>,
7898    #[serde(rename = "Invcr")]
7899    #[serde(skip_serializing_if = "Option::is_none")]
7900    pub invcr: Option<PartyIdentification135>,
7901    #[serde(rename = "Invcee")]
7902    #[serde(skip_serializing_if = "Option::is_none")]
7903    pub invcee: Option<PartyIdentification135>,
7904    #[serde(rename = "TaxRmt")]
7905    #[serde(skip_serializing_if = "Option::is_none")]
7906    pub tax_rmt: Option<TaxData1>,
7907    #[serde(rename = "GrnshmtRmt")]
7908    #[serde(skip_serializing_if = "Option::is_none")]
7909    pub grnshmt_rmt: Option<Garnishment3>,
7910    #[serde(rename = "AddtlRmtInf")]
7911    /// Maximum 3 occurrences.
7912    #[serde(default)]
7913    #[serde(skip_serializing_if = "Vec::is_empty")]
7914    pub addtl_rmt_inf: Vec<Max140Text>,
7915}
7916/// Builder for [`StructuredRemittanceInformation17`]. Construct via [`StructuredRemittanceInformation17::builder()`].
7917#[allow(clippy::struct_field_names)]
7918#[derive(Default)]
7919pub struct StructuredRemittanceInformation17Builder {
7920    rfrd_doc_inf: ::std::vec::Vec<ReferredDocumentInformation7>,
7921    rfrd_doc_amt: ::std::option::Option<RemittanceAmount2>,
7922    cdtr_ref_inf: ::std::option::Option<CreditorReferenceInformation2>,
7923    invcr: ::std::option::Option<PartyIdentification135>,
7924    invcee: ::std::option::Option<PartyIdentification135>,
7925    tax_rmt: ::std::option::Option<TaxData1>,
7926    grnshmt_rmt: ::std::option::Option<Garnishment3>,
7927    addtl_rmt_inf: ::std::vec::Vec<Max140Text>,
7928}
7929impl StructuredRemittanceInformation17Builder {
7930    /// Set the `rfrd_doc_inf` field (replaces any previously added items).
7931    #[must_use]
7932    pub fn rfrd_doc_inf(
7933        mut self,
7934        value: ::std::vec::Vec<ReferredDocumentInformation7>,
7935    ) -> StructuredRemittanceInformation17Builder {
7936        self.rfrd_doc_inf = value;
7937        self
7938    }
7939    /// Append one item to the `rfrd_doc_inf` field.
7940    #[must_use]
7941    pub fn add_rfrd_doc_inf(
7942        mut self,
7943        value: ReferredDocumentInformation7,
7944    ) -> StructuredRemittanceInformation17Builder {
7945        self.rfrd_doc_inf.push(value);
7946        self
7947    }
7948    /// Set the `rfrd_doc_amt` field.
7949    #[must_use]
7950    pub fn rfrd_doc_amt(
7951        mut self,
7952        value: RemittanceAmount2,
7953    ) -> StructuredRemittanceInformation17Builder {
7954        self.rfrd_doc_amt = ::std::option::Option::Some(value);
7955        self
7956    }
7957    /// Set the `cdtr_ref_inf` field.
7958    #[must_use]
7959    pub fn cdtr_ref_inf(
7960        mut self,
7961        value: CreditorReferenceInformation2,
7962    ) -> StructuredRemittanceInformation17Builder {
7963        self.cdtr_ref_inf = ::std::option::Option::Some(value);
7964        self
7965    }
7966    /// Set the `invcr` field.
7967    #[must_use]
7968    pub fn invcr(
7969        mut self,
7970        value: PartyIdentification135,
7971    ) -> StructuredRemittanceInformation17Builder {
7972        self.invcr = ::std::option::Option::Some(value);
7973        self
7974    }
7975    /// Set the `invcee` field.
7976    #[must_use]
7977    pub fn invcee(
7978        mut self,
7979        value: PartyIdentification135,
7980    ) -> StructuredRemittanceInformation17Builder {
7981        self.invcee = ::std::option::Option::Some(value);
7982        self
7983    }
7984    /// Set the `tax_rmt` field.
7985    #[must_use]
7986    pub fn tax_rmt(mut self, value: TaxData1) -> StructuredRemittanceInformation17Builder {
7987        self.tax_rmt = ::std::option::Option::Some(value);
7988        self
7989    }
7990    /// Set the `grnshmt_rmt` field.
7991    #[must_use]
7992    pub fn grnshmt_rmt(mut self, value: Garnishment3) -> StructuredRemittanceInformation17Builder {
7993        self.grnshmt_rmt = ::std::option::Option::Some(value);
7994        self
7995    }
7996    /// Set the `addtl_rmt_inf` field (replaces any previously added items).
7997    #[must_use]
7998    pub fn addtl_rmt_inf(
7999        mut self,
8000        value: ::std::vec::Vec<Max140Text>,
8001    ) -> StructuredRemittanceInformation17Builder {
8002        self.addtl_rmt_inf = value;
8003        self
8004    }
8005    /// Append one item to the `addtl_rmt_inf` field.
8006    #[must_use]
8007    pub fn add_addtl_rmt_inf(
8008        mut self,
8009        value: Max140Text,
8010    ) -> StructuredRemittanceInformation17Builder {
8011        self.addtl_rmt_inf.push(value);
8012        self
8013    }
8014    /// Validate required fields and construct the type.
8015    ///
8016    /// # Errors
8017    ///
8018    /// Returns [`crate::common::BuilderError`] listing the names of any
8019    /// required fields that were not set.
8020    ///
8021    /// # Panics
8022    ///
8023    /// Does not panic — all `.unwrap()` calls are guarded by the
8024    /// missing-field check above.
8025    pub fn build(
8026        self,
8027    ) -> ::std::result::Result<StructuredRemittanceInformation17, crate::common::BuilderError> {
8028        ::std::result::Result::Ok(StructuredRemittanceInformation17 {
8029            rfrd_doc_inf: self.rfrd_doc_inf,
8030            rfrd_doc_amt: self.rfrd_doc_amt,
8031            cdtr_ref_inf: self.cdtr_ref_inf,
8032            invcr: self.invcr,
8033            invcee: self.invcee,
8034            tax_rmt: self.tax_rmt,
8035            grnshmt_rmt: self.grnshmt_rmt,
8036            addtl_rmt_inf: self.addtl_rmt_inf,
8037        })
8038    }
8039}
8040impl StructuredRemittanceInformation17 {
8041    /// Return a new builder for this type.
8042    #[must_use]
8043    pub fn builder() -> StructuredRemittanceInformation17Builder {
8044        StructuredRemittanceInformation17Builder::default()
8045    }
8046}
8047#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8048pub struct SupplementaryData1 {
8049    #[serde(rename = "PlcAndNm")]
8050    #[serde(skip_serializing_if = "Option::is_none")]
8051    pub plc_and_nm: Option<Max350Text>,
8052    #[serde(rename = "Envlp")]
8053    pub envlp: SupplementaryDataEnvelope1,
8054}
8055/// Builder for [`SupplementaryData1`]. Construct via [`SupplementaryData1::builder()`].
8056#[allow(clippy::struct_field_names)]
8057#[derive(Default)]
8058pub struct SupplementaryData1Builder {
8059    plc_and_nm: ::std::option::Option<Max350Text>,
8060    envlp: ::std::option::Option<SupplementaryDataEnvelope1>,
8061}
8062impl SupplementaryData1Builder {
8063    /// Set the `plc_and_nm` field.
8064    #[must_use]
8065    pub fn plc_and_nm(mut self, value: Max350Text) -> SupplementaryData1Builder {
8066        self.plc_and_nm = ::std::option::Option::Some(value);
8067        self
8068    }
8069    /// Set the `envlp` field.
8070    #[must_use]
8071    pub fn envlp(mut self, value: SupplementaryDataEnvelope1) -> SupplementaryData1Builder {
8072        self.envlp = ::std::option::Option::Some(value);
8073        self
8074    }
8075    /// Validate required fields and construct the type.
8076    ///
8077    /// # Errors
8078    ///
8079    /// Returns [`crate::common::BuilderError`] listing the names of any
8080    /// required fields that were not set.
8081    ///
8082    /// # Panics
8083    ///
8084    /// Does not panic — all `.unwrap()` calls are guarded by the
8085    /// missing-field check above.
8086    pub fn build(self) -> ::std::result::Result<SupplementaryData1, crate::common::BuilderError> {
8087        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8088        if self.envlp.is_none() {
8089            missing.push("envlp".to_owned());
8090        }
8091        if !missing.is_empty() {
8092            return ::std::result::Result::Err(crate::common::BuilderError {
8093                type_name: "SupplementaryData1".to_owned(),
8094                missing_fields: missing,
8095            });
8096        }
8097        ::std::result::Result::Ok(SupplementaryData1 {
8098            plc_and_nm: self.plc_and_nm,
8099            envlp: self.envlp.unwrap(),
8100        })
8101    }
8102}
8103impl SupplementaryData1 {
8104    /// Return a new builder for this type.
8105    #[must_use]
8106    pub fn builder() -> SupplementaryData1Builder {
8107        SupplementaryData1Builder::default()
8108    }
8109}
8110/// Accepts content from namespace: `##any`
8111#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8112pub struct SupplementaryDataEnvelope1 {
8113    #[serde(rename = "$value")]
8114    pub value: String,
8115}
8116#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8117pub struct TaxAmount3 {
8118    #[serde(rename = "Rate")]
8119    #[serde(skip_serializing_if = "Option::is_none")]
8120    pub rate: Option<PercentageRate>,
8121    #[serde(rename = "TaxblBaseAmt")]
8122    #[serde(skip_serializing_if = "Option::is_none")]
8123    pub taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8124    #[serde(rename = "TtlAmt")]
8125    #[serde(skip_serializing_if = "Option::is_none")]
8126    pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8127    #[serde(rename = "Dtls")]
8128    #[serde(default)]
8129    #[serde(skip_serializing_if = "Vec::is_empty")]
8130    pub dtls: Vec<TaxRecordDetails3>,
8131}
8132/// Builder for [`TaxAmount3`]. Construct via [`TaxAmount3::builder()`].
8133#[allow(clippy::struct_field_names)]
8134#[derive(Default)]
8135pub struct TaxAmount3Builder {
8136    rate: ::std::option::Option<PercentageRate>,
8137    taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8138    ttl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8139    dtls: ::std::vec::Vec<TaxRecordDetails3>,
8140}
8141impl TaxAmount3Builder {
8142    /// Set the `rate` field.
8143    #[must_use]
8144    pub fn rate(mut self, value: PercentageRate) -> TaxAmount3Builder {
8145        self.rate = ::std::option::Option::Some(value);
8146        self
8147    }
8148    /// Set the `taxbl_base_amt` field.
8149    #[must_use]
8150    pub fn taxbl_base_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
8151        self.taxbl_base_amt = ::std::option::Option::Some(value);
8152        self
8153    }
8154    /// Set the `ttl_amt` field.
8155    #[must_use]
8156    pub fn ttl_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
8157        self.ttl_amt = ::std::option::Option::Some(value);
8158        self
8159    }
8160    /// Set the `dtls` field (replaces any previously added items).
8161    #[must_use]
8162    pub fn dtls(mut self, value: ::std::vec::Vec<TaxRecordDetails3>) -> TaxAmount3Builder {
8163        self.dtls = value;
8164        self
8165    }
8166    /// Append one item to the `dtls` field.
8167    #[must_use]
8168    pub fn add_dtls(mut self, value: TaxRecordDetails3) -> TaxAmount3Builder {
8169        self.dtls.push(value);
8170        self
8171    }
8172    /// Validate required fields and construct the type.
8173    ///
8174    /// # Errors
8175    ///
8176    /// Returns [`crate::common::BuilderError`] listing the names of any
8177    /// required fields that were not set.
8178    ///
8179    /// # Panics
8180    ///
8181    /// Does not panic — all `.unwrap()` calls are guarded by the
8182    /// missing-field check above.
8183    pub fn build(self) -> ::std::result::Result<TaxAmount3, crate::common::BuilderError> {
8184        ::std::result::Result::Ok(TaxAmount3 {
8185            rate: self.rate,
8186            taxbl_base_amt: self.taxbl_base_amt,
8187            ttl_amt: self.ttl_amt,
8188            dtls: self.dtls,
8189        })
8190    }
8191}
8192impl TaxAmount3 {
8193    /// Return a new builder for this type.
8194    #[must_use]
8195    pub fn builder() -> TaxAmount3Builder {
8196        TaxAmount3Builder::default()
8197    }
8198}
8199#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8200pub struct TaxAmountAndType1 {
8201    #[serde(rename = "Tp")]
8202    #[serde(skip_serializing_if = "Option::is_none")]
8203    pub tp: Option<crate::common::ChoiceWrapper<TaxAmountType1Choice>>,
8204    #[serde(rename = "Amt")]
8205    pub amt: ActiveOrHistoricCurrencyAndAmount,
8206}
8207/// Builder for [`TaxAmountAndType1`]. Construct via [`TaxAmountAndType1::builder()`].
8208#[allow(clippy::struct_field_names)]
8209#[derive(Default)]
8210pub struct TaxAmountAndType1Builder {
8211    tp: ::std::option::Option<crate::common::ChoiceWrapper<TaxAmountType1Choice>>,
8212    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8213}
8214impl TaxAmountAndType1Builder {
8215    /// Set the `tp` field.
8216    #[must_use]
8217    pub fn tp(
8218        mut self,
8219        value: crate::common::ChoiceWrapper<TaxAmountType1Choice>,
8220    ) -> TaxAmountAndType1Builder {
8221        self.tp = ::std::option::Option::Some(value);
8222        self
8223    }
8224    /// Set the `amt` field.
8225    #[must_use]
8226    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmountAndType1Builder {
8227        self.amt = ::std::option::Option::Some(value);
8228        self
8229    }
8230    /// Validate required fields and construct the type.
8231    ///
8232    /// # Errors
8233    ///
8234    /// Returns [`crate::common::BuilderError`] listing the names of any
8235    /// required fields that were not set.
8236    ///
8237    /// # Panics
8238    ///
8239    /// Does not panic — all `.unwrap()` calls are guarded by the
8240    /// missing-field check above.
8241    pub fn build(self) -> ::std::result::Result<TaxAmountAndType1, crate::common::BuilderError> {
8242        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8243        if self.amt.is_none() {
8244            missing.push("amt".to_owned());
8245        }
8246        if !missing.is_empty() {
8247            return ::std::result::Result::Err(crate::common::BuilderError {
8248                type_name: "TaxAmountAndType1".to_owned(),
8249                missing_fields: missing,
8250            });
8251        }
8252        ::std::result::Result::Ok(TaxAmountAndType1 {
8253            tp: self.tp,
8254            amt: self.amt.unwrap(),
8255        })
8256    }
8257}
8258impl TaxAmountAndType1 {
8259    /// Return a new builder for this type.
8260    #[must_use]
8261    pub fn builder() -> TaxAmountAndType1Builder {
8262        TaxAmountAndType1Builder::default()
8263    }
8264}
8265#[allow(clippy::large_enum_variant)]
8266#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8267pub enum TaxAmountType1Choice {
8268    #[serde(rename = "Cd")]
8269    Cd(ExternalTaxAmountType1Code),
8270    #[serde(rename = "Prtry")]
8271    Prtry(Max35Text),
8272}
8273#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8274pub struct TaxAuthorisation1 {
8275    #[serde(rename = "Titl")]
8276    #[serde(skip_serializing_if = "Option::is_none")]
8277    pub titl: Option<Max35Text>,
8278    #[serde(rename = "Nm")]
8279    #[serde(skip_serializing_if = "Option::is_none")]
8280    pub nm: Option<Max140Text>,
8281}
8282/// Builder for [`TaxAuthorisation1`]. Construct via [`TaxAuthorisation1::builder()`].
8283#[allow(clippy::struct_field_names)]
8284#[derive(Default)]
8285pub struct TaxAuthorisation1Builder {
8286    titl: ::std::option::Option<Max35Text>,
8287    nm: ::std::option::Option<Max140Text>,
8288}
8289impl TaxAuthorisation1Builder {
8290    /// Set the `titl` field.
8291    #[must_use]
8292    pub fn titl(mut self, value: Max35Text) -> TaxAuthorisation1Builder {
8293        self.titl = ::std::option::Option::Some(value);
8294        self
8295    }
8296    /// Set the `nm` field.
8297    #[must_use]
8298    pub fn nm(mut self, value: Max140Text) -> TaxAuthorisation1Builder {
8299        self.nm = ::std::option::Option::Some(value);
8300        self
8301    }
8302    /// Validate required fields and construct the type.
8303    ///
8304    /// # Errors
8305    ///
8306    /// Returns [`crate::common::BuilderError`] listing the names of any
8307    /// required fields that were not set.
8308    ///
8309    /// # Panics
8310    ///
8311    /// Does not panic — all `.unwrap()` calls are guarded by the
8312    /// missing-field check above.
8313    pub fn build(self) -> ::std::result::Result<TaxAuthorisation1, crate::common::BuilderError> {
8314        ::std::result::Result::Ok(TaxAuthorisation1 {
8315            titl: self.titl,
8316            nm: self.nm,
8317        })
8318    }
8319}
8320impl TaxAuthorisation1 {
8321    /// Return a new builder for this type.
8322    #[must_use]
8323    pub fn builder() -> TaxAuthorisation1Builder {
8324        TaxAuthorisation1Builder::default()
8325    }
8326}
8327#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8328pub struct TaxData1 {
8329    #[serde(rename = "Cdtr")]
8330    #[serde(skip_serializing_if = "Option::is_none")]
8331    pub cdtr: Option<TaxParty1>,
8332    #[serde(rename = "Dbtr")]
8333    #[serde(skip_serializing_if = "Option::is_none")]
8334    pub dbtr: Option<TaxParty2>,
8335    #[serde(rename = "UltmtDbtr")]
8336    #[serde(skip_serializing_if = "Option::is_none")]
8337    pub ultmt_dbtr: Option<TaxParty2>,
8338    #[serde(rename = "AdmstnZone")]
8339    #[serde(skip_serializing_if = "Option::is_none")]
8340    pub admstn_zone: Option<Max35Text>,
8341    #[serde(rename = "RefNb")]
8342    #[serde(skip_serializing_if = "Option::is_none")]
8343    pub ref_nb: Option<Max140Text>,
8344    #[serde(rename = "Mtd")]
8345    #[serde(skip_serializing_if = "Option::is_none")]
8346    pub mtd: Option<Max35Text>,
8347    #[serde(rename = "TtlTaxblBaseAmt")]
8348    #[serde(skip_serializing_if = "Option::is_none")]
8349    pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8350    #[serde(rename = "TtlTaxAmt")]
8351    #[serde(skip_serializing_if = "Option::is_none")]
8352    pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8353    #[serde(rename = "Dt")]
8354    #[serde(skip_serializing_if = "Option::is_none")]
8355    pub dt: Option<ISODate>,
8356    #[serde(rename = "SeqNb")]
8357    #[serde(skip_serializing_if = "Option::is_none")]
8358    pub seq_nb: Option<Number>,
8359    #[serde(rename = "Rcrd")]
8360    #[serde(default)]
8361    #[serde(skip_serializing_if = "Vec::is_empty")]
8362    pub rcrd: Vec<TaxRecord3>,
8363}
8364/// Builder for [`TaxData1`]. Construct via [`TaxData1::builder()`].
8365#[allow(clippy::struct_field_names)]
8366#[derive(Default)]
8367pub struct TaxData1Builder {
8368    cdtr: ::std::option::Option<TaxParty1>,
8369    dbtr: ::std::option::Option<TaxParty2>,
8370    ultmt_dbtr: ::std::option::Option<TaxParty2>,
8371    admstn_zone: ::std::option::Option<Max35Text>,
8372    ref_nb: ::std::option::Option<Max140Text>,
8373    mtd: ::std::option::Option<Max35Text>,
8374    ttl_taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8375    ttl_tax_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8376    dt: ::std::option::Option<ISODate>,
8377    seq_nb: ::std::option::Option<Number>,
8378    rcrd: ::std::vec::Vec<TaxRecord3>,
8379}
8380impl TaxData1Builder {
8381    /// Set the `cdtr` field.
8382    #[must_use]
8383    pub fn cdtr(mut self, value: TaxParty1) -> TaxData1Builder {
8384        self.cdtr = ::std::option::Option::Some(value);
8385        self
8386    }
8387    /// Set the `dbtr` field.
8388    #[must_use]
8389    pub fn dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
8390        self.dbtr = ::std::option::Option::Some(value);
8391        self
8392    }
8393    /// Set the `ultmt_dbtr` field.
8394    #[must_use]
8395    pub fn ultmt_dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
8396        self.ultmt_dbtr = ::std::option::Option::Some(value);
8397        self
8398    }
8399    /// Set the `admstn_zone` field.
8400    #[must_use]
8401    pub fn admstn_zone(mut self, value: Max35Text) -> TaxData1Builder {
8402        self.admstn_zone = ::std::option::Option::Some(value);
8403        self
8404    }
8405    /// Set the `ref_nb` field.
8406    #[must_use]
8407    pub fn ref_nb(mut self, value: Max140Text) -> TaxData1Builder {
8408        self.ref_nb = ::std::option::Option::Some(value);
8409        self
8410    }
8411    /// Set the `mtd` field.
8412    #[must_use]
8413    pub fn mtd(mut self, value: Max35Text) -> TaxData1Builder {
8414        self.mtd = ::std::option::Option::Some(value);
8415        self
8416    }
8417    /// Set the `ttl_taxbl_base_amt` field.
8418    #[must_use]
8419    pub fn ttl_taxbl_base_amt(
8420        mut self,
8421        value: ActiveOrHistoricCurrencyAndAmount,
8422    ) -> TaxData1Builder {
8423        self.ttl_taxbl_base_amt = ::std::option::Option::Some(value);
8424        self
8425    }
8426    /// Set the `ttl_tax_amt` field.
8427    #[must_use]
8428    pub fn ttl_tax_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxData1Builder {
8429        self.ttl_tax_amt = ::std::option::Option::Some(value);
8430        self
8431    }
8432    /// Set the `dt` field.
8433    #[must_use]
8434    pub fn dt(mut self, value: ISODate) -> TaxData1Builder {
8435        self.dt = ::std::option::Option::Some(value);
8436        self
8437    }
8438    /// Set the `seq_nb` field.
8439    #[must_use]
8440    pub fn seq_nb(mut self, value: Number) -> TaxData1Builder {
8441        self.seq_nb = ::std::option::Option::Some(value);
8442        self
8443    }
8444    /// Set the `rcrd` field (replaces any previously added items).
8445    #[must_use]
8446    pub fn rcrd(mut self, value: ::std::vec::Vec<TaxRecord3>) -> TaxData1Builder {
8447        self.rcrd = value;
8448        self
8449    }
8450    /// Append one item to the `rcrd` field.
8451    #[must_use]
8452    pub fn add_rcrd(mut self, value: TaxRecord3) -> TaxData1Builder {
8453        self.rcrd.push(value);
8454        self
8455    }
8456    /// Validate required fields and construct the type.
8457    ///
8458    /// # Errors
8459    ///
8460    /// Returns [`crate::common::BuilderError`] listing the names of any
8461    /// required fields that were not set.
8462    ///
8463    /// # Panics
8464    ///
8465    /// Does not panic — all `.unwrap()` calls are guarded by the
8466    /// missing-field check above.
8467    pub fn build(self) -> ::std::result::Result<TaxData1, crate::common::BuilderError> {
8468        ::std::result::Result::Ok(TaxData1 {
8469            cdtr: self.cdtr,
8470            dbtr: self.dbtr,
8471            ultmt_dbtr: self.ultmt_dbtr,
8472            admstn_zone: self.admstn_zone,
8473            ref_nb: self.ref_nb,
8474            mtd: self.mtd,
8475            ttl_taxbl_base_amt: self.ttl_taxbl_base_amt,
8476            ttl_tax_amt: self.ttl_tax_amt,
8477            dt: self.dt,
8478            seq_nb: self.seq_nb,
8479            rcrd: self.rcrd,
8480        })
8481    }
8482}
8483impl TaxData1 {
8484    /// Return a new builder for this type.
8485    #[must_use]
8486    pub fn builder() -> TaxData1Builder {
8487        TaxData1Builder::default()
8488    }
8489}
8490#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8491pub struct TaxInformation10 {
8492    #[serde(rename = "Cdtr")]
8493    #[serde(skip_serializing_if = "Option::is_none")]
8494    pub cdtr: Option<TaxParty1>,
8495    #[serde(rename = "Dbtr")]
8496    #[serde(skip_serializing_if = "Option::is_none")]
8497    pub dbtr: Option<TaxParty2>,
8498    #[serde(rename = "AdmstnZone")]
8499    #[serde(skip_serializing_if = "Option::is_none")]
8500    pub admstn_zone: Option<Max35Text>,
8501    #[serde(rename = "RefNb")]
8502    #[serde(skip_serializing_if = "Option::is_none")]
8503    pub ref_nb: Option<Max140Text>,
8504    #[serde(rename = "Mtd")]
8505    #[serde(skip_serializing_if = "Option::is_none")]
8506    pub mtd: Option<Max35Text>,
8507    #[serde(rename = "TtlTaxblBaseAmt")]
8508    #[serde(skip_serializing_if = "Option::is_none")]
8509    pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8510    #[serde(rename = "TtlTaxAmt")]
8511    #[serde(skip_serializing_if = "Option::is_none")]
8512    pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8513    #[serde(rename = "Dt")]
8514    #[serde(skip_serializing_if = "Option::is_none")]
8515    pub dt: Option<ISODate>,
8516    #[serde(rename = "SeqNb")]
8517    #[serde(skip_serializing_if = "Option::is_none")]
8518    pub seq_nb: Option<Number>,
8519    #[serde(rename = "Rcrd")]
8520    #[serde(default)]
8521    #[serde(skip_serializing_if = "Vec::is_empty")]
8522    pub rcrd: Vec<TaxRecord3>,
8523}
8524/// Builder for [`TaxInformation10`]. Construct via [`TaxInformation10::builder()`].
8525#[allow(clippy::struct_field_names)]
8526#[derive(Default)]
8527pub struct TaxInformation10Builder {
8528    cdtr: ::std::option::Option<TaxParty1>,
8529    dbtr: ::std::option::Option<TaxParty2>,
8530    admstn_zone: ::std::option::Option<Max35Text>,
8531    ref_nb: ::std::option::Option<Max140Text>,
8532    mtd: ::std::option::Option<Max35Text>,
8533    ttl_taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8534    ttl_tax_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8535    dt: ::std::option::Option<ISODate>,
8536    seq_nb: ::std::option::Option<Number>,
8537    rcrd: ::std::vec::Vec<TaxRecord3>,
8538}
8539impl TaxInformation10Builder {
8540    /// Set the `cdtr` field.
8541    #[must_use]
8542    pub fn cdtr(mut self, value: TaxParty1) -> TaxInformation10Builder {
8543        self.cdtr = ::std::option::Option::Some(value);
8544        self
8545    }
8546    /// Set the `dbtr` field.
8547    #[must_use]
8548    pub fn dbtr(mut self, value: TaxParty2) -> TaxInformation10Builder {
8549        self.dbtr = ::std::option::Option::Some(value);
8550        self
8551    }
8552    /// Set the `admstn_zone` field.
8553    #[must_use]
8554    pub fn admstn_zone(mut self, value: Max35Text) -> TaxInformation10Builder {
8555        self.admstn_zone = ::std::option::Option::Some(value);
8556        self
8557    }
8558    /// Set the `ref_nb` field.
8559    #[must_use]
8560    pub fn ref_nb(mut self, value: Max140Text) -> TaxInformation10Builder {
8561        self.ref_nb = ::std::option::Option::Some(value);
8562        self
8563    }
8564    /// Set the `mtd` field.
8565    #[must_use]
8566    pub fn mtd(mut self, value: Max35Text) -> TaxInformation10Builder {
8567        self.mtd = ::std::option::Option::Some(value);
8568        self
8569    }
8570    /// Set the `ttl_taxbl_base_amt` field.
8571    #[must_use]
8572    pub fn ttl_taxbl_base_amt(
8573        mut self,
8574        value: ActiveOrHistoricCurrencyAndAmount,
8575    ) -> TaxInformation10Builder {
8576        self.ttl_taxbl_base_amt = ::std::option::Option::Some(value);
8577        self
8578    }
8579    /// Set the `ttl_tax_amt` field.
8580    #[must_use]
8581    pub fn ttl_tax_amt(
8582        mut self,
8583        value: ActiveOrHistoricCurrencyAndAmount,
8584    ) -> TaxInformation10Builder {
8585        self.ttl_tax_amt = ::std::option::Option::Some(value);
8586        self
8587    }
8588    /// Set the `dt` field.
8589    #[must_use]
8590    pub fn dt(mut self, value: ISODate) -> TaxInformation10Builder {
8591        self.dt = ::std::option::Option::Some(value);
8592        self
8593    }
8594    /// Set the `seq_nb` field.
8595    #[must_use]
8596    pub fn seq_nb(mut self, value: Number) -> TaxInformation10Builder {
8597        self.seq_nb = ::std::option::Option::Some(value);
8598        self
8599    }
8600    /// Set the `rcrd` field (replaces any previously added items).
8601    #[must_use]
8602    pub fn rcrd(mut self, value: ::std::vec::Vec<TaxRecord3>) -> TaxInformation10Builder {
8603        self.rcrd = value;
8604        self
8605    }
8606    /// Append one item to the `rcrd` field.
8607    #[must_use]
8608    pub fn add_rcrd(mut self, value: TaxRecord3) -> TaxInformation10Builder {
8609        self.rcrd.push(value);
8610        self
8611    }
8612    /// Validate required fields and construct the type.
8613    ///
8614    /// # Errors
8615    ///
8616    /// Returns [`crate::common::BuilderError`] listing the names of any
8617    /// required fields that were not set.
8618    ///
8619    /// # Panics
8620    ///
8621    /// Does not panic — all `.unwrap()` calls are guarded by the
8622    /// missing-field check above.
8623    pub fn build(self) -> ::std::result::Result<TaxInformation10, crate::common::BuilderError> {
8624        ::std::result::Result::Ok(TaxInformation10 {
8625            cdtr: self.cdtr,
8626            dbtr: self.dbtr,
8627            admstn_zone: self.admstn_zone,
8628            ref_nb: self.ref_nb,
8629            mtd: self.mtd,
8630            ttl_taxbl_base_amt: self.ttl_taxbl_base_amt,
8631            ttl_tax_amt: self.ttl_tax_amt,
8632            dt: self.dt,
8633            seq_nb: self.seq_nb,
8634            rcrd: self.rcrd,
8635        })
8636    }
8637}
8638impl TaxInformation10 {
8639    /// Return a new builder for this type.
8640    #[must_use]
8641    pub fn builder() -> TaxInformation10Builder {
8642        TaxInformation10Builder::default()
8643    }
8644}
8645#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8646pub struct TaxParty1 {
8647    #[serde(rename = "TaxId")]
8648    #[serde(skip_serializing_if = "Option::is_none")]
8649    pub tax_id: Option<Max35Text>,
8650    #[serde(rename = "RegnId")]
8651    #[serde(skip_serializing_if = "Option::is_none")]
8652    pub regn_id: Option<Max35Text>,
8653    #[serde(rename = "TaxTp")]
8654    #[serde(skip_serializing_if = "Option::is_none")]
8655    pub tax_tp: Option<Max35Text>,
8656}
8657/// Builder for [`TaxParty1`]. Construct via [`TaxParty1::builder()`].
8658#[allow(clippy::struct_field_names)]
8659#[derive(Default)]
8660pub struct TaxParty1Builder {
8661    tax_id: ::std::option::Option<Max35Text>,
8662    regn_id: ::std::option::Option<Max35Text>,
8663    tax_tp: ::std::option::Option<Max35Text>,
8664}
8665impl TaxParty1Builder {
8666    /// Set the `tax_id` field.
8667    #[must_use]
8668    pub fn tax_id(mut self, value: Max35Text) -> TaxParty1Builder {
8669        self.tax_id = ::std::option::Option::Some(value);
8670        self
8671    }
8672    /// Set the `regn_id` field.
8673    #[must_use]
8674    pub fn regn_id(mut self, value: Max35Text) -> TaxParty1Builder {
8675        self.regn_id = ::std::option::Option::Some(value);
8676        self
8677    }
8678    /// Set the `tax_tp` field.
8679    #[must_use]
8680    pub fn tax_tp(mut self, value: Max35Text) -> TaxParty1Builder {
8681        self.tax_tp = ::std::option::Option::Some(value);
8682        self
8683    }
8684    /// Validate required fields and construct the type.
8685    ///
8686    /// # Errors
8687    ///
8688    /// Returns [`crate::common::BuilderError`] listing the names of any
8689    /// required fields that were not set.
8690    ///
8691    /// # Panics
8692    ///
8693    /// Does not panic — all `.unwrap()` calls are guarded by the
8694    /// missing-field check above.
8695    pub fn build(self) -> ::std::result::Result<TaxParty1, crate::common::BuilderError> {
8696        ::std::result::Result::Ok(TaxParty1 {
8697            tax_id: self.tax_id,
8698            regn_id: self.regn_id,
8699            tax_tp: self.tax_tp,
8700        })
8701    }
8702}
8703impl TaxParty1 {
8704    /// Return a new builder for this type.
8705    #[must_use]
8706    pub fn builder() -> TaxParty1Builder {
8707        TaxParty1Builder::default()
8708    }
8709}
8710#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8711pub struct TaxParty2 {
8712    #[serde(rename = "TaxId")]
8713    #[serde(skip_serializing_if = "Option::is_none")]
8714    pub tax_id: Option<Max35Text>,
8715    #[serde(rename = "RegnId")]
8716    #[serde(skip_serializing_if = "Option::is_none")]
8717    pub regn_id: Option<Max35Text>,
8718    #[serde(rename = "TaxTp")]
8719    #[serde(skip_serializing_if = "Option::is_none")]
8720    pub tax_tp: Option<Max35Text>,
8721    #[serde(rename = "Authstn")]
8722    #[serde(skip_serializing_if = "Option::is_none")]
8723    pub authstn: Option<TaxAuthorisation1>,
8724}
8725/// Builder for [`TaxParty2`]. Construct via [`TaxParty2::builder()`].
8726#[allow(clippy::struct_field_names)]
8727#[derive(Default)]
8728pub struct TaxParty2Builder {
8729    tax_id: ::std::option::Option<Max35Text>,
8730    regn_id: ::std::option::Option<Max35Text>,
8731    tax_tp: ::std::option::Option<Max35Text>,
8732    authstn: ::std::option::Option<TaxAuthorisation1>,
8733}
8734impl TaxParty2Builder {
8735    /// Set the `tax_id` field.
8736    #[must_use]
8737    pub fn tax_id(mut self, value: Max35Text) -> TaxParty2Builder {
8738        self.tax_id = ::std::option::Option::Some(value);
8739        self
8740    }
8741    /// Set the `regn_id` field.
8742    #[must_use]
8743    pub fn regn_id(mut self, value: Max35Text) -> TaxParty2Builder {
8744        self.regn_id = ::std::option::Option::Some(value);
8745        self
8746    }
8747    /// Set the `tax_tp` field.
8748    #[must_use]
8749    pub fn tax_tp(mut self, value: Max35Text) -> TaxParty2Builder {
8750        self.tax_tp = ::std::option::Option::Some(value);
8751        self
8752    }
8753    /// Set the `authstn` field.
8754    #[must_use]
8755    pub fn authstn(mut self, value: TaxAuthorisation1) -> TaxParty2Builder {
8756        self.authstn = ::std::option::Option::Some(value);
8757        self
8758    }
8759    /// Validate required fields and construct the type.
8760    ///
8761    /// # Errors
8762    ///
8763    /// Returns [`crate::common::BuilderError`] listing the names of any
8764    /// required fields that were not set.
8765    ///
8766    /// # Panics
8767    ///
8768    /// Does not panic — all `.unwrap()` calls are guarded by the
8769    /// missing-field check above.
8770    pub fn build(self) -> ::std::result::Result<TaxParty2, crate::common::BuilderError> {
8771        ::std::result::Result::Ok(TaxParty2 {
8772            tax_id: self.tax_id,
8773            regn_id: self.regn_id,
8774            tax_tp: self.tax_tp,
8775            authstn: self.authstn,
8776        })
8777    }
8778}
8779impl TaxParty2 {
8780    /// Return a new builder for this type.
8781    #[must_use]
8782    pub fn builder() -> TaxParty2Builder {
8783        TaxParty2Builder::default()
8784    }
8785}
8786#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8787pub struct TaxPeriod3 {
8788    #[serde(rename = "Yr")]
8789    #[serde(skip_serializing_if = "Option::is_none")]
8790    pub yr: Option<ISOYear>,
8791    #[serde(rename = "Tp")]
8792    #[serde(skip_serializing_if = "Option::is_none")]
8793    pub tp: Option<TaxRecordPeriod1Code>,
8794    #[serde(rename = "FrToDt")]
8795    #[serde(skip_serializing_if = "Option::is_none")]
8796    pub fr_to_dt: Option<DatePeriod2>,
8797}
8798/// Builder for [`TaxPeriod3`]. Construct via [`TaxPeriod3::builder()`].
8799#[allow(clippy::struct_field_names)]
8800#[derive(Default)]
8801pub struct TaxPeriod3Builder {
8802    yr: ::std::option::Option<ISOYear>,
8803    tp: ::std::option::Option<TaxRecordPeriod1Code>,
8804    fr_to_dt: ::std::option::Option<DatePeriod2>,
8805}
8806impl TaxPeriod3Builder {
8807    /// Set the `yr` field.
8808    #[must_use]
8809    pub fn yr(mut self, value: ISOYear) -> TaxPeriod3Builder {
8810        self.yr = ::std::option::Option::Some(value);
8811        self
8812    }
8813    /// Set the `tp` field.
8814    #[must_use]
8815    pub fn tp(mut self, value: TaxRecordPeriod1Code) -> TaxPeriod3Builder {
8816        self.tp = ::std::option::Option::Some(value);
8817        self
8818    }
8819    /// Set the `fr_to_dt` field.
8820    #[must_use]
8821    pub fn fr_to_dt(mut self, value: DatePeriod2) -> TaxPeriod3Builder {
8822        self.fr_to_dt = ::std::option::Option::Some(value);
8823        self
8824    }
8825    /// Validate required fields and construct the type.
8826    ///
8827    /// # Errors
8828    ///
8829    /// Returns [`crate::common::BuilderError`] listing the names of any
8830    /// required fields that were not set.
8831    ///
8832    /// # Panics
8833    ///
8834    /// Does not panic — all `.unwrap()` calls are guarded by the
8835    /// missing-field check above.
8836    pub fn build(self) -> ::std::result::Result<TaxPeriod3, crate::common::BuilderError> {
8837        ::std::result::Result::Ok(TaxPeriod3 {
8838            yr: self.yr,
8839            tp: self.tp,
8840            fr_to_dt: self.fr_to_dt,
8841        })
8842    }
8843}
8844impl TaxPeriod3 {
8845    /// Return a new builder for this type.
8846    #[must_use]
8847    pub fn builder() -> TaxPeriod3Builder {
8848        TaxPeriod3Builder::default()
8849    }
8850}
8851#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8852pub struct TaxRecord3 {
8853    #[serde(rename = "Tp")]
8854    #[serde(skip_serializing_if = "Option::is_none")]
8855    pub tp: Option<Max35Text>,
8856    #[serde(rename = "Ctgy")]
8857    #[serde(skip_serializing_if = "Option::is_none")]
8858    pub ctgy: Option<Max35Text>,
8859    #[serde(rename = "CtgyDtls")]
8860    #[serde(skip_serializing_if = "Option::is_none")]
8861    pub ctgy_dtls: Option<Max35Text>,
8862    #[serde(rename = "DbtrSts")]
8863    #[serde(skip_serializing_if = "Option::is_none")]
8864    pub dbtr_sts: Option<Max35Text>,
8865    #[serde(rename = "CertId")]
8866    #[serde(skip_serializing_if = "Option::is_none")]
8867    pub cert_id: Option<Max35Text>,
8868    #[serde(rename = "FrmsCd")]
8869    #[serde(skip_serializing_if = "Option::is_none")]
8870    pub frms_cd: Option<Max35Text>,
8871    #[serde(rename = "Prd")]
8872    #[serde(skip_serializing_if = "Option::is_none")]
8873    pub prd: Option<TaxPeriod3>,
8874    #[serde(rename = "TaxAmt")]
8875    #[serde(skip_serializing_if = "Option::is_none")]
8876    pub tax_amt: Option<TaxAmount3>,
8877    #[serde(rename = "AddtlInf")]
8878    #[serde(skip_serializing_if = "Option::is_none")]
8879    pub addtl_inf: Option<Max140Text>,
8880}
8881/// Builder for [`TaxRecord3`]. Construct via [`TaxRecord3::builder()`].
8882#[allow(clippy::struct_field_names)]
8883#[derive(Default)]
8884pub struct TaxRecord3Builder {
8885    tp: ::std::option::Option<Max35Text>,
8886    ctgy: ::std::option::Option<Max35Text>,
8887    ctgy_dtls: ::std::option::Option<Max35Text>,
8888    dbtr_sts: ::std::option::Option<Max35Text>,
8889    cert_id: ::std::option::Option<Max35Text>,
8890    frms_cd: ::std::option::Option<Max35Text>,
8891    prd: ::std::option::Option<TaxPeriod3>,
8892    tax_amt: ::std::option::Option<TaxAmount3>,
8893    addtl_inf: ::std::option::Option<Max140Text>,
8894}
8895impl TaxRecord3Builder {
8896    /// Set the `tp` field.
8897    #[must_use]
8898    pub fn tp(mut self, value: Max35Text) -> TaxRecord3Builder {
8899        self.tp = ::std::option::Option::Some(value);
8900        self
8901    }
8902    /// Set the `ctgy` field.
8903    #[must_use]
8904    pub fn ctgy(mut self, value: Max35Text) -> TaxRecord3Builder {
8905        self.ctgy = ::std::option::Option::Some(value);
8906        self
8907    }
8908    /// Set the `ctgy_dtls` field.
8909    #[must_use]
8910    pub fn ctgy_dtls(mut self, value: Max35Text) -> TaxRecord3Builder {
8911        self.ctgy_dtls = ::std::option::Option::Some(value);
8912        self
8913    }
8914    /// Set the `dbtr_sts` field.
8915    #[must_use]
8916    pub fn dbtr_sts(mut self, value: Max35Text) -> TaxRecord3Builder {
8917        self.dbtr_sts = ::std::option::Option::Some(value);
8918        self
8919    }
8920    /// Set the `cert_id` field.
8921    #[must_use]
8922    pub fn cert_id(mut self, value: Max35Text) -> TaxRecord3Builder {
8923        self.cert_id = ::std::option::Option::Some(value);
8924        self
8925    }
8926    /// Set the `frms_cd` field.
8927    #[must_use]
8928    pub fn frms_cd(mut self, value: Max35Text) -> TaxRecord3Builder {
8929        self.frms_cd = ::std::option::Option::Some(value);
8930        self
8931    }
8932    /// Set the `prd` field.
8933    #[must_use]
8934    pub fn prd(mut self, value: TaxPeriod3) -> TaxRecord3Builder {
8935        self.prd = ::std::option::Option::Some(value);
8936        self
8937    }
8938    /// Set the `tax_amt` field.
8939    #[must_use]
8940    pub fn tax_amt(mut self, value: TaxAmount3) -> TaxRecord3Builder {
8941        self.tax_amt = ::std::option::Option::Some(value);
8942        self
8943    }
8944    /// Set the `addtl_inf` field.
8945    #[must_use]
8946    pub fn addtl_inf(mut self, value: Max140Text) -> TaxRecord3Builder {
8947        self.addtl_inf = ::std::option::Option::Some(value);
8948        self
8949    }
8950    /// Validate required fields and construct the type.
8951    ///
8952    /// # Errors
8953    ///
8954    /// Returns [`crate::common::BuilderError`] listing the names of any
8955    /// required fields that were not set.
8956    ///
8957    /// # Panics
8958    ///
8959    /// Does not panic — all `.unwrap()` calls are guarded by the
8960    /// missing-field check above.
8961    pub fn build(self) -> ::std::result::Result<TaxRecord3, crate::common::BuilderError> {
8962        ::std::result::Result::Ok(TaxRecord3 {
8963            tp: self.tp,
8964            ctgy: self.ctgy,
8965            ctgy_dtls: self.ctgy_dtls,
8966            dbtr_sts: self.dbtr_sts,
8967            cert_id: self.cert_id,
8968            frms_cd: self.frms_cd,
8969            prd: self.prd,
8970            tax_amt: self.tax_amt,
8971            addtl_inf: self.addtl_inf,
8972        })
8973    }
8974}
8975impl TaxRecord3 {
8976    /// Return a new builder for this type.
8977    #[must_use]
8978    pub fn builder() -> TaxRecord3Builder {
8979        TaxRecord3Builder::default()
8980    }
8981}
8982#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8983pub struct TaxRecordDetails3 {
8984    #[serde(rename = "Prd")]
8985    #[serde(skip_serializing_if = "Option::is_none")]
8986    pub prd: Option<TaxPeriod3>,
8987    #[serde(rename = "Amt")]
8988    pub amt: ActiveOrHistoricCurrencyAndAmount,
8989}
8990/// Builder for [`TaxRecordDetails3`]. Construct via [`TaxRecordDetails3::builder()`].
8991#[allow(clippy::struct_field_names)]
8992#[derive(Default)]
8993pub struct TaxRecordDetails3Builder {
8994    prd: ::std::option::Option<TaxPeriod3>,
8995    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8996}
8997impl TaxRecordDetails3Builder {
8998    /// Set the `prd` field.
8999    #[must_use]
9000    pub fn prd(mut self, value: TaxPeriod3) -> TaxRecordDetails3Builder {
9001        self.prd = ::std::option::Option::Some(value);
9002        self
9003    }
9004    /// Set the `amt` field.
9005    #[must_use]
9006    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxRecordDetails3Builder {
9007        self.amt = ::std::option::Option::Some(value);
9008        self
9009    }
9010    /// Validate required fields and construct the type.
9011    ///
9012    /// # Errors
9013    ///
9014    /// Returns [`crate::common::BuilderError`] listing the names of any
9015    /// required fields that were not set.
9016    ///
9017    /// # Panics
9018    ///
9019    /// Does not panic — all `.unwrap()` calls are guarded by the
9020    /// missing-field check above.
9021    pub fn build(self) -> ::std::result::Result<TaxRecordDetails3, crate::common::BuilderError> {
9022        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9023        if self.amt.is_none() {
9024            missing.push("amt".to_owned());
9025        }
9026        if !missing.is_empty() {
9027            return ::std::result::Result::Err(crate::common::BuilderError {
9028                type_name: "TaxRecordDetails3".to_owned(),
9029                missing_fields: missing,
9030            });
9031        }
9032        ::std::result::Result::Ok(TaxRecordDetails3 {
9033            prd: self.prd,
9034            amt: self.amt.unwrap(),
9035        })
9036    }
9037}
9038impl TaxRecordDetails3 {
9039    /// Return a new builder for this type.
9040    #[must_use]
9041    pub fn builder() -> TaxRecordDetails3Builder {
9042        TaxRecordDetails3Builder::default()
9043    }
9044}
9045impl crate::common::validate::Validatable for ActiveCurrencyAndAmountSimpleType {
9046    #[allow(clippy::unreadable_literal)]
9047    fn validate_constraints(
9048        &self,
9049        path: &str,
9050        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9051    ) {
9052        {
9053            let value: &str = &self.0;
9054            let frac_count = value.find('.').map_or(0, |dot| {
9055                value[dot + 1..]
9056                    .chars()
9057                    .filter(char::is_ascii_digit)
9058                    .count()
9059            });
9060            let violated = frac_count > 5usize;
9061            if violated {
9062                violations.push(crate::common::validate::ConstraintViolation {
9063                    path: path.to_string(),
9064                    message: format!(
9065                        "{} (got {})",
9066                        "value exceeds maximum fraction digits 5", frac_count
9067                    ),
9068                    kind: crate::common::validate::ConstraintKind::FractionDigits,
9069                });
9070            }
9071        }
9072        {
9073            let value: &str = &self.0;
9074            let digit_count = value.chars().filter(char::is_ascii_digit).count();
9075            let violated = digit_count > 18usize;
9076            if violated {
9077                violations.push(crate::common::validate::ConstraintViolation {
9078                    path: path.to_string(),
9079                    message: format!(
9080                        "{} (got {})",
9081                        "value exceeds maximum total digits 18", digit_count
9082                    ),
9083                    kind: crate::common::validate::ConstraintKind::TotalDigits,
9084                });
9085            }
9086        }
9087    }
9088}
9089impl crate::common::validate::Validatable for ActiveCurrencyCode {
9090    #[allow(clippy::unreadable_literal)]
9091    fn validate_constraints(
9092        &self,
9093        path: &str,
9094        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9095    ) {
9096        {
9097            let value: &str = &self.0;
9098            let violated = {
9099                let bytes = value.as_bytes();
9100                bytes.len() != 3usize
9101                    || ({
9102                        let b = bytes[0usize];
9103                        !(65u8..=90u8).contains(&b)
9104                    })
9105                    || ({
9106                        let b = bytes[1usize];
9107                        !(65u8..=90u8).contains(&b)
9108                    })
9109                    || ({
9110                        let b = bytes[2usize];
9111                        !(65u8..=90u8).contains(&b)
9112                    })
9113            };
9114            if violated {
9115                violations.push(crate::common::validate::ConstraintViolation {
9116                    path: path.to_string(),
9117                    message: "value does not match pattern [A-Z]{3,3}".to_string(),
9118                    kind: crate::common::validate::ConstraintKind::Pattern,
9119                });
9120            }
9121        }
9122    }
9123}
9124impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmountSimpleType {
9125    #[allow(clippy::unreadable_literal)]
9126    fn validate_constraints(
9127        &self,
9128        path: &str,
9129        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9130    ) {
9131        {
9132            let value: &str = &self.0;
9133            let frac_count = value.find('.').map_or(0, |dot| {
9134                value[dot + 1..]
9135                    .chars()
9136                    .filter(char::is_ascii_digit)
9137                    .count()
9138            });
9139            let violated = frac_count > 5usize;
9140            if violated {
9141                violations.push(crate::common::validate::ConstraintViolation {
9142                    path: path.to_string(),
9143                    message: format!(
9144                        "{} (got {})",
9145                        "value exceeds maximum fraction digits 5", frac_count
9146                    ),
9147                    kind: crate::common::validate::ConstraintKind::FractionDigits,
9148                });
9149            }
9150        }
9151        {
9152            let value: &str = &self.0;
9153            let digit_count = value.chars().filter(char::is_ascii_digit).count();
9154            let violated = digit_count > 18usize;
9155            if violated {
9156                violations.push(crate::common::validate::ConstraintViolation {
9157                    path: path.to_string(),
9158                    message: format!(
9159                        "{} (got {})",
9160                        "value exceeds maximum total digits 18", digit_count
9161                    ),
9162                    kind: crate::common::validate::ConstraintKind::TotalDigits,
9163                });
9164            }
9165        }
9166    }
9167}
9168impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyCode {
9169    #[allow(clippy::unreadable_literal)]
9170    fn validate_constraints(
9171        &self,
9172        path: &str,
9173        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9174    ) {
9175        {
9176            let value: &str = &self.0;
9177            let violated = {
9178                let bytes = value.as_bytes();
9179                bytes.len() != 3usize
9180                    || ({
9181                        let b = bytes[0usize];
9182                        !(65u8..=90u8).contains(&b)
9183                    })
9184                    || ({
9185                        let b = bytes[1usize];
9186                        !(65u8..=90u8).contains(&b)
9187                    })
9188                    || ({
9189                        let b = bytes[2usize];
9190                        !(65u8..=90u8).contains(&b)
9191                    })
9192            };
9193            if violated {
9194                violations.push(crate::common::validate::ConstraintViolation {
9195                    path: path.to_string(),
9196                    message: "value does not match pattern [A-Z]{3,3}".to_string(),
9197                    kind: crate::common::validate::ConstraintKind::Pattern,
9198                });
9199            }
9200        }
9201    }
9202}
9203impl crate::common::validate::Validatable for AddressType2Code {
9204    fn validate_constraints(
9205        &self,
9206        _path: &str,
9207        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9208    ) {
9209    }
9210}
9211impl crate::common::validate::Validatable for AnyBICDec2014Identifier {
9212    #[allow(clippy::unreadable_literal)]
9213    fn validate_constraints(
9214        &self,
9215        path: &str,
9216        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9217    ) {
9218        {
9219            let value: &str = &self.0;
9220            let violated = {
9221                let bytes = value.as_bytes();
9222                let len = bytes.len();
9223                let result: bool = (|| -> bool {
9224                    let mut pos: usize = 0;
9225                    if !(8usize..=11usize).contains(&len) {
9226                        return true;
9227                    }
9228                    {
9229                        let end = pos + 4usize;
9230                        if end > len {
9231                            return true;
9232                        }
9233                        for &b in &bytes[pos..end] {
9234                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9235                                return true;
9236                            }
9237                        }
9238                        pos = end;
9239                    }
9240                    {
9241                        let end = pos + 2usize;
9242                        if end > len {
9243                            return true;
9244                        }
9245                        for &b in &bytes[pos..end] {
9246                            if !(65u8..=90u8).contains(&b) {
9247                                return true;
9248                            }
9249                        }
9250                        pos = end;
9251                    }
9252                    {
9253                        let end = pos + 2usize;
9254                        if end > len {
9255                            return true;
9256                        }
9257                        for &b in &bytes[pos..end] {
9258                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9259                                return true;
9260                            }
9261                        }
9262                        pos = end;
9263                    }
9264                    {
9265                        let saved = pos;
9266                        let matched: bool = (|| -> bool {
9267                            {
9268                                let end = pos + 3usize;
9269                                if end > len {
9270                                    return true;
9271                                }
9272                                for &b in &bytes[pos..end] {
9273                                    if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9274                                        return true;
9275                                    }
9276                                }
9277                                pos = end;
9278                            }
9279                            false
9280                        })();
9281                        if matched {
9282                            pos = saved;
9283                        }
9284                    }
9285                    if pos != len {
9286                        return true;
9287                    }
9288                    false
9289                })();
9290                result
9291            };
9292            if violated {
9293                violations
9294                    .push(crate::common::validate::ConstraintViolation {
9295                        path: path.to_string(),
9296                        message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
9297                            .to_string(),
9298                        kind: crate::common::validate::ConstraintKind::Pattern,
9299                    });
9300            }
9301        }
9302    }
9303}
9304impl crate::common::validate::Validatable for BICFIDec2014Identifier {
9305    #[allow(clippy::unreadable_literal)]
9306    fn validate_constraints(
9307        &self,
9308        path: &str,
9309        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9310    ) {
9311        {
9312            let value: &str = &self.0;
9313            let violated = {
9314                let bytes = value.as_bytes();
9315                let len = bytes.len();
9316                let result: bool = (|| -> bool {
9317                    let mut pos: usize = 0;
9318                    if !(8usize..=11usize).contains(&len) {
9319                        return true;
9320                    }
9321                    {
9322                        let end = pos + 4usize;
9323                        if end > len {
9324                            return true;
9325                        }
9326                        for &b in &bytes[pos..end] {
9327                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9328                                return true;
9329                            }
9330                        }
9331                        pos = end;
9332                    }
9333                    {
9334                        let end = pos + 2usize;
9335                        if end > len {
9336                            return true;
9337                        }
9338                        for &b in &bytes[pos..end] {
9339                            if !(65u8..=90u8).contains(&b) {
9340                                return true;
9341                            }
9342                        }
9343                        pos = end;
9344                    }
9345                    {
9346                        let end = pos + 2usize;
9347                        if end > len {
9348                            return true;
9349                        }
9350                        for &b in &bytes[pos..end] {
9351                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9352                                return true;
9353                            }
9354                        }
9355                        pos = end;
9356                    }
9357                    {
9358                        let saved = pos;
9359                        let matched: bool = (|| -> bool {
9360                            {
9361                                let end = pos + 3usize;
9362                                if end > len {
9363                                    return true;
9364                                }
9365                                for &b in &bytes[pos..end] {
9366                                    if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9367                                        return true;
9368                                    }
9369                                }
9370                                pos = end;
9371                            }
9372                            false
9373                        })();
9374                        if matched {
9375                            pos = saved;
9376                        }
9377                    }
9378                    if pos != len {
9379                        return true;
9380                    }
9381                    false
9382                })();
9383                result
9384            };
9385            if violated {
9386                violations
9387                    .push(crate::common::validate::ConstraintViolation {
9388                        path: path.to_string(),
9389                        message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
9390                            .to_string(),
9391                        kind: crate::common::validate::ConstraintKind::Pattern,
9392                    });
9393            }
9394        }
9395    }
9396}
9397impl crate::common::validate::Validatable for BatchBookingIndicator {
9398    fn validate_constraints(
9399        &self,
9400        _path: &str,
9401        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9402    ) {
9403    }
9404}
9405impl crate::common::validate::Validatable for ClearingChannel2Code {
9406    fn validate_constraints(
9407        &self,
9408        _path: &str,
9409        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9410    ) {
9411    }
9412}
9413impl crate::common::validate::Validatable for CountryCode {
9414    #[allow(clippy::unreadable_literal)]
9415    fn validate_constraints(
9416        &self,
9417        path: &str,
9418        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9419    ) {
9420        {
9421            let value: &str = &self.0;
9422            let violated = {
9423                let bytes = value.as_bytes();
9424                bytes.len() != 2usize
9425                    || ({
9426                        let b = bytes[0usize];
9427                        !(65u8..=90u8).contains(&b)
9428                    })
9429                    || ({
9430                        let b = bytes[1usize];
9431                        !(65u8..=90u8).contains(&b)
9432                    })
9433            };
9434            if violated {
9435                violations.push(crate::common::validate::ConstraintViolation {
9436                    path: path.to_string(),
9437                    message: "value does not match pattern [A-Z]{2,2}".to_string(),
9438                    kind: crate::common::validate::ConstraintKind::Pattern,
9439                });
9440            }
9441        }
9442    }
9443}
9444impl crate::common::validate::Validatable for CreditDebitCode {
9445    fn validate_constraints(
9446        &self,
9447        _path: &str,
9448        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9449    ) {
9450    }
9451}
9452impl crate::common::validate::Validatable for DecimalNumber {
9453    #[allow(clippy::unreadable_literal)]
9454    fn validate_constraints(
9455        &self,
9456        path: &str,
9457        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9458    ) {
9459        {
9460            let value: &str = &self.0;
9461            let frac_count = value.find('.').map_or(0, |dot| {
9462                value[dot + 1..]
9463                    .chars()
9464                    .filter(char::is_ascii_digit)
9465                    .count()
9466            });
9467            let violated = frac_count > 17usize;
9468            if violated {
9469                violations.push(crate::common::validate::ConstraintViolation {
9470                    path: path.to_string(),
9471                    message: format!(
9472                        "{} (got {})",
9473                        "value exceeds maximum fraction digits 17", frac_count
9474                    ),
9475                    kind: crate::common::validate::ConstraintKind::FractionDigits,
9476                });
9477            }
9478        }
9479        {
9480            let value: &str = &self.0;
9481            let digit_count = value.chars().filter(char::is_ascii_digit).count();
9482            let violated = digit_count > 18usize;
9483            if violated {
9484                violations.push(crate::common::validate::ConstraintViolation {
9485                    path: path.to_string(),
9486                    message: format!(
9487                        "{} (got {})",
9488                        "value exceeds maximum total digits 18", digit_count
9489                    ),
9490                    kind: crate::common::validate::ConstraintKind::TotalDigits,
9491                });
9492            }
9493        }
9494    }
9495}
9496impl crate::common::validate::Validatable for DocumentType3Code {
9497    fn validate_constraints(
9498        &self,
9499        _path: &str,
9500        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9501    ) {
9502    }
9503}
9504impl crate::common::validate::Validatable for DocumentType6Code {
9505    fn validate_constraints(
9506        &self,
9507        _path: &str,
9508        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9509    ) {
9510    }
9511}
9512impl crate::common::validate::Validatable for Exact4AlphaNumericText {
9513    #[allow(clippy::unreadable_literal)]
9514    fn validate_constraints(
9515        &self,
9516        path: &str,
9517        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9518    ) {
9519        {
9520            let value: &str = &self.0;
9521            let violated = {
9522                let bytes = value.as_bytes();
9523                bytes.len() != 4usize
9524                    || ({
9525                        let b = bytes[0usize];
9526                        !(97u8..=122u8).contains(&b)
9527                            && !(65u8..=90u8).contains(&b)
9528                            && !(48u8..=57u8).contains(&b)
9529                    })
9530                    || ({
9531                        let b = bytes[1usize];
9532                        !(97u8..=122u8).contains(&b)
9533                            && !(65u8..=90u8).contains(&b)
9534                            && !(48u8..=57u8).contains(&b)
9535                    })
9536                    || ({
9537                        let b = bytes[2usize];
9538                        !(97u8..=122u8).contains(&b)
9539                            && !(65u8..=90u8).contains(&b)
9540                            && !(48u8..=57u8).contains(&b)
9541                    })
9542                    || ({
9543                        let b = bytes[3usize];
9544                        !(97u8..=122u8).contains(&b)
9545                            && !(65u8..=90u8).contains(&b)
9546                            && !(48u8..=57u8).contains(&b)
9547                    })
9548            };
9549            if violated {
9550                violations.push(crate::common::validate::ConstraintViolation {
9551                    path: path.to_string(),
9552                    message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
9553                    kind: crate::common::validate::ConstraintKind::Pattern,
9554                });
9555            }
9556        }
9557    }
9558}
9559impl crate::common::validate::Validatable for ExternalAccountIdentification1Code {
9560    #[allow(clippy::unreadable_literal)]
9561    fn validate_constraints(
9562        &self,
9563        path: &str,
9564        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9565    ) {
9566        let len = self.0.chars().count();
9567        {
9568            let violated = len < 1usize;
9569            if violated {
9570                violations.push(crate::common::validate::ConstraintViolation {
9571                    path: path.to_string(),
9572                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9573                    kind: crate::common::validate::ConstraintKind::MinLength,
9574                });
9575            }
9576        }
9577        {
9578            let violated = len > 4usize;
9579            if violated {
9580                violations.push(crate::common::validate::ConstraintViolation {
9581                    path: path.to_string(),
9582                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9583                    kind: crate::common::validate::ConstraintKind::MaxLength,
9584                });
9585            }
9586        }
9587    }
9588}
9589impl crate::common::validate::Validatable for ExternalCashAccountType1Code {
9590    #[allow(clippy::unreadable_literal)]
9591    fn validate_constraints(
9592        &self,
9593        path: &str,
9594        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9595    ) {
9596        let len = self.0.chars().count();
9597        {
9598            let violated = len < 1usize;
9599            if violated {
9600                violations.push(crate::common::validate::ConstraintViolation {
9601                    path: path.to_string(),
9602                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9603                    kind: crate::common::validate::ConstraintKind::MinLength,
9604                });
9605            }
9606        }
9607        {
9608            let violated = len > 4usize;
9609            if violated {
9610                violations.push(crate::common::validate::ConstraintViolation {
9611                    path: path.to_string(),
9612                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9613                    kind: crate::common::validate::ConstraintKind::MaxLength,
9614                });
9615            }
9616        }
9617    }
9618}
9619impl crate::common::validate::Validatable for ExternalCashClearingSystem1Code {
9620    #[allow(clippy::unreadable_literal)]
9621    fn validate_constraints(
9622        &self,
9623        path: &str,
9624        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9625    ) {
9626        let len = self.0.chars().count();
9627        {
9628            let violated = len < 1usize;
9629            if violated {
9630                violations.push(crate::common::validate::ConstraintViolation {
9631                    path: path.to_string(),
9632                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9633                    kind: crate::common::validate::ConstraintKind::MinLength,
9634                });
9635            }
9636        }
9637        {
9638            let violated = len > 3usize;
9639            if violated {
9640                violations.push(crate::common::validate::ConstraintViolation {
9641                    path: path.to_string(),
9642                    message: format!("{} (got {})", "value exceeds maximum length 3", len),
9643                    kind: crate::common::validate::ConstraintKind::MaxLength,
9644                });
9645            }
9646        }
9647    }
9648}
9649impl crate::common::validate::Validatable for ExternalCategoryPurpose1Code {
9650    #[allow(clippy::unreadable_literal)]
9651    fn validate_constraints(
9652        &self,
9653        path: &str,
9654        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9655    ) {
9656        let len = self.0.chars().count();
9657        {
9658            let violated = len < 1usize;
9659            if violated {
9660                violations.push(crate::common::validate::ConstraintViolation {
9661                    path: path.to_string(),
9662                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9663                    kind: crate::common::validate::ConstraintKind::MinLength,
9664                });
9665            }
9666        }
9667        {
9668            let violated = len > 4usize;
9669            if violated {
9670                violations.push(crate::common::validate::ConstraintViolation {
9671                    path: path.to_string(),
9672                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9673                    kind: crate::common::validate::ConstraintKind::MaxLength,
9674                });
9675            }
9676        }
9677    }
9678}
9679impl crate::common::validate::Validatable for ExternalClearingSystemIdentification1Code {
9680    #[allow(clippy::unreadable_literal)]
9681    fn validate_constraints(
9682        &self,
9683        path: &str,
9684        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9685    ) {
9686        let len = self.0.chars().count();
9687        {
9688            let violated = len < 1usize;
9689            if violated {
9690                violations.push(crate::common::validate::ConstraintViolation {
9691                    path: path.to_string(),
9692                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9693                    kind: crate::common::validate::ConstraintKind::MinLength,
9694                });
9695            }
9696        }
9697        {
9698            let violated = len > 5usize;
9699            if violated {
9700                violations.push(crate::common::validate::ConstraintViolation {
9701                    path: path.to_string(),
9702                    message: format!("{} (got {})", "value exceeds maximum length 5", len),
9703                    kind: crate::common::validate::ConstraintKind::MaxLength,
9704                });
9705            }
9706        }
9707    }
9708}
9709impl crate::common::validate::Validatable for ExternalCreditorAgentInstruction1Code {
9710    #[allow(clippy::unreadable_literal)]
9711    fn validate_constraints(
9712        &self,
9713        path: &str,
9714        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9715    ) {
9716        let len = self.0.chars().count();
9717        {
9718            let violated = len < 1usize;
9719            if violated {
9720                violations.push(crate::common::validate::ConstraintViolation {
9721                    path: path.to_string(),
9722                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9723                    kind: crate::common::validate::ConstraintKind::MinLength,
9724                });
9725            }
9726        }
9727        {
9728            let violated = len > 4usize;
9729            if violated {
9730                violations.push(crate::common::validate::ConstraintViolation {
9731                    path: path.to_string(),
9732                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9733                    kind: crate::common::validate::ConstraintKind::MaxLength,
9734                });
9735            }
9736        }
9737    }
9738}
9739impl crate::common::validate::Validatable for ExternalDiscountAmountType1Code {
9740    #[allow(clippy::unreadable_literal)]
9741    fn validate_constraints(
9742        &self,
9743        path: &str,
9744        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9745    ) {
9746        let len = self.0.chars().count();
9747        {
9748            let violated = len < 1usize;
9749            if violated {
9750                violations.push(crate::common::validate::ConstraintViolation {
9751                    path: path.to_string(),
9752                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9753                    kind: crate::common::validate::ConstraintKind::MinLength,
9754                });
9755            }
9756        }
9757        {
9758            let violated = len > 4usize;
9759            if violated {
9760                violations.push(crate::common::validate::ConstraintViolation {
9761                    path: path.to_string(),
9762                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9763                    kind: crate::common::validate::ConstraintKind::MaxLength,
9764                });
9765            }
9766        }
9767    }
9768}
9769impl crate::common::validate::Validatable for ExternalDocumentLineType1Code {
9770    #[allow(clippy::unreadable_literal)]
9771    fn validate_constraints(
9772        &self,
9773        path: &str,
9774        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9775    ) {
9776        let len = self.0.chars().count();
9777        {
9778            let violated = len < 1usize;
9779            if violated {
9780                violations.push(crate::common::validate::ConstraintViolation {
9781                    path: path.to_string(),
9782                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9783                    kind: crate::common::validate::ConstraintKind::MinLength,
9784                });
9785            }
9786        }
9787        {
9788            let violated = len > 4usize;
9789            if violated {
9790                violations.push(crate::common::validate::ConstraintViolation {
9791                    path: path.to_string(),
9792                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9793                    kind: crate::common::validate::ConstraintKind::MaxLength,
9794                });
9795            }
9796        }
9797    }
9798}
9799impl crate::common::validate::Validatable for ExternalFinancialInstitutionIdentification1Code {
9800    #[allow(clippy::unreadable_literal)]
9801    fn validate_constraints(
9802        &self,
9803        path: &str,
9804        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9805    ) {
9806        let len = self.0.chars().count();
9807        {
9808            let violated = len < 1usize;
9809            if violated {
9810                violations.push(crate::common::validate::ConstraintViolation {
9811                    path: path.to_string(),
9812                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9813                    kind: crate::common::validate::ConstraintKind::MinLength,
9814                });
9815            }
9816        }
9817        {
9818            let violated = len > 4usize;
9819            if violated {
9820                violations.push(crate::common::validate::ConstraintViolation {
9821                    path: path.to_string(),
9822                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9823                    kind: crate::common::validate::ConstraintKind::MaxLength,
9824                });
9825            }
9826        }
9827    }
9828}
9829impl crate::common::validate::Validatable for ExternalGarnishmentType1Code {
9830    #[allow(clippy::unreadable_literal)]
9831    fn validate_constraints(
9832        &self,
9833        path: &str,
9834        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9835    ) {
9836        let len = self.0.chars().count();
9837        {
9838            let violated = len < 1usize;
9839            if violated {
9840                violations.push(crate::common::validate::ConstraintViolation {
9841                    path: path.to_string(),
9842                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9843                    kind: crate::common::validate::ConstraintKind::MinLength,
9844                });
9845            }
9846        }
9847        {
9848            let violated = len > 4usize;
9849            if violated {
9850                violations.push(crate::common::validate::ConstraintViolation {
9851                    path: path.to_string(),
9852                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9853                    kind: crate::common::validate::ConstraintKind::MaxLength,
9854                });
9855            }
9856        }
9857    }
9858}
9859impl crate::common::validate::Validatable for ExternalLocalInstrument1Code {
9860    #[allow(clippy::unreadable_literal)]
9861    fn validate_constraints(
9862        &self,
9863        path: &str,
9864        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9865    ) {
9866        let len = self.0.chars().count();
9867        {
9868            let violated = len < 1usize;
9869            if violated {
9870                violations.push(crate::common::validate::ConstraintViolation {
9871                    path: path.to_string(),
9872                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9873                    kind: crate::common::validate::ConstraintKind::MinLength,
9874                });
9875            }
9876        }
9877        {
9878            let violated = len > 35usize;
9879            if violated {
9880                violations.push(crate::common::validate::ConstraintViolation {
9881                    path: path.to_string(),
9882                    message: format!("{} (got {})", "value exceeds maximum length 35", len),
9883                    kind: crate::common::validate::ConstraintKind::MaxLength,
9884                });
9885            }
9886        }
9887    }
9888}
9889impl crate::common::validate::Validatable for ExternalOrganisationIdentification1Code {
9890    #[allow(clippy::unreadable_literal)]
9891    fn validate_constraints(
9892        &self,
9893        path: &str,
9894        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9895    ) {
9896        let len = self.0.chars().count();
9897        {
9898            let violated = len < 1usize;
9899            if violated {
9900                violations.push(crate::common::validate::ConstraintViolation {
9901                    path: path.to_string(),
9902                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9903                    kind: crate::common::validate::ConstraintKind::MinLength,
9904                });
9905            }
9906        }
9907        {
9908            let violated = len > 4usize;
9909            if violated {
9910                violations.push(crate::common::validate::ConstraintViolation {
9911                    path: path.to_string(),
9912                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9913                    kind: crate::common::validate::ConstraintKind::MaxLength,
9914                });
9915            }
9916        }
9917    }
9918}
9919impl crate::common::validate::Validatable for ExternalPersonIdentification1Code {
9920    #[allow(clippy::unreadable_literal)]
9921    fn validate_constraints(
9922        &self,
9923        path: &str,
9924        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9925    ) {
9926        let len = self.0.chars().count();
9927        {
9928            let violated = len < 1usize;
9929            if violated {
9930                violations.push(crate::common::validate::ConstraintViolation {
9931                    path: path.to_string(),
9932                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9933                    kind: crate::common::validate::ConstraintKind::MinLength,
9934                });
9935            }
9936        }
9937        {
9938            let violated = len > 4usize;
9939            if violated {
9940                violations.push(crate::common::validate::ConstraintViolation {
9941                    path: path.to_string(),
9942                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9943                    kind: crate::common::validate::ConstraintKind::MaxLength,
9944                });
9945            }
9946        }
9947    }
9948}
9949impl crate::common::validate::Validatable for ExternalProxyAccountType1Code {
9950    #[allow(clippy::unreadable_literal)]
9951    fn validate_constraints(
9952        &self,
9953        path: &str,
9954        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9955    ) {
9956        let len = self.0.chars().count();
9957        {
9958            let violated = len < 1usize;
9959            if violated {
9960                violations.push(crate::common::validate::ConstraintViolation {
9961                    path: path.to_string(),
9962                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9963                    kind: crate::common::validate::ConstraintKind::MinLength,
9964                });
9965            }
9966        }
9967        {
9968            let violated = len > 4usize;
9969            if violated {
9970                violations.push(crate::common::validate::ConstraintViolation {
9971                    path: path.to_string(),
9972                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
9973                    kind: crate::common::validate::ConstraintKind::MaxLength,
9974                });
9975            }
9976        }
9977    }
9978}
9979impl crate::common::validate::Validatable for ExternalPurpose1Code {
9980    #[allow(clippy::unreadable_literal)]
9981    fn validate_constraints(
9982        &self,
9983        path: &str,
9984        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9985    ) {
9986        let len = self.0.chars().count();
9987        {
9988            let violated = len < 1usize;
9989            if violated {
9990                violations.push(crate::common::validate::ConstraintViolation {
9991                    path: path.to_string(),
9992                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9993                    kind: crate::common::validate::ConstraintKind::MinLength,
9994                });
9995            }
9996        }
9997        {
9998            let violated = len > 4usize;
9999            if violated {
10000                violations.push(crate::common::validate::ConstraintViolation {
10001                    path: path.to_string(),
10002                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
10003                    kind: crate::common::validate::ConstraintKind::MaxLength,
10004                });
10005            }
10006        }
10007    }
10008}
10009impl crate::common::validate::Validatable for ExternalServiceLevel1Code {
10010    #[allow(clippy::unreadable_literal)]
10011    fn validate_constraints(
10012        &self,
10013        path: &str,
10014        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10015    ) {
10016        let len = self.0.chars().count();
10017        {
10018            let violated = len < 1usize;
10019            if violated {
10020                violations.push(crate::common::validate::ConstraintViolation {
10021                    path: path.to_string(),
10022                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10023                    kind: crate::common::validate::ConstraintKind::MinLength,
10024                });
10025            }
10026        }
10027        {
10028            let violated = len > 4usize;
10029            if violated {
10030                violations.push(crate::common::validate::ConstraintViolation {
10031                    path: path.to_string(),
10032                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
10033                    kind: crate::common::validate::ConstraintKind::MaxLength,
10034                });
10035            }
10036        }
10037    }
10038}
10039impl crate::common::validate::Validatable for ExternalTaxAmountType1Code {
10040    #[allow(clippy::unreadable_literal)]
10041    fn validate_constraints(
10042        &self,
10043        path: &str,
10044        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10045    ) {
10046        let len = self.0.chars().count();
10047        {
10048            let violated = len < 1usize;
10049            if violated {
10050                violations.push(crate::common::validate::ConstraintViolation {
10051                    path: path.to_string(),
10052                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10053                    kind: crate::common::validate::ConstraintKind::MinLength,
10054                });
10055            }
10056        }
10057        {
10058            let violated = len > 4usize;
10059            if violated {
10060                violations.push(crate::common::validate::ConstraintViolation {
10061                    path: path.to_string(),
10062                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
10063                    kind: crate::common::validate::ConstraintKind::MaxLength,
10064                });
10065            }
10066        }
10067    }
10068}
10069impl crate::common::validate::Validatable for IBAN2007Identifier {
10070    #[allow(clippy::unreadable_literal)]
10071    fn validate_constraints(
10072        &self,
10073        path: &str,
10074        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10075    ) {
10076        {
10077            let value: &str = &self.0;
10078            let violated = {
10079                let bytes = value.as_bytes();
10080                let len = bytes.len();
10081                let result: bool = (|| -> bool {
10082                    let mut pos: usize = 0;
10083                    if !(5usize..=34usize).contains(&len) {
10084                        return true;
10085                    }
10086                    {
10087                        let end = pos + 2usize;
10088                        if end > len {
10089                            return true;
10090                        }
10091                        for &b in &bytes[pos..end] {
10092                            if !(65u8..=90u8).contains(&b) {
10093                                return true;
10094                            }
10095                        }
10096                        pos = end;
10097                    }
10098                    {
10099                        let end = pos + 2usize;
10100                        if end > len {
10101                            return true;
10102                        }
10103                        for &b in &bytes[pos..end] {
10104                            if !(48u8..=57u8).contains(&b) {
10105                                return true;
10106                            }
10107                        }
10108                        pos = end;
10109                    }
10110                    {
10111                        let start = pos;
10112                        let limit = if pos + 30usize < len {
10113                            pos + 30usize
10114                        } else {
10115                            len
10116                        };
10117                        while pos < limit {
10118                            let b = bytes[pos];
10119                            if !(97u8..=122u8).contains(&b)
10120                                && !(65u8..=90u8).contains(&b)
10121                                && !(48u8..=57u8).contains(&b)
10122                            {
10123                                break;
10124                            }
10125                            pos += 1;
10126                        }
10127                        let matched = pos - start;
10128                        if matched < 1usize {
10129                            return true;
10130                        }
10131                    }
10132                    if pos != len {
10133                        return true;
10134                    }
10135                    false
10136                })();
10137                result
10138            };
10139            if violated {
10140                violations.push(crate::common::validate::ConstraintViolation {
10141                    path: path.to_string(),
10142                    message: "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
10143                        .to_string(),
10144                    kind: crate::common::validate::ConstraintKind::Pattern,
10145                });
10146            }
10147        }
10148    }
10149}
10150impl crate::common::validate::Validatable for ISODate {
10151    fn validate_constraints(
10152        &self,
10153        _path: &str,
10154        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10155    ) {
10156    }
10157}
10158impl crate::common::validate::Validatable for ISODateTime {
10159    fn validate_constraints(
10160        &self,
10161        _path: &str,
10162        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10163    ) {
10164    }
10165}
10166impl crate::common::validate::Validatable for ISOTime {
10167    fn validate_constraints(
10168        &self,
10169        _path: &str,
10170        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10171    ) {
10172    }
10173}
10174impl crate::common::validate::Validatable for ISOYear {
10175    fn validate_constraints(
10176        &self,
10177        _path: &str,
10178        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10179    ) {
10180    }
10181}
10182impl crate::common::validate::Validatable for Instruction4Code {
10183    fn validate_constraints(
10184        &self,
10185        _path: &str,
10186        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10187    ) {
10188    }
10189}
10190impl crate::common::validate::Validatable for LEIIdentifier {
10191    #[allow(clippy::unreadable_literal)]
10192    fn validate_constraints(
10193        &self,
10194        path: &str,
10195        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10196    ) {
10197        {
10198            let value: &str = &self.0;
10199            let violated = {
10200                let bytes = value.as_bytes();
10201                bytes.len() != 20usize
10202                    || ({
10203                        let b = bytes[0usize];
10204                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10205                    })
10206                    || ({
10207                        let b = bytes[1usize];
10208                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10209                    })
10210                    || ({
10211                        let b = bytes[2usize];
10212                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10213                    })
10214                    || ({
10215                        let b = bytes[3usize];
10216                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10217                    })
10218                    || ({
10219                        let b = bytes[4usize];
10220                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10221                    })
10222                    || ({
10223                        let b = bytes[5usize];
10224                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10225                    })
10226                    || ({
10227                        let b = bytes[6usize];
10228                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10229                    })
10230                    || ({
10231                        let b = bytes[7usize];
10232                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10233                    })
10234                    || ({
10235                        let b = bytes[8usize];
10236                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10237                    })
10238                    || ({
10239                        let b = bytes[9usize];
10240                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10241                    })
10242                    || ({
10243                        let b = bytes[10usize];
10244                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10245                    })
10246                    || ({
10247                        let b = bytes[11usize];
10248                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10249                    })
10250                    || ({
10251                        let b = bytes[12usize];
10252                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10253                    })
10254                    || ({
10255                        let b = bytes[13usize];
10256                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10257                    })
10258                    || ({
10259                        let b = bytes[14usize];
10260                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10261                    })
10262                    || ({
10263                        let b = bytes[15usize];
10264                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10265                    })
10266                    || ({
10267                        let b = bytes[16usize];
10268                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10269                    })
10270                    || ({
10271                        let b = bytes[17usize];
10272                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10273                    })
10274                    || ({
10275                        let b = bytes[18usize];
10276                        !(48u8..=57u8).contains(&b)
10277                    })
10278                    || ({
10279                        let b = bytes[19usize];
10280                        !(48u8..=57u8).contains(&b)
10281                    })
10282            };
10283            if violated {
10284                violations.push(crate::common::validate::ConstraintViolation {
10285                    path: path.to_string(),
10286                    message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}".to_string(),
10287                    kind: crate::common::validate::ConstraintKind::Pattern,
10288                });
10289            }
10290        }
10291    }
10292}
10293impl crate::common::validate::Validatable for Max128Text {
10294    #[allow(clippy::unreadable_literal)]
10295    fn validate_constraints(
10296        &self,
10297        path: &str,
10298        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10299    ) {
10300        let len = self.0.chars().count();
10301        {
10302            let violated = len < 1usize;
10303            if violated {
10304                violations.push(crate::common::validate::ConstraintViolation {
10305                    path: path.to_string(),
10306                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10307                    kind: crate::common::validate::ConstraintKind::MinLength,
10308                });
10309            }
10310        }
10311        {
10312            let violated = len > 128usize;
10313            if violated {
10314                violations.push(crate::common::validate::ConstraintViolation {
10315                    path: path.to_string(),
10316                    message: format!("{} (got {})", "value exceeds maximum length 128", len),
10317                    kind: crate::common::validate::ConstraintKind::MaxLength,
10318                });
10319            }
10320        }
10321    }
10322}
10323impl crate::common::validate::Validatable for Max140Text {
10324    #[allow(clippy::unreadable_literal)]
10325    fn validate_constraints(
10326        &self,
10327        path: &str,
10328        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10329    ) {
10330        let len = self.0.chars().count();
10331        {
10332            let violated = len < 1usize;
10333            if violated {
10334                violations.push(crate::common::validate::ConstraintViolation {
10335                    path: path.to_string(),
10336                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10337                    kind: crate::common::validate::ConstraintKind::MinLength,
10338                });
10339            }
10340        }
10341        {
10342            let violated = len > 140usize;
10343            if violated {
10344                violations.push(crate::common::validate::ConstraintViolation {
10345                    path: path.to_string(),
10346                    message: format!("{} (got {})", "value exceeds maximum length 140", len),
10347                    kind: crate::common::validate::ConstraintKind::MaxLength,
10348                });
10349            }
10350        }
10351    }
10352}
10353impl crate::common::validate::Validatable for Max15NumericText {
10354    #[allow(clippy::unreadable_literal)]
10355    fn validate_constraints(
10356        &self,
10357        path: &str,
10358        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10359    ) {
10360        {
10361            let value: &str = &self.0;
10362            let violated = {
10363                let bytes = value.as_bytes();
10364                let len = bytes.len();
10365                let result: bool = (|| -> bool {
10366                    let mut pos: usize = 0;
10367                    if !(1usize..=15usize).contains(&len) {
10368                        return true;
10369                    }
10370                    {
10371                        let start = pos;
10372                        let limit = if pos + 15usize < len {
10373                            pos + 15usize
10374                        } else {
10375                            len
10376                        };
10377                        while pos < limit {
10378                            let b = bytes[pos];
10379                            if !(48u8..=57u8).contains(&b) {
10380                                break;
10381                            }
10382                            pos += 1;
10383                        }
10384                        let matched = pos - start;
10385                        if matched < 1usize {
10386                            return true;
10387                        }
10388                    }
10389                    if pos != len {
10390                        return true;
10391                    }
10392                    false
10393                })();
10394                result
10395            };
10396            if violated {
10397                violations.push(crate::common::validate::ConstraintViolation {
10398                    path: path.to_string(),
10399                    message: "value does not match pattern [0-9]{1,15}".to_string(),
10400                    kind: crate::common::validate::ConstraintKind::Pattern,
10401                });
10402            }
10403        }
10404    }
10405}
10406impl crate::common::validate::Validatable for Max16Text {
10407    #[allow(clippy::unreadable_literal)]
10408    fn validate_constraints(
10409        &self,
10410        path: &str,
10411        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10412    ) {
10413        let len = self.0.chars().count();
10414        {
10415            let violated = len < 1usize;
10416            if violated {
10417                violations.push(crate::common::validate::ConstraintViolation {
10418                    path: path.to_string(),
10419                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10420                    kind: crate::common::validate::ConstraintKind::MinLength,
10421                });
10422            }
10423        }
10424        {
10425            let violated = len > 16usize;
10426            if violated {
10427                violations.push(crate::common::validate::ConstraintViolation {
10428                    path: path.to_string(),
10429                    message: format!("{} (got {})", "value exceeds maximum length 16", len),
10430                    kind: crate::common::validate::ConstraintKind::MaxLength,
10431                });
10432            }
10433        }
10434    }
10435}
10436impl crate::common::validate::Validatable for Max2048Text {
10437    #[allow(clippy::unreadable_literal)]
10438    fn validate_constraints(
10439        &self,
10440        path: &str,
10441        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10442    ) {
10443        let len = self.0.chars().count();
10444        {
10445            let violated = len < 1usize;
10446            if violated {
10447                violations.push(crate::common::validate::ConstraintViolation {
10448                    path: path.to_string(),
10449                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10450                    kind: crate::common::validate::ConstraintKind::MinLength,
10451                });
10452            }
10453        }
10454        {
10455            let violated = len > 2048usize;
10456            if violated {
10457                violations.push(crate::common::validate::ConstraintViolation {
10458                    path: path.to_string(),
10459                    message: format!("{} (got {})", "value exceeds maximum length 2048", len),
10460                    kind: crate::common::validate::ConstraintKind::MaxLength,
10461                });
10462            }
10463        }
10464    }
10465}
10466impl crate::common::validate::Validatable for Max34Text {
10467    #[allow(clippy::unreadable_literal)]
10468    fn validate_constraints(
10469        &self,
10470        path: &str,
10471        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10472    ) {
10473        let len = self.0.chars().count();
10474        {
10475            let violated = len < 1usize;
10476            if violated {
10477                violations.push(crate::common::validate::ConstraintViolation {
10478                    path: path.to_string(),
10479                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10480                    kind: crate::common::validate::ConstraintKind::MinLength,
10481                });
10482            }
10483        }
10484        {
10485            let violated = len > 34usize;
10486            if violated {
10487                violations.push(crate::common::validate::ConstraintViolation {
10488                    path: path.to_string(),
10489                    message: format!("{} (got {})", "value exceeds maximum length 34", len),
10490                    kind: crate::common::validate::ConstraintKind::MaxLength,
10491                });
10492            }
10493        }
10494    }
10495}
10496impl crate::common::validate::Validatable for Max350Text {
10497    #[allow(clippy::unreadable_literal)]
10498    fn validate_constraints(
10499        &self,
10500        path: &str,
10501        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10502    ) {
10503        let len = self.0.chars().count();
10504        {
10505            let violated = len < 1usize;
10506            if violated {
10507                violations.push(crate::common::validate::ConstraintViolation {
10508                    path: path.to_string(),
10509                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10510                    kind: crate::common::validate::ConstraintKind::MinLength,
10511                });
10512            }
10513        }
10514        {
10515            let violated = len > 350usize;
10516            if violated {
10517                violations.push(crate::common::validate::ConstraintViolation {
10518                    path: path.to_string(),
10519                    message: format!("{} (got {})", "value exceeds maximum length 350", len),
10520                    kind: crate::common::validate::ConstraintKind::MaxLength,
10521                });
10522            }
10523        }
10524    }
10525}
10526impl crate::common::validate::Validatable for Max35Text {
10527    #[allow(clippy::unreadable_literal)]
10528    fn validate_constraints(
10529        &self,
10530        path: &str,
10531        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10532    ) {
10533        let len = self.0.chars().count();
10534        {
10535            let violated = len < 1usize;
10536            if violated {
10537                violations.push(crate::common::validate::ConstraintViolation {
10538                    path: path.to_string(),
10539                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10540                    kind: crate::common::validate::ConstraintKind::MinLength,
10541                });
10542            }
10543        }
10544        {
10545            let violated = len > 35usize;
10546            if violated {
10547                violations.push(crate::common::validate::ConstraintViolation {
10548                    path: path.to_string(),
10549                    message: format!("{} (got {})", "value exceeds maximum length 35", len),
10550                    kind: crate::common::validate::ConstraintKind::MaxLength,
10551                });
10552            }
10553        }
10554    }
10555}
10556impl crate::common::validate::Validatable for Max4Text {
10557    #[allow(clippy::unreadable_literal)]
10558    fn validate_constraints(
10559        &self,
10560        path: &str,
10561        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10562    ) {
10563        let len = self.0.chars().count();
10564        {
10565            let violated = len < 1usize;
10566            if violated {
10567                violations.push(crate::common::validate::ConstraintViolation {
10568                    path: path.to_string(),
10569                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10570                    kind: crate::common::validate::ConstraintKind::MinLength,
10571                });
10572            }
10573        }
10574        {
10575            let violated = len > 4usize;
10576            if violated {
10577                violations.push(crate::common::validate::ConstraintViolation {
10578                    path: path.to_string(),
10579                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
10580                    kind: crate::common::validate::ConstraintKind::MaxLength,
10581                });
10582            }
10583        }
10584    }
10585}
10586impl crate::common::validate::Validatable for Max70Text {
10587    #[allow(clippy::unreadable_literal)]
10588    fn validate_constraints(
10589        &self,
10590        path: &str,
10591        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10592    ) {
10593        let len = self.0.chars().count();
10594        {
10595            let violated = len < 1usize;
10596            if violated {
10597                violations.push(crate::common::validate::ConstraintViolation {
10598                    path: path.to_string(),
10599                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10600                    kind: crate::common::validate::ConstraintKind::MinLength,
10601                });
10602            }
10603        }
10604        {
10605            let violated = len > 70usize;
10606            if violated {
10607                violations.push(crate::common::validate::ConstraintViolation {
10608                    path: path.to_string(),
10609                    message: format!("{} (got {})", "value exceeds maximum length 70", len),
10610                    kind: crate::common::validate::ConstraintKind::MaxLength,
10611                });
10612            }
10613        }
10614    }
10615}
10616impl crate::common::validate::Validatable for NamePrefix2Code {
10617    fn validate_constraints(
10618        &self,
10619        _path: &str,
10620        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10621    ) {
10622    }
10623}
10624impl crate::common::validate::Validatable for Number {
10625    #[allow(clippy::unreadable_literal)]
10626    fn validate_constraints(
10627        &self,
10628        path: &str,
10629        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10630    ) {
10631        {
10632            let value: &str = &self.0;
10633            let frac_count = value.find('.').map_or(0, |dot| {
10634                value[dot + 1..]
10635                    .chars()
10636                    .filter(char::is_ascii_digit)
10637                    .count()
10638            });
10639            let violated = frac_count > 0usize;
10640            if violated {
10641                violations.push(crate::common::validate::ConstraintViolation {
10642                    path: path.to_string(),
10643                    message: format!(
10644                        "{} (got {})",
10645                        "value exceeds maximum fraction digits 0", frac_count
10646                    ),
10647                    kind: crate::common::validate::ConstraintKind::FractionDigits,
10648                });
10649            }
10650        }
10651        {
10652            let value: &str = &self.0;
10653            let digit_count = value.chars().filter(char::is_ascii_digit).count();
10654            let violated = digit_count > 18usize;
10655            if violated {
10656                violations.push(crate::common::validate::ConstraintViolation {
10657                    path: path.to_string(),
10658                    message: format!(
10659                        "{} (got {})",
10660                        "value exceeds maximum total digits 18", digit_count
10661                    ),
10662                    kind: crate::common::validate::ConstraintKind::TotalDigits,
10663                });
10664            }
10665        }
10666    }
10667}
10668impl crate::common::validate::Validatable for PercentageRate {
10669    #[allow(clippy::unreadable_literal)]
10670    fn validate_constraints(
10671        &self,
10672        path: &str,
10673        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10674    ) {
10675        {
10676            let value: &str = &self.0;
10677            let frac_count = value.find('.').map_or(0, |dot| {
10678                value[dot + 1..]
10679                    .chars()
10680                    .filter(char::is_ascii_digit)
10681                    .count()
10682            });
10683            let violated = frac_count > 10usize;
10684            if violated {
10685                violations.push(crate::common::validate::ConstraintViolation {
10686                    path: path.to_string(),
10687                    message: format!(
10688                        "{} (got {})",
10689                        "value exceeds maximum fraction digits 10", frac_count
10690                    ),
10691                    kind: crate::common::validate::ConstraintKind::FractionDigits,
10692                });
10693            }
10694        }
10695        {
10696            let value: &str = &self.0;
10697            let digit_count = value.chars().filter(char::is_ascii_digit).count();
10698            let violated = digit_count > 11usize;
10699            if violated {
10700                violations.push(crate::common::validate::ConstraintViolation {
10701                    path: path.to_string(),
10702                    message: format!(
10703                        "{} (got {})",
10704                        "value exceeds maximum total digits 11", digit_count
10705                    ),
10706                    kind: crate::common::validate::ConstraintKind::TotalDigits,
10707                });
10708            }
10709        }
10710    }
10711}
10712impl crate::common::validate::Validatable for PhoneNumber {
10713    #[allow(clippy::unreadable_literal)]
10714    fn validate_constraints(
10715        &self,
10716        path: &str,
10717        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10718    ) {
10719        {
10720            let value: &str = &self.0;
10721            let violated = {
10722                let bytes = value.as_bytes();
10723                let len = bytes.len();
10724                let result: bool = (|| -> bool {
10725                    let mut pos: usize = 0;
10726                    if !(4usize..=35usize).contains(&len) {
10727                        return true;
10728                    }
10729                    if pos >= len || bytes[pos] != 43u8 {
10730                        return true;
10731                    }
10732                    pos += 1;
10733                    {
10734                        let start = pos;
10735                        let limit = if pos + 3usize < len {
10736                            pos + 3usize
10737                        } else {
10738                            len
10739                        };
10740                        while pos < limit {
10741                            let b = bytes[pos];
10742                            if !(48u8..=57u8).contains(&b) {
10743                                break;
10744                            }
10745                            pos += 1;
10746                        }
10747                        let matched = pos - start;
10748                        if matched < 1usize {
10749                            return true;
10750                        }
10751                    }
10752                    if pos >= len || bytes[pos] != 45u8 {
10753                        return true;
10754                    }
10755                    pos += 1;
10756                    {
10757                        let start = pos;
10758                        let limit = if pos + 30usize < len {
10759                            pos + 30usize
10760                        } else {
10761                            len
10762                        };
10763                        while pos < limit {
10764                            let b = bytes[pos];
10765                            if !(48u8..=57u8).contains(&b)
10766                                && b != 40u8
10767                                && b != 41u8
10768                                && b != 43u8
10769                                && b != 45u8
10770                            {
10771                                break;
10772                            }
10773                            pos += 1;
10774                        }
10775                        let matched = pos - start;
10776                        if matched < 1usize {
10777                            return true;
10778                        }
10779                    }
10780                    if pos != len {
10781                        return true;
10782                    }
10783                    false
10784                })();
10785                result
10786            };
10787            if violated {
10788                violations.push(crate::common::validate::ConstraintViolation {
10789                    path: path.to_string(),
10790                    message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
10791                        .to_string(),
10792                    kind: crate::common::validate::ConstraintKind::Pattern,
10793                });
10794            }
10795        }
10796    }
10797}
10798impl crate::common::validate::Validatable for PreferredContactMethod1Code {
10799    fn validate_constraints(
10800        &self,
10801        _path: &str,
10802        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10803    ) {
10804    }
10805}
10806impl crate::common::validate::Validatable for Priority2Code {
10807    fn validate_constraints(
10808        &self,
10809        _path: &str,
10810        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10811    ) {
10812    }
10813}
10814impl crate::common::validate::Validatable for Priority3Code {
10815    fn validate_constraints(
10816        &self,
10817        _path: &str,
10818        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10819    ) {
10820    }
10821}
10822impl crate::common::validate::Validatable for SettlementMethod1Code {
10823    fn validate_constraints(
10824        &self,
10825        _path: &str,
10826        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10827    ) {
10828    }
10829}
10830impl crate::common::validate::Validatable for TaxRecordPeriod1Code {
10831    fn validate_constraints(
10832        &self,
10833        _path: &str,
10834        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10835    ) {
10836    }
10837}
10838impl crate::common::validate::Validatable for TrueFalseIndicator {
10839    fn validate_constraints(
10840        &self,
10841        _path: &str,
10842        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10843    ) {
10844    }
10845}
10846impl crate::common::validate::Validatable for UUIDv4Identifier {
10847    #[allow(clippy::unreadable_literal)]
10848    fn validate_constraints(
10849        &self,
10850        path: &str,
10851        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10852    ) {
10853        {
10854            let value: &str = &self.0;
10855            let violated = {
10856                let bytes = value.as_bytes();
10857                bytes.len() != 36usize
10858                    || ({
10859                        let b = bytes[0usize];
10860                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10861                    })
10862                    || ({
10863                        let b = bytes[1usize];
10864                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10865                    })
10866                    || ({
10867                        let b = bytes[2usize];
10868                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10869                    })
10870                    || ({
10871                        let b = bytes[3usize];
10872                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10873                    })
10874                    || ({
10875                        let b = bytes[4usize];
10876                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10877                    })
10878                    || ({
10879                        let b = bytes[5usize];
10880                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10881                    })
10882                    || ({
10883                        let b = bytes[6usize];
10884                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10885                    })
10886                    || ({
10887                        let b = bytes[7usize];
10888                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10889                    })
10890                    || bytes[8usize] != 45u8
10891                    || ({
10892                        let b = bytes[9usize];
10893                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10894                    })
10895                    || ({
10896                        let b = bytes[10usize];
10897                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10898                    })
10899                    || ({
10900                        let b = bytes[11usize];
10901                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10902                    })
10903                    || ({
10904                        let b = bytes[12usize];
10905                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10906                    })
10907                    || bytes[13usize] != 45u8
10908                    || bytes[14usize] != 52u8
10909                    || ({
10910                        let b = bytes[15usize];
10911                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10912                    })
10913                    || ({
10914                        let b = bytes[16usize];
10915                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10916                    })
10917                    || ({
10918                        let b = bytes[17usize];
10919                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10920                    })
10921                    || bytes[18usize] != 45u8
10922                    || ({
10923                        let b = bytes[19usize];
10924                        b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
10925                    })
10926                    || ({
10927                        let b = bytes[20usize];
10928                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10929                    })
10930                    || ({
10931                        let b = bytes[21usize];
10932                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10933                    })
10934                    || ({
10935                        let b = bytes[22usize];
10936                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10937                    })
10938                    || bytes[23usize] != 45u8
10939                    || ({
10940                        let b = bytes[24usize];
10941                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10942                    })
10943                    || ({
10944                        let b = bytes[25usize];
10945                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10946                    })
10947                    || ({
10948                        let b = bytes[26usize];
10949                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10950                    })
10951                    || ({
10952                        let b = bytes[27usize];
10953                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10954                    })
10955                    || ({
10956                        let b = bytes[28usize];
10957                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10958                    })
10959                    || ({
10960                        let b = bytes[29usize];
10961                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10962                    })
10963                    || ({
10964                        let b = bytes[30usize];
10965                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10966                    })
10967                    || ({
10968                        let b = bytes[31usize];
10969                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10970                    })
10971                    || ({
10972                        let b = bytes[32usize];
10973                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10974                    })
10975                    || ({
10976                        let b = bytes[33usize];
10977                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10978                    })
10979                    || ({
10980                        let b = bytes[34usize];
10981                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10982                    })
10983                    || ({
10984                        let b = bytes[35usize];
10985                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10986                    })
10987            };
10988            if violated {
10989                violations
10990                    .push(crate::common::validate::ConstraintViolation {
10991                        path: path.to_string(),
10992                        message: "value does not match pattern [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}"
10993                            .to_string(),
10994                        kind: crate::common::validate::ConstraintKind::Pattern,
10995                    });
10996            }
10997        }
10998    }
10999}
11000impl crate::common::validate::Validatable for AccountIdentification4Choice {
11001    fn validate_constraints(
11002        &self,
11003        path: &str,
11004        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11005    ) {
11006        match self {
11007            Self::IBAN(inner) => {
11008                let snap = violations.len();
11009                inner.validate_constraints("", violations);
11010                if violations.len() > snap {
11011                    let pfx = format!("{path}/IBAN");
11012                    for v in &mut violations[snap..] {
11013                        v.path.insert_str(0, &pfx);
11014                    }
11015                }
11016            }
11017            Self::Othr(inner) => {
11018                let snap = violations.len();
11019                inner.validate_constraints("", violations);
11020                if violations.len() > snap {
11021                    let pfx = format!("{path}/Othr");
11022                    for v in &mut violations[snap..] {
11023                        v.path.insert_str(0, &pfx);
11024                    }
11025                }
11026            }
11027        }
11028    }
11029}
11030impl crate::common::validate::Validatable for AccountSchemeName1Choice {
11031    fn validate_constraints(
11032        &self,
11033        path: &str,
11034        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11035    ) {
11036        match self {
11037            Self::Cd(inner) => {
11038                let snap = violations.len();
11039                inner.validate_constraints("", violations);
11040                if violations.len() > snap {
11041                    let pfx = format!("{path}/Cd");
11042                    for v in &mut violations[snap..] {
11043                        v.path.insert_str(0, &pfx);
11044                    }
11045                }
11046            }
11047            Self::Prtry(inner) => {
11048                let snap = violations.len();
11049                inner.validate_constraints("", violations);
11050                if violations.len() > snap {
11051                    let pfx = format!("{path}/Prtry");
11052                    for v in &mut violations[snap..] {
11053                        v.path.insert_str(0, &pfx);
11054                    }
11055                }
11056            }
11057        }
11058    }
11059}
11060impl crate::common::validate::Validatable for ActiveCurrencyAndAmount {
11061    fn validate_constraints(
11062        &self,
11063        path: &str,
11064        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11065    ) {
11066        self.value.validate_constraints(path, violations);
11067        {
11068            let snap = violations.len();
11069            self.ccy.validate_constraints("", violations);
11070            if violations.len() > snap {
11071                let pfx = format!("{path}/@Ccy");
11072                for v in &mut violations[snap..] {
11073                    v.path.insert_str(0, &pfx);
11074                }
11075            }
11076        }
11077    }
11078}
11079impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmount {
11080    fn validate_constraints(
11081        &self,
11082        path: &str,
11083        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11084    ) {
11085        self.value.validate_constraints(path, violations);
11086        {
11087            let snap = violations.len();
11088            self.ccy.validate_constraints("", violations);
11089            if violations.len() > snap {
11090                let pfx = format!("{path}/@Ccy");
11091                for v in &mut violations[snap..] {
11092                    v.path.insert_str(0, &pfx);
11093                }
11094            }
11095        }
11096    }
11097}
11098impl crate::common::validate::Validatable for AddressType3Choice {
11099    fn validate_constraints(
11100        &self,
11101        path: &str,
11102        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11103    ) {
11104        match self {
11105            Self::Cd(inner) => {
11106                let snap = violations.len();
11107                inner.validate_constraints("", violations);
11108                if violations.len() > snap {
11109                    let pfx = format!("{path}/Cd");
11110                    for v in &mut violations[snap..] {
11111                        v.path.insert_str(0, &pfx);
11112                    }
11113                }
11114            }
11115            Self::Prtry(inner) => {
11116                let snap = violations.len();
11117                inner.validate_constraints("", violations);
11118                if violations.len() > snap {
11119                    let pfx = format!("{path}/Prtry");
11120                    for v in &mut violations[snap..] {
11121                        v.path.insert_str(0, &pfx);
11122                    }
11123                }
11124            }
11125        }
11126    }
11127}
11128impl crate::common::validate::Validatable for BranchAndFinancialInstitutionIdentification6 {
11129    fn validate_constraints(
11130        &self,
11131        path: &str,
11132        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11133    ) {
11134        {
11135            let snap = violations.len();
11136            self.fin_instn_id.validate_constraints("", violations);
11137            if violations.len() > snap {
11138                let pfx = format!("{path}/FinInstnId");
11139                for v in &mut violations[snap..] {
11140                    v.path.insert_str(0, &pfx);
11141                }
11142            }
11143        }
11144        if let Some(ref val) = self.brnch_id {
11145            let snap = violations.len();
11146            val.validate_constraints("", violations);
11147            if violations.len() > snap {
11148                let pfx = format!("{path}/BrnchId");
11149                for v in &mut violations[snap..] {
11150                    v.path.insert_str(0, &pfx);
11151                }
11152            }
11153        }
11154    }
11155}
11156impl crate::common::validate::Validatable for BranchData3 {
11157    fn validate_constraints(
11158        &self,
11159        path: &str,
11160        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11161    ) {
11162        if let Some(ref val) = self.id {
11163            let snap = violations.len();
11164            val.validate_constraints("", violations);
11165            if violations.len() > snap {
11166                let pfx = format!("{path}/Id");
11167                for v in &mut violations[snap..] {
11168                    v.path.insert_str(0, &pfx);
11169                }
11170            }
11171        }
11172        if let Some(ref val) = self.lei {
11173            let snap = violations.len();
11174            val.validate_constraints("", violations);
11175            if violations.len() > snap {
11176                let pfx = format!("{path}/LEI");
11177                for v in &mut violations[snap..] {
11178                    v.path.insert_str(0, &pfx);
11179                }
11180            }
11181        }
11182        if let Some(ref val) = self.nm {
11183            let snap = violations.len();
11184            val.validate_constraints("", violations);
11185            if violations.len() > snap {
11186                let pfx = format!("{path}/Nm");
11187                for v in &mut violations[snap..] {
11188                    v.path.insert_str(0, &pfx);
11189                }
11190            }
11191        }
11192        if let Some(ref val) = self.pstl_adr {
11193            let snap = violations.len();
11194            val.validate_constraints("", violations);
11195            if violations.len() > snap {
11196                let pfx = format!("{path}/PstlAdr");
11197                for v in &mut violations[snap..] {
11198                    v.path.insert_str(0, &pfx);
11199                }
11200            }
11201        }
11202    }
11203}
11204impl crate::common::validate::Validatable for CashAccount40 {
11205    fn validate_constraints(
11206        &self,
11207        path: &str,
11208        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11209    ) {
11210        if let Some(ref wrapper) = self.id {
11211            let snap = violations.len();
11212            wrapper.inner.validate_constraints("", violations);
11213            if violations.len() > snap {
11214                let pfx = format!("{path}/Id");
11215                for v in &mut violations[snap..] {
11216                    v.path.insert_str(0, &pfx);
11217                }
11218            }
11219        }
11220        if let Some(ref wrapper) = self.tp {
11221            let snap = violations.len();
11222            wrapper.inner.validate_constraints("", violations);
11223            if violations.len() > snap {
11224                let pfx = format!("{path}/Tp");
11225                for v in &mut violations[snap..] {
11226                    v.path.insert_str(0, &pfx);
11227                }
11228            }
11229        }
11230        if let Some(ref val) = self.ccy {
11231            let snap = violations.len();
11232            val.validate_constraints("", violations);
11233            if violations.len() > snap {
11234                let pfx = format!("{path}/Ccy");
11235                for v in &mut violations[snap..] {
11236                    v.path.insert_str(0, &pfx);
11237                }
11238            }
11239        }
11240        if let Some(ref val) = self.nm {
11241            let snap = violations.len();
11242            val.validate_constraints("", violations);
11243            if violations.len() > snap {
11244                let pfx = format!("{path}/Nm");
11245                for v in &mut violations[snap..] {
11246                    v.path.insert_str(0, &pfx);
11247                }
11248            }
11249        }
11250        if let Some(ref val) = self.prxy {
11251            let snap = violations.len();
11252            val.validate_constraints("", violations);
11253            if violations.len() > snap {
11254                let pfx = format!("{path}/Prxy");
11255                for v in &mut violations[snap..] {
11256                    v.path.insert_str(0, &pfx);
11257                }
11258            }
11259        }
11260    }
11261}
11262impl crate::common::validate::Validatable for CashAccountType2Choice {
11263    fn validate_constraints(
11264        &self,
11265        path: &str,
11266        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11267    ) {
11268        match self {
11269            Self::Cd(inner) => {
11270                let snap = violations.len();
11271                inner.validate_constraints("", violations);
11272                if violations.len() > snap {
11273                    let pfx = format!("{path}/Cd");
11274                    for v in &mut violations[snap..] {
11275                        v.path.insert_str(0, &pfx);
11276                    }
11277                }
11278            }
11279            Self::Prtry(inner) => {
11280                let snap = violations.len();
11281                inner.validate_constraints("", violations);
11282                if violations.len() > snap {
11283                    let pfx = format!("{path}/Prtry");
11284                    for v in &mut violations[snap..] {
11285                        v.path.insert_str(0, &pfx);
11286                    }
11287                }
11288            }
11289        }
11290    }
11291}
11292impl crate::common::validate::Validatable for CategoryPurpose1Choice {
11293    fn validate_constraints(
11294        &self,
11295        path: &str,
11296        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11297    ) {
11298        match self {
11299            Self::Cd(inner) => {
11300                let snap = violations.len();
11301                inner.validate_constraints("", violations);
11302                if violations.len() > snap {
11303                    let pfx = format!("{path}/Cd");
11304                    for v in &mut violations[snap..] {
11305                        v.path.insert_str(0, &pfx);
11306                    }
11307                }
11308            }
11309            Self::Prtry(inner) => {
11310                let snap = violations.len();
11311                inner.validate_constraints("", violations);
11312                if violations.len() > snap {
11313                    let pfx = format!("{path}/Prtry");
11314                    for v in &mut violations[snap..] {
11315                        v.path.insert_str(0, &pfx);
11316                    }
11317                }
11318            }
11319        }
11320    }
11321}
11322impl crate::common::validate::Validatable for ClearingSystemIdentification2Choice {
11323    fn validate_constraints(
11324        &self,
11325        path: &str,
11326        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11327    ) {
11328        match self {
11329            Self::Cd(inner) => {
11330                let snap = violations.len();
11331                inner.validate_constraints("", violations);
11332                if violations.len() > snap {
11333                    let pfx = format!("{path}/Cd");
11334                    for v in &mut violations[snap..] {
11335                        v.path.insert_str(0, &pfx);
11336                    }
11337                }
11338            }
11339            Self::Prtry(inner) => {
11340                let snap = violations.len();
11341                inner.validate_constraints("", violations);
11342                if violations.len() > snap {
11343                    let pfx = format!("{path}/Prtry");
11344                    for v in &mut violations[snap..] {
11345                        v.path.insert_str(0, &pfx);
11346                    }
11347                }
11348            }
11349        }
11350    }
11351}
11352impl crate::common::validate::Validatable for ClearingSystemIdentification3Choice {
11353    fn validate_constraints(
11354        &self,
11355        path: &str,
11356        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11357    ) {
11358        match self {
11359            Self::Cd(inner) => {
11360                let snap = violations.len();
11361                inner.validate_constraints("", violations);
11362                if violations.len() > snap {
11363                    let pfx = format!("{path}/Cd");
11364                    for v in &mut violations[snap..] {
11365                        v.path.insert_str(0, &pfx);
11366                    }
11367                }
11368            }
11369            Self::Prtry(inner) => {
11370                let snap = violations.len();
11371                inner.validate_constraints("", violations);
11372                if violations.len() > snap {
11373                    let pfx = format!("{path}/Prtry");
11374                    for v in &mut violations[snap..] {
11375                        v.path.insert_str(0, &pfx);
11376                    }
11377                }
11378            }
11379        }
11380    }
11381}
11382impl crate::common::validate::Validatable for ClearingSystemMemberIdentification2 {
11383    fn validate_constraints(
11384        &self,
11385        path: &str,
11386        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11387    ) {
11388        if let Some(ref wrapper) = self.clr_sys_id {
11389            let snap = violations.len();
11390            wrapper.inner.validate_constraints("", violations);
11391            if violations.len() > snap {
11392                let pfx = format!("{path}/ClrSysId");
11393                for v in &mut violations[snap..] {
11394                    v.path.insert_str(0, &pfx);
11395                }
11396            }
11397        }
11398        {
11399            let snap = violations.len();
11400            self.mmb_id.validate_constraints("", violations);
11401            if violations.len() > snap {
11402                let pfx = format!("{path}/MmbId");
11403                for v in &mut violations[snap..] {
11404                    v.path.insert_str(0, &pfx);
11405                }
11406            }
11407        }
11408    }
11409}
11410impl crate::common::validate::Validatable for Contact4 {
11411    fn validate_constraints(
11412        &self,
11413        path: &str,
11414        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11415    ) {
11416        if let Some(ref val) = self.nm_prfx {
11417            let snap = violations.len();
11418            val.validate_constraints("", violations);
11419            if violations.len() > snap {
11420                let pfx = format!("{path}/NmPrfx");
11421                for v in &mut violations[snap..] {
11422                    v.path.insert_str(0, &pfx);
11423                }
11424            }
11425        }
11426        if let Some(ref val) = self.nm {
11427            let snap = violations.len();
11428            val.validate_constraints("", violations);
11429            if violations.len() > snap {
11430                let pfx = format!("{path}/Nm");
11431                for v in &mut violations[snap..] {
11432                    v.path.insert_str(0, &pfx);
11433                }
11434            }
11435        }
11436        if let Some(ref val) = self.phne_nb {
11437            let snap = violations.len();
11438            val.validate_constraints("", violations);
11439            if violations.len() > snap {
11440                let pfx = format!("{path}/PhneNb");
11441                for v in &mut violations[snap..] {
11442                    v.path.insert_str(0, &pfx);
11443                }
11444            }
11445        }
11446        if let Some(ref val) = self.mob_nb {
11447            let snap = violations.len();
11448            val.validate_constraints("", violations);
11449            if violations.len() > snap {
11450                let pfx = format!("{path}/MobNb");
11451                for v in &mut violations[snap..] {
11452                    v.path.insert_str(0, &pfx);
11453                }
11454            }
11455        }
11456        if let Some(ref val) = self.fax_nb {
11457            let snap = violations.len();
11458            val.validate_constraints("", violations);
11459            if violations.len() > snap {
11460                let pfx = format!("{path}/FaxNb");
11461                for v in &mut violations[snap..] {
11462                    v.path.insert_str(0, &pfx);
11463                }
11464            }
11465        }
11466        if let Some(ref val) = self.email_adr {
11467            let snap = violations.len();
11468            val.validate_constraints("", violations);
11469            if violations.len() > snap {
11470                let pfx = format!("{path}/EmailAdr");
11471                for v in &mut violations[snap..] {
11472                    v.path.insert_str(0, &pfx);
11473                }
11474            }
11475        }
11476        if let Some(ref val) = self.email_purp {
11477            let snap = violations.len();
11478            val.validate_constraints("", violations);
11479            if violations.len() > snap {
11480                let pfx = format!("{path}/EmailPurp");
11481                for v in &mut violations[snap..] {
11482                    v.path.insert_str(0, &pfx);
11483                }
11484            }
11485        }
11486        if let Some(ref val) = self.job_titl {
11487            let snap = violations.len();
11488            val.validate_constraints("", violations);
11489            if violations.len() > snap {
11490                let pfx = format!("{path}/JobTitl");
11491                for v in &mut violations[snap..] {
11492                    v.path.insert_str(0, &pfx);
11493                }
11494            }
11495        }
11496        if let Some(ref val) = self.rspnsblty {
11497            let snap = violations.len();
11498            val.validate_constraints("", violations);
11499            if violations.len() > snap {
11500                let pfx = format!("{path}/Rspnsblty");
11501                for v in &mut violations[snap..] {
11502                    v.path.insert_str(0, &pfx);
11503                }
11504            }
11505        }
11506        if let Some(ref val) = self.dept {
11507            let snap = violations.len();
11508            val.validate_constraints("", violations);
11509            if violations.len() > snap {
11510                let pfx = format!("{path}/Dept");
11511                for v in &mut violations[snap..] {
11512                    v.path.insert_str(0, &pfx);
11513                }
11514            }
11515        }
11516        for (idx, elem) in self.othr.iter().enumerate() {
11517            let snap = violations.len();
11518            elem.validate_constraints("", violations);
11519            if violations.len() > snap {
11520                let pfx = format!("{path}/Othr[{idx}]");
11521                for v in &mut violations[snap..] {
11522                    v.path.insert_str(0, &pfx);
11523                }
11524            }
11525        }
11526        if let Some(ref val) = self.prefrd_mtd {
11527            let snap = violations.len();
11528            val.validate_constraints("", violations);
11529            if violations.len() > snap {
11530                let pfx = format!("{path}/PrefrdMtd");
11531                for v in &mut violations[snap..] {
11532                    v.path.insert_str(0, &pfx);
11533                }
11534            }
11535        }
11536    }
11537}
11538impl crate::common::validate::Validatable for CreditTransferTransaction52 {
11539    fn validate_constraints(
11540        &self,
11541        path: &str,
11542        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11543    ) {
11544        if let Some(ref val) = self.ultmt_dbtr {
11545            let snap = violations.len();
11546            val.validate_constraints("", violations);
11547            if violations.len() > snap {
11548                let pfx = format!("{path}/UltmtDbtr");
11549                for v in &mut violations[snap..] {
11550                    v.path.insert_str(0, &pfx);
11551                }
11552            }
11553        }
11554        if let Some(ref val) = self.initg_pty {
11555            let snap = violations.len();
11556            val.validate_constraints("", violations);
11557            if violations.len() > snap {
11558                let pfx = format!("{path}/InitgPty");
11559                for v in &mut violations[snap..] {
11560                    v.path.insert_str(0, &pfx);
11561                }
11562            }
11563        }
11564        {
11565            let snap = violations.len();
11566            self.dbtr.validate_constraints("", violations);
11567            if violations.len() > snap {
11568                let pfx = format!("{path}/Dbtr");
11569                for v in &mut violations[snap..] {
11570                    v.path.insert_str(0, &pfx);
11571                }
11572            }
11573        }
11574        if let Some(ref val) = self.dbtr_acct {
11575            let snap = violations.len();
11576            val.validate_constraints("", violations);
11577            if violations.len() > snap {
11578                let pfx = format!("{path}/DbtrAcct");
11579                for v in &mut violations[snap..] {
11580                    v.path.insert_str(0, &pfx);
11581                }
11582            }
11583        }
11584        {
11585            let snap = violations.len();
11586            self.dbtr_agt.validate_constraints("", violations);
11587            if violations.len() > snap {
11588                let pfx = format!("{path}/DbtrAgt");
11589                for v in &mut violations[snap..] {
11590                    v.path.insert_str(0, &pfx);
11591                }
11592            }
11593        }
11594        if let Some(ref val) = self.dbtr_agt_acct {
11595            let snap = violations.len();
11596            val.validate_constraints("", violations);
11597            if violations.len() > snap {
11598                let pfx = format!("{path}/DbtrAgtAcct");
11599                for v in &mut violations[snap..] {
11600                    v.path.insert_str(0, &pfx);
11601                }
11602            }
11603        }
11604        if let Some(ref val) = self.prvs_instg_agt1 {
11605            let snap = violations.len();
11606            val.validate_constraints("", violations);
11607            if violations.len() > snap {
11608                let pfx = format!("{path}/PrvsInstgAgt1");
11609                for v in &mut violations[snap..] {
11610                    v.path.insert_str(0, &pfx);
11611                }
11612            }
11613        }
11614        if let Some(ref val) = self.prvs_instg_agt1acct {
11615            let snap = violations.len();
11616            val.validate_constraints("", violations);
11617            if violations.len() > snap {
11618                let pfx = format!("{path}/PrvsInstgAgt1Acct");
11619                for v in &mut violations[snap..] {
11620                    v.path.insert_str(0, &pfx);
11621                }
11622            }
11623        }
11624        if let Some(ref val) = self.prvs_instg_agt2 {
11625            let snap = violations.len();
11626            val.validate_constraints("", violations);
11627            if violations.len() > snap {
11628                let pfx = format!("{path}/PrvsInstgAgt2");
11629                for v in &mut violations[snap..] {
11630                    v.path.insert_str(0, &pfx);
11631                }
11632            }
11633        }
11634        if let Some(ref val) = self.prvs_instg_agt2acct {
11635            let snap = violations.len();
11636            val.validate_constraints("", violations);
11637            if violations.len() > snap {
11638                let pfx = format!("{path}/PrvsInstgAgt2Acct");
11639                for v in &mut violations[snap..] {
11640                    v.path.insert_str(0, &pfx);
11641                }
11642            }
11643        }
11644        if let Some(ref val) = self.prvs_instg_agt3 {
11645            let snap = violations.len();
11646            val.validate_constraints("", violations);
11647            if violations.len() > snap {
11648                let pfx = format!("{path}/PrvsInstgAgt3");
11649                for v in &mut violations[snap..] {
11650                    v.path.insert_str(0, &pfx);
11651                }
11652            }
11653        }
11654        if let Some(ref val) = self.prvs_instg_agt3acct {
11655            let snap = violations.len();
11656            val.validate_constraints("", violations);
11657            if violations.len() > snap {
11658                let pfx = format!("{path}/PrvsInstgAgt3Acct");
11659                for v in &mut violations[snap..] {
11660                    v.path.insert_str(0, &pfx);
11661                }
11662            }
11663        }
11664        if let Some(ref val) = self.intrmy_agt1 {
11665            let snap = violations.len();
11666            val.validate_constraints("", violations);
11667            if violations.len() > snap {
11668                let pfx = format!("{path}/IntrmyAgt1");
11669                for v in &mut violations[snap..] {
11670                    v.path.insert_str(0, &pfx);
11671                }
11672            }
11673        }
11674        if let Some(ref val) = self.intrmy_agt1acct {
11675            let snap = violations.len();
11676            val.validate_constraints("", violations);
11677            if violations.len() > snap {
11678                let pfx = format!("{path}/IntrmyAgt1Acct");
11679                for v in &mut violations[snap..] {
11680                    v.path.insert_str(0, &pfx);
11681                }
11682            }
11683        }
11684        if let Some(ref val) = self.intrmy_agt2 {
11685            let snap = violations.len();
11686            val.validate_constraints("", violations);
11687            if violations.len() > snap {
11688                let pfx = format!("{path}/IntrmyAgt2");
11689                for v in &mut violations[snap..] {
11690                    v.path.insert_str(0, &pfx);
11691                }
11692            }
11693        }
11694        if let Some(ref val) = self.intrmy_agt2acct {
11695            let snap = violations.len();
11696            val.validate_constraints("", violations);
11697            if violations.len() > snap {
11698                let pfx = format!("{path}/IntrmyAgt2Acct");
11699                for v in &mut violations[snap..] {
11700                    v.path.insert_str(0, &pfx);
11701                }
11702            }
11703        }
11704        if let Some(ref val) = self.intrmy_agt3 {
11705            let snap = violations.len();
11706            val.validate_constraints("", violations);
11707            if violations.len() > snap {
11708                let pfx = format!("{path}/IntrmyAgt3");
11709                for v in &mut violations[snap..] {
11710                    v.path.insert_str(0, &pfx);
11711                }
11712            }
11713        }
11714        if let Some(ref val) = self.intrmy_agt3acct {
11715            let snap = violations.len();
11716            val.validate_constraints("", violations);
11717            if violations.len() > snap {
11718                let pfx = format!("{path}/IntrmyAgt3Acct");
11719                for v in &mut violations[snap..] {
11720                    v.path.insert_str(0, &pfx);
11721                }
11722            }
11723        }
11724        {
11725            let snap = violations.len();
11726            self.cdtr_agt.validate_constraints("", violations);
11727            if violations.len() > snap {
11728                let pfx = format!("{path}/CdtrAgt");
11729                for v in &mut violations[snap..] {
11730                    v.path.insert_str(0, &pfx);
11731                }
11732            }
11733        }
11734        if let Some(ref val) = self.cdtr_agt_acct {
11735            let snap = violations.len();
11736            val.validate_constraints("", violations);
11737            if violations.len() > snap {
11738                let pfx = format!("{path}/CdtrAgtAcct");
11739                for v in &mut violations[snap..] {
11740                    v.path.insert_str(0, &pfx);
11741                }
11742            }
11743        }
11744        {
11745            let snap = violations.len();
11746            self.cdtr.validate_constraints("", violations);
11747            if violations.len() > snap {
11748                let pfx = format!("{path}/Cdtr");
11749                for v in &mut violations[snap..] {
11750                    v.path.insert_str(0, &pfx);
11751                }
11752            }
11753        }
11754        if let Some(ref val) = self.cdtr_acct {
11755            let snap = violations.len();
11756            val.validate_constraints("", violations);
11757            if violations.len() > snap {
11758                let pfx = format!("{path}/CdtrAcct");
11759                for v in &mut violations[snap..] {
11760                    v.path.insert_str(0, &pfx);
11761                }
11762            }
11763        }
11764        if let Some(ref val) = self.ultmt_cdtr {
11765            let snap = violations.len();
11766            val.validate_constraints("", violations);
11767            if violations.len() > snap {
11768                let pfx = format!("{path}/UltmtCdtr");
11769                for v in &mut violations[snap..] {
11770                    v.path.insert_str(0, &pfx);
11771                }
11772            }
11773        }
11774        for (idx, elem) in self.instr_for_cdtr_agt.iter().enumerate() {
11775            let snap = violations.len();
11776            elem.validate_constraints("", violations);
11777            if violations.len() > snap {
11778                let pfx = format!("{path}/InstrForCdtrAgt[{idx}]");
11779                for v in &mut violations[snap..] {
11780                    v.path.insert_str(0, &pfx);
11781                }
11782            }
11783        }
11784        for (idx, elem) in self.instr_for_nxt_agt.iter().enumerate() {
11785            let snap = violations.len();
11786            elem.validate_constraints("", violations);
11787            if violations.len() > snap {
11788                let pfx = format!("{path}/InstrForNxtAgt[{idx}]");
11789                for v in &mut violations[snap..] {
11790                    v.path.insert_str(0, &pfx);
11791                }
11792            }
11793        }
11794        if let Some(ref val) = self.tax {
11795            let snap = violations.len();
11796            val.validate_constraints("", violations);
11797            if violations.len() > snap {
11798                let pfx = format!("{path}/Tax");
11799                for v in &mut violations[snap..] {
11800                    v.path.insert_str(0, &pfx);
11801                }
11802            }
11803        }
11804        if let Some(ref val) = self.rmt_inf {
11805            let snap = violations.len();
11806            val.validate_constraints("", violations);
11807            if violations.len() > snap {
11808                let pfx = format!("{path}/RmtInf");
11809                for v in &mut violations[snap..] {
11810                    v.path.insert_str(0, &pfx);
11811                }
11812            }
11813        }
11814        if let Some(ref val) = self.instd_amt {
11815            let snap = violations.len();
11816            val.validate_constraints("", violations);
11817            if violations.len() > snap {
11818                let pfx = format!("{path}/InstdAmt");
11819                for v in &mut violations[snap..] {
11820                    v.path.insert_str(0, &pfx);
11821                }
11822            }
11823        }
11824    }
11825}
11826impl crate::common::validate::Validatable for CreditTransferTransaction56 {
11827    fn validate_constraints(
11828        &self,
11829        path: &str,
11830        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11831    ) {
11832        {
11833            let snap = violations.len();
11834            self.pmt_id.validate_constraints("", violations);
11835            if violations.len() > snap {
11836                let pfx = format!("{path}/PmtId");
11837                for v in &mut violations[snap..] {
11838                    v.path.insert_str(0, &pfx);
11839                }
11840            }
11841        }
11842        if let Some(ref val) = self.pmt_tp_inf {
11843            let snap = violations.len();
11844            val.validate_constraints("", violations);
11845            if violations.len() > snap {
11846                let pfx = format!("{path}/PmtTpInf");
11847                for v in &mut violations[snap..] {
11848                    v.path.insert_str(0, &pfx);
11849                }
11850            }
11851        }
11852        {
11853            let snap = violations.len();
11854            self.intr_bk_sttlm_amt.validate_constraints("", violations);
11855            if violations.len() > snap {
11856                let pfx = format!("{path}/IntrBkSttlmAmt");
11857                for v in &mut violations[snap..] {
11858                    v.path.insert_str(0, &pfx);
11859                }
11860            }
11861        }
11862        if let Some(ref val) = self.intr_bk_sttlm_dt {
11863            let snap = violations.len();
11864            val.validate_constraints("", violations);
11865            if violations.len() > snap {
11866                let pfx = format!("{path}/IntrBkSttlmDt");
11867                for v in &mut violations[snap..] {
11868                    v.path.insert_str(0, &pfx);
11869                }
11870            }
11871        }
11872        if let Some(ref val) = self.sttlm_prty {
11873            let snap = violations.len();
11874            val.validate_constraints("", violations);
11875            if violations.len() > snap {
11876                let pfx = format!("{path}/SttlmPrty");
11877                for v in &mut violations[snap..] {
11878                    v.path.insert_str(0, &pfx);
11879                }
11880            }
11881        }
11882        if let Some(ref val) = self.sttlm_tm_indctn {
11883            let snap = violations.len();
11884            val.validate_constraints("", violations);
11885            if violations.len() > snap {
11886                let pfx = format!("{path}/SttlmTmIndctn");
11887                for v in &mut violations[snap..] {
11888                    v.path.insert_str(0, &pfx);
11889                }
11890            }
11891        }
11892        if let Some(ref val) = self.sttlm_tm_req {
11893            let snap = violations.len();
11894            val.validate_constraints("", violations);
11895            if violations.len() > snap {
11896                let pfx = format!("{path}/SttlmTmReq");
11897                for v in &mut violations[snap..] {
11898                    v.path.insert_str(0, &pfx);
11899                }
11900            }
11901        }
11902        if let Some(ref val) = self.prvs_instg_agt1 {
11903            let snap = violations.len();
11904            val.validate_constraints("", violations);
11905            if violations.len() > snap {
11906                let pfx = format!("{path}/PrvsInstgAgt1");
11907                for v in &mut violations[snap..] {
11908                    v.path.insert_str(0, &pfx);
11909                }
11910            }
11911        }
11912        if let Some(ref val) = self.prvs_instg_agt1acct {
11913            let snap = violations.len();
11914            val.validate_constraints("", violations);
11915            if violations.len() > snap {
11916                let pfx = format!("{path}/PrvsInstgAgt1Acct");
11917                for v in &mut violations[snap..] {
11918                    v.path.insert_str(0, &pfx);
11919                }
11920            }
11921        }
11922        if let Some(ref val) = self.prvs_instg_agt2 {
11923            let snap = violations.len();
11924            val.validate_constraints("", violations);
11925            if violations.len() > snap {
11926                let pfx = format!("{path}/PrvsInstgAgt2");
11927                for v in &mut violations[snap..] {
11928                    v.path.insert_str(0, &pfx);
11929                }
11930            }
11931        }
11932        if let Some(ref val) = self.prvs_instg_agt2acct {
11933            let snap = violations.len();
11934            val.validate_constraints("", violations);
11935            if violations.len() > snap {
11936                let pfx = format!("{path}/PrvsInstgAgt2Acct");
11937                for v in &mut violations[snap..] {
11938                    v.path.insert_str(0, &pfx);
11939                }
11940            }
11941        }
11942        if let Some(ref val) = self.prvs_instg_agt3 {
11943            let snap = violations.len();
11944            val.validate_constraints("", violations);
11945            if violations.len() > snap {
11946                let pfx = format!("{path}/PrvsInstgAgt3");
11947                for v in &mut violations[snap..] {
11948                    v.path.insert_str(0, &pfx);
11949                }
11950            }
11951        }
11952        if let Some(ref val) = self.prvs_instg_agt3acct {
11953            let snap = violations.len();
11954            val.validate_constraints("", violations);
11955            if violations.len() > snap {
11956                let pfx = format!("{path}/PrvsInstgAgt3Acct");
11957                for v in &mut violations[snap..] {
11958                    v.path.insert_str(0, &pfx);
11959                }
11960            }
11961        }
11962        if let Some(ref val) = self.instg_agt {
11963            let snap = violations.len();
11964            val.validate_constraints("", violations);
11965            if violations.len() > snap {
11966                let pfx = format!("{path}/InstgAgt");
11967                for v in &mut violations[snap..] {
11968                    v.path.insert_str(0, &pfx);
11969                }
11970            }
11971        }
11972        if let Some(ref val) = self.instd_agt {
11973            let snap = violations.len();
11974            val.validate_constraints("", violations);
11975            if violations.len() > snap {
11976                let pfx = format!("{path}/InstdAgt");
11977                for v in &mut violations[snap..] {
11978                    v.path.insert_str(0, &pfx);
11979                }
11980            }
11981        }
11982        if let Some(ref val) = self.intrmy_agt1 {
11983            let snap = violations.len();
11984            val.validate_constraints("", violations);
11985            if violations.len() > snap {
11986                let pfx = format!("{path}/IntrmyAgt1");
11987                for v in &mut violations[snap..] {
11988                    v.path.insert_str(0, &pfx);
11989                }
11990            }
11991        }
11992        if let Some(ref val) = self.intrmy_agt1acct {
11993            let snap = violations.len();
11994            val.validate_constraints("", violations);
11995            if violations.len() > snap {
11996                let pfx = format!("{path}/IntrmyAgt1Acct");
11997                for v in &mut violations[snap..] {
11998                    v.path.insert_str(0, &pfx);
11999                }
12000            }
12001        }
12002        if let Some(ref val) = self.intrmy_agt2 {
12003            let snap = violations.len();
12004            val.validate_constraints("", violations);
12005            if violations.len() > snap {
12006                let pfx = format!("{path}/IntrmyAgt2");
12007                for v in &mut violations[snap..] {
12008                    v.path.insert_str(0, &pfx);
12009                }
12010            }
12011        }
12012        if let Some(ref val) = self.intrmy_agt2acct {
12013            let snap = violations.len();
12014            val.validate_constraints("", violations);
12015            if violations.len() > snap {
12016                let pfx = format!("{path}/IntrmyAgt2Acct");
12017                for v in &mut violations[snap..] {
12018                    v.path.insert_str(0, &pfx);
12019                }
12020            }
12021        }
12022        if let Some(ref val) = self.intrmy_agt3 {
12023            let snap = violations.len();
12024            val.validate_constraints("", violations);
12025            if violations.len() > snap {
12026                let pfx = format!("{path}/IntrmyAgt3");
12027                for v in &mut violations[snap..] {
12028                    v.path.insert_str(0, &pfx);
12029                }
12030            }
12031        }
12032        if let Some(ref val) = self.intrmy_agt3acct {
12033            let snap = violations.len();
12034            val.validate_constraints("", violations);
12035            if violations.len() > snap {
12036                let pfx = format!("{path}/IntrmyAgt3Acct");
12037                for v in &mut violations[snap..] {
12038                    v.path.insert_str(0, &pfx);
12039                }
12040            }
12041        }
12042        if let Some(ref val) = self.ultmt_dbtr {
12043            let snap = violations.len();
12044            val.validate_constraints("", violations);
12045            if violations.len() > snap {
12046                let pfx = format!("{path}/UltmtDbtr");
12047                for v in &mut violations[snap..] {
12048                    v.path.insert_str(0, &pfx);
12049                }
12050            }
12051        }
12052        {
12053            let snap = violations.len();
12054            self.dbtr.validate_constraints("", violations);
12055            if violations.len() > snap {
12056                let pfx = format!("{path}/Dbtr");
12057                for v in &mut violations[snap..] {
12058                    v.path.insert_str(0, &pfx);
12059                }
12060            }
12061        }
12062        if let Some(ref val) = self.dbtr_acct {
12063            let snap = violations.len();
12064            val.validate_constraints("", violations);
12065            if violations.len() > snap {
12066                let pfx = format!("{path}/DbtrAcct");
12067                for v in &mut violations[snap..] {
12068                    v.path.insert_str(0, &pfx);
12069                }
12070            }
12071        }
12072        if let Some(ref val) = self.dbtr_agt {
12073            let snap = violations.len();
12074            val.validate_constraints("", violations);
12075            if violations.len() > snap {
12076                let pfx = format!("{path}/DbtrAgt");
12077                for v in &mut violations[snap..] {
12078                    v.path.insert_str(0, &pfx);
12079                }
12080            }
12081        }
12082        if let Some(ref val) = self.dbtr_agt_acct {
12083            let snap = violations.len();
12084            val.validate_constraints("", violations);
12085            if violations.len() > snap {
12086                let pfx = format!("{path}/DbtrAgtAcct");
12087                for v in &mut violations[snap..] {
12088                    v.path.insert_str(0, &pfx);
12089                }
12090            }
12091        }
12092        if let Some(ref val) = self.cdtr_agt {
12093            let snap = violations.len();
12094            val.validate_constraints("", violations);
12095            if violations.len() > snap {
12096                let pfx = format!("{path}/CdtrAgt");
12097                for v in &mut violations[snap..] {
12098                    v.path.insert_str(0, &pfx);
12099                }
12100            }
12101        }
12102        if let Some(ref val) = self.cdtr_agt_acct {
12103            let snap = violations.len();
12104            val.validate_constraints("", violations);
12105            if violations.len() > snap {
12106                let pfx = format!("{path}/CdtrAgtAcct");
12107                for v in &mut violations[snap..] {
12108                    v.path.insert_str(0, &pfx);
12109                }
12110            }
12111        }
12112        {
12113            let snap = violations.len();
12114            self.cdtr.validate_constraints("", violations);
12115            if violations.len() > snap {
12116                let pfx = format!("{path}/Cdtr");
12117                for v in &mut violations[snap..] {
12118                    v.path.insert_str(0, &pfx);
12119                }
12120            }
12121        }
12122        if let Some(ref val) = self.cdtr_acct {
12123            let snap = violations.len();
12124            val.validate_constraints("", violations);
12125            if violations.len() > snap {
12126                let pfx = format!("{path}/CdtrAcct");
12127                for v in &mut violations[snap..] {
12128                    v.path.insert_str(0, &pfx);
12129                }
12130            }
12131        }
12132        if let Some(ref val) = self.ultmt_cdtr {
12133            let snap = violations.len();
12134            val.validate_constraints("", violations);
12135            if violations.len() > snap {
12136                let pfx = format!("{path}/UltmtCdtr");
12137                for v in &mut violations[snap..] {
12138                    v.path.insert_str(0, &pfx);
12139                }
12140            }
12141        }
12142        for (idx, elem) in self.instr_for_cdtr_agt.iter().enumerate() {
12143            let snap = violations.len();
12144            elem.validate_constraints("", violations);
12145            if violations.len() > snap {
12146                let pfx = format!("{path}/InstrForCdtrAgt[{idx}]");
12147                for v in &mut violations[snap..] {
12148                    v.path.insert_str(0, &pfx);
12149                }
12150            }
12151        }
12152        for (idx, elem) in self.instr_for_nxt_agt.iter().enumerate() {
12153            let snap = violations.len();
12154            elem.validate_constraints("", violations);
12155            if violations.len() > snap {
12156                let pfx = format!("{path}/InstrForNxtAgt[{idx}]");
12157                for v in &mut violations[snap..] {
12158                    v.path.insert_str(0, &pfx);
12159                }
12160            }
12161        }
12162        if let Some(ref wrapper) = self.purp {
12163            let snap = violations.len();
12164            wrapper.inner.validate_constraints("", violations);
12165            if violations.len() > snap {
12166                let pfx = format!("{path}/Purp");
12167                for v in &mut violations[snap..] {
12168                    v.path.insert_str(0, &pfx);
12169                }
12170            }
12171        }
12172        if let Some(ref val) = self.rmt_inf {
12173            let snap = violations.len();
12174            val.validate_constraints("", violations);
12175            if violations.len() > snap {
12176                let pfx = format!("{path}/RmtInf");
12177                for v in &mut violations[snap..] {
12178                    v.path.insert_str(0, &pfx);
12179                }
12180            }
12181        }
12182        if let Some(ref val) = self.undrlyg_cstmr_cdt_trf {
12183            let snap = violations.len();
12184            val.validate_constraints("", violations);
12185            if violations.len() > snap {
12186                let pfx = format!("{path}/UndrlygCstmrCdtTrf");
12187                for v in &mut violations[snap..] {
12188                    v.path.insert_str(0, &pfx);
12189                }
12190            }
12191        }
12192        for (idx, elem) in self.splmtry_data.iter().enumerate() {
12193            let snap = violations.len();
12194            elem.validate_constraints("", violations);
12195            if violations.len() > snap {
12196                let pfx = format!("{path}/SplmtryData[{idx}]");
12197                for v in &mut violations[snap..] {
12198                    v.path.insert_str(0, &pfx);
12199                }
12200            }
12201        }
12202    }
12203}
12204impl crate::common::validate::Validatable for CreditorReferenceInformation2 {
12205    fn validate_constraints(
12206        &self,
12207        path: &str,
12208        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12209    ) {
12210        if let Some(ref val) = self.tp {
12211            let snap = violations.len();
12212            val.validate_constraints("", violations);
12213            if violations.len() > snap {
12214                let pfx = format!("{path}/Tp");
12215                for v in &mut violations[snap..] {
12216                    v.path.insert_str(0, &pfx);
12217                }
12218            }
12219        }
12220        if let Some(ref val) = self.r#ref {
12221            let snap = violations.len();
12222            val.validate_constraints("", violations);
12223            if violations.len() > snap {
12224                let pfx = format!("{path}/Ref");
12225                for v in &mut violations[snap..] {
12226                    v.path.insert_str(0, &pfx);
12227                }
12228            }
12229        }
12230    }
12231}
12232impl crate::common::validate::Validatable for CreditorReferenceType1Choice {
12233    fn validate_constraints(
12234        &self,
12235        path: &str,
12236        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12237    ) {
12238        match self {
12239            Self::Cd(inner) => {
12240                let snap = violations.len();
12241                inner.validate_constraints("", violations);
12242                if violations.len() > snap {
12243                    let pfx = format!("{path}/Cd");
12244                    for v in &mut violations[snap..] {
12245                        v.path.insert_str(0, &pfx);
12246                    }
12247                }
12248            }
12249            Self::Prtry(inner) => {
12250                let snap = violations.len();
12251                inner.validate_constraints("", violations);
12252                if violations.len() > snap {
12253                    let pfx = format!("{path}/Prtry");
12254                    for v in &mut violations[snap..] {
12255                        v.path.insert_str(0, &pfx);
12256                    }
12257                }
12258            }
12259        }
12260    }
12261}
12262impl crate::common::validate::Validatable for CreditorReferenceType2 {
12263    fn validate_constraints(
12264        &self,
12265        path: &str,
12266        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12267    ) {
12268        {
12269            let snap = violations.len();
12270            self.cd_or_prtry.inner.validate_constraints("", violations);
12271            if violations.len() > snap {
12272                let pfx = format!("{path}/CdOrPrtry");
12273                for v in &mut violations[snap..] {
12274                    v.path.insert_str(0, &pfx);
12275                }
12276            }
12277        }
12278        if let Some(ref val) = self.issr {
12279            let snap = violations.len();
12280            val.validate_constraints("", violations);
12281            if violations.len() > snap {
12282                let pfx = format!("{path}/Issr");
12283                for v in &mut violations[snap..] {
12284                    v.path.insert_str(0, &pfx);
12285                }
12286            }
12287        }
12288    }
12289}
12290impl crate::common::validate::Validatable for DateAndPlaceOfBirth1 {
12291    fn validate_constraints(
12292        &self,
12293        path: &str,
12294        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12295    ) {
12296        {
12297            let snap = violations.len();
12298            self.birth_dt.validate_constraints("", violations);
12299            if violations.len() > snap {
12300                let pfx = format!("{path}/BirthDt");
12301                for v in &mut violations[snap..] {
12302                    v.path.insert_str(0, &pfx);
12303                }
12304            }
12305        }
12306        if let Some(ref val) = self.prvc_of_birth {
12307            let snap = violations.len();
12308            val.validate_constraints("", violations);
12309            if violations.len() > snap {
12310                let pfx = format!("{path}/PrvcOfBirth");
12311                for v in &mut violations[snap..] {
12312                    v.path.insert_str(0, &pfx);
12313                }
12314            }
12315        }
12316        {
12317            let snap = violations.len();
12318            self.city_of_birth.validate_constraints("", violations);
12319            if violations.len() > snap {
12320                let pfx = format!("{path}/CityOfBirth");
12321                for v in &mut violations[snap..] {
12322                    v.path.insert_str(0, &pfx);
12323                }
12324            }
12325        }
12326        {
12327            let snap = violations.len();
12328            self.ctry_of_birth.validate_constraints("", violations);
12329            if violations.len() > snap {
12330                let pfx = format!("{path}/CtryOfBirth");
12331                for v in &mut violations[snap..] {
12332                    v.path.insert_str(0, &pfx);
12333                }
12334            }
12335        }
12336    }
12337}
12338impl crate::common::validate::Validatable for DatePeriod2 {
12339    fn validate_constraints(
12340        &self,
12341        path: &str,
12342        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12343    ) {
12344        {
12345            let snap = violations.len();
12346            self.fr_dt.validate_constraints("", violations);
12347            if violations.len() > snap {
12348                let pfx = format!("{path}/FrDt");
12349                for v in &mut violations[snap..] {
12350                    v.path.insert_str(0, &pfx);
12351                }
12352            }
12353        }
12354        {
12355            let snap = violations.len();
12356            self.to_dt.validate_constraints("", violations);
12357            if violations.len() > snap {
12358                let pfx = format!("{path}/ToDt");
12359                for v in &mut violations[snap..] {
12360                    v.path.insert_str(0, &pfx);
12361                }
12362            }
12363        }
12364    }
12365}
12366impl crate::common::validate::Validatable for DiscountAmountAndType1 {
12367    fn validate_constraints(
12368        &self,
12369        path: &str,
12370        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12371    ) {
12372        if let Some(ref wrapper) = self.tp {
12373            let snap = violations.len();
12374            wrapper.inner.validate_constraints("", violations);
12375            if violations.len() > snap {
12376                let pfx = format!("{path}/Tp");
12377                for v in &mut violations[snap..] {
12378                    v.path.insert_str(0, &pfx);
12379                }
12380            }
12381        }
12382        {
12383            let snap = violations.len();
12384            self.amt.validate_constraints("", violations);
12385            if violations.len() > snap {
12386                let pfx = format!("{path}/Amt");
12387                for v in &mut violations[snap..] {
12388                    v.path.insert_str(0, &pfx);
12389                }
12390            }
12391        }
12392    }
12393}
12394impl crate::common::validate::Validatable for DiscountAmountType1Choice {
12395    fn validate_constraints(
12396        &self,
12397        path: &str,
12398        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12399    ) {
12400        match self {
12401            Self::Cd(inner) => {
12402                let snap = violations.len();
12403                inner.validate_constraints("", violations);
12404                if violations.len() > snap {
12405                    let pfx = format!("{path}/Cd");
12406                    for v in &mut violations[snap..] {
12407                        v.path.insert_str(0, &pfx);
12408                    }
12409                }
12410            }
12411            Self::Prtry(inner) => {
12412                let snap = violations.len();
12413                inner.validate_constraints("", violations);
12414                if violations.len() > snap {
12415                    let pfx = format!("{path}/Prtry");
12416                    for v in &mut violations[snap..] {
12417                        v.path.insert_str(0, &pfx);
12418                    }
12419                }
12420            }
12421        }
12422    }
12423}
12424impl crate::common::validate::Validatable for Document {
12425    fn validate_constraints(
12426        &self,
12427        path: &str,
12428        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12429    ) {
12430        {
12431            let snap = violations.len();
12432            self.fi_cdt_trf.validate_constraints("", violations);
12433            if violations.len() > snap {
12434                let pfx = format!("{path}/FICdtTrf");
12435                for v in &mut violations[snap..] {
12436                    v.path.insert_str(0, &pfx);
12437                }
12438            }
12439        }
12440    }
12441}
12442impl crate::common::validate::Validatable for DocumentAdjustment1 {
12443    fn validate_constraints(
12444        &self,
12445        path: &str,
12446        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12447    ) {
12448        {
12449            let snap = violations.len();
12450            self.amt.validate_constraints("", violations);
12451            if violations.len() > snap {
12452                let pfx = format!("{path}/Amt");
12453                for v in &mut violations[snap..] {
12454                    v.path.insert_str(0, &pfx);
12455                }
12456            }
12457        }
12458        if let Some(ref val) = self.cdt_dbt_ind {
12459            let snap = violations.len();
12460            val.validate_constraints("", violations);
12461            if violations.len() > snap {
12462                let pfx = format!("{path}/CdtDbtInd");
12463                for v in &mut violations[snap..] {
12464                    v.path.insert_str(0, &pfx);
12465                }
12466            }
12467        }
12468        if let Some(ref val) = self.rsn {
12469            let snap = violations.len();
12470            val.validate_constraints("", violations);
12471            if violations.len() > snap {
12472                let pfx = format!("{path}/Rsn");
12473                for v in &mut violations[snap..] {
12474                    v.path.insert_str(0, &pfx);
12475                }
12476            }
12477        }
12478        if let Some(ref val) = self.addtl_inf {
12479            let snap = violations.len();
12480            val.validate_constraints("", violations);
12481            if violations.len() > snap {
12482                let pfx = format!("{path}/AddtlInf");
12483                for v in &mut violations[snap..] {
12484                    v.path.insert_str(0, &pfx);
12485                }
12486            }
12487        }
12488    }
12489}
12490impl crate::common::validate::Validatable for DocumentLineIdentification1 {
12491    fn validate_constraints(
12492        &self,
12493        path: &str,
12494        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12495    ) {
12496        if let Some(ref val) = self.tp {
12497            let snap = violations.len();
12498            val.validate_constraints("", violations);
12499            if violations.len() > snap {
12500                let pfx = format!("{path}/Tp");
12501                for v in &mut violations[snap..] {
12502                    v.path.insert_str(0, &pfx);
12503                }
12504            }
12505        }
12506        if let Some(ref val) = self.nb {
12507            let snap = violations.len();
12508            val.validate_constraints("", violations);
12509            if violations.len() > snap {
12510                let pfx = format!("{path}/Nb");
12511                for v in &mut violations[snap..] {
12512                    v.path.insert_str(0, &pfx);
12513                }
12514            }
12515        }
12516        if let Some(ref val) = self.rltd_dt {
12517            let snap = violations.len();
12518            val.validate_constraints("", violations);
12519            if violations.len() > snap {
12520                let pfx = format!("{path}/RltdDt");
12521                for v in &mut violations[snap..] {
12522                    v.path.insert_str(0, &pfx);
12523                }
12524            }
12525        }
12526    }
12527}
12528impl crate::common::validate::Validatable for DocumentLineInformation1 {
12529    fn validate_constraints(
12530        &self,
12531        path: &str,
12532        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12533    ) {
12534        for (idx, elem) in self.id.iter().enumerate() {
12535            let snap = violations.len();
12536            elem.validate_constraints("", violations);
12537            if violations.len() > snap {
12538                let pfx = format!("{path}/Id[{idx}]");
12539                for v in &mut violations[snap..] {
12540                    v.path.insert_str(0, &pfx);
12541                }
12542            }
12543        }
12544        if let Some(ref val) = self.desc {
12545            let snap = violations.len();
12546            val.validate_constraints("", violations);
12547            if violations.len() > snap {
12548                let pfx = format!("{path}/Desc");
12549                for v in &mut violations[snap..] {
12550                    v.path.insert_str(0, &pfx);
12551                }
12552            }
12553        }
12554        if let Some(ref val) = self.amt {
12555            let snap = violations.len();
12556            val.validate_constraints("", violations);
12557            if violations.len() > snap {
12558                let pfx = format!("{path}/Amt");
12559                for v in &mut violations[snap..] {
12560                    v.path.insert_str(0, &pfx);
12561                }
12562            }
12563        }
12564    }
12565}
12566impl crate::common::validate::Validatable for DocumentLineType1 {
12567    fn validate_constraints(
12568        &self,
12569        path: &str,
12570        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12571    ) {
12572        {
12573            let snap = violations.len();
12574            self.cd_or_prtry.inner.validate_constraints("", violations);
12575            if violations.len() > snap {
12576                let pfx = format!("{path}/CdOrPrtry");
12577                for v in &mut violations[snap..] {
12578                    v.path.insert_str(0, &pfx);
12579                }
12580            }
12581        }
12582        if let Some(ref val) = self.issr {
12583            let snap = violations.len();
12584            val.validate_constraints("", violations);
12585            if violations.len() > snap {
12586                let pfx = format!("{path}/Issr");
12587                for v in &mut violations[snap..] {
12588                    v.path.insert_str(0, &pfx);
12589                }
12590            }
12591        }
12592    }
12593}
12594impl crate::common::validate::Validatable for DocumentLineType1Choice {
12595    fn validate_constraints(
12596        &self,
12597        path: &str,
12598        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12599    ) {
12600        match self {
12601            Self::Cd(inner) => {
12602                let snap = violations.len();
12603                inner.validate_constraints("", violations);
12604                if violations.len() > snap {
12605                    let pfx = format!("{path}/Cd");
12606                    for v in &mut violations[snap..] {
12607                        v.path.insert_str(0, &pfx);
12608                    }
12609                }
12610            }
12611            Self::Prtry(inner) => {
12612                let snap = violations.len();
12613                inner.validate_constraints("", violations);
12614                if violations.len() > snap {
12615                    let pfx = format!("{path}/Prtry");
12616                    for v in &mut violations[snap..] {
12617                        v.path.insert_str(0, &pfx);
12618                    }
12619                }
12620            }
12621        }
12622    }
12623}
12624impl crate::common::validate::Validatable for FinancialIdentificationSchemeName1Choice {
12625    fn validate_constraints(
12626        &self,
12627        path: &str,
12628        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12629    ) {
12630        match self {
12631            Self::Cd(inner) => {
12632                let snap = violations.len();
12633                inner.validate_constraints("", violations);
12634                if violations.len() > snap {
12635                    let pfx = format!("{path}/Cd");
12636                    for v in &mut violations[snap..] {
12637                        v.path.insert_str(0, &pfx);
12638                    }
12639                }
12640            }
12641            Self::Prtry(inner) => {
12642                let snap = violations.len();
12643                inner.validate_constraints("", violations);
12644                if violations.len() > snap {
12645                    let pfx = format!("{path}/Prtry");
12646                    for v in &mut violations[snap..] {
12647                        v.path.insert_str(0, &pfx);
12648                    }
12649                }
12650            }
12651        }
12652    }
12653}
12654impl crate::common::validate::Validatable for FinancialInstitutionCreditTransferV10 {
12655    fn validate_constraints(
12656        &self,
12657        path: &str,
12658        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12659    ) {
12660        {
12661            let snap = violations.len();
12662            self.grp_hdr.validate_constraints("", violations);
12663            if violations.len() > snap {
12664                let pfx = format!("{path}/GrpHdr");
12665                for v in &mut violations[snap..] {
12666                    v.path.insert_str(0, &pfx);
12667                }
12668            }
12669        }
12670        for (idx, elem) in self.cdt_trf_tx_inf.iter().enumerate() {
12671            let snap = violations.len();
12672            elem.validate_constraints("", violations);
12673            if violations.len() > snap {
12674                let pfx = format!("{path}/CdtTrfTxInf[{idx}]");
12675                for v in &mut violations[snap..] {
12676                    v.path.insert_str(0, &pfx);
12677                }
12678            }
12679        }
12680        for (idx, elem) in self.splmtry_data.iter().enumerate() {
12681            let snap = violations.len();
12682            elem.validate_constraints("", violations);
12683            if violations.len() > snap {
12684                let pfx = format!("{path}/SplmtryData[{idx}]");
12685                for v in &mut violations[snap..] {
12686                    v.path.insert_str(0, &pfx);
12687                }
12688            }
12689        }
12690    }
12691}
12692impl crate::common::validate::Validatable for FinancialInstitutionIdentification18 {
12693    fn validate_constraints(
12694        &self,
12695        path: &str,
12696        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12697    ) {
12698        if let Some(ref val) = self.bicfi {
12699            let snap = violations.len();
12700            val.validate_constraints("", violations);
12701            if violations.len() > snap {
12702                let pfx = format!("{path}/BICFI");
12703                for v in &mut violations[snap..] {
12704                    v.path.insert_str(0, &pfx);
12705                }
12706            }
12707        }
12708        if let Some(ref val) = self.clr_sys_mmb_id {
12709            let snap = violations.len();
12710            val.validate_constraints("", violations);
12711            if violations.len() > snap {
12712                let pfx = format!("{path}/ClrSysMmbId");
12713                for v in &mut violations[snap..] {
12714                    v.path.insert_str(0, &pfx);
12715                }
12716            }
12717        }
12718        if let Some(ref val) = self.lei {
12719            let snap = violations.len();
12720            val.validate_constraints("", violations);
12721            if violations.len() > snap {
12722                let pfx = format!("{path}/LEI");
12723                for v in &mut violations[snap..] {
12724                    v.path.insert_str(0, &pfx);
12725                }
12726            }
12727        }
12728        if let Some(ref val) = self.nm {
12729            let snap = violations.len();
12730            val.validate_constraints("", violations);
12731            if violations.len() > snap {
12732                let pfx = format!("{path}/Nm");
12733                for v in &mut violations[snap..] {
12734                    v.path.insert_str(0, &pfx);
12735                }
12736            }
12737        }
12738        if let Some(ref val) = self.pstl_adr {
12739            let snap = violations.len();
12740            val.validate_constraints("", violations);
12741            if violations.len() > snap {
12742                let pfx = format!("{path}/PstlAdr");
12743                for v in &mut violations[snap..] {
12744                    v.path.insert_str(0, &pfx);
12745                }
12746            }
12747        }
12748        if let Some(ref val) = self.othr {
12749            let snap = violations.len();
12750            val.validate_constraints("", violations);
12751            if violations.len() > snap {
12752                let pfx = format!("{path}/Othr");
12753                for v in &mut violations[snap..] {
12754                    v.path.insert_str(0, &pfx);
12755                }
12756            }
12757        }
12758    }
12759}
12760impl crate::common::validate::Validatable for Garnishment3 {
12761    fn validate_constraints(
12762        &self,
12763        path: &str,
12764        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12765    ) {
12766        {
12767            let snap = violations.len();
12768            self.tp.validate_constraints("", violations);
12769            if violations.len() > snap {
12770                let pfx = format!("{path}/Tp");
12771                for v in &mut violations[snap..] {
12772                    v.path.insert_str(0, &pfx);
12773                }
12774            }
12775        }
12776        if let Some(ref val) = self.grnshee {
12777            let snap = violations.len();
12778            val.validate_constraints("", violations);
12779            if violations.len() > snap {
12780                let pfx = format!("{path}/Grnshee");
12781                for v in &mut violations[snap..] {
12782                    v.path.insert_str(0, &pfx);
12783                }
12784            }
12785        }
12786        if let Some(ref val) = self.grnshmt_admstr {
12787            let snap = violations.len();
12788            val.validate_constraints("", violations);
12789            if violations.len() > snap {
12790                let pfx = format!("{path}/GrnshmtAdmstr");
12791                for v in &mut violations[snap..] {
12792                    v.path.insert_str(0, &pfx);
12793                }
12794            }
12795        }
12796        if let Some(ref val) = self.ref_nb {
12797            let snap = violations.len();
12798            val.validate_constraints("", violations);
12799            if violations.len() > snap {
12800                let pfx = format!("{path}/RefNb");
12801                for v in &mut violations[snap..] {
12802                    v.path.insert_str(0, &pfx);
12803                }
12804            }
12805        }
12806        if let Some(ref val) = self.dt {
12807            let snap = violations.len();
12808            val.validate_constraints("", violations);
12809            if violations.len() > snap {
12810                let pfx = format!("{path}/Dt");
12811                for v in &mut violations[snap..] {
12812                    v.path.insert_str(0, &pfx);
12813                }
12814            }
12815        }
12816        if let Some(ref val) = self.rmtd_amt {
12817            let snap = violations.len();
12818            val.validate_constraints("", violations);
12819            if violations.len() > snap {
12820                let pfx = format!("{path}/RmtdAmt");
12821                for v in &mut violations[snap..] {
12822                    v.path.insert_str(0, &pfx);
12823                }
12824            }
12825        }
12826        if let Some(ref val) = self.fmly_mdcl_insrnc_ind {
12827            let snap = violations.len();
12828            val.validate_constraints("", violations);
12829            if violations.len() > snap {
12830                let pfx = format!("{path}/FmlyMdclInsrncInd");
12831                for v in &mut violations[snap..] {
12832                    v.path.insert_str(0, &pfx);
12833                }
12834            }
12835        }
12836        if let Some(ref val) = self.mplyee_termntn_ind {
12837            let snap = violations.len();
12838            val.validate_constraints("", violations);
12839            if violations.len() > snap {
12840                let pfx = format!("{path}/MplyeeTermntnInd");
12841                for v in &mut violations[snap..] {
12842                    v.path.insert_str(0, &pfx);
12843                }
12844            }
12845        }
12846    }
12847}
12848impl crate::common::validate::Validatable for GarnishmentType1 {
12849    fn validate_constraints(
12850        &self,
12851        path: &str,
12852        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12853    ) {
12854        {
12855            let snap = violations.len();
12856            self.cd_or_prtry.inner.validate_constraints("", violations);
12857            if violations.len() > snap {
12858                let pfx = format!("{path}/CdOrPrtry");
12859                for v in &mut violations[snap..] {
12860                    v.path.insert_str(0, &pfx);
12861                }
12862            }
12863        }
12864        if let Some(ref val) = self.issr {
12865            let snap = violations.len();
12866            val.validate_constraints("", violations);
12867            if violations.len() > snap {
12868                let pfx = format!("{path}/Issr");
12869                for v in &mut violations[snap..] {
12870                    v.path.insert_str(0, &pfx);
12871                }
12872            }
12873        }
12874    }
12875}
12876impl crate::common::validate::Validatable for GarnishmentType1Choice {
12877    fn validate_constraints(
12878        &self,
12879        path: &str,
12880        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12881    ) {
12882        match self {
12883            Self::Cd(inner) => {
12884                let snap = violations.len();
12885                inner.validate_constraints("", violations);
12886                if violations.len() > snap {
12887                    let pfx = format!("{path}/Cd");
12888                    for v in &mut violations[snap..] {
12889                        v.path.insert_str(0, &pfx);
12890                    }
12891                }
12892            }
12893            Self::Prtry(inner) => {
12894                let snap = violations.len();
12895                inner.validate_constraints("", violations);
12896                if violations.len() > snap {
12897                    let pfx = format!("{path}/Prtry");
12898                    for v in &mut violations[snap..] {
12899                        v.path.insert_str(0, &pfx);
12900                    }
12901                }
12902            }
12903        }
12904    }
12905}
12906impl crate::common::validate::Validatable for GenericAccountIdentification1 {
12907    fn validate_constraints(
12908        &self,
12909        path: &str,
12910        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12911    ) {
12912        {
12913            let snap = violations.len();
12914            self.id.validate_constraints("", violations);
12915            if violations.len() > snap {
12916                let pfx = format!("{path}/Id");
12917                for v in &mut violations[snap..] {
12918                    v.path.insert_str(0, &pfx);
12919                }
12920            }
12921        }
12922        if let Some(ref wrapper) = self.schme_nm {
12923            let snap = violations.len();
12924            wrapper.inner.validate_constraints("", violations);
12925            if violations.len() > snap {
12926                let pfx = format!("{path}/SchmeNm");
12927                for v in &mut violations[snap..] {
12928                    v.path.insert_str(0, &pfx);
12929                }
12930            }
12931        }
12932        if let Some(ref val) = self.issr {
12933            let snap = violations.len();
12934            val.validate_constraints("", violations);
12935            if violations.len() > snap {
12936                let pfx = format!("{path}/Issr");
12937                for v in &mut violations[snap..] {
12938                    v.path.insert_str(0, &pfx);
12939                }
12940            }
12941        }
12942    }
12943}
12944impl crate::common::validate::Validatable for GenericFinancialIdentification1 {
12945    fn validate_constraints(
12946        &self,
12947        path: &str,
12948        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12949    ) {
12950        {
12951            let snap = violations.len();
12952            self.id.validate_constraints("", violations);
12953            if violations.len() > snap {
12954                let pfx = format!("{path}/Id");
12955                for v in &mut violations[snap..] {
12956                    v.path.insert_str(0, &pfx);
12957                }
12958            }
12959        }
12960        if let Some(ref wrapper) = self.schme_nm {
12961            let snap = violations.len();
12962            wrapper.inner.validate_constraints("", violations);
12963            if violations.len() > snap {
12964                let pfx = format!("{path}/SchmeNm");
12965                for v in &mut violations[snap..] {
12966                    v.path.insert_str(0, &pfx);
12967                }
12968            }
12969        }
12970        if let Some(ref val) = self.issr {
12971            let snap = violations.len();
12972            val.validate_constraints("", violations);
12973            if violations.len() > snap {
12974                let pfx = format!("{path}/Issr");
12975                for v in &mut violations[snap..] {
12976                    v.path.insert_str(0, &pfx);
12977                }
12978            }
12979        }
12980    }
12981}
12982impl crate::common::validate::Validatable for GenericIdentification30 {
12983    fn validate_constraints(
12984        &self,
12985        path: &str,
12986        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12987    ) {
12988        {
12989            let snap = violations.len();
12990            self.id.validate_constraints("", violations);
12991            if violations.len() > snap {
12992                let pfx = format!("{path}/Id");
12993                for v in &mut violations[snap..] {
12994                    v.path.insert_str(0, &pfx);
12995                }
12996            }
12997        }
12998        {
12999            let snap = violations.len();
13000            self.issr.validate_constraints("", violations);
13001            if violations.len() > snap {
13002                let pfx = format!("{path}/Issr");
13003                for v in &mut violations[snap..] {
13004                    v.path.insert_str(0, &pfx);
13005                }
13006            }
13007        }
13008        if let Some(ref val) = self.schme_nm {
13009            let snap = violations.len();
13010            val.validate_constraints("", violations);
13011            if violations.len() > snap {
13012                let pfx = format!("{path}/SchmeNm");
13013                for v in &mut violations[snap..] {
13014                    v.path.insert_str(0, &pfx);
13015                }
13016            }
13017        }
13018    }
13019}
13020impl crate::common::validate::Validatable for GenericOrganisationIdentification1 {
13021    fn validate_constraints(
13022        &self,
13023        path: &str,
13024        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13025    ) {
13026        {
13027            let snap = violations.len();
13028            self.id.validate_constraints("", violations);
13029            if violations.len() > snap {
13030                let pfx = format!("{path}/Id");
13031                for v in &mut violations[snap..] {
13032                    v.path.insert_str(0, &pfx);
13033                }
13034            }
13035        }
13036        if let Some(ref wrapper) = self.schme_nm {
13037            let snap = violations.len();
13038            wrapper.inner.validate_constraints("", violations);
13039            if violations.len() > snap {
13040                let pfx = format!("{path}/SchmeNm");
13041                for v in &mut violations[snap..] {
13042                    v.path.insert_str(0, &pfx);
13043                }
13044            }
13045        }
13046        if let Some(ref val) = self.issr {
13047            let snap = violations.len();
13048            val.validate_constraints("", violations);
13049            if violations.len() > snap {
13050                let pfx = format!("{path}/Issr");
13051                for v in &mut violations[snap..] {
13052                    v.path.insert_str(0, &pfx);
13053                }
13054            }
13055        }
13056    }
13057}
13058impl crate::common::validate::Validatable for GenericPersonIdentification1 {
13059    fn validate_constraints(
13060        &self,
13061        path: &str,
13062        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13063    ) {
13064        {
13065            let snap = violations.len();
13066            self.id.validate_constraints("", violations);
13067            if violations.len() > snap {
13068                let pfx = format!("{path}/Id");
13069                for v in &mut violations[snap..] {
13070                    v.path.insert_str(0, &pfx);
13071                }
13072            }
13073        }
13074        if let Some(ref wrapper) = self.schme_nm {
13075            let snap = violations.len();
13076            wrapper.inner.validate_constraints("", violations);
13077            if violations.len() > snap {
13078                let pfx = format!("{path}/SchmeNm");
13079                for v in &mut violations[snap..] {
13080                    v.path.insert_str(0, &pfx);
13081                }
13082            }
13083        }
13084        if let Some(ref val) = self.issr {
13085            let snap = violations.len();
13086            val.validate_constraints("", violations);
13087            if violations.len() > snap {
13088                let pfx = format!("{path}/Issr");
13089                for v in &mut violations[snap..] {
13090                    v.path.insert_str(0, &pfx);
13091                }
13092            }
13093        }
13094    }
13095}
13096impl crate::common::validate::Validatable for GroupHeader96 {
13097    fn validate_constraints(
13098        &self,
13099        path: &str,
13100        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13101    ) {
13102        {
13103            let snap = violations.len();
13104            self.msg_id.validate_constraints("", violations);
13105            if violations.len() > snap {
13106                let pfx = format!("{path}/MsgId");
13107                for v in &mut violations[snap..] {
13108                    v.path.insert_str(0, &pfx);
13109                }
13110            }
13111        }
13112        {
13113            let snap = violations.len();
13114            self.cre_dt_tm.validate_constraints("", violations);
13115            if violations.len() > snap {
13116                let pfx = format!("{path}/CreDtTm");
13117                for v in &mut violations[snap..] {
13118                    v.path.insert_str(0, &pfx);
13119                }
13120            }
13121        }
13122        if let Some(ref val) = self.btch_bookg {
13123            let snap = violations.len();
13124            val.validate_constraints("", violations);
13125            if violations.len() > snap {
13126                let pfx = format!("{path}/BtchBookg");
13127                for v in &mut violations[snap..] {
13128                    v.path.insert_str(0, &pfx);
13129                }
13130            }
13131        }
13132        {
13133            let snap = violations.len();
13134            self.nb_of_txs.validate_constraints("", violations);
13135            if violations.len() > snap {
13136                let pfx = format!("{path}/NbOfTxs");
13137                for v in &mut violations[snap..] {
13138                    v.path.insert_str(0, &pfx);
13139                }
13140            }
13141        }
13142        if let Some(ref val) = self.ctrl_sum {
13143            let snap = violations.len();
13144            val.validate_constraints("", violations);
13145            if violations.len() > snap {
13146                let pfx = format!("{path}/CtrlSum");
13147                for v in &mut violations[snap..] {
13148                    v.path.insert_str(0, &pfx);
13149                }
13150            }
13151        }
13152        if let Some(ref val) = self.ttl_intr_bk_sttlm_amt {
13153            let snap = violations.len();
13154            val.validate_constraints("", violations);
13155            if violations.len() > snap {
13156                let pfx = format!("{path}/TtlIntrBkSttlmAmt");
13157                for v in &mut violations[snap..] {
13158                    v.path.insert_str(0, &pfx);
13159                }
13160            }
13161        }
13162        if let Some(ref val) = self.intr_bk_sttlm_dt {
13163            let snap = violations.len();
13164            val.validate_constraints("", violations);
13165            if violations.len() > snap {
13166                let pfx = format!("{path}/IntrBkSttlmDt");
13167                for v in &mut violations[snap..] {
13168                    v.path.insert_str(0, &pfx);
13169                }
13170            }
13171        }
13172        {
13173            let snap = violations.len();
13174            self.sttlm_inf.validate_constraints("", violations);
13175            if violations.len() > snap {
13176                let pfx = format!("{path}/SttlmInf");
13177                for v in &mut violations[snap..] {
13178                    v.path.insert_str(0, &pfx);
13179                }
13180            }
13181        }
13182        if let Some(ref val) = self.pmt_tp_inf {
13183            let snap = violations.len();
13184            val.validate_constraints("", violations);
13185            if violations.len() > snap {
13186                let pfx = format!("{path}/PmtTpInf");
13187                for v in &mut violations[snap..] {
13188                    v.path.insert_str(0, &pfx);
13189                }
13190            }
13191        }
13192        if let Some(ref val) = self.instg_agt {
13193            let snap = violations.len();
13194            val.validate_constraints("", violations);
13195            if violations.len() > snap {
13196                let pfx = format!("{path}/InstgAgt");
13197                for v in &mut violations[snap..] {
13198                    v.path.insert_str(0, &pfx);
13199                }
13200            }
13201        }
13202        if let Some(ref val) = self.instd_agt {
13203            let snap = violations.len();
13204            val.validate_constraints("", violations);
13205            if violations.len() > snap {
13206                let pfx = format!("{path}/InstdAgt");
13207                for v in &mut violations[snap..] {
13208                    v.path.insert_str(0, &pfx);
13209                }
13210            }
13211        }
13212    }
13213}
13214impl crate::common::validate::Validatable for InstructionForCreditorAgent3 {
13215    fn validate_constraints(
13216        &self,
13217        path: &str,
13218        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13219    ) {
13220        if let Some(ref val) = self.cd {
13221            let snap = violations.len();
13222            val.validate_constraints("", violations);
13223            if violations.len() > snap {
13224                let pfx = format!("{path}/Cd");
13225                for v in &mut violations[snap..] {
13226                    v.path.insert_str(0, &pfx);
13227                }
13228            }
13229        }
13230        if let Some(ref val) = self.instr_inf {
13231            let snap = violations.len();
13232            val.validate_constraints("", violations);
13233            if violations.len() > snap {
13234                let pfx = format!("{path}/InstrInf");
13235                for v in &mut violations[snap..] {
13236                    v.path.insert_str(0, &pfx);
13237                }
13238            }
13239        }
13240    }
13241}
13242impl crate::common::validate::Validatable for InstructionForNextAgent1 {
13243    fn validate_constraints(
13244        &self,
13245        path: &str,
13246        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13247    ) {
13248        if let Some(ref val) = self.cd {
13249            let snap = violations.len();
13250            val.validate_constraints("", violations);
13251            if violations.len() > snap {
13252                let pfx = format!("{path}/Cd");
13253                for v in &mut violations[snap..] {
13254                    v.path.insert_str(0, &pfx);
13255                }
13256            }
13257        }
13258        if let Some(ref val) = self.instr_inf {
13259            let snap = violations.len();
13260            val.validate_constraints("", violations);
13261            if violations.len() > snap {
13262                let pfx = format!("{path}/InstrInf");
13263                for v in &mut violations[snap..] {
13264                    v.path.insert_str(0, &pfx);
13265                }
13266            }
13267        }
13268    }
13269}
13270impl crate::common::validate::Validatable for LocalInstrument2Choice {
13271    fn validate_constraints(
13272        &self,
13273        path: &str,
13274        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13275    ) {
13276        match self {
13277            Self::Cd(inner) => {
13278                let snap = violations.len();
13279                inner.validate_constraints("", violations);
13280                if violations.len() > snap {
13281                    let pfx = format!("{path}/Cd");
13282                    for v in &mut violations[snap..] {
13283                        v.path.insert_str(0, &pfx);
13284                    }
13285                }
13286            }
13287            Self::Prtry(inner) => {
13288                let snap = violations.len();
13289                inner.validate_constraints("", violations);
13290                if violations.len() > snap {
13291                    let pfx = format!("{path}/Prtry");
13292                    for v in &mut violations[snap..] {
13293                        v.path.insert_str(0, &pfx);
13294                    }
13295                }
13296            }
13297        }
13298    }
13299}
13300impl crate::common::validate::Validatable for OrganisationIdentification29 {
13301    fn validate_constraints(
13302        &self,
13303        path: &str,
13304        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13305    ) {
13306        if let Some(ref val) = self.any_bic {
13307            let snap = violations.len();
13308            val.validate_constraints("", violations);
13309            if violations.len() > snap {
13310                let pfx = format!("{path}/AnyBIC");
13311                for v in &mut violations[snap..] {
13312                    v.path.insert_str(0, &pfx);
13313                }
13314            }
13315        }
13316        if let Some(ref val) = self.lei {
13317            let snap = violations.len();
13318            val.validate_constraints("", violations);
13319            if violations.len() > snap {
13320                let pfx = format!("{path}/LEI");
13321                for v in &mut violations[snap..] {
13322                    v.path.insert_str(0, &pfx);
13323                }
13324            }
13325        }
13326        for (idx, elem) in self.othr.iter().enumerate() {
13327            let snap = violations.len();
13328            elem.validate_constraints("", violations);
13329            if violations.len() > snap {
13330                let pfx = format!("{path}/Othr[{idx}]");
13331                for v in &mut violations[snap..] {
13332                    v.path.insert_str(0, &pfx);
13333                }
13334            }
13335        }
13336    }
13337}
13338impl crate::common::validate::Validatable for OrganisationIdentificationSchemeName1Choice {
13339    fn validate_constraints(
13340        &self,
13341        path: &str,
13342        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13343    ) {
13344        match self {
13345            Self::Cd(inner) => {
13346                let snap = violations.len();
13347                inner.validate_constraints("", violations);
13348                if violations.len() > snap {
13349                    let pfx = format!("{path}/Cd");
13350                    for v in &mut violations[snap..] {
13351                        v.path.insert_str(0, &pfx);
13352                    }
13353                }
13354            }
13355            Self::Prtry(inner) => {
13356                let snap = violations.len();
13357                inner.validate_constraints("", violations);
13358                if violations.len() > snap {
13359                    let pfx = format!("{path}/Prtry");
13360                    for v in &mut violations[snap..] {
13361                        v.path.insert_str(0, &pfx);
13362                    }
13363                }
13364            }
13365        }
13366    }
13367}
13368impl crate::common::validate::Validatable for OtherContact1 {
13369    fn validate_constraints(
13370        &self,
13371        path: &str,
13372        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13373    ) {
13374        {
13375            let snap = violations.len();
13376            self.chanl_tp.validate_constraints("", violations);
13377            if violations.len() > snap {
13378                let pfx = format!("{path}/ChanlTp");
13379                for v in &mut violations[snap..] {
13380                    v.path.insert_str(0, &pfx);
13381                }
13382            }
13383        }
13384        if let Some(ref val) = self.id {
13385            let snap = violations.len();
13386            val.validate_constraints("", violations);
13387            if violations.len() > snap {
13388                let pfx = format!("{path}/Id");
13389                for v in &mut violations[snap..] {
13390                    v.path.insert_str(0, &pfx);
13391                }
13392            }
13393        }
13394    }
13395}
13396impl crate::common::validate::Validatable for Party38Choice {
13397    fn validate_constraints(
13398        &self,
13399        path: &str,
13400        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13401    ) {
13402        match self {
13403            Self::OrgId(inner) => {
13404                let snap = violations.len();
13405                inner.validate_constraints("", violations);
13406                if violations.len() > snap {
13407                    let pfx = format!("{path}/OrgId");
13408                    for v in &mut violations[snap..] {
13409                        v.path.insert_str(0, &pfx);
13410                    }
13411                }
13412            }
13413            Self::PrvtId(inner) => {
13414                let snap = violations.len();
13415                inner.validate_constraints("", violations);
13416                if violations.len() > snap {
13417                    let pfx = format!("{path}/PrvtId");
13418                    for v in &mut violations[snap..] {
13419                        v.path.insert_str(0, &pfx);
13420                    }
13421                }
13422            }
13423        }
13424    }
13425}
13426impl crate::common::validate::Validatable for PartyIdentification135 {
13427    fn validate_constraints(
13428        &self,
13429        path: &str,
13430        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13431    ) {
13432        if let Some(ref val) = self.nm {
13433            let snap = violations.len();
13434            val.validate_constraints("", violations);
13435            if violations.len() > snap {
13436                let pfx = format!("{path}/Nm");
13437                for v in &mut violations[snap..] {
13438                    v.path.insert_str(0, &pfx);
13439                }
13440            }
13441        }
13442        if let Some(ref val) = self.pstl_adr {
13443            let snap = violations.len();
13444            val.validate_constraints("", violations);
13445            if violations.len() > snap {
13446                let pfx = format!("{path}/PstlAdr");
13447                for v in &mut violations[snap..] {
13448                    v.path.insert_str(0, &pfx);
13449                }
13450            }
13451        }
13452        if let Some(ref wrapper) = self.id {
13453            let snap = violations.len();
13454            wrapper.inner.validate_constraints("", violations);
13455            if violations.len() > snap {
13456                let pfx = format!("{path}/Id");
13457                for v in &mut violations[snap..] {
13458                    v.path.insert_str(0, &pfx);
13459                }
13460            }
13461        }
13462        if let Some(ref val) = self.ctry_of_res {
13463            let snap = violations.len();
13464            val.validate_constraints("", violations);
13465            if violations.len() > snap {
13466                let pfx = format!("{path}/CtryOfRes");
13467                for v in &mut violations[snap..] {
13468                    v.path.insert_str(0, &pfx);
13469                }
13470            }
13471        }
13472        if let Some(ref val) = self.ctct_dtls {
13473            let snap = violations.len();
13474            val.validate_constraints("", violations);
13475            if violations.len() > snap {
13476                let pfx = format!("{path}/CtctDtls");
13477                for v in &mut violations[snap..] {
13478                    v.path.insert_str(0, &pfx);
13479                }
13480            }
13481        }
13482    }
13483}
13484impl crate::common::validate::Validatable for PaymentIdentification13 {
13485    fn validate_constraints(
13486        &self,
13487        path: &str,
13488        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13489    ) {
13490        if let Some(ref val) = self.instr_id {
13491            let snap = violations.len();
13492            val.validate_constraints("", violations);
13493            if violations.len() > snap {
13494                let pfx = format!("{path}/InstrId");
13495                for v in &mut violations[snap..] {
13496                    v.path.insert_str(0, &pfx);
13497                }
13498            }
13499        }
13500        {
13501            let snap = violations.len();
13502            self.end_to_end_id.validate_constraints("", violations);
13503            if violations.len() > snap {
13504                let pfx = format!("{path}/EndToEndId");
13505                for v in &mut violations[snap..] {
13506                    v.path.insert_str(0, &pfx);
13507                }
13508            }
13509        }
13510        if let Some(ref val) = self.tx_id {
13511            let snap = violations.len();
13512            val.validate_constraints("", violations);
13513            if violations.len() > snap {
13514                let pfx = format!("{path}/TxId");
13515                for v in &mut violations[snap..] {
13516                    v.path.insert_str(0, &pfx);
13517                }
13518            }
13519        }
13520        if let Some(ref val) = self.uetr {
13521            let snap = violations.len();
13522            val.validate_constraints("", violations);
13523            if violations.len() > snap {
13524                let pfx = format!("{path}/UETR");
13525                for v in &mut violations[snap..] {
13526                    v.path.insert_str(0, &pfx);
13527                }
13528            }
13529        }
13530        if let Some(ref val) = self.clr_sys_ref {
13531            let snap = violations.len();
13532            val.validate_constraints("", violations);
13533            if violations.len() > snap {
13534                let pfx = format!("{path}/ClrSysRef");
13535                for v in &mut violations[snap..] {
13536                    v.path.insert_str(0, &pfx);
13537                }
13538            }
13539        }
13540    }
13541}
13542impl crate::common::validate::Validatable for PaymentTypeInformation28 {
13543    fn validate_constraints(
13544        &self,
13545        path: &str,
13546        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13547    ) {
13548        if let Some(ref val) = self.instr_prty {
13549            let snap = violations.len();
13550            val.validate_constraints("", violations);
13551            if violations.len() > snap {
13552                let pfx = format!("{path}/InstrPrty");
13553                for v in &mut violations[snap..] {
13554                    v.path.insert_str(0, &pfx);
13555                }
13556            }
13557        }
13558        if let Some(ref val) = self.clr_chanl {
13559            let snap = violations.len();
13560            val.validate_constraints("", violations);
13561            if violations.len() > snap {
13562                let pfx = format!("{path}/ClrChanl");
13563                for v in &mut violations[snap..] {
13564                    v.path.insert_str(0, &pfx);
13565                }
13566            }
13567        }
13568        for (idx, elem) in self.svc_lvl.iter().enumerate() {
13569            let snap = violations.len();
13570            elem.inner.validate_constraints("", violations);
13571            if violations.len() > snap {
13572                let pfx = format!("{path}/SvcLvl[{idx}]");
13573                for v in &mut violations[snap..] {
13574                    v.path.insert_str(0, &pfx);
13575                }
13576            }
13577        }
13578        if let Some(ref wrapper) = self.lcl_instrm {
13579            let snap = violations.len();
13580            wrapper.inner.validate_constraints("", violations);
13581            if violations.len() > snap {
13582                let pfx = format!("{path}/LclInstrm");
13583                for v in &mut violations[snap..] {
13584                    v.path.insert_str(0, &pfx);
13585                }
13586            }
13587        }
13588        if let Some(ref wrapper) = self.ctgy_purp {
13589            let snap = violations.len();
13590            wrapper.inner.validate_constraints("", violations);
13591            if violations.len() > snap {
13592                let pfx = format!("{path}/CtgyPurp");
13593                for v in &mut violations[snap..] {
13594                    v.path.insert_str(0, &pfx);
13595                }
13596            }
13597        }
13598    }
13599}
13600impl crate::common::validate::Validatable for PersonIdentification13 {
13601    fn validate_constraints(
13602        &self,
13603        path: &str,
13604        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13605    ) {
13606        if let Some(ref val) = self.dt_and_plc_of_birth {
13607            let snap = violations.len();
13608            val.validate_constraints("", violations);
13609            if violations.len() > snap {
13610                let pfx = format!("{path}/DtAndPlcOfBirth");
13611                for v in &mut violations[snap..] {
13612                    v.path.insert_str(0, &pfx);
13613                }
13614            }
13615        }
13616        for (idx, elem) in self.othr.iter().enumerate() {
13617            let snap = violations.len();
13618            elem.validate_constraints("", violations);
13619            if violations.len() > snap {
13620                let pfx = format!("{path}/Othr[{idx}]");
13621                for v in &mut violations[snap..] {
13622                    v.path.insert_str(0, &pfx);
13623                }
13624            }
13625        }
13626    }
13627}
13628impl crate::common::validate::Validatable for PersonIdentificationSchemeName1Choice {
13629    fn validate_constraints(
13630        &self,
13631        path: &str,
13632        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13633    ) {
13634        match self {
13635            Self::Cd(inner) => {
13636                let snap = violations.len();
13637                inner.validate_constraints("", violations);
13638                if violations.len() > snap {
13639                    let pfx = format!("{path}/Cd");
13640                    for v in &mut violations[snap..] {
13641                        v.path.insert_str(0, &pfx);
13642                    }
13643                }
13644            }
13645            Self::Prtry(inner) => {
13646                let snap = violations.len();
13647                inner.validate_constraints("", violations);
13648                if violations.len() > snap {
13649                    let pfx = format!("{path}/Prtry");
13650                    for v in &mut violations[snap..] {
13651                        v.path.insert_str(0, &pfx);
13652                    }
13653                }
13654            }
13655        }
13656    }
13657}
13658impl crate::common::validate::Validatable for PostalAddress24 {
13659    fn validate_constraints(
13660        &self,
13661        path: &str,
13662        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13663    ) {
13664        if let Some(ref wrapper) = self.adr_tp {
13665            let snap = violations.len();
13666            wrapper.inner.validate_constraints("", violations);
13667            if violations.len() > snap {
13668                let pfx = format!("{path}/AdrTp");
13669                for v in &mut violations[snap..] {
13670                    v.path.insert_str(0, &pfx);
13671                }
13672            }
13673        }
13674        if let Some(ref val) = self.dept {
13675            let snap = violations.len();
13676            val.validate_constraints("", violations);
13677            if violations.len() > snap {
13678                let pfx = format!("{path}/Dept");
13679                for v in &mut violations[snap..] {
13680                    v.path.insert_str(0, &pfx);
13681                }
13682            }
13683        }
13684        if let Some(ref val) = self.sub_dept {
13685            let snap = violations.len();
13686            val.validate_constraints("", violations);
13687            if violations.len() > snap {
13688                let pfx = format!("{path}/SubDept");
13689                for v in &mut violations[snap..] {
13690                    v.path.insert_str(0, &pfx);
13691                }
13692            }
13693        }
13694        if let Some(ref val) = self.strt_nm {
13695            let snap = violations.len();
13696            val.validate_constraints("", violations);
13697            if violations.len() > snap {
13698                let pfx = format!("{path}/StrtNm");
13699                for v in &mut violations[snap..] {
13700                    v.path.insert_str(0, &pfx);
13701                }
13702            }
13703        }
13704        if let Some(ref val) = self.bldg_nb {
13705            let snap = violations.len();
13706            val.validate_constraints("", violations);
13707            if violations.len() > snap {
13708                let pfx = format!("{path}/BldgNb");
13709                for v in &mut violations[snap..] {
13710                    v.path.insert_str(0, &pfx);
13711                }
13712            }
13713        }
13714        if let Some(ref val) = self.bldg_nm {
13715            let snap = violations.len();
13716            val.validate_constraints("", violations);
13717            if violations.len() > snap {
13718                let pfx = format!("{path}/BldgNm");
13719                for v in &mut violations[snap..] {
13720                    v.path.insert_str(0, &pfx);
13721                }
13722            }
13723        }
13724        if let Some(ref val) = self.flr {
13725            let snap = violations.len();
13726            val.validate_constraints("", violations);
13727            if violations.len() > snap {
13728                let pfx = format!("{path}/Flr");
13729                for v in &mut violations[snap..] {
13730                    v.path.insert_str(0, &pfx);
13731                }
13732            }
13733        }
13734        if let Some(ref val) = self.pst_bx {
13735            let snap = violations.len();
13736            val.validate_constraints("", violations);
13737            if violations.len() > snap {
13738                let pfx = format!("{path}/PstBx");
13739                for v in &mut violations[snap..] {
13740                    v.path.insert_str(0, &pfx);
13741                }
13742            }
13743        }
13744        if let Some(ref val) = self.room {
13745            let snap = violations.len();
13746            val.validate_constraints("", violations);
13747            if violations.len() > snap {
13748                let pfx = format!("{path}/Room");
13749                for v in &mut violations[snap..] {
13750                    v.path.insert_str(0, &pfx);
13751                }
13752            }
13753        }
13754        if let Some(ref val) = self.pst_cd {
13755            let snap = violations.len();
13756            val.validate_constraints("", violations);
13757            if violations.len() > snap {
13758                let pfx = format!("{path}/PstCd");
13759                for v in &mut violations[snap..] {
13760                    v.path.insert_str(0, &pfx);
13761                }
13762            }
13763        }
13764        if let Some(ref val) = self.twn_nm {
13765            let snap = violations.len();
13766            val.validate_constraints("", violations);
13767            if violations.len() > snap {
13768                let pfx = format!("{path}/TwnNm");
13769                for v in &mut violations[snap..] {
13770                    v.path.insert_str(0, &pfx);
13771                }
13772            }
13773        }
13774        if let Some(ref val) = self.twn_lctn_nm {
13775            let snap = violations.len();
13776            val.validate_constraints("", violations);
13777            if violations.len() > snap {
13778                let pfx = format!("{path}/TwnLctnNm");
13779                for v in &mut violations[snap..] {
13780                    v.path.insert_str(0, &pfx);
13781                }
13782            }
13783        }
13784        if let Some(ref val) = self.dstrct_nm {
13785            let snap = violations.len();
13786            val.validate_constraints("", violations);
13787            if violations.len() > snap {
13788                let pfx = format!("{path}/DstrctNm");
13789                for v in &mut violations[snap..] {
13790                    v.path.insert_str(0, &pfx);
13791                }
13792            }
13793        }
13794        if let Some(ref val) = self.ctry_sub_dvsn {
13795            let snap = violations.len();
13796            val.validate_constraints("", violations);
13797            if violations.len() > snap {
13798                let pfx = format!("{path}/CtrySubDvsn");
13799                for v in &mut violations[snap..] {
13800                    v.path.insert_str(0, &pfx);
13801                }
13802            }
13803        }
13804        if let Some(ref val) = self.ctry {
13805            let snap = violations.len();
13806            val.validate_constraints("", violations);
13807            if violations.len() > snap {
13808                let pfx = format!("{path}/Ctry");
13809                for v in &mut violations[snap..] {
13810                    v.path.insert_str(0, &pfx);
13811                }
13812            }
13813        }
13814        for (idx, elem) in self.adr_line.iter().enumerate() {
13815            let snap = violations.len();
13816            elem.validate_constraints("", violations);
13817            if violations.len() > snap {
13818                let pfx = format!("{path}/AdrLine[{idx}]");
13819                for v in &mut violations[snap..] {
13820                    v.path.insert_str(0, &pfx);
13821                }
13822            }
13823        }
13824    }
13825}
13826impl crate::common::validate::Validatable for ProxyAccountIdentification1 {
13827    fn validate_constraints(
13828        &self,
13829        path: &str,
13830        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13831    ) {
13832        if let Some(ref wrapper) = self.tp {
13833            let snap = violations.len();
13834            wrapper.inner.validate_constraints("", violations);
13835            if violations.len() > snap {
13836                let pfx = format!("{path}/Tp");
13837                for v in &mut violations[snap..] {
13838                    v.path.insert_str(0, &pfx);
13839                }
13840            }
13841        }
13842        {
13843            let snap = violations.len();
13844            self.id.validate_constraints("", violations);
13845            if violations.len() > snap {
13846                let pfx = format!("{path}/Id");
13847                for v in &mut violations[snap..] {
13848                    v.path.insert_str(0, &pfx);
13849                }
13850            }
13851        }
13852    }
13853}
13854impl crate::common::validate::Validatable for ProxyAccountType1Choice {
13855    fn validate_constraints(
13856        &self,
13857        path: &str,
13858        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13859    ) {
13860        match self {
13861            Self::Cd(inner) => {
13862                let snap = violations.len();
13863                inner.validate_constraints("", violations);
13864                if violations.len() > snap {
13865                    let pfx = format!("{path}/Cd");
13866                    for v in &mut violations[snap..] {
13867                        v.path.insert_str(0, &pfx);
13868                    }
13869                }
13870            }
13871            Self::Prtry(inner) => {
13872                let snap = violations.len();
13873                inner.validate_constraints("", violations);
13874                if violations.len() > snap {
13875                    let pfx = format!("{path}/Prtry");
13876                    for v in &mut violations[snap..] {
13877                        v.path.insert_str(0, &pfx);
13878                    }
13879                }
13880            }
13881        }
13882    }
13883}
13884impl crate::common::validate::Validatable for Purpose2Choice {
13885    fn validate_constraints(
13886        &self,
13887        path: &str,
13888        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13889    ) {
13890        match self {
13891            Self::Cd(inner) => {
13892                let snap = violations.len();
13893                inner.validate_constraints("", violations);
13894                if violations.len() > snap {
13895                    let pfx = format!("{path}/Cd");
13896                    for v in &mut violations[snap..] {
13897                        v.path.insert_str(0, &pfx);
13898                    }
13899                }
13900            }
13901            Self::Prtry(inner) => {
13902                let snap = violations.len();
13903                inner.validate_constraints("", violations);
13904                if violations.len() > snap {
13905                    let pfx = format!("{path}/Prtry");
13906                    for v in &mut violations[snap..] {
13907                        v.path.insert_str(0, &pfx);
13908                    }
13909                }
13910            }
13911        }
13912    }
13913}
13914impl crate::common::validate::Validatable for ReferredDocumentInformation7 {
13915    fn validate_constraints(
13916        &self,
13917        path: &str,
13918        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13919    ) {
13920        if let Some(ref val) = self.tp {
13921            let snap = violations.len();
13922            val.validate_constraints("", violations);
13923            if violations.len() > snap {
13924                let pfx = format!("{path}/Tp");
13925                for v in &mut violations[snap..] {
13926                    v.path.insert_str(0, &pfx);
13927                }
13928            }
13929        }
13930        if let Some(ref val) = self.nb {
13931            let snap = violations.len();
13932            val.validate_constraints("", violations);
13933            if violations.len() > snap {
13934                let pfx = format!("{path}/Nb");
13935                for v in &mut violations[snap..] {
13936                    v.path.insert_str(0, &pfx);
13937                }
13938            }
13939        }
13940        if let Some(ref val) = self.rltd_dt {
13941            let snap = violations.len();
13942            val.validate_constraints("", violations);
13943            if violations.len() > snap {
13944                let pfx = format!("{path}/RltdDt");
13945                for v in &mut violations[snap..] {
13946                    v.path.insert_str(0, &pfx);
13947                }
13948            }
13949        }
13950        for (idx, elem) in self.line_dtls.iter().enumerate() {
13951            let snap = violations.len();
13952            elem.validate_constraints("", violations);
13953            if violations.len() > snap {
13954                let pfx = format!("{path}/LineDtls[{idx}]");
13955                for v in &mut violations[snap..] {
13956                    v.path.insert_str(0, &pfx);
13957                }
13958            }
13959        }
13960    }
13961}
13962impl crate::common::validate::Validatable for ReferredDocumentType3Choice {
13963    fn validate_constraints(
13964        &self,
13965        path: &str,
13966        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13967    ) {
13968        match self {
13969            Self::Cd(inner) => {
13970                let snap = violations.len();
13971                inner.validate_constraints("", violations);
13972                if violations.len() > snap {
13973                    let pfx = format!("{path}/Cd");
13974                    for v in &mut violations[snap..] {
13975                        v.path.insert_str(0, &pfx);
13976                    }
13977                }
13978            }
13979            Self::Prtry(inner) => {
13980                let snap = violations.len();
13981                inner.validate_constraints("", violations);
13982                if violations.len() > snap {
13983                    let pfx = format!("{path}/Prtry");
13984                    for v in &mut violations[snap..] {
13985                        v.path.insert_str(0, &pfx);
13986                    }
13987                }
13988            }
13989        }
13990    }
13991}
13992impl crate::common::validate::Validatable for ReferredDocumentType4 {
13993    fn validate_constraints(
13994        &self,
13995        path: &str,
13996        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13997    ) {
13998        {
13999            let snap = violations.len();
14000            self.cd_or_prtry.inner.validate_constraints("", violations);
14001            if violations.len() > snap {
14002                let pfx = format!("{path}/CdOrPrtry");
14003                for v in &mut violations[snap..] {
14004                    v.path.insert_str(0, &pfx);
14005                }
14006            }
14007        }
14008        if let Some(ref val) = self.issr {
14009            let snap = violations.len();
14010            val.validate_constraints("", violations);
14011            if violations.len() > snap {
14012                let pfx = format!("{path}/Issr");
14013                for v in &mut violations[snap..] {
14014                    v.path.insert_str(0, &pfx);
14015                }
14016            }
14017        }
14018    }
14019}
14020impl crate::common::validate::Validatable for RemittanceAmount2 {
14021    fn validate_constraints(
14022        &self,
14023        path: &str,
14024        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14025    ) {
14026        if let Some(ref val) = self.due_pybl_amt {
14027            let snap = violations.len();
14028            val.validate_constraints("", violations);
14029            if violations.len() > snap {
14030                let pfx = format!("{path}/DuePyblAmt");
14031                for v in &mut violations[snap..] {
14032                    v.path.insert_str(0, &pfx);
14033                }
14034            }
14035        }
14036        for (idx, elem) in self.dscnt_apld_amt.iter().enumerate() {
14037            let snap = violations.len();
14038            elem.validate_constraints("", violations);
14039            if violations.len() > snap {
14040                let pfx = format!("{path}/DscntApldAmt[{idx}]");
14041                for v in &mut violations[snap..] {
14042                    v.path.insert_str(0, &pfx);
14043                }
14044            }
14045        }
14046        if let Some(ref val) = self.cdt_note_amt {
14047            let snap = violations.len();
14048            val.validate_constraints("", violations);
14049            if violations.len() > snap {
14050                let pfx = format!("{path}/CdtNoteAmt");
14051                for v in &mut violations[snap..] {
14052                    v.path.insert_str(0, &pfx);
14053                }
14054            }
14055        }
14056        for (idx, elem) in self.tax_amt.iter().enumerate() {
14057            let snap = violations.len();
14058            elem.validate_constraints("", violations);
14059            if violations.len() > snap {
14060                let pfx = format!("{path}/TaxAmt[{idx}]");
14061                for v in &mut violations[snap..] {
14062                    v.path.insert_str(0, &pfx);
14063                }
14064            }
14065        }
14066        for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
14067            let snap = violations.len();
14068            elem.validate_constraints("", violations);
14069            if violations.len() > snap {
14070                let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
14071                for v in &mut violations[snap..] {
14072                    v.path.insert_str(0, &pfx);
14073                }
14074            }
14075        }
14076        if let Some(ref val) = self.rmtd_amt {
14077            let snap = violations.len();
14078            val.validate_constraints("", violations);
14079            if violations.len() > snap {
14080                let pfx = format!("{path}/RmtdAmt");
14081                for v in &mut violations[snap..] {
14082                    v.path.insert_str(0, &pfx);
14083                }
14084            }
14085        }
14086    }
14087}
14088impl crate::common::validate::Validatable for RemittanceAmount3 {
14089    fn validate_constraints(
14090        &self,
14091        path: &str,
14092        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14093    ) {
14094        if let Some(ref val) = self.due_pybl_amt {
14095            let snap = violations.len();
14096            val.validate_constraints("", violations);
14097            if violations.len() > snap {
14098                let pfx = format!("{path}/DuePyblAmt");
14099                for v in &mut violations[snap..] {
14100                    v.path.insert_str(0, &pfx);
14101                }
14102            }
14103        }
14104        for (idx, elem) in self.dscnt_apld_amt.iter().enumerate() {
14105            let snap = violations.len();
14106            elem.validate_constraints("", violations);
14107            if violations.len() > snap {
14108                let pfx = format!("{path}/DscntApldAmt[{idx}]");
14109                for v in &mut violations[snap..] {
14110                    v.path.insert_str(0, &pfx);
14111                }
14112            }
14113        }
14114        if let Some(ref val) = self.cdt_note_amt {
14115            let snap = violations.len();
14116            val.validate_constraints("", violations);
14117            if violations.len() > snap {
14118                let pfx = format!("{path}/CdtNoteAmt");
14119                for v in &mut violations[snap..] {
14120                    v.path.insert_str(0, &pfx);
14121                }
14122            }
14123        }
14124        for (idx, elem) in self.tax_amt.iter().enumerate() {
14125            let snap = violations.len();
14126            elem.validate_constraints("", violations);
14127            if violations.len() > snap {
14128                let pfx = format!("{path}/TaxAmt[{idx}]");
14129                for v in &mut violations[snap..] {
14130                    v.path.insert_str(0, &pfx);
14131                }
14132            }
14133        }
14134        for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
14135            let snap = violations.len();
14136            elem.validate_constraints("", violations);
14137            if violations.len() > snap {
14138                let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
14139                for v in &mut violations[snap..] {
14140                    v.path.insert_str(0, &pfx);
14141                }
14142            }
14143        }
14144        if let Some(ref val) = self.rmtd_amt {
14145            let snap = violations.len();
14146            val.validate_constraints("", violations);
14147            if violations.len() > snap {
14148                let pfx = format!("{path}/RmtdAmt");
14149                for v in &mut violations[snap..] {
14150                    v.path.insert_str(0, &pfx);
14151                }
14152            }
14153        }
14154    }
14155}
14156impl crate::common::validate::Validatable for RemittanceInformation2 {
14157    fn validate_constraints(
14158        &self,
14159        path: &str,
14160        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14161    ) {
14162        for (idx, elem) in self.ustrd.iter().enumerate() {
14163            let snap = violations.len();
14164            elem.validate_constraints("", violations);
14165            if violations.len() > snap {
14166                let pfx = format!("{path}/Ustrd[{idx}]");
14167                for v in &mut violations[snap..] {
14168                    v.path.insert_str(0, &pfx);
14169                }
14170            }
14171        }
14172    }
14173}
14174impl crate::common::validate::Validatable for RemittanceInformation21 {
14175    fn validate_constraints(
14176        &self,
14177        path: &str,
14178        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14179    ) {
14180        for (idx, elem) in self.ustrd.iter().enumerate() {
14181            let snap = violations.len();
14182            elem.validate_constraints("", violations);
14183            if violations.len() > snap {
14184                let pfx = format!("{path}/Ustrd[{idx}]");
14185                for v in &mut violations[snap..] {
14186                    v.path.insert_str(0, &pfx);
14187                }
14188            }
14189        }
14190        for (idx, elem) in self.strd.iter().enumerate() {
14191            let snap = violations.len();
14192            elem.validate_constraints("", violations);
14193            if violations.len() > snap {
14194                let pfx = format!("{path}/Strd[{idx}]");
14195                for v in &mut violations[snap..] {
14196                    v.path.insert_str(0, &pfx);
14197                }
14198            }
14199        }
14200    }
14201}
14202impl crate::common::validate::Validatable for ServiceLevel8Choice {
14203    fn validate_constraints(
14204        &self,
14205        path: &str,
14206        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14207    ) {
14208        match self {
14209            Self::Cd(inner) => {
14210                let snap = violations.len();
14211                inner.validate_constraints("", violations);
14212                if violations.len() > snap {
14213                    let pfx = format!("{path}/Cd");
14214                    for v in &mut violations[snap..] {
14215                        v.path.insert_str(0, &pfx);
14216                    }
14217                }
14218            }
14219            Self::Prtry(inner) => {
14220                let snap = violations.len();
14221                inner.validate_constraints("", violations);
14222                if violations.len() > snap {
14223                    let pfx = format!("{path}/Prtry");
14224                    for v in &mut violations[snap..] {
14225                        v.path.insert_str(0, &pfx);
14226                    }
14227                }
14228            }
14229        }
14230    }
14231}
14232impl crate::common::validate::Validatable for SettlementDateTimeIndication1 {
14233    fn validate_constraints(
14234        &self,
14235        path: &str,
14236        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14237    ) {
14238        if let Some(ref val) = self.dbt_dt_tm {
14239            let snap = violations.len();
14240            val.validate_constraints("", violations);
14241            if violations.len() > snap {
14242                let pfx = format!("{path}/DbtDtTm");
14243                for v in &mut violations[snap..] {
14244                    v.path.insert_str(0, &pfx);
14245                }
14246            }
14247        }
14248        if let Some(ref val) = self.cdt_dt_tm {
14249            let snap = violations.len();
14250            val.validate_constraints("", violations);
14251            if violations.len() > snap {
14252                let pfx = format!("{path}/CdtDtTm");
14253                for v in &mut violations[snap..] {
14254                    v.path.insert_str(0, &pfx);
14255                }
14256            }
14257        }
14258    }
14259}
14260impl crate::common::validate::Validatable for SettlementInstruction11 {
14261    fn validate_constraints(
14262        &self,
14263        path: &str,
14264        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14265    ) {
14266        {
14267            let snap = violations.len();
14268            self.sttlm_mtd.validate_constraints("", violations);
14269            if violations.len() > snap {
14270                let pfx = format!("{path}/SttlmMtd");
14271                for v in &mut violations[snap..] {
14272                    v.path.insert_str(0, &pfx);
14273                }
14274            }
14275        }
14276        if let Some(ref val) = self.sttlm_acct {
14277            let snap = violations.len();
14278            val.validate_constraints("", violations);
14279            if violations.len() > snap {
14280                let pfx = format!("{path}/SttlmAcct");
14281                for v in &mut violations[snap..] {
14282                    v.path.insert_str(0, &pfx);
14283                }
14284            }
14285        }
14286        if let Some(ref wrapper) = self.clr_sys {
14287            let snap = violations.len();
14288            wrapper.inner.validate_constraints("", violations);
14289            if violations.len() > snap {
14290                let pfx = format!("{path}/ClrSys");
14291                for v in &mut violations[snap..] {
14292                    v.path.insert_str(0, &pfx);
14293                }
14294            }
14295        }
14296        if let Some(ref val) = self.instg_rmbrsmnt_agt {
14297            let snap = violations.len();
14298            val.validate_constraints("", violations);
14299            if violations.len() > snap {
14300                let pfx = format!("{path}/InstgRmbrsmntAgt");
14301                for v in &mut violations[snap..] {
14302                    v.path.insert_str(0, &pfx);
14303                }
14304            }
14305        }
14306        if let Some(ref val) = self.instg_rmbrsmnt_agt_acct {
14307            let snap = violations.len();
14308            val.validate_constraints("", violations);
14309            if violations.len() > snap {
14310                let pfx = format!("{path}/InstgRmbrsmntAgtAcct");
14311                for v in &mut violations[snap..] {
14312                    v.path.insert_str(0, &pfx);
14313                }
14314            }
14315        }
14316        if let Some(ref val) = self.instd_rmbrsmnt_agt {
14317            let snap = violations.len();
14318            val.validate_constraints("", violations);
14319            if violations.len() > snap {
14320                let pfx = format!("{path}/InstdRmbrsmntAgt");
14321                for v in &mut violations[snap..] {
14322                    v.path.insert_str(0, &pfx);
14323                }
14324            }
14325        }
14326        if let Some(ref val) = self.instd_rmbrsmnt_agt_acct {
14327            let snap = violations.len();
14328            val.validate_constraints("", violations);
14329            if violations.len() > snap {
14330                let pfx = format!("{path}/InstdRmbrsmntAgtAcct");
14331                for v in &mut violations[snap..] {
14332                    v.path.insert_str(0, &pfx);
14333                }
14334            }
14335        }
14336        if let Some(ref val) = self.thrd_rmbrsmnt_agt {
14337            let snap = violations.len();
14338            val.validate_constraints("", violations);
14339            if violations.len() > snap {
14340                let pfx = format!("{path}/ThrdRmbrsmntAgt");
14341                for v in &mut violations[snap..] {
14342                    v.path.insert_str(0, &pfx);
14343                }
14344            }
14345        }
14346        if let Some(ref val) = self.thrd_rmbrsmnt_agt_acct {
14347            let snap = violations.len();
14348            val.validate_constraints("", violations);
14349            if violations.len() > snap {
14350                let pfx = format!("{path}/ThrdRmbrsmntAgtAcct");
14351                for v in &mut violations[snap..] {
14352                    v.path.insert_str(0, &pfx);
14353                }
14354            }
14355        }
14356    }
14357}
14358impl crate::common::validate::Validatable for SettlementTimeRequest2 {
14359    fn validate_constraints(
14360        &self,
14361        path: &str,
14362        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14363    ) {
14364        if let Some(ref val) = self.cls_tm {
14365            let snap = violations.len();
14366            val.validate_constraints("", violations);
14367            if violations.len() > snap {
14368                let pfx = format!("{path}/CLSTm");
14369                for v in &mut violations[snap..] {
14370                    v.path.insert_str(0, &pfx);
14371                }
14372            }
14373        }
14374        if let Some(ref val) = self.till_tm {
14375            let snap = violations.len();
14376            val.validate_constraints("", violations);
14377            if violations.len() > snap {
14378                let pfx = format!("{path}/TillTm");
14379                for v in &mut violations[snap..] {
14380                    v.path.insert_str(0, &pfx);
14381                }
14382            }
14383        }
14384        if let Some(ref val) = self.fr_tm {
14385            let snap = violations.len();
14386            val.validate_constraints("", violations);
14387            if violations.len() > snap {
14388                let pfx = format!("{path}/FrTm");
14389                for v in &mut violations[snap..] {
14390                    v.path.insert_str(0, &pfx);
14391                }
14392            }
14393        }
14394        if let Some(ref val) = self.rjct_tm {
14395            let snap = violations.len();
14396            val.validate_constraints("", violations);
14397            if violations.len() > snap {
14398                let pfx = format!("{path}/RjctTm");
14399                for v in &mut violations[snap..] {
14400                    v.path.insert_str(0, &pfx);
14401                }
14402            }
14403        }
14404    }
14405}
14406impl crate::common::validate::Validatable for StructuredRemittanceInformation17 {
14407    fn validate_constraints(
14408        &self,
14409        path: &str,
14410        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14411    ) {
14412        for (idx, elem) in self.rfrd_doc_inf.iter().enumerate() {
14413            let snap = violations.len();
14414            elem.validate_constraints("", violations);
14415            if violations.len() > snap {
14416                let pfx = format!("{path}/RfrdDocInf[{idx}]");
14417                for v in &mut violations[snap..] {
14418                    v.path.insert_str(0, &pfx);
14419                }
14420            }
14421        }
14422        if let Some(ref val) = self.rfrd_doc_amt {
14423            let snap = violations.len();
14424            val.validate_constraints("", violations);
14425            if violations.len() > snap {
14426                let pfx = format!("{path}/RfrdDocAmt");
14427                for v in &mut violations[snap..] {
14428                    v.path.insert_str(0, &pfx);
14429                }
14430            }
14431        }
14432        if let Some(ref val) = self.cdtr_ref_inf {
14433            let snap = violations.len();
14434            val.validate_constraints("", violations);
14435            if violations.len() > snap {
14436                let pfx = format!("{path}/CdtrRefInf");
14437                for v in &mut violations[snap..] {
14438                    v.path.insert_str(0, &pfx);
14439                }
14440            }
14441        }
14442        if let Some(ref val) = self.invcr {
14443            let snap = violations.len();
14444            val.validate_constraints("", violations);
14445            if violations.len() > snap {
14446                let pfx = format!("{path}/Invcr");
14447                for v in &mut violations[snap..] {
14448                    v.path.insert_str(0, &pfx);
14449                }
14450            }
14451        }
14452        if let Some(ref val) = self.invcee {
14453            let snap = violations.len();
14454            val.validate_constraints("", violations);
14455            if violations.len() > snap {
14456                let pfx = format!("{path}/Invcee");
14457                for v in &mut violations[snap..] {
14458                    v.path.insert_str(0, &pfx);
14459                }
14460            }
14461        }
14462        if let Some(ref val) = self.tax_rmt {
14463            let snap = violations.len();
14464            val.validate_constraints("", violations);
14465            if violations.len() > snap {
14466                let pfx = format!("{path}/TaxRmt");
14467                for v in &mut violations[snap..] {
14468                    v.path.insert_str(0, &pfx);
14469                }
14470            }
14471        }
14472        if let Some(ref val) = self.grnshmt_rmt {
14473            let snap = violations.len();
14474            val.validate_constraints("", violations);
14475            if violations.len() > snap {
14476                let pfx = format!("{path}/GrnshmtRmt");
14477                for v in &mut violations[snap..] {
14478                    v.path.insert_str(0, &pfx);
14479                }
14480            }
14481        }
14482        for (idx, elem) in self.addtl_rmt_inf.iter().enumerate() {
14483            let snap = violations.len();
14484            elem.validate_constraints("", violations);
14485            if violations.len() > snap {
14486                let pfx = format!("{path}/AddtlRmtInf[{idx}]");
14487                for v in &mut violations[snap..] {
14488                    v.path.insert_str(0, &pfx);
14489                }
14490            }
14491        }
14492    }
14493}
14494impl crate::common::validate::Validatable for SupplementaryData1 {
14495    fn validate_constraints(
14496        &self,
14497        path: &str,
14498        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14499    ) {
14500        if let Some(ref val) = self.plc_and_nm {
14501            let snap = violations.len();
14502            val.validate_constraints("", violations);
14503            if violations.len() > snap {
14504                let pfx = format!("{path}/PlcAndNm");
14505                for v in &mut violations[snap..] {
14506                    v.path.insert_str(0, &pfx);
14507                }
14508            }
14509        }
14510        {
14511            let snap = violations.len();
14512            self.envlp.validate_constraints("", violations);
14513            if violations.len() > snap {
14514                let pfx = format!("{path}/Envlp");
14515                for v in &mut violations[snap..] {
14516                    v.path.insert_str(0, &pfx);
14517                }
14518            }
14519        }
14520    }
14521}
14522impl crate::common::validate::Validatable for SupplementaryDataEnvelope1 {
14523    fn validate_constraints(
14524        &self,
14525        _path: &str,
14526        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14527    ) {
14528    }
14529}
14530impl crate::common::validate::Validatable for TaxAmount3 {
14531    fn validate_constraints(
14532        &self,
14533        path: &str,
14534        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14535    ) {
14536        if let Some(ref val) = self.rate {
14537            let snap = violations.len();
14538            val.validate_constraints("", violations);
14539            if violations.len() > snap {
14540                let pfx = format!("{path}/Rate");
14541                for v in &mut violations[snap..] {
14542                    v.path.insert_str(0, &pfx);
14543                }
14544            }
14545        }
14546        if let Some(ref val) = self.taxbl_base_amt {
14547            let snap = violations.len();
14548            val.validate_constraints("", violations);
14549            if violations.len() > snap {
14550                let pfx = format!("{path}/TaxblBaseAmt");
14551                for v in &mut violations[snap..] {
14552                    v.path.insert_str(0, &pfx);
14553                }
14554            }
14555        }
14556        if let Some(ref val) = self.ttl_amt {
14557            let snap = violations.len();
14558            val.validate_constraints("", violations);
14559            if violations.len() > snap {
14560                let pfx = format!("{path}/TtlAmt");
14561                for v in &mut violations[snap..] {
14562                    v.path.insert_str(0, &pfx);
14563                }
14564            }
14565        }
14566        for (idx, elem) in self.dtls.iter().enumerate() {
14567            let snap = violations.len();
14568            elem.validate_constraints("", violations);
14569            if violations.len() > snap {
14570                let pfx = format!("{path}/Dtls[{idx}]");
14571                for v in &mut violations[snap..] {
14572                    v.path.insert_str(0, &pfx);
14573                }
14574            }
14575        }
14576    }
14577}
14578impl crate::common::validate::Validatable for TaxAmountAndType1 {
14579    fn validate_constraints(
14580        &self,
14581        path: &str,
14582        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14583    ) {
14584        if let Some(ref wrapper) = self.tp {
14585            let snap = violations.len();
14586            wrapper.inner.validate_constraints("", violations);
14587            if violations.len() > snap {
14588                let pfx = format!("{path}/Tp");
14589                for v in &mut violations[snap..] {
14590                    v.path.insert_str(0, &pfx);
14591                }
14592            }
14593        }
14594        {
14595            let snap = violations.len();
14596            self.amt.validate_constraints("", violations);
14597            if violations.len() > snap {
14598                let pfx = format!("{path}/Amt");
14599                for v in &mut violations[snap..] {
14600                    v.path.insert_str(0, &pfx);
14601                }
14602            }
14603        }
14604    }
14605}
14606impl crate::common::validate::Validatable for TaxAmountType1Choice {
14607    fn validate_constraints(
14608        &self,
14609        path: &str,
14610        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14611    ) {
14612        match self {
14613            Self::Cd(inner) => {
14614                let snap = violations.len();
14615                inner.validate_constraints("", violations);
14616                if violations.len() > snap {
14617                    let pfx = format!("{path}/Cd");
14618                    for v in &mut violations[snap..] {
14619                        v.path.insert_str(0, &pfx);
14620                    }
14621                }
14622            }
14623            Self::Prtry(inner) => {
14624                let snap = violations.len();
14625                inner.validate_constraints("", violations);
14626                if violations.len() > snap {
14627                    let pfx = format!("{path}/Prtry");
14628                    for v in &mut violations[snap..] {
14629                        v.path.insert_str(0, &pfx);
14630                    }
14631                }
14632            }
14633        }
14634    }
14635}
14636impl crate::common::validate::Validatable for TaxAuthorisation1 {
14637    fn validate_constraints(
14638        &self,
14639        path: &str,
14640        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14641    ) {
14642        if let Some(ref val) = self.titl {
14643            let snap = violations.len();
14644            val.validate_constraints("", violations);
14645            if violations.len() > snap {
14646                let pfx = format!("{path}/Titl");
14647                for v in &mut violations[snap..] {
14648                    v.path.insert_str(0, &pfx);
14649                }
14650            }
14651        }
14652        if let Some(ref val) = self.nm {
14653            let snap = violations.len();
14654            val.validate_constraints("", violations);
14655            if violations.len() > snap {
14656                let pfx = format!("{path}/Nm");
14657                for v in &mut violations[snap..] {
14658                    v.path.insert_str(0, &pfx);
14659                }
14660            }
14661        }
14662    }
14663}
14664impl crate::common::validate::Validatable for TaxData1 {
14665    fn validate_constraints(
14666        &self,
14667        path: &str,
14668        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14669    ) {
14670        if let Some(ref val) = self.cdtr {
14671            let snap = violations.len();
14672            val.validate_constraints("", violations);
14673            if violations.len() > snap {
14674                let pfx = format!("{path}/Cdtr");
14675                for v in &mut violations[snap..] {
14676                    v.path.insert_str(0, &pfx);
14677                }
14678            }
14679        }
14680        if let Some(ref val) = self.dbtr {
14681            let snap = violations.len();
14682            val.validate_constraints("", violations);
14683            if violations.len() > snap {
14684                let pfx = format!("{path}/Dbtr");
14685                for v in &mut violations[snap..] {
14686                    v.path.insert_str(0, &pfx);
14687                }
14688            }
14689        }
14690        if let Some(ref val) = self.ultmt_dbtr {
14691            let snap = violations.len();
14692            val.validate_constraints("", violations);
14693            if violations.len() > snap {
14694                let pfx = format!("{path}/UltmtDbtr");
14695                for v in &mut violations[snap..] {
14696                    v.path.insert_str(0, &pfx);
14697                }
14698            }
14699        }
14700        if let Some(ref val) = self.admstn_zone {
14701            let snap = violations.len();
14702            val.validate_constraints("", violations);
14703            if violations.len() > snap {
14704                let pfx = format!("{path}/AdmstnZone");
14705                for v in &mut violations[snap..] {
14706                    v.path.insert_str(0, &pfx);
14707                }
14708            }
14709        }
14710        if let Some(ref val) = self.ref_nb {
14711            let snap = violations.len();
14712            val.validate_constraints("", violations);
14713            if violations.len() > snap {
14714                let pfx = format!("{path}/RefNb");
14715                for v in &mut violations[snap..] {
14716                    v.path.insert_str(0, &pfx);
14717                }
14718            }
14719        }
14720        if let Some(ref val) = self.mtd {
14721            let snap = violations.len();
14722            val.validate_constraints("", violations);
14723            if violations.len() > snap {
14724                let pfx = format!("{path}/Mtd");
14725                for v in &mut violations[snap..] {
14726                    v.path.insert_str(0, &pfx);
14727                }
14728            }
14729        }
14730        if let Some(ref val) = self.ttl_taxbl_base_amt {
14731            let snap = violations.len();
14732            val.validate_constraints("", violations);
14733            if violations.len() > snap {
14734                let pfx = format!("{path}/TtlTaxblBaseAmt");
14735                for v in &mut violations[snap..] {
14736                    v.path.insert_str(0, &pfx);
14737                }
14738            }
14739        }
14740        if let Some(ref val) = self.ttl_tax_amt {
14741            let snap = violations.len();
14742            val.validate_constraints("", violations);
14743            if violations.len() > snap {
14744                let pfx = format!("{path}/TtlTaxAmt");
14745                for v in &mut violations[snap..] {
14746                    v.path.insert_str(0, &pfx);
14747                }
14748            }
14749        }
14750        if let Some(ref val) = self.dt {
14751            let snap = violations.len();
14752            val.validate_constraints("", violations);
14753            if violations.len() > snap {
14754                let pfx = format!("{path}/Dt");
14755                for v in &mut violations[snap..] {
14756                    v.path.insert_str(0, &pfx);
14757                }
14758            }
14759        }
14760        if let Some(ref val) = self.seq_nb {
14761            let snap = violations.len();
14762            val.validate_constraints("", violations);
14763            if violations.len() > snap {
14764                let pfx = format!("{path}/SeqNb");
14765                for v in &mut violations[snap..] {
14766                    v.path.insert_str(0, &pfx);
14767                }
14768            }
14769        }
14770        for (idx, elem) in self.rcrd.iter().enumerate() {
14771            let snap = violations.len();
14772            elem.validate_constraints("", violations);
14773            if violations.len() > snap {
14774                let pfx = format!("{path}/Rcrd[{idx}]");
14775                for v in &mut violations[snap..] {
14776                    v.path.insert_str(0, &pfx);
14777                }
14778            }
14779        }
14780    }
14781}
14782impl crate::common::validate::Validatable for TaxInformation10 {
14783    fn validate_constraints(
14784        &self,
14785        path: &str,
14786        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14787    ) {
14788        if let Some(ref val) = self.cdtr {
14789            let snap = violations.len();
14790            val.validate_constraints("", violations);
14791            if violations.len() > snap {
14792                let pfx = format!("{path}/Cdtr");
14793                for v in &mut violations[snap..] {
14794                    v.path.insert_str(0, &pfx);
14795                }
14796            }
14797        }
14798        if let Some(ref val) = self.dbtr {
14799            let snap = violations.len();
14800            val.validate_constraints("", violations);
14801            if violations.len() > snap {
14802                let pfx = format!("{path}/Dbtr");
14803                for v in &mut violations[snap..] {
14804                    v.path.insert_str(0, &pfx);
14805                }
14806            }
14807        }
14808        if let Some(ref val) = self.admstn_zone {
14809            let snap = violations.len();
14810            val.validate_constraints("", violations);
14811            if violations.len() > snap {
14812                let pfx = format!("{path}/AdmstnZone");
14813                for v in &mut violations[snap..] {
14814                    v.path.insert_str(0, &pfx);
14815                }
14816            }
14817        }
14818        if let Some(ref val) = self.ref_nb {
14819            let snap = violations.len();
14820            val.validate_constraints("", violations);
14821            if violations.len() > snap {
14822                let pfx = format!("{path}/RefNb");
14823                for v in &mut violations[snap..] {
14824                    v.path.insert_str(0, &pfx);
14825                }
14826            }
14827        }
14828        if let Some(ref val) = self.mtd {
14829            let snap = violations.len();
14830            val.validate_constraints("", violations);
14831            if violations.len() > snap {
14832                let pfx = format!("{path}/Mtd");
14833                for v in &mut violations[snap..] {
14834                    v.path.insert_str(0, &pfx);
14835                }
14836            }
14837        }
14838        if let Some(ref val) = self.ttl_taxbl_base_amt {
14839            let snap = violations.len();
14840            val.validate_constraints("", violations);
14841            if violations.len() > snap {
14842                let pfx = format!("{path}/TtlTaxblBaseAmt");
14843                for v in &mut violations[snap..] {
14844                    v.path.insert_str(0, &pfx);
14845                }
14846            }
14847        }
14848        if let Some(ref val) = self.ttl_tax_amt {
14849            let snap = violations.len();
14850            val.validate_constraints("", violations);
14851            if violations.len() > snap {
14852                let pfx = format!("{path}/TtlTaxAmt");
14853                for v in &mut violations[snap..] {
14854                    v.path.insert_str(0, &pfx);
14855                }
14856            }
14857        }
14858        if let Some(ref val) = self.dt {
14859            let snap = violations.len();
14860            val.validate_constraints("", violations);
14861            if violations.len() > snap {
14862                let pfx = format!("{path}/Dt");
14863                for v in &mut violations[snap..] {
14864                    v.path.insert_str(0, &pfx);
14865                }
14866            }
14867        }
14868        if let Some(ref val) = self.seq_nb {
14869            let snap = violations.len();
14870            val.validate_constraints("", violations);
14871            if violations.len() > snap {
14872                let pfx = format!("{path}/SeqNb");
14873                for v in &mut violations[snap..] {
14874                    v.path.insert_str(0, &pfx);
14875                }
14876            }
14877        }
14878        for (idx, elem) in self.rcrd.iter().enumerate() {
14879            let snap = violations.len();
14880            elem.validate_constraints("", violations);
14881            if violations.len() > snap {
14882                let pfx = format!("{path}/Rcrd[{idx}]");
14883                for v in &mut violations[snap..] {
14884                    v.path.insert_str(0, &pfx);
14885                }
14886            }
14887        }
14888    }
14889}
14890impl crate::common::validate::Validatable for TaxParty1 {
14891    fn validate_constraints(
14892        &self,
14893        path: &str,
14894        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14895    ) {
14896        if let Some(ref val) = self.tax_id {
14897            let snap = violations.len();
14898            val.validate_constraints("", violations);
14899            if violations.len() > snap {
14900                let pfx = format!("{path}/TaxId");
14901                for v in &mut violations[snap..] {
14902                    v.path.insert_str(0, &pfx);
14903                }
14904            }
14905        }
14906        if let Some(ref val) = self.regn_id {
14907            let snap = violations.len();
14908            val.validate_constraints("", violations);
14909            if violations.len() > snap {
14910                let pfx = format!("{path}/RegnId");
14911                for v in &mut violations[snap..] {
14912                    v.path.insert_str(0, &pfx);
14913                }
14914            }
14915        }
14916        if let Some(ref val) = self.tax_tp {
14917            let snap = violations.len();
14918            val.validate_constraints("", violations);
14919            if violations.len() > snap {
14920                let pfx = format!("{path}/TaxTp");
14921                for v in &mut violations[snap..] {
14922                    v.path.insert_str(0, &pfx);
14923                }
14924            }
14925        }
14926    }
14927}
14928impl crate::common::validate::Validatable for TaxParty2 {
14929    fn validate_constraints(
14930        &self,
14931        path: &str,
14932        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14933    ) {
14934        if let Some(ref val) = self.tax_id {
14935            let snap = violations.len();
14936            val.validate_constraints("", violations);
14937            if violations.len() > snap {
14938                let pfx = format!("{path}/TaxId");
14939                for v in &mut violations[snap..] {
14940                    v.path.insert_str(0, &pfx);
14941                }
14942            }
14943        }
14944        if let Some(ref val) = self.regn_id {
14945            let snap = violations.len();
14946            val.validate_constraints("", violations);
14947            if violations.len() > snap {
14948                let pfx = format!("{path}/RegnId");
14949                for v in &mut violations[snap..] {
14950                    v.path.insert_str(0, &pfx);
14951                }
14952            }
14953        }
14954        if let Some(ref val) = self.tax_tp {
14955            let snap = violations.len();
14956            val.validate_constraints("", violations);
14957            if violations.len() > snap {
14958                let pfx = format!("{path}/TaxTp");
14959                for v in &mut violations[snap..] {
14960                    v.path.insert_str(0, &pfx);
14961                }
14962            }
14963        }
14964        if let Some(ref val) = self.authstn {
14965            let snap = violations.len();
14966            val.validate_constraints("", violations);
14967            if violations.len() > snap {
14968                let pfx = format!("{path}/Authstn");
14969                for v in &mut violations[snap..] {
14970                    v.path.insert_str(0, &pfx);
14971                }
14972            }
14973        }
14974    }
14975}
14976impl crate::common::validate::Validatable for TaxPeriod3 {
14977    fn validate_constraints(
14978        &self,
14979        path: &str,
14980        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14981    ) {
14982        if let Some(ref val) = self.yr {
14983            let snap = violations.len();
14984            val.validate_constraints("", violations);
14985            if violations.len() > snap {
14986                let pfx = format!("{path}/Yr");
14987                for v in &mut violations[snap..] {
14988                    v.path.insert_str(0, &pfx);
14989                }
14990            }
14991        }
14992        if let Some(ref val) = self.tp {
14993            let snap = violations.len();
14994            val.validate_constraints("", violations);
14995            if violations.len() > snap {
14996                let pfx = format!("{path}/Tp");
14997                for v in &mut violations[snap..] {
14998                    v.path.insert_str(0, &pfx);
14999                }
15000            }
15001        }
15002        if let Some(ref val) = self.fr_to_dt {
15003            let snap = violations.len();
15004            val.validate_constraints("", violations);
15005            if violations.len() > snap {
15006                let pfx = format!("{path}/FrToDt");
15007                for v in &mut violations[snap..] {
15008                    v.path.insert_str(0, &pfx);
15009                }
15010            }
15011        }
15012    }
15013}
15014impl crate::common::validate::Validatable for TaxRecord3 {
15015    fn validate_constraints(
15016        &self,
15017        path: &str,
15018        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15019    ) {
15020        if let Some(ref val) = self.tp {
15021            let snap = violations.len();
15022            val.validate_constraints("", violations);
15023            if violations.len() > snap {
15024                let pfx = format!("{path}/Tp");
15025                for v in &mut violations[snap..] {
15026                    v.path.insert_str(0, &pfx);
15027                }
15028            }
15029        }
15030        if let Some(ref val) = self.ctgy {
15031            let snap = violations.len();
15032            val.validate_constraints("", violations);
15033            if violations.len() > snap {
15034                let pfx = format!("{path}/Ctgy");
15035                for v in &mut violations[snap..] {
15036                    v.path.insert_str(0, &pfx);
15037                }
15038            }
15039        }
15040        if let Some(ref val) = self.ctgy_dtls {
15041            let snap = violations.len();
15042            val.validate_constraints("", violations);
15043            if violations.len() > snap {
15044                let pfx = format!("{path}/CtgyDtls");
15045                for v in &mut violations[snap..] {
15046                    v.path.insert_str(0, &pfx);
15047                }
15048            }
15049        }
15050        if let Some(ref val) = self.dbtr_sts {
15051            let snap = violations.len();
15052            val.validate_constraints("", violations);
15053            if violations.len() > snap {
15054                let pfx = format!("{path}/DbtrSts");
15055                for v in &mut violations[snap..] {
15056                    v.path.insert_str(0, &pfx);
15057                }
15058            }
15059        }
15060        if let Some(ref val) = self.cert_id {
15061            let snap = violations.len();
15062            val.validate_constraints("", violations);
15063            if violations.len() > snap {
15064                let pfx = format!("{path}/CertId");
15065                for v in &mut violations[snap..] {
15066                    v.path.insert_str(0, &pfx);
15067                }
15068            }
15069        }
15070        if let Some(ref val) = self.frms_cd {
15071            let snap = violations.len();
15072            val.validate_constraints("", violations);
15073            if violations.len() > snap {
15074                let pfx = format!("{path}/FrmsCd");
15075                for v in &mut violations[snap..] {
15076                    v.path.insert_str(0, &pfx);
15077                }
15078            }
15079        }
15080        if let Some(ref val) = self.prd {
15081            let snap = violations.len();
15082            val.validate_constraints("", violations);
15083            if violations.len() > snap {
15084                let pfx = format!("{path}/Prd");
15085                for v in &mut violations[snap..] {
15086                    v.path.insert_str(0, &pfx);
15087                }
15088            }
15089        }
15090        if let Some(ref val) = self.tax_amt {
15091            let snap = violations.len();
15092            val.validate_constraints("", violations);
15093            if violations.len() > snap {
15094                let pfx = format!("{path}/TaxAmt");
15095                for v in &mut violations[snap..] {
15096                    v.path.insert_str(0, &pfx);
15097                }
15098            }
15099        }
15100        if let Some(ref val) = self.addtl_inf {
15101            let snap = violations.len();
15102            val.validate_constraints("", violations);
15103            if violations.len() > snap {
15104                let pfx = format!("{path}/AddtlInf");
15105                for v in &mut violations[snap..] {
15106                    v.path.insert_str(0, &pfx);
15107                }
15108            }
15109        }
15110    }
15111}
15112impl crate::common::validate::Validatable for TaxRecordDetails3 {
15113    fn validate_constraints(
15114        &self,
15115        path: &str,
15116        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15117    ) {
15118        if let Some(ref val) = self.prd {
15119            let snap = violations.len();
15120            val.validate_constraints("", violations);
15121            if violations.len() > snap {
15122                let pfx = format!("{path}/Prd");
15123                for v in &mut violations[snap..] {
15124                    v.path.insert_str(0, &pfx);
15125                }
15126            }
15127        }
15128        {
15129            let snap = violations.len();
15130            self.amt.validate_constraints("", violations);
15131            if violations.len() > snap {
15132                let pfx = format!("{path}/Amt");
15133                for v in &mut violations[snap..] {
15134                    v.path.insert_str(0, &pfx);
15135                }
15136            }
15137        }
15138    }
15139}
15140impl crate::common::validate::IsoMessage for Document {
15141    fn message_type(&self) -> &'static str {
15142        "pacs.009.001.10"
15143    }
15144    fn root_path(&self) -> &'static str {
15145        "/Document"
15146    }
15147}