Skip to main content

mx20022_model/generated/pacs/
pacs_004_001_11.rs

1/*! Generated from ISO 20022 XSD schema.
2Namespace: `urn:iso:std:iso:20022:tech:xsd:pacs.004.001.11`*/
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#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
346pub enum Authorisation1Code {
347    #[serde(rename = "AUTH")]
348    Auth,
349    #[serde(rename = "FDET")]
350    Fdet,
351    #[serde(rename = "FSUM")]
352    Fsum,
353    #[serde(rename = "ILEV")]
354    Ilev,
355}
356/// Pattern: `[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}`
357#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
358#[serde(transparent)]
359pub struct BICFIDec2014Identifier(pub String);
360impl TryFrom<String> for BICFIDec2014Identifier {
361    type Error = crate::common::validate::ConstraintError;
362    #[allow(clippy::unreadable_literal)]
363    fn try_from(value: String) -> Result<Self, Self::Error> {
364        {
365            let value: &str = &value;
366            {
367                let violated = {
368                    let bytes = value.as_bytes();
369                    let len = bytes.len();
370                    let result: bool = (|| -> bool {
371                        let mut pos: usize = 0;
372                        if !(8usize..=11usize).contains(&len) {
373                            return true;
374                        }
375                        {
376                            let end = pos + 4usize;
377                            if end > len {
378                                return true;
379                            }
380                            for &b in &bytes[pos..end] {
381                                if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
382                                    return true;
383                                }
384                            }
385                            pos = end;
386                        }
387                        {
388                            let end = pos + 2usize;
389                            if end > len {
390                                return true;
391                            }
392                            for &b in &bytes[pos..end] {
393                                if !(65u8..=90u8).contains(&b) {
394                                    return true;
395                                }
396                            }
397                            pos = end;
398                        }
399                        {
400                            let end = pos + 2usize;
401                            if end > len {
402                                return true;
403                            }
404                            for &b in &bytes[pos..end] {
405                                if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
406                                    return true;
407                                }
408                            }
409                            pos = end;
410                        }
411                        {
412                            let saved = pos;
413                            let matched: bool = (|| -> bool {
414                                {
415                                    let end = pos + 3usize;
416                                    if end > len {
417                                        return true;
418                                    }
419                                    for &b in &bytes[pos..end] {
420                                        if !(65u8..=90u8).contains(&b)
421                                            && !(48u8..=57u8).contains(&b)
422                                        {
423                                            return true;
424                                        }
425                                    }
426                                    pos = end;
427                                }
428                                false
429                            })();
430                            if matched {
431                                pos = saved;
432                            }
433                        }
434                        if pos != len {
435                            return true;
436                        }
437                        false
438                    })();
439                    result
440                };
441                if violated {
442                    return Err(crate::common::validate::ConstraintError {
443                        kind: crate::common::validate::ConstraintKind::Pattern,
444                        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}"
445                            .to_string(),
446                    });
447                }
448            }
449        }
450        Ok(Self(value))
451    }
452}
453impl BICFIDec2014Identifier {
454    /// Construct a validated instance, checking all XSD constraints.
455    #[allow(clippy::unreadable_literal)]
456    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
457        Self::try_from(value.into())
458    }
459}
460impl From<BICFIDec2014Identifier> for String {
461    fn from(v: BICFIDec2014Identifier) -> Self {
462        v.0
463    }
464}
465/// Fraction digits: 10
466/// Total digits: 11
467#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
468#[serde(transparent)]
469pub struct BaseOneRate(pub String);
470impl TryFrom<String> for BaseOneRate {
471    type Error = crate::common::validate::ConstraintError;
472    #[allow(clippy::unreadable_literal)]
473    fn try_from(value: String) -> Result<Self, Self::Error> {
474        {
475            let value: &str = &value;
476            {
477                let frac_count = value.find('.').map_or(0, |dot| {
478                    value[dot + 1..]
479                        .chars()
480                        .filter(char::is_ascii_digit)
481                        .count()
482                });
483                let violated = frac_count > 10usize;
484                if violated {
485                    return Err(crate::common::validate::ConstraintError {
486                        kind: crate::common::validate::ConstraintKind::FractionDigits,
487                        message: format!(
488                            "{} (got {})",
489                            "value exceeds maximum fraction digits 10", frac_count
490                        ),
491                    });
492                }
493            }
494            {
495                let digit_count = value.chars().filter(char::is_ascii_digit).count();
496                let violated = digit_count > 11usize;
497                if violated {
498                    return Err(crate::common::validate::ConstraintError {
499                        kind: crate::common::validate::ConstraintKind::TotalDigits,
500                        message: format!(
501                            "{} (got {})",
502                            "value exceeds maximum total digits 11", digit_count
503                        ),
504                    });
505                }
506            }
507        }
508        Ok(Self(value))
509    }
510}
511impl BaseOneRate {
512    /// Construct a validated instance, checking all XSD constraints.
513    #[allow(clippy::unreadable_literal)]
514    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
515        Self::try_from(value.into())
516    }
517}
518impl From<BaseOneRate> for String {
519    fn from(v: BaseOneRate) -> Self {
520        v.0
521    }
522}
523#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
524#[serde(transparent)]
525pub struct BatchBookingIndicator(pub bool);
526#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
527pub enum ChargeBearerType1Code {
528    #[serde(rename = "DEBT")]
529    Debt,
530    #[serde(rename = "CRED")]
531    Cred,
532    #[serde(rename = "SHAR")]
533    Shar,
534    #[serde(rename = "SLEV")]
535    Slev,
536}
537#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
538pub enum ClearingChannel2Code {
539    #[serde(rename = "RTGS")]
540    Rtgs,
541    #[serde(rename = "RTNS")]
542    Rtns,
543    #[serde(rename = "MPNS")]
544    Mpns,
545    #[serde(rename = "BOOK")]
546    Book,
547}
548/// Pattern: `[A-Z]{2,2}`
549#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
550#[serde(transparent)]
551pub struct CountryCode(pub String);
552impl TryFrom<String> for CountryCode {
553    type Error = crate::common::validate::ConstraintError;
554    #[allow(clippy::unreadable_literal)]
555    fn try_from(value: String) -> Result<Self, Self::Error> {
556        {
557            let value: &str = &value;
558            {
559                let violated = {
560                    let bytes = value.as_bytes();
561                    bytes.len() != 2usize
562                        || ({
563                            let b = bytes[0usize];
564                            !(65u8..=90u8).contains(&b)
565                        })
566                        || ({
567                            let b = bytes[1usize];
568                            !(65u8..=90u8).contains(&b)
569                        })
570                };
571                if violated {
572                    return Err(crate::common::validate::ConstraintError {
573                        kind: crate::common::validate::ConstraintKind::Pattern,
574                        message: "value does not match pattern [A-Z]{2,2}".to_string(),
575                    });
576                }
577            }
578        }
579        Ok(Self(value))
580    }
581}
582impl CountryCode {
583    /// Construct a validated instance, checking all XSD constraints.
584    #[allow(clippy::unreadable_literal)]
585    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
586        Self::try_from(value.into())
587    }
588}
589impl From<CountryCode> for String {
590    fn from(v: CountryCode) -> Self {
591        v.0
592    }
593}
594#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
595pub enum CreditDebitCode {
596    #[serde(rename = "CRDT")]
597    Crdt,
598    #[serde(rename = "DBIT")]
599    Dbit,
600}
601/// Fraction digits: 17
602/// Total digits: 18
603#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
604#[serde(transparent)]
605pub struct DecimalNumber(pub String);
606impl TryFrom<String> for DecimalNumber {
607    type Error = crate::common::validate::ConstraintError;
608    #[allow(clippy::unreadable_literal)]
609    fn try_from(value: String) -> Result<Self, Self::Error> {
610        {
611            let value: &str = &value;
612            {
613                let frac_count = value.find('.').map_or(0, |dot| {
614                    value[dot + 1..]
615                        .chars()
616                        .filter(char::is_ascii_digit)
617                        .count()
618                });
619                let violated = frac_count > 17usize;
620                if violated {
621                    return Err(crate::common::validate::ConstraintError {
622                        kind: crate::common::validate::ConstraintKind::FractionDigits,
623                        message: format!(
624                            "{} (got {})",
625                            "value exceeds maximum fraction digits 17", frac_count
626                        ),
627                    });
628                }
629            }
630            {
631                let digit_count = value.chars().filter(char::is_ascii_digit).count();
632                let violated = digit_count > 18usize;
633                if violated {
634                    return Err(crate::common::validate::ConstraintError {
635                        kind: crate::common::validate::ConstraintKind::TotalDigits,
636                        message: format!(
637                            "{} (got {})",
638                            "value exceeds maximum total digits 18", digit_count
639                        ),
640                    });
641                }
642            }
643        }
644        Ok(Self(value))
645    }
646}
647impl DecimalNumber {
648    /// Construct a validated instance, checking all XSD constraints.
649    #[allow(clippy::unreadable_literal)]
650    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
651        Self::try_from(value.into())
652    }
653}
654impl From<DecimalNumber> for String {
655    fn from(v: DecimalNumber) -> Self {
656        v.0
657    }
658}
659#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
660pub enum DocumentType3Code {
661    #[serde(rename = "RADM")]
662    Radm,
663    #[serde(rename = "RPIN")]
664    Rpin,
665    #[serde(rename = "FXDR")]
666    Fxdr,
667    #[serde(rename = "DISP")]
668    Disp,
669    #[serde(rename = "PUOR")]
670    Puor,
671    #[serde(rename = "SCOR")]
672    Scor,
673}
674#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
675pub enum DocumentType6Code {
676    #[serde(rename = "MSIN")]
677    Msin,
678    #[serde(rename = "CNFA")]
679    Cnfa,
680    #[serde(rename = "DNFA")]
681    Dnfa,
682    #[serde(rename = "CINV")]
683    Cinv,
684    #[serde(rename = "CREN")]
685    Cren,
686    #[serde(rename = "DEBN")]
687    Debn,
688    #[serde(rename = "HIRI")]
689    Hiri,
690    #[serde(rename = "SBIN")]
691    Sbin,
692    #[serde(rename = "CMCN")]
693    Cmcn,
694    #[serde(rename = "SOAC")]
695    Soac,
696    #[serde(rename = "DISP")]
697    Disp,
698    #[serde(rename = "BOLD")]
699    Bold,
700    #[serde(rename = "VCHR")]
701    Vchr,
702    #[serde(rename = "AROI")]
703    Aroi,
704    #[serde(rename = "TSUT")]
705    Tsut,
706    #[serde(rename = "PUOR")]
707    Puor,
708}
709/// Pattern: `[0-9]{2}`
710#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
711#[serde(transparent)]
712pub struct Exact2NumericText(pub String);
713impl TryFrom<String> for Exact2NumericText {
714    type Error = crate::common::validate::ConstraintError;
715    #[allow(clippy::unreadable_literal)]
716    fn try_from(value: String) -> Result<Self, Self::Error> {
717        {
718            let value: &str = &value;
719            {
720                let violated = {
721                    let bytes = value.as_bytes();
722                    bytes.len() != 2usize
723                        || ({
724                            let b = bytes[0usize];
725                            !(48u8..=57u8).contains(&b)
726                        })
727                        || ({
728                            let b = bytes[1usize];
729                            !(48u8..=57u8).contains(&b)
730                        })
731                };
732                if violated {
733                    return Err(crate::common::validate::ConstraintError {
734                        kind: crate::common::validate::ConstraintKind::Pattern,
735                        message: "value does not match pattern [0-9]{2}".to_string(),
736                    });
737                }
738            }
739        }
740        Ok(Self(value))
741    }
742}
743impl Exact2NumericText {
744    /// Construct a validated instance, checking all XSD constraints.
745    #[allow(clippy::unreadable_literal)]
746    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
747        Self::try_from(value.into())
748    }
749}
750impl From<Exact2NumericText> for String {
751    fn from(v: Exact2NumericText) -> Self {
752        v.0
753    }
754}
755/// Pattern: `[a-zA-Z0-9]{4}`
756#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
757#[serde(transparent)]
758pub struct Exact4AlphaNumericText(pub String);
759impl TryFrom<String> for Exact4AlphaNumericText {
760    type Error = crate::common::validate::ConstraintError;
761    #[allow(clippy::unreadable_literal)]
762    fn try_from(value: String) -> Result<Self, Self::Error> {
763        {
764            let value: &str = &value;
765            {
766                let violated = {
767                    let bytes = value.as_bytes();
768                    bytes.len() != 4usize
769                        || ({
770                            let b = bytes[0usize];
771                            !(97u8..=122u8).contains(&b)
772                                && !(65u8..=90u8).contains(&b)
773                                && !(48u8..=57u8).contains(&b)
774                        })
775                        || ({
776                            let b = bytes[1usize];
777                            !(97u8..=122u8).contains(&b)
778                                && !(65u8..=90u8).contains(&b)
779                                && !(48u8..=57u8).contains(&b)
780                        })
781                        || ({
782                            let b = bytes[2usize];
783                            !(97u8..=122u8).contains(&b)
784                                && !(65u8..=90u8).contains(&b)
785                                && !(48u8..=57u8).contains(&b)
786                        })
787                        || ({
788                            let b = bytes[3usize];
789                            !(97u8..=122u8).contains(&b)
790                                && !(65u8..=90u8).contains(&b)
791                                && !(48u8..=57u8).contains(&b)
792                        })
793                };
794                if violated {
795                    return Err(crate::common::validate::ConstraintError {
796                        kind: crate::common::validate::ConstraintKind::Pattern,
797                        message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
798                    });
799                }
800            }
801        }
802        Ok(Self(value))
803    }
804}
805impl Exact4AlphaNumericText {
806    /// Construct a validated instance, checking all XSD constraints.
807    #[allow(clippy::unreadable_literal)]
808    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
809        Self::try_from(value.into())
810    }
811}
812impl From<Exact4AlphaNumericText> for String {
813    fn from(v: Exact4AlphaNumericText) -> Self {
814        v.0
815    }
816}
817/// Minimum length: 1
818/// Maximum length: 4
819#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
820#[serde(transparent)]
821pub struct ExternalAccountIdentification1Code(pub String);
822impl TryFrom<String> for ExternalAccountIdentification1Code {
823    type Error = crate::common::validate::ConstraintError;
824    #[allow(clippy::unreadable_literal)]
825    fn try_from(value: String) -> Result<Self, Self::Error> {
826        {
827            let value: &str = &value;
828            {
829                let len = value.chars().count();
830                let violated = len < 1usize;
831                if violated {
832                    return Err(crate::common::validate::ConstraintError {
833                        kind: crate::common::validate::ConstraintKind::MinLength,
834                        message: format!(
835                            "{} (got {})",
836                            "value is shorter than minimum length 1", len
837                        ),
838                    });
839                }
840            }
841            {
842                let len = value.chars().count();
843                let violated = len > 4usize;
844                if violated {
845                    return Err(crate::common::validate::ConstraintError {
846                        kind: crate::common::validate::ConstraintKind::MaxLength,
847                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
848                    });
849                }
850            }
851        }
852        Ok(Self(value))
853    }
854}
855impl ExternalAccountIdentification1Code {
856    /// Construct a validated instance, checking all XSD constraints.
857    #[allow(clippy::unreadable_literal)]
858    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
859        Self::try_from(value.into())
860    }
861}
862impl From<ExternalAccountIdentification1Code> for String {
863    fn from(v: ExternalAccountIdentification1Code) -> Self {
864        v.0
865    }
866}
867/// Minimum length: 1
868/// Maximum length: 4
869#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
870#[serde(transparent)]
871pub struct ExternalCashAccountType1Code(pub String);
872impl TryFrom<String> for ExternalCashAccountType1Code {
873    type Error = crate::common::validate::ConstraintError;
874    #[allow(clippy::unreadable_literal)]
875    fn try_from(value: String) -> Result<Self, Self::Error> {
876        {
877            let value: &str = &value;
878            {
879                let len = value.chars().count();
880                let violated = len < 1usize;
881                if violated {
882                    return Err(crate::common::validate::ConstraintError {
883                        kind: crate::common::validate::ConstraintKind::MinLength,
884                        message: format!(
885                            "{} (got {})",
886                            "value is shorter than minimum length 1", len
887                        ),
888                    });
889                }
890            }
891            {
892                let len = value.chars().count();
893                let violated = len > 4usize;
894                if violated {
895                    return Err(crate::common::validate::ConstraintError {
896                        kind: crate::common::validate::ConstraintKind::MaxLength,
897                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
898                    });
899                }
900            }
901        }
902        Ok(Self(value))
903    }
904}
905impl ExternalCashAccountType1Code {
906    /// Construct a validated instance, checking all XSD constraints.
907    #[allow(clippy::unreadable_literal)]
908    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
909        Self::try_from(value.into())
910    }
911}
912impl From<ExternalCashAccountType1Code> for String {
913    fn from(v: ExternalCashAccountType1Code) -> Self {
914        v.0
915    }
916}
917/// Minimum length: 1
918/// Maximum length: 3
919#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
920#[serde(transparent)]
921pub struct ExternalCashClearingSystem1Code(pub String);
922impl TryFrom<String> for ExternalCashClearingSystem1Code {
923    type Error = crate::common::validate::ConstraintError;
924    #[allow(clippy::unreadable_literal)]
925    fn try_from(value: String) -> Result<Self, Self::Error> {
926        {
927            let value: &str = &value;
928            {
929                let len = value.chars().count();
930                let violated = len < 1usize;
931                if violated {
932                    return Err(crate::common::validate::ConstraintError {
933                        kind: crate::common::validate::ConstraintKind::MinLength,
934                        message: format!(
935                            "{} (got {})",
936                            "value is shorter than minimum length 1", len
937                        ),
938                    });
939                }
940            }
941            {
942                let len = value.chars().count();
943                let violated = len > 3usize;
944                if violated {
945                    return Err(crate::common::validate::ConstraintError {
946                        kind: crate::common::validate::ConstraintKind::MaxLength,
947                        message: format!("{} (got {})", "value exceeds maximum length 3", len),
948                    });
949                }
950            }
951        }
952        Ok(Self(value))
953    }
954}
955impl ExternalCashClearingSystem1Code {
956    /// Construct a validated instance, checking all XSD constraints.
957    #[allow(clippy::unreadable_literal)]
958    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
959        Self::try_from(value.into())
960    }
961}
962impl From<ExternalCashClearingSystem1Code> for String {
963    fn from(v: ExternalCashClearingSystem1Code) -> Self {
964        v.0
965    }
966}
967/// Minimum length: 1
968/// Maximum length: 4
969#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
970#[serde(transparent)]
971pub struct ExternalCategoryPurpose1Code(pub String);
972impl TryFrom<String> for ExternalCategoryPurpose1Code {
973    type Error = crate::common::validate::ConstraintError;
974    #[allow(clippy::unreadable_literal)]
975    fn try_from(value: String) -> Result<Self, Self::Error> {
976        {
977            let value: &str = &value;
978            {
979                let len = value.chars().count();
980                let violated = len < 1usize;
981                if violated {
982                    return Err(crate::common::validate::ConstraintError {
983                        kind: crate::common::validate::ConstraintKind::MinLength,
984                        message: format!(
985                            "{} (got {})",
986                            "value is shorter than minimum length 1", len
987                        ),
988                    });
989                }
990            }
991            {
992                let len = value.chars().count();
993                let violated = len > 4usize;
994                if violated {
995                    return Err(crate::common::validate::ConstraintError {
996                        kind: crate::common::validate::ConstraintKind::MaxLength,
997                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
998                    });
999                }
1000            }
1001        }
1002        Ok(Self(value))
1003    }
1004}
1005impl ExternalCategoryPurpose1Code {
1006    /// Construct a validated instance, checking all XSD constraints.
1007    #[allow(clippy::unreadable_literal)]
1008    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1009        Self::try_from(value.into())
1010    }
1011}
1012impl From<ExternalCategoryPurpose1Code> for String {
1013    fn from(v: ExternalCategoryPurpose1Code) -> Self {
1014        v.0
1015    }
1016}
1017/// Minimum length: 1
1018/// Maximum length: 5
1019#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1020#[serde(transparent)]
1021pub struct ExternalClearingSystemIdentification1Code(pub String);
1022impl TryFrom<String> for ExternalClearingSystemIdentification1Code {
1023    type Error = crate::common::validate::ConstraintError;
1024    #[allow(clippy::unreadable_literal)]
1025    fn try_from(value: String) -> Result<Self, Self::Error> {
1026        {
1027            let value: &str = &value;
1028            {
1029                let len = value.chars().count();
1030                let violated = len < 1usize;
1031                if violated {
1032                    return Err(crate::common::validate::ConstraintError {
1033                        kind: crate::common::validate::ConstraintKind::MinLength,
1034                        message: format!(
1035                            "{} (got {})",
1036                            "value is shorter than minimum length 1", len
1037                        ),
1038                    });
1039                }
1040            }
1041            {
1042                let len = value.chars().count();
1043                let violated = len > 5usize;
1044                if violated {
1045                    return Err(crate::common::validate::ConstraintError {
1046                        kind: crate::common::validate::ConstraintKind::MaxLength,
1047                        message: format!("{} (got {})", "value exceeds maximum length 5", len),
1048                    });
1049                }
1050            }
1051        }
1052        Ok(Self(value))
1053    }
1054}
1055impl ExternalClearingSystemIdentification1Code {
1056    /// Construct a validated instance, checking all XSD constraints.
1057    #[allow(clippy::unreadable_literal)]
1058    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1059        Self::try_from(value.into())
1060    }
1061}
1062impl From<ExternalClearingSystemIdentification1Code> for String {
1063    fn from(v: ExternalClearingSystemIdentification1Code) -> Self {
1064        v.0
1065    }
1066}
1067/// Minimum length: 1
1068/// Maximum length: 4
1069#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1070#[serde(transparent)]
1071pub struct ExternalCreditorAgentInstruction1Code(pub String);
1072impl TryFrom<String> for ExternalCreditorAgentInstruction1Code {
1073    type Error = crate::common::validate::ConstraintError;
1074    #[allow(clippy::unreadable_literal)]
1075    fn try_from(value: String) -> Result<Self, Self::Error> {
1076        {
1077            let value: &str = &value;
1078            {
1079                let len = value.chars().count();
1080                let violated = len < 1usize;
1081                if violated {
1082                    return Err(crate::common::validate::ConstraintError {
1083                        kind: crate::common::validate::ConstraintKind::MinLength,
1084                        message: format!(
1085                            "{} (got {})",
1086                            "value is shorter than minimum length 1", len
1087                        ),
1088                    });
1089                }
1090            }
1091            {
1092                let len = value.chars().count();
1093                let violated = len > 4usize;
1094                if violated {
1095                    return Err(crate::common::validate::ConstraintError {
1096                        kind: crate::common::validate::ConstraintKind::MaxLength,
1097                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1098                    });
1099                }
1100            }
1101        }
1102        Ok(Self(value))
1103    }
1104}
1105impl ExternalCreditorAgentInstruction1Code {
1106    /// Construct a validated instance, checking all XSD constraints.
1107    #[allow(clippy::unreadable_literal)]
1108    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1109        Self::try_from(value.into())
1110    }
1111}
1112impl From<ExternalCreditorAgentInstruction1Code> for String {
1113    fn from(v: ExternalCreditorAgentInstruction1Code) -> Self {
1114        v.0
1115    }
1116}
1117/// Minimum length: 1
1118/// Maximum length: 4
1119#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1120#[serde(transparent)]
1121pub struct ExternalDiscountAmountType1Code(pub String);
1122impl TryFrom<String> for ExternalDiscountAmountType1Code {
1123    type Error = crate::common::validate::ConstraintError;
1124    #[allow(clippy::unreadable_literal)]
1125    fn try_from(value: String) -> Result<Self, Self::Error> {
1126        {
1127            let value: &str = &value;
1128            {
1129                let len = value.chars().count();
1130                let violated = len < 1usize;
1131                if violated {
1132                    return Err(crate::common::validate::ConstraintError {
1133                        kind: crate::common::validate::ConstraintKind::MinLength,
1134                        message: format!(
1135                            "{} (got {})",
1136                            "value is shorter than minimum length 1", len
1137                        ),
1138                    });
1139                }
1140            }
1141            {
1142                let len = value.chars().count();
1143                let violated = len > 4usize;
1144                if violated {
1145                    return Err(crate::common::validate::ConstraintError {
1146                        kind: crate::common::validate::ConstraintKind::MaxLength,
1147                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1148                    });
1149                }
1150            }
1151        }
1152        Ok(Self(value))
1153    }
1154}
1155impl ExternalDiscountAmountType1Code {
1156    /// Construct a validated instance, checking all XSD constraints.
1157    #[allow(clippy::unreadable_literal)]
1158    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1159        Self::try_from(value.into())
1160    }
1161}
1162impl From<ExternalDiscountAmountType1Code> for String {
1163    fn from(v: ExternalDiscountAmountType1Code) -> Self {
1164        v.0
1165    }
1166}
1167/// Minimum length: 1
1168/// Maximum length: 4
1169#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1170#[serde(transparent)]
1171pub struct ExternalDocumentLineType1Code(pub String);
1172impl TryFrom<String> for ExternalDocumentLineType1Code {
1173    type Error = crate::common::validate::ConstraintError;
1174    #[allow(clippy::unreadable_literal)]
1175    fn try_from(value: String) -> Result<Self, Self::Error> {
1176        {
1177            let value: &str = &value;
1178            {
1179                let len = value.chars().count();
1180                let violated = len < 1usize;
1181                if violated {
1182                    return Err(crate::common::validate::ConstraintError {
1183                        kind: crate::common::validate::ConstraintKind::MinLength,
1184                        message: format!(
1185                            "{} (got {})",
1186                            "value is shorter than minimum length 1", len
1187                        ),
1188                    });
1189                }
1190            }
1191            {
1192                let len = value.chars().count();
1193                let violated = len > 4usize;
1194                if violated {
1195                    return Err(crate::common::validate::ConstraintError {
1196                        kind: crate::common::validate::ConstraintKind::MaxLength,
1197                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1198                    });
1199                }
1200            }
1201        }
1202        Ok(Self(value))
1203    }
1204}
1205impl ExternalDocumentLineType1Code {
1206    /// Construct a validated instance, checking all XSD constraints.
1207    #[allow(clippy::unreadable_literal)]
1208    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1209        Self::try_from(value.into())
1210    }
1211}
1212impl From<ExternalDocumentLineType1Code> for String {
1213    fn from(v: ExternalDocumentLineType1Code) -> Self {
1214        v.0
1215    }
1216}
1217/// Minimum length: 1
1218/// Maximum length: 4
1219#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1220#[serde(transparent)]
1221pub struct ExternalFinancialInstitutionIdentification1Code(pub String);
1222impl TryFrom<String> for ExternalFinancialInstitutionIdentification1Code {
1223    type Error = crate::common::validate::ConstraintError;
1224    #[allow(clippy::unreadable_literal)]
1225    fn try_from(value: String) -> Result<Self, Self::Error> {
1226        {
1227            let value: &str = &value;
1228            {
1229                let len = value.chars().count();
1230                let violated = len < 1usize;
1231                if violated {
1232                    return Err(crate::common::validate::ConstraintError {
1233                        kind: crate::common::validate::ConstraintKind::MinLength,
1234                        message: format!(
1235                            "{} (got {})",
1236                            "value is shorter than minimum length 1", len
1237                        ),
1238                    });
1239                }
1240            }
1241            {
1242                let len = value.chars().count();
1243                let violated = len > 4usize;
1244                if violated {
1245                    return Err(crate::common::validate::ConstraintError {
1246                        kind: crate::common::validate::ConstraintKind::MaxLength,
1247                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1248                    });
1249                }
1250            }
1251        }
1252        Ok(Self(value))
1253    }
1254}
1255impl ExternalFinancialInstitutionIdentification1Code {
1256    /// Construct a validated instance, checking all XSD constraints.
1257    #[allow(clippy::unreadable_literal)]
1258    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1259        Self::try_from(value.into())
1260    }
1261}
1262impl From<ExternalFinancialInstitutionIdentification1Code> for String {
1263    fn from(v: ExternalFinancialInstitutionIdentification1Code) -> Self {
1264        v.0
1265    }
1266}
1267/// Minimum length: 1
1268/// Maximum length: 4
1269#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1270#[serde(transparent)]
1271pub struct ExternalGarnishmentType1Code(pub String);
1272impl TryFrom<String> for ExternalGarnishmentType1Code {
1273    type Error = crate::common::validate::ConstraintError;
1274    #[allow(clippy::unreadable_literal)]
1275    fn try_from(value: String) -> Result<Self, Self::Error> {
1276        {
1277            let value: &str = &value;
1278            {
1279                let len = value.chars().count();
1280                let violated = len < 1usize;
1281                if violated {
1282                    return Err(crate::common::validate::ConstraintError {
1283                        kind: crate::common::validate::ConstraintKind::MinLength,
1284                        message: format!(
1285                            "{} (got {})",
1286                            "value is shorter than minimum length 1", len
1287                        ),
1288                    });
1289                }
1290            }
1291            {
1292                let len = value.chars().count();
1293                let violated = len > 4usize;
1294                if violated {
1295                    return Err(crate::common::validate::ConstraintError {
1296                        kind: crate::common::validate::ConstraintKind::MaxLength,
1297                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1298                    });
1299                }
1300            }
1301        }
1302        Ok(Self(value))
1303    }
1304}
1305impl ExternalGarnishmentType1Code {
1306    /// Construct a validated instance, checking all XSD constraints.
1307    #[allow(clippy::unreadable_literal)]
1308    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1309        Self::try_from(value.into())
1310    }
1311}
1312impl From<ExternalGarnishmentType1Code> for String {
1313    fn from(v: ExternalGarnishmentType1Code) -> Self {
1314        v.0
1315    }
1316}
1317/// Minimum length: 1
1318/// Maximum length: 35
1319#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1320#[serde(transparent)]
1321pub struct ExternalLocalInstrument1Code(pub String);
1322impl TryFrom<String> for ExternalLocalInstrument1Code {
1323    type Error = crate::common::validate::ConstraintError;
1324    #[allow(clippy::unreadable_literal)]
1325    fn try_from(value: String) -> Result<Self, Self::Error> {
1326        {
1327            let value: &str = &value;
1328            {
1329                let len = value.chars().count();
1330                let violated = len < 1usize;
1331                if violated {
1332                    return Err(crate::common::validate::ConstraintError {
1333                        kind: crate::common::validate::ConstraintKind::MinLength,
1334                        message: format!(
1335                            "{} (got {})",
1336                            "value is shorter than minimum length 1", len
1337                        ),
1338                    });
1339                }
1340            }
1341            {
1342                let len = value.chars().count();
1343                let violated = len > 35usize;
1344                if violated {
1345                    return Err(crate::common::validate::ConstraintError {
1346                        kind: crate::common::validate::ConstraintKind::MaxLength,
1347                        message: format!("{} (got {})", "value exceeds maximum length 35", len),
1348                    });
1349                }
1350            }
1351        }
1352        Ok(Self(value))
1353    }
1354}
1355impl ExternalLocalInstrument1Code {
1356    /// Construct a validated instance, checking all XSD constraints.
1357    #[allow(clippy::unreadable_literal)]
1358    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1359        Self::try_from(value.into())
1360    }
1361}
1362impl From<ExternalLocalInstrument1Code> for String {
1363    fn from(v: ExternalLocalInstrument1Code) -> Self {
1364        v.0
1365    }
1366}
1367/// Minimum length: 1
1368/// Maximum length: 4
1369#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1370#[serde(transparent)]
1371pub struct ExternalMandateSetupReason1Code(pub String);
1372impl TryFrom<String> for ExternalMandateSetupReason1Code {
1373    type Error = crate::common::validate::ConstraintError;
1374    #[allow(clippy::unreadable_literal)]
1375    fn try_from(value: String) -> Result<Self, Self::Error> {
1376        {
1377            let value: &str = &value;
1378            {
1379                let len = value.chars().count();
1380                let violated = len < 1usize;
1381                if violated {
1382                    return Err(crate::common::validate::ConstraintError {
1383                        kind: crate::common::validate::ConstraintKind::MinLength,
1384                        message: format!(
1385                            "{} (got {})",
1386                            "value is shorter than minimum length 1", len
1387                        ),
1388                    });
1389                }
1390            }
1391            {
1392                let len = value.chars().count();
1393                let violated = len > 4usize;
1394                if violated {
1395                    return Err(crate::common::validate::ConstraintError {
1396                        kind: crate::common::validate::ConstraintKind::MaxLength,
1397                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1398                    });
1399                }
1400            }
1401        }
1402        Ok(Self(value))
1403    }
1404}
1405impl ExternalMandateSetupReason1Code {
1406    /// Construct a validated instance, checking all XSD constraints.
1407    #[allow(clippy::unreadable_literal)]
1408    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1409        Self::try_from(value.into())
1410    }
1411}
1412impl From<ExternalMandateSetupReason1Code> for String {
1413    fn from(v: ExternalMandateSetupReason1Code) -> Self {
1414        v.0
1415    }
1416}
1417/// Minimum length: 1
1418/// Maximum length: 4
1419#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1420#[serde(transparent)]
1421pub struct ExternalOrganisationIdentification1Code(pub String);
1422impl TryFrom<String> for ExternalOrganisationIdentification1Code {
1423    type Error = crate::common::validate::ConstraintError;
1424    #[allow(clippy::unreadable_literal)]
1425    fn try_from(value: String) -> Result<Self, Self::Error> {
1426        {
1427            let value: &str = &value;
1428            {
1429                let len = value.chars().count();
1430                let violated = len < 1usize;
1431                if violated {
1432                    return Err(crate::common::validate::ConstraintError {
1433                        kind: crate::common::validate::ConstraintKind::MinLength,
1434                        message: format!(
1435                            "{} (got {})",
1436                            "value is shorter than minimum length 1", len
1437                        ),
1438                    });
1439                }
1440            }
1441            {
1442                let len = value.chars().count();
1443                let violated = len > 4usize;
1444                if violated {
1445                    return Err(crate::common::validate::ConstraintError {
1446                        kind: crate::common::validate::ConstraintKind::MaxLength,
1447                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1448                    });
1449                }
1450            }
1451        }
1452        Ok(Self(value))
1453    }
1454}
1455impl ExternalOrganisationIdentification1Code {
1456    /// Construct a validated instance, checking all XSD constraints.
1457    #[allow(clippy::unreadable_literal)]
1458    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1459        Self::try_from(value.into())
1460    }
1461}
1462impl From<ExternalOrganisationIdentification1Code> for String {
1463    fn from(v: ExternalOrganisationIdentification1Code) -> Self {
1464        v.0
1465    }
1466}
1467/// Minimum length: 1
1468/// Maximum length: 4
1469#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1470#[serde(transparent)]
1471pub struct ExternalPersonIdentification1Code(pub String);
1472impl TryFrom<String> for ExternalPersonIdentification1Code {
1473    type Error = crate::common::validate::ConstraintError;
1474    #[allow(clippy::unreadable_literal)]
1475    fn try_from(value: String) -> Result<Self, Self::Error> {
1476        {
1477            let value: &str = &value;
1478            {
1479                let len = value.chars().count();
1480                let violated = len < 1usize;
1481                if violated {
1482                    return Err(crate::common::validate::ConstraintError {
1483                        kind: crate::common::validate::ConstraintKind::MinLength,
1484                        message: format!(
1485                            "{} (got {})",
1486                            "value is shorter than minimum length 1", len
1487                        ),
1488                    });
1489                }
1490            }
1491            {
1492                let len = value.chars().count();
1493                let violated = len > 4usize;
1494                if violated {
1495                    return Err(crate::common::validate::ConstraintError {
1496                        kind: crate::common::validate::ConstraintKind::MaxLength,
1497                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1498                    });
1499                }
1500            }
1501        }
1502        Ok(Self(value))
1503    }
1504}
1505impl ExternalPersonIdentification1Code {
1506    /// Construct a validated instance, checking all XSD constraints.
1507    #[allow(clippy::unreadable_literal)]
1508    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1509        Self::try_from(value.into())
1510    }
1511}
1512impl From<ExternalPersonIdentification1Code> for String {
1513    fn from(v: ExternalPersonIdentification1Code) -> Self {
1514        v.0
1515    }
1516}
1517/// Minimum length: 1
1518/// Maximum length: 4
1519#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1520#[serde(transparent)]
1521pub struct ExternalProxyAccountType1Code(pub String);
1522impl TryFrom<String> for ExternalProxyAccountType1Code {
1523    type Error = crate::common::validate::ConstraintError;
1524    #[allow(clippy::unreadable_literal)]
1525    fn try_from(value: String) -> Result<Self, Self::Error> {
1526        {
1527            let value: &str = &value;
1528            {
1529                let len = value.chars().count();
1530                let violated = len < 1usize;
1531                if violated {
1532                    return Err(crate::common::validate::ConstraintError {
1533                        kind: crate::common::validate::ConstraintKind::MinLength,
1534                        message: format!(
1535                            "{} (got {})",
1536                            "value is shorter than minimum length 1", len
1537                        ),
1538                    });
1539                }
1540            }
1541            {
1542                let len = value.chars().count();
1543                let violated = len > 4usize;
1544                if violated {
1545                    return Err(crate::common::validate::ConstraintError {
1546                        kind: crate::common::validate::ConstraintKind::MaxLength,
1547                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1548                    });
1549                }
1550            }
1551        }
1552        Ok(Self(value))
1553    }
1554}
1555impl ExternalProxyAccountType1Code {
1556    /// Construct a validated instance, checking all XSD constraints.
1557    #[allow(clippy::unreadable_literal)]
1558    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1559        Self::try_from(value.into())
1560    }
1561}
1562impl From<ExternalProxyAccountType1Code> for String {
1563    fn from(v: ExternalProxyAccountType1Code) -> Self {
1564        v.0
1565    }
1566}
1567/// Minimum length: 1
1568/// Maximum length: 4
1569#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1570#[serde(transparent)]
1571pub struct ExternalPurpose1Code(pub String);
1572impl TryFrom<String> for ExternalPurpose1Code {
1573    type Error = crate::common::validate::ConstraintError;
1574    #[allow(clippy::unreadable_literal)]
1575    fn try_from(value: String) -> Result<Self, Self::Error> {
1576        {
1577            let value: &str = &value;
1578            {
1579                let len = value.chars().count();
1580                let violated = len < 1usize;
1581                if violated {
1582                    return Err(crate::common::validate::ConstraintError {
1583                        kind: crate::common::validate::ConstraintKind::MinLength,
1584                        message: format!(
1585                            "{} (got {})",
1586                            "value is shorter than minimum length 1", len
1587                        ),
1588                    });
1589                }
1590            }
1591            {
1592                let len = value.chars().count();
1593                let violated = len > 4usize;
1594                if violated {
1595                    return Err(crate::common::validate::ConstraintError {
1596                        kind: crate::common::validate::ConstraintKind::MaxLength,
1597                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1598                    });
1599                }
1600            }
1601        }
1602        Ok(Self(value))
1603    }
1604}
1605impl ExternalPurpose1Code {
1606    /// Construct a validated instance, checking all XSD constraints.
1607    #[allow(clippy::unreadable_literal)]
1608    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1609        Self::try_from(value.into())
1610    }
1611}
1612impl From<ExternalPurpose1Code> for String {
1613    fn from(v: ExternalPurpose1Code) -> Self {
1614        v.0
1615    }
1616}
1617/// Minimum length: 1
1618/// Maximum length: 4
1619#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1620#[serde(transparent)]
1621pub struct ExternalReturnReason1Code(pub String);
1622impl TryFrom<String> for ExternalReturnReason1Code {
1623    type Error = crate::common::validate::ConstraintError;
1624    #[allow(clippy::unreadable_literal)]
1625    fn try_from(value: String) -> Result<Self, Self::Error> {
1626        {
1627            let value: &str = &value;
1628            {
1629                let len = value.chars().count();
1630                let violated = len < 1usize;
1631                if violated {
1632                    return Err(crate::common::validate::ConstraintError {
1633                        kind: crate::common::validate::ConstraintKind::MinLength,
1634                        message: format!(
1635                            "{} (got {})",
1636                            "value is shorter than minimum length 1", len
1637                        ),
1638                    });
1639                }
1640            }
1641            {
1642                let len = value.chars().count();
1643                let violated = len > 4usize;
1644                if violated {
1645                    return Err(crate::common::validate::ConstraintError {
1646                        kind: crate::common::validate::ConstraintKind::MaxLength,
1647                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1648                    });
1649                }
1650            }
1651        }
1652        Ok(Self(value))
1653    }
1654}
1655impl ExternalReturnReason1Code {
1656    /// Construct a validated instance, checking all XSD constraints.
1657    #[allow(clippy::unreadable_literal)]
1658    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1659        Self::try_from(value.into())
1660    }
1661}
1662impl From<ExternalReturnReason1Code> for String {
1663    fn from(v: ExternalReturnReason1Code) -> Self {
1664        v.0
1665    }
1666}
1667/// Minimum length: 1
1668/// Maximum length: 4
1669#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1670#[serde(transparent)]
1671pub struct ExternalServiceLevel1Code(pub String);
1672impl TryFrom<String> for ExternalServiceLevel1Code {
1673    type Error = crate::common::validate::ConstraintError;
1674    #[allow(clippy::unreadable_literal)]
1675    fn try_from(value: String) -> Result<Self, Self::Error> {
1676        {
1677            let value: &str = &value;
1678            {
1679                let len = value.chars().count();
1680                let violated = len < 1usize;
1681                if violated {
1682                    return Err(crate::common::validate::ConstraintError {
1683                        kind: crate::common::validate::ConstraintKind::MinLength,
1684                        message: format!(
1685                            "{} (got {})",
1686                            "value is shorter than minimum length 1", len
1687                        ),
1688                    });
1689                }
1690            }
1691            {
1692                let len = value.chars().count();
1693                let violated = len > 4usize;
1694                if violated {
1695                    return Err(crate::common::validate::ConstraintError {
1696                        kind: crate::common::validate::ConstraintKind::MaxLength,
1697                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1698                    });
1699                }
1700            }
1701        }
1702        Ok(Self(value))
1703    }
1704}
1705impl ExternalServiceLevel1Code {
1706    /// Construct a validated instance, checking all XSD constraints.
1707    #[allow(clippy::unreadable_literal)]
1708    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1709        Self::try_from(value.into())
1710    }
1711}
1712impl From<ExternalServiceLevel1Code> for String {
1713    fn from(v: ExternalServiceLevel1Code) -> Self {
1714        v.0
1715    }
1716}
1717/// Minimum length: 1
1718/// Maximum length: 4
1719#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1720#[serde(transparent)]
1721pub struct ExternalTaxAmountType1Code(pub String);
1722impl TryFrom<String> for ExternalTaxAmountType1Code {
1723    type Error = crate::common::validate::ConstraintError;
1724    #[allow(clippy::unreadable_literal)]
1725    fn try_from(value: String) -> Result<Self, Self::Error> {
1726        {
1727            let value: &str = &value;
1728            {
1729                let len = value.chars().count();
1730                let violated = len < 1usize;
1731                if violated {
1732                    return Err(crate::common::validate::ConstraintError {
1733                        kind: crate::common::validate::ConstraintKind::MinLength,
1734                        message: format!(
1735                            "{} (got {})",
1736                            "value is shorter than minimum length 1", len
1737                        ),
1738                    });
1739                }
1740            }
1741            {
1742                let len = value.chars().count();
1743                let violated = len > 4usize;
1744                if violated {
1745                    return Err(crate::common::validate::ConstraintError {
1746                        kind: crate::common::validate::ConstraintKind::MaxLength,
1747                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
1748                    });
1749                }
1750            }
1751        }
1752        Ok(Self(value))
1753    }
1754}
1755impl ExternalTaxAmountType1Code {
1756    /// Construct a validated instance, checking all XSD constraints.
1757    #[allow(clippy::unreadable_literal)]
1758    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1759        Self::try_from(value.into())
1760    }
1761}
1762impl From<ExternalTaxAmountType1Code> for String {
1763    fn from(v: ExternalTaxAmountType1Code) -> Self {
1764        v.0
1765    }
1766}
1767#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1768pub enum Frequency6Code {
1769    #[serde(rename = "YEAR")]
1770    Year,
1771    #[serde(rename = "MNTH")]
1772    Mnth,
1773    #[serde(rename = "QURT")]
1774    Qurt,
1775    #[serde(rename = "MIAN")]
1776    Mian,
1777    #[serde(rename = "WEEK")]
1778    Week,
1779    #[serde(rename = "DAIL")]
1780    Dail,
1781    #[serde(rename = "ADHO")]
1782    Adho,
1783    #[serde(rename = "INDA")]
1784    Inda,
1785    #[serde(rename = "FRTN")]
1786    Frtn,
1787}
1788/// Pattern: `[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}`
1789#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1790#[serde(transparent)]
1791pub struct IBAN2007Identifier(pub String);
1792impl TryFrom<String> for IBAN2007Identifier {
1793    type Error = crate::common::validate::ConstraintError;
1794    #[allow(clippy::unreadable_literal)]
1795    fn try_from(value: String) -> Result<Self, Self::Error> {
1796        {
1797            let value: &str = &value;
1798            {
1799                let violated = {
1800                    let bytes = value.as_bytes();
1801                    let len = bytes.len();
1802                    let result: bool = (|| -> bool {
1803                        let mut pos: usize = 0;
1804                        if !(5usize..=34usize).contains(&len) {
1805                            return true;
1806                        }
1807                        {
1808                            let end = pos + 2usize;
1809                            if end > len {
1810                                return true;
1811                            }
1812                            for &b in &bytes[pos..end] {
1813                                if !(65u8..=90u8).contains(&b) {
1814                                    return true;
1815                                }
1816                            }
1817                            pos = end;
1818                        }
1819                        {
1820                            let end = pos + 2usize;
1821                            if end > len {
1822                                return true;
1823                            }
1824                            for &b in &bytes[pos..end] {
1825                                if !(48u8..=57u8).contains(&b) {
1826                                    return true;
1827                                }
1828                            }
1829                            pos = end;
1830                        }
1831                        {
1832                            let start = pos;
1833                            let limit = if pos + 30usize < len {
1834                                pos + 30usize
1835                            } else {
1836                                len
1837                            };
1838                            while pos < limit {
1839                                let b = bytes[pos];
1840                                if !(97u8..=122u8).contains(&b)
1841                                    && !(65u8..=90u8).contains(&b)
1842                                    && !(48u8..=57u8).contains(&b)
1843                                {
1844                                    break;
1845                                }
1846                                pos += 1;
1847                            }
1848                            let matched = pos - start;
1849                            if matched < 1usize {
1850                                return true;
1851                            }
1852                        }
1853                        if pos != len {
1854                            return true;
1855                        }
1856                        false
1857                    })();
1858                    result
1859                };
1860                if violated {
1861                    return Err(crate::common::validate::ConstraintError {
1862                        kind: crate::common::validate::ConstraintKind::Pattern,
1863                        message:
1864                            "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
1865                                .to_string(),
1866                    });
1867                }
1868            }
1869        }
1870        Ok(Self(value))
1871    }
1872}
1873impl IBAN2007Identifier {
1874    /// Construct a validated instance, checking all XSD constraints.
1875    #[allow(clippy::unreadable_literal)]
1876    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1877        Self::try_from(value.into())
1878    }
1879}
1880impl From<IBAN2007Identifier> for String {
1881    fn from(v: IBAN2007Identifier) -> Self {
1882        v.0
1883    }
1884}
1885#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1886#[serde(transparent)]
1887pub struct ISODate(pub String);
1888#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1889#[serde(transparent)]
1890pub struct ISODateTime(pub String);
1891#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1892#[serde(transparent)]
1893pub struct ISOTime(pub String);
1894#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1895#[serde(transparent)]
1896pub struct ISOYear(pub String);
1897#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1898pub enum Instruction4Code {
1899    #[serde(rename = "PHOA")]
1900    Phoa,
1901    #[serde(rename = "TELA")]
1902    Tela,
1903}
1904/// Pattern: `[A-Z0-9]{18,18}[0-9]{2,2}`
1905#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1906#[serde(transparent)]
1907pub struct LEIIdentifier(pub String);
1908impl TryFrom<String> for LEIIdentifier {
1909    type Error = crate::common::validate::ConstraintError;
1910    #[allow(clippy::unreadable_literal)]
1911    fn try_from(value: String) -> Result<Self, Self::Error> {
1912        {
1913            let value: &str = &value;
1914            {
1915                let violated = {
1916                    let bytes = value.as_bytes();
1917                    bytes.len() != 20usize
1918                        || ({
1919                            let b = bytes[0usize];
1920                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1921                        })
1922                        || ({
1923                            let b = bytes[1usize];
1924                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1925                        })
1926                        || ({
1927                            let b = bytes[2usize];
1928                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1929                        })
1930                        || ({
1931                            let b = bytes[3usize];
1932                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1933                        })
1934                        || ({
1935                            let b = bytes[4usize];
1936                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1937                        })
1938                        || ({
1939                            let b = bytes[5usize];
1940                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1941                        })
1942                        || ({
1943                            let b = bytes[6usize];
1944                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1945                        })
1946                        || ({
1947                            let b = bytes[7usize];
1948                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1949                        })
1950                        || ({
1951                            let b = bytes[8usize];
1952                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1953                        })
1954                        || ({
1955                            let b = bytes[9usize];
1956                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1957                        })
1958                        || ({
1959                            let b = bytes[10usize];
1960                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1961                        })
1962                        || ({
1963                            let b = bytes[11usize];
1964                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1965                        })
1966                        || ({
1967                            let b = bytes[12usize];
1968                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1969                        })
1970                        || ({
1971                            let b = bytes[13usize];
1972                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1973                        })
1974                        || ({
1975                            let b = bytes[14usize];
1976                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1977                        })
1978                        || ({
1979                            let b = bytes[15usize];
1980                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1981                        })
1982                        || ({
1983                            let b = bytes[16usize];
1984                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1985                        })
1986                        || ({
1987                            let b = bytes[17usize];
1988                            !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1989                        })
1990                        || ({
1991                            let b = bytes[18usize];
1992                            !(48u8..=57u8).contains(&b)
1993                        })
1994                        || ({
1995                            let b = bytes[19usize];
1996                            !(48u8..=57u8).contains(&b)
1997                        })
1998                };
1999                if violated {
2000                    return Err(crate::common::validate::ConstraintError {
2001                        kind: crate::common::validate::ConstraintKind::Pattern,
2002                        message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}"
2003                            .to_string(),
2004                    });
2005                }
2006            }
2007        }
2008        Ok(Self(value))
2009    }
2010}
2011impl LEIIdentifier {
2012    /// Construct a validated instance, checking all XSD constraints.
2013    #[allow(clippy::unreadable_literal)]
2014    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2015        Self::try_from(value.into())
2016    }
2017}
2018impl From<LEIIdentifier> for String {
2019    fn from(v: LEIIdentifier) -> Self {
2020        v.0
2021    }
2022}
2023#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2024pub enum MandateClassification1Code {
2025    #[serde(rename = "FIXE")]
2026    Fixe,
2027    #[serde(rename = "USGB")]
2028    Usgb,
2029    #[serde(rename = "VARI")]
2030    Vari,
2031}
2032/// Minimum length: 1
2033/// Maximum length: 1025
2034#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2035#[serde(transparent)]
2036pub struct Max1025Text(pub String);
2037impl TryFrom<String> for Max1025Text {
2038    type Error = crate::common::validate::ConstraintError;
2039    #[allow(clippy::unreadable_literal)]
2040    fn try_from(value: String) -> Result<Self, Self::Error> {
2041        {
2042            let value: &str = &value;
2043            {
2044                let len = value.chars().count();
2045                let violated = len < 1usize;
2046                if violated {
2047                    return Err(crate::common::validate::ConstraintError {
2048                        kind: crate::common::validate::ConstraintKind::MinLength,
2049                        message: format!(
2050                            "{} (got {})",
2051                            "value is shorter than minimum length 1", len
2052                        ),
2053                    });
2054                }
2055            }
2056            {
2057                let len = value.chars().count();
2058                let violated = len > 1025usize;
2059                if violated {
2060                    return Err(crate::common::validate::ConstraintError {
2061                        kind: crate::common::validate::ConstraintKind::MaxLength,
2062                        message: format!("{} (got {})", "value exceeds maximum length 1025", len),
2063                    });
2064                }
2065            }
2066        }
2067        Ok(Self(value))
2068    }
2069}
2070impl Max1025Text {
2071    /// Construct a validated instance, checking all XSD constraints.
2072    #[allow(clippy::unreadable_literal)]
2073    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2074        Self::try_from(value.into())
2075    }
2076}
2077impl From<Max1025Text> for String {
2078    fn from(v: Max1025Text) -> Self {
2079        v.0
2080    }
2081}
2082/// Minimum length: 1
2083/// Maximum length: 105
2084#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2085#[serde(transparent)]
2086pub struct Max105Text(pub String);
2087impl TryFrom<String> for Max105Text {
2088    type Error = crate::common::validate::ConstraintError;
2089    #[allow(clippy::unreadable_literal)]
2090    fn try_from(value: String) -> Result<Self, Self::Error> {
2091        {
2092            let value: &str = &value;
2093            {
2094                let len = value.chars().count();
2095                let violated = len < 1usize;
2096                if violated {
2097                    return Err(crate::common::validate::ConstraintError {
2098                        kind: crate::common::validate::ConstraintKind::MinLength,
2099                        message: format!(
2100                            "{} (got {})",
2101                            "value is shorter than minimum length 1", len
2102                        ),
2103                    });
2104                }
2105            }
2106            {
2107                let len = value.chars().count();
2108                let violated = len > 105usize;
2109                if violated {
2110                    return Err(crate::common::validate::ConstraintError {
2111                        kind: crate::common::validate::ConstraintKind::MaxLength,
2112                        message: format!("{} (got {})", "value exceeds maximum length 105", len),
2113                    });
2114                }
2115            }
2116        }
2117        Ok(Self(value))
2118    }
2119}
2120impl Max105Text {
2121    /// Construct a validated instance, checking all XSD constraints.
2122    #[allow(clippy::unreadable_literal)]
2123    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2124        Self::try_from(value.into())
2125    }
2126}
2127impl From<Max105Text> for String {
2128    fn from(v: Max105Text) -> Self {
2129        v.0
2130    }
2131}
2132/// Minimum length: 1
2133/// Maximum length: 10240
2134#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2135#[serde(transparent)]
2136pub struct Max10KBinary(pub String);
2137impl TryFrom<String> for Max10KBinary {
2138    type Error = crate::common::validate::ConstraintError;
2139    #[allow(clippy::unreadable_literal)]
2140    fn try_from(value: String) -> Result<Self, Self::Error> {
2141        {
2142            let value: &str = &value;
2143            {
2144                let len = value.chars().count();
2145                let violated = len < 1usize;
2146                if violated {
2147                    return Err(crate::common::validate::ConstraintError {
2148                        kind: crate::common::validate::ConstraintKind::MinLength,
2149                        message: format!(
2150                            "{} (got {})",
2151                            "value is shorter than minimum length 1", len
2152                        ),
2153                    });
2154                }
2155            }
2156            {
2157                let len = value.chars().count();
2158                let violated = len > 10240usize;
2159                if violated {
2160                    return Err(crate::common::validate::ConstraintError {
2161                        kind: crate::common::validate::ConstraintKind::MaxLength,
2162                        message: format!("{} (got {})", "value exceeds maximum length 10240", len),
2163                    });
2164                }
2165            }
2166        }
2167        Ok(Self(value))
2168    }
2169}
2170impl Max10KBinary {
2171    /// Construct a validated instance, checking all XSD constraints.
2172    #[allow(clippy::unreadable_literal)]
2173    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2174        Self::try_from(value.into())
2175    }
2176}
2177impl From<Max10KBinary> for String {
2178    fn from(v: Max10KBinary) -> Self {
2179        v.0
2180    }
2181}
2182/// Minimum length: 1
2183/// Maximum length: 128
2184#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2185#[serde(transparent)]
2186pub struct Max128Text(pub String);
2187impl TryFrom<String> for Max128Text {
2188    type Error = crate::common::validate::ConstraintError;
2189    #[allow(clippy::unreadable_literal)]
2190    fn try_from(value: String) -> Result<Self, Self::Error> {
2191        {
2192            let value: &str = &value;
2193            {
2194                let len = value.chars().count();
2195                let violated = len < 1usize;
2196                if violated {
2197                    return Err(crate::common::validate::ConstraintError {
2198                        kind: crate::common::validate::ConstraintKind::MinLength,
2199                        message: format!(
2200                            "{} (got {})",
2201                            "value is shorter than minimum length 1", len
2202                        ),
2203                    });
2204                }
2205            }
2206            {
2207                let len = value.chars().count();
2208                let violated = len > 128usize;
2209                if violated {
2210                    return Err(crate::common::validate::ConstraintError {
2211                        kind: crate::common::validate::ConstraintKind::MaxLength,
2212                        message: format!("{} (got {})", "value exceeds maximum length 128", len),
2213                    });
2214                }
2215            }
2216        }
2217        Ok(Self(value))
2218    }
2219}
2220impl Max128Text {
2221    /// Construct a validated instance, checking all XSD constraints.
2222    #[allow(clippy::unreadable_literal)]
2223    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2224        Self::try_from(value.into())
2225    }
2226}
2227impl From<Max128Text> for String {
2228    fn from(v: Max128Text) -> Self {
2229        v.0
2230    }
2231}
2232/// Minimum length: 1
2233/// Maximum length: 140
2234#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2235#[serde(transparent)]
2236pub struct Max140Text(pub String);
2237impl TryFrom<String> for Max140Text {
2238    type Error = crate::common::validate::ConstraintError;
2239    #[allow(clippy::unreadable_literal)]
2240    fn try_from(value: String) -> Result<Self, Self::Error> {
2241        {
2242            let value: &str = &value;
2243            {
2244                let len = value.chars().count();
2245                let violated = len < 1usize;
2246                if violated {
2247                    return Err(crate::common::validate::ConstraintError {
2248                        kind: crate::common::validate::ConstraintKind::MinLength,
2249                        message: format!(
2250                            "{} (got {})",
2251                            "value is shorter than minimum length 1", len
2252                        ),
2253                    });
2254                }
2255            }
2256            {
2257                let len = value.chars().count();
2258                let violated = len > 140usize;
2259                if violated {
2260                    return Err(crate::common::validate::ConstraintError {
2261                        kind: crate::common::validate::ConstraintKind::MaxLength,
2262                        message: format!("{} (got {})", "value exceeds maximum length 140", len),
2263                    });
2264                }
2265            }
2266        }
2267        Ok(Self(value))
2268    }
2269}
2270impl Max140Text {
2271    /// Construct a validated instance, checking all XSD constraints.
2272    #[allow(clippy::unreadable_literal)]
2273    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2274        Self::try_from(value.into())
2275    }
2276}
2277impl From<Max140Text> for String {
2278    fn from(v: Max140Text) -> Self {
2279        v.0
2280    }
2281}
2282/// Pattern: `[0-9]{1,15}`
2283#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2284#[serde(transparent)]
2285pub struct Max15NumericText(pub String);
2286impl TryFrom<String> for Max15NumericText {
2287    type Error = crate::common::validate::ConstraintError;
2288    #[allow(clippy::unreadable_literal)]
2289    fn try_from(value: String) -> Result<Self, Self::Error> {
2290        {
2291            let value: &str = &value;
2292            {
2293                let violated = {
2294                    let bytes = value.as_bytes();
2295                    let len = bytes.len();
2296                    let result: bool = (|| -> bool {
2297                        let mut pos: usize = 0;
2298                        if !(1usize..=15usize).contains(&len) {
2299                            return true;
2300                        }
2301                        {
2302                            let start = pos;
2303                            let limit = if pos + 15usize < len {
2304                                pos + 15usize
2305                            } else {
2306                                len
2307                            };
2308                            while pos < limit {
2309                                let b = bytes[pos];
2310                                if !(48u8..=57u8).contains(&b) {
2311                                    break;
2312                                }
2313                                pos += 1;
2314                            }
2315                            let matched = pos - start;
2316                            if matched < 1usize {
2317                                return true;
2318                            }
2319                        }
2320                        if pos != len {
2321                            return true;
2322                        }
2323                        false
2324                    })();
2325                    result
2326                };
2327                if violated {
2328                    return Err(crate::common::validate::ConstraintError {
2329                        kind: crate::common::validate::ConstraintKind::Pattern,
2330                        message: "value does not match pattern [0-9]{1,15}".to_string(),
2331                    });
2332                }
2333            }
2334        }
2335        Ok(Self(value))
2336    }
2337}
2338impl Max15NumericText {
2339    /// Construct a validated instance, checking all XSD constraints.
2340    #[allow(clippy::unreadable_literal)]
2341    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2342        Self::try_from(value.into())
2343    }
2344}
2345impl From<Max15NumericText> for String {
2346    fn from(v: Max15NumericText) -> Self {
2347        v.0
2348    }
2349}
2350/// Minimum length: 1
2351/// Maximum length: 16
2352#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2353#[serde(transparent)]
2354pub struct Max16Text(pub String);
2355impl TryFrom<String> for Max16Text {
2356    type Error = crate::common::validate::ConstraintError;
2357    #[allow(clippy::unreadable_literal)]
2358    fn try_from(value: String) -> Result<Self, Self::Error> {
2359        {
2360            let value: &str = &value;
2361            {
2362                let len = value.chars().count();
2363                let violated = len < 1usize;
2364                if violated {
2365                    return Err(crate::common::validate::ConstraintError {
2366                        kind: crate::common::validate::ConstraintKind::MinLength,
2367                        message: format!(
2368                            "{} (got {})",
2369                            "value is shorter than minimum length 1", len
2370                        ),
2371                    });
2372                }
2373            }
2374            {
2375                let len = value.chars().count();
2376                let violated = len > 16usize;
2377                if violated {
2378                    return Err(crate::common::validate::ConstraintError {
2379                        kind: crate::common::validate::ConstraintKind::MaxLength,
2380                        message: format!("{} (got {})", "value exceeds maximum length 16", len),
2381                    });
2382                }
2383            }
2384        }
2385        Ok(Self(value))
2386    }
2387}
2388impl Max16Text {
2389    /// Construct a validated instance, checking all XSD constraints.
2390    #[allow(clippy::unreadable_literal)]
2391    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2392        Self::try_from(value.into())
2393    }
2394}
2395impl From<Max16Text> for String {
2396    fn from(v: Max16Text) -> Self {
2397        v.0
2398    }
2399}
2400/// Minimum length: 1
2401/// Maximum length: 2048
2402#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2403#[serde(transparent)]
2404pub struct Max2048Text(pub String);
2405impl TryFrom<String> for Max2048Text {
2406    type Error = crate::common::validate::ConstraintError;
2407    #[allow(clippy::unreadable_literal)]
2408    fn try_from(value: String) -> Result<Self, Self::Error> {
2409        {
2410            let value: &str = &value;
2411            {
2412                let len = value.chars().count();
2413                let violated = len < 1usize;
2414                if violated {
2415                    return Err(crate::common::validate::ConstraintError {
2416                        kind: crate::common::validate::ConstraintKind::MinLength,
2417                        message: format!(
2418                            "{} (got {})",
2419                            "value is shorter than minimum length 1", len
2420                        ),
2421                    });
2422                }
2423            }
2424            {
2425                let len = value.chars().count();
2426                let violated = len > 2048usize;
2427                if violated {
2428                    return Err(crate::common::validate::ConstraintError {
2429                        kind: crate::common::validate::ConstraintKind::MaxLength,
2430                        message: format!("{} (got {})", "value exceeds maximum length 2048", len),
2431                    });
2432                }
2433            }
2434        }
2435        Ok(Self(value))
2436    }
2437}
2438impl Max2048Text {
2439    /// Construct a validated instance, checking all XSD constraints.
2440    #[allow(clippy::unreadable_literal)]
2441    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2442        Self::try_from(value.into())
2443    }
2444}
2445impl From<Max2048Text> for String {
2446    fn from(v: Max2048Text) -> Self {
2447        v.0
2448    }
2449}
2450/// Minimum length: 1
2451/// Maximum length: 34
2452#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2453#[serde(transparent)]
2454pub struct Max34Text(pub String);
2455impl TryFrom<String> for Max34Text {
2456    type Error = crate::common::validate::ConstraintError;
2457    #[allow(clippy::unreadable_literal)]
2458    fn try_from(value: String) -> Result<Self, Self::Error> {
2459        {
2460            let value: &str = &value;
2461            {
2462                let len = value.chars().count();
2463                let violated = len < 1usize;
2464                if violated {
2465                    return Err(crate::common::validate::ConstraintError {
2466                        kind: crate::common::validate::ConstraintKind::MinLength,
2467                        message: format!(
2468                            "{} (got {})",
2469                            "value is shorter than minimum length 1", len
2470                        ),
2471                    });
2472                }
2473            }
2474            {
2475                let len = value.chars().count();
2476                let violated = len > 34usize;
2477                if violated {
2478                    return Err(crate::common::validate::ConstraintError {
2479                        kind: crate::common::validate::ConstraintKind::MaxLength,
2480                        message: format!("{} (got {})", "value exceeds maximum length 34", len),
2481                    });
2482                }
2483            }
2484        }
2485        Ok(Self(value))
2486    }
2487}
2488impl Max34Text {
2489    /// Construct a validated instance, checking all XSD constraints.
2490    #[allow(clippy::unreadable_literal)]
2491    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2492        Self::try_from(value.into())
2493    }
2494}
2495impl From<Max34Text> for String {
2496    fn from(v: Max34Text) -> Self {
2497        v.0
2498    }
2499}
2500/// Minimum length: 1
2501/// Maximum length: 350
2502#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2503#[serde(transparent)]
2504pub struct Max350Text(pub String);
2505impl TryFrom<String> for Max350Text {
2506    type Error = crate::common::validate::ConstraintError;
2507    #[allow(clippy::unreadable_literal)]
2508    fn try_from(value: String) -> Result<Self, Self::Error> {
2509        {
2510            let value: &str = &value;
2511            {
2512                let len = value.chars().count();
2513                let violated = len < 1usize;
2514                if violated {
2515                    return Err(crate::common::validate::ConstraintError {
2516                        kind: crate::common::validate::ConstraintKind::MinLength,
2517                        message: format!(
2518                            "{} (got {})",
2519                            "value is shorter than minimum length 1", len
2520                        ),
2521                    });
2522                }
2523            }
2524            {
2525                let len = value.chars().count();
2526                let violated = len > 350usize;
2527                if violated {
2528                    return Err(crate::common::validate::ConstraintError {
2529                        kind: crate::common::validate::ConstraintKind::MaxLength,
2530                        message: format!("{} (got {})", "value exceeds maximum length 350", len),
2531                    });
2532                }
2533            }
2534        }
2535        Ok(Self(value))
2536    }
2537}
2538impl Max350Text {
2539    /// Construct a validated instance, checking all XSD constraints.
2540    #[allow(clippy::unreadable_literal)]
2541    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2542        Self::try_from(value.into())
2543    }
2544}
2545impl From<Max350Text> for String {
2546    fn from(v: Max350Text) -> Self {
2547        v.0
2548    }
2549}
2550/// Minimum length: 1
2551/// Maximum length: 35
2552#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2553#[serde(transparent)]
2554pub struct Max35Text(pub String);
2555impl TryFrom<String> for Max35Text {
2556    type Error = crate::common::validate::ConstraintError;
2557    #[allow(clippy::unreadable_literal)]
2558    fn try_from(value: String) -> Result<Self, Self::Error> {
2559        {
2560            let value: &str = &value;
2561            {
2562                let len = value.chars().count();
2563                let violated = len < 1usize;
2564                if violated {
2565                    return Err(crate::common::validate::ConstraintError {
2566                        kind: crate::common::validate::ConstraintKind::MinLength,
2567                        message: format!(
2568                            "{} (got {})",
2569                            "value is shorter than minimum length 1", len
2570                        ),
2571                    });
2572                }
2573            }
2574            {
2575                let len = value.chars().count();
2576                let violated = len > 35usize;
2577                if violated {
2578                    return Err(crate::common::validate::ConstraintError {
2579                        kind: crate::common::validate::ConstraintKind::MaxLength,
2580                        message: format!("{} (got {})", "value exceeds maximum length 35", len),
2581                    });
2582                }
2583            }
2584        }
2585        Ok(Self(value))
2586    }
2587}
2588impl Max35Text {
2589    /// Construct a validated instance, checking all XSD constraints.
2590    #[allow(clippy::unreadable_literal)]
2591    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2592        Self::try_from(value.into())
2593    }
2594}
2595impl From<Max35Text> for String {
2596    fn from(v: Max35Text) -> Self {
2597        v.0
2598    }
2599}
2600/// Minimum length: 1
2601/// Maximum length: 4
2602#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2603#[serde(transparent)]
2604pub struct Max4Text(pub String);
2605impl TryFrom<String> for Max4Text {
2606    type Error = crate::common::validate::ConstraintError;
2607    #[allow(clippy::unreadable_literal)]
2608    fn try_from(value: String) -> Result<Self, Self::Error> {
2609        {
2610            let value: &str = &value;
2611            {
2612                let len = value.chars().count();
2613                let violated = len < 1usize;
2614                if violated {
2615                    return Err(crate::common::validate::ConstraintError {
2616                        kind: crate::common::validate::ConstraintKind::MinLength,
2617                        message: format!(
2618                            "{} (got {})",
2619                            "value is shorter than minimum length 1", len
2620                        ),
2621                    });
2622                }
2623            }
2624            {
2625                let len = value.chars().count();
2626                let violated = len > 4usize;
2627                if violated {
2628                    return Err(crate::common::validate::ConstraintError {
2629                        kind: crate::common::validate::ConstraintKind::MaxLength,
2630                        message: format!("{} (got {})", "value exceeds maximum length 4", len),
2631                    });
2632                }
2633            }
2634        }
2635        Ok(Self(value))
2636    }
2637}
2638impl Max4Text {
2639    /// Construct a validated instance, checking all XSD constraints.
2640    #[allow(clippy::unreadable_literal)]
2641    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2642        Self::try_from(value.into())
2643    }
2644}
2645impl From<Max4Text> for String {
2646    fn from(v: Max4Text) -> Self {
2647        v.0
2648    }
2649}
2650/// Minimum length: 1
2651/// Maximum length: 70
2652#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2653#[serde(transparent)]
2654pub struct Max70Text(pub String);
2655impl TryFrom<String> for Max70Text {
2656    type Error = crate::common::validate::ConstraintError;
2657    #[allow(clippy::unreadable_literal)]
2658    fn try_from(value: String) -> Result<Self, Self::Error> {
2659        {
2660            let value: &str = &value;
2661            {
2662                let len = value.chars().count();
2663                let violated = len < 1usize;
2664                if violated {
2665                    return Err(crate::common::validate::ConstraintError {
2666                        kind: crate::common::validate::ConstraintKind::MinLength,
2667                        message: format!(
2668                            "{} (got {})",
2669                            "value is shorter than minimum length 1", len
2670                        ),
2671                    });
2672                }
2673            }
2674            {
2675                let len = value.chars().count();
2676                let violated = len > 70usize;
2677                if violated {
2678                    return Err(crate::common::validate::ConstraintError {
2679                        kind: crate::common::validate::ConstraintKind::MaxLength,
2680                        message: format!("{} (got {})", "value exceeds maximum length 70", len),
2681                    });
2682                }
2683            }
2684        }
2685        Ok(Self(value))
2686    }
2687}
2688impl Max70Text {
2689    /// Construct a validated instance, checking all XSD constraints.
2690    #[allow(clippy::unreadable_literal)]
2691    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2692        Self::try_from(value.into())
2693    }
2694}
2695impl From<Max70Text> for String {
2696    fn from(v: Max70Text) -> Self {
2697        v.0
2698    }
2699}
2700#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2701pub enum NamePrefix2Code {
2702    #[serde(rename = "DOCT")]
2703    Doct,
2704    #[serde(rename = "MADM")]
2705    Madm,
2706    #[serde(rename = "MISS")]
2707    Miss,
2708    #[serde(rename = "MIST")]
2709    Mist,
2710    #[serde(rename = "MIKS")]
2711    Miks,
2712}
2713/// Fraction digits: 0
2714/// Total digits: 18
2715#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2716#[serde(transparent)]
2717pub struct Number(pub String);
2718impl TryFrom<String> for Number {
2719    type Error = crate::common::validate::ConstraintError;
2720    #[allow(clippy::unreadable_literal)]
2721    fn try_from(value: String) -> Result<Self, Self::Error> {
2722        {
2723            let value: &str = &value;
2724            {
2725                let frac_count = value.find('.').map_or(0, |dot| {
2726                    value[dot + 1..]
2727                        .chars()
2728                        .filter(char::is_ascii_digit)
2729                        .count()
2730                });
2731                let violated = frac_count > 0usize;
2732                if violated {
2733                    return Err(crate::common::validate::ConstraintError {
2734                        kind: crate::common::validate::ConstraintKind::FractionDigits,
2735                        message: format!(
2736                            "{} (got {})",
2737                            "value exceeds maximum fraction digits 0", frac_count
2738                        ),
2739                    });
2740                }
2741            }
2742            {
2743                let digit_count = value.chars().filter(char::is_ascii_digit).count();
2744                let violated = digit_count > 18usize;
2745                if violated {
2746                    return Err(crate::common::validate::ConstraintError {
2747                        kind: crate::common::validate::ConstraintKind::TotalDigits,
2748                        message: format!(
2749                            "{} (got {})",
2750                            "value exceeds maximum total digits 18", digit_count
2751                        ),
2752                    });
2753                }
2754            }
2755        }
2756        Ok(Self(value))
2757    }
2758}
2759impl Number {
2760    /// Construct a validated instance, checking all XSD constraints.
2761    #[allow(clippy::unreadable_literal)]
2762    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2763        Self::try_from(value.into())
2764    }
2765}
2766impl From<Number> for String {
2767    fn from(v: Number) -> Self {
2768        v.0
2769    }
2770}
2771#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2772pub enum PaymentMethod4Code {
2773    #[serde(rename = "CHK")]
2774    Chk,
2775    #[serde(rename = "TRF")]
2776    Trf,
2777    #[serde(rename = "DD")]
2778    Dd,
2779    #[serde(rename = "TRA")]
2780    Tra,
2781}
2782/// Fraction digits: 10
2783/// Total digits: 11
2784#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2785#[serde(transparent)]
2786pub struct PercentageRate(pub String);
2787impl TryFrom<String> for PercentageRate {
2788    type Error = crate::common::validate::ConstraintError;
2789    #[allow(clippy::unreadable_literal)]
2790    fn try_from(value: String) -> Result<Self, Self::Error> {
2791        {
2792            let value: &str = &value;
2793            {
2794                let frac_count = value.find('.').map_or(0, |dot| {
2795                    value[dot + 1..]
2796                        .chars()
2797                        .filter(char::is_ascii_digit)
2798                        .count()
2799                });
2800                let violated = frac_count > 10usize;
2801                if violated {
2802                    return Err(crate::common::validate::ConstraintError {
2803                        kind: crate::common::validate::ConstraintKind::FractionDigits,
2804                        message: format!(
2805                            "{} (got {})",
2806                            "value exceeds maximum fraction digits 10", frac_count
2807                        ),
2808                    });
2809                }
2810            }
2811            {
2812                let digit_count = value.chars().filter(char::is_ascii_digit).count();
2813                let violated = digit_count > 11usize;
2814                if violated {
2815                    return Err(crate::common::validate::ConstraintError {
2816                        kind: crate::common::validate::ConstraintKind::TotalDigits,
2817                        message: format!(
2818                            "{} (got {})",
2819                            "value exceeds maximum total digits 11", digit_count
2820                        ),
2821                    });
2822                }
2823            }
2824        }
2825        Ok(Self(value))
2826    }
2827}
2828impl PercentageRate {
2829    /// Construct a validated instance, checking all XSD constraints.
2830    #[allow(clippy::unreadable_literal)]
2831    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2832        Self::try_from(value.into())
2833    }
2834}
2835impl From<PercentageRate> for String {
2836    fn from(v: PercentageRate) -> Self {
2837        v.0
2838    }
2839}
2840/// Pattern: `\+[0-9]{1,3}-[0-9()+\-]{1,30}`
2841#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2842#[serde(transparent)]
2843pub struct PhoneNumber(pub String);
2844impl TryFrom<String> for PhoneNumber {
2845    type Error = crate::common::validate::ConstraintError;
2846    #[allow(clippy::unreadable_literal)]
2847    fn try_from(value: String) -> Result<Self, Self::Error> {
2848        {
2849            let value: &str = &value;
2850            {
2851                let violated = {
2852                    let bytes = value.as_bytes();
2853                    let len = bytes.len();
2854                    let result: bool = (|| -> bool {
2855                        let mut pos: usize = 0;
2856                        if !(4usize..=35usize).contains(&len) {
2857                            return true;
2858                        }
2859                        if pos >= len || bytes[pos] != 43u8 {
2860                            return true;
2861                        }
2862                        pos += 1;
2863                        {
2864                            let start = pos;
2865                            let limit = if pos + 3usize < len {
2866                                pos + 3usize
2867                            } else {
2868                                len
2869                            };
2870                            while pos < limit {
2871                                let b = bytes[pos];
2872                                if !(48u8..=57u8).contains(&b) {
2873                                    break;
2874                                }
2875                                pos += 1;
2876                            }
2877                            let matched = pos - start;
2878                            if matched < 1usize {
2879                                return true;
2880                            }
2881                        }
2882                        if pos >= len || bytes[pos] != 45u8 {
2883                            return true;
2884                        }
2885                        pos += 1;
2886                        {
2887                            let start = pos;
2888                            let limit = if pos + 30usize < len {
2889                                pos + 30usize
2890                            } else {
2891                                len
2892                            };
2893                            while pos < limit {
2894                                let b = bytes[pos];
2895                                if !(48u8..=57u8).contains(&b)
2896                                    && b != 40u8
2897                                    && b != 41u8
2898                                    && b != 43u8
2899                                    && b != 45u8
2900                                {
2901                                    break;
2902                                }
2903                                pos += 1;
2904                            }
2905                            let matched = pos - start;
2906                            if matched < 1usize {
2907                                return true;
2908                            }
2909                        }
2910                        if pos != len {
2911                            return true;
2912                        }
2913                        false
2914                    })();
2915                    result
2916                };
2917                if violated {
2918                    return Err(crate::common::validate::ConstraintError {
2919                        kind: crate::common::validate::ConstraintKind::Pattern,
2920                        message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
2921                            .to_string(),
2922                    });
2923                }
2924            }
2925        }
2926        Ok(Self(value))
2927    }
2928}
2929impl PhoneNumber {
2930    /// Construct a validated instance, checking all XSD constraints.
2931    #[allow(clippy::unreadable_literal)]
2932    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2933        Self::try_from(value.into())
2934    }
2935}
2936impl From<PhoneNumber> for String {
2937    fn from(v: PhoneNumber) -> Self {
2938        v.0
2939    }
2940}
2941#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2942pub enum PreferredContactMethod1Code {
2943    #[serde(rename = "LETT")]
2944    Lett,
2945    #[serde(rename = "MAIL")]
2946    Mail,
2947    #[serde(rename = "PHON")]
2948    Phon,
2949    #[serde(rename = "FAXX")]
2950    Faxx,
2951    #[serde(rename = "CELL")]
2952    Cell,
2953}
2954#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2955pub enum Priority2Code {
2956    #[serde(rename = "HIGH")]
2957    High,
2958    #[serde(rename = "NORM")]
2959    Norm,
2960}
2961#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2962pub enum Priority3Code {
2963    #[serde(rename = "URGT")]
2964    Urgt,
2965    #[serde(rename = "HIGH")]
2966    High,
2967    #[serde(rename = "NORM")]
2968    Norm,
2969}
2970#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2971pub enum SequenceType3Code {
2972    #[serde(rename = "FRST")]
2973    Frst,
2974    #[serde(rename = "RCUR")]
2975    Rcur,
2976    #[serde(rename = "FNAL")]
2977    Fnal,
2978    #[serde(rename = "OOFF")]
2979    Ooff,
2980    #[serde(rename = "RPRE")]
2981    Rpre,
2982}
2983#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2984pub enum SettlementMethod1Code {
2985    #[serde(rename = "INDA")]
2986    Inda,
2987    #[serde(rename = "INGA")]
2988    Inga,
2989    #[serde(rename = "COVE")]
2990    Cove,
2991    #[serde(rename = "CLRG")]
2992    Clrg,
2993}
2994#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2995pub enum TaxRecordPeriod1Code {
2996    #[serde(rename = "MM01")]
2997    Mm01,
2998    #[serde(rename = "MM02")]
2999    Mm02,
3000    #[serde(rename = "MM03")]
3001    Mm03,
3002    #[serde(rename = "MM04")]
3003    Mm04,
3004    #[serde(rename = "MM05")]
3005    Mm05,
3006    #[serde(rename = "MM06")]
3007    Mm06,
3008    #[serde(rename = "MM07")]
3009    Mm07,
3010    #[serde(rename = "MM08")]
3011    Mm08,
3012    #[serde(rename = "MM09")]
3013    Mm09,
3014    #[serde(rename = "MM10")]
3015    Mm10,
3016    #[serde(rename = "MM11")]
3017    Mm11,
3018    #[serde(rename = "MM12")]
3019    Mm12,
3020    #[serde(rename = "QTR1")]
3021    Qtr1,
3022    #[serde(rename = "QTR2")]
3023    Qtr2,
3024    #[serde(rename = "QTR3")]
3025    Qtr3,
3026    #[serde(rename = "QTR4")]
3027    Qtr4,
3028    #[serde(rename = "HLF1")]
3029    Hlf1,
3030    #[serde(rename = "HLF2")]
3031    Hlf2,
3032}
3033#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3034#[serde(transparent)]
3035pub struct TrueFalseIndicator(pub bool);
3036/// Pattern: `[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}`
3037#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3038#[serde(transparent)]
3039pub struct UUIDv4Identifier(pub String);
3040impl TryFrom<String> for UUIDv4Identifier {
3041    type Error = crate::common::validate::ConstraintError;
3042    #[allow(clippy::unreadable_literal)]
3043    fn try_from(value: String) -> Result<Self, Self::Error> {
3044        {
3045            let value: &str = &value;
3046            {
3047                let violated = {
3048                    let bytes = value.as_bytes();
3049                    bytes.len() != 36usize
3050                        || ({
3051                            let b = bytes[0usize];
3052                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3053                        })
3054                        || ({
3055                            let b = bytes[1usize];
3056                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3057                        })
3058                        || ({
3059                            let b = bytes[2usize];
3060                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3061                        })
3062                        || ({
3063                            let b = bytes[3usize];
3064                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3065                        })
3066                        || ({
3067                            let b = bytes[4usize];
3068                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3069                        })
3070                        || ({
3071                            let b = bytes[5usize];
3072                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3073                        })
3074                        || ({
3075                            let b = bytes[6usize];
3076                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3077                        })
3078                        || ({
3079                            let b = bytes[7usize];
3080                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3081                        })
3082                        || bytes[8usize] != 45u8
3083                        || ({
3084                            let b = bytes[9usize];
3085                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3086                        })
3087                        || ({
3088                            let b = bytes[10usize];
3089                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3090                        })
3091                        || ({
3092                            let b = bytes[11usize];
3093                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3094                        })
3095                        || ({
3096                            let b = bytes[12usize];
3097                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3098                        })
3099                        || bytes[13usize] != 45u8
3100                        || bytes[14usize] != 52u8
3101                        || ({
3102                            let b = bytes[15usize];
3103                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3104                        })
3105                        || ({
3106                            let b = bytes[16usize];
3107                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3108                        })
3109                        || ({
3110                            let b = bytes[17usize];
3111                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3112                        })
3113                        || bytes[18usize] != 45u8
3114                        || ({
3115                            let b = bytes[19usize];
3116                            b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
3117                        })
3118                        || ({
3119                            let b = bytes[20usize];
3120                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3121                        })
3122                        || ({
3123                            let b = bytes[21usize];
3124                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3125                        })
3126                        || ({
3127                            let b = bytes[22usize];
3128                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3129                        })
3130                        || bytes[23usize] != 45u8
3131                        || ({
3132                            let b = bytes[24usize];
3133                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3134                        })
3135                        || ({
3136                            let b = bytes[25usize];
3137                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3138                        })
3139                        || ({
3140                            let b = bytes[26usize];
3141                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3142                        })
3143                        || ({
3144                            let b = bytes[27usize];
3145                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3146                        })
3147                        || ({
3148                            let b = bytes[28usize];
3149                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3150                        })
3151                        || ({
3152                            let b = bytes[29usize];
3153                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3154                        })
3155                        || ({
3156                            let b = bytes[30usize];
3157                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3158                        })
3159                        || ({
3160                            let b = bytes[31usize];
3161                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3162                        })
3163                        || ({
3164                            let b = bytes[32usize];
3165                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3166                        })
3167                        || ({
3168                            let b = bytes[33usize];
3169                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3170                        })
3171                        || ({
3172                            let b = bytes[34usize];
3173                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3174                        })
3175                        || ({
3176                            let b = bytes[35usize];
3177                            !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3178                        })
3179                };
3180                if violated {
3181                    return Err(crate::common::validate::ConstraintError {
3182                        kind: crate::common::validate::ConstraintKind::Pattern,
3183                        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}"
3184                            .to_string(),
3185                    });
3186                }
3187            }
3188        }
3189        Ok(Self(value))
3190    }
3191}
3192impl UUIDv4Identifier {
3193    /// Construct a validated instance, checking all XSD constraints.
3194    #[allow(clippy::unreadable_literal)]
3195    pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
3196        Self::try_from(value.into())
3197    }
3198}
3199impl From<UUIDv4Identifier> for String {
3200    fn from(v: UUIDv4Identifier) -> Self {
3201        v.0
3202    }
3203}
3204#[allow(clippy::large_enum_variant)]
3205#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3206pub enum AccountIdentification4Choice {
3207    #[serde(rename = "IBAN")]
3208    IBAN(IBAN2007Identifier),
3209    #[serde(rename = "Othr")]
3210    Othr(GenericAccountIdentification1),
3211}
3212#[allow(clippy::large_enum_variant)]
3213#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3214pub enum AccountSchemeName1Choice {
3215    #[serde(rename = "Cd")]
3216    Cd(ExternalAccountIdentification1Code),
3217    #[serde(rename = "Prtry")]
3218    Prtry(Max35Text),
3219}
3220#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3221pub struct ActiveCurrencyAndAmount {
3222    #[serde(rename = "$value")]
3223    pub value: ActiveCurrencyAndAmountSimpleType,
3224    #[serde(rename = "@Ccy")]
3225    pub ccy: ActiveCurrencyCode,
3226}
3227#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3228pub struct ActiveOrHistoricCurrencyAndAmount {
3229    #[serde(rename = "$value")]
3230    pub value: ActiveOrHistoricCurrencyAndAmountSimpleType,
3231    #[serde(rename = "@Ccy")]
3232    pub ccy: ActiveOrHistoricCurrencyCode,
3233}
3234#[allow(clippy::large_enum_variant)]
3235#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3236pub enum AddressType3Choice {
3237    #[serde(rename = "Cd")]
3238    Cd(AddressType2Code),
3239    #[serde(rename = "Prtry")]
3240    Prtry(GenericIdentification30),
3241}
3242#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3243pub struct AmendmentInformationDetails14 {
3244    #[serde(rename = "OrgnlMndtId")]
3245    #[serde(skip_serializing_if = "Option::is_none")]
3246    pub orgnl_mndt_id: Option<Max35Text>,
3247    #[serde(rename = "OrgnlCdtrSchmeId")]
3248    #[serde(skip_serializing_if = "Option::is_none")]
3249    pub orgnl_cdtr_schme_id: Option<PartyIdentification135>,
3250    #[serde(rename = "OrgnlCdtrAgt")]
3251    #[serde(skip_serializing_if = "Option::is_none")]
3252    pub orgnl_cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
3253    #[serde(rename = "OrgnlCdtrAgtAcct")]
3254    #[serde(skip_serializing_if = "Option::is_none")]
3255    pub orgnl_cdtr_agt_acct: Option<CashAccount40>,
3256    #[serde(rename = "OrgnlDbtr")]
3257    #[serde(skip_serializing_if = "Option::is_none")]
3258    pub orgnl_dbtr: Option<PartyIdentification135>,
3259    #[serde(rename = "OrgnlDbtrAcct")]
3260    #[serde(skip_serializing_if = "Option::is_none")]
3261    pub orgnl_dbtr_acct: Option<CashAccount40>,
3262    #[serde(rename = "OrgnlDbtrAgt")]
3263    #[serde(skip_serializing_if = "Option::is_none")]
3264    pub orgnl_dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
3265    #[serde(rename = "OrgnlDbtrAgtAcct")]
3266    #[serde(skip_serializing_if = "Option::is_none")]
3267    pub orgnl_dbtr_agt_acct: Option<CashAccount40>,
3268    #[serde(rename = "OrgnlFnlColltnDt")]
3269    #[serde(skip_serializing_if = "Option::is_none")]
3270    pub orgnl_fnl_colltn_dt: Option<ISODate>,
3271    #[serde(rename = "OrgnlFrqcy")]
3272    #[serde(skip_serializing_if = "Option::is_none")]
3273    pub orgnl_frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
3274    #[serde(rename = "OrgnlRsn")]
3275    #[serde(skip_serializing_if = "Option::is_none")]
3276    pub orgnl_rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
3277    #[serde(rename = "OrgnlTrckgDays")]
3278    #[serde(skip_serializing_if = "Option::is_none")]
3279    pub orgnl_trckg_days: Option<Exact2NumericText>,
3280}
3281/// Builder for [`AmendmentInformationDetails14`]. Construct via [`AmendmentInformationDetails14::builder()`].
3282#[allow(clippy::struct_field_names)]
3283#[derive(Default)]
3284pub struct AmendmentInformationDetails14Builder {
3285    orgnl_mndt_id: ::std::option::Option<Max35Text>,
3286    orgnl_cdtr_schme_id: ::std::option::Option<PartyIdentification135>,
3287    orgnl_cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3288    orgnl_cdtr_agt_acct: ::std::option::Option<CashAccount40>,
3289    orgnl_dbtr: ::std::option::Option<PartyIdentification135>,
3290    orgnl_dbtr_acct: ::std::option::Option<CashAccount40>,
3291    orgnl_dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3292    orgnl_dbtr_agt_acct: ::std::option::Option<CashAccount40>,
3293    orgnl_fnl_colltn_dt: ::std::option::Option<ISODate>,
3294    orgnl_frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
3295    orgnl_rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
3296    orgnl_trckg_days: ::std::option::Option<Exact2NumericText>,
3297}
3298impl AmendmentInformationDetails14Builder {
3299    /// Set the `orgnl_mndt_id` field.
3300    #[must_use]
3301    pub fn orgnl_mndt_id(mut self, value: Max35Text) -> AmendmentInformationDetails14Builder {
3302        self.orgnl_mndt_id = ::std::option::Option::Some(value);
3303        self
3304    }
3305    /// Set the `orgnl_cdtr_schme_id` field.
3306    #[must_use]
3307    pub fn orgnl_cdtr_schme_id(
3308        mut self,
3309        value: PartyIdentification135,
3310    ) -> AmendmentInformationDetails14Builder {
3311        self.orgnl_cdtr_schme_id = ::std::option::Option::Some(value);
3312        self
3313    }
3314    /// Set the `orgnl_cdtr_agt` field.
3315    #[must_use]
3316    pub fn orgnl_cdtr_agt(
3317        mut self,
3318        value: BranchAndFinancialInstitutionIdentification6,
3319    ) -> AmendmentInformationDetails14Builder {
3320        self.orgnl_cdtr_agt = ::std::option::Option::Some(value);
3321        self
3322    }
3323    /// Set the `orgnl_cdtr_agt_acct` field.
3324    #[must_use]
3325    pub fn orgnl_cdtr_agt_acct(
3326        mut self,
3327        value: CashAccount40,
3328    ) -> AmendmentInformationDetails14Builder {
3329        self.orgnl_cdtr_agt_acct = ::std::option::Option::Some(value);
3330        self
3331    }
3332    /// Set the `orgnl_dbtr` field.
3333    #[must_use]
3334    pub fn orgnl_dbtr(
3335        mut self,
3336        value: PartyIdentification135,
3337    ) -> AmendmentInformationDetails14Builder {
3338        self.orgnl_dbtr = ::std::option::Option::Some(value);
3339        self
3340    }
3341    /// Set the `orgnl_dbtr_acct` field.
3342    #[must_use]
3343    pub fn orgnl_dbtr_acct(mut self, value: CashAccount40) -> AmendmentInformationDetails14Builder {
3344        self.orgnl_dbtr_acct = ::std::option::Option::Some(value);
3345        self
3346    }
3347    /// Set the `orgnl_dbtr_agt` field.
3348    #[must_use]
3349    pub fn orgnl_dbtr_agt(
3350        mut self,
3351        value: BranchAndFinancialInstitutionIdentification6,
3352    ) -> AmendmentInformationDetails14Builder {
3353        self.orgnl_dbtr_agt = ::std::option::Option::Some(value);
3354        self
3355    }
3356    /// Set the `orgnl_dbtr_agt_acct` field.
3357    #[must_use]
3358    pub fn orgnl_dbtr_agt_acct(
3359        mut self,
3360        value: CashAccount40,
3361    ) -> AmendmentInformationDetails14Builder {
3362        self.orgnl_dbtr_agt_acct = ::std::option::Option::Some(value);
3363        self
3364    }
3365    /// Set the `orgnl_fnl_colltn_dt` field.
3366    #[must_use]
3367    pub fn orgnl_fnl_colltn_dt(mut self, value: ISODate) -> AmendmentInformationDetails14Builder {
3368        self.orgnl_fnl_colltn_dt = ::std::option::Option::Some(value);
3369        self
3370    }
3371    /// Set the `orgnl_frqcy` field.
3372    #[must_use]
3373    pub fn orgnl_frqcy(
3374        mut self,
3375        value: crate::common::ChoiceWrapper<Frequency36Choice>,
3376    ) -> AmendmentInformationDetails14Builder {
3377        self.orgnl_frqcy = ::std::option::Option::Some(value);
3378        self
3379    }
3380    /// Set the `orgnl_rsn` field.
3381    #[must_use]
3382    pub fn orgnl_rsn(
3383        mut self,
3384        value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
3385    ) -> AmendmentInformationDetails14Builder {
3386        self.orgnl_rsn = ::std::option::Option::Some(value);
3387        self
3388    }
3389    /// Set the `orgnl_trckg_days` field.
3390    #[must_use]
3391    pub fn orgnl_trckg_days(
3392        mut self,
3393        value: Exact2NumericText,
3394    ) -> AmendmentInformationDetails14Builder {
3395        self.orgnl_trckg_days = ::std::option::Option::Some(value);
3396        self
3397    }
3398    /// Validate required fields and construct the type.
3399    ///
3400    /// # Errors
3401    ///
3402    /// Returns [`crate::common::BuilderError`] listing the names of any
3403    /// required fields that were not set.
3404    ///
3405    /// # Panics
3406    ///
3407    /// Does not panic — all `.unwrap()` calls are guarded by the
3408    /// missing-field check above.
3409    pub fn build(
3410        self,
3411    ) -> ::std::result::Result<AmendmentInformationDetails14, crate::common::BuilderError> {
3412        ::std::result::Result::Ok(AmendmentInformationDetails14 {
3413            orgnl_mndt_id: self.orgnl_mndt_id,
3414            orgnl_cdtr_schme_id: self.orgnl_cdtr_schme_id,
3415            orgnl_cdtr_agt: self.orgnl_cdtr_agt,
3416            orgnl_cdtr_agt_acct: self.orgnl_cdtr_agt_acct,
3417            orgnl_dbtr: self.orgnl_dbtr,
3418            orgnl_dbtr_acct: self.orgnl_dbtr_acct,
3419            orgnl_dbtr_agt: self.orgnl_dbtr_agt,
3420            orgnl_dbtr_agt_acct: self.orgnl_dbtr_agt_acct,
3421            orgnl_fnl_colltn_dt: self.orgnl_fnl_colltn_dt,
3422            orgnl_frqcy: self.orgnl_frqcy,
3423            orgnl_rsn: self.orgnl_rsn,
3424            orgnl_trckg_days: self.orgnl_trckg_days,
3425        })
3426    }
3427}
3428impl AmendmentInformationDetails14 {
3429    /// Return a new builder for this type.
3430    #[must_use]
3431    pub fn builder() -> AmendmentInformationDetails14Builder {
3432        AmendmentInformationDetails14Builder::default()
3433    }
3434}
3435#[allow(clippy::large_enum_variant)]
3436#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3437pub enum AmountType4Choice {
3438    #[serde(rename = "InstdAmt")]
3439    InstdAmt(ActiveOrHistoricCurrencyAndAmount),
3440    #[serde(rename = "EqvtAmt")]
3441    EqvtAmt(EquivalentAmount2),
3442}
3443#[allow(clippy::large_enum_variant)]
3444#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3445pub enum Authorisation1Choice {
3446    #[serde(rename = "Cd")]
3447    Cd(Authorisation1Code),
3448    #[serde(rename = "Prtry")]
3449    Prtry(Max128Text),
3450}
3451#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3452pub struct BranchAndFinancialInstitutionIdentification6 {
3453    #[serde(rename = "FinInstnId")]
3454    pub fin_instn_id: FinancialInstitutionIdentification18,
3455    #[serde(rename = "BrnchId")]
3456    #[serde(skip_serializing_if = "Option::is_none")]
3457    pub brnch_id: Option<BranchData3>,
3458}
3459/// Builder for [`BranchAndFinancialInstitutionIdentification6`]. Construct via [`BranchAndFinancialInstitutionIdentification6::builder()`].
3460#[allow(clippy::struct_field_names)]
3461#[derive(Default)]
3462pub struct BranchAndFinancialInstitutionIdentification6Builder {
3463    fin_instn_id: ::std::option::Option<FinancialInstitutionIdentification18>,
3464    brnch_id: ::std::option::Option<BranchData3>,
3465}
3466impl BranchAndFinancialInstitutionIdentification6Builder {
3467    /// Set the `fin_instn_id` field.
3468    #[must_use]
3469    pub fn fin_instn_id(
3470        mut self,
3471        value: FinancialInstitutionIdentification18,
3472    ) -> BranchAndFinancialInstitutionIdentification6Builder {
3473        self.fin_instn_id = ::std::option::Option::Some(value);
3474        self
3475    }
3476    /// Set the `brnch_id` field.
3477    #[must_use]
3478    pub fn brnch_id(
3479        mut self,
3480        value: BranchData3,
3481    ) -> BranchAndFinancialInstitutionIdentification6Builder {
3482        self.brnch_id = ::std::option::Option::Some(value);
3483        self
3484    }
3485    /// Validate required fields and construct the type.
3486    ///
3487    /// # Errors
3488    ///
3489    /// Returns [`crate::common::BuilderError`] listing the names of any
3490    /// required fields that were not set.
3491    ///
3492    /// # Panics
3493    ///
3494    /// Does not panic — all `.unwrap()` calls are guarded by the
3495    /// missing-field check above.
3496    pub fn build(
3497        self,
3498    ) -> ::std::result::Result<
3499        BranchAndFinancialInstitutionIdentification6,
3500        crate::common::BuilderError,
3501    > {
3502        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3503        if self.fin_instn_id.is_none() {
3504            missing.push("fin_instn_id".to_owned());
3505        }
3506        if !missing.is_empty() {
3507            return ::std::result::Result::Err(crate::common::BuilderError {
3508                type_name: "BranchAndFinancialInstitutionIdentification6".to_owned(),
3509                missing_fields: missing,
3510            });
3511        }
3512        ::std::result::Result::Ok(BranchAndFinancialInstitutionIdentification6 {
3513            fin_instn_id: self.fin_instn_id.unwrap(),
3514            brnch_id: self.brnch_id,
3515        })
3516    }
3517}
3518impl BranchAndFinancialInstitutionIdentification6 {
3519    /// Return a new builder for this type.
3520    #[must_use]
3521    pub fn builder() -> BranchAndFinancialInstitutionIdentification6Builder {
3522        BranchAndFinancialInstitutionIdentification6Builder::default()
3523    }
3524}
3525#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3526pub struct BranchData3 {
3527    #[serde(rename = "Id")]
3528    #[serde(skip_serializing_if = "Option::is_none")]
3529    pub id: Option<Max35Text>,
3530    #[serde(rename = "LEI")]
3531    #[serde(skip_serializing_if = "Option::is_none")]
3532    pub lei: Option<LEIIdentifier>,
3533    #[serde(rename = "Nm")]
3534    #[serde(skip_serializing_if = "Option::is_none")]
3535    pub nm: Option<Max140Text>,
3536    #[serde(rename = "PstlAdr")]
3537    #[serde(skip_serializing_if = "Option::is_none")]
3538    pub pstl_adr: Option<PostalAddress24>,
3539}
3540/// Builder for [`BranchData3`]. Construct via [`BranchData3::builder()`].
3541#[allow(clippy::struct_field_names)]
3542#[derive(Default)]
3543pub struct BranchData3Builder {
3544    id: ::std::option::Option<Max35Text>,
3545    lei: ::std::option::Option<LEIIdentifier>,
3546    nm: ::std::option::Option<Max140Text>,
3547    pstl_adr: ::std::option::Option<PostalAddress24>,
3548}
3549impl BranchData3Builder {
3550    /// Set the `id` field.
3551    #[must_use]
3552    pub fn id(mut self, value: Max35Text) -> BranchData3Builder {
3553        self.id = ::std::option::Option::Some(value);
3554        self
3555    }
3556    /// Set the `lei` field.
3557    #[must_use]
3558    pub fn lei(mut self, value: LEIIdentifier) -> BranchData3Builder {
3559        self.lei = ::std::option::Option::Some(value);
3560        self
3561    }
3562    /// Set the `nm` field.
3563    #[must_use]
3564    pub fn nm(mut self, value: Max140Text) -> BranchData3Builder {
3565        self.nm = ::std::option::Option::Some(value);
3566        self
3567    }
3568    /// Set the `pstl_adr` field.
3569    #[must_use]
3570    pub fn pstl_adr(mut self, value: PostalAddress24) -> BranchData3Builder {
3571        self.pstl_adr = ::std::option::Option::Some(value);
3572        self
3573    }
3574    /// Validate required fields and construct the type.
3575    ///
3576    /// # Errors
3577    ///
3578    /// Returns [`crate::common::BuilderError`] listing the names of any
3579    /// required fields that were not set.
3580    ///
3581    /// # Panics
3582    ///
3583    /// Does not panic — all `.unwrap()` calls are guarded by the
3584    /// missing-field check above.
3585    pub fn build(self) -> ::std::result::Result<BranchData3, crate::common::BuilderError> {
3586        ::std::result::Result::Ok(BranchData3 {
3587            id: self.id,
3588            lei: self.lei,
3589            nm: self.nm,
3590            pstl_adr: self.pstl_adr,
3591        })
3592    }
3593}
3594impl BranchData3 {
3595    /// Return a new builder for this type.
3596    #[must_use]
3597    pub fn builder() -> BranchData3Builder {
3598        BranchData3Builder::default()
3599    }
3600}
3601#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3602pub struct CashAccount40 {
3603    #[serde(rename = "Id")]
3604    #[serde(skip_serializing_if = "Option::is_none")]
3605    pub id: Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3606    #[serde(rename = "Tp")]
3607    #[serde(skip_serializing_if = "Option::is_none")]
3608    pub tp: Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3609    #[serde(rename = "Ccy")]
3610    #[serde(skip_serializing_if = "Option::is_none")]
3611    pub ccy: Option<ActiveOrHistoricCurrencyCode>,
3612    #[serde(rename = "Nm")]
3613    #[serde(skip_serializing_if = "Option::is_none")]
3614    pub nm: Option<Max70Text>,
3615    #[serde(rename = "Prxy")]
3616    #[serde(skip_serializing_if = "Option::is_none")]
3617    pub prxy: Option<ProxyAccountIdentification1>,
3618}
3619/// Builder for [`CashAccount40`]. Construct via [`CashAccount40::builder()`].
3620#[allow(clippy::struct_field_names)]
3621#[derive(Default)]
3622pub struct CashAccount40Builder {
3623    id: ::std::option::Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3624    tp: ::std::option::Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3625    ccy: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
3626    nm: ::std::option::Option<Max70Text>,
3627    prxy: ::std::option::Option<ProxyAccountIdentification1>,
3628}
3629impl CashAccount40Builder {
3630    /// Set the `id` field.
3631    #[must_use]
3632    pub fn id(
3633        mut self,
3634        value: crate::common::ChoiceWrapper<AccountIdentification4Choice>,
3635    ) -> CashAccount40Builder {
3636        self.id = ::std::option::Option::Some(value);
3637        self
3638    }
3639    /// Set the `tp` field.
3640    #[must_use]
3641    pub fn tp(
3642        mut self,
3643        value: crate::common::ChoiceWrapper<CashAccountType2Choice>,
3644    ) -> CashAccount40Builder {
3645        self.tp = ::std::option::Option::Some(value);
3646        self
3647    }
3648    /// Set the `ccy` field.
3649    #[must_use]
3650    pub fn ccy(mut self, value: ActiveOrHistoricCurrencyCode) -> CashAccount40Builder {
3651        self.ccy = ::std::option::Option::Some(value);
3652        self
3653    }
3654    /// Set the `nm` field.
3655    #[must_use]
3656    pub fn nm(mut self, value: Max70Text) -> CashAccount40Builder {
3657        self.nm = ::std::option::Option::Some(value);
3658        self
3659    }
3660    /// Set the `prxy` field.
3661    #[must_use]
3662    pub fn prxy(mut self, value: ProxyAccountIdentification1) -> CashAccount40Builder {
3663        self.prxy = ::std::option::Option::Some(value);
3664        self
3665    }
3666    /// Validate required fields and construct the type.
3667    ///
3668    /// # Errors
3669    ///
3670    /// Returns [`crate::common::BuilderError`] listing the names of any
3671    /// required fields that were not set.
3672    ///
3673    /// # Panics
3674    ///
3675    /// Does not panic — all `.unwrap()` calls are guarded by the
3676    /// missing-field check above.
3677    pub fn build(self) -> ::std::result::Result<CashAccount40, crate::common::BuilderError> {
3678        ::std::result::Result::Ok(CashAccount40 {
3679            id: self.id,
3680            tp: self.tp,
3681            ccy: self.ccy,
3682            nm: self.nm,
3683            prxy: self.prxy,
3684        })
3685    }
3686}
3687impl CashAccount40 {
3688    /// Return a new builder for this type.
3689    #[must_use]
3690    pub fn builder() -> CashAccount40Builder {
3691        CashAccount40Builder::default()
3692    }
3693}
3694#[allow(clippy::large_enum_variant)]
3695#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3696pub enum CashAccountType2Choice {
3697    #[serde(rename = "Cd")]
3698    Cd(ExternalCashAccountType1Code),
3699    #[serde(rename = "Prtry")]
3700    Prtry(Max35Text),
3701}
3702#[allow(clippy::large_enum_variant)]
3703#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3704pub enum CategoryPurpose1Choice {
3705    #[serde(rename = "Cd")]
3706    Cd(ExternalCategoryPurpose1Code),
3707    #[serde(rename = "Prtry")]
3708    Prtry(Max35Text),
3709}
3710#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3711pub struct Charges7 {
3712    #[serde(rename = "Amt")]
3713    pub amt: ActiveOrHistoricCurrencyAndAmount,
3714    #[serde(rename = "Agt")]
3715    pub agt: BranchAndFinancialInstitutionIdentification6,
3716}
3717/// Builder for [`Charges7`]. Construct via [`Charges7::builder()`].
3718#[allow(clippy::struct_field_names)]
3719#[derive(Default)]
3720pub struct Charges7Builder {
3721    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
3722    agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
3723}
3724impl Charges7Builder {
3725    /// Set the `amt` field.
3726    #[must_use]
3727    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Charges7Builder {
3728        self.amt = ::std::option::Option::Some(value);
3729        self
3730    }
3731    /// Set the `agt` field.
3732    #[must_use]
3733    pub fn agt(mut self, value: BranchAndFinancialInstitutionIdentification6) -> Charges7Builder {
3734        self.agt = ::std::option::Option::Some(value);
3735        self
3736    }
3737    /// Validate required fields and construct the type.
3738    ///
3739    /// # Errors
3740    ///
3741    /// Returns [`crate::common::BuilderError`] listing the names of any
3742    /// required fields that were not set.
3743    ///
3744    /// # Panics
3745    ///
3746    /// Does not panic — all `.unwrap()` calls are guarded by the
3747    /// missing-field check above.
3748    pub fn build(self) -> ::std::result::Result<Charges7, crate::common::BuilderError> {
3749        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3750        if self.amt.is_none() {
3751            missing.push("amt".to_owned());
3752        }
3753        if self.agt.is_none() {
3754            missing.push("agt".to_owned());
3755        }
3756        if !missing.is_empty() {
3757            return ::std::result::Result::Err(crate::common::BuilderError {
3758                type_name: "Charges7".to_owned(),
3759                missing_fields: missing,
3760            });
3761        }
3762        ::std::result::Result::Ok(Charges7 {
3763            amt: self.amt.unwrap(),
3764            agt: self.agt.unwrap(),
3765        })
3766    }
3767}
3768impl Charges7 {
3769    /// Return a new builder for this type.
3770    #[must_use]
3771    pub fn builder() -> Charges7Builder {
3772        Charges7Builder::default()
3773    }
3774}
3775#[allow(clippy::large_enum_variant)]
3776#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3777pub enum ClearingSystemIdentification2Choice {
3778    #[serde(rename = "Cd")]
3779    Cd(ExternalClearingSystemIdentification1Code),
3780    #[serde(rename = "Prtry")]
3781    Prtry(Max35Text),
3782}
3783#[allow(clippy::large_enum_variant)]
3784#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3785pub enum ClearingSystemIdentification3Choice {
3786    #[serde(rename = "Cd")]
3787    Cd(ExternalCashClearingSystem1Code),
3788    #[serde(rename = "Prtry")]
3789    Prtry(Max35Text),
3790}
3791#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3792pub struct ClearingSystemMemberIdentification2 {
3793    #[serde(rename = "ClrSysId")]
3794    #[serde(skip_serializing_if = "Option::is_none")]
3795    pub clr_sys_id: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3796    #[serde(rename = "MmbId")]
3797    pub mmb_id: Max35Text,
3798}
3799/// Builder for [`ClearingSystemMemberIdentification2`]. Construct via [`ClearingSystemMemberIdentification2::builder()`].
3800#[allow(clippy::struct_field_names)]
3801#[derive(Default)]
3802pub struct ClearingSystemMemberIdentification2Builder {
3803    clr_sys_id:
3804        ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3805    mmb_id: ::std::option::Option<Max35Text>,
3806}
3807impl ClearingSystemMemberIdentification2Builder {
3808    /// Set the `clr_sys_id` field.
3809    #[must_use]
3810    pub fn clr_sys_id(
3811        mut self,
3812        value: crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>,
3813    ) -> ClearingSystemMemberIdentification2Builder {
3814        self.clr_sys_id = ::std::option::Option::Some(value);
3815        self
3816    }
3817    /// Set the `mmb_id` field.
3818    #[must_use]
3819    pub fn mmb_id(mut self, value: Max35Text) -> ClearingSystemMemberIdentification2Builder {
3820        self.mmb_id = ::std::option::Option::Some(value);
3821        self
3822    }
3823    /// Validate required fields and construct the type.
3824    ///
3825    /// # Errors
3826    ///
3827    /// Returns [`crate::common::BuilderError`] listing the names of any
3828    /// required fields that were not set.
3829    ///
3830    /// # Panics
3831    ///
3832    /// Does not panic — all `.unwrap()` calls are guarded by the
3833    /// missing-field check above.
3834    pub fn build(
3835        self,
3836    ) -> ::std::result::Result<ClearingSystemMemberIdentification2, crate::common::BuilderError>
3837    {
3838        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3839        if self.mmb_id.is_none() {
3840            missing.push("mmb_id".to_owned());
3841        }
3842        if !missing.is_empty() {
3843            return ::std::result::Result::Err(crate::common::BuilderError {
3844                type_name: "ClearingSystemMemberIdentification2".to_owned(),
3845                missing_fields: missing,
3846            });
3847        }
3848        ::std::result::Result::Ok(ClearingSystemMemberIdentification2 {
3849            clr_sys_id: self.clr_sys_id,
3850            mmb_id: self.mmb_id.unwrap(),
3851        })
3852    }
3853}
3854impl ClearingSystemMemberIdentification2 {
3855    /// Return a new builder for this type.
3856    #[must_use]
3857    pub fn builder() -> ClearingSystemMemberIdentification2Builder {
3858        ClearingSystemMemberIdentification2Builder::default()
3859    }
3860}
3861#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3862pub struct Contact4 {
3863    #[serde(rename = "NmPrfx")]
3864    #[serde(skip_serializing_if = "Option::is_none")]
3865    pub nm_prfx: Option<NamePrefix2Code>,
3866    #[serde(rename = "Nm")]
3867    #[serde(skip_serializing_if = "Option::is_none")]
3868    pub nm: Option<Max140Text>,
3869    #[serde(rename = "PhneNb")]
3870    #[serde(skip_serializing_if = "Option::is_none")]
3871    pub phne_nb: Option<PhoneNumber>,
3872    #[serde(rename = "MobNb")]
3873    #[serde(skip_serializing_if = "Option::is_none")]
3874    pub mob_nb: Option<PhoneNumber>,
3875    #[serde(rename = "FaxNb")]
3876    #[serde(skip_serializing_if = "Option::is_none")]
3877    pub fax_nb: Option<PhoneNumber>,
3878    #[serde(rename = "EmailAdr")]
3879    #[serde(skip_serializing_if = "Option::is_none")]
3880    pub email_adr: Option<Max2048Text>,
3881    #[serde(rename = "EmailPurp")]
3882    #[serde(skip_serializing_if = "Option::is_none")]
3883    pub email_purp: Option<Max35Text>,
3884    #[serde(rename = "JobTitl")]
3885    #[serde(skip_serializing_if = "Option::is_none")]
3886    pub job_titl: Option<Max35Text>,
3887    #[serde(rename = "Rspnsblty")]
3888    #[serde(skip_serializing_if = "Option::is_none")]
3889    pub rspnsblty: Option<Max35Text>,
3890    #[serde(rename = "Dept")]
3891    #[serde(skip_serializing_if = "Option::is_none")]
3892    pub dept: Option<Max70Text>,
3893    #[serde(rename = "Othr")]
3894    #[serde(default)]
3895    #[serde(skip_serializing_if = "Vec::is_empty")]
3896    pub othr: Vec<OtherContact1>,
3897    #[serde(rename = "PrefrdMtd")]
3898    #[serde(skip_serializing_if = "Option::is_none")]
3899    pub prefrd_mtd: Option<PreferredContactMethod1Code>,
3900}
3901/// Builder for [`Contact4`]. Construct via [`Contact4::builder()`].
3902#[allow(clippy::struct_field_names)]
3903#[derive(Default)]
3904pub struct Contact4Builder {
3905    nm_prfx: ::std::option::Option<NamePrefix2Code>,
3906    nm: ::std::option::Option<Max140Text>,
3907    phne_nb: ::std::option::Option<PhoneNumber>,
3908    mob_nb: ::std::option::Option<PhoneNumber>,
3909    fax_nb: ::std::option::Option<PhoneNumber>,
3910    email_adr: ::std::option::Option<Max2048Text>,
3911    email_purp: ::std::option::Option<Max35Text>,
3912    job_titl: ::std::option::Option<Max35Text>,
3913    rspnsblty: ::std::option::Option<Max35Text>,
3914    dept: ::std::option::Option<Max70Text>,
3915    othr: ::std::vec::Vec<OtherContact1>,
3916    prefrd_mtd: ::std::option::Option<PreferredContactMethod1Code>,
3917}
3918impl Contact4Builder {
3919    /// Set the `nm_prfx` field.
3920    #[must_use]
3921    pub fn nm_prfx(mut self, value: NamePrefix2Code) -> Contact4Builder {
3922        self.nm_prfx = ::std::option::Option::Some(value);
3923        self
3924    }
3925    /// Set the `nm` field.
3926    #[must_use]
3927    pub fn nm(mut self, value: Max140Text) -> Contact4Builder {
3928        self.nm = ::std::option::Option::Some(value);
3929        self
3930    }
3931    /// Set the `phne_nb` field.
3932    #[must_use]
3933    pub fn phne_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3934        self.phne_nb = ::std::option::Option::Some(value);
3935        self
3936    }
3937    /// Set the `mob_nb` field.
3938    #[must_use]
3939    pub fn mob_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3940        self.mob_nb = ::std::option::Option::Some(value);
3941        self
3942    }
3943    /// Set the `fax_nb` field.
3944    #[must_use]
3945    pub fn fax_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3946        self.fax_nb = ::std::option::Option::Some(value);
3947        self
3948    }
3949    /// Set the `email_adr` field.
3950    #[must_use]
3951    pub fn email_adr(mut self, value: Max2048Text) -> Contact4Builder {
3952        self.email_adr = ::std::option::Option::Some(value);
3953        self
3954    }
3955    /// Set the `email_purp` field.
3956    #[must_use]
3957    pub fn email_purp(mut self, value: Max35Text) -> Contact4Builder {
3958        self.email_purp = ::std::option::Option::Some(value);
3959        self
3960    }
3961    /// Set the `job_titl` field.
3962    #[must_use]
3963    pub fn job_titl(mut self, value: Max35Text) -> Contact4Builder {
3964        self.job_titl = ::std::option::Option::Some(value);
3965        self
3966    }
3967    /// Set the `rspnsblty` field.
3968    #[must_use]
3969    pub fn rspnsblty(mut self, value: Max35Text) -> Contact4Builder {
3970        self.rspnsblty = ::std::option::Option::Some(value);
3971        self
3972    }
3973    /// Set the `dept` field.
3974    #[must_use]
3975    pub fn dept(mut self, value: Max70Text) -> Contact4Builder {
3976        self.dept = ::std::option::Option::Some(value);
3977        self
3978    }
3979    /// Set the `othr` field (replaces any previously added items).
3980    #[must_use]
3981    pub fn othr(mut self, value: ::std::vec::Vec<OtherContact1>) -> Contact4Builder {
3982        self.othr = value;
3983        self
3984    }
3985    /// Append one item to the `othr` field.
3986    #[must_use]
3987    pub fn add_othr(mut self, value: OtherContact1) -> Contact4Builder {
3988        self.othr.push(value);
3989        self
3990    }
3991    /// Set the `prefrd_mtd` field.
3992    #[must_use]
3993    pub fn prefrd_mtd(mut self, value: PreferredContactMethod1Code) -> Contact4Builder {
3994        self.prefrd_mtd = ::std::option::Option::Some(value);
3995        self
3996    }
3997    /// Validate required fields and construct the type.
3998    ///
3999    /// # Errors
4000    ///
4001    /// Returns [`crate::common::BuilderError`] listing the names of any
4002    /// required fields that were not set.
4003    ///
4004    /// # Panics
4005    ///
4006    /// Does not panic — all `.unwrap()` calls are guarded by the
4007    /// missing-field check above.
4008    pub fn build(self) -> ::std::result::Result<Contact4, crate::common::BuilderError> {
4009        ::std::result::Result::Ok(Contact4 {
4010            nm_prfx: self.nm_prfx,
4011            nm: self.nm,
4012            phne_nb: self.phne_nb,
4013            mob_nb: self.mob_nb,
4014            fax_nb: self.fax_nb,
4015            email_adr: self.email_adr,
4016            email_purp: self.email_purp,
4017            job_titl: self.job_titl,
4018            rspnsblty: self.rspnsblty,
4019            dept: self.dept,
4020            othr: self.othr,
4021            prefrd_mtd: self.prefrd_mtd,
4022        })
4023    }
4024}
4025impl Contact4 {
4026    /// Return a new builder for this type.
4027    #[must_use]
4028    pub fn builder() -> Contact4Builder {
4029        Contact4Builder::default()
4030    }
4031}
4032#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4033pub struct CreditTransferMandateData1 {
4034    #[serde(rename = "MndtId")]
4035    #[serde(skip_serializing_if = "Option::is_none")]
4036    pub mndt_id: Option<Max35Text>,
4037    #[serde(rename = "Tp")]
4038    #[serde(skip_serializing_if = "Option::is_none")]
4039    pub tp: Option<MandateTypeInformation2>,
4040    #[serde(rename = "DtOfSgntr")]
4041    #[serde(skip_serializing_if = "Option::is_none")]
4042    pub dt_of_sgntr: Option<ISODate>,
4043    #[serde(rename = "DtOfVrfctn")]
4044    #[serde(skip_serializing_if = "Option::is_none")]
4045    pub dt_of_vrfctn: Option<ISODateTime>,
4046    #[serde(rename = "ElctrncSgntr")]
4047    #[serde(skip_serializing_if = "Option::is_none")]
4048    pub elctrnc_sgntr: Option<Max10KBinary>,
4049    #[serde(rename = "FrstPmtDt")]
4050    #[serde(skip_serializing_if = "Option::is_none")]
4051    pub frst_pmt_dt: Option<ISODate>,
4052    #[serde(rename = "FnlPmtDt")]
4053    #[serde(skip_serializing_if = "Option::is_none")]
4054    pub fnl_pmt_dt: Option<ISODate>,
4055    #[serde(rename = "Frqcy")]
4056    #[serde(skip_serializing_if = "Option::is_none")]
4057    pub frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
4058    #[serde(rename = "Rsn")]
4059    #[serde(skip_serializing_if = "Option::is_none")]
4060    pub rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
4061}
4062/// Builder for [`CreditTransferMandateData1`]. Construct via [`CreditTransferMandateData1::builder()`].
4063#[allow(clippy::struct_field_names)]
4064#[derive(Default)]
4065pub struct CreditTransferMandateData1Builder {
4066    mndt_id: ::std::option::Option<Max35Text>,
4067    tp: ::std::option::Option<MandateTypeInformation2>,
4068    dt_of_sgntr: ::std::option::Option<ISODate>,
4069    dt_of_vrfctn: ::std::option::Option<ISODateTime>,
4070    elctrnc_sgntr: ::std::option::Option<Max10KBinary>,
4071    frst_pmt_dt: ::std::option::Option<ISODate>,
4072    fnl_pmt_dt: ::std::option::Option<ISODate>,
4073    frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
4074    rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
4075}
4076impl CreditTransferMandateData1Builder {
4077    /// Set the `mndt_id` field.
4078    #[must_use]
4079    pub fn mndt_id(mut self, value: Max35Text) -> CreditTransferMandateData1Builder {
4080        self.mndt_id = ::std::option::Option::Some(value);
4081        self
4082    }
4083    /// Set the `tp` field.
4084    #[must_use]
4085    pub fn tp(mut self, value: MandateTypeInformation2) -> CreditTransferMandateData1Builder {
4086        self.tp = ::std::option::Option::Some(value);
4087        self
4088    }
4089    /// Set the `dt_of_sgntr` field.
4090    #[must_use]
4091    pub fn dt_of_sgntr(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4092        self.dt_of_sgntr = ::std::option::Option::Some(value);
4093        self
4094    }
4095    /// Set the `dt_of_vrfctn` field.
4096    #[must_use]
4097    pub fn dt_of_vrfctn(mut self, value: ISODateTime) -> CreditTransferMandateData1Builder {
4098        self.dt_of_vrfctn = ::std::option::Option::Some(value);
4099        self
4100    }
4101    /// Set the `elctrnc_sgntr` field.
4102    #[must_use]
4103    pub fn elctrnc_sgntr(mut self, value: Max10KBinary) -> CreditTransferMandateData1Builder {
4104        self.elctrnc_sgntr = ::std::option::Option::Some(value);
4105        self
4106    }
4107    /// Set the `frst_pmt_dt` field.
4108    #[must_use]
4109    pub fn frst_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4110        self.frst_pmt_dt = ::std::option::Option::Some(value);
4111        self
4112    }
4113    /// Set the `fnl_pmt_dt` field.
4114    #[must_use]
4115    pub fn fnl_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4116        self.fnl_pmt_dt = ::std::option::Option::Some(value);
4117        self
4118    }
4119    /// Set the `frqcy` field.
4120    #[must_use]
4121    pub fn frqcy(
4122        mut self,
4123        value: crate::common::ChoiceWrapper<Frequency36Choice>,
4124    ) -> CreditTransferMandateData1Builder {
4125        self.frqcy = ::std::option::Option::Some(value);
4126        self
4127    }
4128    /// Set the `rsn` field.
4129    #[must_use]
4130    pub fn rsn(
4131        mut self,
4132        value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
4133    ) -> CreditTransferMandateData1Builder {
4134        self.rsn = ::std::option::Option::Some(value);
4135        self
4136    }
4137    /// Validate required fields and construct the type.
4138    ///
4139    /// # Errors
4140    ///
4141    /// Returns [`crate::common::BuilderError`] listing the names of any
4142    /// required fields that were not set.
4143    ///
4144    /// # Panics
4145    ///
4146    /// Does not panic — all `.unwrap()` calls are guarded by the
4147    /// missing-field check above.
4148    pub fn build(
4149        self,
4150    ) -> ::std::result::Result<CreditTransferMandateData1, crate::common::BuilderError> {
4151        ::std::result::Result::Ok(CreditTransferMandateData1 {
4152            mndt_id: self.mndt_id,
4153            tp: self.tp,
4154            dt_of_sgntr: self.dt_of_sgntr,
4155            dt_of_vrfctn: self.dt_of_vrfctn,
4156            elctrnc_sgntr: self.elctrnc_sgntr,
4157            frst_pmt_dt: self.frst_pmt_dt,
4158            fnl_pmt_dt: self.fnl_pmt_dt,
4159            frqcy: self.frqcy,
4160            rsn: self.rsn,
4161        })
4162    }
4163}
4164impl CreditTransferMandateData1 {
4165    /// Return a new builder for this type.
4166    #[must_use]
4167    pub fn builder() -> CreditTransferMandateData1Builder {
4168        CreditTransferMandateData1Builder::default()
4169    }
4170}
4171#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4172pub struct CreditTransferTransaction52 {
4173    #[serde(rename = "UltmtDbtr")]
4174    #[serde(skip_serializing_if = "Option::is_none")]
4175    pub ultmt_dbtr: Option<PartyIdentification135>,
4176    #[serde(rename = "InitgPty")]
4177    #[serde(skip_serializing_if = "Option::is_none")]
4178    pub initg_pty: Option<PartyIdentification135>,
4179    #[serde(rename = "Dbtr")]
4180    pub dbtr: PartyIdentification135,
4181    #[serde(rename = "DbtrAcct")]
4182    #[serde(skip_serializing_if = "Option::is_none")]
4183    pub dbtr_acct: Option<CashAccount40>,
4184    #[serde(rename = "DbtrAgt")]
4185    pub dbtr_agt: BranchAndFinancialInstitutionIdentification6,
4186    #[serde(rename = "DbtrAgtAcct")]
4187    #[serde(skip_serializing_if = "Option::is_none")]
4188    pub dbtr_agt_acct: Option<CashAccount40>,
4189    #[serde(rename = "PrvsInstgAgt1")]
4190    #[serde(skip_serializing_if = "Option::is_none")]
4191    pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
4192    #[serde(rename = "PrvsInstgAgt1Acct")]
4193    #[serde(skip_serializing_if = "Option::is_none")]
4194    pub prvs_instg_agt1acct: Option<CashAccount40>,
4195    #[serde(rename = "PrvsInstgAgt2")]
4196    #[serde(skip_serializing_if = "Option::is_none")]
4197    pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
4198    #[serde(rename = "PrvsInstgAgt2Acct")]
4199    #[serde(skip_serializing_if = "Option::is_none")]
4200    pub prvs_instg_agt2acct: Option<CashAccount40>,
4201    #[serde(rename = "PrvsInstgAgt3")]
4202    #[serde(skip_serializing_if = "Option::is_none")]
4203    pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
4204    #[serde(rename = "PrvsInstgAgt3Acct")]
4205    #[serde(skip_serializing_if = "Option::is_none")]
4206    pub prvs_instg_agt3acct: Option<CashAccount40>,
4207    #[serde(rename = "IntrmyAgt1")]
4208    #[serde(skip_serializing_if = "Option::is_none")]
4209    pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
4210    #[serde(rename = "IntrmyAgt1Acct")]
4211    #[serde(skip_serializing_if = "Option::is_none")]
4212    pub intrmy_agt1acct: Option<CashAccount40>,
4213    #[serde(rename = "IntrmyAgt2")]
4214    #[serde(skip_serializing_if = "Option::is_none")]
4215    pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
4216    #[serde(rename = "IntrmyAgt2Acct")]
4217    #[serde(skip_serializing_if = "Option::is_none")]
4218    pub intrmy_agt2acct: Option<CashAccount40>,
4219    #[serde(rename = "IntrmyAgt3")]
4220    #[serde(skip_serializing_if = "Option::is_none")]
4221    pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
4222    #[serde(rename = "IntrmyAgt3Acct")]
4223    #[serde(skip_serializing_if = "Option::is_none")]
4224    pub intrmy_agt3acct: Option<CashAccount40>,
4225    #[serde(rename = "CdtrAgt")]
4226    pub cdtr_agt: BranchAndFinancialInstitutionIdentification6,
4227    #[serde(rename = "CdtrAgtAcct")]
4228    #[serde(skip_serializing_if = "Option::is_none")]
4229    pub cdtr_agt_acct: Option<CashAccount40>,
4230    #[serde(rename = "Cdtr")]
4231    pub cdtr: PartyIdentification135,
4232    #[serde(rename = "CdtrAcct")]
4233    #[serde(skip_serializing_if = "Option::is_none")]
4234    pub cdtr_acct: Option<CashAccount40>,
4235    #[serde(rename = "UltmtCdtr")]
4236    #[serde(skip_serializing_if = "Option::is_none")]
4237    pub ultmt_cdtr: Option<PartyIdentification135>,
4238    #[serde(rename = "InstrForCdtrAgt")]
4239    #[serde(default)]
4240    #[serde(skip_serializing_if = "Vec::is_empty")]
4241    pub instr_for_cdtr_agt: Vec<InstructionForCreditorAgent3>,
4242    #[serde(rename = "InstrForNxtAgt")]
4243    #[serde(default)]
4244    #[serde(skip_serializing_if = "Vec::is_empty")]
4245    pub instr_for_nxt_agt: Vec<InstructionForNextAgent1>,
4246    #[serde(rename = "Tax")]
4247    #[serde(skip_serializing_if = "Option::is_none")]
4248    pub tax: Option<TaxInformation10>,
4249    #[serde(rename = "RmtInf")]
4250    #[serde(skip_serializing_if = "Option::is_none")]
4251    pub rmt_inf: Option<RemittanceInformation21>,
4252    #[serde(rename = "InstdAmt")]
4253    #[serde(skip_serializing_if = "Option::is_none")]
4254    pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
4255}
4256/// Builder for [`CreditTransferTransaction52`]. Construct via [`CreditTransferTransaction52::builder()`].
4257#[allow(clippy::struct_field_names)]
4258#[derive(Default)]
4259pub struct CreditTransferTransaction52Builder {
4260    ultmt_dbtr: ::std::option::Option<PartyIdentification135>,
4261    initg_pty: ::std::option::Option<PartyIdentification135>,
4262    dbtr: ::std::option::Option<PartyIdentification135>,
4263    dbtr_acct: ::std::option::Option<CashAccount40>,
4264    dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4265    dbtr_agt_acct: ::std::option::Option<CashAccount40>,
4266    prvs_instg_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4267    prvs_instg_agt1acct: ::std::option::Option<CashAccount40>,
4268    prvs_instg_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4269    prvs_instg_agt2acct: ::std::option::Option<CashAccount40>,
4270    prvs_instg_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4271    prvs_instg_agt3acct: ::std::option::Option<CashAccount40>,
4272    intrmy_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4273    intrmy_agt1acct: ::std::option::Option<CashAccount40>,
4274    intrmy_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4275    intrmy_agt2acct: ::std::option::Option<CashAccount40>,
4276    intrmy_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4277    intrmy_agt3acct: ::std::option::Option<CashAccount40>,
4278    cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
4279    cdtr_agt_acct: ::std::option::Option<CashAccount40>,
4280    cdtr: ::std::option::Option<PartyIdentification135>,
4281    cdtr_acct: ::std::option::Option<CashAccount40>,
4282    ultmt_cdtr: ::std::option::Option<PartyIdentification135>,
4283    instr_for_cdtr_agt: ::std::vec::Vec<InstructionForCreditorAgent3>,
4284    instr_for_nxt_agt: ::std::vec::Vec<InstructionForNextAgent1>,
4285    tax: ::std::option::Option<TaxInformation10>,
4286    rmt_inf: ::std::option::Option<RemittanceInformation21>,
4287    instd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4288}
4289impl CreditTransferTransaction52Builder {
4290    /// Set the `ultmt_dbtr` field.
4291    #[must_use]
4292    pub fn ultmt_dbtr(
4293        mut self,
4294        value: PartyIdentification135,
4295    ) -> CreditTransferTransaction52Builder {
4296        self.ultmt_dbtr = ::std::option::Option::Some(value);
4297        self
4298    }
4299    /// Set the `initg_pty` field.
4300    #[must_use]
4301    pub fn initg_pty(
4302        mut self,
4303        value: PartyIdentification135,
4304    ) -> CreditTransferTransaction52Builder {
4305        self.initg_pty = ::std::option::Option::Some(value);
4306        self
4307    }
4308    /// Set the `dbtr` field.
4309    #[must_use]
4310    pub fn dbtr(mut self, value: PartyIdentification135) -> CreditTransferTransaction52Builder {
4311        self.dbtr = ::std::option::Option::Some(value);
4312        self
4313    }
4314    /// Set the `dbtr_acct` field.
4315    #[must_use]
4316    pub fn dbtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
4317        self.dbtr_acct = ::std::option::Option::Some(value);
4318        self
4319    }
4320    /// Set the `dbtr_agt` field.
4321    #[must_use]
4322    pub fn dbtr_agt(
4323        mut self,
4324        value: BranchAndFinancialInstitutionIdentification6,
4325    ) -> CreditTransferTransaction52Builder {
4326        self.dbtr_agt = ::std::option::Option::Some(value);
4327        self
4328    }
4329    /// Set the `dbtr_agt_acct` field.
4330    #[must_use]
4331    pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
4332        self.dbtr_agt_acct = ::std::option::Option::Some(value);
4333        self
4334    }
4335    /// Set the `prvs_instg_agt1` field.
4336    #[must_use]
4337    pub fn prvs_instg_agt1(
4338        mut self,
4339        value: BranchAndFinancialInstitutionIdentification6,
4340    ) -> CreditTransferTransaction52Builder {
4341        self.prvs_instg_agt1 = ::std::option::Option::Some(value);
4342        self
4343    }
4344    /// Set the `prvs_instg_agt1acct` field.
4345    #[must_use]
4346    pub fn prvs_instg_agt1acct(
4347        mut self,
4348        value: CashAccount40,
4349    ) -> CreditTransferTransaction52Builder {
4350        self.prvs_instg_agt1acct = ::std::option::Option::Some(value);
4351        self
4352    }
4353    /// Set the `prvs_instg_agt2` field.
4354    #[must_use]
4355    pub fn prvs_instg_agt2(
4356        mut self,
4357        value: BranchAndFinancialInstitutionIdentification6,
4358    ) -> CreditTransferTransaction52Builder {
4359        self.prvs_instg_agt2 = ::std::option::Option::Some(value);
4360        self
4361    }
4362    /// Set the `prvs_instg_agt2acct` field.
4363    #[must_use]
4364    pub fn prvs_instg_agt2acct(
4365        mut self,
4366        value: CashAccount40,
4367    ) -> CreditTransferTransaction52Builder {
4368        self.prvs_instg_agt2acct = ::std::option::Option::Some(value);
4369        self
4370    }
4371    /// Set the `prvs_instg_agt3` field.
4372    #[must_use]
4373    pub fn prvs_instg_agt3(
4374        mut self,
4375        value: BranchAndFinancialInstitutionIdentification6,
4376    ) -> CreditTransferTransaction52Builder {
4377        self.prvs_instg_agt3 = ::std::option::Option::Some(value);
4378        self
4379    }
4380    /// Set the `prvs_instg_agt3acct` field.
4381    #[must_use]
4382    pub fn prvs_instg_agt3acct(
4383        mut self,
4384        value: CashAccount40,
4385    ) -> CreditTransferTransaction52Builder {
4386        self.prvs_instg_agt3acct = ::std::option::Option::Some(value);
4387        self
4388    }
4389    /// Set the `intrmy_agt1` field.
4390    #[must_use]
4391    pub fn intrmy_agt1(
4392        mut self,
4393        value: BranchAndFinancialInstitutionIdentification6,
4394    ) -> CreditTransferTransaction52Builder {
4395        self.intrmy_agt1 = ::std::option::Option::Some(value);
4396        self
4397    }
4398    /// Set the `intrmy_agt1acct` field.
4399    #[must_use]
4400    pub fn intrmy_agt1acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
4401        self.intrmy_agt1acct = ::std::option::Option::Some(value);
4402        self
4403    }
4404    /// Set the `intrmy_agt2` field.
4405    #[must_use]
4406    pub fn intrmy_agt2(
4407        mut self,
4408        value: BranchAndFinancialInstitutionIdentification6,
4409    ) -> CreditTransferTransaction52Builder {
4410        self.intrmy_agt2 = ::std::option::Option::Some(value);
4411        self
4412    }
4413    /// Set the `intrmy_agt2acct` field.
4414    #[must_use]
4415    pub fn intrmy_agt2acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
4416        self.intrmy_agt2acct = ::std::option::Option::Some(value);
4417        self
4418    }
4419    /// Set the `intrmy_agt3` field.
4420    #[must_use]
4421    pub fn intrmy_agt3(
4422        mut self,
4423        value: BranchAndFinancialInstitutionIdentification6,
4424    ) -> CreditTransferTransaction52Builder {
4425        self.intrmy_agt3 = ::std::option::Option::Some(value);
4426        self
4427    }
4428    /// Set the `intrmy_agt3acct` field.
4429    #[must_use]
4430    pub fn intrmy_agt3acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
4431        self.intrmy_agt3acct = ::std::option::Option::Some(value);
4432        self
4433    }
4434    /// Set the `cdtr_agt` field.
4435    #[must_use]
4436    pub fn cdtr_agt(
4437        mut self,
4438        value: BranchAndFinancialInstitutionIdentification6,
4439    ) -> CreditTransferTransaction52Builder {
4440        self.cdtr_agt = ::std::option::Option::Some(value);
4441        self
4442    }
4443    /// Set the `cdtr_agt_acct` field.
4444    #[must_use]
4445    pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
4446        self.cdtr_agt_acct = ::std::option::Option::Some(value);
4447        self
4448    }
4449    /// Set the `cdtr` field.
4450    #[must_use]
4451    pub fn cdtr(mut self, value: PartyIdentification135) -> CreditTransferTransaction52Builder {
4452        self.cdtr = ::std::option::Option::Some(value);
4453        self
4454    }
4455    /// Set the `cdtr_acct` field.
4456    #[must_use]
4457    pub fn cdtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction52Builder {
4458        self.cdtr_acct = ::std::option::Option::Some(value);
4459        self
4460    }
4461    /// Set the `ultmt_cdtr` field.
4462    #[must_use]
4463    pub fn ultmt_cdtr(
4464        mut self,
4465        value: PartyIdentification135,
4466    ) -> CreditTransferTransaction52Builder {
4467        self.ultmt_cdtr = ::std::option::Option::Some(value);
4468        self
4469    }
4470    /// Set the `instr_for_cdtr_agt` field (replaces any previously added items).
4471    #[must_use]
4472    pub fn instr_for_cdtr_agt(
4473        mut self,
4474        value: ::std::vec::Vec<InstructionForCreditorAgent3>,
4475    ) -> CreditTransferTransaction52Builder {
4476        self.instr_for_cdtr_agt = value;
4477        self
4478    }
4479    /// Append one item to the `instr_for_cdtr_agt` field.
4480    #[must_use]
4481    pub fn add_instr_for_cdtr_agt(
4482        mut self,
4483        value: InstructionForCreditorAgent3,
4484    ) -> CreditTransferTransaction52Builder {
4485        self.instr_for_cdtr_agt.push(value);
4486        self
4487    }
4488    /// Set the `instr_for_nxt_agt` field (replaces any previously added items).
4489    #[must_use]
4490    pub fn instr_for_nxt_agt(
4491        mut self,
4492        value: ::std::vec::Vec<InstructionForNextAgent1>,
4493    ) -> CreditTransferTransaction52Builder {
4494        self.instr_for_nxt_agt = value;
4495        self
4496    }
4497    /// Append one item to the `instr_for_nxt_agt` field.
4498    #[must_use]
4499    pub fn add_instr_for_nxt_agt(
4500        mut self,
4501        value: InstructionForNextAgent1,
4502    ) -> CreditTransferTransaction52Builder {
4503        self.instr_for_nxt_agt.push(value);
4504        self
4505    }
4506    /// Set the `tax` field.
4507    #[must_use]
4508    pub fn tax(mut self, value: TaxInformation10) -> CreditTransferTransaction52Builder {
4509        self.tax = ::std::option::Option::Some(value);
4510        self
4511    }
4512    /// Set the `rmt_inf` field.
4513    #[must_use]
4514    pub fn rmt_inf(mut self, value: RemittanceInformation21) -> CreditTransferTransaction52Builder {
4515        self.rmt_inf = ::std::option::Option::Some(value);
4516        self
4517    }
4518    /// Set the `instd_amt` field.
4519    #[must_use]
4520    pub fn instd_amt(
4521        mut self,
4522        value: ActiveOrHistoricCurrencyAndAmount,
4523    ) -> CreditTransferTransaction52Builder {
4524        self.instd_amt = ::std::option::Option::Some(value);
4525        self
4526    }
4527    /// Validate required fields and construct the type.
4528    ///
4529    /// # Errors
4530    ///
4531    /// Returns [`crate::common::BuilderError`] listing the names of any
4532    /// required fields that were not set.
4533    ///
4534    /// # Panics
4535    ///
4536    /// Does not panic — all `.unwrap()` calls are guarded by the
4537    /// missing-field check above.
4538    pub fn build(
4539        self,
4540    ) -> ::std::result::Result<CreditTransferTransaction52, crate::common::BuilderError> {
4541        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4542        if self.dbtr.is_none() {
4543            missing.push("dbtr".to_owned());
4544        }
4545        if self.dbtr_agt.is_none() {
4546            missing.push("dbtr_agt".to_owned());
4547        }
4548        if self.cdtr_agt.is_none() {
4549            missing.push("cdtr_agt".to_owned());
4550        }
4551        if self.cdtr.is_none() {
4552            missing.push("cdtr".to_owned());
4553        }
4554        if !missing.is_empty() {
4555            return ::std::result::Result::Err(crate::common::BuilderError {
4556                type_name: "CreditTransferTransaction52".to_owned(),
4557                missing_fields: missing,
4558            });
4559        }
4560        ::std::result::Result::Ok(CreditTransferTransaction52 {
4561            ultmt_dbtr: self.ultmt_dbtr,
4562            initg_pty: self.initg_pty,
4563            dbtr: self.dbtr.unwrap(),
4564            dbtr_acct: self.dbtr_acct,
4565            dbtr_agt: self.dbtr_agt.unwrap(),
4566            dbtr_agt_acct: self.dbtr_agt_acct,
4567            prvs_instg_agt1: self.prvs_instg_agt1,
4568            prvs_instg_agt1acct: self.prvs_instg_agt1acct,
4569            prvs_instg_agt2: self.prvs_instg_agt2,
4570            prvs_instg_agt2acct: self.prvs_instg_agt2acct,
4571            prvs_instg_agt3: self.prvs_instg_agt3,
4572            prvs_instg_agt3acct: self.prvs_instg_agt3acct,
4573            intrmy_agt1: self.intrmy_agt1,
4574            intrmy_agt1acct: self.intrmy_agt1acct,
4575            intrmy_agt2: self.intrmy_agt2,
4576            intrmy_agt2acct: self.intrmy_agt2acct,
4577            intrmy_agt3: self.intrmy_agt3,
4578            intrmy_agt3acct: self.intrmy_agt3acct,
4579            cdtr_agt: self.cdtr_agt.unwrap(),
4580            cdtr_agt_acct: self.cdtr_agt_acct,
4581            cdtr: self.cdtr.unwrap(),
4582            cdtr_acct: self.cdtr_acct,
4583            ultmt_cdtr: self.ultmt_cdtr,
4584            instr_for_cdtr_agt: self.instr_for_cdtr_agt,
4585            instr_for_nxt_agt: self.instr_for_nxt_agt,
4586            tax: self.tax,
4587            rmt_inf: self.rmt_inf,
4588            instd_amt: self.instd_amt,
4589        })
4590    }
4591}
4592impl CreditTransferTransaction52 {
4593    /// Return a new builder for this type.
4594    #[must_use]
4595    pub fn builder() -> CreditTransferTransaction52Builder {
4596        CreditTransferTransaction52Builder::default()
4597    }
4598}
4599#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4600pub struct CreditorReferenceInformation2 {
4601    #[serde(rename = "Tp")]
4602    #[serde(skip_serializing_if = "Option::is_none")]
4603    pub tp: Option<CreditorReferenceType2>,
4604    #[serde(rename = "Ref")]
4605    #[serde(skip_serializing_if = "Option::is_none")]
4606    pub r#ref: Option<Max35Text>,
4607}
4608/// Builder for [`CreditorReferenceInformation2`]. Construct via [`CreditorReferenceInformation2::builder()`].
4609#[allow(clippy::struct_field_names)]
4610#[derive(Default)]
4611pub struct CreditorReferenceInformation2Builder {
4612    tp: ::std::option::Option<CreditorReferenceType2>,
4613    r#ref: ::std::option::Option<Max35Text>,
4614}
4615impl CreditorReferenceInformation2Builder {
4616    /// Set the `tp` field.
4617    #[must_use]
4618    pub fn tp(mut self, value: CreditorReferenceType2) -> CreditorReferenceInformation2Builder {
4619        self.tp = ::std::option::Option::Some(value);
4620        self
4621    }
4622    /// Set the `ref` field.
4623    #[must_use]
4624    pub fn r#ref(mut self, value: Max35Text) -> CreditorReferenceInformation2Builder {
4625        self.r#ref = ::std::option::Option::Some(value);
4626        self
4627    }
4628    /// Validate required fields and construct the type.
4629    ///
4630    /// # Errors
4631    ///
4632    /// Returns [`crate::common::BuilderError`] listing the names of any
4633    /// required fields that were not set.
4634    ///
4635    /// # Panics
4636    ///
4637    /// Does not panic — all `.unwrap()` calls are guarded by the
4638    /// missing-field check above.
4639    pub fn build(
4640        self,
4641    ) -> ::std::result::Result<CreditorReferenceInformation2, crate::common::BuilderError> {
4642        ::std::result::Result::Ok(CreditorReferenceInformation2 {
4643            tp: self.tp,
4644            r#ref: self.r#ref,
4645        })
4646    }
4647}
4648impl CreditorReferenceInformation2 {
4649    /// Return a new builder for this type.
4650    #[must_use]
4651    pub fn builder() -> CreditorReferenceInformation2Builder {
4652        CreditorReferenceInformation2Builder::default()
4653    }
4654}
4655#[allow(clippy::large_enum_variant)]
4656#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4657pub enum CreditorReferenceType1Choice {
4658    #[serde(rename = "Cd")]
4659    Cd(DocumentType3Code),
4660    #[serde(rename = "Prtry")]
4661    Prtry(Max35Text),
4662}
4663#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4664pub struct CreditorReferenceType2 {
4665    #[serde(rename = "CdOrPrtry")]
4666    pub cd_or_prtry: crate::common::ChoiceWrapper<CreditorReferenceType1Choice>,
4667    #[serde(rename = "Issr")]
4668    #[serde(skip_serializing_if = "Option::is_none")]
4669    pub issr: Option<Max35Text>,
4670}
4671/// Builder for [`CreditorReferenceType2`]. Construct via [`CreditorReferenceType2::builder()`].
4672#[allow(clippy::struct_field_names)]
4673#[derive(Default)]
4674pub struct CreditorReferenceType2Builder {
4675    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<CreditorReferenceType1Choice>>,
4676    issr: ::std::option::Option<Max35Text>,
4677}
4678impl CreditorReferenceType2Builder {
4679    /// Set the `cd_or_prtry` field.
4680    #[must_use]
4681    pub fn cd_or_prtry(
4682        mut self,
4683        value: crate::common::ChoiceWrapper<CreditorReferenceType1Choice>,
4684    ) -> CreditorReferenceType2Builder {
4685        self.cd_or_prtry = ::std::option::Option::Some(value);
4686        self
4687    }
4688    /// Set the `issr` field.
4689    #[must_use]
4690    pub fn issr(mut self, value: Max35Text) -> CreditorReferenceType2Builder {
4691        self.issr = ::std::option::Option::Some(value);
4692        self
4693    }
4694    /// Validate required fields and construct the type.
4695    ///
4696    /// # Errors
4697    ///
4698    /// Returns [`crate::common::BuilderError`] listing the names of any
4699    /// required fields that were not set.
4700    ///
4701    /// # Panics
4702    ///
4703    /// Does not panic — all `.unwrap()` calls are guarded by the
4704    /// missing-field check above.
4705    pub fn build(
4706        self,
4707    ) -> ::std::result::Result<CreditorReferenceType2, crate::common::BuilderError> {
4708        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4709        if self.cd_or_prtry.is_none() {
4710            missing.push("cd_or_prtry".to_owned());
4711        }
4712        if !missing.is_empty() {
4713            return ::std::result::Result::Err(crate::common::BuilderError {
4714                type_name: "CreditorReferenceType2".to_owned(),
4715                missing_fields: missing,
4716            });
4717        }
4718        ::std::result::Result::Ok(CreditorReferenceType2 {
4719            cd_or_prtry: self.cd_or_prtry.unwrap(),
4720            issr: self.issr,
4721        })
4722    }
4723}
4724impl CreditorReferenceType2 {
4725    /// Return a new builder for this type.
4726    #[must_use]
4727    pub fn builder() -> CreditorReferenceType2Builder {
4728        CreditorReferenceType2Builder::default()
4729    }
4730}
4731#[allow(clippy::large_enum_variant)]
4732#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4733pub enum DateAndDateTime2Choice {
4734    #[serde(rename = "Dt")]
4735    Dt(ISODate),
4736    #[serde(rename = "DtTm")]
4737    DtTm(ISODateTime),
4738}
4739#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4740pub struct DateAndPlaceOfBirth1 {
4741    #[serde(rename = "BirthDt")]
4742    pub birth_dt: ISODate,
4743    #[serde(rename = "PrvcOfBirth")]
4744    #[serde(skip_serializing_if = "Option::is_none")]
4745    pub prvc_of_birth: Option<Max35Text>,
4746    #[serde(rename = "CityOfBirth")]
4747    pub city_of_birth: Max35Text,
4748    #[serde(rename = "CtryOfBirth")]
4749    pub ctry_of_birth: CountryCode,
4750}
4751/// Builder for [`DateAndPlaceOfBirth1`]. Construct via [`DateAndPlaceOfBirth1::builder()`].
4752#[allow(clippy::struct_field_names)]
4753#[derive(Default)]
4754pub struct DateAndPlaceOfBirth1Builder {
4755    birth_dt: ::std::option::Option<ISODate>,
4756    prvc_of_birth: ::std::option::Option<Max35Text>,
4757    city_of_birth: ::std::option::Option<Max35Text>,
4758    ctry_of_birth: ::std::option::Option<CountryCode>,
4759}
4760impl DateAndPlaceOfBirth1Builder {
4761    /// Set the `birth_dt` field.
4762    #[must_use]
4763    pub fn birth_dt(mut self, value: ISODate) -> DateAndPlaceOfBirth1Builder {
4764        self.birth_dt = ::std::option::Option::Some(value);
4765        self
4766    }
4767    /// Set the `prvc_of_birth` field.
4768    #[must_use]
4769    pub fn prvc_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
4770        self.prvc_of_birth = ::std::option::Option::Some(value);
4771        self
4772    }
4773    /// Set the `city_of_birth` field.
4774    #[must_use]
4775    pub fn city_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
4776        self.city_of_birth = ::std::option::Option::Some(value);
4777        self
4778    }
4779    /// Set the `ctry_of_birth` field.
4780    #[must_use]
4781    pub fn ctry_of_birth(mut self, value: CountryCode) -> DateAndPlaceOfBirth1Builder {
4782        self.ctry_of_birth = ::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<DateAndPlaceOfBirth1, crate::common::BuilderError> {
4797        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4798        if self.birth_dt.is_none() {
4799            missing.push("birth_dt".to_owned());
4800        }
4801        if self.city_of_birth.is_none() {
4802            missing.push("city_of_birth".to_owned());
4803        }
4804        if self.ctry_of_birth.is_none() {
4805            missing.push("ctry_of_birth".to_owned());
4806        }
4807        if !missing.is_empty() {
4808            return ::std::result::Result::Err(crate::common::BuilderError {
4809                type_name: "DateAndPlaceOfBirth1".to_owned(),
4810                missing_fields: missing,
4811            });
4812        }
4813        ::std::result::Result::Ok(DateAndPlaceOfBirth1 {
4814            birth_dt: self.birth_dt.unwrap(),
4815            prvc_of_birth: self.prvc_of_birth,
4816            city_of_birth: self.city_of_birth.unwrap(),
4817            ctry_of_birth: self.ctry_of_birth.unwrap(),
4818        })
4819    }
4820}
4821impl DateAndPlaceOfBirth1 {
4822    /// Return a new builder for this type.
4823    #[must_use]
4824    pub fn builder() -> DateAndPlaceOfBirth1Builder {
4825        DateAndPlaceOfBirth1Builder::default()
4826    }
4827}
4828#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4829pub struct DatePeriod2 {
4830    #[serde(rename = "FrDt")]
4831    pub fr_dt: ISODate,
4832    #[serde(rename = "ToDt")]
4833    pub to_dt: ISODate,
4834}
4835/// Builder for [`DatePeriod2`]. Construct via [`DatePeriod2::builder()`].
4836#[allow(clippy::struct_field_names)]
4837#[derive(Default)]
4838pub struct DatePeriod2Builder {
4839    fr_dt: ::std::option::Option<ISODate>,
4840    to_dt: ::std::option::Option<ISODate>,
4841}
4842impl DatePeriod2Builder {
4843    /// Set the `fr_dt` field.
4844    #[must_use]
4845    pub fn fr_dt(mut self, value: ISODate) -> DatePeriod2Builder {
4846        self.fr_dt = ::std::option::Option::Some(value);
4847        self
4848    }
4849    /// Set the `to_dt` field.
4850    #[must_use]
4851    pub fn to_dt(mut self, value: ISODate) -> DatePeriod2Builder {
4852        self.to_dt = ::std::option::Option::Some(value);
4853        self
4854    }
4855    /// Validate required fields and construct the type.
4856    ///
4857    /// # Errors
4858    ///
4859    /// Returns [`crate::common::BuilderError`] listing the names of any
4860    /// required fields that were not set.
4861    ///
4862    /// # Panics
4863    ///
4864    /// Does not panic — all `.unwrap()` calls are guarded by the
4865    /// missing-field check above.
4866    pub fn build(self) -> ::std::result::Result<DatePeriod2, crate::common::BuilderError> {
4867        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4868        if self.fr_dt.is_none() {
4869            missing.push("fr_dt".to_owned());
4870        }
4871        if self.to_dt.is_none() {
4872            missing.push("to_dt".to_owned());
4873        }
4874        if !missing.is_empty() {
4875            return ::std::result::Result::Err(crate::common::BuilderError {
4876                type_name: "DatePeriod2".to_owned(),
4877                missing_fields: missing,
4878            });
4879        }
4880        ::std::result::Result::Ok(DatePeriod2 {
4881            fr_dt: self.fr_dt.unwrap(),
4882            to_dt: self.to_dt.unwrap(),
4883        })
4884    }
4885}
4886impl DatePeriod2 {
4887    /// Return a new builder for this type.
4888    #[must_use]
4889    pub fn builder() -> DatePeriod2Builder {
4890        DatePeriod2Builder::default()
4891    }
4892}
4893#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4894pub struct DiscountAmountAndType1 {
4895    #[serde(rename = "Tp")]
4896    #[serde(skip_serializing_if = "Option::is_none")]
4897    pub tp: Option<crate::common::ChoiceWrapper<DiscountAmountType1Choice>>,
4898    #[serde(rename = "Amt")]
4899    pub amt: ActiveOrHistoricCurrencyAndAmount,
4900}
4901/// Builder for [`DiscountAmountAndType1`]. Construct via [`DiscountAmountAndType1::builder()`].
4902#[allow(clippy::struct_field_names)]
4903#[derive(Default)]
4904pub struct DiscountAmountAndType1Builder {
4905    tp: ::std::option::Option<crate::common::ChoiceWrapper<DiscountAmountType1Choice>>,
4906    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4907}
4908impl DiscountAmountAndType1Builder {
4909    /// Set the `tp` field.
4910    #[must_use]
4911    pub fn tp(
4912        mut self,
4913        value: crate::common::ChoiceWrapper<DiscountAmountType1Choice>,
4914    ) -> DiscountAmountAndType1Builder {
4915        self.tp = ::std::option::Option::Some(value);
4916        self
4917    }
4918    /// Set the `amt` field.
4919    #[must_use]
4920    pub fn amt(
4921        mut self,
4922        value: ActiveOrHistoricCurrencyAndAmount,
4923    ) -> DiscountAmountAndType1Builder {
4924        self.amt = ::std::option::Option::Some(value);
4925        self
4926    }
4927    /// Validate required fields and construct the type.
4928    ///
4929    /// # Errors
4930    ///
4931    /// Returns [`crate::common::BuilderError`] listing the names of any
4932    /// required fields that were not set.
4933    ///
4934    /// # Panics
4935    ///
4936    /// Does not panic — all `.unwrap()` calls are guarded by the
4937    /// missing-field check above.
4938    pub fn build(
4939        self,
4940    ) -> ::std::result::Result<DiscountAmountAndType1, crate::common::BuilderError> {
4941        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4942        if self.amt.is_none() {
4943            missing.push("amt".to_owned());
4944        }
4945        if !missing.is_empty() {
4946            return ::std::result::Result::Err(crate::common::BuilderError {
4947                type_name: "DiscountAmountAndType1".to_owned(),
4948                missing_fields: missing,
4949            });
4950        }
4951        ::std::result::Result::Ok(DiscountAmountAndType1 {
4952            tp: self.tp,
4953            amt: self.amt.unwrap(),
4954        })
4955    }
4956}
4957impl DiscountAmountAndType1 {
4958    /// Return a new builder for this type.
4959    #[must_use]
4960    pub fn builder() -> DiscountAmountAndType1Builder {
4961        DiscountAmountAndType1Builder::default()
4962    }
4963}
4964#[allow(clippy::large_enum_variant)]
4965#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4966pub enum DiscountAmountType1Choice {
4967    #[serde(rename = "Cd")]
4968    Cd(ExternalDiscountAmountType1Code),
4969    #[serde(rename = "Prtry")]
4970    Prtry(Max35Text),
4971}
4972#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4973pub struct Document {
4974    #[serde(rename = "PmtRtr")]
4975    pub pmt_rtr: PaymentReturnV11,
4976}
4977/// Builder for [`Document`]. Construct via [`Document::builder()`].
4978#[allow(clippy::struct_field_names)]
4979#[derive(Default)]
4980pub struct DocumentBuilder {
4981    pmt_rtr: ::std::option::Option<PaymentReturnV11>,
4982}
4983impl DocumentBuilder {
4984    /// Set the `pmt_rtr` field.
4985    #[must_use]
4986    pub fn pmt_rtr(mut self, value: PaymentReturnV11) -> DocumentBuilder {
4987        self.pmt_rtr = ::std::option::Option::Some(value);
4988        self
4989    }
4990    /// Validate required fields and construct the type.
4991    ///
4992    /// # Errors
4993    ///
4994    /// Returns [`crate::common::BuilderError`] listing the names of any
4995    /// required fields that were not set.
4996    ///
4997    /// # Panics
4998    ///
4999    /// Does not panic — all `.unwrap()` calls are guarded by the
5000    /// missing-field check above.
5001    pub fn build(self) -> ::std::result::Result<Document, crate::common::BuilderError> {
5002        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5003        if self.pmt_rtr.is_none() {
5004            missing.push("pmt_rtr".to_owned());
5005        }
5006        if !missing.is_empty() {
5007            return ::std::result::Result::Err(crate::common::BuilderError {
5008                type_name: "Document".to_owned(),
5009                missing_fields: missing,
5010            });
5011        }
5012        ::std::result::Result::Ok(Document {
5013            pmt_rtr: self.pmt_rtr.unwrap(),
5014        })
5015    }
5016}
5017impl Document {
5018    /// Return a new builder for this type.
5019    #[must_use]
5020    pub fn builder() -> DocumentBuilder {
5021        DocumentBuilder::default()
5022    }
5023}
5024#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5025pub struct DocumentAdjustment1 {
5026    #[serde(rename = "Amt")]
5027    pub amt: ActiveOrHistoricCurrencyAndAmount,
5028    #[serde(rename = "CdtDbtInd")]
5029    #[serde(skip_serializing_if = "Option::is_none")]
5030    pub cdt_dbt_ind: Option<CreditDebitCode>,
5031    #[serde(rename = "Rsn")]
5032    #[serde(skip_serializing_if = "Option::is_none")]
5033    pub rsn: Option<Max4Text>,
5034    #[serde(rename = "AddtlInf")]
5035    #[serde(skip_serializing_if = "Option::is_none")]
5036    pub addtl_inf: Option<Max140Text>,
5037}
5038/// Builder for [`DocumentAdjustment1`]. Construct via [`DocumentAdjustment1::builder()`].
5039#[allow(clippy::struct_field_names)]
5040#[derive(Default)]
5041pub struct DocumentAdjustment1Builder {
5042    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5043    cdt_dbt_ind: ::std::option::Option<CreditDebitCode>,
5044    rsn: ::std::option::Option<Max4Text>,
5045    addtl_inf: ::std::option::Option<Max140Text>,
5046}
5047impl DocumentAdjustment1Builder {
5048    /// Set the `amt` field.
5049    #[must_use]
5050    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> DocumentAdjustment1Builder {
5051        self.amt = ::std::option::Option::Some(value);
5052        self
5053    }
5054    /// Set the `cdt_dbt_ind` field.
5055    #[must_use]
5056    pub fn cdt_dbt_ind(mut self, value: CreditDebitCode) -> DocumentAdjustment1Builder {
5057        self.cdt_dbt_ind = ::std::option::Option::Some(value);
5058        self
5059    }
5060    /// Set the `rsn` field.
5061    #[must_use]
5062    pub fn rsn(mut self, value: Max4Text) -> DocumentAdjustment1Builder {
5063        self.rsn = ::std::option::Option::Some(value);
5064        self
5065    }
5066    /// Set the `addtl_inf` field.
5067    #[must_use]
5068    pub fn addtl_inf(mut self, value: Max140Text) -> DocumentAdjustment1Builder {
5069        self.addtl_inf = ::std::option::Option::Some(value);
5070        self
5071    }
5072    /// Validate required fields and construct the type.
5073    ///
5074    /// # Errors
5075    ///
5076    /// Returns [`crate::common::BuilderError`] listing the names of any
5077    /// required fields that were not set.
5078    ///
5079    /// # Panics
5080    ///
5081    /// Does not panic — all `.unwrap()` calls are guarded by the
5082    /// missing-field check above.
5083    pub fn build(self) -> ::std::result::Result<DocumentAdjustment1, crate::common::BuilderError> {
5084        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5085        if self.amt.is_none() {
5086            missing.push("amt".to_owned());
5087        }
5088        if !missing.is_empty() {
5089            return ::std::result::Result::Err(crate::common::BuilderError {
5090                type_name: "DocumentAdjustment1".to_owned(),
5091                missing_fields: missing,
5092            });
5093        }
5094        ::std::result::Result::Ok(DocumentAdjustment1 {
5095            amt: self.amt.unwrap(),
5096            cdt_dbt_ind: self.cdt_dbt_ind,
5097            rsn: self.rsn,
5098            addtl_inf: self.addtl_inf,
5099        })
5100    }
5101}
5102impl DocumentAdjustment1 {
5103    /// Return a new builder for this type.
5104    #[must_use]
5105    pub fn builder() -> DocumentAdjustment1Builder {
5106        DocumentAdjustment1Builder::default()
5107    }
5108}
5109#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5110pub struct DocumentLineIdentification1 {
5111    #[serde(rename = "Tp")]
5112    #[serde(skip_serializing_if = "Option::is_none")]
5113    pub tp: Option<DocumentLineType1>,
5114    #[serde(rename = "Nb")]
5115    #[serde(skip_serializing_if = "Option::is_none")]
5116    pub nb: Option<Max35Text>,
5117    #[serde(rename = "RltdDt")]
5118    #[serde(skip_serializing_if = "Option::is_none")]
5119    pub rltd_dt: Option<ISODate>,
5120}
5121/// Builder for [`DocumentLineIdentification1`]. Construct via [`DocumentLineIdentification1::builder()`].
5122#[allow(clippy::struct_field_names)]
5123#[derive(Default)]
5124pub struct DocumentLineIdentification1Builder {
5125    tp: ::std::option::Option<DocumentLineType1>,
5126    nb: ::std::option::Option<Max35Text>,
5127    rltd_dt: ::std::option::Option<ISODate>,
5128}
5129impl DocumentLineIdentification1Builder {
5130    /// Set the `tp` field.
5131    #[must_use]
5132    pub fn tp(mut self, value: DocumentLineType1) -> DocumentLineIdentification1Builder {
5133        self.tp = ::std::option::Option::Some(value);
5134        self
5135    }
5136    /// Set the `nb` field.
5137    #[must_use]
5138    pub fn nb(mut self, value: Max35Text) -> DocumentLineIdentification1Builder {
5139        self.nb = ::std::option::Option::Some(value);
5140        self
5141    }
5142    /// Set the `rltd_dt` field.
5143    #[must_use]
5144    pub fn rltd_dt(mut self, value: ISODate) -> DocumentLineIdentification1Builder {
5145        self.rltd_dt = ::std::option::Option::Some(value);
5146        self
5147    }
5148    /// Validate required fields and construct the type.
5149    ///
5150    /// # Errors
5151    ///
5152    /// Returns [`crate::common::BuilderError`] listing the names of any
5153    /// required fields that were not set.
5154    ///
5155    /// # Panics
5156    ///
5157    /// Does not panic — all `.unwrap()` calls are guarded by the
5158    /// missing-field check above.
5159    pub fn build(
5160        self,
5161    ) -> ::std::result::Result<DocumentLineIdentification1, crate::common::BuilderError> {
5162        ::std::result::Result::Ok(DocumentLineIdentification1 {
5163            tp: self.tp,
5164            nb: self.nb,
5165            rltd_dt: self.rltd_dt,
5166        })
5167    }
5168}
5169impl DocumentLineIdentification1 {
5170    /// Return a new builder for this type.
5171    #[must_use]
5172    pub fn builder() -> DocumentLineIdentification1Builder {
5173        DocumentLineIdentification1Builder::default()
5174    }
5175}
5176#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5177pub struct DocumentLineInformation1 {
5178    #[serde(rename = "Id")]
5179    #[serde(default)]
5180    #[serde(skip_serializing_if = "Vec::is_empty")]
5181    pub id: Vec<DocumentLineIdentification1>,
5182    #[serde(rename = "Desc")]
5183    #[serde(skip_serializing_if = "Option::is_none")]
5184    pub desc: Option<Max2048Text>,
5185    #[serde(rename = "Amt")]
5186    #[serde(skip_serializing_if = "Option::is_none")]
5187    pub amt: Option<RemittanceAmount3>,
5188}
5189/// Builder for [`DocumentLineInformation1`]. Construct via [`DocumentLineInformation1::builder()`].
5190#[allow(clippy::struct_field_names)]
5191#[derive(Default)]
5192pub struct DocumentLineInformation1Builder {
5193    id: ::std::vec::Vec<DocumentLineIdentification1>,
5194    desc: ::std::option::Option<Max2048Text>,
5195    amt: ::std::option::Option<RemittanceAmount3>,
5196}
5197impl DocumentLineInformation1Builder {
5198    /// Set the `id` field (replaces any previously added items).
5199    #[must_use]
5200    pub fn id(
5201        mut self,
5202        value: ::std::vec::Vec<DocumentLineIdentification1>,
5203    ) -> DocumentLineInformation1Builder {
5204        self.id = value;
5205        self
5206    }
5207    /// Append one item to the `id` field.
5208    #[must_use]
5209    pub fn add_id(mut self, value: DocumentLineIdentification1) -> DocumentLineInformation1Builder {
5210        self.id.push(value);
5211        self
5212    }
5213    /// Set the `desc` field.
5214    #[must_use]
5215    pub fn desc(mut self, value: Max2048Text) -> DocumentLineInformation1Builder {
5216        self.desc = ::std::option::Option::Some(value);
5217        self
5218    }
5219    /// Set the `amt` field.
5220    #[must_use]
5221    pub fn amt(mut self, value: RemittanceAmount3) -> DocumentLineInformation1Builder {
5222        self.amt = ::std::option::Option::Some(value);
5223        self
5224    }
5225    /// Validate required fields and construct the type.
5226    ///
5227    /// # Errors
5228    ///
5229    /// Returns [`crate::common::BuilderError`] listing the names of any
5230    /// required fields that were not set.
5231    ///
5232    /// # Panics
5233    ///
5234    /// Does not panic — all `.unwrap()` calls are guarded by the
5235    /// missing-field check above.
5236    pub fn build(
5237        self,
5238    ) -> ::std::result::Result<DocumentLineInformation1, crate::common::BuilderError> {
5239        ::std::result::Result::Ok(DocumentLineInformation1 {
5240            id: self.id,
5241            desc: self.desc,
5242            amt: self.amt,
5243        })
5244    }
5245}
5246impl DocumentLineInformation1 {
5247    /// Return a new builder for this type.
5248    #[must_use]
5249    pub fn builder() -> DocumentLineInformation1Builder {
5250        DocumentLineInformation1Builder::default()
5251    }
5252}
5253#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5254pub struct DocumentLineType1 {
5255    #[serde(rename = "CdOrPrtry")]
5256    pub cd_or_prtry: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
5257    #[serde(rename = "Issr")]
5258    #[serde(skip_serializing_if = "Option::is_none")]
5259    pub issr: Option<Max35Text>,
5260}
5261/// Builder for [`DocumentLineType1`]. Construct via [`DocumentLineType1::builder()`].
5262#[allow(clippy::struct_field_names)]
5263#[derive(Default)]
5264pub struct DocumentLineType1Builder {
5265    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<DocumentLineType1Choice>>,
5266    issr: ::std::option::Option<Max35Text>,
5267}
5268impl DocumentLineType1Builder {
5269    /// Set the `cd_or_prtry` field.
5270    #[must_use]
5271    pub fn cd_or_prtry(
5272        mut self,
5273        value: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
5274    ) -> DocumentLineType1Builder {
5275        self.cd_or_prtry = ::std::option::Option::Some(value);
5276        self
5277    }
5278    /// Set the `issr` field.
5279    #[must_use]
5280    pub fn issr(mut self, value: Max35Text) -> DocumentLineType1Builder {
5281        self.issr = ::std::option::Option::Some(value);
5282        self
5283    }
5284    /// Validate required fields and construct the type.
5285    ///
5286    /// # Errors
5287    ///
5288    /// Returns [`crate::common::BuilderError`] listing the names of any
5289    /// required fields that were not set.
5290    ///
5291    /// # Panics
5292    ///
5293    /// Does not panic — all `.unwrap()` calls are guarded by the
5294    /// missing-field check above.
5295    pub fn build(self) -> ::std::result::Result<DocumentLineType1, crate::common::BuilderError> {
5296        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5297        if self.cd_or_prtry.is_none() {
5298            missing.push("cd_or_prtry".to_owned());
5299        }
5300        if !missing.is_empty() {
5301            return ::std::result::Result::Err(crate::common::BuilderError {
5302                type_name: "DocumentLineType1".to_owned(),
5303                missing_fields: missing,
5304            });
5305        }
5306        ::std::result::Result::Ok(DocumentLineType1 {
5307            cd_or_prtry: self.cd_or_prtry.unwrap(),
5308            issr: self.issr,
5309        })
5310    }
5311}
5312impl DocumentLineType1 {
5313    /// Return a new builder for this type.
5314    #[must_use]
5315    pub fn builder() -> DocumentLineType1Builder {
5316        DocumentLineType1Builder::default()
5317    }
5318}
5319#[allow(clippy::large_enum_variant)]
5320#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5321pub enum DocumentLineType1Choice {
5322    #[serde(rename = "Cd")]
5323    Cd(ExternalDocumentLineType1Code),
5324    #[serde(rename = "Prtry")]
5325    Prtry(Max35Text),
5326}
5327#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5328pub struct EquivalentAmount2 {
5329    #[serde(rename = "Amt")]
5330    pub amt: ActiveOrHistoricCurrencyAndAmount,
5331    #[serde(rename = "CcyOfTrf")]
5332    pub ccy_of_trf: ActiveOrHistoricCurrencyCode,
5333}
5334/// Builder for [`EquivalentAmount2`]. Construct via [`EquivalentAmount2::builder()`].
5335#[allow(clippy::struct_field_names)]
5336#[derive(Default)]
5337pub struct EquivalentAmount2Builder {
5338    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5339    ccy_of_trf: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
5340}
5341impl EquivalentAmount2Builder {
5342    /// Set the `amt` field.
5343    #[must_use]
5344    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> EquivalentAmount2Builder {
5345        self.amt = ::std::option::Option::Some(value);
5346        self
5347    }
5348    /// Set the `ccy_of_trf` field.
5349    #[must_use]
5350    pub fn ccy_of_trf(mut self, value: ActiveOrHistoricCurrencyCode) -> EquivalentAmount2Builder {
5351        self.ccy_of_trf = ::std::option::Option::Some(value);
5352        self
5353    }
5354    /// Validate required fields and construct the type.
5355    ///
5356    /// # Errors
5357    ///
5358    /// Returns [`crate::common::BuilderError`] listing the names of any
5359    /// required fields that were not set.
5360    ///
5361    /// # Panics
5362    ///
5363    /// Does not panic — all `.unwrap()` calls are guarded by the
5364    /// missing-field check above.
5365    pub fn build(self) -> ::std::result::Result<EquivalentAmount2, crate::common::BuilderError> {
5366        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5367        if self.amt.is_none() {
5368            missing.push("amt".to_owned());
5369        }
5370        if self.ccy_of_trf.is_none() {
5371            missing.push("ccy_of_trf".to_owned());
5372        }
5373        if !missing.is_empty() {
5374            return ::std::result::Result::Err(crate::common::BuilderError {
5375                type_name: "EquivalentAmount2".to_owned(),
5376                missing_fields: missing,
5377            });
5378        }
5379        ::std::result::Result::Ok(EquivalentAmount2 {
5380            amt: self.amt.unwrap(),
5381            ccy_of_trf: self.ccy_of_trf.unwrap(),
5382        })
5383    }
5384}
5385impl EquivalentAmount2 {
5386    /// Return a new builder for this type.
5387    #[must_use]
5388    pub fn builder() -> EquivalentAmount2Builder {
5389        EquivalentAmount2Builder::default()
5390    }
5391}
5392#[allow(clippy::large_enum_variant)]
5393#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5394pub enum FinancialIdentificationSchemeName1Choice {
5395    #[serde(rename = "Cd")]
5396    Cd(ExternalFinancialInstitutionIdentification1Code),
5397    #[serde(rename = "Prtry")]
5398    Prtry(Max35Text),
5399}
5400#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5401pub struct FinancialInstitutionIdentification18 {
5402    #[serde(rename = "BICFI")]
5403    #[serde(skip_serializing_if = "Option::is_none")]
5404    pub bicfi: Option<BICFIDec2014Identifier>,
5405    #[serde(rename = "ClrSysMmbId")]
5406    #[serde(skip_serializing_if = "Option::is_none")]
5407    pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
5408    #[serde(rename = "LEI")]
5409    #[serde(skip_serializing_if = "Option::is_none")]
5410    pub lei: Option<LEIIdentifier>,
5411    #[serde(rename = "Nm")]
5412    #[serde(skip_serializing_if = "Option::is_none")]
5413    pub nm: Option<Max140Text>,
5414    #[serde(rename = "PstlAdr")]
5415    #[serde(skip_serializing_if = "Option::is_none")]
5416    pub pstl_adr: Option<PostalAddress24>,
5417    #[serde(rename = "Othr")]
5418    #[serde(skip_serializing_if = "Option::is_none")]
5419    pub othr: Option<GenericFinancialIdentification1>,
5420}
5421/// Builder for [`FinancialInstitutionIdentification18`]. Construct via [`FinancialInstitutionIdentification18::builder()`].
5422#[allow(clippy::struct_field_names)]
5423#[derive(Default)]
5424pub struct FinancialInstitutionIdentification18Builder {
5425    bicfi: ::std::option::Option<BICFIDec2014Identifier>,
5426    clr_sys_mmb_id: ::std::option::Option<ClearingSystemMemberIdentification2>,
5427    lei: ::std::option::Option<LEIIdentifier>,
5428    nm: ::std::option::Option<Max140Text>,
5429    pstl_adr: ::std::option::Option<PostalAddress24>,
5430    othr: ::std::option::Option<GenericFinancialIdentification1>,
5431}
5432impl FinancialInstitutionIdentification18Builder {
5433    /// Set the `bicfi` field.
5434    #[must_use]
5435    pub fn bicfi(
5436        mut self,
5437        value: BICFIDec2014Identifier,
5438    ) -> FinancialInstitutionIdentification18Builder {
5439        self.bicfi = ::std::option::Option::Some(value);
5440        self
5441    }
5442    /// Set the `clr_sys_mmb_id` field.
5443    #[must_use]
5444    pub fn clr_sys_mmb_id(
5445        mut self,
5446        value: ClearingSystemMemberIdentification2,
5447    ) -> FinancialInstitutionIdentification18Builder {
5448        self.clr_sys_mmb_id = ::std::option::Option::Some(value);
5449        self
5450    }
5451    /// Set the `lei` field.
5452    #[must_use]
5453    pub fn lei(mut self, value: LEIIdentifier) -> FinancialInstitutionIdentification18Builder {
5454        self.lei = ::std::option::Option::Some(value);
5455        self
5456    }
5457    /// Set the `nm` field.
5458    #[must_use]
5459    pub fn nm(mut self, value: Max140Text) -> FinancialInstitutionIdentification18Builder {
5460        self.nm = ::std::option::Option::Some(value);
5461        self
5462    }
5463    /// Set the `pstl_adr` field.
5464    #[must_use]
5465    pub fn pstl_adr(
5466        mut self,
5467        value: PostalAddress24,
5468    ) -> FinancialInstitutionIdentification18Builder {
5469        self.pstl_adr = ::std::option::Option::Some(value);
5470        self
5471    }
5472    /// Set the `othr` field.
5473    #[must_use]
5474    pub fn othr(
5475        mut self,
5476        value: GenericFinancialIdentification1,
5477    ) -> FinancialInstitutionIdentification18Builder {
5478        self.othr = ::std::option::Option::Some(value);
5479        self
5480    }
5481    /// Validate required fields and construct the type.
5482    ///
5483    /// # Errors
5484    ///
5485    /// Returns [`crate::common::BuilderError`] listing the names of any
5486    /// required fields that were not set.
5487    ///
5488    /// # Panics
5489    ///
5490    /// Does not panic — all `.unwrap()` calls are guarded by the
5491    /// missing-field check above.
5492    pub fn build(
5493        self,
5494    ) -> ::std::result::Result<FinancialInstitutionIdentification18, crate::common::BuilderError>
5495    {
5496        ::std::result::Result::Ok(FinancialInstitutionIdentification18 {
5497            bicfi: self.bicfi,
5498            clr_sys_mmb_id: self.clr_sys_mmb_id,
5499            lei: self.lei,
5500            nm: self.nm,
5501            pstl_adr: self.pstl_adr,
5502            othr: self.othr,
5503        })
5504    }
5505}
5506impl FinancialInstitutionIdentification18 {
5507    /// Return a new builder for this type.
5508    #[must_use]
5509    pub fn builder() -> FinancialInstitutionIdentification18Builder {
5510        FinancialInstitutionIdentification18Builder::default()
5511    }
5512}
5513#[allow(clippy::large_enum_variant)]
5514#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5515pub enum Frequency36Choice {
5516    #[serde(rename = "Tp")]
5517    Tp(Frequency6Code),
5518    #[serde(rename = "Prd")]
5519    Prd(FrequencyPeriod1),
5520    #[serde(rename = "PtInTm")]
5521    PtInTm(FrequencyAndMoment1),
5522}
5523#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5524pub struct FrequencyAndMoment1 {
5525    #[serde(rename = "Tp")]
5526    pub tp: Frequency6Code,
5527    #[serde(rename = "PtInTm")]
5528    pub pt_in_tm: Exact2NumericText,
5529}
5530/// Builder for [`FrequencyAndMoment1`]. Construct via [`FrequencyAndMoment1::builder()`].
5531#[allow(clippy::struct_field_names)]
5532#[derive(Default)]
5533pub struct FrequencyAndMoment1Builder {
5534    tp: ::std::option::Option<Frequency6Code>,
5535    pt_in_tm: ::std::option::Option<Exact2NumericText>,
5536}
5537impl FrequencyAndMoment1Builder {
5538    /// Set the `tp` field.
5539    #[must_use]
5540    pub fn tp(mut self, value: Frequency6Code) -> FrequencyAndMoment1Builder {
5541        self.tp = ::std::option::Option::Some(value);
5542        self
5543    }
5544    /// Set the `pt_in_tm` field.
5545    #[must_use]
5546    pub fn pt_in_tm(mut self, value: Exact2NumericText) -> FrequencyAndMoment1Builder {
5547        self.pt_in_tm = ::std::option::Option::Some(value);
5548        self
5549    }
5550    /// Validate required fields and construct the type.
5551    ///
5552    /// # Errors
5553    ///
5554    /// Returns [`crate::common::BuilderError`] listing the names of any
5555    /// required fields that were not set.
5556    ///
5557    /// # Panics
5558    ///
5559    /// Does not panic — all `.unwrap()` calls are guarded by the
5560    /// missing-field check above.
5561    pub fn build(self) -> ::std::result::Result<FrequencyAndMoment1, crate::common::BuilderError> {
5562        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5563        if self.tp.is_none() {
5564            missing.push("tp".to_owned());
5565        }
5566        if self.pt_in_tm.is_none() {
5567            missing.push("pt_in_tm".to_owned());
5568        }
5569        if !missing.is_empty() {
5570            return ::std::result::Result::Err(crate::common::BuilderError {
5571                type_name: "FrequencyAndMoment1".to_owned(),
5572                missing_fields: missing,
5573            });
5574        }
5575        ::std::result::Result::Ok(FrequencyAndMoment1 {
5576            tp: self.tp.unwrap(),
5577            pt_in_tm: self.pt_in_tm.unwrap(),
5578        })
5579    }
5580}
5581impl FrequencyAndMoment1 {
5582    /// Return a new builder for this type.
5583    #[must_use]
5584    pub fn builder() -> FrequencyAndMoment1Builder {
5585        FrequencyAndMoment1Builder::default()
5586    }
5587}
5588#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5589pub struct FrequencyPeriod1 {
5590    #[serde(rename = "Tp")]
5591    pub tp: Frequency6Code,
5592    #[serde(rename = "CntPerPrd")]
5593    pub cnt_per_prd: DecimalNumber,
5594}
5595/// Builder for [`FrequencyPeriod1`]. Construct via [`FrequencyPeriod1::builder()`].
5596#[allow(clippy::struct_field_names)]
5597#[derive(Default)]
5598pub struct FrequencyPeriod1Builder {
5599    tp: ::std::option::Option<Frequency6Code>,
5600    cnt_per_prd: ::std::option::Option<DecimalNumber>,
5601}
5602impl FrequencyPeriod1Builder {
5603    /// Set the `tp` field.
5604    #[must_use]
5605    pub fn tp(mut self, value: Frequency6Code) -> FrequencyPeriod1Builder {
5606        self.tp = ::std::option::Option::Some(value);
5607        self
5608    }
5609    /// Set the `cnt_per_prd` field.
5610    #[must_use]
5611    pub fn cnt_per_prd(mut self, value: DecimalNumber) -> FrequencyPeriod1Builder {
5612        self.cnt_per_prd = ::std::option::Option::Some(value);
5613        self
5614    }
5615    /// Validate required fields and construct the type.
5616    ///
5617    /// # Errors
5618    ///
5619    /// Returns [`crate::common::BuilderError`] listing the names of any
5620    /// required fields that were not set.
5621    ///
5622    /// # Panics
5623    ///
5624    /// Does not panic — all `.unwrap()` calls are guarded by the
5625    /// missing-field check above.
5626    pub fn build(self) -> ::std::result::Result<FrequencyPeriod1, crate::common::BuilderError> {
5627        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5628        if self.tp.is_none() {
5629            missing.push("tp".to_owned());
5630        }
5631        if self.cnt_per_prd.is_none() {
5632            missing.push("cnt_per_prd".to_owned());
5633        }
5634        if !missing.is_empty() {
5635            return ::std::result::Result::Err(crate::common::BuilderError {
5636                type_name: "FrequencyPeriod1".to_owned(),
5637                missing_fields: missing,
5638            });
5639        }
5640        ::std::result::Result::Ok(FrequencyPeriod1 {
5641            tp: self.tp.unwrap(),
5642            cnt_per_prd: self.cnt_per_prd.unwrap(),
5643        })
5644    }
5645}
5646impl FrequencyPeriod1 {
5647    /// Return a new builder for this type.
5648    #[must_use]
5649    pub fn builder() -> FrequencyPeriod1Builder {
5650        FrequencyPeriod1Builder::default()
5651    }
5652}
5653#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5654pub struct Garnishment3 {
5655    #[serde(rename = "Tp")]
5656    pub tp: GarnishmentType1,
5657    #[serde(rename = "Grnshee")]
5658    #[serde(skip_serializing_if = "Option::is_none")]
5659    pub grnshee: Option<PartyIdentification135>,
5660    #[serde(rename = "GrnshmtAdmstr")]
5661    #[serde(skip_serializing_if = "Option::is_none")]
5662    pub grnshmt_admstr: Option<PartyIdentification135>,
5663    #[serde(rename = "RefNb")]
5664    #[serde(skip_serializing_if = "Option::is_none")]
5665    pub ref_nb: Option<Max140Text>,
5666    #[serde(rename = "Dt")]
5667    #[serde(skip_serializing_if = "Option::is_none")]
5668    pub dt: Option<ISODate>,
5669    #[serde(rename = "RmtdAmt")]
5670    #[serde(skip_serializing_if = "Option::is_none")]
5671    pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
5672    #[serde(rename = "FmlyMdclInsrncInd")]
5673    #[serde(skip_serializing_if = "Option::is_none")]
5674    pub fmly_mdcl_insrnc_ind: Option<TrueFalseIndicator>,
5675    #[serde(rename = "MplyeeTermntnInd")]
5676    #[serde(skip_serializing_if = "Option::is_none")]
5677    pub mplyee_termntn_ind: Option<TrueFalseIndicator>,
5678}
5679/// Builder for [`Garnishment3`]. Construct via [`Garnishment3::builder()`].
5680#[allow(clippy::struct_field_names)]
5681#[derive(Default)]
5682pub struct Garnishment3Builder {
5683    tp: ::std::option::Option<GarnishmentType1>,
5684    grnshee: ::std::option::Option<PartyIdentification135>,
5685    grnshmt_admstr: ::std::option::Option<PartyIdentification135>,
5686    ref_nb: ::std::option::Option<Max140Text>,
5687    dt: ::std::option::Option<ISODate>,
5688    rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5689    fmly_mdcl_insrnc_ind: ::std::option::Option<TrueFalseIndicator>,
5690    mplyee_termntn_ind: ::std::option::Option<TrueFalseIndicator>,
5691}
5692impl Garnishment3Builder {
5693    /// Set the `tp` field.
5694    #[must_use]
5695    pub fn tp(mut self, value: GarnishmentType1) -> Garnishment3Builder {
5696        self.tp = ::std::option::Option::Some(value);
5697        self
5698    }
5699    /// Set the `grnshee` field.
5700    #[must_use]
5701    pub fn grnshee(mut self, value: PartyIdentification135) -> Garnishment3Builder {
5702        self.grnshee = ::std::option::Option::Some(value);
5703        self
5704    }
5705    /// Set the `grnshmt_admstr` field.
5706    #[must_use]
5707    pub fn grnshmt_admstr(mut self, value: PartyIdentification135) -> Garnishment3Builder {
5708        self.grnshmt_admstr = ::std::option::Option::Some(value);
5709        self
5710    }
5711    /// Set the `ref_nb` field.
5712    #[must_use]
5713    pub fn ref_nb(mut self, value: Max140Text) -> Garnishment3Builder {
5714        self.ref_nb = ::std::option::Option::Some(value);
5715        self
5716    }
5717    /// Set the `dt` field.
5718    #[must_use]
5719    pub fn dt(mut self, value: ISODate) -> Garnishment3Builder {
5720        self.dt = ::std::option::Option::Some(value);
5721        self
5722    }
5723    /// Set the `rmtd_amt` field.
5724    #[must_use]
5725    pub fn rmtd_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Garnishment3Builder {
5726        self.rmtd_amt = ::std::option::Option::Some(value);
5727        self
5728    }
5729    /// Set the `fmly_mdcl_insrnc_ind` field.
5730    #[must_use]
5731    pub fn fmly_mdcl_insrnc_ind(mut self, value: TrueFalseIndicator) -> Garnishment3Builder {
5732        self.fmly_mdcl_insrnc_ind = ::std::option::Option::Some(value);
5733        self
5734    }
5735    /// Set the `mplyee_termntn_ind` field.
5736    #[must_use]
5737    pub fn mplyee_termntn_ind(mut self, value: TrueFalseIndicator) -> Garnishment3Builder {
5738        self.mplyee_termntn_ind = ::std::option::Option::Some(value);
5739        self
5740    }
5741    /// Validate required fields and construct the type.
5742    ///
5743    /// # Errors
5744    ///
5745    /// Returns [`crate::common::BuilderError`] listing the names of any
5746    /// required fields that were not set.
5747    ///
5748    /// # Panics
5749    ///
5750    /// Does not panic — all `.unwrap()` calls are guarded by the
5751    /// missing-field check above.
5752    pub fn build(self) -> ::std::result::Result<Garnishment3, crate::common::BuilderError> {
5753        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5754        if self.tp.is_none() {
5755            missing.push("tp".to_owned());
5756        }
5757        if !missing.is_empty() {
5758            return ::std::result::Result::Err(crate::common::BuilderError {
5759                type_name: "Garnishment3".to_owned(),
5760                missing_fields: missing,
5761            });
5762        }
5763        ::std::result::Result::Ok(Garnishment3 {
5764            tp: self.tp.unwrap(),
5765            grnshee: self.grnshee,
5766            grnshmt_admstr: self.grnshmt_admstr,
5767            ref_nb: self.ref_nb,
5768            dt: self.dt,
5769            rmtd_amt: self.rmtd_amt,
5770            fmly_mdcl_insrnc_ind: self.fmly_mdcl_insrnc_ind,
5771            mplyee_termntn_ind: self.mplyee_termntn_ind,
5772        })
5773    }
5774}
5775impl Garnishment3 {
5776    /// Return a new builder for this type.
5777    #[must_use]
5778    pub fn builder() -> Garnishment3Builder {
5779        Garnishment3Builder::default()
5780    }
5781}
5782#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5783pub struct GarnishmentType1 {
5784    #[serde(rename = "CdOrPrtry")]
5785    pub cd_or_prtry: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5786    #[serde(rename = "Issr")]
5787    #[serde(skip_serializing_if = "Option::is_none")]
5788    pub issr: Option<Max35Text>,
5789}
5790/// Builder for [`GarnishmentType1`]. Construct via [`GarnishmentType1::builder()`].
5791#[allow(clippy::struct_field_names)]
5792#[derive(Default)]
5793pub struct GarnishmentType1Builder {
5794    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<GarnishmentType1Choice>>,
5795    issr: ::std::option::Option<Max35Text>,
5796}
5797impl GarnishmentType1Builder {
5798    /// Set the `cd_or_prtry` field.
5799    #[must_use]
5800    pub fn cd_or_prtry(
5801        mut self,
5802        value: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5803    ) -> GarnishmentType1Builder {
5804        self.cd_or_prtry = ::std::option::Option::Some(value);
5805        self
5806    }
5807    /// Set the `issr` field.
5808    #[must_use]
5809    pub fn issr(mut self, value: Max35Text) -> GarnishmentType1Builder {
5810        self.issr = ::std::option::Option::Some(value);
5811        self
5812    }
5813    /// Validate required fields and construct the type.
5814    ///
5815    /// # Errors
5816    ///
5817    /// Returns [`crate::common::BuilderError`] listing the names of any
5818    /// required fields that were not set.
5819    ///
5820    /// # Panics
5821    ///
5822    /// Does not panic — all `.unwrap()` calls are guarded by the
5823    /// missing-field check above.
5824    pub fn build(self) -> ::std::result::Result<GarnishmentType1, crate::common::BuilderError> {
5825        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5826        if self.cd_or_prtry.is_none() {
5827            missing.push("cd_or_prtry".to_owned());
5828        }
5829        if !missing.is_empty() {
5830            return ::std::result::Result::Err(crate::common::BuilderError {
5831                type_name: "GarnishmentType1".to_owned(),
5832                missing_fields: missing,
5833            });
5834        }
5835        ::std::result::Result::Ok(GarnishmentType1 {
5836            cd_or_prtry: self.cd_or_prtry.unwrap(),
5837            issr: self.issr,
5838        })
5839    }
5840}
5841impl GarnishmentType1 {
5842    /// Return a new builder for this type.
5843    #[must_use]
5844    pub fn builder() -> GarnishmentType1Builder {
5845        GarnishmentType1Builder::default()
5846    }
5847}
5848#[allow(clippy::large_enum_variant)]
5849#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5850pub enum GarnishmentType1Choice {
5851    #[serde(rename = "Cd")]
5852    Cd(ExternalGarnishmentType1Code),
5853    #[serde(rename = "Prtry")]
5854    Prtry(Max35Text),
5855}
5856#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5857pub struct GenericAccountIdentification1 {
5858    #[serde(rename = "Id")]
5859    pub id: Max34Text,
5860    #[serde(rename = "SchmeNm")]
5861    #[serde(skip_serializing_if = "Option::is_none")]
5862    pub schme_nm: Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5863    #[serde(rename = "Issr")]
5864    #[serde(skip_serializing_if = "Option::is_none")]
5865    pub issr: Option<Max35Text>,
5866}
5867/// Builder for [`GenericAccountIdentification1`]. Construct via [`GenericAccountIdentification1::builder()`].
5868#[allow(clippy::struct_field_names)]
5869#[derive(Default)]
5870pub struct GenericAccountIdentification1Builder {
5871    id: ::std::option::Option<Max34Text>,
5872    schme_nm: ::std::option::Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5873    issr: ::std::option::Option<Max35Text>,
5874}
5875impl GenericAccountIdentification1Builder {
5876    /// Set the `id` field.
5877    #[must_use]
5878    pub fn id(mut self, value: Max34Text) -> GenericAccountIdentification1Builder {
5879        self.id = ::std::option::Option::Some(value);
5880        self
5881    }
5882    /// Set the `schme_nm` field.
5883    #[must_use]
5884    pub fn schme_nm(
5885        mut self,
5886        value: crate::common::ChoiceWrapper<AccountSchemeName1Choice>,
5887    ) -> GenericAccountIdentification1Builder {
5888        self.schme_nm = ::std::option::Option::Some(value);
5889        self
5890    }
5891    /// Set the `issr` field.
5892    #[must_use]
5893    pub fn issr(mut self, value: Max35Text) -> GenericAccountIdentification1Builder {
5894        self.issr = ::std::option::Option::Some(value);
5895        self
5896    }
5897    /// Validate required fields and construct the type.
5898    ///
5899    /// # Errors
5900    ///
5901    /// Returns [`crate::common::BuilderError`] listing the names of any
5902    /// required fields that were not set.
5903    ///
5904    /// # Panics
5905    ///
5906    /// Does not panic — all `.unwrap()` calls are guarded by the
5907    /// missing-field check above.
5908    pub fn build(
5909        self,
5910    ) -> ::std::result::Result<GenericAccountIdentification1, crate::common::BuilderError> {
5911        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5912        if self.id.is_none() {
5913            missing.push("id".to_owned());
5914        }
5915        if !missing.is_empty() {
5916            return ::std::result::Result::Err(crate::common::BuilderError {
5917                type_name: "GenericAccountIdentification1".to_owned(),
5918                missing_fields: missing,
5919            });
5920        }
5921        ::std::result::Result::Ok(GenericAccountIdentification1 {
5922            id: self.id.unwrap(),
5923            schme_nm: self.schme_nm,
5924            issr: self.issr,
5925        })
5926    }
5927}
5928impl GenericAccountIdentification1 {
5929    /// Return a new builder for this type.
5930    #[must_use]
5931    pub fn builder() -> GenericAccountIdentification1Builder {
5932        GenericAccountIdentification1Builder::default()
5933    }
5934}
5935#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5936pub struct GenericFinancialIdentification1 {
5937    #[serde(rename = "Id")]
5938    pub id: Max35Text,
5939    #[serde(rename = "SchmeNm")]
5940    #[serde(skip_serializing_if = "Option::is_none")]
5941    pub schme_nm: Option<crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>>,
5942    #[serde(rename = "Issr")]
5943    #[serde(skip_serializing_if = "Option::is_none")]
5944    pub issr: Option<Max35Text>,
5945}
5946/// Builder for [`GenericFinancialIdentification1`]. Construct via [`GenericFinancialIdentification1::builder()`].
5947#[allow(clippy::struct_field_names)]
5948#[derive(Default)]
5949pub struct GenericFinancialIdentification1Builder {
5950    id: ::std::option::Option<Max35Text>,
5951    schme_nm: ::std::option::Option<
5952        crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5953    >,
5954    issr: ::std::option::Option<Max35Text>,
5955}
5956impl GenericFinancialIdentification1Builder {
5957    /// Set the `id` field.
5958    #[must_use]
5959    pub fn id(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5960        self.id = ::std::option::Option::Some(value);
5961        self
5962    }
5963    /// Set the `schme_nm` field.
5964    #[must_use]
5965    pub fn schme_nm(
5966        mut self,
5967        value: crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5968    ) -> GenericFinancialIdentification1Builder {
5969        self.schme_nm = ::std::option::Option::Some(value);
5970        self
5971    }
5972    /// Set the `issr` field.
5973    #[must_use]
5974    pub fn issr(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5975        self.issr = ::std::option::Option::Some(value);
5976        self
5977    }
5978    /// Validate required fields and construct the type.
5979    ///
5980    /// # Errors
5981    ///
5982    /// Returns [`crate::common::BuilderError`] listing the names of any
5983    /// required fields that were not set.
5984    ///
5985    /// # Panics
5986    ///
5987    /// Does not panic — all `.unwrap()` calls are guarded by the
5988    /// missing-field check above.
5989    pub fn build(
5990        self,
5991    ) -> ::std::result::Result<GenericFinancialIdentification1, crate::common::BuilderError> {
5992        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5993        if self.id.is_none() {
5994            missing.push("id".to_owned());
5995        }
5996        if !missing.is_empty() {
5997            return ::std::result::Result::Err(crate::common::BuilderError {
5998                type_name: "GenericFinancialIdentification1".to_owned(),
5999                missing_fields: missing,
6000            });
6001        }
6002        ::std::result::Result::Ok(GenericFinancialIdentification1 {
6003            id: self.id.unwrap(),
6004            schme_nm: self.schme_nm,
6005            issr: self.issr,
6006        })
6007    }
6008}
6009impl GenericFinancialIdentification1 {
6010    /// Return a new builder for this type.
6011    #[must_use]
6012    pub fn builder() -> GenericFinancialIdentification1Builder {
6013        GenericFinancialIdentification1Builder::default()
6014    }
6015}
6016#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6017pub struct GenericIdentification30 {
6018    #[serde(rename = "Id")]
6019    pub id: Exact4AlphaNumericText,
6020    #[serde(rename = "Issr")]
6021    pub issr: Max35Text,
6022    #[serde(rename = "SchmeNm")]
6023    #[serde(skip_serializing_if = "Option::is_none")]
6024    pub schme_nm: Option<Max35Text>,
6025}
6026/// Builder for [`GenericIdentification30`]. Construct via [`GenericIdentification30::builder()`].
6027#[allow(clippy::struct_field_names)]
6028#[derive(Default)]
6029pub struct GenericIdentification30Builder {
6030    id: ::std::option::Option<Exact4AlphaNumericText>,
6031    issr: ::std::option::Option<Max35Text>,
6032    schme_nm: ::std::option::Option<Max35Text>,
6033}
6034impl GenericIdentification30Builder {
6035    /// Set the `id` field.
6036    #[must_use]
6037    pub fn id(mut self, value: Exact4AlphaNumericText) -> GenericIdentification30Builder {
6038        self.id = ::std::option::Option::Some(value);
6039        self
6040    }
6041    /// Set the `issr` field.
6042    #[must_use]
6043    pub fn issr(mut self, value: Max35Text) -> GenericIdentification30Builder {
6044        self.issr = ::std::option::Option::Some(value);
6045        self
6046    }
6047    /// Set the `schme_nm` field.
6048    #[must_use]
6049    pub fn schme_nm(mut self, value: Max35Text) -> GenericIdentification30Builder {
6050        self.schme_nm = ::std::option::Option::Some(value);
6051        self
6052    }
6053    /// Validate required fields and construct the type.
6054    ///
6055    /// # Errors
6056    ///
6057    /// Returns [`crate::common::BuilderError`] listing the names of any
6058    /// required fields that were not set.
6059    ///
6060    /// # Panics
6061    ///
6062    /// Does not panic — all `.unwrap()` calls are guarded by the
6063    /// missing-field check above.
6064    pub fn build(
6065        self,
6066    ) -> ::std::result::Result<GenericIdentification30, crate::common::BuilderError> {
6067        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6068        if self.id.is_none() {
6069            missing.push("id".to_owned());
6070        }
6071        if self.issr.is_none() {
6072            missing.push("issr".to_owned());
6073        }
6074        if !missing.is_empty() {
6075            return ::std::result::Result::Err(crate::common::BuilderError {
6076                type_name: "GenericIdentification30".to_owned(),
6077                missing_fields: missing,
6078            });
6079        }
6080        ::std::result::Result::Ok(GenericIdentification30 {
6081            id: self.id.unwrap(),
6082            issr: self.issr.unwrap(),
6083            schme_nm: self.schme_nm,
6084        })
6085    }
6086}
6087impl GenericIdentification30 {
6088    /// Return a new builder for this type.
6089    #[must_use]
6090    pub fn builder() -> GenericIdentification30Builder {
6091        GenericIdentification30Builder::default()
6092    }
6093}
6094#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6095pub struct GenericOrganisationIdentification1 {
6096    #[serde(rename = "Id")]
6097    pub id: Max35Text,
6098    #[serde(rename = "SchmeNm")]
6099    #[serde(skip_serializing_if = "Option::is_none")]
6100    pub schme_nm: Option<crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>>,
6101    #[serde(rename = "Issr")]
6102    #[serde(skip_serializing_if = "Option::is_none")]
6103    pub issr: Option<Max35Text>,
6104}
6105/// Builder for [`GenericOrganisationIdentification1`]. Construct via [`GenericOrganisationIdentification1::builder()`].
6106#[allow(clippy::struct_field_names)]
6107#[derive(Default)]
6108pub struct GenericOrganisationIdentification1Builder {
6109    id: ::std::option::Option<Max35Text>,
6110    schme_nm: ::std::option::Option<
6111        crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
6112    >,
6113    issr: ::std::option::Option<Max35Text>,
6114}
6115impl GenericOrganisationIdentification1Builder {
6116    /// Set the `id` field.
6117    #[must_use]
6118    pub fn id(mut self, value: Max35Text) -> GenericOrganisationIdentification1Builder {
6119        self.id = ::std::option::Option::Some(value);
6120        self
6121    }
6122    /// Set the `schme_nm` field.
6123    #[must_use]
6124    pub fn schme_nm(
6125        mut self,
6126        value: crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
6127    ) -> GenericOrganisationIdentification1Builder {
6128        self.schme_nm = ::std::option::Option::Some(value);
6129        self
6130    }
6131    /// Set the `issr` field.
6132    #[must_use]
6133    pub fn issr(mut self, value: Max35Text) -> GenericOrganisationIdentification1Builder {
6134        self.issr = ::std::option::Option::Some(value);
6135        self
6136    }
6137    /// Validate required fields and construct the type.
6138    ///
6139    /// # Errors
6140    ///
6141    /// Returns [`crate::common::BuilderError`] listing the names of any
6142    /// required fields that were not set.
6143    ///
6144    /// # Panics
6145    ///
6146    /// Does not panic — all `.unwrap()` calls are guarded by the
6147    /// missing-field check above.
6148    pub fn build(
6149        self,
6150    ) -> ::std::result::Result<GenericOrganisationIdentification1, crate::common::BuilderError>
6151    {
6152        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6153        if self.id.is_none() {
6154            missing.push("id".to_owned());
6155        }
6156        if !missing.is_empty() {
6157            return ::std::result::Result::Err(crate::common::BuilderError {
6158                type_name: "GenericOrganisationIdentification1".to_owned(),
6159                missing_fields: missing,
6160            });
6161        }
6162        ::std::result::Result::Ok(GenericOrganisationIdentification1 {
6163            id: self.id.unwrap(),
6164            schme_nm: self.schme_nm,
6165            issr: self.issr,
6166        })
6167    }
6168}
6169impl GenericOrganisationIdentification1 {
6170    /// Return a new builder for this type.
6171    #[must_use]
6172    pub fn builder() -> GenericOrganisationIdentification1Builder {
6173        GenericOrganisationIdentification1Builder::default()
6174    }
6175}
6176#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6177pub struct GenericPersonIdentification1 {
6178    #[serde(rename = "Id")]
6179    pub id: Max35Text,
6180    #[serde(rename = "SchmeNm")]
6181    #[serde(skip_serializing_if = "Option::is_none")]
6182    pub schme_nm: Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
6183    #[serde(rename = "Issr")]
6184    #[serde(skip_serializing_if = "Option::is_none")]
6185    pub issr: Option<Max35Text>,
6186}
6187/// Builder for [`GenericPersonIdentification1`]. Construct via [`GenericPersonIdentification1::builder()`].
6188#[allow(clippy::struct_field_names)]
6189#[derive(Default)]
6190pub struct GenericPersonIdentification1Builder {
6191    id: ::std::option::Option<Max35Text>,
6192    schme_nm:
6193        ::std::option::Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
6194    issr: ::std::option::Option<Max35Text>,
6195}
6196impl GenericPersonIdentification1Builder {
6197    /// Set the `id` field.
6198    #[must_use]
6199    pub fn id(mut self, value: Max35Text) -> GenericPersonIdentification1Builder {
6200        self.id = ::std::option::Option::Some(value);
6201        self
6202    }
6203    /// Set the `schme_nm` field.
6204    #[must_use]
6205    pub fn schme_nm(
6206        mut self,
6207        value: crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>,
6208    ) -> GenericPersonIdentification1Builder {
6209        self.schme_nm = ::std::option::Option::Some(value);
6210        self
6211    }
6212    /// Set the `issr` field.
6213    #[must_use]
6214    pub fn issr(mut self, value: Max35Text) -> GenericPersonIdentification1Builder {
6215        self.issr = ::std::option::Option::Some(value);
6216        self
6217    }
6218    /// Validate required fields and construct the type.
6219    ///
6220    /// # Errors
6221    ///
6222    /// Returns [`crate::common::BuilderError`] listing the names of any
6223    /// required fields that were not set.
6224    ///
6225    /// # Panics
6226    ///
6227    /// Does not panic — all `.unwrap()` calls are guarded by the
6228    /// missing-field check above.
6229    pub fn build(
6230        self,
6231    ) -> ::std::result::Result<GenericPersonIdentification1, crate::common::BuilderError> {
6232        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6233        if self.id.is_none() {
6234            missing.push("id".to_owned());
6235        }
6236        if !missing.is_empty() {
6237            return ::std::result::Result::Err(crate::common::BuilderError {
6238                type_name: "GenericPersonIdentification1".to_owned(),
6239                missing_fields: missing,
6240            });
6241        }
6242        ::std::result::Result::Ok(GenericPersonIdentification1 {
6243            id: self.id.unwrap(),
6244            schme_nm: self.schme_nm,
6245            issr: self.issr,
6246        })
6247    }
6248}
6249impl GenericPersonIdentification1 {
6250    /// Return a new builder for this type.
6251    #[must_use]
6252    pub fn builder() -> GenericPersonIdentification1Builder {
6253        GenericPersonIdentification1Builder::default()
6254    }
6255}
6256#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6257pub struct GroupHeader99 {
6258    #[serde(rename = "MsgId")]
6259    pub msg_id: Max35Text,
6260    #[serde(rename = "CreDtTm")]
6261    pub cre_dt_tm: ISODateTime,
6262    #[serde(rename = "Authstn")]
6263    /// Maximum 2 occurrences.
6264    #[serde(default)]
6265    #[serde(skip_serializing_if = "Vec::is_empty")]
6266    pub authstn: Vec<crate::common::ChoiceWrapper<Authorisation1Choice>>,
6267    #[serde(rename = "BtchBookg")]
6268    #[serde(skip_serializing_if = "Option::is_none")]
6269    pub btch_bookg: Option<BatchBookingIndicator>,
6270    #[serde(rename = "NbOfTxs")]
6271    pub nb_of_txs: Max15NumericText,
6272    #[serde(rename = "CtrlSum")]
6273    #[serde(skip_serializing_if = "Option::is_none")]
6274    pub ctrl_sum: Option<DecimalNumber>,
6275    #[serde(rename = "GrpRtr")]
6276    #[serde(skip_serializing_if = "Option::is_none")]
6277    pub grp_rtr: Option<TrueFalseIndicator>,
6278    #[serde(rename = "TtlRtrdIntrBkSttlmAmt")]
6279    #[serde(skip_serializing_if = "Option::is_none")]
6280    pub ttl_rtrd_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
6281    #[serde(rename = "IntrBkSttlmDt")]
6282    #[serde(skip_serializing_if = "Option::is_none")]
6283    pub intr_bk_sttlm_dt: Option<ISODate>,
6284    #[serde(rename = "SttlmInf")]
6285    pub sttlm_inf: SettlementInstruction11,
6286    #[serde(rename = "PmtTpInf")]
6287    #[serde(skip_serializing_if = "Option::is_none")]
6288    pub pmt_tp_inf: Option<PaymentTypeInformation28>,
6289    #[serde(rename = "InstgAgt")]
6290    #[serde(skip_serializing_if = "Option::is_none")]
6291    pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
6292    #[serde(rename = "InstdAgt")]
6293    #[serde(skip_serializing_if = "Option::is_none")]
6294    pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
6295}
6296/// Builder for [`GroupHeader99`]. Construct via [`GroupHeader99::builder()`].
6297#[allow(clippy::struct_field_names)]
6298#[derive(Default)]
6299pub struct GroupHeader99Builder {
6300    msg_id: ::std::option::Option<Max35Text>,
6301    cre_dt_tm: ::std::option::Option<ISODateTime>,
6302    authstn: ::std::vec::Vec<crate::common::ChoiceWrapper<Authorisation1Choice>>,
6303    btch_bookg: ::std::option::Option<BatchBookingIndicator>,
6304    nb_of_txs: ::std::option::Option<Max15NumericText>,
6305    ctrl_sum: ::std::option::Option<DecimalNumber>,
6306    grp_rtr: ::std::option::Option<TrueFalseIndicator>,
6307    ttl_rtrd_intr_bk_sttlm_amt: ::std::option::Option<ActiveCurrencyAndAmount>,
6308    intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
6309    sttlm_inf: ::std::option::Option<SettlementInstruction11>,
6310    pmt_tp_inf: ::std::option::Option<PaymentTypeInformation28>,
6311    instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
6312    instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
6313}
6314impl GroupHeader99Builder {
6315    /// Set the `msg_id` field.
6316    #[must_use]
6317    pub fn msg_id(mut self, value: Max35Text) -> GroupHeader99Builder {
6318        self.msg_id = ::std::option::Option::Some(value);
6319        self
6320    }
6321    /// Set the `cre_dt_tm` field.
6322    #[must_use]
6323    pub fn cre_dt_tm(mut self, value: ISODateTime) -> GroupHeader99Builder {
6324        self.cre_dt_tm = ::std::option::Option::Some(value);
6325        self
6326    }
6327    /// Set the `authstn` field (replaces any previously added items).
6328    #[must_use]
6329    pub fn authstn(
6330        mut self,
6331        value: ::std::vec::Vec<crate::common::ChoiceWrapper<Authorisation1Choice>>,
6332    ) -> GroupHeader99Builder {
6333        self.authstn = value;
6334        self
6335    }
6336    /// Append one item to the `authstn` field.
6337    #[must_use]
6338    pub fn add_authstn(
6339        mut self,
6340        value: crate::common::ChoiceWrapper<Authorisation1Choice>,
6341    ) -> GroupHeader99Builder {
6342        self.authstn.push(value);
6343        self
6344    }
6345    /// Set the `btch_bookg` field.
6346    #[must_use]
6347    pub fn btch_bookg(mut self, value: BatchBookingIndicator) -> GroupHeader99Builder {
6348        self.btch_bookg = ::std::option::Option::Some(value);
6349        self
6350    }
6351    /// Set the `nb_of_txs` field.
6352    #[must_use]
6353    pub fn nb_of_txs(mut self, value: Max15NumericText) -> GroupHeader99Builder {
6354        self.nb_of_txs = ::std::option::Option::Some(value);
6355        self
6356    }
6357    /// Set the `ctrl_sum` field.
6358    #[must_use]
6359    pub fn ctrl_sum(mut self, value: DecimalNumber) -> GroupHeader99Builder {
6360        self.ctrl_sum = ::std::option::Option::Some(value);
6361        self
6362    }
6363    /// Set the `grp_rtr` field.
6364    #[must_use]
6365    pub fn grp_rtr(mut self, value: TrueFalseIndicator) -> GroupHeader99Builder {
6366        self.grp_rtr = ::std::option::Option::Some(value);
6367        self
6368    }
6369    /// Set the `ttl_rtrd_intr_bk_sttlm_amt` field.
6370    #[must_use]
6371    pub fn ttl_rtrd_intr_bk_sttlm_amt(
6372        mut self,
6373        value: ActiveCurrencyAndAmount,
6374    ) -> GroupHeader99Builder {
6375        self.ttl_rtrd_intr_bk_sttlm_amt = ::std::option::Option::Some(value);
6376        self
6377    }
6378    /// Set the `intr_bk_sttlm_dt` field.
6379    #[must_use]
6380    pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> GroupHeader99Builder {
6381        self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
6382        self
6383    }
6384    /// Set the `sttlm_inf` field.
6385    #[must_use]
6386    pub fn sttlm_inf(mut self, value: SettlementInstruction11) -> GroupHeader99Builder {
6387        self.sttlm_inf = ::std::option::Option::Some(value);
6388        self
6389    }
6390    /// Set the `pmt_tp_inf` field.
6391    #[must_use]
6392    pub fn pmt_tp_inf(mut self, value: PaymentTypeInformation28) -> GroupHeader99Builder {
6393        self.pmt_tp_inf = ::std::option::Option::Some(value);
6394        self
6395    }
6396    /// Set the `instg_agt` field.
6397    #[must_use]
6398    pub fn instg_agt(
6399        mut self,
6400        value: BranchAndFinancialInstitutionIdentification6,
6401    ) -> GroupHeader99Builder {
6402        self.instg_agt = ::std::option::Option::Some(value);
6403        self
6404    }
6405    /// Set the `instd_agt` field.
6406    #[must_use]
6407    pub fn instd_agt(
6408        mut self,
6409        value: BranchAndFinancialInstitutionIdentification6,
6410    ) -> GroupHeader99Builder {
6411        self.instd_agt = ::std::option::Option::Some(value);
6412        self
6413    }
6414    /// Validate required fields and construct the type.
6415    ///
6416    /// # Errors
6417    ///
6418    /// Returns [`crate::common::BuilderError`] listing the names of any
6419    /// required fields that were not set.
6420    ///
6421    /// # Panics
6422    ///
6423    /// Does not panic — all `.unwrap()` calls are guarded by the
6424    /// missing-field check above.
6425    pub fn build(self) -> ::std::result::Result<GroupHeader99, crate::common::BuilderError> {
6426        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6427        if self.msg_id.is_none() {
6428            missing.push("msg_id".to_owned());
6429        }
6430        if self.cre_dt_tm.is_none() {
6431            missing.push("cre_dt_tm".to_owned());
6432        }
6433        if self.nb_of_txs.is_none() {
6434            missing.push("nb_of_txs".to_owned());
6435        }
6436        if self.sttlm_inf.is_none() {
6437            missing.push("sttlm_inf".to_owned());
6438        }
6439        if !missing.is_empty() {
6440            return ::std::result::Result::Err(crate::common::BuilderError {
6441                type_name: "GroupHeader99".to_owned(),
6442                missing_fields: missing,
6443            });
6444        }
6445        ::std::result::Result::Ok(GroupHeader99 {
6446            msg_id: self.msg_id.unwrap(),
6447            cre_dt_tm: self.cre_dt_tm.unwrap(),
6448            authstn: self.authstn,
6449            btch_bookg: self.btch_bookg,
6450            nb_of_txs: self.nb_of_txs.unwrap(),
6451            ctrl_sum: self.ctrl_sum,
6452            grp_rtr: self.grp_rtr,
6453            ttl_rtrd_intr_bk_sttlm_amt: self.ttl_rtrd_intr_bk_sttlm_amt,
6454            intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
6455            sttlm_inf: self.sttlm_inf.unwrap(),
6456            pmt_tp_inf: self.pmt_tp_inf,
6457            instg_agt: self.instg_agt,
6458            instd_agt: self.instd_agt,
6459        })
6460    }
6461}
6462impl GroupHeader99 {
6463    /// Return a new builder for this type.
6464    #[must_use]
6465    pub fn builder() -> GroupHeader99Builder {
6466        GroupHeader99Builder::default()
6467    }
6468}
6469#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6470pub struct InstructionForCreditorAgent3 {
6471    #[serde(rename = "Cd")]
6472    #[serde(skip_serializing_if = "Option::is_none")]
6473    pub cd: Option<ExternalCreditorAgentInstruction1Code>,
6474    #[serde(rename = "InstrInf")]
6475    #[serde(skip_serializing_if = "Option::is_none")]
6476    pub instr_inf: Option<Max140Text>,
6477}
6478/// Builder for [`InstructionForCreditorAgent3`]. Construct via [`InstructionForCreditorAgent3::builder()`].
6479#[allow(clippy::struct_field_names)]
6480#[derive(Default)]
6481pub struct InstructionForCreditorAgent3Builder {
6482    cd: ::std::option::Option<ExternalCreditorAgentInstruction1Code>,
6483    instr_inf: ::std::option::Option<Max140Text>,
6484}
6485impl InstructionForCreditorAgent3Builder {
6486    /// Set the `cd` field.
6487    #[must_use]
6488    pub fn cd(
6489        mut self,
6490        value: ExternalCreditorAgentInstruction1Code,
6491    ) -> InstructionForCreditorAgent3Builder {
6492        self.cd = ::std::option::Option::Some(value);
6493        self
6494    }
6495    /// Set the `instr_inf` field.
6496    #[must_use]
6497    pub fn instr_inf(mut self, value: Max140Text) -> InstructionForCreditorAgent3Builder {
6498        self.instr_inf = ::std::option::Option::Some(value);
6499        self
6500    }
6501    /// Validate required fields and construct the type.
6502    ///
6503    /// # Errors
6504    ///
6505    /// Returns [`crate::common::BuilderError`] listing the names of any
6506    /// required fields that were not set.
6507    ///
6508    /// # Panics
6509    ///
6510    /// Does not panic — all `.unwrap()` calls are guarded by the
6511    /// missing-field check above.
6512    pub fn build(
6513        self,
6514    ) -> ::std::result::Result<InstructionForCreditorAgent3, crate::common::BuilderError> {
6515        ::std::result::Result::Ok(InstructionForCreditorAgent3 {
6516            cd: self.cd,
6517            instr_inf: self.instr_inf,
6518        })
6519    }
6520}
6521impl InstructionForCreditorAgent3 {
6522    /// Return a new builder for this type.
6523    #[must_use]
6524    pub fn builder() -> InstructionForCreditorAgent3Builder {
6525        InstructionForCreditorAgent3Builder::default()
6526    }
6527}
6528#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6529pub struct InstructionForNextAgent1 {
6530    #[serde(rename = "Cd")]
6531    #[serde(skip_serializing_if = "Option::is_none")]
6532    pub cd: Option<Instruction4Code>,
6533    #[serde(rename = "InstrInf")]
6534    #[serde(skip_serializing_if = "Option::is_none")]
6535    pub instr_inf: Option<Max140Text>,
6536}
6537/// Builder for [`InstructionForNextAgent1`]. Construct via [`InstructionForNextAgent1::builder()`].
6538#[allow(clippy::struct_field_names)]
6539#[derive(Default)]
6540pub struct InstructionForNextAgent1Builder {
6541    cd: ::std::option::Option<Instruction4Code>,
6542    instr_inf: ::std::option::Option<Max140Text>,
6543}
6544impl InstructionForNextAgent1Builder {
6545    /// Set the `cd` field.
6546    #[must_use]
6547    pub fn cd(mut self, value: Instruction4Code) -> InstructionForNextAgent1Builder {
6548        self.cd = ::std::option::Option::Some(value);
6549        self
6550    }
6551    /// Set the `instr_inf` field.
6552    #[must_use]
6553    pub fn instr_inf(mut self, value: Max140Text) -> InstructionForNextAgent1Builder {
6554        self.instr_inf = ::std::option::Option::Some(value);
6555        self
6556    }
6557    /// Validate required fields and construct the type.
6558    ///
6559    /// # Errors
6560    ///
6561    /// Returns [`crate::common::BuilderError`] listing the names of any
6562    /// required fields that were not set.
6563    ///
6564    /// # Panics
6565    ///
6566    /// Does not panic — all `.unwrap()` calls are guarded by the
6567    /// missing-field check above.
6568    pub fn build(
6569        self,
6570    ) -> ::std::result::Result<InstructionForNextAgent1, crate::common::BuilderError> {
6571        ::std::result::Result::Ok(InstructionForNextAgent1 {
6572            cd: self.cd,
6573            instr_inf: self.instr_inf,
6574        })
6575    }
6576}
6577impl InstructionForNextAgent1 {
6578    /// Return a new builder for this type.
6579    #[must_use]
6580    pub fn builder() -> InstructionForNextAgent1Builder {
6581        InstructionForNextAgent1Builder::default()
6582    }
6583}
6584#[allow(clippy::large_enum_variant)]
6585#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6586pub enum LocalInstrument2Choice {
6587    #[serde(rename = "Cd")]
6588    Cd(ExternalLocalInstrument1Code),
6589    #[serde(rename = "Prtry")]
6590    Prtry(Max35Text),
6591}
6592#[allow(clippy::large_enum_variant)]
6593#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6594pub enum MandateClassification1Choice {
6595    #[serde(rename = "Cd")]
6596    Cd(MandateClassification1Code),
6597    #[serde(rename = "Prtry")]
6598    Prtry(Max35Text),
6599}
6600#[allow(clippy::large_enum_variant)]
6601#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6602pub enum MandateRelatedData2Choice {
6603    #[serde(rename = "DrctDbtMndt")]
6604    DrctDbtMndt(MandateRelatedInformation15),
6605    #[serde(rename = "CdtTrfMndt")]
6606    CdtTrfMndt(CreditTransferMandateData1),
6607}
6608#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6609pub struct MandateRelatedInformation15 {
6610    #[serde(rename = "MndtId")]
6611    #[serde(skip_serializing_if = "Option::is_none")]
6612    pub mndt_id: Option<Max35Text>,
6613    #[serde(rename = "DtOfSgntr")]
6614    #[serde(skip_serializing_if = "Option::is_none")]
6615    pub dt_of_sgntr: Option<ISODate>,
6616    #[serde(rename = "AmdmntInd")]
6617    #[serde(skip_serializing_if = "Option::is_none")]
6618    pub amdmnt_ind: Option<TrueFalseIndicator>,
6619    #[serde(rename = "AmdmntInfDtls")]
6620    #[serde(skip_serializing_if = "Option::is_none")]
6621    pub amdmnt_inf_dtls: Option<AmendmentInformationDetails14>,
6622    #[serde(rename = "ElctrncSgntr")]
6623    #[serde(skip_serializing_if = "Option::is_none")]
6624    pub elctrnc_sgntr: Option<Max1025Text>,
6625    #[serde(rename = "FrstColltnDt")]
6626    #[serde(skip_serializing_if = "Option::is_none")]
6627    pub frst_colltn_dt: Option<ISODate>,
6628    #[serde(rename = "FnlColltnDt")]
6629    #[serde(skip_serializing_if = "Option::is_none")]
6630    pub fnl_colltn_dt: Option<ISODate>,
6631    #[serde(rename = "Frqcy")]
6632    #[serde(skip_serializing_if = "Option::is_none")]
6633    pub frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
6634    #[serde(rename = "Rsn")]
6635    #[serde(skip_serializing_if = "Option::is_none")]
6636    pub rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
6637    #[serde(rename = "TrckgDays")]
6638    #[serde(skip_serializing_if = "Option::is_none")]
6639    pub trckg_days: Option<Exact2NumericText>,
6640}
6641/// Builder for [`MandateRelatedInformation15`]. Construct via [`MandateRelatedInformation15::builder()`].
6642#[allow(clippy::struct_field_names)]
6643#[derive(Default)]
6644pub struct MandateRelatedInformation15Builder {
6645    mndt_id: ::std::option::Option<Max35Text>,
6646    dt_of_sgntr: ::std::option::Option<ISODate>,
6647    amdmnt_ind: ::std::option::Option<TrueFalseIndicator>,
6648    amdmnt_inf_dtls: ::std::option::Option<AmendmentInformationDetails14>,
6649    elctrnc_sgntr: ::std::option::Option<Max1025Text>,
6650    frst_colltn_dt: ::std::option::Option<ISODate>,
6651    fnl_colltn_dt: ::std::option::Option<ISODate>,
6652    frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
6653    rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
6654    trckg_days: ::std::option::Option<Exact2NumericText>,
6655}
6656impl MandateRelatedInformation15Builder {
6657    /// Set the `mndt_id` field.
6658    #[must_use]
6659    pub fn mndt_id(mut self, value: Max35Text) -> MandateRelatedInformation15Builder {
6660        self.mndt_id = ::std::option::Option::Some(value);
6661        self
6662    }
6663    /// Set the `dt_of_sgntr` field.
6664    #[must_use]
6665    pub fn dt_of_sgntr(mut self, value: ISODate) -> MandateRelatedInformation15Builder {
6666        self.dt_of_sgntr = ::std::option::Option::Some(value);
6667        self
6668    }
6669    /// Set the `amdmnt_ind` field.
6670    #[must_use]
6671    pub fn amdmnt_ind(mut self, value: TrueFalseIndicator) -> MandateRelatedInformation15Builder {
6672        self.amdmnt_ind = ::std::option::Option::Some(value);
6673        self
6674    }
6675    /// Set the `amdmnt_inf_dtls` field.
6676    #[must_use]
6677    pub fn amdmnt_inf_dtls(
6678        mut self,
6679        value: AmendmentInformationDetails14,
6680    ) -> MandateRelatedInformation15Builder {
6681        self.amdmnt_inf_dtls = ::std::option::Option::Some(value);
6682        self
6683    }
6684    /// Set the `elctrnc_sgntr` field.
6685    #[must_use]
6686    pub fn elctrnc_sgntr(mut self, value: Max1025Text) -> MandateRelatedInformation15Builder {
6687        self.elctrnc_sgntr = ::std::option::Option::Some(value);
6688        self
6689    }
6690    /// Set the `frst_colltn_dt` field.
6691    #[must_use]
6692    pub fn frst_colltn_dt(mut self, value: ISODate) -> MandateRelatedInformation15Builder {
6693        self.frst_colltn_dt = ::std::option::Option::Some(value);
6694        self
6695    }
6696    /// Set the `fnl_colltn_dt` field.
6697    #[must_use]
6698    pub fn fnl_colltn_dt(mut self, value: ISODate) -> MandateRelatedInformation15Builder {
6699        self.fnl_colltn_dt = ::std::option::Option::Some(value);
6700        self
6701    }
6702    /// Set the `frqcy` field.
6703    #[must_use]
6704    pub fn frqcy(
6705        mut self,
6706        value: crate::common::ChoiceWrapper<Frequency36Choice>,
6707    ) -> MandateRelatedInformation15Builder {
6708        self.frqcy = ::std::option::Option::Some(value);
6709        self
6710    }
6711    /// Set the `rsn` field.
6712    #[must_use]
6713    pub fn rsn(
6714        mut self,
6715        value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
6716    ) -> MandateRelatedInformation15Builder {
6717        self.rsn = ::std::option::Option::Some(value);
6718        self
6719    }
6720    /// Set the `trckg_days` field.
6721    #[must_use]
6722    pub fn trckg_days(mut self, value: Exact2NumericText) -> MandateRelatedInformation15Builder {
6723        self.trckg_days = ::std::option::Option::Some(value);
6724        self
6725    }
6726    /// Validate required fields and construct the type.
6727    ///
6728    /// # Errors
6729    ///
6730    /// Returns [`crate::common::BuilderError`] listing the names of any
6731    /// required fields that were not set.
6732    ///
6733    /// # Panics
6734    ///
6735    /// Does not panic — all `.unwrap()` calls are guarded by the
6736    /// missing-field check above.
6737    pub fn build(
6738        self,
6739    ) -> ::std::result::Result<MandateRelatedInformation15, crate::common::BuilderError> {
6740        ::std::result::Result::Ok(MandateRelatedInformation15 {
6741            mndt_id: self.mndt_id,
6742            dt_of_sgntr: self.dt_of_sgntr,
6743            amdmnt_ind: self.amdmnt_ind,
6744            amdmnt_inf_dtls: self.amdmnt_inf_dtls,
6745            elctrnc_sgntr: self.elctrnc_sgntr,
6746            frst_colltn_dt: self.frst_colltn_dt,
6747            fnl_colltn_dt: self.fnl_colltn_dt,
6748            frqcy: self.frqcy,
6749            rsn: self.rsn,
6750            trckg_days: self.trckg_days,
6751        })
6752    }
6753}
6754impl MandateRelatedInformation15 {
6755    /// Return a new builder for this type.
6756    #[must_use]
6757    pub fn builder() -> MandateRelatedInformation15Builder {
6758        MandateRelatedInformation15Builder::default()
6759    }
6760}
6761#[allow(clippy::large_enum_variant)]
6762#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6763pub enum MandateSetupReason1Choice {
6764    #[serde(rename = "Cd")]
6765    Cd(ExternalMandateSetupReason1Code),
6766    #[serde(rename = "Prtry")]
6767    Prtry(Max70Text),
6768}
6769#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6770pub struct MandateTypeInformation2 {
6771    #[serde(rename = "SvcLvl")]
6772    #[serde(skip_serializing_if = "Option::is_none")]
6773    pub svc_lvl: Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6774    #[serde(rename = "LclInstrm")]
6775    #[serde(skip_serializing_if = "Option::is_none")]
6776    pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6777    #[serde(rename = "CtgyPurp")]
6778    #[serde(skip_serializing_if = "Option::is_none")]
6779    pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6780    #[serde(rename = "Clssfctn")]
6781    #[serde(skip_serializing_if = "Option::is_none")]
6782    pub clssfctn: Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
6783}
6784/// Builder for [`MandateTypeInformation2`]. Construct via [`MandateTypeInformation2::builder()`].
6785#[allow(clippy::struct_field_names)]
6786#[derive(Default)]
6787pub struct MandateTypeInformation2Builder {
6788    svc_lvl: ::std::option::Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6789    lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6790    ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6791    clssfctn: ::std::option::Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
6792}
6793impl MandateTypeInformation2Builder {
6794    /// Set the `svc_lvl` field.
6795    #[must_use]
6796    pub fn svc_lvl(
6797        mut self,
6798        value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
6799    ) -> MandateTypeInformation2Builder {
6800        self.svc_lvl = ::std::option::Option::Some(value);
6801        self
6802    }
6803    /// Set the `lcl_instrm` field.
6804    #[must_use]
6805    pub fn lcl_instrm(
6806        mut self,
6807        value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
6808    ) -> MandateTypeInformation2Builder {
6809        self.lcl_instrm = ::std::option::Option::Some(value);
6810        self
6811    }
6812    /// Set the `ctgy_purp` field.
6813    #[must_use]
6814    pub fn ctgy_purp(
6815        mut self,
6816        value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
6817    ) -> MandateTypeInformation2Builder {
6818        self.ctgy_purp = ::std::option::Option::Some(value);
6819        self
6820    }
6821    /// Set the `clssfctn` field.
6822    #[must_use]
6823    pub fn clssfctn(
6824        mut self,
6825        value: crate::common::ChoiceWrapper<MandateClassification1Choice>,
6826    ) -> MandateTypeInformation2Builder {
6827        self.clssfctn = ::std::option::Option::Some(value);
6828        self
6829    }
6830    /// Validate required fields and construct the type.
6831    ///
6832    /// # Errors
6833    ///
6834    /// Returns [`crate::common::BuilderError`] listing the names of any
6835    /// required fields that were not set.
6836    ///
6837    /// # Panics
6838    ///
6839    /// Does not panic — all `.unwrap()` calls are guarded by the
6840    /// missing-field check above.
6841    pub fn build(
6842        self,
6843    ) -> ::std::result::Result<MandateTypeInformation2, crate::common::BuilderError> {
6844        ::std::result::Result::Ok(MandateTypeInformation2 {
6845            svc_lvl: self.svc_lvl,
6846            lcl_instrm: self.lcl_instrm,
6847            ctgy_purp: self.ctgy_purp,
6848            clssfctn: self.clssfctn,
6849        })
6850    }
6851}
6852impl MandateTypeInformation2 {
6853    /// Return a new builder for this type.
6854    #[must_use]
6855    pub fn builder() -> MandateTypeInformation2Builder {
6856        MandateTypeInformation2Builder::default()
6857    }
6858}
6859#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6860pub struct OrganisationIdentification29 {
6861    #[serde(rename = "AnyBIC")]
6862    #[serde(skip_serializing_if = "Option::is_none")]
6863    pub any_bic: Option<AnyBICDec2014Identifier>,
6864    #[serde(rename = "LEI")]
6865    #[serde(skip_serializing_if = "Option::is_none")]
6866    pub lei: Option<LEIIdentifier>,
6867    #[serde(rename = "Othr")]
6868    #[serde(default)]
6869    #[serde(skip_serializing_if = "Vec::is_empty")]
6870    pub othr: Vec<GenericOrganisationIdentification1>,
6871}
6872/// Builder for [`OrganisationIdentification29`]. Construct via [`OrganisationIdentification29::builder()`].
6873#[allow(clippy::struct_field_names)]
6874#[derive(Default)]
6875pub struct OrganisationIdentification29Builder {
6876    any_bic: ::std::option::Option<AnyBICDec2014Identifier>,
6877    lei: ::std::option::Option<LEIIdentifier>,
6878    othr: ::std::vec::Vec<GenericOrganisationIdentification1>,
6879}
6880impl OrganisationIdentification29Builder {
6881    /// Set the `any_bic` field.
6882    #[must_use]
6883    pub fn any_bic(
6884        mut self,
6885        value: AnyBICDec2014Identifier,
6886    ) -> OrganisationIdentification29Builder {
6887        self.any_bic = ::std::option::Option::Some(value);
6888        self
6889    }
6890    /// Set the `lei` field.
6891    #[must_use]
6892    pub fn lei(mut self, value: LEIIdentifier) -> OrganisationIdentification29Builder {
6893        self.lei = ::std::option::Option::Some(value);
6894        self
6895    }
6896    /// Set the `othr` field (replaces any previously added items).
6897    #[must_use]
6898    pub fn othr(
6899        mut self,
6900        value: ::std::vec::Vec<GenericOrganisationIdentification1>,
6901    ) -> OrganisationIdentification29Builder {
6902        self.othr = value;
6903        self
6904    }
6905    /// Append one item to the `othr` field.
6906    #[must_use]
6907    pub fn add_othr(
6908        mut self,
6909        value: GenericOrganisationIdentification1,
6910    ) -> OrganisationIdentification29Builder {
6911        self.othr.push(value);
6912        self
6913    }
6914    /// Validate required fields and construct the type.
6915    ///
6916    /// # Errors
6917    ///
6918    /// Returns [`crate::common::BuilderError`] listing the names of any
6919    /// required fields that were not set.
6920    ///
6921    /// # Panics
6922    ///
6923    /// Does not panic — all `.unwrap()` calls are guarded by the
6924    /// missing-field check above.
6925    pub fn build(
6926        self,
6927    ) -> ::std::result::Result<OrganisationIdentification29, crate::common::BuilderError> {
6928        ::std::result::Result::Ok(OrganisationIdentification29 {
6929            any_bic: self.any_bic,
6930            lei: self.lei,
6931            othr: self.othr,
6932        })
6933    }
6934}
6935impl OrganisationIdentification29 {
6936    /// Return a new builder for this type.
6937    #[must_use]
6938    pub fn builder() -> OrganisationIdentification29Builder {
6939        OrganisationIdentification29Builder::default()
6940    }
6941}
6942#[allow(clippy::large_enum_variant)]
6943#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6944pub enum OrganisationIdentificationSchemeName1Choice {
6945    #[serde(rename = "Cd")]
6946    Cd(ExternalOrganisationIdentification1Code),
6947    #[serde(rename = "Prtry")]
6948    Prtry(Max35Text),
6949}
6950#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6951pub struct OriginalGroupHeader18 {
6952    #[serde(rename = "OrgnlMsgId")]
6953    pub orgnl_msg_id: Max35Text,
6954    #[serde(rename = "OrgnlMsgNmId")]
6955    pub orgnl_msg_nm_id: Max35Text,
6956    #[serde(rename = "OrgnlCreDtTm")]
6957    #[serde(skip_serializing_if = "Option::is_none")]
6958    pub orgnl_cre_dt_tm: Option<ISODateTime>,
6959    #[serde(rename = "RtrRsnInf")]
6960    #[serde(default)]
6961    #[serde(skip_serializing_if = "Vec::is_empty")]
6962    pub rtr_rsn_inf: Vec<PaymentReturnReason6>,
6963}
6964/// Builder for [`OriginalGroupHeader18`]. Construct via [`OriginalGroupHeader18::builder()`].
6965#[allow(clippy::struct_field_names)]
6966#[derive(Default)]
6967pub struct OriginalGroupHeader18Builder {
6968    orgnl_msg_id: ::std::option::Option<Max35Text>,
6969    orgnl_msg_nm_id: ::std::option::Option<Max35Text>,
6970    orgnl_cre_dt_tm: ::std::option::Option<ISODateTime>,
6971    rtr_rsn_inf: ::std::vec::Vec<PaymentReturnReason6>,
6972}
6973impl OriginalGroupHeader18Builder {
6974    /// Set the `orgnl_msg_id` field.
6975    #[must_use]
6976    pub fn orgnl_msg_id(mut self, value: Max35Text) -> OriginalGroupHeader18Builder {
6977        self.orgnl_msg_id = ::std::option::Option::Some(value);
6978        self
6979    }
6980    /// Set the `orgnl_msg_nm_id` field.
6981    #[must_use]
6982    pub fn orgnl_msg_nm_id(mut self, value: Max35Text) -> OriginalGroupHeader18Builder {
6983        self.orgnl_msg_nm_id = ::std::option::Option::Some(value);
6984        self
6985    }
6986    /// Set the `orgnl_cre_dt_tm` field.
6987    #[must_use]
6988    pub fn orgnl_cre_dt_tm(mut self, value: ISODateTime) -> OriginalGroupHeader18Builder {
6989        self.orgnl_cre_dt_tm = ::std::option::Option::Some(value);
6990        self
6991    }
6992    /// Set the `rtr_rsn_inf` field (replaces any previously added items).
6993    #[must_use]
6994    pub fn rtr_rsn_inf(
6995        mut self,
6996        value: ::std::vec::Vec<PaymentReturnReason6>,
6997    ) -> OriginalGroupHeader18Builder {
6998        self.rtr_rsn_inf = value;
6999        self
7000    }
7001    /// Append one item to the `rtr_rsn_inf` field.
7002    #[must_use]
7003    pub fn add_rtr_rsn_inf(mut self, value: PaymentReturnReason6) -> OriginalGroupHeader18Builder {
7004        self.rtr_rsn_inf.push(value);
7005        self
7006    }
7007    /// Validate required fields and construct the type.
7008    ///
7009    /// # Errors
7010    ///
7011    /// Returns [`crate::common::BuilderError`] listing the names of any
7012    /// required fields that were not set.
7013    ///
7014    /// # Panics
7015    ///
7016    /// Does not panic — all `.unwrap()` calls are guarded by the
7017    /// missing-field check above.
7018    pub fn build(
7019        self,
7020    ) -> ::std::result::Result<OriginalGroupHeader18, crate::common::BuilderError> {
7021        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7022        if self.orgnl_msg_id.is_none() {
7023            missing.push("orgnl_msg_id".to_owned());
7024        }
7025        if self.orgnl_msg_nm_id.is_none() {
7026            missing.push("orgnl_msg_nm_id".to_owned());
7027        }
7028        if !missing.is_empty() {
7029            return ::std::result::Result::Err(crate::common::BuilderError {
7030                type_name: "OriginalGroupHeader18".to_owned(),
7031                missing_fields: missing,
7032            });
7033        }
7034        ::std::result::Result::Ok(OriginalGroupHeader18 {
7035            orgnl_msg_id: self.orgnl_msg_id.unwrap(),
7036            orgnl_msg_nm_id: self.orgnl_msg_nm_id.unwrap(),
7037            orgnl_cre_dt_tm: self.orgnl_cre_dt_tm,
7038            rtr_rsn_inf: self.rtr_rsn_inf,
7039        })
7040    }
7041}
7042impl OriginalGroupHeader18 {
7043    /// Return a new builder for this type.
7044    #[must_use]
7045    pub fn builder() -> OriginalGroupHeader18Builder {
7046        OriginalGroupHeader18Builder::default()
7047    }
7048}
7049#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7050pub struct OriginalGroupInformation29 {
7051    #[serde(rename = "OrgnlMsgId")]
7052    pub orgnl_msg_id: Max35Text,
7053    #[serde(rename = "OrgnlMsgNmId")]
7054    pub orgnl_msg_nm_id: Max35Text,
7055    #[serde(rename = "OrgnlCreDtTm")]
7056    #[serde(skip_serializing_if = "Option::is_none")]
7057    pub orgnl_cre_dt_tm: Option<ISODateTime>,
7058}
7059/// Builder for [`OriginalGroupInformation29`]. Construct via [`OriginalGroupInformation29::builder()`].
7060#[allow(clippy::struct_field_names)]
7061#[derive(Default)]
7062pub struct OriginalGroupInformation29Builder {
7063    orgnl_msg_id: ::std::option::Option<Max35Text>,
7064    orgnl_msg_nm_id: ::std::option::Option<Max35Text>,
7065    orgnl_cre_dt_tm: ::std::option::Option<ISODateTime>,
7066}
7067impl OriginalGroupInformation29Builder {
7068    /// Set the `orgnl_msg_id` field.
7069    #[must_use]
7070    pub fn orgnl_msg_id(mut self, value: Max35Text) -> OriginalGroupInformation29Builder {
7071        self.orgnl_msg_id = ::std::option::Option::Some(value);
7072        self
7073    }
7074    /// Set the `orgnl_msg_nm_id` field.
7075    #[must_use]
7076    pub fn orgnl_msg_nm_id(mut self, value: Max35Text) -> OriginalGroupInformation29Builder {
7077        self.orgnl_msg_nm_id = ::std::option::Option::Some(value);
7078        self
7079    }
7080    /// Set the `orgnl_cre_dt_tm` field.
7081    #[must_use]
7082    pub fn orgnl_cre_dt_tm(mut self, value: ISODateTime) -> OriginalGroupInformation29Builder {
7083        self.orgnl_cre_dt_tm = ::std::option::Option::Some(value);
7084        self
7085    }
7086    /// Validate required fields and construct the type.
7087    ///
7088    /// # Errors
7089    ///
7090    /// Returns [`crate::common::BuilderError`] listing the names of any
7091    /// required fields that were not set.
7092    ///
7093    /// # Panics
7094    ///
7095    /// Does not panic — all `.unwrap()` calls are guarded by the
7096    /// missing-field check above.
7097    pub fn build(
7098        self,
7099    ) -> ::std::result::Result<OriginalGroupInformation29, crate::common::BuilderError> {
7100        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7101        if self.orgnl_msg_id.is_none() {
7102            missing.push("orgnl_msg_id".to_owned());
7103        }
7104        if self.orgnl_msg_nm_id.is_none() {
7105            missing.push("orgnl_msg_nm_id".to_owned());
7106        }
7107        if !missing.is_empty() {
7108            return ::std::result::Result::Err(crate::common::BuilderError {
7109                type_name: "OriginalGroupInformation29".to_owned(),
7110                missing_fields: missing,
7111            });
7112        }
7113        ::std::result::Result::Ok(OriginalGroupInformation29 {
7114            orgnl_msg_id: self.orgnl_msg_id.unwrap(),
7115            orgnl_msg_nm_id: self.orgnl_msg_nm_id.unwrap(),
7116            orgnl_cre_dt_tm: self.orgnl_cre_dt_tm,
7117        })
7118    }
7119}
7120impl OriginalGroupInformation29 {
7121    /// Return a new builder for this type.
7122    #[must_use]
7123    pub fn builder() -> OriginalGroupInformation29Builder {
7124        OriginalGroupInformation29Builder::default()
7125    }
7126}
7127#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7128pub struct OriginalTransactionReference36 {
7129    #[serde(rename = "IntrBkSttlmAmt")]
7130    #[serde(skip_serializing_if = "Option::is_none")]
7131    pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7132    #[serde(rename = "Amt")]
7133    #[serde(skip_serializing_if = "Option::is_none")]
7134    pub amt: Option<crate::common::ChoiceWrapper<AmountType4Choice>>,
7135    #[serde(rename = "IntrBkSttlmDt")]
7136    #[serde(skip_serializing_if = "Option::is_none")]
7137    pub intr_bk_sttlm_dt: Option<ISODate>,
7138    #[serde(rename = "ReqdColltnDt")]
7139    #[serde(skip_serializing_if = "Option::is_none")]
7140    pub reqd_colltn_dt: Option<ISODate>,
7141    #[serde(rename = "ReqdExctnDt")]
7142    #[serde(skip_serializing_if = "Option::is_none")]
7143    pub reqd_exctn_dt: Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7144    #[serde(rename = "CdtrSchmeId")]
7145    #[serde(skip_serializing_if = "Option::is_none")]
7146    pub cdtr_schme_id: Option<PartyIdentification135>,
7147    #[serde(rename = "SttlmInf")]
7148    #[serde(skip_serializing_if = "Option::is_none")]
7149    pub sttlm_inf: Option<SettlementInstruction11>,
7150    #[serde(rename = "PmtTpInf")]
7151    #[serde(skip_serializing_if = "Option::is_none")]
7152    pub pmt_tp_inf: Option<PaymentTypeInformation27>,
7153    #[serde(rename = "PmtMtd")]
7154    #[serde(skip_serializing_if = "Option::is_none")]
7155    pub pmt_mtd: Option<PaymentMethod4Code>,
7156    #[serde(rename = "MndtRltdInf")]
7157    #[serde(skip_serializing_if = "Option::is_none")]
7158    pub mndt_rltd_inf: Option<crate::common::ChoiceWrapper<MandateRelatedData2Choice>>,
7159    #[serde(rename = "RmtInf")]
7160    #[serde(skip_serializing_if = "Option::is_none")]
7161    pub rmt_inf: Option<RemittanceInformation21>,
7162    #[serde(rename = "UltmtDbtr")]
7163    #[serde(skip_serializing_if = "Option::is_none")]
7164    pub ultmt_dbtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
7165    #[serde(rename = "Dbtr")]
7166    #[serde(skip_serializing_if = "Option::is_none")]
7167    pub dbtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
7168    #[serde(rename = "DbtrAcct")]
7169    #[serde(skip_serializing_if = "Option::is_none")]
7170    pub dbtr_acct: Option<CashAccount40>,
7171    #[serde(rename = "DbtrAgt")]
7172    #[serde(skip_serializing_if = "Option::is_none")]
7173    pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7174    #[serde(rename = "DbtrAgtAcct")]
7175    #[serde(skip_serializing_if = "Option::is_none")]
7176    pub dbtr_agt_acct: Option<CashAccount40>,
7177    #[serde(rename = "CdtrAgt")]
7178    #[serde(skip_serializing_if = "Option::is_none")]
7179    pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7180    #[serde(rename = "CdtrAgtAcct")]
7181    #[serde(skip_serializing_if = "Option::is_none")]
7182    pub cdtr_agt_acct: Option<CashAccount40>,
7183    #[serde(rename = "Cdtr")]
7184    #[serde(skip_serializing_if = "Option::is_none")]
7185    pub cdtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
7186    #[serde(rename = "CdtrAcct")]
7187    #[serde(skip_serializing_if = "Option::is_none")]
7188    pub cdtr_acct: Option<CashAccount40>,
7189    #[serde(rename = "UltmtCdtr")]
7190    #[serde(skip_serializing_if = "Option::is_none")]
7191    pub ultmt_cdtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
7192    #[serde(rename = "Purp")]
7193    #[serde(skip_serializing_if = "Option::is_none")]
7194    pub purp: Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
7195    #[serde(rename = "UndrlygCstmrCdtTrf")]
7196    #[serde(skip_serializing_if = "Option::is_none")]
7197    pub undrlyg_cstmr_cdt_trf: Option<CreditTransferTransaction52>,
7198}
7199/// Builder for [`OriginalTransactionReference36`]. Construct via [`OriginalTransactionReference36::builder()`].
7200#[allow(clippy::struct_field_names)]
7201#[derive(Default)]
7202pub struct OriginalTransactionReference36Builder {
7203    intr_bk_sttlm_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7204    amt: ::std::option::Option<crate::common::ChoiceWrapper<AmountType4Choice>>,
7205    intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
7206    reqd_colltn_dt: ::std::option::Option<ISODate>,
7207    reqd_exctn_dt: ::std::option::Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7208    cdtr_schme_id: ::std::option::Option<PartyIdentification135>,
7209    sttlm_inf: ::std::option::Option<SettlementInstruction11>,
7210    pmt_tp_inf: ::std::option::Option<PaymentTypeInformation27>,
7211    pmt_mtd: ::std::option::Option<PaymentMethod4Code>,
7212    mndt_rltd_inf: ::std::option::Option<crate::common::ChoiceWrapper<MandateRelatedData2Choice>>,
7213    rmt_inf: ::std::option::Option<RemittanceInformation21>,
7214    ultmt_dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
7215    dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
7216    dbtr_acct: ::std::option::Option<CashAccount40>,
7217    dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7218    dbtr_agt_acct: ::std::option::Option<CashAccount40>,
7219    cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7220    cdtr_agt_acct: ::std::option::Option<CashAccount40>,
7221    cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
7222    cdtr_acct: ::std::option::Option<CashAccount40>,
7223    ultmt_cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
7224    purp: ::std::option::Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
7225    undrlyg_cstmr_cdt_trf: ::std::option::Option<CreditTransferTransaction52>,
7226}
7227impl OriginalTransactionReference36Builder {
7228    /// Set the `intr_bk_sttlm_amt` field.
7229    #[must_use]
7230    pub fn intr_bk_sttlm_amt(
7231        mut self,
7232        value: ActiveOrHistoricCurrencyAndAmount,
7233    ) -> OriginalTransactionReference36Builder {
7234        self.intr_bk_sttlm_amt = ::std::option::Option::Some(value);
7235        self
7236    }
7237    /// Set the `amt` field.
7238    #[must_use]
7239    pub fn amt(
7240        mut self,
7241        value: crate::common::ChoiceWrapper<AmountType4Choice>,
7242    ) -> OriginalTransactionReference36Builder {
7243        self.amt = ::std::option::Option::Some(value);
7244        self
7245    }
7246    /// Set the `intr_bk_sttlm_dt` field.
7247    #[must_use]
7248    pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> OriginalTransactionReference36Builder {
7249        self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
7250        self
7251    }
7252    /// Set the `reqd_colltn_dt` field.
7253    #[must_use]
7254    pub fn reqd_colltn_dt(mut self, value: ISODate) -> OriginalTransactionReference36Builder {
7255        self.reqd_colltn_dt = ::std::option::Option::Some(value);
7256        self
7257    }
7258    /// Set the `reqd_exctn_dt` field.
7259    #[must_use]
7260    pub fn reqd_exctn_dt(
7261        mut self,
7262        value: crate::common::ChoiceWrapper<DateAndDateTime2Choice>,
7263    ) -> OriginalTransactionReference36Builder {
7264        self.reqd_exctn_dt = ::std::option::Option::Some(value);
7265        self
7266    }
7267    /// Set the `cdtr_schme_id` field.
7268    #[must_use]
7269    pub fn cdtr_schme_id(
7270        mut self,
7271        value: PartyIdentification135,
7272    ) -> OriginalTransactionReference36Builder {
7273        self.cdtr_schme_id = ::std::option::Option::Some(value);
7274        self
7275    }
7276    /// Set the `sttlm_inf` field.
7277    #[must_use]
7278    pub fn sttlm_inf(
7279        mut self,
7280        value: SettlementInstruction11,
7281    ) -> OriginalTransactionReference36Builder {
7282        self.sttlm_inf = ::std::option::Option::Some(value);
7283        self
7284    }
7285    /// Set the `pmt_tp_inf` field.
7286    #[must_use]
7287    pub fn pmt_tp_inf(
7288        mut self,
7289        value: PaymentTypeInformation27,
7290    ) -> OriginalTransactionReference36Builder {
7291        self.pmt_tp_inf = ::std::option::Option::Some(value);
7292        self
7293    }
7294    /// Set the `pmt_mtd` field.
7295    #[must_use]
7296    pub fn pmt_mtd(mut self, value: PaymentMethod4Code) -> OriginalTransactionReference36Builder {
7297        self.pmt_mtd = ::std::option::Option::Some(value);
7298        self
7299    }
7300    /// Set the `mndt_rltd_inf` field.
7301    #[must_use]
7302    pub fn mndt_rltd_inf(
7303        mut self,
7304        value: crate::common::ChoiceWrapper<MandateRelatedData2Choice>,
7305    ) -> OriginalTransactionReference36Builder {
7306        self.mndt_rltd_inf = ::std::option::Option::Some(value);
7307        self
7308    }
7309    /// Set the `rmt_inf` field.
7310    #[must_use]
7311    pub fn rmt_inf(
7312        mut self,
7313        value: RemittanceInformation21,
7314    ) -> OriginalTransactionReference36Builder {
7315        self.rmt_inf = ::std::option::Option::Some(value);
7316        self
7317    }
7318    /// Set the `ultmt_dbtr` field.
7319    #[must_use]
7320    pub fn ultmt_dbtr(
7321        mut self,
7322        value: crate::common::ChoiceWrapper<Party40Choice>,
7323    ) -> OriginalTransactionReference36Builder {
7324        self.ultmt_dbtr = ::std::option::Option::Some(value);
7325        self
7326    }
7327    /// Set the `dbtr` field.
7328    #[must_use]
7329    pub fn dbtr(
7330        mut self,
7331        value: crate::common::ChoiceWrapper<Party40Choice>,
7332    ) -> OriginalTransactionReference36Builder {
7333        self.dbtr = ::std::option::Option::Some(value);
7334        self
7335    }
7336    /// Set the `dbtr_acct` field.
7337    #[must_use]
7338    pub fn dbtr_acct(mut self, value: CashAccount40) -> OriginalTransactionReference36Builder {
7339        self.dbtr_acct = ::std::option::Option::Some(value);
7340        self
7341    }
7342    /// Set the `dbtr_agt` field.
7343    #[must_use]
7344    pub fn dbtr_agt(
7345        mut self,
7346        value: BranchAndFinancialInstitutionIdentification6,
7347    ) -> OriginalTransactionReference36Builder {
7348        self.dbtr_agt = ::std::option::Option::Some(value);
7349        self
7350    }
7351    /// Set the `dbtr_agt_acct` field.
7352    #[must_use]
7353    pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> OriginalTransactionReference36Builder {
7354        self.dbtr_agt_acct = ::std::option::Option::Some(value);
7355        self
7356    }
7357    /// Set the `cdtr_agt` field.
7358    #[must_use]
7359    pub fn cdtr_agt(
7360        mut self,
7361        value: BranchAndFinancialInstitutionIdentification6,
7362    ) -> OriginalTransactionReference36Builder {
7363        self.cdtr_agt = ::std::option::Option::Some(value);
7364        self
7365    }
7366    /// Set the `cdtr_agt_acct` field.
7367    #[must_use]
7368    pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> OriginalTransactionReference36Builder {
7369        self.cdtr_agt_acct = ::std::option::Option::Some(value);
7370        self
7371    }
7372    /// Set the `cdtr` field.
7373    #[must_use]
7374    pub fn cdtr(
7375        mut self,
7376        value: crate::common::ChoiceWrapper<Party40Choice>,
7377    ) -> OriginalTransactionReference36Builder {
7378        self.cdtr = ::std::option::Option::Some(value);
7379        self
7380    }
7381    /// Set the `cdtr_acct` field.
7382    #[must_use]
7383    pub fn cdtr_acct(mut self, value: CashAccount40) -> OriginalTransactionReference36Builder {
7384        self.cdtr_acct = ::std::option::Option::Some(value);
7385        self
7386    }
7387    /// Set the `ultmt_cdtr` field.
7388    #[must_use]
7389    pub fn ultmt_cdtr(
7390        mut self,
7391        value: crate::common::ChoiceWrapper<Party40Choice>,
7392    ) -> OriginalTransactionReference36Builder {
7393        self.ultmt_cdtr = ::std::option::Option::Some(value);
7394        self
7395    }
7396    /// Set the `purp` field.
7397    #[must_use]
7398    pub fn purp(
7399        mut self,
7400        value: crate::common::ChoiceWrapper<Purpose2Choice>,
7401    ) -> OriginalTransactionReference36Builder {
7402        self.purp = ::std::option::Option::Some(value);
7403        self
7404    }
7405    /// Set the `undrlyg_cstmr_cdt_trf` field.
7406    #[must_use]
7407    pub fn undrlyg_cstmr_cdt_trf(
7408        mut self,
7409        value: CreditTransferTransaction52,
7410    ) -> OriginalTransactionReference36Builder {
7411        self.undrlyg_cstmr_cdt_trf = ::std::option::Option::Some(value);
7412        self
7413    }
7414    /// Validate required fields and construct the type.
7415    ///
7416    /// # Errors
7417    ///
7418    /// Returns [`crate::common::BuilderError`] listing the names of any
7419    /// required fields that were not set.
7420    ///
7421    /// # Panics
7422    ///
7423    /// Does not panic — all `.unwrap()` calls are guarded by the
7424    /// missing-field check above.
7425    pub fn build(
7426        self,
7427    ) -> ::std::result::Result<OriginalTransactionReference36, crate::common::BuilderError> {
7428        ::std::result::Result::Ok(OriginalTransactionReference36 {
7429            intr_bk_sttlm_amt: self.intr_bk_sttlm_amt,
7430            amt: self.amt,
7431            intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
7432            reqd_colltn_dt: self.reqd_colltn_dt,
7433            reqd_exctn_dt: self.reqd_exctn_dt,
7434            cdtr_schme_id: self.cdtr_schme_id,
7435            sttlm_inf: self.sttlm_inf,
7436            pmt_tp_inf: self.pmt_tp_inf,
7437            pmt_mtd: self.pmt_mtd,
7438            mndt_rltd_inf: self.mndt_rltd_inf,
7439            rmt_inf: self.rmt_inf,
7440            ultmt_dbtr: self.ultmt_dbtr,
7441            dbtr: self.dbtr,
7442            dbtr_acct: self.dbtr_acct,
7443            dbtr_agt: self.dbtr_agt,
7444            dbtr_agt_acct: self.dbtr_agt_acct,
7445            cdtr_agt: self.cdtr_agt,
7446            cdtr_agt_acct: self.cdtr_agt_acct,
7447            cdtr: self.cdtr,
7448            cdtr_acct: self.cdtr_acct,
7449            ultmt_cdtr: self.ultmt_cdtr,
7450            purp: self.purp,
7451            undrlyg_cstmr_cdt_trf: self.undrlyg_cstmr_cdt_trf,
7452        })
7453    }
7454}
7455impl OriginalTransactionReference36 {
7456    /// Return a new builder for this type.
7457    #[must_use]
7458    pub fn builder() -> OriginalTransactionReference36Builder {
7459        OriginalTransactionReference36Builder::default()
7460    }
7461}
7462#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7463pub struct OtherContact1 {
7464    #[serde(rename = "ChanlTp")]
7465    pub chanl_tp: Max4Text,
7466    #[serde(rename = "Id")]
7467    #[serde(skip_serializing_if = "Option::is_none")]
7468    pub id: Option<Max128Text>,
7469}
7470/// Builder for [`OtherContact1`]. Construct via [`OtherContact1::builder()`].
7471#[allow(clippy::struct_field_names)]
7472#[derive(Default)]
7473pub struct OtherContact1Builder {
7474    chanl_tp: ::std::option::Option<Max4Text>,
7475    id: ::std::option::Option<Max128Text>,
7476}
7477impl OtherContact1Builder {
7478    /// Set the `chanl_tp` field.
7479    #[must_use]
7480    pub fn chanl_tp(mut self, value: Max4Text) -> OtherContact1Builder {
7481        self.chanl_tp = ::std::option::Option::Some(value);
7482        self
7483    }
7484    /// Set the `id` field.
7485    #[must_use]
7486    pub fn id(mut self, value: Max128Text) -> OtherContact1Builder {
7487        self.id = ::std::option::Option::Some(value);
7488        self
7489    }
7490    /// Validate required fields and construct the type.
7491    ///
7492    /// # Errors
7493    ///
7494    /// Returns [`crate::common::BuilderError`] listing the names of any
7495    /// required fields that were not set.
7496    ///
7497    /// # Panics
7498    ///
7499    /// Does not panic — all `.unwrap()` calls are guarded by the
7500    /// missing-field check above.
7501    pub fn build(self) -> ::std::result::Result<OtherContact1, crate::common::BuilderError> {
7502        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7503        if self.chanl_tp.is_none() {
7504            missing.push("chanl_tp".to_owned());
7505        }
7506        if !missing.is_empty() {
7507            return ::std::result::Result::Err(crate::common::BuilderError {
7508                type_name: "OtherContact1".to_owned(),
7509                missing_fields: missing,
7510            });
7511        }
7512        ::std::result::Result::Ok(OtherContact1 {
7513            chanl_tp: self.chanl_tp.unwrap(),
7514            id: self.id,
7515        })
7516    }
7517}
7518impl OtherContact1 {
7519    /// Return a new builder for this type.
7520    #[must_use]
7521    pub fn builder() -> OtherContact1Builder {
7522        OtherContact1Builder::default()
7523    }
7524}
7525#[allow(clippy::large_enum_variant)]
7526#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7527pub enum Party38Choice {
7528    #[serde(rename = "OrgId")]
7529    OrgId(OrganisationIdentification29),
7530    #[serde(rename = "PrvtId")]
7531    PrvtId(PersonIdentification13),
7532}
7533#[allow(clippy::large_enum_variant)]
7534#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7535pub enum Party40Choice {
7536    #[serde(rename = "Pty")]
7537    Pty(PartyIdentification135),
7538    #[serde(rename = "Agt")]
7539    Agt(BranchAndFinancialInstitutionIdentification6),
7540}
7541#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7542pub struct PartyIdentification135 {
7543    #[serde(rename = "Nm")]
7544    #[serde(skip_serializing_if = "Option::is_none")]
7545    pub nm: Option<Max140Text>,
7546    #[serde(rename = "PstlAdr")]
7547    #[serde(skip_serializing_if = "Option::is_none")]
7548    pub pstl_adr: Option<PostalAddress24>,
7549    #[serde(rename = "Id")]
7550    #[serde(skip_serializing_if = "Option::is_none")]
7551    pub id: Option<crate::common::ChoiceWrapper<Party38Choice>>,
7552    #[serde(rename = "CtryOfRes")]
7553    #[serde(skip_serializing_if = "Option::is_none")]
7554    pub ctry_of_res: Option<CountryCode>,
7555    #[serde(rename = "CtctDtls")]
7556    #[serde(skip_serializing_if = "Option::is_none")]
7557    pub ctct_dtls: Option<Contact4>,
7558}
7559/// Builder for [`PartyIdentification135`]. Construct via [`PartyIdentification135::builder()`].
7560#[allow(clippy::struct_field_names)]
7561#[derive(Default)]
7562pub struct PartyIdentification135Builder {
7563    nm: ::std::option::Option<Max140Text>,
7564    pstl_adr: ::std::option::Option<PostalAddress24>,
7565    id: ::std::option::Option<crate::common::ChoiceWrapper<Party38Choice>>,
7566    ctry_of_res: ::std::option::Option<CountryCode>,
7567    ctct_dtls: ::std::option::Option<Contact4>,
7568}
7569impl PartyIdentification135Builder {
7570    /// Set the `nm` field.
7571    #[must_use]
7572    pub fn nm(mut self, value: Max140Text) -> PartyIdentification135Builder {
7573        self.nm = ::std::option::Option::Some(value);
7574        self
7575    }
7576    /// Set the `pstl_adr` field.
7577    #[must_use]
7578    pub fn pstl_adr(mut self, value: PostalAddress24) -> PartyIdentification135Builder {
7579        self.pstl_adr = ::std::option::Option::Some(value);
7580        self
7581    }
7582    /// Set the `id` field.
7583    #[must_use]
7584    pub fn id(
7585        mut self,
7586        value: crate::common::ChoiceWrapper<Party38Choice>,
7587    ) -> PartyIdentification135Builder {
7588        self.id = ::std::option::Option::Some(value);
7589        self
7590    }
7591    /// Set the `ctry_of_res` field.
7592    #[must_use]
7593    pub fn ctry_of_res(mut self, value: CountryCode) -> PartyIdentification135Builder {
7594        self.ctry_of_res = ::std::option::Option::Some(value);
7595        self
7596    }
7597    /// Set the `ctct_dtls` field.
7598    #[must_use]
7599    pub fn ctct_dtls(mut self, value: Contact4) -> PartyIdentification135Builder {
7600        self.ctct_dtls = ::std::option::Option::Some(value);
7601        self
7602    }
7603    /// Validate required fields and construct the type.
7604    ///
7605    /// # Errors
7606    ///
7607    /// Returns [`crate::common::BuilderError`] listing the names of any
7608    /// required fields that were not set.
7609    ///
7610    /// # Panics
7611    ///
7612    /// Does not panic — all `.unwrap()` calls are guarded by the
7613    /// missing-field check above.
7614    pub fn build(
7615        self,
7616    ) -> ::std::result::Result<PartyIdentification135, crate::common::BuilderError> {
7617        ::std::result::Result::Ok(PartyIdentification135 {
7618            nm: self.nm,
7619            pstl_adr: self.pstl_adr,
7620            id: self.id,
7621            ctry_of_res: self.ctry_of_res,
7622            ctct_dtls: self.ctct_dtls,
7623        })
7624    }
7625}
7626impl PartyIdentification135 {
7627    /// Return a new builder for this type.
7628    #[must_use]
7629    pub fn builder() -> PartyIdentification135Builder {
7630        PartyIdentification135Builder::default()
7631    }
7632}
7633#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7634pub struct PaymentReturnReason6 {
7635    #[serde(rename = "Orgtr")]
7636    #[serde(skip_serializing_if = "Option::is_none")]
7637    pub orgtr: Option<PartyIdentification135>,
7638    #[serde(rename = "Rsn")]
7639    #[serde(skip_serializing_if = "Option::is_none")]
7640    pub rsn: Option<crate::common::ChoiceWrapper<ReturnReason5Choice>>,
7641    #[serde(rename = "AddtlInf")]
7642    #[serde(default)]
7643    #[serde(skip_serializing_if = "Vec::is_empty")]
7644    pub addtl_inf: Vec<Max105Text>,
7645}
7646/// Builder for [`PaymentReturnReason6`]. Construct via [`PaymentReturnReason6::builder()`].
7647#[allow(clippy::struct_field_names)]
7648#[derive(Default)]
7649pub struct PaymentReturnReason6Builder {
7650    orgtr: ::std::option::Option<PartyIdentification135>,
7651    rsn: ::std::option::Option<crate::common::ChoiceWrapper<ReturnReason5Choice>>,
7652    addtl_inf: ::std::vec::Vec<Max105Text>,
7653}
7654impl PaymentReturnReason6Builder {
7655    /// Set the `orgtr` field.
7656    #[must_use]
7657    pub fn orgtr(mut self, value: PartyIdentification135) -> PaymentReturnReason6Builder {
7658        self.orgtr = ::std::option::Option::Some(value);
7659        self
7660    }
7661    /// Set the `rsn` field.
7662    #[must_use]
7663    pub fn rsn(
7664        mut self,
7665        value: crate::common::ChoiceWrapper<ReturnReason5Choice>,
7666    ) -> PaymentReturnReason6Builder {
7667        self.rsn = ::std::option::Option::Some(value);
7668        self
7669    }
7670    /// Set the `addtl_inf` field (replaces any previously added items).
7671    #[must_use]
7672    pub fn addtl_inf(mut self, value: ::std::vec::Vec<Max105Text>) -> PaymentReturnReason6Builder {
7673        self.addtl_inf = value;
7674        self
7675    }
7676    /// Append one item to the `addtl_inf` field.
7677    #[must_use]
7678    pub fn add_addtl_inf(mut self, value: Max105Text) -> PaymentReturnReason6Builder {
7679        self.addtl_inf.push(value);
7680        self
7681    }
7682    /// Validate required fields and construct the type.
7683    ///
7684    /// # Errors
7685    ///
7686    /// Returns [`crate::common::BuilderError`] listing the names of any
7687    /// required fields that were not set.
7688    ///
7689    /// # Panics
7690    ///
7691    /// Does not panic — all `.unwrap()` calls are guarded by the
7692    /// missing-field check above.
7693    pub fn build(self) -> ::std::result::Result<PaymentReturnReason6, crate::common::BuilderError> {
7694        ::std::result::Result::Ok(PaymentReturnReason6 {
7695            orgtr: self.orgtr,
7696            rsn: self.rsn,
7697            addtl_inf: self.addtl_inf,
7698        })
7699    }
7700}
7701impl PaymentReturnReason6 {
7702    /// Return a new builder for this type.
7703    #[must_use]
7704    pub fn builder() -> PaymentReturnReason6Builder {
7705        PaymentReturnReason6Builder::default()
7706    }
7707}
7708#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7709pub struct PaymentReturnV11 {
7710    #[serde(rename = "GrpHdr")]
7711    pub grp_hdr: GroupHeader99,
7712    #[serde(rename = "OrgnlGrpInf")]
7713    #[serde(skip_serializing_if = "Option::is_none")]
7714    pub orgnl_grp_inf: Option<OriginalGroupHeader18>,
7715    #[serde(rename = "TxInf")]
7716    #[serde(default)]
7717    #[serde(skip_serializing_if = "Vec::is_empty")]
7718    pub tx_inf: Vec<PaymentTransaction133>,
7719    #[serde(rename = "SplmtryData")]
7720    #[serde(default)]
7721    #[serde(skip_serializing_if = "Vec::is_empty")]
7722    pub splmtry_data: Vec<SupplementaryData1>,
7723}
7724/// Builder for [`PaymentReturnV11`]. Construct via [`PaymentReturnV11::builder()`].
7725#[allow(clippy::struct_field_names)]
7726#[derive(Default)]
7727pub struct PaymentReturnV11Builder {
7728    grp_hdr: ::std::option::Option<GroupHeader99>,
7729    orgnl_grp_inf: ::std::option::Option<OriginalGroupHeader18>,
7730    tx_inf: ::std::vec::Vec<PaymentTransaction133>,
7731    splmtry_data: ::std::vec::Vec<SupplementaryData1>,
7732}
7733impl PaymentReturnV11Builder {
7734    /// Set the `grp_hdr` field.
7735    #[must_use]
7736    pub fn grp_hdr(mut self, value: GroupHeader99) -> PaymentReturnV11Builder {
7737        self.grp_hdr = ::std::option::Option::Some(value);
7738        self
7739    }
7740    /// Set the `orgnl_grp_inf` field.
7741    #[must_use]
7742    pub fn orgnl_grp_inf(mut self, value: OriginalGroupHeader18) -> PaymentReturnV11Builder {
7743        self.orgnl_grp_inf = ::std::option::Option::Some(value);
7744        self
7745    }
7746    /// Set the `tx_inf` field (replaces any previously added items).
7747    #[must_use]
7748    pub fn tx_inf(
7749        mut self,
7750        value: ::std::vec::Vec<PaymentTransaction133>,
7751    ) -> PaymentReturnV11Builder {
7752        self.tx_inf = value;
7753        self
7754    }
7755    /// Append one item to the `tx_inf` field.
7756    #[must_use]
7757    pub fn add_tx_inf(mut self, value: PaymentTransaction133) -> PaymentReturnV11Builder {
7758        self.tx_inf.push(value);
7759        self
7760    }
7761    /// Set the `splmtry_data` field (replaces any previously added items).
7762    #[must_use]
7763    pub fn splmtry_data(
7764        mut self,
7765        value: ::std::vec::Vec<SupplementaryData1>,
7766    ) -> PaymentReturnV11Builder {
7767        self.splmtry_data = value;
7768        self
7769    }
7770    /// Append one item to the `splmtry_data` field.
7771    #[must_use]
7772    pub fn add_splmtry_data(mut self, value: SupplementaryData1) -> PaymentReturnV11Builder {
7773        self.splmtry_data.push(value);
7774        self
7775    }
7776    /// Validate required fields and construct the type.
7777    ///
7778    /// # Errors
7779    ///
7780    /// Returns [`crate::common::BuilderError`] listing the names of any
7781    /// required fields that were not set.
7782    ///
7783    /// # Panics
7784    ///
7785    /// Does not panic — all `.unwrap()` calls are guarded by the
7786    /// missing-field check above.
7787    pub fn build(self) -> ::std::result::Result<PaymentReturnV11, crate::common::BuilderError> {
7788        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7789        if self.grp_hdr.is_none() {
7790            missing.push("grp_hdr".to_owned());
7791        }
7792        if !missing.is_empty() {
7793            return ::std::result::Result::Err(crate::common::BuilderError {
7794                type_name: "PaymentReturnV11".to_owned(),
7795                missing_fields: missing,
7796            });
7797        }
7798        ::std::result::Result::Ok(PaymentReturnV11 {
7799            grp_hdr: self.grp_hdr.unwrap(),
7800            orgnl_grp_inf: self.orgnl_grp_inf,
7801            tx_inf: self.tx_inf,
7802            splmtry_data: self.splmtry_data,
7803        })
7804    }
7805}
7806impl PaymentReturnV11 {
7807    /// Return a new builder for this type.
7808    #[must_use]
7809    pub fn builder() -> PaymentReturnV11Builder {
7810        PaymentReturnV11Builder::default()
7811    }
7812}
7813#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7814pub struct PaymentTransaction133 {
7815    #[serde(rename = "RtrId")]
7816    #[serde(skip_serializing_if = "Option::is_none")]
7817    pub rtr_id: Option<Max35Text>,
7818    #[serde(rename = "OrgnlGrpInf")]
7819    #[serde(skip_serializing_if = "Option::is_none")]
7820    pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
7821    #[serde(rename = "OrgnlInstrId")]
7822    #[serde(skip_serializing_if = "Option::is_none")]
7823    pub orgnl_instr_id: Option<Max35Text>,
7824    #[serde(rename = "OrgnlEndToEndId")]
7825    #[serde(skip_serializing_if = "Option::is_none")]
7826    pub orgnl_end_to_end_id: Option<Max35Text>,
7827    #[serde(rename = "OrgnlTxId")]
7828    #[serde(skip_serializing_if = "Option::is_none")]
7829    pub orgnl_tx_id: Option<Max35Text>,
7830    #[serde(rename = "OrgnlUETR")]
7831    #[serde(skip_serializing_if = "Option::is_none")]
7832    pub orgnl_uetr: Option<UUIDv4Identifier>,
7833    #[serde(rename = "OrgnlClrSysRef")]
7834    #[serde(skip_serializing_if = "Option::is_none")]
7835    pub orgnl_clr_sys_ref: Option<Max35Text>,
7836    #[serde(rename = "OrgnlIntrBkSttlmAmt")]
7837    #[serde(skip_serializing_if = "Option::is_none")]
7838    pub orgnl_intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7839    #[serde(rename = "OrgnlIntrBkSttlmDt")]
7840    #[serde(skip_serializing_if = "Option::is_none")]
7841    pub orgnl_intr_bk_sttlm_dt: Option<ISODate>,
7842    #[serde(rename = "PmtTpInf")]
7843    #[serde(skip_serializing_if = "Option::is_none")]
7844    pub pmt_tp_inf: Option<PaymentTypeInformation28>,
7845    #[serde(rename = "RtrdIntrBkSttlmAmt")]
7846    pub rtrd_intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
7847    #[serde(rename = "IntrBkSttlmDt")]
7848    #[serde(skip_serializing_if = "Option::is_none")]
7849    pub intr_bk_sttlm_dt: Option<ISODate>,
7850    #[serde(rename = "SttlmPrty")]
7851    #[serde(skip_serializing_if = "Option::is_none")]
7852    pub sttlm_prty: Option<Priority3Code>,
7853    #[serde(rename = "SttlmTmIndctn")]
7854    #[serde(skip_serializing_if = "Option::is_none")]
7855    pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
7856    #[serde(rename = "SttlmTmReq")]
7857    #[serde(skip_serializing_if = "Option::is_none")]
7858    pub sttlm_tm_req: Option<SettlementTimeRequest2>,
7859    #[serde(rename = "RtrdInstdAmt")]
7860    #[serde(skip_serializing_if = "Option::is_none")]
7861    pub rtrd_instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7862    #[serde(rename = "XchgRate")]
7863    #[serde(skip_serializing_if = "Option::is_none")]
7864    pub xchg_rate: Option<BaseOneRate>,
7865    #[serde(rename = "CompstnAmt")]
7866    #[serde(skip_serializing_if = "Option::is_none")]
7867    pub compstn_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7868    #[serde(rename = "ChrgBr")]
7869    #[serde(skip_serializing_if = "Option::is_none")]
7870    pub chrg_br: Option<ChargeBearerType1Code>,
7871    #[serde(rename = "ChrgsInf")]
7872    #[serde(default)]
7873    #[serde(skip_serializing_if = "Vec::is_empty")]
7874    pub chrgs_inf: Vec<Charges7>,
7875    #[serde(rename = "ClrSysRef")]
7876    #[serde(skip_serializing_if = "Option::is_none")]
7877    pub clr_sys_ref: Option<Max35Text>,
7878    #[serde(rename = "InstgAgt")]
7879    #[serde(skip_serializing_if = "Option::is_none")]
7880    pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7881    #[serde(rename = "InstdAgt")]
7882    #[serde(skip_serializing_if = "Option::is_none")]
7883    pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7884    #[serde(rename = "RtrChain")]
7885    #[serde(skip_serializing_if = "Option::is_none")]
7886    pub rtr_chain: Option<TransactionParties10>,
7887    #[serde(rename = "RtrRsnInf")]
7888    #[serde(default)]
7889    #[serde(skip_serializing_if = "Vec::is_empty")]
7890    pub rtr_rsn_inf: Vec<PaymentReturnReason6>,
7891    #[serde(rename = "OrgnlTxRef")]
7892    #[serde(skip_serializing_if = "Option::is_none")]
7893    pub orgnl_tx_ref: Option<OriginalTransactionReference36>,
7894    #[serde(rename = "SplmtryData")]
7895    #[serde(default)]
7896    #[serde(skip_serializing_if = "Vec::is_empty")]
7897    pub splmtry_data: Vec<SupplementaryData1>,
7898}
7899/// Builder for [`PaymentTransaction133`]. Construct via [`PaymentTransaction133::builder()`].
7900#[allow(clippy::struct_field_names)]
7901#[derive(Default)]
7902pub struct PaymentTransaction133Builder {
7903    rtr_id: ::std::option::Option<Max35Text>,
7904    orgnl_grp_inf: ::std::option::Option<OriginalGroupInformation29>,
7905    orgnl_instr_id: ::std::option::Option<Max35Text>,
7906    orgnl_end_to_end_id: ::std::option::Option<Max35Text>,
7907    orgnl_tx_id: ::std::option::Option<Max35Text>,
7908    orgnl_uetr: ::std::option::Option<UUIDv4Identifier>,
7909    orgnl_clr_sys_ref: ::std::option::Option<Max35Text>,
7910    orgnl_intr_bk_sttlm_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7911    orgnl_intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
7912    pmt_tp_inf: ::std::option::Option<PaymentTypeInformation28>,
7913    rtrd_intr_bk_sttlm_amt: ::std::option::Option<ActiveCurrencyAndAmount>,
7914    intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
7915    sttlm_prty: ::std::option::Option<Priority3Code>,
7916    sttlm_tm_indctn: ::std::option::Option<SettlementDateTimeIndication1>,
7917    sttlm_tm_req: ::std::option::Option<SettlementTimeRequest2>,
7918    rtrd_instd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7919    xchg_rate: ::std::option::Option<BaseOneRate>,
7920    compstn_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7921    chrg_br: ::std::option::Option<ChargeBearerType1Code>,
7922    chrgs_inf: ::std::vec::Vec<Charges7>,
7923    clr_sys_ref: ::std::option::Option<Max35Text>,
7924    instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7925    instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7926    rtr_chain: ::std::option::Option<TransactionParties10>,
7927    rtr_rsn_inf: ::std::vec::Vec<PaymentReturnReason6>,
7928    orgnl_tx_ref: ::std::option::Option<OriginalTransactionReference36>,
7929    splmtry_data: ::std::vec::Vec<SupplementaryData1>,
7930}
7931impl PaymentTransaction133Builder {
7932    /// Set the `rtr_id` field.
7933    #[must_use]
7934    pub fn rtr_id(mut self, value: Max35Text) -> PaymentTransaction133Builder {
7935        self.rtr_id = ::std::option::Option::Some(value);
7936        self
7937    }
7938    /// Set the `orgnl_grp_inf` field.
7939    #[must_use]
7940    pub fn orgnl_grp_inf(
7941        mut self,
7942        value: OriginalGroupInformation29,
7943    ) -> PaymentTransaction133Builder {
7944        self.orgnl_grp_inf = ::std::option::Option::Some(value);
7945        self
7946    }
7947    /// Set the `orgnl_instr_id` field.
7948    #[must_use]
7949    pub fn orgnl_instr_id(mut self, value: Max35Text) -> PaymentTransaction133Builder {
7950        self.orgnl_instr_id = ::std::option::Option::Some(value);
7951        self
7952    }
7953    /// Set the `orgnl_end_to_end_id` field.
7954    #[must_use]
7955    pub fn orgnl_end_to_end_id(mut self, value: Max35Text) -> PaymentTransaction133Builder {
7956        self.orgnl_end_to_end_id = ::std::option::Option::Some(value);
7957        self
7958    }
7959    /// Set the `orgnl_tx_id` field.
7960    #[must_use]
7961    pub fn orgnl_tx_id(mut self, value: Max35Text) -> PaymentTransaction133Builder {
7962        self.orgnl_tx_id = ::std::option::Option::Some(value);
7963        self
7964    }
7965    /// Set the `orgnl_uetr` field.
7966    #[must_use]
7967    pub fn orgnl_uetr(mut self, value: UUIDv4Identifier) -> PaymentTransaction133Builder {
7968        self.orgnl_uetr = ::std::option::Option::Some(value);
7969        self
7970    }
7971    /// Set the `orgnl_clr_sys_ref` field.
7972    #[must_use]
7973    pub fn orgnl_clr_sys_ref(mut self, value: Max35Text) -> PaymentTransaction133Builder {
7974        self.orgnl_clr_sys_ref = ::std::option::Option::Some(value);
7975        self
7976    }
7977    /// Set the `orgnl_intr_bk_sttlm_amt` field.
7978    #[must_use]
7979    pub fn orgnl_intr_bk_sttlm_amt(
7980        mut self,
7981        value: ActiveOrHistoricCurrencyAndAmount,
7982    ) -> PaymentTransaction133Builder {
7983        self.orgnl_intr_bk_sttlm_amt = ::std::option::Option::Some(value);
7984        self
7985    }
7986    /// Set the `orgnl_intr_bk_sttlm_dt` field.
7987    #[must_use]
7988    pub fn orgnl_intr_bk_sttlm_dt(mut self, value: ISODate) -> PaymentTransaction133Builder {
7989        self.orgnl_intr_bk_sttlm_dt = ::std::option::Option::Some(value);
7990        self
7991    }
7992    /// Set the `pmt_tp_inf` field.
7993    #[must_use]
7994    pub fn pmt_tp_inf(mut self, value: PaymentTypeInformation28) -> PaymentTransaction133Builder {
7995        self.pmt_tp_inf = ::std::option::Option::Some(value);
7996        self
7997    }
7998    /// Set the `rtrd_intr_bk_sttlm_amt` field.
7999    #[must_use]
8000    pub fn rtrd_intr_bk_sttlm_amt(
8001        mut self,
8002        value: ActiveCurrencyAndAmount,
8003    ) -> PaymentTransaction133Builder {
8004        self.rtrd_intr_bk_sttlm_amt = ::std::option::Option::Some(value);
8005        self
8006    }
8007    /// Set the `intr_bk_sttlm_dt` field.
8008    #[must_use]
8009    pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> PaymentTransaction133Builder {
8010        self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
8011        self
8012    }
8013    /// Set the `sttlm_prty` field.
8014    #[must_use]
8015    pub fn sttlm_prty(mut self, value: Priority3Code) -> PaymentTransaction133Builder {
8016        self.sttlm_prty = ::std::option::Option::Some(value);
8017        self
8018    }
8019    /// Set the `sttlm_tm_indctn` field.
8020    #[must_use]
8021    pub fn sttlm_tm_indctn(
8022        mut self,
8023        value: SettlementDateTimeIndication1,
8024    ) -> PaymentTransaction133Builder {
8025        self.sttlm_tm_indctn = ::std::option::Option::Some(value);
8026        self
8027    }
8028    /// Set the `sttlm_tm_req` field.
8029    #[must_use]
8030    pub fn sttlm_tm_req(mut self, value: SettlementTimeRequest2) -> PaymentTransaction133Builder {
8031        self.sttlm_tm_req = ::std::option::Option::Some(value);
8032        self
8033    }
8034    /// Set the `rtrd_instd_amt` field.
8035    #[must_use]
8036    pub fn rtrd_instd_amt(
8037        mut self,
8038        value: ActiveOrHistoricCurrencyAndAmount,
8039    ) -> PaymentTransaction133Builder {
8040        self.rtrd_instd_amt = ::std::option::Option::Some(value);
8041        self
8042    }
8043    /// Set the `xchg_rate` field.
8044    #[must_use]
8045    pub fn xchg_rate(mut self, value: BaseOneRate) -> PaymentTransaction133Builder {
8046        self.xchg_rate = ::std::option::Option::Some(value);
8047        self
8048    }
8049    /// Set the `compstn_amt` field.
8050    #[must_use]
8051    pub fn compstn_amt(
8052        mut self,
8053        value: ActiveOrHistoricCurrencyAndAmount,
8054    ) -> PaymentTransaction133Builder {
8055        self.compstn_amt = ::std::option::Option::Some(value);
8056        self
8057    }
8058    /// Set the `chrg_br` field.
8059    #[must_use]
8060    pub fn chrg_br(mut self, value: ChargeBearerType1Code) -> PaymentTransaction133Builder {
8061        self.chrg_br = ::std::option::Option::Some(value);
8062        self
8063    }
8064    /// Set the `chrgs_inf` field (replaces any previously added items).
8065    #[must_use]
8066    pub fn chrgs_inf(mut self, value: ::std::vec::Vec<Charges7>) -> PaymentTransaction133Builder {
8067        self.chrgs_inf = value;
8068        self
8069    }
8070    /// Append one item to the `chrgs_inf` field.
8071    #[must_use]
8072    pub fn add_chrgs_inf(mut self, value: Charges7) -> PaymentTransaction133Builder {
8073        self.chrgs_inf.push(value);
8074        self
8075    }
8076    /// Set the `clr_sys_ref` field.
8077    #[must_use]
8078    pub fn clr_sys_ref(mut self, value: Max35Text) -> PaymentTransaction133Builder {
8079        self.clr_sys_ref = ::std::option::Option::Some(value);
8080        self
8081    }
8082    /// Set the `instg_agt` field.
8083    #[must_use]
8084    pub fn instg_agt(
8085        mut self,
8086        value: BranchAndFinancialInstitutionIdentification6,
8087    ) -> PaymentTransaction133Builder {
8088        self.instg_agt = ::std::option::Option::Some(value);
8089        self
8090    }
8091    /// Set the `instd_agt` field.
8092    #[must_use]
8093    pub fn instd_agt(
8094        mut self,
8095        value: BranchAndFinancialInstitutionIdentification6,
8096    ) -> PaymentTransaction133Builder {
8097        self.instd_agt = ::std::option::Option::Some(value);
8098        self
8099    }
8100    /// Set the `rtr_chain` field.
8101    #[must_use]
8102    pub fn rtr_chain(mut self, value: TransactionParties10) -> PaymentTransaction133Builder {
8103        self.rtr_chain = ::std::option::Option::Some(value);
8104        self
8105    }
8106    /// Set the `rtr_rsn_inf` field (replaces any previously added items).
8107    #[must_use]
8108    pub fn rtr_rsn_inf(
8109        mut self,
8110        value: ::std::vec::Vec<PaymentReturnReason6>,
8111    ) -> PaymentTransaction133Builder {
8112        self.rtr_rsn_inf = value;
8113        self
8114    }
8115    /// Append one item to the `rtr_rsn_inf` field.
8116    #[must_use]
8117    pub fn add_rtr_rsn_inf(mut self, value: PaymentReturnReason6) -> PaymentTransaction133Builder {
8118        self.rtr_rsn_inf.push(value);
8119        self
8120    }
8121    /// Set the `orgnl_tx_ref` field.
8122    #[must_use]
8123    pub fn orgnl_tx_ref(
8124        mut self,
8125        value: OriginalTransactionReference36,
8126    ) -> PaymentTransaction133Builder {
8127        self.orgnl_tx_ref = ::std::option::Option::Some(value);
8128        self
8129    }
8130    /// Set the `splmtry_data` field (replaces any previously added items).
8131    #[must_use]
8132    pub fn splmtry_data(
8133        mut self,
8134        value: ::std::vec::Vec<SupplementaryData1>,
8135    ) -> PaymentTransaction133Builder {
8136        self.splmtry_data = value;
8137        self
8138    }
8139    /// Append one item to the `splmtry_data` field.
8140    #[must_use]
8141    pub fn add_splmtry_data(mut self, value: SupplementaryData1) -> PaymentTransaction133Builder {
8142        self.splmtry_data.push(value);
8143        self
8144    }
8145    /// Validate required fields and construct the type.
8146    ///
8147    /// # Errors
8148    ///
8149    /// Returns [`crate::common::BuilderError`] listing the names of any
8150    /// required fields that were not set.
8151    ///
8152    /// # Panics
8153    ///
8154    /// Does not panic — all `.unwrap()` calls are guarded by the
8155    /// missing-field check above.
8156    pub fn build(
8157        self,
8158    ) -> ::std::result::Result<PaymentTransaction133, crate::common::BuilderError> {
8159        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8160        if self.rtrd_intr_bk_sttlm_amt.is_none() {
8161            missing.push("rtrd_intr_bk_sttlm_amt".to_owned());
8162        }
8163        if !missing.is_empty() {
8164            return ::std::result::Result::Err(crate::common::BuilderError {
8165                type_name: "PaymentTransaction133".to_owned(),
8166                missing_fields: missing,
8167            });
8168        }
8169        ::std::result::Result::Ok(PaymentTransaction133 {
8170            rtr_id: self.rtr_id,
8171            orgnl_grp_inf: self.orgnl_grp_inf,
8172            orgnl_instr_id: self.orgnl_instr_id,
8173            orgnl_end_to_end_id: self.orgnl_end_to_end_id,
8174            orgnl_tx_id: self.orgnl_tx_id,
8175            orgnl_uetr: self.orgnl_uetr,
8176            orgnl_clr_sys_ref: self.orgnl_clr_sys_ref,
8177            orgnl_intr_bk_sttlm_amt: self.orgnl_intr_bk_sttlm_amt,
8178            orgnl_intr_bk_sttlm_dt: self.orgnl_intr_bk_sttlm_dt,
8179            pmt_tp_inf: self.pmt_tp_inf,
8180            rtrd_intr_bk_sttlm_amt: self.rtrd_intr_bk_sttlm_amt.unwrap(),
8181            intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
8182            sttlm_prty: self.sttlm_prty,
8183            sttlm_tm_indctn: self.sttlm_tm_indctn,
8184            sttlm_tm_req: self.sttlm_tm_req,
8185            rtrd_instd_amt: self.rtrd_instd_amt,
8186            xchg_rate: self.xchg_rate,
8187            compstn_amt: self.compstn_amt,
8188            chrg_br: self.chrg_br,
8189            chrgs_inf: self.chrgs_inf,
8190            clr_sys_ref: self.clr_sys_ref,
8191            instg_agt: self.instg_agt,
8192            instd_agt: self.instd_agt,
8193            rtr_chain: self.rtr_chain,
8194            rtr_rsn_inf: self.rtr_rsn_inf,
8195            orgnl_tx_ref: self.orgnl_tx_ref,
8196            splmtry_data: self.splmtry_data,
8197        })
8198    }
8199}
8200impl PaymentTransaction133 {
8201    /// Return a new builder for this type.
8202    #[must_use]
8203    pub fn builder() -> PaymentTransaction133Builder {
8204        PaymentTransaction133Builder::default()
8205    }
8206}
8207#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8208pub struct PaymentTypeInformation27 {
8209    #[serde(rename = "InstrPrty")]
8210    #[serde(skip_serializing_if = "Option::is_none")]
8211    pub instr_prty: Option<Priority2Code>,
8212    #[serde(rename = "ClrChanl")]
8213    #[serde(skip_serializing_if = "Option::is_none")]
8214    pub clr_chanl: Option<ClearingChannel2Code>,
8215    #[serde(rename = "SvcLvl")]
8216    #[serde(default)]
8217    #[serde(skip_serializing_if = "Vec::is_empty")]
8218    pub svc_lvl: Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8219    #[serde(rename = "LclInstrm")]
8220    #[serde(skip_serializing_if = "Option::is_none")]
8221    pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
8222    #[serde(rename = "SeqTp")]
8223    #[serde(skip_serializing_if = "Option::is_none")]
8224    pub seq_tp: Option<SequenceType3Code>,
8225    #[serde(rename = "CtgyPurp")]
8226    #[serde(skip_serializing_if = "Option::is_none")]
8227    pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
8228}
8229/// Builder for [`PaymentTypeInformation27`]. Construct via [`PaymentTypeInformation27::builder()`].
8230#[allow(clippy::struct_field_names)]
8231#[derive(Default)]
8232pub struct PaymentTypeInformation27Builder {
8233    instr_prty: ::std::option::Option<Priority2Code>,
8234    clr_chanl: ::std::option::Option<ClearingChannel2Code>,
8235    svc_lvl: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8236    lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
8237    seq_tp: ::std::option::Option<SequenceType3Code>,
8238    ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
8239}
8240impl PaymentTypeInformation27Builder {
8241    /// Set the `instr_prty` field.
8242    #[must_use]
8243    pub fn instr_prty(mut self, value: Priority2Code) -> PaymentTypeInformation27Builder {
8244        self.instr_prty = ::std::option::Option::Some(value);
8245        self
8246    }
8247    /// Set the `clr_chanl` field.
8248    #[must_use]
8249    pub fn clr_chanl(mut self, value: ClearingChannel2Code) -> PaymentTypeInformation27Builder {
8250        self.clr_chanl = ::std::option::Option::Some(value);
8251        self
8252    }
8253    /// Set the `svc_lvl` field (replaces any previously added items).
8254    #[must_use]
8255    pub fn svc_lvl(
8256        mut self,
8257        value: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8258    ) -> PaymentTypeInformation27Builder {
8259        self.svc_lvl = value;
8260        self
8261    }
8262    /// Append one item to the `svc_lvl` field.
8263    #[must_use]
8264    pub fn add_svc_lvl(
8265        mut self,
8266        value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
8267    ) -> PaymentTypeInformation27Builder {
8268        self.svc_lvl.push(value);
8269        self
8270    }
8271    /// Set the `lcl_instrm` field.
8272    #[must_use]
8273    pub fn lcl_instrm(
8274        mut self,
8275        value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
8276    ) -> PaymentTypeInformation27Builder {
8277        self.lcl_instrm = ::std::option::Option::Some(value);
8278        self
8279    }
8280    /// Set the `seq_tp` field.
8281    #[must_use]
8282    pub fn seq_tp(mut self, value: SequenceType3Code) -> PaymentTypeInformation27Builder {
8283        self.seq_tp = ::std::option::Option::Some(value);
8284        self
8285    }
8286    /// Set the `ctgy_purp` field.
8287    #[must_use]
8288    pub fn ctgy_purp(
8289        mut self,
8290        value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
8291    ) -> PaymentTypeInformation27Builder {
8292        self.ctgy_purp = ::std::option::Option::Some(value);
8293        self
8294    }
8295    /// Validate required fields and construct the type.
8296    ///
8297    /// # Errors
8298    ///
8299    /// Returns [`crate::common::BuilderError`] listing the names of any
8300    /// required fields that were not set.
8301    ///
8302    /// # Panics
8303    ///
8304    /// Does not panic — all `.unwrap()` calls are guarded by the
8305    /// missing-field check above.
8306    pub fn build(
8307        self,
8308    ) -> ::std::result::Result<PaymentTypeInformation27, crate::common::BuilderError> {
8309        ::std::result::Result::Ok(PaymentTypeInformation27 {
8310            instr_prty: self.instr_prty,
8311            clr_chanl: self.clr_chanl,
8312            svc_lvl: self.svc_lvl,
8313            lcl_instrm: self.lcl_instrm,
8314            seq_tp: self.seq_tp,
8315            ctgy_purp: self.ctgy_purp,
8316        })
8317    }
8318}
8319impl PaymentTypeInformation27 {
8320    /// Return a new builder for this type.
8321    #[must_use]
8322    pub fn builder() -> PaymentTypeInformation27Builder {
8323        PaymentTypeInformation27Builder::default()
8324    }
8325}
8326#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8327pub struct PaymentTypeInformation28 {
8328    #[serde(rename = "InstrPrty")]
8329    #[serde(skip_serializing_if = "Option::is_none")]
8330    pub instr_prty: Option<Priority2Code>,
8331    #[serde(rename = "ClrChanl")]
8332    #[serde(skip_serializing_if = "Option::is_none")]
8333    pub clr_chanl: Option<ClearingChannel2Code>,
8334    #[serde(rename = "SvcLvl")]
8335    #[serde(default)]
8336    #[serde(skip_serializing_if = "Vec::is_empty")]
8337    pub svc_lvl: Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8338    #[serde(rename = "LclInstrm")]
8339    #[serde(skip_serializing_if = "Option::is_none")]
8340    pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
8341    #[serde(rename = "CtgyPurp")]
8342    #[serde(skip_serializing_if = "Option::is_none")]
8343    pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
8344}
8345/// Builder for [`PaymentTypeInformation28`]. Construct via [`PaymentTypeInformation28::builder()`].
8346#[allow(clippy::struct_field_names)]
8347#[derive(Default)]
8348pub struct PaymentTypeInformation28Builder {
8349    instr_prty: ::std::option::Option<Priority2Code>,
8350    clr_chanl: ::std::option::Option<ClearingChannel2Code>,
8351    svc_lvl: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8352    lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
8353    ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
8354}
8355impl PaymentTypeInformation28Builder {
8356    /// Set the `instr_prty` field.
8357    #[must_use]
8358    pub fn instr_prty(mut self, value: Priority2Code) -> PaymentTypeInformation28Builder {
8359        self.instr_prty = ::std::option::Option::Some(value);
8360        self
8361    }
8362    /// Set the `clr_chanl` field.
8363    #[must_use]
8364    pub fn clr_chanl(mut self, value: ClearingChannel2Code) -> PaymentTypeInformation28Builder {
8365        self.clr_chanl = ::std::option::Option::Some(value);
8366        self
8367    }
8368    /// Set the `svc_lvl` field (replaces any previously added items).
8369    #[must_use]
8370    pub fn svc_lvl(
8371        mut self,
8372        value: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8373    ) -> PaymentTypeInformation28Builder {
8374        self.svc_lvl = value;
8375        self
8376    }
8377    /// Append one item to the `svc_lvl` field.
8378    #[must_use]
8379    pub fn add_svc_lvl(
8380        mut self,
8381        value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
8382    ) -> PaymentTypeInformation28Builder {
8383        self.svc_lvl.push(value);
8384        self
8385    }
8386    /// Set the `lcl_instrm` field.
8387    #[must_use]
8388    pub fn lcl_instrm(
8389        mut self,
8390        value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
8391    ) -> PaymentTypeInformation28Builder {
8392        self.lcl_instrm = ::std::option::Option::Some(value);
8393        self
8394    }
8395    /// Set the `ctgy_purp` field.
8396    #[must_use]
8397    pub fn ctgy_purp(
8398        mut self,
8399        value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
8400    ) -> PaymentTypeInformation28Builder {
8401        self.ctgy_purp = ::std::option::Option::Some(value);
8402        self
8403    }
8404    /// Validate required fields and construct the type.
8405    ///
8406    /// # Errors
8407    ///
8408    /// Returns [`crate::common::BuilderError`] listing the names of any
8409    /// required fields that were not set.
8410    ///
8411    /// # Panics
8412    ///
8413    /// Does not panic — all `.unwrap()` calls are guarded by the
8414    /// missing-field check above.
8415    pub fn build(
8416        self,
8417    ) -> ::std::result::Result<PaymentTypeInformation28, crate::common::BuilderError> {
8418        ::std::result::Result::Ok(PaymentTypeInformation28 {
8419            instr_prty: self.instr_prty,
8420            clr_chanl: self.clr_chanl,
8421            svc_lvl: self.svc_lvl,
8422            lcl_instrm: self.lcl_instrm,
8423            ctgy_purp: self.ctgy_purp,
8424        })
8425    }
8426}
8427impl PaymentTypeInformation28 {
8428    /// Return a new builder for this type.
8429    #[must_use]
8430    pub fn builder() -> PaymentTypeInformation28Builder {
8431        PaymentTypeInformation28Builder::default()
8432    }
8433}
8434#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8435pub struct PersonIdentification13 {
8436    #[serde(rename = "DtAndPlcOfBirth")]
8437    #[serde(skip_serializing_if = "Option::is_none")]
8438    pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
8439    #[serde(rename = "Othr")]
8440    #[serde(default)]
8441    #[serde(skip_serializing_if = "Vec::is_empty")]
8442    pub othr: Vec<GenericPersonIdentification1>,
8443}
8444/// Builder for [`PersonIdentification13`]. Construct via [`PersonIdentification13::builder()`].
8445#[allow(clippy::struct_field_names)]
8446#[derive(Default)]
8447pub struct PersonIdentification13Builder {
8448    dt_and_plc_of_birth: ::std::option::Option<DateAndPlaceOfBirth1>,
8449    othr: ::std::vec::Vec<GenericPersonIdentification1>,
8450}
8451impl PersonIdentification13Builder {
8452    /// Set the `dt_and_plc_of_birth` field.
8453    #[must_use]
8454    pub fn dt_and_plc_of_birth(
8455        mut self,
8456        value: DateAndPlaceOfBirth1,
8457    ) -> PersonIdentification13Builder {
8458        self.dt_and_plc_of_birth = ::std::option::Option::Some(value);
8459        self
8460    }
8461    /// Set the `othr` field (replaces any previously added items).
8462    #[must_use]
8463    pub fn othr(
8464        mut self,
8465        value: ::std::vec::Vec<GenericPersonIdentification1>,
8466    ) -> PersonIdentification13Builder {
8467        self.othr = value;
8468        self
8469    }
8470    /// Append one item to the `othr` field.
8471    #[must_use]
8472    pub fn add_othr(
8473        mut self,
8474        value: GenericPersonIdentification1,
8475    ) -> PersonIdentification13Builder {
8476        self.othr.push(value);
8477        self
8478    }
8479    /// Validate required fields and construct the type.
8480    ///
8481    /// # Errors
8482    ///
8483    /// Returns [`crate::common::BuilderError`] listing the names of any
8484    /// required fields that were not set.
8485    ///
8486    /// # Panics
8487    ///
8488    /// Does not panic — all `.unwrap()` calls are guarded by the
8489    /// missing-field check above.
8490    pub fn build(
8491        self,
8492    ) -> ::std::result::Result<PersonIdentification13, crate::common::BuilderError> {
8493        ::std::result::Result::Ok(PersonIdentification13 {
8494            dt_and_plc_of_birth: self.dt_and_plc_of_birth,
8495            othr: self.othr,
8496        })
8497    }
8498}
8499impl PersonIdentification13 {
8500    /// Return a new builder for this type.
8501    #[must_use]
8502    pub fn builder() -> PersonIdentification13Builder {
8503        PersonIdentification13Builder::default()
8504    }
8505}
8506#[allow(clippy::large_enum_variant)]
8507#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8508pub enum PersonIdentificationSchemeName1Choice {
8509    #[serde(rename = "Cd")]
8510    Cd(ExternalPersonIdentification1Code),
8511    #[serde(rename = "Prtry")]
8512    Prtry(Max35Text),
8513}
8514#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8515pub struct PostalAddress24 {
8516    #[serde(rename = "AdrTp")]
8517    #[serde(skip_serializing_if = "Option::is_none")]
8518    pub adr_tp: Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
8519    #[serde(rename = "Dept")]
8520    #[serde(skip_serializing_if = "Option::is_none")]
8521    pub dept: Option<Max70Text>,
8522    #[serde(rename = "SubDept")]
8523    #[serde(skip_serializing_if = "Option::is_none")]
8524    pub sub_dept: Option<Max70Text>,
8525    #[serde(rename = "StrtNm")]
8526    #[serde(skip_serializing_if = "Option::is_none")]
8527    pub strt_nm: Option<Max70Text>,
8528    #[serde(rename = "BldgNb")]
8529    #[serde(skip_serializing_if = "Option::is_none")]
8530    pub bldg_nb: Option<Max16Text>,
8531    #[serde(rename = "BldgNm")]
8532    #[serde(skip_serializing_if = "Option::is_none")]
8533    pub bldg_nm: Option<Max35Text>,
8534    #[serde(rename = "Flr")]
8535    #[serde(skip_serializing_if = "Option::is_none")]
8536    pub flr: Option<Max70Text>,
8537    #[serde(rename = "PstBx")]
8538    #[serde(skip_serializing_if = "Option::is_none")]
8539    pub pst_bx: Option<Max16Text>,
8540    #[serde(rename = "Room")]
8541    #[serde(skip_serializing_if = "Option::is_none")]
8542    pub room: Option<Max70Text>,
8543    #[serde(rename = "PstCd")]
8544    #[serde(skip_serializing_if = "Option::is_none")]
8545    pub pst_cd: Option<Max16Text>,
8546    #[serde(rename = "TwnNm")]
8547    #[serde(skip_serializing_if = "Option::is_none")]
8548    pub twn_nm: Option<Max35Text>,
8549    #[serde(rename = "TwnLctnNm")]
8550    #[serde(skip_serializing_if = "Option::is_none")]
8551    pub twn_lctn_nm: Option<Max35Text>,
8552    #[serde(rename = "DstrctNm")]
8553    #[serde(skip_serializing_if = "Option::is_none")]
8554    pub dstrct_nm: Option<Max35Text>,
8555    #[serde(rename = "CtrySubDvsn")]
8556    #[serde(skip_serializing_if = "Option::is_none")]
8557    pub ctry_sub_dvsn: Option<Max35Text>,
8558    #[serde(rename = "Ctry")]
8559    #[serde(skip_serializing_if = "Option::is_none")]
8560    pub ctry: Option<CountryCode>,
8561    #[serde(rename = "AdrLine")]
8562    /// Maximum 7 occurrences.
8563    #[serde(default)]
8564    #[serde(skip_serializing_if = "Vec::is_empty")]
8565    pub adr_line: Vec<Max70Text>,
8566}
8567/// Builder for [`PostalAddress24`]. Construct via [`PostalAddress24::builder()`].
8568#[allow(clippy::struct_field_names)]
8569#[derive(Default)]
8570pub struct PostalAddress24Builder {
8571    adr_tp: ::std::option::Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
8572    dept: ::std::option::Option<Max70Text>,
8573    sub_dept: ::std::option::Option<Max70Text>,
8574    strt_nm: ::std::option::Option<Max70Text>,
8575    bldg_nb: ::std::option::Option<Max16Text>,
8576    bldg_nm: ::std::option::Option<Max35Text>,
8577    flr: ::std::option::Option<Max70Text>,
8578    pst_bx: ::std::option::Option<Max16Text>,
8579    room: ::std::option::Option<Max70Text>,
8580    pst_cd: ::std::option::Option<Max16Text>,
8581    twn_nm: ::std::option::Option<Max35Text>,
8582    twn_lctn_nm: ::std::option::Option<Max35Text>,
8583    dstrct_nm: ::std::option::Option<Max35Text>,
8584    ctry_sub_dvsn: ::std::option::Option<Max35Text>,
8585    ctry: ::std::option::Option<CountryCode>,
8586    adr_line: ::std::vec::Vec<Max70Text>,
8587}
8588impl PostalAddress24Builder {
8589    /// Set the `adr_tp` field.
8590    #[must_use]
8591    pub fn adr_tp(
8592        mut self,
8593        value: crate::common::ChoiceWrapper<AddressType3Choice>,
8594    ) -> PostalAddress24Builder {
8595        self.adr_tp = ::std::option::Option::Some(value);
8596        self
8597    }
8598    /// Set the `dept` field.
8599    #[must_use]
8600    pub fn dept(mut self, value: Max70Text) -> PostalAddress24Builder {
8601        self.dept = ::std::option::Option::Some(value);
8602        self
8603    }
8604    /// Set the `sub_dept` field.
8605    #[must_use]
8606    pub fn sub_dept(mut self, value: Max70Text) -> PostalAddress24Builder {
8607        self.sub_dept = ::std::option::Option::Some(value);
8608        self
8609    }
8610    /// Set the `strt_nm` field.
8611    #[must_use]
8612    pub fn strt_nm(mut self, value: Max70Text) -> PostalAddress24Builder {
8613        self.strt_nm = ::std::option::Option::Some(value);
8614        self
8615    }
8616    /// Set the `bldg_nb` field.
8617    #[must_use]
8618    pub fn bldg_nb(mut self, value: Max16Text) -> PostalAddress24Builder {
8619        self.bldg_nb = ::std::option::Option::Some(value);
8620        self
8621    }
8622    /// Set the `bldg_nm` field.
8623    #[must_use]
8624    pub fn bldg_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
8625        self.bldg_nm = ::std::option::Option::Some(value);
8626        self
8627    }
8628    /// Set the `flr` field.
8629    #[must_use]
8630    pub fn flr(mut self, value: Max70Text) -> PostalAddress24Builder {
8631        self.flr = ::std::option::Option::Some(value);
8632        self
8633    }
8634    /// Set the `pst_bx` field.
8635    #[must_use]
8636    pub fn pst_bx(mut self, value: Max16Text) -> PostalAddress24Builder {
8637        self.pst_bx = ::std::option::Option::Some(value);
8638        self
8639    }
8640    /// Set the `room` field.
8641    #[must_use]
8642    pub fn room(mut self, value: Max70Text) -> PostalAddress24Builder {
8643        self.room = ::std::option::Option::Some(value);
8644        self
8645    }
8646    /// Set the `pst_cd` field.
8647    #[must_use]
8648    pub fn pst_cd(mut self, value: Max16Text) -> PostalAddress24Builder {
8649        self.pst_cd = ::std::option::Option::Some(value);
8650        self
8651    }
8652    /// Set the `twn_nm` field.
8653    #[must_use]
8654    pub fn twn_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
8655        self.twn_nm = ::std::option::Option::Some(value);
8656        self
8657    }
8658    /// Set the `twn_lctn_nm` field.
8659    #[must_use]
8660    pub fn twn_lctn_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
8661        self.twn_lctn_nm = ::std::option::Option::Some(value);
8662        self
8663    }
8664    /// Set the `dstrct_nm` field.
8665    #[must_use]
8666    pub fn dstrct_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
8667        self.dstrct_nm = ::std::option::Option::Some(value);
8668        self
8669    }
8670    /// Set the `ctry_sub_dvsn` field.
8671    #[must_use]
8672    pub fn ctry_sub_dvsn(mut self, value: Max35Text) -> PostalAddress24Builder {
8673        self.ctry_sub_dvsn = ::std::option::Option::Some(value);
8674        self
8675    }
8676    /// Set the `ctry` field.
8677    #[must_use]
8678    pub fn ctry(mut self, value: CountryCode) -> PostalAddress24Builder {
8679        self.ctry = ::std::option::Option::Some(value);
8680        self
8681    }
8682    /// Set the `adr_line` field (replaces any previously added items).
8683    #[must_use]
8684    pub fn adr_line(mut self, value: ::std::vec::Vec<Max70Text>) -> PostalAddress24Builder {
8685        self.adr_line = value;
8686        self
8687    }
8688    /// Append one item to the `adr_line` field.
8689    #[must_use]
8690    pub fn add_adr_line(mut self, value: Max70Text) -> PostalAddress24Builder {
8691        self.adr_line.push(value);
8692        self
8693    }
8694    /// Validate required fields and construct the type.
8695    ///
8696    /// # Errors
8697    ///
8698    /// Returns [`crate::common::BuilderError`] listing the names of any
8699    /// required fields that were not set.
8700    ///
8701    /// # Panics
8702    ///
8703    /// Does not panic — all `.unwrap()` calls are guarded by the
8704    /// missing-field check above.
8705    pub fn build(self) -> ::std::result::Result<PostalAddress24, crate::common::BuilderError> {
8706        ::std::result::Result::Ok(PostalAddress24 {
8707            adr_tp: self.adr_tp,
8708            dept: self.dept,
8709            sub_dept: self.sub_dept,
8710            strt_nm: self.strt_nm,
8711            bldg_nb: self.bldg_nb,
8712            bldg_nm: self.bldg_nm,
8713            flr: self.flr,
8714            pst_bx: self.pst_bx,
8715            room: self.room,
8716            pst_cd: self.pst_cd,
8717            twn_nm: self.twn_nm,
8718            twn_lctn_nm: self.twn_lctn_nm,
8719            dstrct_nm: self.dstrct_nm,
8720            ctry_sub_dvsn: self.ctry_sub_dvsn,
8721            ctry: self.ctry,
8722            adr_line: self.adr_line,
8723        })
8724    }
8725}
8726impl PostalAddress24 {
8727    /// Return a new builder for this type.
8728    #[must_use]
8729    pub fn builder() -> PostalAddress24Builder {
8730        PostalAddress24Builder::default()
8731    }
8732}
8733#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8734pub struct ProxyAccountIdentification1 {
8735    #[serde(rename = "Tp")]
8736    #[serde(skip_serializing_if = "Option::is_none")]
8737    pub tp: Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
8738    #[serde(rename = "Id")]
8739    pub id: Max2048Text,
8740}
8741/// Builder for [`ProxyAccountIdentification1`]. Construct via [`ProxyAccountIdentification1::builder()`].
8742#[allow(clippy::struct_field_names)]
8743#[derive(Default)]
8744pub struct ProxyAccountIdentification1Builder {
8745    tp: ::std::option::Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
8746    id: ::std::option::Option<Max2048Text>,
8747}
8748impl ProxyAccountIdentification1Builder {
8749    /// Set the `tp` field.
8750    #[must_use]
8751    pub fn tp(
8752        mut self,
8753        value: crate::common::ChoiceWrapper<ProxyAccountType1Choice>,
8754    ) -> ProxyAccountIdentification1Builder {
8755        self.tp = ::std::option::Option::Some(value);
8756        self
8757    }
8758    /// Set the `id` field.
8759    #[must_use]
8760    pub fn id(mut self, value: Max2048Text) -> ProxyAccountIdentification1Builder {
8761        self.id = ::std::option::Option::Some(value);
8762        self
8763    }
8764    /// Validate required fields and construct the type.
8765    ///
8766    /// # Errors
8767    ///
8768    /// Returns [`crate::common::BuilderError`] listing the names of any
8769    /// required fields that were not set.
8770    ///
8771    /// # Panics
8772    ///
8773    /// Does not panic — all `.unwrap()` calls are guarded by the
8774    /// missing-field check above.
8775    pub fn build(
8776        self,
8777    ) -> ::std::result::Result<ProxyAccountIdentification1, crate::common::BuilderError> {
8778        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8779        if self.id.is_none() {
8780            missing.push("id".to_owned());
8781        }
8782        if !missing.is_empty() {
8783            return ::std::result::Result::Err(crate::common::BuilderError {
8784                type_name: "ProxyAccountIdentification1".to_owned(),
8785                missing_fields: missing,
8786            });
8787        }
8788        ::std::result::Result::Ok(ProxyAccountIdentification1 {
8789            tp: self.tp,
8790            id: self.id.unwrap(),
8791        })
8792    }
8793}
8794impl ProxyAccountIdentification1 {
8795    /// Return a new builder for this type.
8796    #[must_use]
8797    pub fn builder() -> ProxyAccountIdentification1Builder {
8798        ProxyAccountIdentification1Builder::default()
8799    }
8800}
8801#[allow(clippy::large_enum_variant)]
8802#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8803pub enum ProxyAccountType1Choice {
8804    #[serde(rename = "Cd")]
8805    Cd(ExternalProxyAccountType1Code),
8806    #[serde(rename = "Prtry")]
8807    Prtry(Max35Text),
8808}
8809#[allow(clippy::large_enum_variant)]
8810#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8811pub enum Purpose2Choice {
8812    #[serde(rename = "Cd")]
8813    Cd(ExternalPurpose1Code),
8814    #[serde(rename = "Prtry")]
8815    Prtry(Max35Text),
8816}
8817#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8818pub struct ReferredDocumentInformation7 {
8819    #[serde(rename = "Tp")]
8820    #[serde(skip_serializing_if = "Option::is_none")]
8821    pub tp: Option<ReferredDocumentType4>,
8822    #[serde(rename = "Nb")]
8823    #[serde(skip_serializing_if = "Option::is_none")]
8824    pub nb: Option<Max35Text>,
8825    #[serde(rename = "RltdDt")]
8826    #[serde(skip_serializing_if = "Option::is_none")]
8827    pub rltd_dt: Option<ISODate>,
8828    #[serde(rename = "LineDtls")]
8829    #[serde(default)]
8830    #[serde(skip_serializing_if = "Vec::is_empty")]
8831    pub line_dtls: Vec<DocumentLineInformation1>,
8832}
8833/// Builder for [`ReferredDocumentInformation7`]. Construct via [`ReferredDocumentInformation7::builder()`].
8834#[allow(clippy::struct_field_names)]
8835#[derive(Default)]
8836pub struct ReferredDocumentInformation7Builder {
8837    tp: ::std::option::Option<ReferredDocumentType4>,
8838    nb: ::std::option::Option<Max35Text>,
8839    rltd_dt: ::std::option::Option<ISODate>,
8840    line_dtls: ::std::vec::Vec<DocumentLineInformation1>,
8841}
8842impl ReferredDocumentInformation7Builder {
8843    /// Set the `tp` field.
8844    #[must_use]
8845    pub fn tp(mut self, value: ReferredDocumentType4) -> ReferredDocumentInformation7Builder {
8846        self.tp = ::std::option::Option::Some(value);
8847        self
8848    }
8849    /// Set the `nb` field.
8850    #[must_use]
8851    pub fn nb(mut self, value: Max35Text) -> ReferredDocumentInformation7Builder {
8852        self.nb = ::std::option::Option::Some(value);
8853        self
8854    }
8855    /// Set the `rltd_dt` field.
8856    #[must_use]
8857    pub fn rltd_dt(mut self, value: ISODate) -> ReferredDocumentInformation7Builder {
8858        self.rltd_dt = ::std::option::Option::Some(value);
8859        self
8860    }
8861    /// Set the `line_dtls` field (replaces any previously added items).
8862    #[must_use]
8863    pub fn line_dtls(
8864        mut self,
8865        value: ::std::vec::Vec<DocumentLineInformation1>,
8866    ) -> ReferredDocumentInformation7Builder {
8867        self.line_dtls = value;
8868        self
8869    }
8870    /// Append one item to the `line_dtls` field.
8871    #[must_use]
8872    pub fn add_line_dtls(
8873        mut self,
8874        value: DocumentLineInformation1,
8875    ) -> ReferredDocumentInformation7Builder {
8876        self.line_dtls.push(value);
8877        self
8878    }
8879    /// Validate required fields and construct the type.
8880    ///
8881    /// # Errors
8882    ///
8883    /// Returns [`crate::common::BuilderError`] listing the names of any
8884    /// required fields that were not set.
8885    ///
8886    /// # Panics
8887    ///
8888    /// Does not panic — all `.unwrap()` calls are guarded by the
8889    /// missing-field check above.
8890    pub fn build(
8891        self,
8892    ) -> ::std::result::Result<ReferredDocumentInformation7, crate::common::BuilderError> {
8893        ::std::result::Result::Ok(ReferredDocumentInformation7 {
8894            tp: self.tp,
8895            nb: self.nb,
8896            rltd_dt: self.rltd_dt,
8897            line_dtls: self.line_dtls,
8898        })
8899    }
8900}
8901impl ReferredDocumentInformation7 {
8902    /// Return a new builder for this type.
8903    #[must_use]
8904    pub fn builder() -> ReferredDocumentInformation7Builder {
8905        ReferredDocumentInformation7Builder::default()
8906    }
8907}
8908#[allow(clippy::large_enum_variant)]
8909#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8910pub enum ReferredDocumentType3Choice {
8911    #[serde(rename = "Cd")]
8912    Cd(DocumentType6Code),
8913    #[serde(rename = "Prtry")]
8914    Prtry(Max35Text),
8915}
8916#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8917pub struct ReferredDocumentType4 {
8918    #[serde(rename = "CdOrPrtry")]
8919    pub cd_or_prtry: crate::common::ChoiceWrapper<ReferredDocumentType3Choice>,
8920    #[serde(rename = "Issr")]
8921    #[serde(skip_serializing_if = "Option::is_none")]
8922    pub issr: Option<Max35Text>,
8923}
8924/// Builder for [`ReferredDocumentType4`]. Construct via [`ReferredDocumentType4::builder()`].
8925#[allow(clippy::struct_field_names)]
8926#[derive(Default)]
8927pub struct ReferredDocumentType4Builder {
8928    cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<ReferredDocumentType3Choice>>,
8929    issr: ::std::option::Option<Max35Text>,
8930}
8931impl ReferredDocumentType4Builder {
8932    /// Set the `cd_or_prtry` field.
8933    #[must_use]
8934    pub fn cd_or_prtry(
8935        mut self,
8936        value: crate::common::ChoiceWrapper<ReferredDocumentType3Choice>,
8937    ) -> ReferredDocumentType4Builder {
8938        self.cd_or_prtry = ::std::option::Option::Some(value);
8939        self
8940    }
8941    /// Set the `issr` field.
8942    #[must_use]
8943    pub fn issr(mut self, value: Max35Text) -> ReferredDocumentType4Builder {
8944        self.issr = ::std::option::Option::Some(value);
8945        self
8946    }
8947    /// Validate required fields and construct the type.
8948    ///
8949    /// # Errors
8950    ///
8951    /// Returns [`crate::common::BuilderError`] listing the names of any
8952    /// required fields that were not set.
8953    ///
8954    /// # Panics
8955    ///
8956    /// Does not panic — all `.unwrap()` calls are guarded by the
8957    /// missing-field check above.
8958    pub fn build(
8959        self,
8960    ) -> ::std::result::Result<ReferredDocumentType4, crate::common::BuilderError> {
8961        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8962        if self.cd_or_prtry.is_none() {
8963            missing.push("cd_or_prtry".to_owned());
8964        }
8965        if !missing.is_empty() {
8966            return ::std::result::Result::Err(crate::common::BuilderError {
8967                type_name: "ReferredDocumentType4".to_owned(),
8968                missing_fields: missing,
8969            });
8970        }
8971        ::std::result::Result::Ok(ReferredDocumentType4 {
8972            cd_or_prtry: self.cd_or_prtry.unwrap(),
8973            issr: self.issr,
8974        })
8975    }
8976}
8977impl ReferredDocumentType4 {
8978    /// Return a new builder for this type.
8979    #[must_use]
8980    pub fn builder() -> ReferredDocumentType4Builder {
8981        ReferredDocumentType4Builder::default()
8982    }
8983}
8984#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8985pub struct RemittanceAmount2 {
8986    #[serde(rename = "DuePyblAmt")]
8987    #[serde(skip_serializing_if = "Option::is_none")]
8988    pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8989    #[serde(rename = "DscntApldAmt")]
8990    #[serde(default)]
8991    #[serde(skip_serializing_if = "Vec::is_empty")]
8992    pub dscnt_apld_amt: Vec<DiscountAmountAndType1>,
8993    #[serde(rename = "CdtNoteAmt")]
8994    #[serde(skip_serializing_if = "Option::is_none")]
8995    pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8996    #[serde(rename = "TaxAmt")]
8997    #[serde(default)]
8998    #[serde(skip_serializing_if = "Vec::is_empty")]
8999    pub tax_amt: Vec<TaxAmountAndType1>,
9000    #[serde(rename = "AdjstmntAmtAndRsn")]
9001    #[serde(default)]
9002    #[serde(skip_serializing_if = "Vec::is_empty")]
9003    pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
9004    #[serde(rename = "RmtdAmt")]
9005    #[serde(skip_serializing_if = "Option::is_none")]
9006    pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9007}
9008/// Builder for [`RemittanceAmount2`]. Construct via [`RemittanceAmount2::builder()`].
9009#[allow(clippy::struct_field_names)]
9010#[derive(Default)]
9011pub struct RemittanceAmount2Builder {
9012    due_pybl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9013    dscnt_apld_amt: ::std::vec::Vec<DiscountAmountAndType1>,
9014    cdt_note_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9015    tax_amt: ::std::vec::Vec<TaxAmountAndType1>,
9016    adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
9017    rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9018}
9019impl RemittanceAmount2Builder {
9020    /// Set the `due_pybl_amt` field.
9021    #[must_use]
9022    pub fn due_pybl_amt(
9023        mut self,
9024        value: ActiveOrHistoricCurrencyAndAmount,
9025    ) -> RemittanceAmount2Builder {
9026        self.due_pybl_amt = ::std::option::Option::Some(value);
9027        self
9028    }
9029    /// Set the `dscnt_apld_amt` field (replaces any previously added items).
9030    #[must_use]
9031    pub fn dscnt_apld_amt(
9032        mut self,
9033        value: ::std::vec::Vec<DiscountAmountAndType1>,
9034    ) -> RemittanceAmount2Builder {
9035        self.dscnt_apld_amt = value;
9036        self
9037    }
9038    /// Append one item to the `dscnt_apld_amt` field.
9039    #[must_use]
9040    pub fn add_dscnt_apld_amt(mut self, value: DiscountAmountAndType1) -> RemittanceAmount2Builder {
9041        self.dscnt_apld_amt.push(value);
9042        self
9043    }
9044    /// Set the `cdt_note_amt` field.
9045    #[must_use]
9046    pub fn cdt_note_amt(
9047        mut self,
9048        value: ActiveOrHistoricCurrencyAndAmount,
9049    ) -> RemittanceAmount2Builder {
9050        self.cdt_note_amt = ::std::option::Option::Some(value);
9051        self
9052    }
9053    /// Set the `tax_amt` field (replaces any previously added items).
9054    #[must_use]
9055    pub fn tax_amt(
9056        mut self,
9057        value: ::std::vec::Vec<TaxAmountAndType1>,
9058    ) -> RemittanceAmount2Builder {
9059        self.tax_amt = value;
9060        self
9061    }
9062    /// Append one item to the `tax_amt` field.
9063    #[must_use]
9064    pub fn add_tax_amt(mut self, value: TaxAmountAndType1) -> RemittanceAmount2Builder {
9065        self.tax_amt.push(value);
9066        self
9067    }
9068    /// Set the `adjstmnt_amt_and_rsn` field (replaces any previously added items).
9069    #[must_use]
9070    pub fn adjstmnt_amt_and_rsn(
9071        mut self,
9072        value: ::std::vec::Vec<DocumentAdjustment1>,
9073    ) -> RemittanceAmount2Builder {
9074        self.adjstmnt_amt_and_rsn = value;
9075        self
9076    }
9077    /// Append one item to the `adjstmnt_amt_and_rsn` field.
9078    #[must_use]
9079    pub fn add_adjstmnt_amt_and_rsn(
9080        mut self,
9081        value: DocumentAdjustment1,
9082    ) -> RemittanceAmount2Builder {
9083        self.adjstmnt_amt_and_rsn.push(value);
9084        self
9085    }
9086    /// Set the `rmtd_amt` field.
9087    #[must_use]
9088    pub fn rmtd_amt(
9089        mut self,
9090        value: ActiveOrHistoricCurrencyAndAmount,
9091    ) -> RemittanceAmount2Builder {
9092        self.rmtd_amt = ::std::option::Option::Some(value);
9093        self
9094    }
9095    /// Validate required fields and construct the type.
9096    ///
9097    /// # Errors
9098    ///
9099    /// Returns [`crate::common::BuilderError`] listing the names of any
9100    /// required fields that were not set.
9101    ///
9102    /// # Panics
9103    ///
9104    /// Does not panic — all `.unwrap()` calls are guarded by the
9105    /// missing-field check above.
9106    pub fn build(self) -> ::std::result::Result<RemittanceAmount2, crate::common::BuilderError> {
9107        ::std::result::Result::Ok(RemittanceAmount2 {
9108            due_pybl_amt: self.due_pybl_amt,
9109            dscnt_apld_amt: self.dscnt_apld_amt,
9110            cdt_note_amt: self.cdt_note_amt,
9111            tax_amt: self.tax_amt,
9112            adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
9113            rmtd_amt: self.rmtd_amt,
9114        })
9115    }
9116}
9117impl RemittanceAmount2 {
9118    /// Return a new builder for this type.
9119    #[must_use]
9120    pub fn builder() -> RemittanceAmount2Builder {
9121        RemittanceAmount2Builder::default()
9122    }
9123}
9124#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9125pub struct RemittanceAmount3 {
9126    #[serde(rename = "DuePyblAmt")]
9127    #[serde(skip_serializing_if = "Option::is_none")]
9128    pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9129    #[serde(rename = "DscntApldAmt")]
9130    #[serde(default)]
9131    #[serde(skip_serializing_if = "Vec::is_empty")]
9132    pub dscnt_apld_amt: Vec<DiscountAmountAndType1>,
9133    #[serde(rename = "CdtNoteAmt")]
9134    #[serde(skip_serializing_if = "Option::is_none")]
9135    pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9136    #[serde(rename = "TaxAmt")]
9137    #[serde(default)]
9138    #[serde(skip_serializing_if = "Vec::is_empty")]
9139    pub tax_amt: Vec<TaxAmountAndType1>,
9140    #[serde(rename = "AdjstmntAmtAndRsn")]
9141    #[serde(default)]
9142    #[serde(skip_serializing_if = "Vec::is_empty")]
9143    pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
9144    #[serde(rename = "RmtdAmt")]
9145    #[serde(skip_serializing_if = "Option::is_none")]
9146    pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9147}
9148/// Builder for [`RemittanceAmount3`]. Construct via [`RemittanceAmount3::builder()`].
9149#[allow(clippy::struct_field_names)]
9150#[derive(Default)]
9151pub struct RemittanceAmount3Builder {
9152    due_pybl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9153    dscnt_apld_amt: ::std::vec::Vec<DiscountAmountAndType1>,
9154    cdt_note_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9155    tax_amt: ::std::vec::Vec<TaxAmountAndType1>,
9156    adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
9157    rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9158}
9159impl RemittanceAmount3Builder {
9160    /// Set the `due_pybl_amt` field.
9161    #[must_use]
9162    pub fn due_pybl_amt(
9163        mut self,
9164        value: ActiveOrHistoricCurrencyAndAmount,
9165    ) -> RemittanceAmount3Builder {
9166        self.due_pybl_amt = ::std::option::Option::Some(value);
9167        self
9168    }
9169    /// Set the `dscnt_apld_amt` field (replaces any previously added items).
9170    #[must_use]
9171    pub fn dscnt_apld_amt(
9172        mut self,
9173        value: ::std::vec::Vec<DiscountAmountAndType1>,
9174    ) -> RemittanceAmount3Builder {
9175        self.dscnt_apld_amt = value;
9176        self
9177    }
9178    /// Append one item to the `dscnt_apld_amt` field.
9179    #[must_use]
9180    pub fn add_dscnt_apld_amt(mut self, value: DiscountAmountAndType1) -> RemittanceAmount3Builder {
9181        self.dscnt_apld_amt.push(value);
9182        self
9183    }
9184    /// Set the `cdt_note_amt` field.
9185    #[must_use]
9186    pub fn cdt_note_amt(
9187        mut self,
9188        value: ActiveOrHistoricCurrencyAndAmount,
9189    ) -> RemittanceAmount3Builder {
9190        self.cdt_note_amt = ::std::option::Option::Some(value);
9191        self
9192    }
9193    /// Set the `tax_amt` field (replaces any previously added items).
9194    #[must_use]
9195    pub fn tax_amt(
9196        mut self,
9197        value: ::std::vec::Vec<TaxAmountAndType1>,
9198    ) -> RemittanceAmount3Builder {
9199        self.tax_amt = value;
9200        self
9201    }
9202    /// Append one item to the `tax_amt` field.
9203    #[must_use]
9204    pub fn add_tax_amt(mut self, value: TaxAmountAndType1) -> RemittanceAmount3Builder {
9205        self.tax_amt.push(value);
9206        self
9207    }
9208    /// Set the `adjstmnt_amt_and_rsn` field (replaces any previously added items).
9209    #[must_use]
9210    pub fn adjstmnt_amt_and_rsn(
9211        mut self,
9212        value: ::std::vec::Vec<DocumentAdjustment1>,
9213    ) -> RemittanceAmount3Builder {
9214        self.adjstmnt_amt_and_rsn = value;
9215        self
9216    }
9217    /// Append one item to the `adjstmnt_amt_and_rsn` field.
9218    #[must_use]
9219    pub fn add_adjstmnt_amt_and_rsn(
9220        mut self,
9221        value: DocumentAdjustment1,
9222    ) -> RemittanceAmount3Builder {
9223        self.adjstmnt_amt_and_rsn.push(value);
9224        self
9225    }
9226    /// Set the `rmtd_amt` field.
9227    #[must_use]
9228    pub fn rmtd_amt(
9229        mut self,
9230        value: ActiveOrHistoricCurrencyAndAmount,
9231    ) -> RemittanceAmount3Builder {
9232        self.rmtd_amt = ::std::option::Option::Some(value);
9233        self
9234    }
9235    /// Validate required fields and construct the type.
9236    ///
9237    /// # Errors
9238    ///
9239    /// Returns [`crate::common::BuilderError`] listing the names of any
9240    /// required fields that were not set.
9241    ///
9242    /// # Panics
9243    ///
9244    /// Does not panic — all `.unwrap()` calls are guarded by the
9245    /// missing-field check above.
9246    pub fn build(self) -> ::std::result::Result<RemittanceAmount3, crate::common::BuilderError> {
9247        ::std::result::Result::Ok(RemittanceAmount3 {
9248            due_pybl_amt: self.due_pybl_amt,
9249            dscnt_apld_amt: self.dscnt_apld_amt,
9250            cdt_note_amt: self.cdt_note_amt,
9251            tax_amt: self.tax_amt,
9252            adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
9253            rmtd_amt: self.rmtd_amt,
9254        })
9255    }
9256}
9257impl RemittanceAmount3 {
9258    /// Return a new builder for this type.
9259    #[must_use]
9260    pub fn builder() -> RemittanceAmount3Builder {
9261        RemittanceAmount3Builder::default()
9262    }
9263}
9264#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9265pub struct RemittanceInformation21 {
9266    #[serde(rename = "Ustrd")]
9267    #[serde(default)]
9268    #[serde(skip_serializing_if = "Vec::is_empty")]
9269    pub ustrd: Vec<Max140Text>,
9270    #[serde(rename = "Strd")]
9271    #[serde(default)]
9272    #[serde(skip_serializing_if = "Vec::is_empty")]
9273    pub strd: Vec<StructuredRemittanceInformation17>,
9274}
9275/// Builder for [`RemittanceInformation21`]. Construct via [`RemittanceInformation21::builder()`].
9276#[allow(clippy::struct_field_names)]
9277#[derive(Default)]
9278pub struct RemittanceInformation21Builder {
9279    ustrd: ::std::vec::Vec<Max140Text>,
9280    strd: ::std::vec::Vec<StructuredRemittanceInformation17>,
9281}
9282impl RemittanceInformation21Builder {
9283    /// Set the `ustrd` field (replaces any previously added items).
9284    #[must_use]
9285    pub fn ustrd(mut self, value: ::std::vec::Vec<Max140Text>) -> RemittanceInformation21Builder {
9286        self.ustrd = value;
9287        self
9288    }
9289    /// Append one item to the `ustrd` field.
9290    #[must_use]
9291    pub fn add_ustrd(mut self, value: Max140Text) -> RemittanceInformation21Builder {
9292        self.ustrd.push(value);
9293        self
9294    }
9295    /// Set the `strd` field (replaces any previously added items).
9296    #[must_use]
9297    pub fn strd(
9298        mut self,
9299        value: ::std::vec::Vec<StructuredRemittanceInformation17>,
9300    ) -> RemittanceInformation21Builder {
9301        self.strd = value;
9302        self
9303    }
9304    /// Append one item to the `strd` field.
9305    #[must_use]
9306    pub fn add_strd(
9307        mut self,
9308        value: StructuredRemittanceInformation17,
9309    ) -> RemittanceInformation21Builder {
9310        self.strd.push(value);
9311        self
9312    }
9313    /// Validate required fields and construct the type.
9314    ///
9315    /// # Errors
9316    ///
9317    /// Returns [`crate::common::BuilderError`] listing the names of any
9318    /// required fields that were not set.
9319    ///
9320    /// # Panics
9321    ///
9322    /// Does not panic — all `.unwrap()` calls are guarded by the
9323    /// missing-field check above.
9324    pub fn build(
9325        self,
9326    ) -> ::std::result::Result<RemittanceInformation21, crate::common::BuilderError> {
9327        ::std::result::Result::Ok(RemittanceInformation21 {
9328            ustrd: self.ustrd,
9329            strd: self.strd,
9330        })
9331    }
9332}
9333impl RemittanceInformation21 {
9334    /// Return a new builder for this type.
9335    #[must_use]
9336    pub fn builder() -> RemittanceInformation21Builder {
9337        RemittanceInformation21Builder::default()
9338    }
9339}
9340#[allow(clippy::large_enum_variant)]
9341#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9342pub enum ReturnReason5Choice {
9343    #[serde(rename = "Cd")]
9344    Cd(ExternalReturnReason1Code),
9345    #[serde(rename = "Prtry")]
9346    Prtry(Max35Text),
9347}
9348#[allow(clippy::large_enum_variant)]
9349#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9350pub enum ServiceLevel8Choice {
9351    #[serde(rename = "Cd")]
9352    Cd(ExternalServiceLevel1Code),
9353    #[serde(rename = "Prtry")]
9354    Prtry(Max35Text),
9355}
9356#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9357pub struct SettlementDateTimeIndication1 {
9358    #[serde(rename = "DbtDtTm")]
9359    #[serde(skip_serializing_if = "Option::is_none")]
9360    pub dbt_dt_tm: Option<ISODateTime>,
9361    #[serde(rename = "CdtDtTm")]
9362    #[serde(skip_serializing_if = "Option::is_none")]
9363    pub cdt_dt_tm: Option<ISODateTime>,
9364}
9365/// Builder for [`SettlementDateTimeIndication1`]. Construct via [`SettlementDateTimeIndication1::builder()`].
9366#[allow(clippy::struct_field_names)]
9367#[derive(Default)]
9368pub struct SettlementDateTimeIndication1Builder {
9369    dbt_dt_tm: ::std::option::Option<ISODateTime>,
9370    cdt_dt_tm: ::std::option::Option<ISODateTime>,
9371}
9372impl SettlementDateTimeIndication1Builder {
9373    /// Set the `dbt_dt_tm` field.
9374    #[must_use]
9375    pub fn dbt_dt_tm(mut self, value: ISODateTime) -> SettlementDateTimeIndication1Builder {
9376        self.dbt_dt_tm = ::std::option::Option::Some(value);
9377        self
9378    }
9379    /// Set the `cdt_dt_tm` field.
9380    #[must_use]
9381    pub fn cdt_dt_tm(mut self, value: ISODateTime) -> SettlementDateTimeIndication1Builder {
9382        self.cdt_dt_tm = ::std::option::Option::Some(value);
9383        self
9384    }
9385    /// Validate required fields and construct the type.
9386    ///
9387    /// # Errors
9388    ///
9389    /// Returns [`crate::common::BuilderError`] listing the names of any
9390    /// required fields that were not set.
9391    ///
9392    /// # Panics
9393    ///
9394    /// Does not panic — all `.unwrap()` calls are guarded by the
9395    /// missing-field check above.
9396    pub fn build(
9397        self,
9398    ) -> ::std::result::Result<SettlementDateTimeIndication1, crate::common::BuilderError> {
9399        ::std::result::Result::Ok(SettlementDateTimeIndication1 {
9400            dbt_dt_tm: self.dbt_dt_tm,
9401            cdt_dt_tm: self.cdt_dt_tm,
9402        })
9403    }
9404}
9405impl SettlementDateTimeIndication1 {
9406    /// Return a new builder for this type.
9407    #[must_use]
9408    pub fn builder() -> SettlementDateTimeIndication1Builder {
9409        SettlementDateTimeIndication1Builder::default()
9410    }
9411}
9412#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9413pub struct SettlementInstruction11 {
9414    #[serde(rename = "SttlmMtd")]
9415    pub sttlm_mtd: SettlementMethod1Code,
9416    #[serde(rename = "SttlmAcct")]
9417    #[serde(skip_serializing_if = "Option::is_none")]
9418    pub sttlm_acct: Option<CashAccount40>,
9419    #[serde(rename = "ClrSys")]
9420    #[serde(skip_serializing_if = "Option::is_none")]
9421    pub clr_sys: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
9422    #[serde(rename = "InstgRmbrsmntAgt")]
9423    #[serde(skip_serializing_if = "Option::is_none")]
9424    pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
9425    #[serde(rename = "InstgRmbrsmntAgtAcct")]
9426    #[serde(skip_serializing_if = "Option::is_none")]
9427    pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
9428    #[serde(rename = "InstdRmbrsmntAgt")]
9429    #[serde(skip_serializing_if = "Option::is_none")]
9430    pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
9431    #[serde(rename = "InstdRmbrsmntAgtAcct")]
9432    #[serde(skip_serializing_if = "Option::is_none")]
9433    pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
9434    #[serde(rename = "ThrdRmbrsmntAgt")]
9435    #[serde(skip_serializing_if = "Option::is_none")]
9436    pub thrd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
9437    #[serde(rename = "ThrdRmbrsmntAgtAcct")]
9438    #[serde(skip_serializing_if = "Option::is_none")]
9439    pub thrd_rmbrsmnt_agt_acct: Option<CashAccount40>,
9440}
9441/// Builder for [`SettlementInstruction11`]. Construct via [`SettlementInstruction11::builder()`].
9442#[allow(clippy::struct_field_names)]
9443#[derive(Default)]
9444pub struct SettlementInstruction11Builder {
9445    sttlm_mtd: ::std::option::Option<SettlementMethod1Code>,
9446    sttlm_acct: ::std::option::Option<CashAccount40>,
9447    clr_sys:
9448        ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
9449    instg_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
9450    instg_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
9451    instd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
9452    instd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
9453    thrd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
9454    thrd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
9455}
9456impl SettlementInstruction11Builder {
9457    /// Set the `sttlm_mtd` field.
9458    #[must_use]
9459    pub fn sttlm_mtd(mut self, value: SettlementMethod1Code) -> SettlementInstruction11Builder {
9460        self.sttlm_mtd = ::std::option::Option::Some(value);
9461        self
9462    }
9463    /// Set the `sttlm_acct` field.
9464    #[must_use]
9465    pub fn sttlm_acct(mut self, value: CashAccount40) -> SettlementInstruction11Builder {
9466        self.sttlm_acct = ::std::option::Option::Some(value);
9467        self
9468    }
9469    /// Set the `clr_sys` field.
9470    #[must_use]
9471    pub fn clr_sys(
9472        mut self,
9473        value: crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>,
9474    ) -> SettlementInstruction11Builder {
9475        self.clr_sys = ::std::option::Option::Some(value);
9476        self
9477    }
9478    /// Set the `instg_rmbrsmnt_agt` field.
9479    #[must_use]
9480    pub fn instg_rmbrsmnt_agt(
9481        mut self,
9482        value: BranchAndFinancialInstitutionIdentification6,
9483    ) -> SettlementInstruction11Builder {
9484        self.instg_rmbrsmnt_agt = ::std::option::Option::Some(value);
9485        self
9486    }
9487    /// Set the `instg_rmbrsmnt_agt_acct` field.
9488    #[must_use]
9489    pub fn instg_rmbrsmnt_agt_acct(
9490        mut self,
9491        value: CashAccount40,
9492    ) -> SettlementInstruction11Builder {
9493        self.instg_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
9494        self
9495    }
9496    /// Set the `instd_rmbrsmnt_agt` field.
9497    #[must_use]
9498    pub fn instd_rmbrsmnt_agt(
9499        mut self,
9500        value: BranchAndFinancialInstitutionIdentification6,
9501    ) -> SettlementInstruction11Builder {
9502        self.instd_rmbrsmnt_agt = ::std::option::Option::Some(value);
9503        self
9504    }
9505    /// Set the `instd_rmbrsmnt_agt_acct` field.
9506    #[must_use]
9507    pub fn instd_rmbrsmnt_agt_acct(
9508        mut self,
9509        value: CashAccount40,
9510    ) -> SettlementInstruction11Builder {
9511        self.instd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
9512        self
9513    }
9514    /// Set the `thrd_rmbrsmnt_agt` field.
9515    #[must_use]
9516    pub fn thrd_rmbrsmnt_agt(
9517        mut self,
9518        value: BranchAndFinancialInstitutionIdentification6,
9519    ) -> SettlementInstruction11Builder {
9520        self.thrd_rmbrsmnt_agt = ::std::option::Option::Some(value);
9521        self
9522    }
9523    /// Set the `thrd_rmbrsmnt_agt_acct` field.
9524    #[must_use]
9525    pub fn thrd_rmbrsmnt_agt_acct(
9526        mut self,
9527        value: CashAccount40,
9528    ) -> SettlementInstruction11Builder {
9529        self.thrd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
9530        self
9531    }
9532    /// Validate required fields and construct the type.
9533    ///
9534    /// # Errors
9535    ///
9536    /// Returns [`crate::common::BuilderError`] listing the names of any
9537    /// required fields that were not set.
9538    ///
9539    /// # Panics
9540    ///
9541    /// Does not panic — all `.unwrap()` calls are guarded by the
9542    /// missing-field check above.
9543    pub fn build(
9544        self,
9545    ) -> ::std::result::Result<SettlementInstruction11, crate::common::BuilderError> {
9546        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9547        if self.sttlm_mtd.is_none() {
9548            missing.push("sttlm_mtd".to_owned());
9549        }
9550        if !missing.is_empty() {
9551            return ::std::result::Result::Err(crate::common::BuilderError {
9552                type_name: "SettlementInstruction11".to_owned(),
9553                missing_fields: missing,
9554            });
9555        }
9556        ::std::result::Result::Ok(SettlementInstruction11 {
9557            sttlm_mtd: self.sttlm_mtd.unwrap(),
9558            sttlm_acct: self.sttlm_acct,
9559            clr_sys: self.clr_sys,
9560            instg_rmbrsmnt_agt: self.instg_rmbrsmnt_agt,
9561            instg_rmbrsmnt_agt_acct: self.instg_rmbrsmnt_agt_acct,
9562            instd_rmbrsmnt_agt: self.instd_rmbrsmnt_agt,
9563            instd_rmbrsmnt_agt_acct: self.instd_rmbrsmnt_agt_acct,
9564            thrd_rmbrsmnt_agt: self.thrd_rmbrsmnt_agt,
9565            thrd_rmbrsmnt_agt_acct: self.thrd_rmbrsmnt_agt_acct,
9566        })
9567    }
9568}
9569impl SettlementInstruction11 {
9570    /// Return a new builder for this type.
9571    #[must_use]
9572    pub fn builder() -> SettlementInstruction11Builder {
9573        SettlementInstruction11Builder::default()
9574    }
9575}
9576#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9577pub struct SettlementTimeRequest2 {
9578    #[serde(rename = "CLSTm")]
9579    #[serde(skip_serializing_if = "Option::is_none")]
9580    pub cls_tm: Option<ISOTime>,
9581    #[serde(rename = "TillTm")]
9582    #[serde(skip_serializing_if = "Option::is_none")]
9583    pub till_tm: Option<ISOTime>,
9584    #[serde(rename = "FrTm")]
9585    #[serde(skip_serializing_if = "Option::is_none")]
9586    pub fr_tm: Option<ISOTime>,
9587    #[serde(rename = "RjctTm")]
9588    #[serde(skip_serializing_if = "Option::is_none")]
9589    pub rjct_tm: Option<ISOTime>,
9590}
9591/// Builder for [`SettlementTimeRequest2`]. Construct via [`SettlementTimeRequest2::builder()`].
9592#[allow(clippy::struct_field_names)]
9593#[derive(Default)]
9594pub struct SettlementTimeRequest2Builder {
9595    cls_tm: ::std::option::Option<ISOTime>,
9596    till_tm: ::std::option::Option<ISOTime>,
9597    fr_tm: ::std::option::Option<ISOTime>,
9598    rjct_tm: ::std::option::Option<ISOTime>,
9599}
9600impl SettlementTimeRequest2Builder {
9601    /// Set the `cls_tm` field.
9602    #[must_use]
9603    pub fn cls_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9604        self.cls_tm = ::std::option::Option::Some(value);
9605        self
9606    }
9607    /// Set the `till_tm` field.
9608    #[must_use]
9609    pub fn till_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9610        self.till_tm = ::std::option::Option::Some(value);
9611        self
9612    }
9613    /// Set the `fr_tm` field.
9614    #[must_use]
9615    pub fn fr_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9616        self.fr_tm = ::std::option::Option::Some(value);
9617        self
9618    }
9619    /// Set the `rjct_tm` field.
9620    #[must_use]
9621    pub fn rjct_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9622        self.rjct_tm = ::std::option::Option::Some(value);
9623        self
9624    }
9625    /// Validate required fields and construct the type.
9626    ///
9627    /// # Errors
9628    ///
9629    /// Returns [`crate::common::BuilderError`] listing the names of any
9630    /// required fields that were not set.
9631    ///
9632    /// # Panics
9633    ///
9634    /// Does not panic — all `.unwrap()` calls are guarded by the
9635    /// missing-field check above.
9636    pub fn build(
9637        self,
9638    ) -> ::std::result::Result<SettlementTimeRequest2, crate::common::BuilderError> {
9639        ::std::result::Result::Ok(SettlementTimeRequest2 {
9640            cls_tm: self.cls_tm,
9641            till_tm: self.till_tm,
9642            fr_tm: self.fr_tm,
9643            rjct_tm: self.rjct_tm,
9644        })
9645    }
9646}
9647impl SettlementTimeRequest2 {
9648    /// Return a new builder for this type.
9649    #[must_use]
9650    pub fn builder() -> SettlementTimeRequest2Builder {
9651        SettlementTimeRequest2Builder::default()
9652    }
9653}
9654#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9655pub struct StructuredRemittanceInformation17 {
9656    #[serde(rename = "RfrdDocInf")]
9657    #[serde(default)]
9658    #[serde(skip_serializing_if = "Vec::is_empty")]
9659    pub rfrd_doc_inf: Vec<ReferredDocumentInformation7>,
9660    #[serde(rename = "RfrdDocAmt")]
9661    #[serde(skip_serializing_if = "Option::is_none")]
9662    pub rfrd_doc_amt: Option<RemittanceAmount2>,
9663    #[serde(rename = "CdtrRefInf")]
9664    #[serde(skip_serializing_if = "Option::is_none")]
9665    pub cdtr_ref_inf: Option<CreditorReferenceInformation2>,
9666    #[serde(rename = "Invcr")]
9667    #[serde(skip_serializing_if = "Option::is_none")]
9668    pub invcr: Option<PartyIdentification135>,
9669    #[serde(rename = "Invcee")]
9670    #[serde(skip_serializing_if = "Option::is_none")]
9671    pub invcee: Option<PartyIdentification135>,
9672    #[serde(rename = "TaxRmt")]
9673    #[serde(skip_serializing_if = "Option::is_none")]
9674    pub tax_rmt: Option<TaxData1>,
9675    #[serde(rename = "GrnshmtRmt")]
9676    #[serde(skip_serializing_if = "Option::is_none")]
9677    pub grnshmt_rmt: Option<Garnishment3>,
9678    #[serde(rename = "AddtlRmtInf")]
9679    /// Maximum 3 occurrences.
9680    #[serde(default)]
9681    #[serde(skip_serializing_if = "Vec::is_empty")]
9682    pub addtl_rmt_inf: Vec<Max140Text>,
9683}
9684/// Builder for [`StructuredRemittanceInformation17`]. Construct via [`StructuredRemittanceInformation17::builder()`].
9685#[allow(clippy::struct_field_names)]
9686#[derive(Default)]
9687pub struct StructuredRemittanceInformation17Builder {
9688    rfrd_doc_inf: ::std::vec::Vec<ReferredDocumentInformation7>,
9689    rfrd_doc_amt: ::std::option::Option<RemittanceAmount2>,
9690    cdtr_ref_inf: ::std::option::Option<CreditorReferenceInformation2>,
9691    invcr: ::std::option::Option<PartyIdentification135>,
9692    invcee: ::std::option::Option<PartyIdentification135>,
9693    tax_rmt: ::std::option::Option<TaxData1>,
9694    grnshmt_rmt: ::std::option::Option<Garnishment3>,
9695    addtl_rmt_inf: ::std::vec::Vec<Max140Text>,
9696}
9697impl StructuredRemittanceInformation17Builder {
9698    /// Set the `rfrd_doc_inf` field (replaces any previously added items).
9699    #[must_use]
9700    pub fn rfrd_doc_inf(
9701        mut self,
9702        value: ::std::vec::Vec<ReferredDocumentInformation7>,
9703    ) -> StructuredRemittanceInformation17Builder {
9704        self.rfrd_doc_inf = value;
9705        self
9706    }
9707    /// Append one item to the `rfrd_doc_inf` field.
9708    #[must_use]
9709    pub fn add_rfrd_doc_inf(
9710        mut self,
9711        value: ReferredDocumentInformation7,
9712    ) -> StructuredRemittanceInformation17Builder {
9713        self.rfrd_doc_inf.push(value);
9714        self
9715    }
9716    /// Set the `rfrd_doc_amt` field.
9717    #[must_use]
9718    pub fn rfrd_doc_amt(
9719        mut self,
9720        value: RemittanceAmount2,
9721    ) -> StructuredRemittanceInformation17Builder {
9722        self.rfrd_doc_amt = ::std::option::Option::Some(value);
9723        self
9724    }
9725    /// Set the `cdtr_ref_inf` field.
9726    #[must_use]
9727    pub fn cdtr_ref_inf(
9728        mut self,
9729        value: CreditorReferenceInformation2,
9730    ) -> StructuredRemittanceInformation17Builder {
9731        self.cdtr_ref_inf = ::std::option::Option::Some(value);
9732        self
9733    }
9734    /// Set the `invcr` field.
9735    #[must_use]
9736    pub fn invcr(
9737        mut self,
9738        value: PartyIdentification135,
9739    ) -> StructuredRemittanceInformation17Builder {
9740        self.invcr = ::std::option::Option::Some(value);
9741        self
9742    }
9743    /// Set the `invcee` field.
9744    #[must_use]
9745    pub fn invcee(
9746        mut self,
9747        value: PartyIdentification135,
9748    ) -> StructuredRemittanceInformation17Builder {
9749        self.invcee = ::std::option::Option::Some(value);
9750        self
9751    }
9752    /// Set the `tax_rmt` field.
9753    #[must_use]
9754    pub fn tax_rmt(mut self, value: TaxData1) -> StructuredRemittanceInformation17Builder {
9755        self.tax_rmt = ::std::option::Option::Some(value);
9756        self
9757    }
9758    /// Set the `grnshmt_rmt` field.
9759    #[must_use]
9760    pub fn grnshmt_rmt(mut self, value: Garnishment3) -> StructuredRemittanceInformation17Builder {
9761        self.grnshmt_rmt = ::std::option::Option::Some(value);
9762        self
9763    }
9764    /// Set the `addtl_rmt_inf` field (replaces any previously added items).
9765    #[must_use]
9766    pub fn addtl_rmt_inf(
9767        mut self,
9768        value: ::std::vec::Vec<Max140Text>,
9769    ) -> StructuredRemittanceInformation17Builder {
9770        self.addtl_rmt_inf = value;
9771        self
9772    }
9773    /// Append one item to the `addtl_rmt_inf` field.
9774    #[must_use]
9775    pub fn add_addtl_rmt_inf(
9776        mut self,
9777        value: Max140Text,
9778    ) -> StructuredRemittanceInformation17Builder {
9779        self.addtl_rmt_inf.push(value);
9780        self
9781    }
9782    /// Validate required fields and construct the type.
9783    ///
9784    /// # Errors
9785    ///
9786    /// Returns [`crate::common::BuilderError`] listing the names of any
9787    /// required fields that were not set.
9788    ///
9789    /// # Panics
9790    ///
9791    /// Does not panic — all `.unwrap()` calls are guarded by the
9792    /// missing-field check above.
9793    pub fn build(
9794        self,
9795    ) -> ::std::result::Result<StructuredRemittanceInformation17, crate::common::BuilderError> {
9796        ::std::result::Result::Ok(StructuredRemittanceInformation17 {
9797            rfrd_doc_inf: self.rfrd_doc_inf,
9798            rfrd_doc_amt: self.rfrd_doc_amt,
9799            cdtr_ref_inf: self.cdtr_ref_inf,
9800            invcr: self.invcr,
9801            invcee: self.invcee,
9802            tax_rmt: self.tax_rmt,
9803            grnshmt_rmt: self.grnshmt_rmt,
9804            addtl_rmt_inf: self.addtl_rmt_inf,
9805        })
9806    }
9807}
9808impl StructuredRemittanceInformation17 {
9809    /// Return a new builder for this type.
9810    #[must_use]
9811    pub fn builder() -> StructuredRemittanceInformation17Builder {
9812        StructuredRemittanceInformation17Builder::default()
9813    }
9814}
9815#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9816pub struct SupplementaryData1 {
9817    #[serde(rename = "PlcAndNm")]
9818    #[serde(skip_serializing_if = "Option::is_none")]
9819    pub plc_and_nm: Option<Max350Text>,
9820    #[serde(rename = "Envlp")]
9821    pub envlp: SupplementaryDataEnvelope1,
9822}
9823/// Builder for [`SupplementaryData1`]. Construct via [`SupplementaryData1::builder()`].
9824#[allow(clippy::struct_field_names)]
9825#[derive(Default)]
9826pub struct SupplementaryData1Builder {
9827    plc_and_nm: ::std::option::Option<Max350Text>,
9828    envlp: ::std::option::Option<SupplementaryDataEnvelope1>,
9829}
9830impl SupplementaryData1Builder {
9831    /// Set the `plc_and_nm` field.
9832    #[must_use]
9833    pub fn plc_and_nm(mut self, value: Max350Text) -> SupplementaryData1Builder {
9834        self.plc_and_nm = ::std::option::Option::Some(value);
9835        self
9836    }
9837    /// Set the `envlp` field.
9838    #[must_use]
9839    pub fn envlp(mut self, value: SupplementaryDataEnvelope1) -> SupplementaryData1Builder {
9840        self.envlp = ::std::option::Option::Some(value);
9841        self
9842    }
9843    /// Validate required fields and construct the type.
9844    ///
9845    /// # Errors
9846    ///
9847    /// Returns [`crate::common::BuilderError`] listing the names of any
9848    /// required fields that were not set.
9849    ///
9850    /// # Panics
9851    ///
9852    /// Does not panic — all `.unwrap()` calls are guarded by the
9853    /// missing-field check above.
9854    pub fn build(self) -> ::std::result::Result<SupplementaryData1, crate::common::BuilderError> {
9855        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9856        if self.envlp.is_none() {
9857            missing.push("envlp".to_owned());
9858        }
9859        if !missing.is_empty() {
9860            return ::std::result::Result::Err(crate::common::BuilderError {
9861                type_name: "SupplementaryData1".to_owned(),
9862                missing_fields: missing,
9863            });
9864        }
9865        ::std::result::Result::Ok(SupplementaryData1 {
9866            plc_and_nm: self.plc_and_nm,
9867            envlp: self.envlp.unwrap(),
9868        })
9869    }
9870}
9871impl SupplementaryData1 {
9872    /// Return a new builder for this type.
9873    #[must_use]
9874    pub fn builder() -> SupplementaryData1Builder {
9875        SupplementaryData1Builder::default()
9876    }
9877}
9878/// Accepts content from namespace: `##any`
9879#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9880pub struct SupplementaryDataEnvelope1 {
9881    #[serde(rename = "$value")]
9882    pub value: String,
9883}
9884#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9885pub struct TaxAmount3 {
9886    #[serde(rename = "Rate")]
9887    #[serde(skip_serializing_if = "Option::is_none")]
9888    pub rate: Option<PercentageRate>,
9889    #[serde(rename = "TaxblBaseAmt")]
9890    #[serde(skip_serializing_if = "Option::is_none")]
9891    pub taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9892    #[serde(rename = "TtlAmt")]
9893    #[serde(skip_serializing_if = "Option::is_none")]
9894    pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9895    #[serde(rename = "Dtls")]
9896    #[serde(default)]
9897    #[serde(skip_serializing_if = "Vec::is_empty")]
9898    pub dtls: Vec<TaxRecordDetails3>,
9899}
9900/// Builder for [`TaxAmount3`]. Construct via [`TaxAmount3::builder()`].
9901#[allow(clippy::struct_field_names)]
9902#[derive(Default)]
9903pub struct TaxAmount3Builder {
9904    rate: ::std::option::Option<PercentageRate>,
9905    taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9906    ttl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9907    dtls: ::std::vec::Vec<TaxRecordDetails3>,
9908}
9909impl TaxAmount3Builder {
9910    /// Set the `rate` field.
9911    #[must_use]
9912    pub fn rate(mut self, value: PercentageRate) -> TaxAmount3Builder {
9913        self.rate = ::std::option::Option::Some(value);
9914        self
9915    }
9916    /// Set the `taxbl_base_amt` field.
9917    #[must_use]
9918    pub fn taxbl_base_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
9919        self.taxbl_base_amt = ::std::option::Option::Some(value);
9920        self
9921    }
9922    /// Set the `ttl_amt` field.
9923    #[must_use]
9924    pub fn ttl_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
9925        self.ttl_amt = ::std::option::Option::Some(value);
9926        self
9927    }
9928    /// Set the `dtls` field (replaces any previously added items).
9929    #[must_use]
9930    pub fn dtls(mut self, value: ::std::vec::Vec<TaxRecordDetails3>) -> TaxAmount3Builder {
9931        self.dtls = value;
9932        self
9933    }
9934    /// Append one item to the `dtls` field.
9935    #[must_use]
9936    pub fn add_dtls(mut self, value: TaxRecordDetails3) -> TaxAmount3Builder {
9937        self.dtls.push(value);
9938        self
9939    }
9940    /// Validate required fields and construct the type.
9941    ///
9942    /// # Errors
9943    ///
9944    /// Returns [`crate::common::BuilderError`] listing the names of any
9945    /// required fields that were not set.
9946    ///
9947    /// # Panics
9948    ///
9949    /// Does not panic — all `.unwrap()` calls are guarded by the
9950    /// missing-field check above.
9951    pub fn build(self) -> ::std::result::Result<TaxAmount3, crate::common::BuilderError> {
9952        ::std::result::Result::Ok(TaxAmount3 {
9953            rate: self.rate,
9954            taxbl_base_amt: self.taxbl_base_amt,
9955            ttl_amt: self.ttl_amt,
9956            dtls: self.dtls,
9957        })
9958    }
9959}
9960impl TaxAmount3 {
9961    /// Return a new builder for this type.
9962    #[must_use]
9963    pub fn builder() -> TaxAmount3Builder {
9964        TaxAmount3Builder::default()
9965    }
9966}
9967#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9968pub struct TaxAmountAndType1 {
9969    #[serde(rename = "Tp")]
9970    #[serde(skip_serializing_if = "Option::is_none")]
9971    pub tp: Option<crate::common::ChoiceWrapper<TaxAmountType1Choice>>,
9972    #[serde(rename = "Amt")]
9973    pub amt: ActiveOrHistoricCurrencyAndAmount,
9974}
9975/// Builder for [`TaxAmountAndType1`]. Construct via [`TaxAmountAndType1::builder()`].
9976#[allow(clippy::struct_field_names)]
9977#[derive(Default)]
9978pub struct TaxAmountAndType1Builder {
9979    tp: ::std::option::Option<crate::common::ChoiceWrapper<TaxAmountType1Choice>>,
9980    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9981}
9982impl TaxAmountAndType1Builder {
9983    /// Set the `tp` field.
9984    #[must_use]
9985    pub fn tp(
9986        mut self,
9987        value: crate::common::ChoiceWrapper<TaxAmountType1Choice>,
9988    ) -> TaxAmountAndType1Builder {
9989        self.tp = ::std::option::Option::Some(value);
9990        self
9991    }
9992    /// Set the `amt` field.
9993    #[must_use]
9994    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmountAndType1Builder {
9995        self.amt = ::std::option::Option::Some(value);
9996        self
9997    }
9998    /// Validate required fields and construct the type.
9999    ///
10000    /// # Errors
10001    ///
10002    /// Returns [`crate::common::BuilderError`] listing the names of any
10003    /// required fields that were not set.
10004    ///
10005    /// # Panics
10006    ///
10007    /// Does not panic — all `.unwrap()` calls are guarded by the
10008    /// missing-field check above.
10009    pub fn build(self) -> ::std::result::Result<TaxAmountAndType1, crate::common::BuilderError> {
10010        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
10011        if self.amt.is_none() {
10012            missing.push("amt".to_owned());
10013        }
10014        if !missing.is_empty() {
10015            return ::std::result::Result::Err(crate::common::BuilderError {
10016                type_name: "TaxAmountAndType1".to_owned(),
10017                missing_fields: missing,
10018            });
10019        }
10020        ::std::result::Result::Ok(TaxAmountAndType1 {
10021            tp: self.tp,
10022            amt: self.amt.unwrap(),
10023        })
10024    }
10025}
10026impl TaxAmountAndType1 {
10027    /// Return a new builder for this type.
10028    #[must_use]
10029    pub fn builder() -> TaxAmountAndType1Builder {
10030        TaxAmountAndType1Builder::default()
10031    }
10032}
10033#[allow(clippy::large_enum_variant)]
10034#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10035pub enum TaxAmountType1Choice {
10036    #[serde(rename = "Cd")]
10037    Cd(ExternalTaxAmountType1Code),
10038    #[serde(rename = "Prtry")]
10039    Prtry(Max35Text),
10040}
10041#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10042pub struct TaxAuthorisation1 {
10043    #[serde(rename = "Titl")]
10044    #[serde(skip_serializing_if = "Option::is_none")]
10045    pub titl: Option<Max35Text>,
10046    #[serde(rename = "Nm")]
10047    #[serde(skip_serializing_if = "Option::is_none")]
10048    pub nm: Option<Max140Text>,
10049}
10050/// Builder for [`TaxAuthorisation1`]. Construct via [`TaxAuthorisation1::builder()`].
10051#[allow(clippy::struct_field_names)]
10052#[derive(Default)]
10053pub struct TaxAuthorisation1Builder {
10054    titl: ::std::option::Option<Max35Text>,
10055    nm: ::std::option::Option<Max140Text>,
10056}
10057impl TaxAuthorisation1Builder {
10058    /// Set the `titl` field.
10059    #[must_use]
10060    pub fn titl(mut self, value: Max35Text) -> TaxAuthorisation1Builder {
10061        self.titl = ::std::option::Option::Some(value);
10062        self
10063    }
10064    /// Set the `nm` field.
10065    #[must_use]
10066    pub fn nm(mut self, value: Max140Text) -> TaxAuthorisation1Builder {
10067        self.nm = ::std::option::Option::Some(value);
10068        self
10069    }
10070    /// Validate required fields and construct the type.
10071    ///
10072    /// # Errors
10073    ///
10074    /// Returns [`crate::common::BuilderError`] listing the names of any
10075    /// required fields that were not set.
10076    ///
10077    /// # Panics
10078    ///
10079    /// Does not panic — all `.unwrap()` calls are guarded by the
10080    /// missing-field check above.
10081    pub fn build(self) -> ::std::result::Result<TaxAuthorisation1, crate::common::BuilderError> {
10082        ::std::result::Result::Ok(TaxAuthorisation1 {
10083            titl: self.titl,
10084            nm: self.nm,
10085        })
10086    }
10087}
10088impl TaxAuthorisation1 {
10089    /// Return a new builder for this type.
10090    #[must_use]
10091    pub fn builder() -> TaxAuthorisation1Builder {
10092        TaxAuthorisation1Builder::default()
10093    }
10094}
10095#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10096pub struct TaxData1 {
10097    #[serde(rename = "Cdtr")]
10098    #[serde(skip_serializing_if = "Option::is_none")]
10099    pub cdtr: Option<TaxParty1>,
10100    #[serde(rename = "Dbtr")]
10101    #[serde(skip_serializing_if = "Option::is_none")]
10102    pub dbtr: Option<TaxParty2>,
10103    #[serde(rename = "UltmtDbtr")]
10104    #[serde(skip_serializing_if = "Option::is_none")]
10105    pub ultmt_dbtr: Option<TaxParty2>,
10106    #[serde(rename = "AdmstnZone")]
10107    #[serde(skip_serializing_if = "Option::is_none")]
10108    pub admstn_zone: Option<Max35Text>,
10109    #[serde(rename = "RefNb")]
10110    #[serde(skip_serializing_if = "Option::is_none")]
10111    pub ref_nb: Option<Max140Text>,
10112    #[serde(rename = "Mtd")]
10113    #[serde(skip_serializing_if = "Option::is_none")]
10114    pub mtd: Option<Max35Text>,
10115    #[serde(rename = "TtlTaxblBaseAmt")]
10116    #[serde(skip_serializing_if = "Option::is_none")]
10117    pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
10118    #[serde(rename = "TtlTaxAmt")]
10119    #[serde(skip_serializing_if = "Option::is_none")]
10120    pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
10121    #[serde(rename = "Dt")]
10122    #[serde(skip_serializing_if = "Option::is_none")]
10123    pub dt: Option<ISODate>,
10124    #[serde(rename = "SeqNb")]
10125    #[serde(skip_serializing_if = "Option::is_none")]
10126    pub seq_nb: Option<Number>,
10127    #[serde(rename = "Rcrd")]
10128    #[serde(default)]
10129    #[serde(skip_serializing_if = "Vec::is_empty")]
10130    pub rcrd: Vec<TaxRecord3>,
10131}
10132/// Builder for [`TaxData1`]. Construct via [`TaxData1::builder()`].
10133#[allow(clippy::struct_field_names)]
10134#[derive(Default)]
10135pub struct TaxData1Builder {
10136    cdtr: ::std::option::Option<TaxParty1>,
10137    dbtr: ::std::option::Option<TaxParty2>,
10138    ultmt_dbtr: ::std::option::Option<TaxParty2>,
10139    admstn_zone: ::std::option::Option<Max35Text>,
10140    ref_nb: ::std::option::Option<Max140Text>,
10141    mtd: ::std::option::Option<Max35Text>,
10142    ttl_taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
10143    ttl_tax_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
10144    dt: ::std::option::Option<ISODate>,
10145    seq_nb: ::std::option::Option<Number>,
10146    rcrd: ::std::vec::Vec<TaxRecord3>,
10147}
10148impl TaxData1Builder {
10149    /// Set the `cdtr` field.
10150    #[must_use]
10151    pub fn cdtr(mut self, value: TaxParty1) -> TaxData1Builder {
10152        self.cdtr = ::std::option::Option::Some(value);
10153        self
10154    }
10155    /// Set the `dbtr` field.
10156    #[must_use]
10157    pub fn dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
10158        self.dbtr = ::std::option::Option::Some(value);
10159        self
10160    }
10161    /// Set the `ultmt_dbtr` field.
10162    #[must_use]
10163    pub fn ultmt_dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
10164        self.ultmt_dbtr = ::std::option::Option::Some(value);
10165        self
10166    }
10167    /// Set the `admstn_zone` field.
10168    #[must_use]
10169    pub fn admstn_zone(mut self, value: Max35Text) -> TaxData1Builder {
10170        self.admstn_zone = ::std::option::Option::Some(value);
10171        self
10172    }
10173    /// Set the `ref_nb` field.
10174    #[must_use]
10175    pub fn ref_nb(mut self, value: Max140Text) -> TaxData1Builder {
10176        self.ref_nb = ::std::option::Option::Some(value);
10177        self
10178    }
10179    /// Set the `mtd` field.
10180    #[must_use]
10181    pub fn mtd(mut self, value: Max35Text) -> TaxData1Builder {
10182        self.mtd = ::std::option::Option::Some(value);
10183        self
10184    }
10185    /// Set the `ttl_taxbl_base_amt` field.
10186    #[must_use]
10187    pub fn ttl_taxbl_base_amt(
10188        mut self,
10189        value: ActiveOrHistoricCurrencyAndAmount,
10190    ) -> TaxData1Builder {
10191        self.ttl_taxbl_base_amt = ::std::option::Option::Some(value);
10192        self
10193    }
10194    /// Set the `ttl_tax_amt` field.
10195    #[must_use]
10196    pub fn ttl_tax_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxData1Builder {
10197        self.ttl_tax_amt = ::std::option::Option::Some(value);
10198        self
10199    }
10200    /// Set the `dt` field.
10201    #[must_use]
10202    pub fn dt(mut self, value: ISODate) -> TaxData1Builder {
10203        self.dt = ::std::option::Option::Some(value);
10204        self
10205    }
10206    /// Set the `seq_nb` field.
10207    #[must_use]
10208    pub fn seq_nb(mut self, value: Number) -> TaxData1Builder {
10209        self.seq_nb = ::std::option::Option::Some(value);
10210        self
10211    }
10212    /// Set the `rcrd` field (replaces any previously added items).
10213    #[must_use]
10214    pub fn rcrd(mut self, value: ::std::vec::Vec<TaxRecord3>) -> TaxData1Builder {
10215        self.rcrd = value;
10216        self
10217    }
10218    /// Append one item to the `rcrd` field.
10219    #[must_use]
10220    pub fn add_rcrd(mut self, value: TaxRecord3) -> TaxData1Builder {
10221        self.rcrd.push(value);
10222        self
10223    }
10224    /// Validate required fields and construct the type.
10225    ///
10226    /// # Errors
10227    ///
10228    /// Returns [`crate::common::BuilderError`] listing the names of any
10229    /// required fields that were not set.
10230    ///
10231    /// # Panics
10232    ///
10233    /// Does not panic — all `.unwrap()` calls are guarded by the
10234    /// missing-field check above.
10235    pub fn build(self) -> ::std::result::Result<TaxData1, crate::common::BuilderError> {
10236        ::std::result::Result::Ok(TaxData1 {
10237            cdtr: self.cdtr,
10238            dbtr: self.dbtr,
10239            ultmt_dbtr: self.ultmt_dbtr,
10240            admstn_zone: self.admstn_zone,
10241            ref_nb: self.ref_nb,
10242            mtd: self.mtd,
10243            ttl_taxbl_base_amt: self.ttl_taxbl_base_amt,
10244            ttl_tax_amt: self.ttl_tax_amt,
10245            dt: self.dt,
10246            seq_nb: self.seq_nb,
10247            rcrd: self.rcrd,
10248        })
10249    }
10250}
10251impl TaxData1 {
10252    /// Return a new builder for this type.
10253    #[must_use]
10254    pub fn builder() -> TaxData1Builder {
10255        TaxData1Builder::default()
10256    }
10257}
10258#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10259pub struct TaxInformation10 {
10260    #[serde(rename = "Cdtr")]
10261    #[serde(skip_serializing_if = "Option::is_none")]
10262    pub cdtr: Option<TaxParty1>,
10263    #[serde(rename = "Dbtr")]
10264    #[serde(skip_serializing_if = "Option::is_none")]
10265    pub dbtr: Option<TaxParty2>,
10266    #[serde(rename = "AdmstnZone")]
10267    #[serde(skip_serializing_if = "Option::is_none")]
10268    pub admstn_zone: Option<Max35Text>,
10269    #[serde(rename = "RefNb")]
10270    #[serde(skip_serializing_if = "Option::is_none")]
10271    pub ref_nb: Option<Max140Text>,
10272    #[serde(rename = "Mtd")]
10273    #[serde(skip_serializing_if = "Option::is_none")]
10274    pub mtd: Option<Max35Text>,
10275    #[serde(rename = "TtlTaxblBaseAmt")]
10276    #[serde(skip_serializing_if = "Option::is_none")]
10277    pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
10278    #[serde(rename = "TtlTaxAmt")]
10279    #[serde(skip_serializing_if = "Option::is_none")]
10280    pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
10281    #[serde(rename = "Dt")]
10282    #[serde(skip_serializing_if = "Option::is_none")]
10283    pub dt: Option<ISODate>,
10284    #[serde(rename = "SeqNb")]
10285    #[serde(skip_serializing_if = "Option::is_none")]
10286    pub seq_nb: Option<Number>,
10287    #[serde(rename = "Rcrd")]
10288    #[serde(default)]
10289    #[serde(skip_serializing_if = "Vec::is_empty")]
10290    pub rcrd: Vec<TaxRecord3>,
10291}
10292/// Builder for [`TaxInformation10`]. Construct via [`TaxInformation10::builder()`].
10293#[allow(clippy::struct_field_names)]
10294#[derive(Default)]
10295pub struct TaxInformation10Builder {
10296    cdtr: ::std::option::Option<TaxParty1>,
10297    dbtr: ::std::option::Option<TaxParty2>,
10298    admstn_zone: ::std::option::Option<Max35Text>,
10299    ref_nb: ::std::option::Option<Max140Text>,
10300    mtd: ::std::option::Option<Max35Text>,
10301    ttl_taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
10302    ttl_tax_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
10303    dt: ::std::option::Option<ISODate>,
10304    seq_nb: ::std::option::Option<Number>,
10305    rcrd: ::std::vec::Vec<TaxRecord3>,
10306}
10307impl TaxInformation10Builder {
10308    /// Set the `cdtr` field.
10309    #[must_use]
10310    pub fn cdtr(mut self, value: TaxParty1) -> TaxInformation10Builder {
10311        self.cdtr = ::std::option::Option::Some(value);
10312        self
10313    }
10314    /// Set the `dbtr` field.
10315    #[must_use]
10316    pub fn dbtr(mut self, value: TaxParty2) -> TaxInformation10Builder {
10317        self.dbtr = ::std::option::Option::Some(value);
10318        self
10319    }
10320    /// Set the `admstn_zone` field.
10321    #[must_use]
10322    pub fn admstn_zone(mut self, value: Max35Text) -> TaxInformation10Builder {
10323        self.admstn_zone = ::std::option::Option::Some(value);
10324        self
10325    }
10326    /// Set the `ref_nb` field.
10327    #[must_use]
10328    pub fn ref_nb(mut self, value: Max140Text) -> TaxInformation10Builder {
10329        self.ref_nb = ::std::option::Option::Some(value);
10330        self
10331    }
10332    /// Set the `mtd` field.
10333    #[must_use]
10334    pub fn mtd(mut self, value: Max35Text) -> TaxInformation10Builder {
10335        self.mtd = ::std::option::Option::Some(value);
10336        self
10337    }
10338    /// Set the `ttl_taxbl_base_amt` field.
10339    #[must_use]
10340    pub fn ttl_taxbl_base_amt(
10341        mut self,
10342        value: ActiveOrHistoricCurrencyAndAmount,
10343    ) -> TaxInformation10Builder {
10344        self.ttl_taxbl_base_amt = ::std::option::Option::Some(value);
10345        self
10346    }
10347    /// Set the `ttl_tax_amt` field.
10348    #[must_use]
10349    pub fn ttl_tax_amt(
10350        mut self,
10351        value: ActiveOrHistoricCurrencyAndAmount,
10352    ) -> TaxInformation10Builder {
10353        self.ttl_tax_amt = ::std::option::Option::Some(value);
10354        self
10355    }
10356    /// Set the `dt` field.
10357    #[must_use]
10358    pub fn dt(mut self, value: ISODate) -> TaxInformation10Builder {
10359        self.dt = ::std::option::Option::Some(value);
10360        self
10361    }
10362    /// Set the `seq_nb` field.
10363    #[must_use]
10364    pub fn seq_nb(mut self, value: Number) -> TaxInformation10Builder {
10365        self.seq_nb = ::std::option::Option::Some(value);
10366        self
10367    }
10368    /// Set the `rcrd` field (replaces any previously added items).
10369    #[must_use]
10370    pub fn rcrd(mut self, value: ::std::vec::Vec<TaxRecord3>) -> TaxInformation10Builder {
10371        self.rcrd = value;
10372        self
10373    }
10374    /// Append one item to the `rcrd` field.
10375    #[must_use]
10376    pub fn add_rcrd(mut self, value: TaxRecord3) -> TaxInformation10Builder {
10377        self.rcrd.push(value);
10378        self
10379    }
10380    /// Validate required fields and construct the type.
10381    ///
10382    /// # Errors
10383    ///
10384    /// Returns [`crate::common::BuilderError`] listing the names of any
10385    /// required fields that were not set.
10386    ///
10387    /// # Panics
10388    ///
10389    /// Does not panic — all `.unwrap()` calls are guarded by the
10390    /// missing-field check above.
10391    pub fn build(self) -> ::std::result::Result<TaxInformation10, crate::common::BuilderError> {
10392        ::std::result::Result::Ok(TaxInformation10 {
10393            cdtr: self.cdtr,
10394            dbtr: self.dbtr,
10395            admstn_zone: self.admstn_zone,
10396            ref_nb: self.ref_nb,
10397            mtd: self.mtd,
10398            ttl_taxbl_base_amt: self.ttl_taxbl_base_amt,
10399            ttl_tax_amt: self.ttl_tax_amt,
10400            dt: self.dt,
10401            seq_nb: self.seq_nb,
10402            rcrd: self.rcrd,
10403        })
10404    }
10405}
10406impl TaxInformation10 {
10407    /// Return a new builder for this type.
10408    #[must_use]
10409    pub fn builder() -> TaxInformation10Builder {
10410        TaxInformation10Builder::default()
10411    }
10412}
10413#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10414pub struct TaxParty1 {
10415    #[serde(rename = "TaxId")]
10416    #[serde(skip_serializing_if = "Option::is_none")]
10417    pub tax_id: Option<Max35Text>,
10418    #[serde(rename = "RegnId")]
10419    #[serde(skip_serializing_if = "Option::is_none")]
10420    pub regn_id: Option<Max35Text>,
10421    #[serde(rename = "TaxTp")]
10422    #[serde(skip_serializing_if = "Option::is_none")]
10423    pub tax_tp: Option<Max35Text>,
10424}
10425/// Builder for [`TaxParty1`]. Construct via [`TaxParty1::builder()`].
10426#[allow(clippy::struct_field_names)]
10427#[derive(Default)]
10428pub struct TaxParty1Builder {
10429    tax_id: ::std::option::Option<Max35Text>,
10430    regn_id: ::std::option::Option<Max35Text>,
10431    tax_tp: ::std::option::Option<Max35Text>,
10432}
10433impl TaxParty1Builder {
10434    /// Set the `tax_id` field.
10435    #[must_use]
10436    pub fn tax_id(mut self, value: Max35Text) -> TaxParty1Builder {
10437        self.tax_id = ::std::option::Option::Some(value);
10438        self
10439    }
10440    /// Set the `regn_id` field.
10441    #[must_use]
10442    pub fn regn_id(mut self, value: Max35Text) -> TaxParty1Builder {
10443        self.regn_id = ::std::option::Option::Some(value);
10444        self
10445    }
10446    /// Set the `tax_tp` field.
10447    #[must_use]
10448    pub fn tax_tp(mut self, value: Max35Text) -> TaxParty1Builder {
10449        self.tax_tp = ::std::option::Option::Some(value);
10450        self
10451    }
10452    /// Validate required fields and construct the type.
10453    ///
10454    /// # Errors
10455    ///
10456    /// Returns [`crate::common::BuilderError`] listing the names of any
10457    /// required fields that were not set.
10458    ///
10459    /// # Panics
10460    ///
10461    /// Does not panic — all `.unwrap()` calls are guarded by the
10462    /// missing-field check above.
10463    pub fn build(self) -> ::std::result::Result<TaxParty1, crate::common::BuilderError> {
10464        ::std::result::Result::Ok(TaxParty1 {
10465            tax_id: self.tax_id,
10466            regn_id: self.regn_id,
10467            tax_tp: self.tax_tp,
10468        })
10469    }
10470}
10471impl TaxParty1 {
10472    /// Return a new builder for this type.
10473    #[must_use]
10474    pub fn builder() -> TaxParty1Builder {
10475        TaxParty1Builder::default()
10476    }
10477}
10478#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10479pub struct TaxParty2 {
10480    #[serde(rename = "TaxId")]
10481    #[serde(skip_serializing_if = "Option::is_none")]
10482    pub tax_id: Option<Max35Text>,
10483    #[serde(rename = "RegnId")]
10484    #[serde(skip_serializing_if = "Option::is_none")]
10485    pub regn_id: Option<Max35Text>,
10486    #[serde(rename = "TaxTp")]
10487    #[serde(skip_serializing_if = "Option::is_none")]
10488    pub tax_tp: Option<Max35Text>,
10489    #[serde(rename = "Authstn")]
10490    #[serde(skip_serializing_if = "Option::is_none")]
10491    pub authstn: Option<TaxAuthorisation1>,
10492}
10493/// Builder for [`TaxParty2`]. Construct via [`TaxParty2::builder()`].
10494#[allow(clippy::struct_field_names)]
10495#[derive(Default)]
10496pub struct TaxParty2Builder {
10497    tax_id: ::std::option::Option<Max35Text>,
10498    regn_id: ::std::option::Option<Max35Text>,
10499    tax_tp: ::std::option::Option<Max35Text>,
10500    authstn: ::std::option::Option<TaxAuthorisation1>,
10501}
10502impl TaxParty2Builder {
10503    /// Set the `tax_id` field.
10504    #[must_use]
10505    pub fn tax_id(mut self, value: Max35Text) -> TaxParty2Builder {
10506        self.tax_id = ::std::option::Option::Some(value);
10507        self
10508    }
10509    /// Set the `regn_id` field.
10510    #[must_use]
10511    pub fn regn_id(mut self, value: Max35Text) -> TaxParty2Builder {
10512        self.regn_id = ::std::option::Option::Some(value);
10513        self
10514    }
10515    /// Set the `tax_tp` field.
10516    #[must_use]
10517    pub fn tax_tp(mut self, value: Max35Text) -> TaxParty2Builder {
10518        self.tax_tp = ::std::option::Option::Some(value);
10519        self
10520    }
10521    /// Set the `authstn` field.
10522    #[must_use]
10523    pub fn authstn(mut self, value: TaxAuthorisation1) -> TaxParty2Builder {
10524        self.authstn = ::std::option::Option::Some(value);
10525        self
10526    }
10527    /// Validate required fields and construct the type.
10528    ///
10529    /// # Errors
10530    ///
10531    /// Returns [`crate::common::BuilderError`] listing the names of any
10532    /// required fields that were not set.
10533    ///
10534    /// # Panics
10535    ///
10536    /// Does not panic — all `.unwrap()` calls are guarded by the
10537    /// missing-field check above.
10538    pub fn build(self) -> ::std::result::Result<TaxParty2, crate::common::BuilderError> {
10539        ::std::result::Result::Ok(TaxParty2 {
10540            tax_id: self.tax_id,
10541            regn_id: self.regn_id,
10542            tax_tp: self.tax_tp,
10543            authstn: self.authstn,
10544        })
10545    }
10546}
10547impl TaxParty2 {
10548    /// Return a new builder for this type.
10549    #[must_use]
10550    pub fn builder() -> TaxParty2Builder {
10551        TaxParty2Builder::default()
10552    }
10553}
10554#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10555pub struct TaxPeriod3 {
10556    #[serde(rename = "Yr")]
10557    #[serde(skip_serializing_if = "Option::is_none")]
10558    pub yr: Option<ISOYear>,
10559    #[serde(rename = "Tp")]
10560    #[serde(skip_serializing_if = "Option::is_none")]
10561    pub tp: Option<TaxRecordPeriod1Code>,
10562    #[serde(rename = "FrToDt")]
10563    #[serde(skip_serializing_if = "Option::is_none")]
10564    pub fr_to_dt: Option<DatePeriod2>,
10565}
10566/// Builder for [`TaxPeriod3`]. Construct via [`TaxPeriod3::builder()`].
10567#[allow(clippy::struct_field_names)]
10568#[derive(Default)]
10569pub struct TaxPeriod3Builder {
10570    yr: ::std::option::Option<ISOYear>,
10571    tp: ::std::option::Option<TaxRecordPeriod1Code>,
10572    fr_to_dt: ::std::option::Option<DatePeriod2>,
10573}
10574impl TaxPeriod3Builder {
10575    /// Set the `yr` field.
10576    #[must_use]
10577    pub fn yr(mut self, value: ISOYear) -> TaxPeriod3Builder {
10578        self.yr = ::std::option::Option::Some(value);
10579        self
10580    }
10581    /// Set the `tp` field.
10582    #[must_use]
10583    pub fn tp(mut self, value: TaxRecordPeriod1Code) -> TaxPeriod3Builder {
10584        self.tp = ::std::option::Option::Some(value);
10585        self
10586    }
10587    /// Set the `fr_to_dt` field.
10588    #[must_use]
10589    pub fn fr_to_dt(mut self, value: DatePeriod2) -> TaxPeriod3Builder {
10590        self.fr_to_dt = ::std::option::Option::Some(value);
10591        self
10592    }
10593    /// Validate required fields and construct the type.
10594    ///
10595    /// # Errors
10596    ///
10597    /// Returns [`crate::common::BuilderError`] listing the names of any
10598    /// required fields that were not set.
10599    ///
10600    /// # Panics
10601    ///
10602    /// Does not panic — all `.unwrap()` calls are guarded by the
10603    /// missing-field check above.
10604    pub fn build(self) -> ::std::result::Result<TaxPeriod3, crate::common::BuilderError> {
10605        ::std::result::Result::Ok(TaxPeriod3 {
10606            yr: self.yr,
10607            tp: self.tp,
10608            fr_to_dt: self.fr_to_dt,
10609        })
10610    }
10611}
10612impl TaxPeriod3 {
10613    /// Return a new builder for this type.
10614    #[must_use]
10615    pub fn builder() -> TaxPeriod3Builder {
10616        TaxPeriod3Builder::default()
10617    }
10618}
10619#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10620pub struct TaxRecord3 {
10621    #[serde(rename = "Tp")]
10622    #[serde(skip_serializing_if = "Option::is_none")]
10623    pub tp: Option<Max35Text>,
10624    #[serde(rename = "Ctgy")]
10625    #[serde(skip_serializing_if = "Option::is_none")]
10626    pub ctgy: Option<Max35Text>,
10627    #[serde(rename = "CtgyDtls")]
10628    #[serde(skip_serializing_if = "Option::is_none")]
10629    pub ctgy_dtls: Option<Max35Text>,
10630    #[serde(rename = "DbtrSts")]
10631    #[serde(skip_serializing_if = "Option::is_none")]
10632    pub dbtr_sts: Option<Max35Text>,
10633    #[serde(rename = "CertId")]
10634    #[serde(skip_serializing_if = "Option::is_none")]
10635    pub cert_id: Option<Max35Text>,
10636    #[serde(rename = "FrmsCd")]
10637    #[serde(skip_serializing_if = "Option::is_none")]
10638    pub frms_cd: Option<Max35Text>,
10639    #[serde(rename = "Prd")]
10640    #[serde(skip_serializing_if = "Option::is_none")]
10641    pub prd: Option<TaxPeriod3>,
10642    #[serde(rename = "TaxAmt")]
10643    #[serde(skip_serializing_if = "Option::is_none")]
10644    pub tax_amt: Option<TaxAmount3>,
10645    #[serde(rename = "AddtlInf")]
10646    #[serde(skip_serializing_if = "Option::is_none")]
10647    pub addtl_inf: Option<Max140Text>,
10648}
10649/// Builder for [`TaxRecord3`]. Construct via [`TaxRecord3::builder()`].
10650#[allow(clippy::struct_field_names)]
10651#[derive(Default)]
10652pub struct TaxRecord3Builder {
10653    tp: ::std::option::Option<Max35Text>,
10654    ctgy: ::std::option::Option<Max35Text>,
10655    ctgy_dtls: ::std::option::Option<Max35Text>,
10656    dbtr_sts: ::std::option::Option<Max35Text>,
10657    cert_id: ::std::option::Option<Max35Text>,
10658    frms_cd: ::std::option::Option<Max35Text>,
10659    prd: ::std::option::Option<TaxPeriod3>,
10660    tax_amt: ::std::option::Option<TaxAmount3>,
10661    addtl_inf: ::std::option::Option<Max140Text>,
10662}
10663impl TaxRecord3Builder {
10664    /// Set the `tp` field.
10665    #[must_use]
10666    pub fn tp(mut self, value: Max35Text) -> TaxRecord3Builder {
10667        self.tp = ::std::option::Option::Some(value);
10668        self
10669    }
10670    /// Set the `ctgy` field.
10671    #[must_use]
10672    pub fn ctgy(mut self, value: Max35Text) -> TaxRecord3Builder {
10673        self.ctgy = ::std::option::Option::Some(value);
10674        self
10675    }
10676    /// Set the `ctgy_dtls` field.
10677    #[must_use]
10678    pub fn ctgy_dtls(mut self, value: Max35Text) -> TaxRecord3Builder {
10679        self.ctgy_dtls = ::std::option::Option::Some(value);
10680        self
10681    }
10682    /// Set the `dbtr_sts` field.
10683    #[must_use]
10684    pub fn dbtr_sts(mut self, value: Max35Text) -> TaxRecord3Builder {
10685        self.dbtr_sts = ::std::option::Option::Some(value);
10686        self
10687    }
10688    /// Set the `cert_id` field.
10689    #[must_use]
10690    pub fn cert_id(mut self, value: Max35Text) -> TaxRecord3Builder {
10691        self.cert_id = ::std::option::Option::Some(value);
10692        self
10693    }
10694    /// Set the `frms_cd` field.
10695    #[must_use]
10696    pub fn frms_cd(mut self, value: Max35Text) -> TaxRecord3Builder {
10697        self.frms_cd = ::std::option::Option::Some(value);
10698        self
10699    }
10700    /// Set the `prd` field.
10701    #[must_use]
10702    pub fn prd(mut self, value: TaxPeriod3) -> TaxRecord3Builder {
10703        self.prd = ::std::option::Option::Some(value);
10704        self
10705    }
10706    /// Set the `tax_amt` field.
10707    #[must_use]
10708    pub fn tax_amt(mut self, value: TaxAmount3) -> TaxRecord3Builder {
10709        self.tax_amt = ::std::option::Option::Some(value);
10710        self
10711    }
10712    /// Set the `addtl_inf` field.
10713    #[must_use]
10714    pub fn addtl_inf(mut self, value: Max140Text) -> TaxRecord3Builder {
10715        self.addtl_inf = ::std::option::Option::Some(value);
10716        self
10717    }
10718    /// Validate required fields and construct the type.
10719    ///
10720    /// # Errors
10721    ///
10722    /// Returns [`crate::common::BuilderError`] listing the names of any
10723    /// required fields that were not set.
10724    ///
10725    /// # Panics
10726    ///
10727    /// Does not panic — all `.unwrap()` calls are guarded by the
10728    /// missing-field check above.
10729    pub fn build(self) -> ::std::result::Result<TaxRecord3, crate::common::BuilderError> {
10730        ::std::result::Result::Ok(TaxRecord3 {
10731            tp: self.tp,
10732            ctgy: self.ctgy,
10733            ctgy_dtls: self.ctgy_dtls,
10734            dbtr_sts: self.dbtr_sts,
10735            cert_id: self.cert_id,
10736            frms_cd: self.frms_cd,
10737            prd: self.prd,
10738            tax_amt: self.tax_amt,
10739            addtl_inf: self.addtl_inf,
10740        })
10741    }
10742}
10743impl TaxRecord3 {
10744    /// Return a new builder for this type.
10745    #[must_use]
10746    pub fn builder() -> TaxRecord3Builder {
10747        TaxRecord3Builder::default()
10748    }
10749}
10750#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10751pub struct TaxRecordDetails3 {
10752    #[serde(rename = "Prd")]
10753    #[serde(skip_serializing_if = "Option::is_none")]
10754    pub prd: Option<TaxPeriod3>,
10755    #[serde(rename = "Amt")]
10756    pub amt: ActiveOrHistoricCurrencyAndAmount,
10757}
10758/// Builder for [`TaxRecordDetails3`]. Construct via [`TaxRecordDetails3::builder()`].
10759#[allow(clippy::struct_field_names)]
10760#[derive(Default)]
10761pub struct TaxRecordDetails3Builder {
10762    prd: ::std::option::Option<TaxPeriod3>,
10763    amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
10764}
10765impl TaxRecordDetails3Builder {
10766    /// Set the `prd` field.
10767    #[must_use]
10768    pub fn prd(mut self, value: TaxPeriod3) -> TaxRecordDetails3Builder {
10769        self.prd = ::std::option::Option::Some(value);
10770        self
10771    }
10772    /// Set the `amt` field.
10773    #[must_use]
10774    pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxRecordDetails3Builder {
10775        self.amt = ::std::option::Option::Some(value);
10776        self
10777    }
10778    /// Validate required fields and construct the type.
10779    ///
10780    /// # Errors
10781    ///
10782    /// Returns [`crate::common::BuilderError`] listing the names of any
10783    /// required fields that were not set.
10784    ///
10785    /// # Panics
10786    ///
10787    /// Does not panic — all `.unwrap()` calls are guarded by the
10788    /// missing-field check above.
10789    pub fn build(self) -> ::std::result::Result<TaxRecordDetails3, crate::common::BuilderError> {
10790        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
10791        if self.amt.is_none() {
10792            missing.push("amt".to_owned());
10793        }
10794        if !missing.is_empty() {
10795            return ::std::result::Result::Err(crate::common::BuilderError {
10796                type_name: "TaxRecordDetails3".to_owned(),
10797                missing_fields: missing,
10798            });
10799        }
10800        ::std::result::Result::Ok(TaxRecordDetails3 {
10801            prd: self.prd,
10802            amt: self.amt.unwrap(),
10803        })
10804    }
10805}
10806impl TaxRecordDetails3 {
10807    /// Return a new builder for this type.
10808    #[must_use]
10809    pub fn builder() -> TaxRecordDetails3Builder {
10810        TaxRecordDetails3Builder::default()
10811    }
10812}
10813#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10814pub struct TransactionParties10 {
10815    #[serde(rename = "UltmtDbtr")]
10816    #[serde(skip_serializing_if = "Option::is_none")]
10817    pub ultmt_dbtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
10818    #[serde(rename = "Dbtr")]
10819    pub dbtr: crate::common::ChoiceWrapper<Party40Choice>,
10820    #[serde(rename = "DbtrAcct")]
10821    #[serde(skip_serializing_if = "Option::is_none")]
10822    pub dbtr_acct: Option<CashAccount40>,
10823    #[serde(rename = "InitgPty")]
10824    #[serde(skip_serializing_if = "Option::is_none")]
10825    pub initg_pty: Option<crate::common::ChoiceWrapper<Party40Choice>>,
10826    #[serde(rename = "DbtrAgt")]
10827    #[serde(skip_serializing_if = "Option::is_none")]
10828    pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
10829    #[serde(rename = "DbtrAgtAcct")]
10830    #[serde(skip_serializing_if = "Option::is_none")]
10831    pub dbtr_agt_acct: Option<CashAccount40>,
10832    #[serde(rename = "PrvsInstgAgt1")]
10833    #[serde(skip_serializing_if = "Option::is_none")]
10834    pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
10835    #[serde(rename = "PrvsInstgAgt1Acct")]
10836    #[serde(skip_serializing_if = "Option::is_none")]
10837    pub prvs_instg_agt1acct: Option<CashAccount40>,
10838    #[serde(rename = "PrvsInstgAgt2")]
10839    #[serde(skip_serializing_if = "Option::is_none")]
10840    pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
10841    #[serde(rename = "PrvsInstgAgt2Acct")]
10842    #[serde(skip_serializing_if = "Option::is_none")]
10843    pub prvs_instg_agt2acct: Option<CashAccount40>,
10844    #[serde(rename = "PrvsInstgAgt3")]
10845    #[serde(skip_serializing_if = "Option::is_none")]
10846    pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
10847    #[serde(rename = "PrvsInstgAgt3Acct")]
10848    #[serde(skip_serializing_if = "Option::is_none")]
10849    pub prvs_instg_agt3acct: Option<CashAccount40>,
10850    #[serde(rename = "IntrmyAgt1")]
10851    #[serde(skip_serializing_if = "Option::is_none")]
10852    pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification6>,
10853    #[serde(rename = "IntrmyAgt1Acct")]
10854    #[serde(skip_serializing_if = "Option::is_none")]
10855    pub intrmy_agt1acct: Option<CashAccount40>,
10856    #[serde(rename = "IntrmyAgt2")]
10857    #[serde(skip_serializing_if = "Option::is_none")]
10858    pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification6>,
10859    #[serde(rename = "IntrmyAgt2Acct")]
10860    #[serde(skip_serializing_if = "Option::is_none")]
10861    pub intrmy_agt2acct: Option<CashAccount40>,
10862    #[serde(rename = "IntrmyAgt3")]
10863    #[serde(skip_serializing_if = "Option::is_none")]
10864    pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification6>,
10865    #[serde(rename = "IntrmyAgt3Acct")]
10866    #[serde(skip_serializing_if = "Option::is_none")]
10867    pub intrmy_agt3acct: Option<CashAccount40>,
10868    #[serde(rename = "CdtrAgt")]
10869    #[serde(skip_serializing_if = "Option::is_none")]
10870    pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
10871    #[serde(rename = "CdtrAgtAcct")]
10872    #[serde(skip_serializing_if = "Option::is_none")]
10873    pub cdtr_agt_acct: Option<CashAccount40>,
10874    #[serde(rename = "Cdtr")]
10875    pub cdtr: crate::common::ChoiceWrapper<Party40Choice>,
10876    #[serde(rename = "CdtrAcct")]
10877    #[serde(skip_serializing_if = "Option::is_none")]
10878    pub cdtr_acct: Option<CashAccount40>,
10879    #[serde(rename = "UltmtCdtr")]
10880    #[serde(skip_serializing_if = "Option::is_none")]
10881    pub ultmt_cdtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
10882}
10883/// Builder for [`TransactionParties10`]. Construct via [`TransactionParties10::builder()`].
10884#[allow(clippy::struct_field_names)]
10885#[derive(Default)]
10886pub struct TransactionParties10Builder {
10887    ultmt_dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
10888    dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
10889    dbtr_acct: ::std::option::Option<CashAccount40>,
10890    initg_pty: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
10891    dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10892    dbtr_agt_acct: ::std::option::Option<CashAccount40>,
10893    prvs_instg_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10894    prvs_instg_agt1acct: ::std::option::Option<CashAccount40>,
10895    prvs_instg_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10896    prvs_instg_agt2acct: ::std::option::Option<CashAccount40>,
10897    prvs_instg_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10898    prvs_instg_agt3acct: ::std::option::Option<CashAccount40>,
10899    intrmy_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10900    intrmy_agt1acct: ::std::option::Option<CashAccount40>,
10901    intrmy_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10902    intrmy_agt2acct: ::std::option::Option<CashAccount40>,
10903    intrmy_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10904    intrmy_agt3acct: ::std::option::Option<CashAccount40>,
10905    cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
10906    cdtr_agt_acct: ::std::option::Option<CashAccount40>,
10907    cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
10908    cdtr_acct: ::std::option::Option<CashAccount40>,
10909    ultmt_cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
10910}
10911impl TransactionParties10Builder {
10912    /// Set the `ultmt_dbtr` field.
10913    #[must_use]
10914    pub fn ultmt_dbtr(
10915        mut self,
10916        value: crate::common::ChoiceWrapper<Party40Choice>,
10917    ) -> TransactionParties10Builder {
10918        self.ultmt_dbtr = ::std::option::Option::Some(value);
10919        self
10920    }
10921    /// Set the `dbtr` field.
10922    #[must_use]
10923    pub fn dbtr(
10924        mut self,
10925        value: crate::common::ChoiceWrapper<Party40Choice>,
10926    ) -> TransactionParties10Builder {
10927        self.dbtr = ::std::option::Option::Some(value);
10928        self
10929    }
10930    /// Set the `dbtr_acct` field.
10931    #[must_use]
10932    pub fn dbtr_acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
10933        self.dbtr_acct = ::std::option::Option::Some(value);
10934        self
10935    }
10936    /// Set the `initg_pty` field.
10937    #[must_use]
10938    pub fn initg_pty(
10939        mut self,
10940        value: crate::common::ChoiceWrapper<Party40Choice>,
10941    ) -> TransactionParties10Builder {
10942        self.initg_pty = ::std::option::Option::Some(value);
10943        self
10944    }
10945    /// Set the `dbtr_agt` field.
10946    #[must_use]
10947    pub fn dbtr_agt(
10948        mut self,
10949        value: BranchAndFinancialInstitutionIdentification6,
10950    ) -> TransactionParties10Builder {
10951        self.dbtr_agt = ::std::option::Option::Some(value);
10952        self
10953    }
10954    /// Set the `dbtr_agt_acct` field.
10955    #[must_use]
10956    pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
10957        self.dbtr_agt_acct = ::std::option::Option::Some(value);
10958        self
10959    }
10960    /// Set the `prvs_instg_agt1` field.
10961    #[must_use]
10962    pub fn prvs_instg_agt1(
10963        mut self,
10964        value: BranchAndFinancialInstitutionIdentification6,
10965    ) -> TransactionParties10Builder {
10966        self.prvs_instg_agt1 = ::std::option::Option::Some(value);
10967        self
10968    }
10969    /// Set the `prvs_instg_agt1acct` field.
10970    #[must_use]
10971    pub fn prvs_instg_agt1acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
10972        self.prvs_instg_agt1acct = ::std::option::Option::Some(value);
10973        self
10974    }
10975    /// Set the `prvs_instg_agt2` field.
10976    #[must_use]
10977    pub fn prvs_instg_agt2(
10978        mut self,
10979        value: BranchAndFinancialInstitutionIdentification6,
10980    ) -> TransactionParties10Builder {
10981        self.prvs_instg_agt2 = ::std::option::Option::Some(value);
10982        self
10983    }
10984    /// Set the `prvs_instg_agt2acct` field.
10985    #[must_use]
10986    pub fn prvs_instg_agt2acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
10987        self.prvs_instg_agt2acct = ::std::option::Option::Some(value);
10988        self
10989    }
10990    /// Set the `prvs_instg_agt3` field.
10991    #[must_use]
10992    pub fn prvs_instg_agt3(
10993        mut self,
10994        value: BranchAndFinancialInstitutionIdentification6,
10995    ) -> TransactionParties10Builder {
10996        self.prvs_instg_agt3 = ::std::option::Option::Some(value);
10997        self
10998    }
10999    /// Set the `prvs_instg_agt3acct` field.
11000    #[must_use]
11001    pub fn prvs_instg_agt3acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
11002        self.prvs_instg_agt3acct = ::std::option::Option::Some(value);
11003        self
11004    }
11005    /// Set the `intrmy_agt1` field.
11006    #[must_use]
11007    pub fn intrmy_agt1(
11008        mut self,
11009        value: BranchAndFinancialInstitutionIdentification6,
11010    ) -> TransactionParties10Builder {
11011        self.intrmy_agt1 = ::std::option::Option::Some(value);
11012        self
11013    }
11014    /// Set the `intrmy_agt1acct` field.
11015    #[must_use]
11016    pub fn intrmy_agt1acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
11017        self.intrmy_agt1acct = ::std::option::Option::Some(value);
11018        self
11019    }
11020    /// Set the `intrmy_agt2` field.
11021    #[must_use]
11022    pub fn intrmy_agt2(
11023        mut self,
11024        value: BranchAndFinancialInstitutionIdentification6,
11025    ) -> TransactionParties10Builder {
11026        self.intrmy_agt2 = ::std::option::Option::Some(value);
11027        self
11028    }
11029    /// Set the `intrmy_agt2acct` field.
11030    #[must_use]
11031    pub fn intrmy_agt2acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
11032        self.intrmy_agt2acct = ::std::option::Option::Some(value);
11033        self
11034    }
11035    /// Set the `intrmy_agt3` field.
11036    #[must_use]
11037    pub fn intrmy_agt3(
11038        mut self,
11039        value: BranchAndFinancialInstitutionIdentification6,
11040    ) -> TransactionParties10Builder {
11041        self.intrmy_agt3 = ::std::option::Option::Some(value);
11042        self
11043    }
11044    /// Set the `intrmy_agt3acct` field.
11045    #[must_use]
11046    pub fn intrmy_agt3acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
11047        self.intrmy_agt3acct = ::std::option::Option::Some(value);
11048        self
11049    }
11050    /// Set the `cdtr_agt` field.
11051    #[must_use]
11052    pub fn cdtr_agt(
11053        mut self,
11054        value: BranchAndFinancialInstitutionIdentification6,
11055    ) -> TransactionParties10Builder {
11056        self.cdtr_agt = ::std::option::Option::Some(value);
11057        self
11058    }
11059    /// Set the `cdtr_agt_acct` field.
11060    #[must_use]
11061    pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
11062        self.cdtr_agt_acct = ::std::option::Option::Some(value);
11063        self
11064    }
11065    /// Set the `cdtr` field.
11066    #[must_use]
11067    pub fn cdtr(
11068        mut self,
11069        value: crate::common::ChoiceWrapper<Party40Choice>,
11070    ) -> TransactionParties10Builder {
11071        self.cdtr = ::std::option::Option::Some(value);
11072        self
11073    }
11074    /// Set the `cdtr_acct` field.
11075    #[must_use]
11076    pub fn cdtr_acct(mut self, value: CashAccount40) -> TransactionParties10Builder {
11077        self.cdtr_acct = ::std::option::Option::Some(value);
11078        self
11079    }
11080    /// Set the `ultmt_cdtr` field.
11081    #[must_use]
11082    pub fn ultmt_cdtr(
11083        mut self,
11084        value: crate::common::ChoiceWrapper<Party40Choice>,
11085    ) -> TransactionParties10Builder {
11086        self.ultmt_cdtr = ::std::option::Option::Some(value);
11087        self
11088    }
11089    /// Validate required fields and construct the type.
11090    ///
11091    /// # Errors
11092    ///
11093    /// Returns [`crate::common::BuilderError`] listing the names of any
11094    /// required fields that were not set.
11095    ///
11096    /// # Panics
11097    ///
11098    /// Does not panic — all `.unwrap()` calls are guarded by the
11099    /// missing-field check above.
11100    pub fn build(self) -> ::std::result::Result<TransactionParties10, crate::common::BuilderError> {
11101        let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
11102        if self.dbtr.is_none() {
11103            missing.push("dbtr".to_owned());
11104        }
11105        if self.cdtr.is_none() {
11106            missing.push("cdtr".to_owned());
11107        }
11108        if !missing.is_empty() {
11109            return ::std::result::Result::Err(crate::common::BuilderError {
11110                type_name: "TransactionParties10".to_owned(),
11111                missing_fields: missing,
11112            });
11113        }
11114        ::std::result::Result::Ok(TransactionParties10 {
11115            ultmt_dbtr: self.ultmt_dbtr,
11116            dbtr: self.dbtr.unwrap(),
11117            dbtr_acct: self.dbtr_acct,
11118            initg_pty: self.initg_pty,
11119            dbtr_agt: self.dbtr_agt,
11120            dbtr_agt_acct: self.dbtr_agt_acct,
11121            prvs_instg_agt1: self.prvs_instg_agt1,
11122            prvs_instg_agt1acct: self.prvs_instg_agt1acct,
11123            prvs_instg_agt2: self.prvs_instg_agt2,
11124            prvs_instg_agt2acct: self.prvs_instg_agt2acct,
11125            prvs_instg_agt3: self.prvs_instg_agt3,
11126            prvs_instg_agt3acct: self.prvs_instg_agt3acct,
11127            intrmy_agt1: self.intrmy_agt1,
11128            intrmy_agt1acct: self.intrmy_agt1acct,
11129            intrmy_agt2: self.intrmy_agt2,
11130            intrmy_agt2acct: self.intrmy_agt2acct,
11131            intrmy_agt3: self.intrmy_agt3,
11132            intrmy_agt3acct: self.intrmy_agt3acct,
11133            cdtr_agt: self.cdtr_agt,
11134            cdtr_agt_acct: self.cdtr_agt_acct,
11135            cdtr: self.cdtr.unwrap(),
11136            cdtr_acct: self.cdtr_acct,
11137            ultmt_cdtr: self.ultmt_cdtr,
11138        })
11139    }
11140}
11141impl TransactionParties10 {
11142    /// Return a new builder for this type.
11143    #[must_use]
11144    pub fn builder() -> TransactionParties10Builder {
11145        TransactionParties10Builder::default()
11146    }
11147}
11148impl crate::common::validate::Validatable for ActiveCurrencyAndAmountSimpleType {
11149    #[allow(clippy::unreadable_literal)]
11150    fn validate_constraints(
11151        &self,
11152        path: &str,
11153        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11154    ) {
11155        {
11156            let value: &str = &self.0;
11157            let frac_count = value.find('.').map_or(0, |dot| {
11158                value[dot + 1..]
11159                    .chars()
11160                    .filter(char::is_ascii_digit)
11161                    .count()
11162            });
11163            let violated = frac_count > 5usize;
11164            if violated {
11165                violations.push(crate::common::validate::ConstraintViolation {
11166                    path: path.to_string(),
11167                    message: format!(
11168                        "{} (got {})",
11169                        "value exceeds maximum fraction digits 5", frac_count
11170                    ),
11171                    kind: crate::common::validate::ConstraintKind::FractionDigits,
11172                });
11173            }
11174        }
11175        {
11176            let value: &str = &self.0;
11177            let digit_count = value.chars().filter(char::is_ascii_digit).count();
11178            let violated = digit_count > 18usize;
11179            if violated {
11180                violations.push(crate::common::validate::ConstraintViolation {
11181                    path: path.to_string(),
11182                    message: format!(
11183                        "{} (got {})",
11184                        "value exceeds maximum total digits 18", digit_count
11185                    ),
11186                    kind: crate::common::validate::ConstraintKind::TotalDigits,
11187                });
11188            }
11189        }
11190    }
11191}
11192impl crate::common::validate::Validatable for ActiveCurrencyCode {
11193    #[allow(clippy::unreadable_literal)]
11194    fn validate_constraints(
11195        &self,
11196        path: &str,
11197        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11198    ) {
11199        {
11200            let value: &str = &self.0;
11201            let violated = {
11202                let bytes = value.as_bytes();
11203                bytes.len() != 3usize
11204                    || ({
11205                        let b = bytes[0usize];
11206                        !(65u8..=90u8).contains(&b)
11207                    })
11208                    || ({
11209                        let b = bytes[1usize];
11210                        !(65u8..=90u8).contains(&b)
11211                    })
11212                    || ({
11213                        let b = bytes[2usize];
11214                        !(65u8..=90u8).contains(&b)
11215                    })
11216            };
11217            if violated {
11218                violations.push(crate::common::validate::ConstraintViolation {
11219                    path: path.to_string(),
11220                    message: "value does not match pattern [A-Z]{3,3}".to_string(),
11221                    kind: crate::common::validate::ConstraintKind::Pattern,
11222                });
11223            }
11224        }
11225    }
11226}
11227impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmountSimpleType {
11228    #[allow(clippy::unreadable_literal)]
11229    fn validate_constraints(
11230        &self,
11231        path: &str,
11232        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11233    ) {
11234        {
11235            let value: &str = &self.0;
11236            let frac_count = value.find('.').map_or(0, |dot| {
11237                value[dot + 1..]
11238                    .chars()
11239                    .filter(char::is_ascii_digit)
11240                    .count()
11241            });
11242            let violated = frac_count > 5usize;
11243            if violated {
11244                violations.push(crate::common::validate::ConstraintViolation {
11245                    path: path.to_string(),
11246                    message: format!(
11247                        "{} (got {})",
11248                        "value exceeds maximum fraction digits 5", frac_count
11249                    ),
11250                    kind: crate::common::validate::ConstraintKind::FractionDigits,
11251                });
11252            }
11253        }
11254        {
11255            let value: &str = &self.0;
11256            let digit_count = value.chars().filter(char::is_ascii_digit).count();
11257            let violated = digit_count > 18usize;
11258            if violated {
11259                violations.push(crate::common::validate::ConstraintViolation {
11260                    path: path.to_string(),
11261                    message: format!(
11262                        "{} (got {})",
11263                        "value exceeds maximum total digits 18", digit_count
11264                    ),
11265                    kind: crate::common::validate::ConstraintKind::TotalDigits,
11266                });
11267            }
11268        }
11269    }
11270}
11271impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyCode {
11272    #[allow(clippy::unreadable_literal)]
11273    fn validate_constraints(
11274        &self,
11275        path: &str,
11276        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11277    ) {
11278        {
11279            let value: &str = &self.0;
11280            let violated = {
11281                let bytes = value.as_bytes();
11282                bytes.len() != 3usize
11283                    || ({
11284                        let b = bytes[0usize];
11285                        !(65u8..=90u8).contains(&b)
11286                    })
11287                    || ({
11288                        let b = bytes[1usize];
11289                        !(65u8..=90u8).contains(&b)
11290                    })
11291                    || ({
11292                        let b = bytes[2usize];
11293                        !(65u8..=90u8).contains(&b)
11294                    })
11295            };
11296            if violated {
11297                violations.push(crate::common::validate::ConstraintViolation {
11298                    path: path.to_string(),
11299                    message: "value does not match pattern [A-Z]{3,3}".to_string(),
11300                    kind: crate::common::validate::ConstraintKind::Pattern,
11301                });
11302            }
11303        }
11304    }
11305}
11306impl crate::common::validate::Validatable for AddressType2Code {
11307    fn validate_constraints(
11308        &self,
11309        _path: &str,
11310        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11311    ) {
11312    }
11313}
11314impl crate::common::validate::Validatable for AnyBICDec2014Identifier {
11315    #[allow(clippy::unreadable_literal)]
11316    fn validate_constraints(
11317        &self,
11318        path: &str,
11319        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11320    ) {
11321        {
11322            let value: &str = &self.0;
11323            let violated = {
11324                let bytes = value.as_bytes();
11325                let len = bytes.len();
11326                let result: bool = (|| -> bool {
11327                    let mut pos: usize = 0;
11328                    if !(8usize..=11usize).contains(&len) {
11329                        return true;
11330                    }
11331                    {
11332                        let end = pos + 4usize;
11333                        if end > len {
11334                            return true;
11335                        }
11336                        for &b in &bytes[pos..end] {
11337                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
11338                                return true;
11339                            }
11340                        }
11341                        pos = end;
11342                    }
11343                    {
11344                        let end = pos + 2usize;
11345                        if end > len {
11346                            return true;
11347                        }
11348                        for &b in &bytes[pos..end] {
11349                            if !(65u8..=90u8).contains(&b) {
11350                                return true;
11351                            }
11352                        }
11353                        pos = end;
11354                    }
11355                    {
11356                        let end = pos + 2usize;
11357                        if end > len {
11358                            return true;
11359                        }
11360                        for &b in &bytes[pos..end] {
11361                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
11362                                return true;
11363                            }
11364                        }
11365                        pos = end;
11366                    }
11367                    {
11368                        let saved = pos;
11369                        let matched: bool = (|| -> bool {
11370                            {
11371                                let end = pos + 3usize;
11372                                if end > len {
11373                                    return true;
11374                                }
11375                                for &b in &bytes[pos..end] {
11376                                    if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
11377                                        return true;
11378                                    }
11379                                }
11380                                pos = end;
11381                            }
11382                            false
11383                        })();
11384                        if matched {
11385                            pos = saved;
11386                        }
11387                    }
11388                    if pos != len {
11389                        return true;
11390                    }
11391                    false
11392                })();
11393                result
11394            };
11395            if violated {
11396                violations
11397                    .push(crate::common::validate::ConstraintViolation {
11398                        path: path.to_string(),
11399                        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}"
11400                            .to_string(),
11401                        kind: crate::common::validate::ConstraintKind::Pattern,
11402                    });
11403            }
11404        }
11405    }
11406}
11407impl crate::common::validate::Validatable for Authorisation1Code {
11408    fn validate_constraints(
11409        &self,
11410        _path: &str,
11411        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11412    ) {
11413    }
11414}
11415impl crate::common::validate::Validatable for BICFIDec2014Identifier {
11416    #[allow(clippy::unreadable_literal)]
11417    fn validate_constraints(
11418        &self,
11419        path: &str,
11420        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11421    ) {
11422        {
11423            let value: &str = &self.0;
11424            let violated = {
11425                let bytes = value.as_bytes();
11426                let len = bytes.len();
11427                let result: bool = (|| -> bool {
11428                    let mut pos: usize = 0;
11429                    if !(8usize..=11usize).contains(&len) {
11430                        return true;
11431                    }
11432                    {
11433                        let end = pos + 4usize;
11434                        if end > len {
11435                            return true;
11436                        }
11437                        for &b in &bytes[pos..end] {
11438                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
11439                                return true;
11440                            }
11441                        }
11442                        pos = end;
11443                    }
11444                    {
11445                        let end = pos + 2usize;
11446                        if end > len {
11447                            return true;
11448                        }
11449                        for &b in &bytes[pos..end] {
11450                            if !(65u8..=90u8).contains(&b) {
11451                                return true;
11452                            }
11453                        }
11454                        pos = end;
11455                    }
11456                    {
11457                        let end = pos + 2usize;
11458                        if end > len {
11459                            return true;
11460                        }
11461                        for &b in &bytes[pos..end] {
11462                            if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
11463                                return true;
11464                            }
11465                        }
11466                        pos = end;
11467                    }
11468                    {
11469                        let saved = pos;
11470                        let matched: bool = (|| -> bool {
11471                            {
11472                                let end = pos + 3usize;
11473                                if end > len {
11474                                    return true;
11475                                }
11476                                for &b in &bytes[pos..end] {
11477                                    if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
11478                                        return true;
11479                                    }
11480                                }
11481                                pos = end;
11482                            }
11483                            false
11484                        })();
11485                        if matched {
11486                            pos = saved;
11487                        }
11488                    }
11489                    if pos != len {
11490                        return true;
11491                    }
11492                    false
11493                })();
11494                result
11495            };
11496            if violated {
11497                violations
11498                    .push(crate::common::validate::ConstraintViolation {
11499                        path: path.to_string(),
11500                        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}"
11501                            .to_string(),
11502                        kind: crate::common::validate::ConstraintKind::Pattern,
11503                    });
11504            }
11505        }
11506    }
11507}
11508impl crate::common::validate::Validatable for BaseOneRate {
11509    #[allow(clippy::unreadable_literal)]
11510    fn validate_constraints(
11511        &self,
11512        path: &str,
11513        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11514    ) {
11515        {
11516            let value: &str = &self.0;
11517            let frac_count = value.find('.').map_or(0, |dot| {
11518                value[dot + 1..]
11519                    .chars()
11520                    .filter(char::is_ascii_digit)
11521                    .count()
11522            });
11523            let violated = frac_count > 10usize;
11524            if violated {
11525                violations.push(crate::common::validate::ConstraintViolation {
11526                    path: path.to_string(),
11527                    message: format!(
11528                        "{} (got {})",
11529                        "value exceeds maximum fraction digits 10", frac_count
11530                    ),
11531                    kind: crate::common::validate::ConstraintKind::FractionDigits,
11532                });
11533            }
11534        }
11535        {
11536            let value: &str = &self.0;
11537            let digit_count = value.chars().filter(char::is_ascii_digit).count();
11538            let violated = digit_count > 11usize;
11539            if violated {
11540                violations.push(crate::common::validate::ConstraintViolation {
11541                    path: path.to_string(),
11542                    message: format!(
11543                        "{} (got {})",
11544                        "value exceeds maximum total digits 11", digit_count
11545                    ),
11546                    kind: crate::common::validate::ConstraintKind::TotalDigits,
11547                });
11548            }
11549        }
11550    }
11551}
11552impl crate::common::validate::Validatable for BatchBookingIndicator {
11553    fn validate_constraints(
11554        &self,
11555        _path: &str,
11556        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11557    ) {
11558    }
11559}
11560impl crate::common::validate::Validatable for ChargeBearerType1Code {
11561    fn validate_constraints(
11562        &self,
11563        _path: &str,
11564        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11565    ) {
11566    }
11567}
11568impl crate::common::validate::Validatable for ClearingChannel2Code {
11569    fn validate_constraints(
11570        &self,
11571        _path: &str,
11572        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11573    ) {
11574    }
11575}
11576impl crate::common::validate::Validatable for CountryCode {
11577    #[allow(clippy::unreadable_literal)]
11578    fn validate_constraints(
11579        &self,
11580        path: &str,
11581        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11582    ) {
11583        {
11584            let value: &str = &self.0;
11585            let violated = {
11586                let bytes = value.as_bytes();
11587                bytes.len() != 2usize
11588                    || ({
11589                        let b = bytes[0usize];
11590                        !(65u8..=90u8).contains(&b)
11591                    })
11592                    || ({
11593                        let b = bytes[1usize];
11594                        !(65u8..=90u8).contains(&b)
11595                    })
11596            };
11597            if violated {
11598                violations.push(crate::common::validate::ConstraintViolation {
11599                    path: path.to_string(),
11600                    message: "value does not match pattern [A-Z]{2,2}".to_string(),
11601                    kind: crate::common::validate::ConstraintKind::Pattern,
11602                });
11603            }
11604        }
11605    }
11606}
11607impl crate::common::validate::Validatable for CreditDebitCode {
11608    fn validate_constraints(
11609        &self,
11610        _path: &str,
11611        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11612    ) {
11613    }
11614}
11615impl crate::common::validate::Validatable for DecimalNumber {
11616    #[allow(clippy::unreadable_literal)]
11617    fn validate_constraints(
11618        &self,
11619        path: &str,
11620        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11621    ) {
11622        {
11623            let value: &str = &self.0;
11624            let frac_count = value.find('.').map_or(0, |dot| {
11625                value[dot + 1..]
11626                    .chars()
11627                    .filter(char::is_ascii_digit)
11628                    .count()
11629            });
11630            let violated = frac_count > 17usize;
11631            if violated {
11632                violations.push(crate::common::validate::ConstraintViolation {
11633                    path: path.to_string(),
11634                    message: format!(
11635                        "{} (got {})",
11636                        "value exceeds maximum fraction digits 17", frac_count
11637                    ),
11638                    kind: crate::common::validate::ConstraintKind::FractionDigits,
11639                });
11640            }
11641        }
11642        {
11643            let value: &str = &self.0;
11644            let digit_count = value.chars().filter(char::is_ascii_digit).count();
11645            let violated = digit_count > 18usize;
11646            if violated {
11647                violations.push(crate::common::validate::ConstraintViolation {
11648                    path: path.to_string(),
11649                    message: format!(
11650                        "{} (got {})",
11651                        "value exceeds maximum total digits 18", digit_count
11652                    ),
11653                    kind: crate::common::validate::ConstraintKind::TotalDigits,
11654                });
11655            }
11656        }
11657    }
11658}
11659impl crate::common::validate::Validatable for DocumentType3Code {
11660    fn validate_constraints(
11661        &self,
11662        _path: &str,
11663        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11664    ) {
11665    }
11666}
11667impl crate::common::validate::Validatable for DocumentType6Code {
11668    fn validate_constraints(
11669        &self,
11670        _path: &str,
11671        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11672    ) {
11673    }
11674}
11675impl crate::common::validate::Validatable for Exact2NumericText {
11676    #[allow(clippy::unreadable_literal)]
11677    fn validate_constraints(
11678        &self,
11679        path: &str,
11680        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11681    ) {
11682        {
11683            let value: &str = &self.0;
11684            let violated = {
11685                let bytes = value.as_bytes();
11686                bytes.len() != 2usize
11687                    || ({
11688                        let b = bytes[0usize];
11689                        !(48u8..=57u8).contains(&b)
11690                    })
11691                    || ({
11692                        let b = bytes[1usize];
11693                        !(48u8..=57u8).contains(&b)
11694                    })
11695            };
11696            if violated {
11697                violations.push(crate::common::validate::ConstraintViolation {
11698                    path: path.to_string(),
11699                    message: "value does not match pattern [0-9]{2}".to_string(),
11700                    kind: crate::common::validate::ConstraintKind::Pattern,
11701                });
11702            }
11703        }
11704    }
11705}
11706impl crate::common::validate::Validatable for Exact4AlphaNumericText {
11707    #[allow(clippy::unreadable_literal)]
11708    fn validate_constraints(
11709        &self,
11710        path: &str,
11711        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11712    ) {
11713        {
11714            let value: &str = &self.0;
11715            let violated = {
11716                let bytes = value.as_bytes();
11717                bytes.len() != 4usize
11718                    || ({
11719                        let b = bytes[0usize];
11720                        !(97u8..=122u8).contains(&b)
11721                            && !(65u8..=90u8).contains(&b)
11722                            && !(48u8..=57u8).contains(&b)
11723                    })
11724                    || ({
11725                        let b = bytes[1usize];
11726                        !(97u8..=122u8).contains(&b)
11727                            && !(65u8..=90u8).contains(&b)
11728                            && !(48u8..=57u8).contains(&b)
11729                    })
11730                    || ({
11731                        let b = bytes[2usize];
11732                        !(97u8..=122u8).contains(&b)
11733                            && !(65u8..=90u8).contains(&b)
11734                            && !(48u8..=57u8).contains(&b)
11735                    })
11736                    || ({
11737                        let b = bytes[3usize];
11738                        !(97u8..=122u8).contains(&b)
11739                            && !(65u8..=90u8).contains(&b)
11740                            && !(48u8..=57u8).contains(&b)
11741                    })
11742            };
11743            if violated {
11744                violations.push(crate::common::validate::ConstraintViolation {
11745                    path: path.to_string(),
11746                    message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
11747                    kind: crate::common::validate::ConstraintKind::Pattern,
11748                });
11749            }
11750        }
11751    }
11752}
11753impl crate::common::validate::Validatable for ExternalAccountIdentification1Code {
11754    #[allow(clippy::unreadable_literal)]
11755    fn validate_constraints(
11756        &self,
11757        path: &str,
11758        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11759    ) {
11760        let len = self.0.chars().count();
11761        {
11762            let violated = len < 1usize;
11763            if violated {
11764                violations.push(crate::common::validate::ConstraintViolation {
11765                    path: path.to_string(),
11766                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11767                    kind: crate::common::validate::ConstraintKind::MinLength,
11768                });
11769            }
11770        }
11771        {
11772            let violated = len > 4usize;
11773            if violated {
11774                violations.push(crate::common::validate::ConstraintViolation {
11775                    path: path.to_string(),
11776                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
11777                    kind: crate::common::validate::ConstraintKind::MaxLength,
11778                });
11779            }
11780        }
11781    }
11782}
11783impl crate::common::validate::Validatable for ExternalCashAccountType1Code {
11784    #[allow(clippy::unreadable_literal)]
11785    fn validate_constraints(
11786        &self,
11787        path: &str,
11788        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11789    ) {
11790        let len = self.0.chars().count();
11791        {
11792            let violated = len < 1usize;
11793            if violated {
11794                violations.push(crate::common::validate::ConstraintViolation {
11795                    path: path.to_string(),
11796                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11797                    kind: crate::common::validate::ConstraintKind::MinLength,
11798                });
11799            }
11800        }
11801        {
11802            let violated = len > 4usize;
11803            if violated {
11804                violations.push(crate::common::validate::ConstraintViolation {
11805                    path: path.to_string(),
11806                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
11807                    kind: crate::common::validate::ConstraintKind::MaxLength,
11808                });
11809            }
11810        }
11811    }
11812}
11813impl crate::common::validate::Validatable for ExternalCashClearingSystem1Code {
11814    #[allow(clippy::unreadable_literal)]
11815    fn validate_constraints(
11816        &self,
11817        path: &str,
11818        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11819    ) {
11820        let len = self.0.chars().count();
11821        {
11822            let violated = len < 1usize;
11823            if violated {
11824                violations.push(crate::common::validate::ConstraintViolation {
11825                    path: path.to_string(),
11826                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11827                    kind: crate::common::validate::ConstraintKind::MinLength,
11828                });
11829            }
11830        }
11831        {
11832            let violated = len > 3usize;
11833            if violated {
11834                violations.push(crate::common::validate::ConstraintViolation {
11835                    path: path.to_string(),
11836                    message: format!("{} (got {})", "value exceeds maximum length 3", len),
11837                    kind: crate::common::validate::ConstraintKind::MaxLength,
11838                });
11839            }
11840        }
11841    }
11842}
11843impl crate::common::validate::Validatable for ExternalCategoryPurpose1Code {
11844    #[allow(clippy::unreadable_literal)]
11845    fn validate_constraints(
11846        &self,
11847        path: &str,
11848        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11849    ) {
11850        let len = self.0.chars().count();
11851        {
11852            let violated = len < 1usize;
11853            if violated {
11854                violations.push(crate::common::validate::ConstraintViolation {
11855                    path: path.to_string(),
11856                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11857                    kind: crate::common::validate::ConstraintKind::MinLength,
11858                });
11859            }
11860        }
11861        {
11862            let violated = len > 4usize;
11863            if violated {
11864                violations.push(crate::common::validate::ConstraintViolation {
11865                    path: path.to_string(),
11866                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
11867                    kind: crate::common::validate::ConstraintKind::MaxLength,
11868                });
11869            }
11870        }
11871    }
11872}
11873impl crate::common::validate::Validatable for ExternalClearingSystemIdentification1Code {
11874    #[allow(clippy::unreadable_literal)]
11875    fn validate_constraints(
11876        &self,
11877        path: &str,
11878        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11879    ) {
11880        let len = self.0.chars().count();
11881        {
11882            let violated = len < 1usize;
11883            if violated {
11884                violations.push(crate::common::validate::ConstraintViolation {
11885                    path: path.to_string(),
11886                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11887                    kind: crate::common::validate::ConstraintKind::MinLength,
11888                });
11889            }
11890        }
11891        {
11892            let violated = len > 5usize;
11893            if violated {
11894                violations.push(crate::common::validate::ConstraintViolation {
11895                    path: path.to_string(),
11896                    message: format!("{} (got {})", "value exceeds maximum length 5", len),
11897                    kind: crate::common::validate::ConstraintKind::MaxLength,
11898                });
11899            }
11900        }
11901    }
11902}
11903impl crate::common::validate::Validatable for ExternalCreditorAgentInstruction1Code {
11904    #[allow(clippy::unreadable_literal)]
11905    fn validate_constraints(
11906        &self,
11907        path: &str,
11908        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11909    ) {
11910        let len = self.0.chars().count();
11911        {
11912            let violated = len < 1usize;
11913            if violated {
11914                violations.push(crate::common::validate::ConstraintViolation {
11915                    path: path.to_string(),
11916                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11917                    kind: crate::common::validate::ConstraintKind::MinLength,
11918                });
11919            }
11920        }
11921        {
11922            let violated = len > 4usize;
11923            if violated {
11924                violations.push(crate::common::validate::ConstraintViolation {
11925                    path: path.to_string(),
11926                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
11927                    kind: crate::common::validate::ConstraintKind::MaxLength,
11928                });
11929            }
11930        }
11931    }
11932}
11933impl crate::common::validate::Validatable for ExternalDiscountAmountType1Code {
11934    #[allow(clippy::unreadable_literal)]
11935    fn validate_constraints(
11936        &self,
11937        path: &str,
11938        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11939    ) {
11940        let len = self.0.chars().count();
11941        {
11942            let violated = len < 1usize;
11943            if violated {
11944                violations.push(crate::common::validate::ConstraintViolation {
11945                    path: path.to_string(),
11946                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11947                    kind: crate::common::validate::ConstraintKind::MinLength,
11948                });
11949            }
11950        }
11951        {
11952            let violated = len > 4usize;
11953            if violated {
11954                violations.push(crate::common::validate::ConstraintViolation {
11955                    path: path.to_string(),
11956                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
11957                    kind: crate::common::validate::ConstraintKind::MaxLength,
11958                });
11959            }
11960        }
11961    }
11962}
11963impl crate::common::validate::Validatable for ExternalDocumentLineType1Code {
11964    #[allow(clippy::unreadable_literal)]
11965    fn validate_constraints(
11966        &self,
11967        path: &str,
11968        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11969    ) {
11970        let len = self.0.chars().count();
11971        {
11972            let violated = len < 1usize;
11973            if violated {
11974                violations.push(crate::common::validate::ConstraintViolation {
11975                    path: path.to_string(),
11976                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11977                    kind: crate::common::validate::ConstraintKind::MinLength,
11978                });
11979            }
11980        }
11981        {
11982            let violated = len > 4usize;
11983            if violated {
11984                violations.push(crate::common::validate::ConstraintViolation {
11985                    path: path.to_string(),
11986                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
11987                    kind: crate::common::validate::ConstraintKind::MaxLength,
11988                });
11989            }
11990        }
11991    }
11992}
11993impl crate::common::validate::Validatable for ExternalFinancialInstitutionIdentification1Code {
11994    #[allow(clippy::unreadable_literal)]
11995    fn validate_constraints(
11996        &self,
11997        path: &str,
11998        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11999    ) {
12000        let len = self.0.chars().count();
12001        {
12002            let violated = len < 1usize;
12003            if violated {
12004                violations.push(crate::common::validate::ConstraintViolation {
12005                    path: path.to_string(),
12006                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12007                    kind: crate::common::validate::ConstraintKind::MinLength,
12008                });
12009            }
12010        }
12011        {
12012            let violated = len > 4usize;
12013            if violated {
12014                violations.push(crate::common::validate::ConstraintViolation {
12015                    path: path.to_string(),
12016                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12017                    kind: crate::common::validate::ConstraintKind::MaxLength,
12018                });
12019            }
12020        }
12021    }
12022}
12023impl crate::common::validate::Validatable for ExternalGarnishmentType1Code {
12024    #[allow(clippy::unreadable_literal)]
12025    fn validate_constraints(
12026        &self,
12027        path: &str,
12028        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12029    ) {
12030        let len = self.0.chars().count();
12031        {
12032            let violated = len < 1usize;
12033            if violated {
12034                violations.push(crate::common::validate::ConstraintViolation {
12035                    path: path.to_string(),
12036                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12037                    kind: crate::common::validate::ConstraintKind::MinLength,
12038                });
12039            }
12040        }
12041        {
12042            let violated = len > 4usize;
12043            if violated {
12044                violations.push(crate::common::validate::ConstraintViolation {
12045                    path: path.to_string(),
12046                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12047                    kind: crate::common::validate::ConstraintKind::MaxLength,
12048                });
12049            }
12050        }
12051    }
12052}
12053impl crate::common::validate::Validatable for ExternalLocalInstrument1Code {
12054    #[allow(clippy::unreadable_literal)]
12055    fn validate_constraints(
12056        &self,
12057        path: &str,
12058        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12059    ) {
12060        let len = self.0.chars().count();
12061        {
12062            let violated = len < 1usize;
12063            if violated {
12064                violations.push(crate::common::validate::ConstraintViolation {
12065                    path: path.to_string(),
12066                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12067                    kind: crate::common::validate::ConstraintKind::MinLength,
12068                });
12069            }
12070        }
12071        {
12072            let violated = len > 35usize;
12073            if violated {
12074                violations.push(crate::common::validate::ConstraintViolation {
12075                    path: path.to_string(),
12076                    message: format!("{} (got {})", "value exceeds maximum length 35", len),
12077                    kind: crate::common::validate::ConstraintKind::MaxLength,
12078                });
12079            }
12080        }
12081    }
12082}
12083impl crate::common::validate::Validatable for ExternalMandateSetupReason1Code {
12084    #[allow(clippy::unreadable_literal)]
12085    fn validate_constraints(
12086        &self,
12087        path: &str,
12088        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12089    ) {
12090        let len = self.0.chars().count();
12091        {
12092            let violated = len < 1usize;
12093            if violated {
12094                violations.push(crate::common::validate::ConstraintViolation {
12095                    path: path.to_string(),
12096                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12097                    kind: crate::common::validate::ConstraintKind::MinLength,
12098                });
12099            }
12100        }
12101        {
12102            let violated = len > 4usize;
12103            if violated {
12104                violations.push(crate::common::validate::ConstraintViolation {
12105                    path: path.to_string(),
12106                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12107                    kind: crate::common::validate::ConstraintKind::MaxLength,
12108                });
12109            }
12110        }
12111    }
12112}
12113impl crate::common::validate::Validatable for ExternalOrganisationIdentification1Code {
12114    #[allow(clippy::unreadable_literal)]
12115    fn validate_constraints(
12116        &self,
12117        path: &str,
12118        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12119    ) {
12120        let len = self.0.chars().count();
12121        {
12122            let violated = len < 1usize;
12123            if violated {
12124                violations.push(crate::common::validate::ConstraintViolation {
12125                    path: path.to_string(),
12126                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12127                    kind: crate::common::validate::ConstraintKind::MinLength,
12128                });
12129            }
12130        }
12131        {
12132            let violated = len > 4usize;
12133            if violated {
12134                violations.push(crate::common::validate::ConstraintViolation {
12135                    path: path.to_string(),
12136                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12137                    kind: crate::common::validate::ConstraintKind::MaxLength,
12138                });
12139            }
12140        }
12141    }
12142}
12143impl crate::common::validate::Validatable for ExternalPersonIdentification1Code {
12144    #[allow(clippy::unreadable_literal)]
12145    fn validate_constraints(
12146        &self,
12147        path: &str,
12148        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12149    ) {
12150        let len = self.0.chars().count();
12151        {
12152            let violated = len < 1usize;
12153            if violated {
12154                violations.push(crate::common::validate::ConstraintViolation {
12155                    path: path.to_string(),
12156                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12157                    kind: crate::common::validate::ConstraintKind::MinLength,
12158                });
12159            }
12160        }
12161        {
12162            let violated = len > 4usize;
12163            if violated {
12164                violations.push(crate::common::validate::ConstraintViolation {
12165                    path: path.to_string(),
12166                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12167                    kind: crate::common::validate::ConstraintKind::MaxLength,
12168                });
12169            }
12170        }
12171    }
12172}
12173impl crate::common::validate::Validatable for ExternalProxyAccountType1Code {
12174    #[allow(clippy::unreadable_literal)]
12175    fn validate_constraints(
12176        &self,
12177        path: &str,
12178        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12179    ) {
12180        let len = self.0.chars().count();
12181        {
12182            let violated = len < 1usize;
12183            if violated {
12184                violations.push(crate::common::validate::ConstraintViolation {
12185                    path: path.to_string(),
12186                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12187                    kind: crate::common::validate::ConstraintKind::MinLength,
12188                });
12189            }
12190        }
12191        {
12192            let violated = len > 4usize;
12193            if violated {
12194                violations.push(crate::common::validate::ConstraintViolation {
12195                    path: path.to_string(),
12196                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12197                    kind: crate::common::validate::ConstraintKind::MaxLength,
12198                });
12199            }
12200        }
12201    }
12202}
12203impl crate::common::validate::Validatable for ExternalPurpose1Code {
12204    #[allow(clippy::unreadable_literal)]
12205    fn validate_constraints(
12206        &self,
12207        path: &str,
12208        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12209    ) {
12210        let len = self.0.chars().count();
12211        {
12212            let violated = len < 1usize;
12213            if violated {
12214                violations.push(crate::common::validate::ConstraintViolation {
12215                    path: path.to_string(),
12216                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12217                    kind: crate::common::validate::ConstraintKind::MinLength,
12218                });
12219            }
12220        }
12221        {
12222            let violated = len > 4usize;
12223            if violated {
12224                violations.push(crate::common::validate::ConstraintViolation {
12225                    path: path.to_string(),
12226                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12227                    kind: crate::common::validate::ConstraintKind::MaxLength,
12228                });
12229            }
12230        }
12231    }
12232}
12233impl crate::common::validate::Validatable for ExternalReturnReason1Code {
12234    #[allow(clippy::unreadable_literal)]
12235    fn validate_constraints(
12236        &self,
12237        path: &str,
12238        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12239    ) {
12240        let len = self.0.chars().count();
12241        {
12242            let violated = len < 1usize;
12243            if violated {
12244                violations.push(crate::common::validate::ConstraintViolation {
12245                    path: path.to_string(),
12246                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12247                    kind: crate::common::validate::ConstraintKind::MinLength,
12248                });
12249            }
12250        }
12251        {
12252            let violated = len > 4usize;
12253            if violated {
12254                violations.push(crate::common::validate::ConstraintViolation {
12255                    path: path.to_string(),
12256                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12257                    kind: crate::common::validate::ConstraintKind::MaxLength,
12258                });
12259            }
12260        }
12261    }
12262}
12263impl crate::common::validate::Validatable for ExternalServiceLevel1Code {
12264    #[allow(clippy::unreadable_literal)]
12265    fn validate_constraints(
12266        &self,
12267        path: &str,
12268        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12269    ) {
12270        let len = self.0.chars().count();
12271        {
12272            let violated = len < 1usize;
12273            if violated {
12274                violations.push(crate::common::validate::ConstraintViolation {
12275                    path: path.to_string(),
12276                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12277                    kind: crate::common::validate::ConstraintKind::MinLength,
12278                });
12279            }
12280        }
12281        {
12282            let violated = len > 4usize;
12283            if violated {
12284                violations.push(crate::common::validate::ConstraintViolation {
12285                    path: path.to_string(),
12286                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12287                    kind: crate::common::validate::ConstraintKind::MaxLength,
12288                });
12289            }
12290        }
12291    }
12292}
12293impl crate::common::validate::Validatable for ExternalTaxAmountType1Code {
12294    #[allow(clippy::unreadable_literal)]
12295    fn validate_constraints(
12296        &self,
12297        path: &str,
12298        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12299    ) {
12300        let len = self.0.chars().count();
12301        {
12302            let violated = len < 1usize;
12303            if violated {
12304                violations.push(crate::common::validate::ConstraintViolation {
12305                    path: path.to_string(),
12306                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12307                    kind: crate::common::validate::ConstraintKind::MinLength,
12308                });
12309            }
12310        }
12311        {
12312            let violated = len > 4usize;
12313            if violated {
12314                violations.push(crate::common::validate::ConstraintViolation {
12315                    path: path.to_string(),
12316                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12317                    kind: crate::common::validate::ConstraintKind::MaxLength,
12318                });
12319            }
12320        }
12321    }
12322}
12323impl crate::common::validate::Validatable for Frequency6Code {
12324    fn validate_constraints(
12325        &self,
12326        _path: &str,
12327        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12328    ) {
12329    }
12330}
12331impl crate::common::validate::Validatable for IBAN2007Identifier {
12332    #[allow(clippy::unreadable_literal)]
12333    fn validate_constraints(
12334        &self,
12335        path: &str,
12336        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12337    ) {
12338        {
12339            let value: &str = &self.0;
12340            let violated = {
12341                let bytes = value.as_bytes();
12342                let len = bytes.len();
12343                let result: bool = (|| -> bool {
12344                    let mut pos: usize = 0;
12345                    if !(5usize..=34usize).contains(&len) {
12346                        return true;
12347                    }
12348                    {
12349                        let end = pos + 2usize;
12350                        if end > len {
12351                            return true;
12352                        }
12353                        for &b in &bytes[pos..end] {
12354                            if !(65u8..=90u8).contains(&b) {
12355                                return true;
12356                            }
12357                        }
12358                        pos = end;
12359                    }
12360                    {
12361                        let end = pos + 2usize;
12362                        if end > len {
12363                            return true;
12364                        }
12365                        for &b in &bytes[pos..end] {
12366                            if !(48u8..=57u8).contains(&b) {
12367                                return true;
12368                            }
12369                        }
12370                        pos = end;
12371                    }
12372                    {
12373                        let start = pos;
12374                        let limit = if pos + 30usize < len {
12375                            pos + 30usize
12376                        } else {
12377                            len
12378                        };
12379                        while pos < limit {
12380                            let b = bytes[pos];
12381                            if !(97u8..=122u8).contains(&b)
12382                                && !(65u8..=90u8).contains(&b)
12383                                && !(48u8..=57u8).contains(&b)
12384                            {
12385                                break;
12386                            }
12387                            pos += 1;
12388                        }
12389                        let matched = pos - start;
12390                        if matched < 1usize {
12391                            return true;
12392                        }
12393                    }
12394                    if pos != len {
12395                        return true;
12396                    }
12397                    false
12398                })();
12399                result
12400            };
12401            if violated {
12402                violations.push(crate::common::validate::ConstraintViolation {
12403                    path: path.to_string(),
12404                    message: "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
12405                        .to_string(),
12406                    kind: crate::common::validate::ConstraintKind::Pattern,
12407                });
12408            }
12409        }
12410    }
12411}
12412impl crate::common::validate::Validatable for ISODate {
12413    fn validate_constraints(
12414        &self,
12415        _path: &str,
12416        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12417    ) {
12418    }
12419}
12420impl crate::common::validate::Validatable for ISODateTime {
12421    fn validate_constraints(
12422        &self,
12423        _path: &str,
12424        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12425    ) {
12426    }
12427}
12428impl crate::common::validate::Validatable for ISOTime {
12429    fn validate_constraints(
12430        &self,
12431        _path: &str,
12432        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12433    ) {
12434    }
12435}
12436impl crate::common::validate::Validatable for ISOYear {
12437    fn validate_constraints(
12438        &self,
12439        _path: &str,
12440        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12441    ) {
12442    }
12443}
12444impl crate::common::validate::Validatable for Instruction4Code {
12445    fn validate_constraints(
12446        &self,
12447        _path: &str,
12448        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12449    ) {
12450    }
12451}
12452impl crate::common::validate::Validatable for LEIIdentifier {
12453    #[allow(clippy::unreadable_literal)]
12454    fn validate_constraints(
12455        &self,
12456        path: &str,
12457        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12458    ) {
12459        {
12460            let value: &str = &self.0;
12461            let violated = {
12462                let bytes = value.as_bytes();
12463                bytes.len() != 20usize
12464                    || ({
12465                        let b = bytes[0usize];
12466                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12467                    })
12468                    || ({
12469                        let b = bytes[1usize];
12470                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12471                    })
12472                    || ({
12473                        let b = bytes[2usize];
12474                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12475                    })
12476                    || ({
12477                        let b = bytes[3usize];
12478                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12479                    })
12480                    || ({
12481                        let b = bytes[4usize];
12482                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12483                    })
12484                    || ({
12485                        let b = bytes[5usize];
12486                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12487                    })
12488                    || ({
12489                        let b = bytes[6usize];
12490                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12491                    })
12492                    || ({
12493                        let b = bytes[7usize];
12494                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12495                    })
12496                    || ({
12497                        let b = bytes[8usize];
12498                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12499                    })
12500                    || ({
12501                        let b = bytes[9usize];
12502                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12503                    })
12504                    || ({
12505                        let b = bytes[10usize];
12506                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12507                    })
12508                    || ({
12509                        let b = bytes[11usize];
12510                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12511                    })
12512                    || ({
12513                        let b = bytes[12usize];
12514                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12515                    })
12516                    || ({
12517                        let b = bytes[13usize];
12518                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12519                    })
12520                    || ({
12521                        let b = bytes[14usize];
12522                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12523                    })
12524                    || ({
12525                        let b = bytes[15usize];
12526                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12527                    })
12528                    || ({
12529                        let b = bytes[16usize];
12530                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12531                    })
12532                    || ({
12533                        let b = bytes[17usize];
12534                        !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
12535                    })
12536                    || ({
12537                        let b = bytes[18usize];
12538                        !(48u8..=57u8).contains(&b)
12539                    })
12540                    || ({
12541                        let b = bytes[19usize];
12542                        !(48u8..=57u8).contains(&b)
12543                    })
12544            };
12545            if violated {
12546                violations.push(crate::common::validate::ConstraintViolation {
12547                    path: path.to_string(),
12548                    message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}".to_string(),
12549                    kind: crate::common::validate::ConstraintKind::Pattern,
12550                });
12551            }
12552        }
12553    }
12554}
12555impl crate::common::validate::Validatable for MandateClassification1Code {
12556    fn validate_constraints(
12557        &self,
12558        _path: &str,
12559        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12560    ) {
12561    }
12562}
12563impl crate::common::validate::Validatable for Max1025Text {
12564    #[allow(clippy::unreadable_literal)]
12565    fn validate_constraints(
12566        &self,
12567        path: &str,
12568        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12569    ) {
12570        let len = self.0.chars().count();
12571        {
12572            let violated = len < 1usize;
12573            if violated {
12574                violations.push(crate::common::validate::ConstraintViolation {
12575                    path: path.to_string(),
12576                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12577                    kind: crate::common::validate::ConstraintKind::MinLength,
12578                });
12579            }
12580        }
12581        {
12582            let violated = len > 1025usize;
12583            if violated {
12584                violations.push(crate::common::validate::ConstraintViolation {
12585                    path: path.to_string(),
12586                    message: format!("{} (got {})", "value exceeds maximum length 1025", len),
12587                    kind: crate::common::validate::ConstraintKind::MaxLength,
12588                });
12589            }
12590        }
12591    }
12592}
12593impl crate::common::validate::Validatable for Max105Text {
12594    #[allow(clippy::unreadable_literal)]
12595    fn validate_constraints(
12596        &self,
12597        path: &str,
12598        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12599    ) {
12600        let len = self.0.chars().count();
12601        {
12602            let violated = len < 1usize;
12603            if violated {
12604                violations.push(crate::common::validate::ConstraintViolation {
12605                    path: path.to_string(),
12606                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12607                    kind: crate::common::validate::ConstraintKind::MinLength,
12608                });
12609            }
12610        }
12611        {
12612            let violated = len > 105usize;
12613            if violated {
12614                violations.push(crate::common::validate::ConstraintViolation {
12615                    path: path.to_string(),
12616                    message: format!("{} (got {})", "value exceeds maximum length 105", len),
12617                    kind: crate::common::validate::ConstraintKind::MaxLength,
12618                });
12619            }
12620        }
12621    }
12622}
12623impl crate::common::validate::Validatable for Max10KBinary {
12624    #[allow(clippy::unreadable_literal)]
12625    fn validate_constraints(
12626        &self,
12627        path: &str,
12628        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12629    ) {
12630        let len = self.0.chars().count();
12631        {
12632            let violated = len < 1usize;
12633            if violated {
12634                violations.push(crate::common::validate::ConstraintViolation {
12635                    path: path.to_string(),
12636                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12637                    kind: crate::common::validate::ConstraintKind::MinLength,
12638                });
12639            }
12640        }
12641        {
12642            let violated = len > 10240usize;
12643            if violated {
12644                violations.push(crate::common::validate::ConstraintViolation {
12645                    path: path.to_string(),
12646                    message: format!("{} (got {})", "value exceeds maximum length 10240", len),
12647                    kind: crate::common::validate::ConstraintKind::MaxLength,
12648                });
12649            }
12650        }
12651    }
12652}
12653impl crate::common::validate::Validatable for Max128Text {
12654    #[allow(clippy::unreadable_literal)]
12655    fn validate_constraints(
12656        &self,
12657        path: &str,
12658        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12659    ) {
12660        let len = self.0.chars().count();
12661        {
12662            let violated = len < 1usize;
12663            if violated {
12664                violations.push(crate::common::validate::ConstraintViolation {
12665                    path: path.to_string(),
12666                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12667                    kind: crate::common::validate::ConstraintKind::MinLength,
12668                });
12669            }
12670        }
12671        {
12672            let violated = len > 128usize;
12673            if violated {
12674                violations.push(crate::common::validate::ConstraintViolation {
12675                    path: path.to_string(),
12676                    message: format!("{} (got {})", "value exceeds maximum length 128", len),
12677                    kind: crate::common::validate::ConstraintKind::MaxLength,
12678                });
12679            }
12680        }
12681    }
12682}
12683impl crate::common::validate::Validatable for Max140Text {
12684    #[allow(clippy::unreadable_literal)]
12685    fn validate_constraints(
12686        &self,
12687        path: &str,
12688        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12689    ) {
12690        let len = self.0.chars().count();
12691        {
12692            let violated = len < 1usize;
12693            if violated {
12694                violations.push(crate::common::validate::ConstraintViolation {
12695                    path: path.to_string(),
12696                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12697                    kind: crate::common::validate::ConstraintKind::MinLength,
12698                });
12699            }
12700        }
12701        {
12702            let violated = len > 140usize;
12703            if violated {
12704                violations.push(crate::common::validate::ConstraintViolation {
12705                    path: path.to_string(),
12706                    message: format!("{} (got {})", "value exceeds maximum length 140", len),
12707                    kind: crate::common::validate::ConstraintKind::MaxLength,
12708                });
12709            }
12710        }
12711    }
12712}
12713impl crate::common::validate::Validatable for Max15NumericText {
12714    #[allow(clippy::unreadable_literal)]
12715    fn validate_constraints(
12716        &self,
12717        path: &str,
12718        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12719    ) {
12720        {
12721            let value: &str = &self.0;
12722            let violated = {
12723                let bytes = value.as_bytes();
12724                let len = bytes.len();
12725                let result: bool = (|| -> bool {
12726                    let mut pos: usize = 0;
12727                    if !(1usize..=15usize).contains(&len) {
12728                        return true;
12729                    }
12730                    {
12731                        let start = pos;
12732                        let limit = if pos + 15usize < len {
12733                            pos + 15usize
12734                        } else {
12735                            len
12736                        };
12737                        while pos < limit {
12738                            let b = bytes[pos];
12739                            if !(48u8..=57u8).contains(&b) {
12740                                break;
12741                            }
12742                            pos += 1;
12743                        }
12744                        let matched = pos - start;
12745                        if matched < 1usize {
12746                            return true;
12747                        }
12748                    }
12749                    if pos != len {
12750                        return true;
12751                    }
12752                    false
12753                })();
12754                result
12755            };
12756            if violated {
12757                violations.push(crate::common::validate::ConstraintViolation {
12758                    path: path.to_string(),
12759                    message: "value does not match pattern [0-9]{1,15}".to_string(),
12760                    kind: crate::common::validate::ConstraintKind::Pattern,
12761                });
12762            }
12763        }
12764    }
12765}
12766impl crate::common::validate::Validatable for Max16Text {
12767    #[allow(clippy::unreadable_literal)]
12768    fn validate_constraints(
12769        &self,
12770        path: &str,
12771        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12772    ) {
12773        let len = self.0.chars().count();
12774        {
12775            let violated = len < 1usize;
12776            if violated {
12777                violations.push(crate::common::validate::ConstraintViolation {
12778                    path: path.to_string(),
12779                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12780                    kind: crate::common::validate::ConstraintKind::MinLength,
12781                });
12782            }
12783        }
12784        {
12785            let violated = len > 16usize;
12786            if violated {
12787                violations.push(crate::common::validate::ConstraintViolation {
12788                    path: path.to_string(),
12789                    message: format!("{} (got {})", "value exceeds maximum length 16", len),
12790                    kind: crate::common::validate::ConstraintKind::MaxLength,
12791                });
12792            }
12793        }
12794    }
12795}
12796impl crate::common::validate::Validatable for Max2048Text {
12797    #[allow(clippy::unreadable_literal)]
12798    fn validate_constraints(
12799        &self,
12800        path: &str,
12801        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12802    ) {
12803        let len = self.0.chars().count();
12804        {
12805            let violated = len < 1usize;
12806            if violated {
12807                violations.push(crate::common::validate::ConstraintViolation {
12808                    path: path.to_string(),
12809                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12810                    kind: crate::common::validate::ConstraintKind::MinLength,
12811                });
12812            }
12813        }
12814        {
12815            let violated = len > 2048usize;
12816            if violated {
12817                violations.push(crate::common::validate::ConstraintViolation {
12818                    path: path.to_string(),
12819                    message: format!("{} (got {})", "value exceeds maximum length 2048", len),
12820                    kind: crate::common::validate::ConstraintKind::MaxLength,
12821                });
12822            }
12823        }
12824    }
12825}
12826impl crate::common::validate::Validatable for Max34Text {
12827    #[allow(clippy::unreadable_literal)]
12828    fn validate_constraints(
12829        &self,
12830        path: &str,
12831        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12832    ) {
12833        let len = self.0.chars().count();
12834        {
12835            let violated = len < 1usize;
12836            if violated {
12837                violations.push(crate::common::validate::ConstraintViolation {
12838                    path: path.to_string(),
12839                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12840                    kind: crate::common::validate::ConstraintKind::MinLength,
12841                });
12842            }
12843        }
12844        {
12845            let violated = len > 34usize;
12846            if violated {
12847                violations.push(crate::common::validate::ConstraintViolation {
12848                    path: path.to_string(),
12849                    message: format!("{} (got {})", "value exceeds maximum length 34", len),
12850                    kind: crate::common::validate::ConstraintKind::MaxLength,
12851                });
12852            }
12853        }
12854    }
12855}
12856impl crate::common::validate::Validatable for Max350Text {
12857    #[allow(clippy::unreadable_literal)]
12858    fn validate_constraints(
12859        &self,
12860        path: &str,
12861        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12862    ) {
12863        let len = self.0.chars().count();
12864        {
12865            let violated = len < 1usize;
12866            if violated {
12867                violations.push(crate::common::validate::ConstraintViolation {
12868                    path: path.to_string(),
12869                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12870                    kind: crate::common::validate::ConstraintKind::MinLength,
12871                });
12872            }
12873        }
12874        {
12875            let violated = len > 350usize;
12876            if violated {
12877                violations.push(crate::common::validate::ConstraintViolation {
12878                    path: path.to_string(),
12879                    message: format!("{} (got {})", "value exceeds maximum length 350", len),
12880                    kind: crate::common::validate::ConstraintKind::MaxLength,
12881                });
12882            }
12883        }
12884    }
12885}
12886impl crate::common::validate::Validatable for Max35Text {
12887    #[allow(clippy::unreadable_literal)]
12888    fn validate_constraints(
12889        &self,
12890        path: &str,
12891        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12892    ) {
12893        let len = self.0.chars().count();
12894        {
12895            let violated = len < 1usize;
12896            if violated {
12897                violations.push(crate::common::validate::ConstraintViolation {
12898                    path: path.to_string(),
12899                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12900                    kind: crate::common::validate::ConstraintKind::MinLength,
12901                });
12902            }
12903        }
12904        {
12905            let violated = len > 35usize;
12906            if violated {
12907                violations.push(crate::common::validate::ConstraintViolation {
12908                    path: path.to_string(),
12909                    message: format!("{} (got {})", "value exceeds maximum length 35", len),
12910                    kind: crate::common::validate::ConstraintKind::MaxLength,
12911                });
12912            }
12913        }
12914    }
12915}
12916impl crate::common::validate::Validatable for Max4Text {
12917    #[allow(clippy::unreadable_literal)]
12918    fn validate_constraints(
12919        &self,
12920        path: &str,
12921        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12922    ) {
12923        let len = self.0.chars().count();
12924        {
12925            let violated = len < 1usize;
12926            if violated {
12927                violations.push(crate::common::validate::ConstraintViolation {
12928                    path: path.to_string(),
12929                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12930                    kind: crate::common::validate::ConstraintKind::MinLength,
12931                });
12932            }
12933        }
12934        {
12935            let violated = len > 4usize;
12936            if violated {
12937                violations.push(crate::common::validate::ConstraintViolation {
12938                    path: path.to_string(),
12939                    message: format!("{} (got {})", "value exceeds maximum length 4", len),
12940                    kind: crate::common::validate::ConstraintKind::MaxLength,
12941                });
12942            }
12943        }
12944    }
12945}
12946impl crate::common::validate::Validatable for Max70Text {
12947    #[allow(clippy::unreadable_literal)]
12948    fn validate_constraints(
12949        &self,
12950        path: &str,
12951        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12952    ) {
12953        let len = self.0.chars().count();
12954        {
12955            let violated = len < 1usize;
12956            if violated {
12957                violations.push(crate::common::validate::ConstraintViolation {
12958                    path: path.to_string(),
12959                    message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12960                    kind: crate::common::validate::ConstraintKind::MinLength,
12961                });
12962            }
12963        }
12964        {
12965            let violated = len > 70usize;
12966            if violated {
12967                violations.push(crate::common::validate::ConstraintViolation {
12968                    path: path.to_string(),
12969                    message: format!("{} (got {})", "value exceeds maximum length 70", len),
12970                    kind: crate::common::validate::ConstraintKind::MaxLength,
12971                });
12972            }
12973        }
12974    }
12975}
12976impl crate::common::validate::Validatable for NamePrefix2Code {
12977    fn validate_constraints(
12978        &self,
12979        _path: &str,
12980        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12981    ) {
12982    }
12983}
12984impl crate::common::validate::Validatable for Number {
12985    #[allow(clippy::unreadable_literal)]
12986    fn validate_constraints(
12987        &self,
12988        path: &str,
12989        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12990    ) {
12991        {
12992            let value: &str = &self.0;
12993            let frac_count = value.find('.').map_or(0, |dot| {
12994                value[dot + 1..]
12995                    .chars()
12996                    .filter(char::is_ascii_digit)
12997                    .count()
12998            });
12999            let violated = frac_count > 0usize;
13000            if violated {
13001                violations.push(crate::common::validate::ConstraintViolation {
13002                    path: path.to_string(),
13003                    message: format!(
13004                        "{} (got {})",
13005                        "value exceeds maximum fraction digits 0", frac_count
13006                    ),
13007                    kind: crate::common::validate::ConstraintKind::FractionDigits,
13008                });
13009            }
13010        }
13011        {
13012            let value: &str = &self.0;
13013            let digit_count = value.chars().filter(char::is_ascii_digit).count();
13014            let violated = digit_count > 18usize;
13015            if violated {
13016                violations.push(crate::common::validate::ConstraintViolation {
13017                    path: path.to_string(),
13018                    message: format!(
13019                        "{} (got {})",
13020                        "value exceeds maximum total digits 18", digit_count
13021                    ),
13022                    kind: crate::common::validate::ConstraintKind::TotalDigits,
13023                });
13024            }
13025        }
13026    }
13027}
13028impl crate::common::validate::Validatable for PaymentMethod4Code {
13029    fn validate_constraints(
13030        &self,
13031        _path: &str,
13032        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13033    ) {
13034    }
13035}
13036impl crate::common::validate::Validatable for PercentageRate {
13037    #[allow(clippy::unreadable_literal)]
13038    fn validate_constraints(
13039        &self,
13040        path: &str,
13041        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13042    ) {
13043        {
13044            let value: &str = &self.0;
13045            let frac_count = value.find('.').map_or(0, |dot| {
13046                value[dot + 1..]
13047                    .chars()
13048                    .filter(char::is_ascii_digit)
13049                    .count()
13050            });
13051            let violated = frac_count > 10usize;
13052            if violated {
13053                violations.push(crate::common::validate::ConstraintViolation {
13054                    path: path.to_string(),
13055                    message: format!(
13056                        "{} (got {})",
13057                        "value exceeds maximum fraction digits 10", frac_count
13058                    ),
13059                    kind: crate::common::validate::ConstraintKind::FractionDigits,
13060                });
13061            }
13062        }
13063        {
13064            let value: &str = &self.0;
13065            let digit_count = value.chars().filter(char::is_ascii_digit).count();
13066            let violated = digit_count > 11usize;
13067            if violated {
13068                violations.push(crate::common::validate::ConstraintViolation {
13069                    path: path.to_string(),
13070                    message: format!(
13071                        "{} (got {})",
13072                        "value exceeds maximum total digits 11", digit_count
13073                    ),
13074                    kind: crate::common::validate::ConstraintKind::TotalDigits,
13075                });
13076            }
13077        }
13078    }
13079}
13080impl crate::common::validate::Validatable for PhoneNumber {
13081    #[allow(clippy::unreadable_literal)]
13082    fn validate_constraints(
13083        &self,
13084        path: &str,
13085        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13086    ) {
13087        {
13088            let value: &str = &self.0;
13089            let violated = {
13090                let bytes = value.as_bytes();
13091                let len = bytes.len();
13092                let result: bool = (|| -> bool {
13093                    let mut pos: usize = 0;
13094                    if !(4usize..=35usize).contains(&len) {
13095                        return true;
13096                    }
13097                    if pos >= len || bytes[pos] != 43u8 {
13098                        return true;
13099                    }
13100                    pos += 1;
13101                    {
13102                        let start = pos;
13103                        let limit = if pos + 3usize < len {
13104                            pos + 3usize
13105                        } else {
13106                            len
13107                        };
13108                        while pos < limit {
13109                            let b = bytes[pos];
13110                            if !(48u8..=57u8).contains(&b) {
13111                                break;
13112                            }
13113                            pos += 1;
13114                        }
13115                        let matched = pos - start;
13116                        if matched < 1usize {
13117                            return true;
13118                        }
13119                    }
13120                    if pos >= len || bytes[pos] != 45u8 {
13121                        return true;
13122                    }
13123                    pos += 1;
13124                    {
13125                        let start = pos;
13126                        let limit = if pos + 30usize < len {
13127                            pos + 30usize
13128                        } else {
13129                            len
13130                        };
13131                        while pos < limit {
13132                            let b = bytes[pos];
13133                            if !(48u8..=57u8).contains(&b)
13134                                && b != 40u8
13135                                && b != 41u8
13136                                && b != 43u8
13137                                && b != 45u8
13138                            {
13139                                break;
13140                            }
13141                            pos += 1;
13142                        }
13143                        let matched = pos - start;
13144                        if matched < 1usize {
13145                            return true;
13146                        }
13147                    }
13148                    if pos != len {
13149                        return true;
13150                    }
13151                    false
13152                })();
13153                result
13154            };
13155            if violated {
13156                violations.push(crate::common::validate::ConstraintViolation {
13157                    path: path.to_string(),
13158                    message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
13159                        .to_string(),
13160                    kind: crate::common::validate::ConstraintKind::Pattern,
13161                });
13162            }
13163        }
13164    }
13165}
13166impl crate::common::validate::Validatable for PreferredContactMethod1Code {
13167    fn validate_constraints(
13168        &self,
13169        _path: &str,
13170        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13171    ) {
13172    }
13173}
13174impl crate::common::validate::Validatable for Priority2Code {
13175    fn validate_constraints(
13176        &self,
13177        _path: &str,
13178        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13179    ) {
13180    }
13181}
13182impl crate::common::validate::Validatable for Priority3Code {
13183    fn validate_constraints(
13184        &self,
13185        _path: &str,
13186        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13187    ) {
13188    }
13189}
13190impl crate::common::validate::Validatable for SequenceType3Code {
13191    fn validate_constraints(
13192        &self,
13193        _path: &str,
13194        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13195    ) {
13196    }
13197}
13198impl crate::common::validate::Validatable for SettlementMethod1Code {
13199    fn validate_constraints(
13200        &self,
13201        _path: &str,
13202        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13203    ) {
13204    }
13205}
13206impl crate::common::validate::Validatable for TaxRecordPeriod1Code {
13207    fn validate_constraints(
13208        &self,
13209        _path: &str,
13210        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13211    ) {
13212    }
13213}
13214impl crate::common::validate::Validatable for TrueFalseIndicator {
13215    fn validate_constraints(
13216        &self,
13217        _path: &str,
13218        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13219    ) {
13220    }
13221}
13222impl crate::common::validate::Validatable for UUIDv4Identifier {
13223    #[allow(clippy::unreadable_literal)]
13224    fn validate_constraints(
13225        &self,
13226        path: &str,
13227        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13228    ) {
13229        {
13230            let value: &str = &self.0;
13231            let violated = {
13232                let bytes = value.as_bytes();
13233                bytes.len() != 36usize
13234                    || ({
13235                        let b = bytes[0usize];
13236                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13237                    })
13238                    || ({
13239                        let b = bytes[1usize];
13240                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13241                    })
13242                    || ({
13243                        let b = bytes[2usize];
13244                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13245                    })
13246                    || ({
13247                        let b = bytes[3usize];
13248                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13249                    })
13250                    || ({
13251                        let b = bytes[4usize];
13252                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13253                    })
13254                    || ({
13255                        let b = bytes[5usize];
13256                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13257                    })
13258                    || ({
13259                        let b = bytes[6usize];
13260                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13261                    })
13262                    || ({
13263                        let b = bytes[7usize];
13264                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13265                    })
13266                    || bytes[8usize] != 45u8
13267                    || ({
13268                        let b = bytes[9usize];
13269                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13270                    })
13271                    || ({
13272                        let b = bytes[10usize];
13273                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13274                    })
13275                    || ({
13276                        let b = bytes[11usize];
13277                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13278                    })
13279                    || ({
13280                        let b = bytes[12usize];
13281                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13282                    })
13283                    || bytes[13usize] != 45u8
13284                    || bytes[14usize] != 52u8
13285                    || ({
13286                        let b = bytes[15usize];
13287                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13288                    })
13289                    || ({
13290                        let b = bytes[16usize];
13291                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13292                    })
13293                    || ({
13294                        let b = bytes[17usize];
13295                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13296                    })
13297                    || bytes[18usize] != 45u8
13298                    || ({
13299                        let b = bytes[19usize];
13300                        b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
13301                    })
13302                    || ({
13303                        let b = bytes[20usize];
13304                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13305                    })
13306                    || ({
13307                        let b = bytes[21usize];
13308                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13309                    })
13310                    || ({
13311                        let b = bytes[22usize];
13312                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13313                    })
13314                    || bytes[23usize] != 45u8
13315                    || ({
13316                        let b = bytes[24usize];
13317                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13318                    })
13319                    || ({
13320                        let b = bytes[25usize];
13321                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13322                    })
13323                    || ({
13324                        let b = bytes[26usize];
13325                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13326                    })
13327                    || ({
13328                        let b = bytes[27usize];
13329                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13330                    })
13331                    || ({
13332                        let b = bytes[28usize];
13333                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13334                    })
13335                    || ({
13336                        let b = bytes[29usize];
13337                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13338                    })
13339                    || ({
13340                        let b = bytes[30usize];
13341                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13342                    })
13343                    || ({
13344                        let b = bytes[31usize];
13345                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13346                    })
13347                    || ({
13348                        let b = bytes[32usize];
13349                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13350                    })
13351                    || ({
13352                        let b = bytes[33usize];
13353                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13354                    })
13355                    || ({
13356                        let b = bytes[34usize];
13357                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13358                    })
13359                    || ({
13360                        let b = bytes[35usize];
13361                        !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13362                    })
13363            };
13364            if violated {
13365                violations
13366                    .push(crate::common::validate::ConstraintViolation {
13367                        path: path.to_string(),
13368                        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}"
13369                            .to_string(),
13370                        kind: crate::common::validate::ConstraintKind::Pattern,
13371                    });
13372            }
13373        }
13374    }
13375}
13376impl crate::common::validate::Validatable for AccountIdentification4Choice {
13377    fn validate_constraints(
13378        &self,
13379        path: &str,
13380        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13381    ) {
13382        match self {
13383            Self::IBAN(inner) => {
13384                let snap = violations.len();
13385                inner.validate_constraints("", violations);
13386                if violations.len() > snap {
13387                    let pfx = format!("{path}/IBAN");
13388                    for v in &mut violations[snap..] {
13389                        v.path.insert_str(0, &pfx);
13390                    }
13391                }
13392            }
13393            Self::Othr(inner) => {
13394                let snap = violations.len();
13395                inner.validate_constraints("", violations);
13396                if violations.len() > snap {
13397                    let pfx = format!("{path}/Othr");
13398                    for v in &mut violations[snap..] {
13399                        v.path.insert_str(0, &pfx);
13400                    }
13401                }
13402            }
13403        }
13404    }
13405}
13406impl crate::common::validate::Validatable for AccountSchemeName1Choice {
13407    fn validate_constraints(
13408        &self,
13409        path: &str,
13410        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13411    ) {
13412        match self {
13413            Self::Cd(inner) => {
13414                let snap = violations.len();
13415                inner.validate_constraints("", violations);
13416                if violations.len() > snap {
13417                    let pfx = format!("{path}/Cd");
13418                    for v in &mut violations[snap..] {
13419                        v.path.insert_str(0, &pfx);
13420                    }
13421                }
13422            }
13423            Self::Prtry(inner) => {
13424                let snap = violations.len();
13425                inner.validate_constraints("", violations);
13426                if violations.len() > snap {
13427                    let pfx = format!("{path}/Prtry");
13428                    for v in &mut violations[snap..] {
13429                        v.path.insert_str(0, &pfx);
13430                    }
13431                }
13432            }
13433        }
13434    }
13435}
13436impl crate::common::validate::Validatable for ActiveCurrencyAndAmount {
13437    fn validate_constraints(
13438        &self,
13439        path: &str,
13440        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13441    ) {
13442        self.value.validate_constraints(path, violations);
13443        {
13444            let snap = violations.len();
13445            self.ccy.validate_constraints("", violations);
13446            if violations.len() > snap {
13447                let pfx = format!("{path}/@Ccy");
13448                for v in &mut violations[snap..] {
13449                    v.path.insert_str(0, &pfx);
13450                }
13451            }
13452        }
13453    }
13454}
13455impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmount {
13456    fn validate_constraints(
13457        &self,
13458        path: &str,
13459        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13460    ) {
13461        self.value.validate_constraints(path, violations);
13462        {
13463            let snap = violations.len();
13464            self.ccy.validate_constraints("", violations);
13465            if violations.len() > snap {
13466                let pfx = format!("{path}/@Ccy");
13467                for v in &mut violations[snap..] {
13468                    v.path.insert_str(0, &pfx);
13469                }
13470            }
13471        }
13472    }
13473}
13474impl crate::common::validate::Validatable for AddressType3Choice {
13475    fn validate_constraints(
13476        &self,
13477        path: &str,
13478        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13479    ) {
13480        match self {
13481            Self::Cd(inner) => {
13482                let snap = violations.len();
13483                inner.validate_constraints("", violations);
13484                if violations.len() > snap {
13485                    let pfx = format!("{path}/Cd");
13486                    for v in &mut violations[snap..] {
13487                        v.path.insert_str(0, &pfx);
13488                    }
13489                }
13490            }
13491            Self::Prtry(inner) => {
13492                let snap = violations.len();
13493                inner.validate_constraints("", violations);
13494                if violations.len() > snap {
13495                    let pfx = format!("{path}/Prtry");
13496                    for v in &mut violations[snap..] {
13497                        v.path.insert_str(0, &pfx);
13498                    }
13499                }
13500            }
13501        }
13502    }
13503}
13504impl crate::common::validate::Validatable for AmendmentInformationDetails14 {
13505    fn validate_constraints(
13506        &self,
13507        path: &str,
13508        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13509    ) {
13510        if let Some(ref val) = self.orgnl_mndt_id {
13511            let snap = violations.len();
13512            val.validate_constraints("", violations);
13513            if violations.len() > snap {
13514                let pfx = format!("{path}/OrgnlMndtId");
13515                for v in &mut violations[snap..] {
13516                    v.path.insert_str(0, &pfx);
13517                }
13518            }
13519        }
13520        if let Some(ref val) = self.orgnl_cdtr_schme_id {
13521            let snap = violations.len();
13522            val.validate_constraints("", violations);
13523            if violations.len() > snap {
13524                let pfx = format!("{path}/OrgnlCdtrSchmeId");
13525                for v in &mut violations[snap..] {
13526                    v.path.insert_str(0, &pfx);
13527                }
13528            }
13529        }
13530        if let Some(ref val) = self.orgnl_cdtr_agt {
13531            let snap = violations.len();
13532            val.validate_constraints("", violations);
13533            if violations.len() > snap {
13534                let pfx = format!("{path}/OrgnlCdtrAgt");
13535                for v in &mut violations[snap..] {
13536                    v.path.insert_str(0, &pfx);
13537                }
13538            }
13539        }
13540        if let Some(ref val) = self.orgnl_cdtr_agt_acct {
13541            let snap = violations.len();
13542            val.validate_constraints("", violations);
13543            if violations.len() > snap {
13544                let pfx = format!("{path}/OrgnlCdtrAgtAcct");
13545                for v in &mut violations[snap..] {
13546                    v.path.insert_str(0, &pfx);
13547                }
13548            }
13549        }
13550        if let Some(ref val) = self.orgnl_dbtr {
13551            let snap = violations.len();
13552            val.validate_constraints("", violations);
13553            if violations.len() > snap {
13554                let pfx = format!("{path}/OrgnlDbtr");
13555                for v in &mut violations[snap..] {
13556                    v.path.insert_str(0, &pfx);
13557                }
13558            }
13559        }
13560        if let Some(ref val) = self.orgnl_dbtr_acct {
13561            let snap = violations.len();
13562            val.validate_constraints("", violations);
13563            if violations.len() > snap {
13564                let pfx = format!("{path}/OrgnlDbtrAcct");
13565                for v in &mut violations[snap..] {
13566                    v.path.insert_str(0, &pfx);
13567                }
13568            }
13569        }
13570        if let Some(ref val) = self.orgnl_dbtr_agt {
13571            let snap = violations.len();
13572            val.validate_constraints("", violations);
13573            if violations.len() > snap {
13574                let pfx = format!("{path}/OrgnlDbtrAgt");
13575                for v in &mut violations[snap..] {
13576                    v.path.insert_str(0, &pfx);
13577                }
13578            }
13579        }
13580        if let Some(ref val) = self.orgnl_dbtr_agt_acct {
13581            let snap = violations.len();
13582            val.validate_constraints("", violations);
13583            if violations.len() > snap {
13584                let pfx = format!("{path}/OrgnlDbtrAgtAcct");
13585                for v in &mut violations[snap..] {
13586                    v.path.insert_str(0, &pfx);
13587                }
13588            }
13589        }
13590        if let Some(ref val) = self.orgnl_fnl_colltn_dt {
13591            let snap = violations.len();
13592            val.validate_constraints("", violations);
13593            if violations.len() > snap {
13594                let pfx = format!("{path}/OrgnlFnlColltnDt");
13595                for v in &mut violations[snap..] {
13596                    v.path.insert_str(0, &pfx);
13597                }
13598            }
13599        }
13600        if let Some(ref wrapper) = self.orgnl_frqcy {
13601            let snap = violations.len();
13602            wrapper.inner.validate_constraints("", violations);
13603            if violations.len() > snap {
13604                let pfx = format!("{path}/OrgnlFrqcy");
13605                for v in &mut violations[snap..] {
13606                    v.path.insert_str(0, &pfx);
13607                }
13608            }
13609        }
13610        if let Some(ref wrapper) = self.orgnl_rsn {
13611            let snap = violations.len();
13612            wrapper.inner.validate_constraints("", violations);
13613            if violations.len() > snap {
13614                let pfx = format!("{path}/OrgnlRsn");
13615                for v in &mut violations[snap..] {
13616                    v.path.insert_str(0, &pfx);
13617                }
13618            }
13619        }
13620        if let Some(ref val) = self.orgnl_trckg_days {
13621            let snap = violations.len();
13622            val.validate_constraints("", violations);
13623            if violations.len() > snap {
13624                let pfx = format!("{path}/OrgnlTrckgDays");
13625                for v in &mut violations[snap..] {
13626                    v.path.insert_str(0, &pfx);
13627                }
13628            }
13629        }
13630    }
13631}
13632impl crate::common::validate::Validatable for AmountType4Choice {
13633    fn validate_constraints(
13634        &self,
13635        path: &str,
13636        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13637    ) {
13638        match self {
13639            Self::InstdAmt(inner) => {
13640                let snap = violations.len();
13641                inner.validate_constraints("", violations);
13642                if violations.len() > snap {
13643                    let pfx = format!("{path}/InstdAmt");
13644                    for v in &mut violations[snap..] {
13645                        v.path.insert_str(0, &pfx);
13646                    }
13647                }
13648            }
13649            Self::EqvtAmt(inner) => {
13650                let snap = violations.len();
13651                inner.validate_constraints("", violations);
13652                if violations.len() > snap {
13653                    let pfx = format!("{path}/EqvtAmt");
13654                    for v in &mut violations[snap..] {
13655                        v.path.insert_str(0, &pfx);
13656                    }
13657                }
13658            }
13659        }
13660    }
13661}
13662impl crate::common::validate::Validatable for Authorisation1Choice {
13663    fn validate_constraints(
13664        &self,
13665        path: &str,
13666        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13667    ) {
13668        match self {
13669            Self::Cd(inner) => {
13670                let snap = violations.len();
13671                inner.validate_constraints("", violations);
13672                if violations.len() > snap {
13673                    let pfx = format!("{path}/Cd");
13674                    for v in &mut violations[snap..] {
13675                        v.path.insert_str(0, &pfx);
13676                    }
13677                }
13678            }
13679            Self::Prtry(inner) => {
13680                let snap = violations.len();
13681                inner.validate_constraints("", violations);
13682                if violations.len() > snap {
13683                    let pfx = format!("{path}/Prtry");
13684                    for v in &mut violations[snap..] {
13685                        v.path.insert_str(0, &pfx);
13686                    }
13687                }
13688            }
13689        }
13690    }
13691}
13692impl crate::common::validate::Validatable for BranchAndFinancialInstitutionIdentification6 {
13693    fn validate_constraints(
13694        &self,
13695        path: &str,
13696        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13697    ) {
13698        {
13699            let snap = violations.len();
13700            self.fin_instn_id.validate_constraints("", violations);
13701            if violations.len() > snap {
13702                let pfx = format!("{path}/FinInstnId");
13703                for v in &mut violations[snap..] {
13704                    v.path.insert_str(0, &pfx);
13705                }
13706            }
13707        }
13708        if let Some(ref val) = self.brnch_id {
13709            let snap = violations.len();
13710            val.validate_constraints("", violations);
13711            if violations.len() > snap {
13712                let pfx = format!("{path}/BrnchId");
13713                for v in &mut violations[snap..] {
13714                    v.path.insert_str(0, &pfx);
13715                }
13716            }
13717        }
13718    }
13719}
13720impl crate::common::validate::Validatable for BranchData3 {
13721    fn validate_constraints(
13722        &self,
13723        path: &str,
13724        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13725    ) {
13726        if let Some(ref val) = self.id {
13727            let snap = violations.len();
13728            val.validate_constraints("", violations);
13729            if violations.len() > snap {
13730                let pfx = format!("{path}/Id");
13731                for v in &mut violations[snap..] {
13732                    v.path.insert_str(0, &pfx);
13733                }
13734            }
13735        }
13736        if let Some(ref val) = self.lei {
13737            let snap = violations.len();
13738            val.validate_constraints("", violations);
13739            if violations.len() > snap {
13740                let pfx = format!("{path}/LEI");
13741                for v in &mut violations[snap..] {
13742                    v.path.insert_str(0, &pfx);
13743                }
13744            }
13745        }
13746        if let Some(ref val) = self.nm {
13747            let snap = violations.len();
13748            val.validate_constraints("", violations);
13749            if violations.len() > snap {
13750                let pfx = format!("{path}/Nm");
13751                for v in &mut violations[snap..] {
13752                    v.path.insert_str(0, &pfx);
13753                }
13754            }
13755        }
13756        if let Some(ref val) = self.pstl_adr {
13757            let snap = violations.len();
13758            val.validate_constraints("", violations);
13759            if violations.len() > snap {
13760                let pfx = format!("{path}/PstlAdr");
13761                for v in &mut violations[snap..] {
13762                    v.path.insert_str(0, &pfx);
13763                }
13764            }
13765        }
13766    }
13767}
13768impl crate::common::validate::Validatable for CashAccount40 {
13769    fn validate_constraints(
13770        &self,
13771        path: &str,
13772        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13773    ) {
13774        if let Some(ref wrapper) = self.id {
13775            let snap = violations.len();
13776            wrapper.inner.validate_constraints("", violations);
13777            if violations.len() > snap {
13778                let pfx = format!("{path}/Id");
13779                for v in &mut violations[snap..] {
13780                    v.path.insert_str(0, &pfx);
13781                }
13782            }
13783        }
13784        if let Some(ref wrapper) = self.tp {
13785            let snap = violations.len();
13786            wrapper.inner.validate_constraints("", violations);
13787            if violations.len() > snap {
13788                let pfx = format!("{path}/Tp");
13789                for v in &mut violations[snap..] {
13790                    v.path.insert_str(0, &pfx);
13791                }
13792            }
13793        }
13794        if let Some(ref val) = self.ccy {
13795            let snap = violations.len();
13796            val.validate_constraints("", violations);
13797            if violations.len() > snap {
13798                let pfx = format!("{path}/Ccy");
13799                for v in &mut violations[snap..] {
13800                    v.path.insert_str(0, &pfx);
13801                }
13802            }
13803        }
13804        if let Some(ref val) = self.nm {
13805            let snap = violations.len();
13806            val.validate_constraints("", violations);
13807            if violations.len() > snap {
13808                let pfx = format!("{path}/Nm");
13809                for v in &mut violations[snap..] {
13810                    v.path.insert_str(0, &pfx);
13811                }
13812            }
13813        }
13814        if let Some(ref val) = self.prxy {
13815            let snap = violations.len();
13816            val.validate_constraints("", violations);
13817            if violations.len() > snap {
13818                let pfx = format!("{path}/Prxy");
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 CashAccountType2Choice {
13827    fn validate_constraints(
13828        &self,
13829        path: &str,
13830        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13831    ) {
13832        match self {
13833            Self::Cd(inner) => {
13834                let snap = violations.len();
13835                inner.validate_constraints("", violations);
13836                if violations.len() > snap {
13837                    let pfx = format!("{path}/Cd");
13838                    for v in &mut violations[snap..] {
13839                        v.path.insert_str(0, &pfx);
13840                    }
13841                }
13842            }
13843            Self::Prtry(inner) => {
13844                let snap = violations.len();
13845                inner.validate_constraints("", violations);
13846                if violations.len() > snap {
13847                    let pfx = format!("{path}/Prtry");
13848                    for v in &mut violations[snap..] {
13849                        v.path.insert_str(0, &pfx);
13850                    }
13851                }
13852            }
13853        }
13854    }
13855}
13856impl crate::common::validate::Validatable for CategoryPurpose1Choice {
13857    fn validate_constraints(
13858        &self,
13859        path: &str,
13860        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13861    ) {
13862        match self {
13863            Self::Cd(inner) => {
13864                let snap = violations.len();
13865                inner.validate_constraints("", violations);
13866                if violations.len() > snap {
13867                    let pfx = format!("{path}/Cd");
13868                    for v in &mut violations[snap..] {
13869                        v.path.insert_str(0, &pfx);
13870                    }
13871                }
13872            }
13873            Self::Prtry(inner) => {
13874                let snap = violations.len();
13875                inner.validate_constraints("", violations);
13876                if violations.len() > snap {
13877                    let pfx = format!("{path}/Prtry");
13878                    for v in &mut violations[snap..] {
13879                        v.path.insert_str(0, &pfx);
13880                    }
13881                }
13882            }
13883        }
13884    }
13885}
13886impl crate::common::validate::Validatable for Charges7 {
13887    fn validate_constraints(
13888        &self,
13889        path: &str,
13890        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13891    ) {
13892        {
13893            let snap = violations.len();
13894            self.amt.validate_constraints("", violations);
13895            if violations.len() > snap {
13896                let pfx = format!("{path}/Amt");
13897                for v in &mut violations[snap..] {
13898                    v.path.insert_str(0, &pfx);
13899                }
13900            }
13901        }
13902        {
13903            let snap = violations.len();
13904            self.agt.validate_constraints("", violations);
13905            if violations.len() > snap {
13906                let pfx = format!("{path}/Agt");
13907                for v in &mut violations[snap..] {
13908                    v.path.insert_str(0, &pfx);
13909                }
13910            }
13911        }
13912    }
13913}
13914impl crate::common::validate::Validatable for ClearingSystemIdentification2Choice {
13915    fn validate_constraints(
13916        &self,
13917        path: &str,
13918        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13919    ) {
13920        match self {
13921            Self::Cd(inner) => {
13922                let snap = violations.len();
13923                inner.validate_constraints("", violations);
13924                if violations.len() > snap {
13925                    let pfx = format!("{path}/Cd");
13926                    for v in &mut violations[snap..] {
13927                        v.path.insert_str(0, &pfx);
13928                    }
13929                }
13930            }
13931            Self::Prtry(inner) => {
13932                let snap = violations.len();
13933                inner.validate_constraints("", violations);
13934                if violations.len() > snap {
13935                    let pfx = format!("{path}/Prtry");
13936                    for v in &mut violations[snap..] {
13937                        v.path.insert_str(0, &pfx);
13938                    }
13939                }
13940            }
13941        }
13942    }
13943}
13944impl crate::common::validate::Validatable for ClearingSystemIdentification3Choice {
13945    fn validate_constraints(
13946        &self,
13947        path: &str,
13948        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13949    ) {
13950        match self {
13951            Self::Cd(inner) => {
13952                let snap = violations.len();
13953                inner.validate_constraints("", violations);
13954                if violations.len() > snap {
13955                    let pfx = format!("{path}/Cd");
13956                    for v in &mut violations[snap..] {
13957                        v.path.insert_str(0, &pfx);
13958                    }
13959                }
13960            }
13961            Self::Prtry(inner) => {
13962                let snap = violations.len();
13963                inner.validate_constraints("", violations);
13964                if violations.len() > snap {
13965                    let pfx = format!("{path}/Prtry");
13966                    for v in &mut violations[snap..] {
13967                        v.path.insert_str(0, &pfx);
13968                    }
13969                }
13970            }
13971        }
13972    }
13973}
13974impl crate::common::validate::Validatable for ClearingSystemMemberIdentification2 {
13975    fn validate_constraints(
13976        &self,
13977        path: &str,
13978        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13979    ) {
13980        if let Some(ref wrapper) = self.clr_sys_id {
13981            let snap = violations.len();
13982            wrapper.inner.validate_constraints("", violations);
13983            if violations.len() > snap {
13984                let pfx = format!("{path}/ClrSysId");
13985                for v in &mut violations[snap..] {
13986                    v.path.insert_str(0, &pfx);
13987                }
13988            }
13989        }
13990        {
13991            let snap = violations.len();
13992            self.mmb_id.validate_constraints("", violations);
13993            if violations.len() > snap {
13994                let pfx = format!("{path}/MmbId");
13995                for v in &mut violations[snap..] {
13996                    v.path.insert_str(0, &pfx);
13997                }
13998            }
13999        }
14000    }
14001}
14002impl crate::common::validate::Validatable for Contact4 {
14003    fn validate_constraints(
14004        &self,
14005        path: &str,
14006        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14007    ) {
14008        if let Some(ref val) = self.nm_prfx {
14009            let snap = violations.len();
14010            val.validate_constraints("", violations);
14011            if violations.len() > snap {
14012                let pfx = format!("{path}/NmPrfx");
14013                for v in &mut violations[snap..] {
14014                    v.path.insert_str(0, &pfx);
14015                }
14016            }
14017        }
14018        if let Some(ref val) = self.nm {
14019            let snap = violations.len();
14020            val.validate_constraints("", violations);
14021            if violations.len() > snap {
14022                let pfx = format!("{path}/Nm");
14023                for v in &mut violations[snap..] {
14024                    v.path.insert_str(0, &pfx);
14025                }
14026            }
14027        }
14028        if let Some(ref val) = self.phne_nb {
14029            let snap = violations.len();
14030            val.validate_constraints("", violations);
14031            if violations.len() > snap {
14032                let pfx = format!("{path}/PhneNb");
14033                for v in &mut violations[snap..] {
14034                    v.path.insert_str(0, &pfx);
14035                }
14036            }
14037        }
14038        if let Some(ref val) = self.mob_nb {
14039            let snap = violations.len();
14040            val.validate_constraints("", violations);
14041            if violations.len() > snap {
14042                let pfx = format!("{path}/MobNb");
14043                for v in &mut violations[snap..] {
14044                    v.path.insert_str(0, &pfx);
14045                }
14046            }
14047        }
14048        if let Some(ref val) = self.fax_nb {
14049            let snap = violations.len();
14050            val.validate_constraints("", violations);
14051            if violations.len() > snap {
14052                let pfx = format!("{path}/FaxNb");
14053                for v in &mut violations[snap..] {
14054                    v.path.insert_str(0, &pfx);
14055                }
14056            }
14057        }
14058        if let Some(ref val) = self.email_adr {
14059            let snap = violations.len();
14060            val.validate_constraints("", violations);
14061            if violations.len() > snap {
14062                let pfx = format!("{path}/EmailAdr");
14063                for v in &mut violations[snap..] {
14064                    v.path.insert_str(0, &pfx);
14065                }
14066            }
14067        }
14068        if let Some(ref val) = self.email_purp {
14069            let snap = violations.len();
14070            val.validate_constraints("", violations);
14071            if violations.len() > snap {
14072                let pfx = format!("{path}/EmailPurp");
14073                for v in &mut violations[snap..] {
14074                    v.path.insert_str(0, &pfx);
14075                }
14076            }
14077        }
14078        if let Some(ref val) = self.job_titl {
14079            let snap = violations.len();
14080            val.validate_constraints("", violations);
14081            if violations.len() > snap {
14082                let pfx = format!("{path}/JobTitl");
14083                for v in &mut violations[snap..] {
14084                    v.path.insert_str(0, &pfx);
14085                }
14086            }
14087        }
14088        if let Some(ref val) = self.rspnsblty {
14089            let snap = violations.len();
14090            val.validate_constraints("", violations);
14091            if violations.len() > snap {
14092                let pfx = format!("{path}/Rspnsblty");
14093                for v in &mut violations[snap..] {
14094                    v.path.insert_str(0, &pfx);
14095                }
14096            }
14097        }
14098        if let Some(ref val) = self.dept {
14099            let snap = violations.len();
14100            val.validate_constraints("", violations);
14101            if violations.len() > snap {
14102                let pfx = format!("{path}/Dept");
14103                for v in &mut violations[snap..] {
14104                    v.path.insert_str(0, &pfx);
14105                }
14106            }
14107        }
14108        for (idx, elem) in self.othr.iter().enumerate() {
14109            let snap = violations.len();
14110            elem.validate_constraints("", violations);
14111            if violations.len() > snap {
14112                let pfx = format!("{path}/Othr[{idx}]");
14113                for v in &mut violations[snap..] {
14114                    v.path.insert_str(0, &pfx);
14115                }
14116            }
14117        }
14118        if let Some(ref val) = self.prefrd_mtd {
14119            let snap = violations.len();
14120            val.validate_constraints("", violations);
14121            if violations.len() > snap {
14122                let pfx = format!("{path}/PrefrdMtd");
14123                for v in &mut violations[snap..] {
14124                    v.path.insert_str(0, &pfx);
14125                }
14126            }
14127        }
14128    }
14129}
14130impl crate::common::validate::Validatable for CreditTransferMandateData1 {
14131    fn validate_constraints(
14132        &self,
14133        path: &str,
14134        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14135    ) {
14136        if let Some(ref val) = self.mndt_id {
14137            let snap = violations.len();
14138            val.validate_constraints("", violations);
14139            if violations.len() > snap {
14140                let pfx = format!("{path}/MndtId");
14141                for v in &mut violations[snap..] {
14142                    v.path.insert_str(0, &pfx);
14143                }
14144            }
14145        }
14146        if let Some(ref val) = self.tp {
14147            let snap = violations.len();
14148            val.validate_constraints("", violations);
14149            if violations.len() > snap {
14150                let pfx = format!("{path}/Tp");
14151                for v in &mut violations[snap..] {
14152                    v.path.insert_str(0, &pfx);
14153                }
14154            }
14155        }
14156        if let Some(ref val) = self.dt_of_sgntr {
14157            let snap = violations.len();
14158            val.validate_constraints("", violations);
14159            if violations.len() > snap {
14160                let pfx = format!("{path}/DtOfSgntr");
14161                for v in &mut violations[snap..] {
14162                    v.path.insert_str(0, &pfx);
14163                }
14164            }
14165        }
14166        if let Some(ref val) = self.dt_of_vrfctn {
14167            let snap = violations.len();
14168            val.validate_constraints("", violations);
14169            if violations.len() > snap {
14170                let pfx = format!("{path}/DtOfVrfctn");
14171                for v in &mut violations[snap..] {
14172                    v.path.insert_str(0, &pfx);
14173                }
14174            }
14175        }
14176        if let Some(ref val) = self.elctrnc_sgntr {
14177            let snap = violations.len();
14178            val.validate_constraints("", violations);
14179            if violations.len() > snap {
14180                let pfx = format!("{path}/ElctrncSgntr");
14181                for v in &mut violations[snap..] {
14182                    v.path.insert_str(0, &pfx);
14183                }
14184            }
14185        }
14186        if let Some(ref val) = self.frst_pmt_dt {
14187            let snap = violations.len();
14188            val.validate_constraints("", violations);
14189            if violations.len() > snap {
14190                let pfx = format!("{path}/FrstPmtDt");
14191                for v in &mut violations[snap..] {
14192                    v.path.insert_str(0, &pfx);
14193                }
14194            }
14195        }
14196        if let Some(ref val) = self.fnl_pmt_dt {
14197            let snap = violations.len();
14198            val.validate_constraints("", violations);
14199            if violations.len() > snap {
14200                let pfx = format!("{path}/FnlPmtDt");
14201                for v in &mut violations[snap..] {
14202                    v.path.insert_str(0, &pfx);
14203                }
14204            }
14205        }
14206        if let Some(ref wrapper) = self.frqcy {
14207            let snap = violations.len();
14208            wrapper.inner.validate_constraints("", violations);
14209            if violations.len() > snap {
14210                let pfx = format!("{path}/Frqcy");
14211                for v in &mut violations[snap..] {
14212                    v.path.insert_str(0, &pfx);
14213                }
14214            }
14215        }
14216        if let Some(ref wrapper) = self.rsn {
14217            let snap = violations.len();
14218            wrapper.inner.validate_constraints("", violations);
14219            if violations.len() > snap {
14220                let pfx = format!("{path}/Rsn");
14221                for v in &mut violations[snap..] {
14222                    v.path.insert_str(0, &pfx);
14223                }
14224            }
14225        }
14226    }
14227}
14228impl crate::common::validate::Validatable for CreditTransferTransaction52 {
14229    fn validate_constraints(
14230        &self,
14231        path: &str,
14232        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14233    ) {
14234        if let Some(ref val) = self.ultmt_dbtr {
14235            let snap = violations.len();
14236            val.validate_constraints("", violations);
14237            if violations.len() > snap {
14238                let pfx = format!("{path}/UltmtDbtr");
14239                for v in &mut violations[snap..] {
14240                    v.path.insert_str(0, &pfx);
14241                }
14242            }
14243        }
14244        if let Some(ref val) = self.initg_pty {
14245            let snap = violations.len();
14246            val.validate_constraints("", violations);
14247            if violations.len() > snap {
14248                let pfx = format!("{path}/InitgPty");
14249                for v in &mut violations[snap..] {
14250                    v.path.insert_str(0, &pfx);
14251                }
14252            }
14253        }
14254        {
14255            let snap = violations.len();
14256            self.dbtr.validate_constraints("", violations);
14257            if violations.len() > snap {
14258                let pfx = format!("{path}/Dbtr");
14259                for v in &mut violations[snap..] {
14260                    v.path.insert_str(0, &pfx);
14261                }
14262            }
14263        }
14264        if let Some(ref val) = self.dbtr_acct {
14265            let snap = violations.len();
14266            val.validate_constraints("", violations);
14267            if violations.len() > snap {
14268                let pfx = format!("{path}/DbtrAcct");
14269                for v in &mut violations[snap..] {
14270                    v.path.insert_str(0, &pfx);
14271                }
14272            }
14273        }
14274        {
14275            let snap = violations.len();
14276            self.dbtr_agt.validate_constraints("", violations);
14277            if violations.len() > snap {
14278                let pfx = format!("{path}/DbtrAgt");
14279                for v in &mut violations[snap..] {
14280                    v.path.insert_str(0, &pfx);
14281                }
14282            }
14283        }
14284        if let Some(ref val) = self.dbtr_agt_acct {
14285            let snap = violations.len();
14286            val.validate_constraints("", violations);
14287            if violations.len() > snap {
14288                let pfx = format!("{path}/DbtrAgtAcct");
14289                for v in &mut violations[snap..] {
14290                    v.path.insert_str(0, &pfx);
14291                }
14292            }
14293        }
14294        if let Some(ref val) = self.prvs_instg_agt1 {
14295            let snap = violations.len();
14296            val.validate_constraints("", violations);
14297            if violations.len() > snap {
14298                let pfx = format!("{path}/PrvsInstgAgt1");
14299                for v in &mut violations[snap..] {
14300                    v.path.insert_str(0, &pfx);
14301                }
14302            }
14303        }
14304        if let Some(ref val) = self.prvs_instg_agt1acct {
14305            let snap = violations.len();
14306            val.validate_constraints("", violations);
14307            if violations.len() > snap {
14308                let pfx = format!("{path}/PrvsInstgAgt1Acct");
14309                for v in &mut violations[snap..] {
14310                    v.path.insert_str(0, &pfx);
14311                }
14312            }
14313        }
14314        if let Some(ref val) = self.prvs_instg_agt2 {
14315            let snap = violations.len();
14316            val.validate_constraints("", violations);
14317            if violations.len() > snap {
14318                let pfx = format!("{path}/PrvsInstgAgt2");
14319                for v in &mut violations[snap..] {
14320                    v.path.insert_str(0, &pfx);
14321                }
14322            }
14323        }
14324        if let Some(ref val) = self.prvs_instg_agt2acct {
14325            let snap = violations.len();
14326            val.validate_constraints("", violations);
14327            if violations.len() > snap {
14328                let pfx = format!("{path}/PrvsInstgAgt2Acct");
14329                for v in &mut violations[snap..] {
14330                    v.path.insert_str(0, &pfx);
14331                }
14332            }
14333        }
14334        if let Some(ref val) = self.prvs_instg_agt3 {
14335            let snap = violations.len();
14336            val.validate_constraints("", violations);
14337            if violations.len() > snap {
14338                let pfx = format!("{path}/PrvsInstgAgt3");
14339                for v in &mut violations[snap..] {
14340                    v.path.insert_str(0, &pfx);
14341                }
14342            }
14343        }
14344        if let Some(ref val) = self.prvs_instg_agt3acct {
14345            let snap = violations.len();
14346            val.validate_constraints("", violations);
14347            if violations.len() > snap {
14348                let pfx = format!("{path}/PrvsInstgAgt3Acct");
14349                for v in &mut violations[snap..] {
14350                    v.path.insert_str(0, &pfx);
14351                }
14352            }
14353        }
14354        if let Some(ref val) = self.intrmy_agt1 {
14355            let snap = violations.len();
14356            val.validate_constraints("", violations);
14357            if violations.len() > snap {
14358                let pfx = format!("{path}/IntrmyAgt1");
14359                for v in &mut violations[snap..] {
14360                    v.path.insert_str(0, &pfx);
14361                }
14362            }
14363        }
14364        if let Some(ref val) = self.intrmy_agt1acct {
14365            let snap = violations.len();
14366            val.validate_constraints("", violations);
14367            if violations.len() > snap {
14368                let pfx = format!("{path}/IntrmyAgt1Acct");
14369                for v in &mut violations[snap..] {
14370                    v.path.insert_str(0, &pfx);
14371                }
14372            }
14373        }
14374        if let Some(ref val) = self.intrmy_agt2 {
14375            let snap = violations.len();
14376            val.validate_constraints("", violations);
14377            if violations.len() > snap {
14378                let pfx = format!("{path}/IntrmyAgt2");
14379                for v in &mut violations[snap..] {
14380                    v.path.insert_str(0, &pfx);
14381                }
14382            }
14383        }
14384        if let Some(ref val) = self.intrmy_agt2acct {
14385            let snap = violations.len();
14386            val.validate_constraints("", violations);
14387            if violations.len() > snap {
14388                let pfx = format!("{path}/IntrmyAgt2Acct");
14389                for v in &mut violations[snap..] {
14390                    v.path.insert_str(0, &pfx);
14391                }
14392            }
14393        }
14394        if let Some(ref val) = self.intrmy_agt3 {
14395            let snap = violations.len();
14396            val.validate_constraints("", violations);
14397            if violations.len() > snap {
14398                let pfx = format!("{path}/IntrmyAgt3");
14399                for v in &mut violations[snap..] {
14400                    v.path.insert_str(0, &pfx);
14401                }
14402            }
14403        }
14404        if let Some(ref val) = self.intrmy_agt3acct {
14405            let snap = violations.len();
14406            val.validate_constraints("", violations);
14407            if violations.len() > snap {
14408                let pfx = format!("{path}/IntrmyAgt3Acct");
14409                for v in &mut violations[snap..] {
14410                    v.path.insert_str(0, &pfx);
14411                }
14412            }
14413        }
14414        {
14415            let snap = violations.len();
14416            self.cdtr_agt.validate_constraints("", violations);
14417            if violations.len() > snap {
14418                let pfx = format!("{path}/CdtrAgt");
14419                for v in &mut violations[snap..] {
14420                    v.path.insert_str(0, &pfx);
14421                }
14422            }
14423        }
14424        if let Some(ref val) = self.cdtr_agt_acct {
14425            let snap = violations.len();
14426            val.validate_constraints("", violations);
14427            if violations.len() > snap {
14428                let pfx = format!("{path}/CdtrAgtAcct");
14429                for v in &mut violations[snap..] {
14430                    v.path.insert_str(0, &pfx);
14431                }
14432            }
14433        }
14434        {
14435            let snap = violations.len();
14436            self.cdtr.validate_constraints("", violations);
14437            if violations.len() > snap {
14438                let pfx = format!("{path}/Cdtr");
14439                for v in &mut violations[snap..] {
14440                    v.path.insert_str(0, &pfx);
14441                }
14442            }
14443        }
14444        if let Some(ref val) = self.cdtr_acct {
14445            let snap = violations.len();
14446            val.validate_constraints("", violations);
14447            if violations.len() > snap {
14448                let pfx = format!("{path}/CdtrAcct");
14449                for v in &mut violations[snap..] {
14450                    v.path.insert_str(0, &pfx);
14451                }
14452            }
14453        }
14454        if let Some(ref val) = self.ultmt_cdtr {
14455            let snap = violations.len();
14456            val.validate_constraints("", violations);
14457            if violations.len() > snap {
14458                let pfx = format!("{path}/UltmtCdtr");
14459                for v in &mut violations[snap..] {
14460                    v.path.insert_str(0, &pfx);
14461                }
14462            }
14463        }
14464        for (idx, elem) in self.instr_for_cdtr_agt.iter().enumerate() {
14465            let snap = violations.len();
14466            elem.validate_constraints("", violations);
14467            if violations.len() > snap {
14468                let pfx = format!("{path}/InstrForCdtrAgt[{idx}]");
14469                for v in &mut violations[snap..] {
14470                    v.path.insert_str(0, &pfx);
14471                }
14472            }
14473        }
14474        for (idx, elem) in self.instr_for_nxt_agt.iter().enumerate() {
14475            let snap = violations.len();
14476            elem.validate_constraints("", violations);
14477            if violations.len() > snap {
14478                let pfx = format!("{path}/InstrForNxtAgt[{idx}]");
14479                for v in &mut violations[snap..] {
14480                    v.path.insert_str(0, &pfx);
14481                }
14482            }
14483        }
14484        if let Some(ref val) = self.tax {
14485            let snap = violations.len();
14486            val.validate_constraints("", violations);
14487            if violations.len() > snap {
14488                let pfx = format!("{path}/Tax");
14489                for v in &mut violations[snap..] {
14490                    v.path.insert_str(0, &pfx);
14491                }
14492            }
14493        }
14494        if let Some(ref val) = self.rmt_inf {
14495            let snap = violations.len();
14496            val.validate_constraints("", violations);
14497            if violations.len() > snap {
14498                let pfx = format!("{path}/RmtInf");
14499                for v in &mut violations[snap..] {
14500                    v.path.insert_str(0, &pfx);
14501                }
14502            }
14503        }
14504        if let Some(ref val) = self.instd_amt {
14505            let snap = violations.len();
14506            val.validate_constraints("", violations);
14507            if violations.len() > snap {
14508                let pfx = format!("{path}/InstdAmt");
14509                for v in &mut violations[snap..] {
14510                    v.path.insert_str(0, &pfx);
14511                }
14512            }
14513        }
14514    }
14515}
14516impl crate::common::validate::Validatable for CreditorReferenceInformation2 {
14517    fn validate_constraints(
14518        &self,
14519        path: &str,
14520        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14521    ) {
14522        if let Some(ref val) = self.tp {
14523            let snap = violations.len();
14524            val.validate_constraints("", violations);
14525            if violations.len() > snap {
14526                let pfx = format!("{path}/Tp");
14527                for v in &mut violations[snap..] {
14528                    v.path.insert_str(0, &pfx);
14529                }
14530            }
14531        }
14532        if let Some(ref val) = self.r#ref {
14533            let snap = violations.len();
14534            val.validate_constraints("", violations);
14535            if violations.len() > snap {
14536                let pfx = format!("{path}/Ref");
14537                for v in &mut violations[snap..] {
14538                    v.path.insert_str(0, &pfx);
14539                }
14540            }
14541        }
14542    }
14543}
14544impl crate::common::validate::Validatable for CreditorReferenceType1Choice {
14545    fn validate_constraints(
14546        &self,
14547        path: &str,
14548        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14549    ) {
14550        match self {
14551            Self::Cd(inner) => {
14552                let snap = violations.len();
14553                inner.validate_constraints("", violations);
14554                if violations.len() > snap {
14555                    let pfx = format!("{path}/Cd");
14556                    for v in &mut violations[snap..] {
14557                        v.path.insert_str(0, &pfx);
14558                    }
14559                }
14560            }
14561            Self::Prtry(inner) => {
14562                let snap = violations.len();
14563                inner.validate_constraints("", violations);
14564                if violations.len() > snap {
14565                    let pfx = format!("{path}/Prtry");
14566                    for v in &mut violations[snap..] {
14567                        v.path.insert_str(0, &pfx);
14568                    }
14569                }
14570            }
14571        }
14572    }
14573}
14574impl crate::common::validate::Validatable for CreditorReferenceType2 {
14575    fn validate_constraints(
14576        &self,
14577        path: &str,
14578        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14579    ) {
14580        {
14581            let snap = violations.len();
14582            self.cd_or_prtry.inner.validate_constraints("", violations);
14583            if violations.len() > snap {
14584                let pfx = format!("{path}/CdOrPrtry");
14585                for v in &mut violations[snap..] {
14586                    v.path.insert_str(0, &pfx);
14587                }
14588            }
14589        }
14590        if let Some(ref val) = self.issr {
14591            let snap = violations.len();
14592            val.validate_constraints("", violations);
14593            if violations.len() > snap {
14594                let pfx = format!("{path}/Issr");
14595                for v in &mut violations[snap..] {
14596                    v.path.insert_str(0, &pfx);
14597                }
14598            }
14599        }
14600    }
14601}
14602impl crate::common::validate::Validatable for DateAndDateTime2Choice {
14603    fn validate_constraints(
14604        &self,
14605        path: &str,
14606        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14607    ) {
14608        match self {
14609            Self::Dt(inner) => {
14610                let snap = violations.len();
14611                inner.validate_constraints("", violations);
14612                if violations.len() > snap {
14613                    let pfx = format!("{path}/Dt");
14614                    for v in &mut violations[snap..] {
14615                        v.path.insert_str(0, &pfx);
14616                    }
14617                }
14618            }
14619            Self::DtTm(inner) => {
14620                let snap = violations.len();
14621                inner.validate_constraints("", violations);
14622                if violations.len() > snap {
14623                    let pfx = format!("{path}/DtTm");
14624                    for v in &mut violations[snap..] {
14625                        v.path.insert_str(0, &pfx);
14626                    }
14627                }
14628            }
14629        }
14630    }
14631}
14632impl crate::common::validate::Validatable for DateAndPlaceOfBirth1 {
14633    fn validate_constraints(
14634        &self,
14635        path: &str,
14636        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14637    ) {
14638        {
14639            let snap = violations.len();
14640            self.birth_dt.validate_constraints("", violations);
14641            if violations.len() > snap {
14642                let pfx = format!("{path}/BirthDt");
14643                for v in &mut violations[snap..] {
14644                    v.path.insert_str(0, &pfx);
14645                }
14646            }
14647        }
14648        if let Some(ref val) = self.prvc_of_birth {
14649            let snap = violations.len();
14650            val.validate_constraints("", violations);
14651            if violations.len() > snap {
14652                let pfx = format!("{path}/PrvcOfBirth");
14653                for v in &mut violations[snap..] {
14654                    v.path.insert_str(0, &pfx);
14655                }
14656            }
14657        }
14658        {
14659            let snap = violations.len();
14660            self.city_of_birth.validate_constraints("", violations);
14661            if violations.len() > snap {
14662                let pfx = format!("{path}/CityOfBirth");
14663                for v in &mut violations[snap..] {
14664                    v.path.insert_str(0, &pfx);
14665                }
14666            }
14667        }
14668        {
14669            let snap = violations.len();
14670            self.ctry_of_birth.validate_constraints("", violations);
14671            if violations.len() > snap {
14672                let pfx = format!("{path}/CtryOfBirth");
14673                for v in &mut violations[snap..] {
14674                    v.path.insert_str(0, &pfx);
14675                }
14676            }
14677        }
14678    }
14679}
14680impl crate::common::validate::Validatable for DatePeriod2 {
14681    fn validate_constraints(
14682        &self,
14683        path: &str,
14684        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14685    ) {
14686        {
14687            let snap = violations.len();
14688            self.fr_dt.validate_constraints("", violations);
14689            if violations.len() > snap {
14690                let pfx = format!("{path}/FrDt");
14691                for v in &mut violations[snap..] {
14692                    v.path.insert_str(0, &pfx);
14693                }
14694            }
14695        }
14696        {
14697            let snap = violations.len();
14698            self.to_dt.validate_constraints("", violations);
14699            if violations.len() > snap {
14700                let pfx = format!("{path}/ToDt");
14701                for v in &mut violations[snap..] {
14702                    v.path.insert_str(0, &pfx);
14703                }
14704            }
14705        }
14706    }
14707}
14708impl crate::common::validate::Validatable for DiscountAmountAndType1 {
14709    fn validate_constraints(
14710        &self,
14711        path: &str,
14712        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14713    ) {
14714        if let Some(ref wrapper) = self.tp {
14715            let snap = violations.len();
14716            wrapper.inner.validate_constraints("", violations);
14717            if violations.len() > snap {
14718                let pfx = format!("{path}/Tp");
14719                for v in &mut violations[snap..] {
14720                    v.path.insert_str(0, &pfx);
14721                }
14722            }
14723        }
14724        {
14725            let snap = violations.len();
14726            self.amt.validate_constraints("", violations);
14727            if violations.len() > snap {
14728                let pfx = format!("{path}/Amt");
14729                for v in &mut violations[snap..] {
14730                    v.path.insert_str(0, &pfx);
14731                }
14732            }
14733        }
14734    }
14735}
14736impl crate::common::validate::Validatable for DiscountAmountType1Choice {
14737    fn validate_constraints(
14738        &self,
14739        path: &str,
14740        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14741    ) {
14742        match self {
14743            Self::Cd(inner) => {
14744                let snap = violations.len();
14745                inner.validate_constraints("", violations);
14746                if violations.len() > snap {
14747                    let pfx = format!("{path}/Cd");
14748                    for v in &mut violations[snap..] {
14749                        v.path.insert_str(0, &pfx);
14750                    }
14751                }
14752            }
14753            Self::Prtry(inner) => {
14754                let snap = violations.len();
14755                inner.validate_constraints("", violations);
14756                if violations.len() > snap {
14757                    let pfx = format!("{path}/Prtry");
14758                    for v in &mut violations[snap..] {
14759                        v.path.insert_str(0, &pfx);
14760                    }
14761                }
14762            }
14763        }
14764    }
14765}
14766impl crate::common::validate::Validatable for Document {
14767    fn validate_constraints(
14768        &self,
14769        path: &str,
14770        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14771    ) {
14772        {
14773            let snap = violations.len();
14774            self.pmt_rtr.validate_constraints("", violations);
14775            if violations.len() > snap {
14776                let pfx = format!("{path}/PmtRtr");
14777                for v in &mut violations[snap..] {
14778                    v.path.insert_str(0, &pfx);
14779                }
14780            }
14781        }
14782    }
14783}
14784impl crate::common::validate::Validatable for DocumentAdjustment1 {
14785    fn validate_constraints(
14786        &self,
14787        path: &str,
14788        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14789    ) {
14790        {
14791            let snap = violations.len();
14792            self.amt.validate_constraints("", violations);
14793            if violations.len() > snap {
14794                let pfx = format!("{path}/Amt");
14795                for v in &mut violations[snap..] {
14796                    v.path.insert_str(0, &pfx);
14797                }
14798            }
14799        }
14800        if let Some(ref val) = self.cdt_dbt_ind {
14801            let snap = violations.len();
14802            val.validate_constraints("", violations);
14803            if violations.len() > snap {
14804                let pfx = format!("{path}/CdtDbtInd");
14805                for v in &mut violations[snap..] {
14806                    v.path.insert_str(0, &pfx);
14807                }
14808            }
14809        }
14810        if let Some(ref val) = self.rsn {
14811            let snap = violations.len();
14812            val.validate_constraints("", violations);
14813            if violations.len() > snap {
14814                let pfx = format!("{path}/Rsn");
14815                for v in &mut violations[snap..] {
14816                    v.path.insert_str(0, &pfx);
14817                }
14818            }
14819        }
14820        if let Some(ref val) = self.addtl_inf {
14821            let snap = violations.len();
14822            val.validate_constraints("", violations);
14823            if violations.len() > snap {
14824                let pfx = format!("{path}/AddtlInf");
14825                for v in &mut violations[snap..] {
14826                    v.path.insert_str(0, &pfx);
14827                }
14828            }
14829        }
14830    }
14831}
14832impl crate::common::validate::Validatable for DocumentLineIdentification1 {
14833    fn validate_constraints(
14834        &self,
14835        path: &str,
14836        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14837    ) {
14838        if let Some(ref val) = self.tp {
14839            let snap = violations.len();
14840            val.validate_constraints("", violations);
14841            if violations.len() > snap {
14842                let pfx = format!("{path}/Tp");
14843                for v in &mut violations[snap..] {
14844                    v.path.insert_str(0, &pfx);
14845                }
14846            }
14847        }
14848        if let Some(ref val) = self.nb {
14849            let snap = violations.len();
14850            val.validate_constraints("", violations);
14851            if violations.len() > snap {
14852                let pfx = format!("{path}/Nb");
14853                for v in &mut violations[snap..] {
14854                    v.path.insert_str(0, &pfx);
14855                }
14856            }
14857        }
14858        if let Some(ref val) = self.rltd_dt {
14859            let snap = violations.len();
14860            val.validate_constraints("", violations);
14861            if violations.len() > snap {
14862                let pfx = format!("{path}/RltdDt");
14863                for v in &mut violations[snap..] {
14864                    v.path.insert_str(0, &pfx);
14865                }
14866            }
14867        }
14868    }
14869}
14870impl crate::common::validate::Validatable for DocumentLineInformation1 {
14871    fn validate_constraints(
14872        &self,
14873        path: &str,
14874        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14875    ) {
14876        for (idx, elem) in self.id.iter().enumerate() {
14877            let snap = violations.len();
14878            elem.validate_constraints("", violations);
14879            if violations.len() > snap {
14880                let pfx = format!("{path}/Id[{idx}]");
14881                for v in &mut violations[snap..] {
14882                    v.path.insert_str(0, &pfx);
14883                }
14884            }
14885        }
14886        if let Some(ref val) = self.desc {
14887            let snap = violations.len();
14888            val.validate_constraints("", violations);
14889            if violations.len() > snap {
14890                let pfx = format!("{path}/Desc");
14891                for v in &mut violations[snap..] {
14892                    v.path.insert_str(0, &pfx);
14893                }
14894            }
14895        }
14896        if let Some(ref val) = self.amt {
14897            let snap = violations.len();
14898            val.validate_constraints("", violations);
14899            if violations.len() > snap {
14900                let pfx = format!("{path}/Amt");
14901                for v in &mut violations[snap..] {
14902                    v.path.insert_str(0, &pfx);
14903                }
14904            }
14905        }
14906    }
14907}
14908impl crate::common::validate::Validatable for DocumentLineType1 {
14909    fn validate_constraints(
14910        &self,
14911        path: &str,
14912        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14913    ) {
14914        {
14915            let snap = violations.len();
14916            self.cd_or_prtry.inner.validate_constraints("", violations);
14917            if violations.len() > snap {
14918                let pfx = format!("{path}/CdOrPrtry");
14919                for v in &mut violations[snap..] {
14920                    v.path.insert_str(0, &pfx);
14921                }
14922            }
14923        }
14924        if let Some(ref val) = self.issr {
14925            let snap = violations.len();
14926            val.validate_constraints("", violations);
14927            if violations.len() > snap {
14928                let pfx = format!("{path}/Issr");
14929                for v in &mut violations[snap..] {
14930                    v.path.insert_str(0, &pfx);
14931                }
14932            }
14933        }
14934    }
14935}
14936impl crate::common::validate::Validatable for DocumentLineType1Choice {
14937    fn validate_constraints(
14938        &self,
14939        path: &str,
14940        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14941    ) {
14942        match self {
14943            Self::Cd(inner) => {
14944                let snap = violations.len();
14945                inner.validate_constraints("", violations);
14946                if violations.len() > snap {
14947                    let pfx = format!("{path}/Cd");
14948                    for v in &mut violations[snap..] {
14949                        v.path.insert_str(0, &pfx);
14950                    }
14951                }
14952            }
14953            Self::Prtry(inner) => {
14954                let snap = violations.len();
14955                inner.validate_constraints("", violations);
14956                if violations.len() > snap {
14957                    let pfx = format!("{path}/Prtry");
14958                    for v in &mut violations[snap..] {
14959                        v.path.insert_str(0, &pfx);
14960                    }
14961                }
14962            }
14963        }
14964    }
14965}
14966impl crate::common::validate::Validatable for EquivalentAmount2 {
14967    fn validate_constraints(
14968        &self,
14969        path: &str,
14970        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14971    ) {
14972        {
14973            let snap = violations.len();
14974            self.amt.validate_constraints("", violations);
14975            if violations.len() > snap {
14976                let pfx = format!("{path}/Amt");
14977                for v in &mut violations[snap..] {
14978                    v.path.insert_str(0, &pfx);
14979                }
14980            }
14981        }
14982        {
14983            let snap = violations.len();
14984            self.ccy_of_trf.validate_constraints("", violations);
14985            if violations.len() > snap {
14986                let pfx = format!("{path}/CcyOfTrf");
14987                for v in &mut violations[snap..] {
14988                    v.path.insert_str(0, &pfx);
14989                }
14990            }
14991        }
14992    }
14993}
14994impl crate::common::validate::Validatable for FinancialIdentificationSchemeName1Choice {
14995    fn validate_constraints(
14996        &self,
14997        path: &str,
14998        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14999    ) {
15000        match self {
15001            Self::Cd(inner) => {
15002                let snap = violations.len();
15003                inner.validate_constraints("", violations);
15004                if violations.len() > snap {
15005                    let pfx = format!("{path}/Cd");
15006                    for v in &mut violations[snap..] {
15007                        v.path.insert_str(0, &pfx);
15008                    }
15009                }
15010            }
15011            Self::Prtry(inner) => {
15012                let snap = violations.len();
15013                inner.validate_constraints("", violations);
15014                if violations.len() > snap {
15015                    let pfx = format!("{path}/Prtry");
15016                    for v in &mut violations[snap..] {
15017                        v.path.insert_str(0, &pfx);
15018                    }
15019                }
15020            }
15021        }
15022    }
15023}
15024impl crate::common::validate::Validatable for FinancialInstitutionIdentification18 {
15025    fn validate_constraints(
15026        &self,
15027        path: &str,
15028        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15029    ) {
15030        if let Some(ref val) = self.bicfi {
15031            let snap = violations.len();
15032            val.validate_constraints("", violations);
15033            if violations.len() > snap {
15034                let pfx = format!("{path}/BICFI");
15035                for v in &mut violations[snap..] {
15036                    v.path.insert_str(0, &pfx);
15037                }
15038            }
15039        }
15040        if let Some(ref val) = self.clr_sys_mmb_id {
15041            let snap = violations.len();
15042            val.validate_constraints("", violations);
15043            if violations.len() > snap {
15044                let pfx = format!("{path}/ClrSysMmbId");
15045                for v in &mut violations[snap..] {
15046                    v.path.insert_str(0, &pfx);
15047                }
15048            }
15049        }
15050        if let Some(ref val) = self.lei {
15051            let snap = violations.len();
15052            val.validate_constraints("", violations);
15053            if violations.len() > snap {
15054                let pfx = format!("{path}/LEI");
15055                for v in &mut violations[snap..] {
15056                    v.path.insert_str(0, &pfx);
15057                }
15058            }
15059        }
15060        if let Some(ref val) = self.nm {
15061            let snap = violations.len();
15062            val.validate_constraints("", violations);
15063            if violations.len() > snap {
15064                let pfx = format!("{path}/Nm");
15065                for v in &mut violations[snap..] {
15066                    v.path.insert_str(0, &pfx);
15067                }
15068            }
15069        }
15070        if let Some(ref val) = self.pstl_adr {
15071            let snap = violations.len();
15072            val.validate_constraints("", violations);
15073            if violations.len() > snap {
15074                let pfx = format!("{path}/PstlAdr");
15075                for v in &mut violations[snap..] {
15076                    v.path.insert_str(0, &pfx);
15077                }
15078            }
15079        }
15080        if let Some(ref val) = self.othr {
15081            let snap = violations.len();
15082            val.validate_constraints("", violations);
15083            if violations.len() > snap {
15084                let pfx = format!("{path}/Othr");
15085                for v in &mut violations[snap..] {
15086                    v.path.insert_str(0, &pfx);
15087                }
15088            }
15089        }
15090    }
15091}
15092impl crate::common::validate::Validatable for Frequency36Choice {
15093    fn validate_constraints(
15094        &self,
15095        path: &str,
15096        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15097    ) {
15098        match self {
15099            Self::Tp(inner) => {
15100                let snap = violations.len();
15101                inner.validate_constraints("", violations);
15102                if violations.len() > snap {
15103                    let pfx = format!("{path}/Tp");
15104                    for v in &mut violations[snap..] {
15105                        v.path.insert_str(0, &pfx);
15106                    }
15107                }
15108            }
15109            Self::Prd(inner) => {
15110                let snap = violations.len();
15111                inner.validate_constraints("", violations);
15112                if violations.len() > snap {
15113                    let pfx = format!("{path}/Prd");
15114                    for v in &mut violations[snap..] {
15115                        v.path.insert_str(0, &pfx);
15116                    }
15117                }
15118            }
15119            Self::PtInTm(inner) => {
15120                let snap = violations.len();
15121                inner.validate_constraints("", violations);
15122                if violations.len() > snap {
15123                    let pfx = format!("{path}/PtInTm");
15124                    for v in &mut violations[snap..] {
15125                        v.path.insert_str(0, &pfx);
15126                    }
15127                }
15128            }
15129        }
15130    }
15131}
15132impl crate::common::validate::Validatable for FrequencyAndMoment1 {
15133    fn validate_constraints(
15134        &self,
15135        path: &str,
15136        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15137    ) {
15138        {
15139            let snap = violations.len();
15140            self.tp.validate_constraints("", violations);
15141            if violations.len() > snap {
15142                let pfx = format!("{path}/Tp");
15143                for v in &mut violations[snap..] {
15144                    v.path.insert_str(0, &pfx);
15145                }
15146            }
15147        }
15148        {
15149            let snap = violations.len();
15150            self.pt_in_tm.validate_constraints("", violations);
15151            if violations.len() > snap {
15152                let pfx = format!("{path}/PtInTm");
15153                for v in &mut violations[snap..] {
15154                    v.path.insert_str(0, &pfx);
15155                }
15156            }
15157        }
15158    }
15159}
15160impl crate::common::validate::Validatable for FrequencyPeriod1 {
15161    fn validate_constraints(
15162        &self,
15163        path: &str,
15164        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15165    ) {
15166        {
15167            let snap = violations.len();
15168            self.tp.validate_constraints("", violations);
15169            if violations.len() > snap {
15170                let pfx = format!("{path}/Tp");
15171                for v in &mut violations[snap..] {
15172                    v.path.insert_str(0, &pfx);
15173                }
15174            }
15175        }
15176        {
15177            let snap = violations.len();
15178            self.cnt_per_prd.validate_constraints("", violations);
15179            if violations.len() > snap {
15180                let pfx = format!("{path}/CntPerPrd");
15181                for v in &mut violations[snap..] {
15182                    v.path.insert_str(0, &pfx);
15183                }
15184            }
15185        }
15186    }
15187}
15188impl crate::common::validate::Validatable for Garnishment3 {
15189    fn validate_constraints(
15190        &self,
15191        path: &str,
15192        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15193    ) {
15194        {
15195            let snap = violations.len();
15196            self.tp.validate_constraints("", violations);
15197            if violations.len() > snap {
15198                let pfx = format!("{path}/Tp");
15199                for v in &mut violations[snap..] {
15200                    v.path.insert_str(0, &pfx);
15201                }
15202            }
15203        }
15204        if let Some(ref val) = self.grnshee {
15205            let snap = violations.len();
15206            val.validate_constraints("", violations);
15207            if violations.len() > snap {
15208                let pfx = format!("{path}/Grnshee");
15209                for v in &mut violations[snap..] {
15210                    v.path.insert_str(0, &pfx);
15211                }
15212            }
15213        }
15214        if let Some(ref val) = self.grnshmt_admstr {
15215            let snap = violations.len();
15216            val.validate_constraints("", violations);
15217            if violations.len() > snap {
15218                let pfx = format!("{path}/GrnshmtAdmstr");
15219                for v in &mut violations[snap..] {
15220                    v.path.insert_str(0, &pfx);
15221                }
15222            }
15223        }
15224        if let Some(ref val) = self.ref_nb {
15225            let snap = violations.len();
15226            val.validate_constraints("", violations);
15227            if violations.len() > snap {
15228                let pfx = format!("{path}/RefNb");
15229                for v in &mut violations[snap..] {
15230                    v.path.insert_str(0, &pfx);
15231                }
15232            }
15233        }
15234        if let Some(ref val) = self.dt {
15235            let snap = violations.len();
15236            val.validate_constraints("", violations);
15237            if violations.len() > snap {
15238                let pfx = format!("{path}/Dt");
15239                for v in &mut violations[snap..] {
15240                    v.path.insert_str(0, &pfx);
15241                }
15242            }
15243        }
15244        if let Some(ref val) = self.rmtd_amt {
15245            let snap = violations.len();
15246            val.validate_constraints("", violations);
15247            if violations.len() > snap {
15248                let pfx = format!("{path}/RmtdAmt");
15249                for v in &mut violations[snap..] {
15250                    v.path.insert_str(0, &pfx);
15251                }
15252            }
15253        }
15254        if let Some(ref val) = self.fmly_mdcl_insrnc_ind {
15255            let snap = violations.len();
15256            val.validate_constraints("", violations);
15257            if violations.len() > snap {
15258                let pfx = format!("{path}/FmlyMdclInsrncInd");
15259                for v in &mut violations[snap..] {
15260                    v.path.insert_str(0, &pfx);
15261                }
15262            }
15263        }
15264        if let Some(ref val) = self.mplyee_termntn_ind {
15265            let snap = violations.len();
15266            val.validate_constraints("", violations);
15267            if violations.len() > snap {
15268                let pfx = format!("{path}/MplyeeTermntnInd");
15269                for v in &mut violations[snap..] {
15270                    v.path.insert_str(0, &pfx);
15271                }
15272            }
15273        }
15274    }
15275}
15276impl crate::common::validate::Validatable for GarnishmentType1 {
15277    fn validate_constraints(
15278        &self,
15279        path: &str,
15280        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15281    ) {
15282        {
15283            let snap = violations.len();
15284            self.cd_or_prtry.inner.validate_constraints("", violations);
15285            if violations.len() > snap {
15286                let pfx = format!("{path}/CdOrPrtry");
15287                for v in &mut violations[snap..] {
15288                    v.path.insert_str(0, &pfx);
15289                }
15290            }
15291        }
15292        if let Some(ref val) = self.issr {
15293            let snap = violations.len();
15294            val.validate_constraints("", violations);
15295            if violations.len() > snap {
15296                let pfx = format!("{path}/Issr");
15297                for v in &mut violations[snap..] {
15298                    v.path.insert_str(0, &pfx);
15299                }
15300            }
15301        }
15302    }
15303}
15304impl crate::common::validate::Validatable for GarnishmentType1Choice {
15305    fn validate_constraints(
15306        &self,
15307        path: &str,
15308        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15309    ) {
15310        match self {
15311            Self::Cd(inner) => {
15312                let snap = violations.len();
15313                inner.validate_constraints("", violations);
15314                if violations.len() > snap {
15315                    let pfx = format!("{path}/Cd");
15316                    for v in &mut violations[snap..] {
15317                        v.path.insert_str(0, &pfx);
15318                    }
15319                }
15320            }
15321            Self::Prtry(inner) => {
15322                let snap = violations.len();
15323                inner.validate_constraints("", violations);
15324                if violations.len() > snap {
15325                    let pfx = format!("{path}/Prtry");
15326                    for v in &mut violations[snap..] {
15327                        v.path.insert_str(0, &pfx);
15328                    }
15329                }
15330            }
15331        }
15332    }
15333}
15334impl crate::common::validate::Validatable for GenericAccountIdentification1 {
15335    fn validate_constraints(
15336        &self,
15337        path: &str,
15338        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15339    ) {
15340        {
15341            let snap = violations.len();
15342            self.id.validate_constraints("", violations);
15343            if violations.len() > snap {
15344                let pfx = format!("{path}/Id");
15345                for v in &mut violations[snap..] {
15346                    v.path.insert_str(0, &pfx);
15347                }
15348            }
15349        }
15350        if let Some(ref wrapper) = self.schme_nm {
15351            let snap = violations.len();
15352            wrapper.inner.validate_constraints("", violations);
15353            if violations.len() > snap {
15354                let pfx = format!("{path}/SchmeNm");
15355                for v in &mut violations[snap..] {
15356                    v.path.insert_str(0, &pfx);
15357                }
15358            }
15359        }
15360        if let Some(ref val) = self.issr {
15361            let snap = violations.len();
15362            val.validate_constraints("", violations);
15363            if violations.len() > snap {
15364                let pfx = format!("{path}/Issr");
15365                for v in &mut violations[snap..] {
15366                    v.path.insert_str(0, &pfx);
15367                }
15368            }
15369        }
15370    }
15371}
15372impl crate::common::validate::Validatable for GenericFinancialIdentification1 {
15373    fn validate_constraints(
15374        &self,
15375        path: &str,
15376        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15377    ) {
15378        {
15379            let snap = violations.len();
15380            self.id.validate_constraints("", violations);
15381            if violations.len() > snap {
15382                let pfx = format!("{path}/Id");
15383                for v in &mut violations[snap..] {
15384                    v.path.insert_str(0, &pfx);
15385                }
15386            }
15387        }
15388        if let Some(ref wrapper) = self.schme_nm {
15389            let snap = violations.len();
15390            wrapper.inner.validate_constraints("", violations);
15391            if violations.len() > snap {
15392                let pfx = format!("{path}/SchmeNm");
15393                for v in &mut violations[snap..] {
15394                    v.path.insert_str(0, &pfx);
15395                }
15396            }
15397        }
15398        if let Some(ref val) = self.issr {
15399            let snap = violations.len();
15400            val.validate_constraints("", violations);
15401            if violations.len() > snap {
15402                let pfx = format!("{path}/Issr");
15403                for v in &mut violations[snap..] {
15404                    v.path.insert_str(0, &pfx);
15405                }
15406            }
15407        }
15408    }
15409}
15410impl crate::common::validate::Validatable for GenericIdentification30 {
15411    fn validate_constraints(
15412        &self,
15413        path: &str,
15414        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15415    ) {
15416        {
15417            let snap = violations.len();
15418            self.id.validate_constraints("", violations);
15419            if violations.len() > snap {
15420                let pfx = format!("{path}/Id");
15421                for v in &mut violations[snap..] {
15422                    v.path.insert_str(0, &pfx);
15423                }
15424            }
15425        }
15426        {
15427            let snap = violations.len();
15428            self.issr.validate_constraints("", violations);
15429            if violations.len() > snap {
15430                let pfx = format!("{path}/Issr");
15431                for v in &mut violations[snap..] {
15432                    v.path.insert_str(0, &pfx);
15433                }
15434            }
15435        }
15436        if let Some(ref val) = self.schme_nm {
15437            let snap = violations.len();
15438            val.validate_constraints("", violations);
15439            if violations.len() > snap {
15440                let pfx = format!("{path}/SchmeNm");
15441                for v in &mut violations[snap..] {
15442                    v.path.insert_str(0, &pfx);
15443                }
15444            }
15445        }
15446    }
15447}
15448impl crate::common::validate::Validatable for GenericOrganisationIdentification1 {
15449    fn validate_constraints(
15450        &self,
15451        path: &str,
15452        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15453    ) {
15454        {
15455            let snap = violations.len();
15456            self.id.validate_constraints("", violations);
15457            if violations.len() > snap {
15458                let pfx = format!("{path}/Id");
15459                for v in &mut violations[snap..] {
15460                    v.path.insert_str(0, &pfx);
15461                }
15462            }
15463        }
15464        if let Some(ref wrapper) = self.schme_nm {
15465            let snap = violations.len();
15466            wrapper.inner.validate_constraints("", violations);
15467            if violations.len() > snap {
15468                let pfx = format!("{path}/SchmeNm");
15469                for v in &mut violations[snap..] {
15470                    v.path.insert_str(0, &pfx);
15471                }
15472            }
15473        }
15474        if let Some(ref val) = self.issr {
15475            let snap = violations.len();
15476            val.validate_constraints("", violations);
15477            if violations.len() > snap {
15478                let pfx = format!("{path}/Issr");
15479                for v in &mut violations[snap..] {
15480                    v.path.insert_str(0, &pfx);
15481                }
15482            }
15483        }
15484    }
15485}
15486impl crate::common::validate::Validatable for GenericPersonIdentification1 {
15487    fn validate_constraints(
15488        &self,
15489        path: &str,
15490        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15491    ) {
15492        {
15493            let snap = violations.len();
15494            self.id.validate_constraints("", violations);
15495            if violations.len() > snap {
15496                let pfx = format!("{path}/Id");
15497                for v in &mut violations[snap..] {
15498                    v.path.insert_str(0, &pfx);
15499                }
15500            }
15501        }
15502        if let Some(ref wrapper) = self.schme_nm {
15503            let snap = violations.len();
15504            wrapper.inner.validate_constraints("", violations);
15505            if violations.len() > snap {
15506                let pfx = format!("{path}/SchmeNm");
15507                for v in &mut violations[snap..] {
15508                    v.path.insert_str(0, &pfx);
15509                }
15510            }
15511        }
15512        if let Some(ref val) = self.issr {
15513            let snap = violations.len();
15514            val.validate_constraints("", violations);
15515            if violations.len() > snap {
15516                let pfx = format!("{path}/Issr");
15517                for v in &mut violations[snap..] {
15518                    v.path.insert_str(0, &pfx);
15519                }
15520            }
15521        }
15522    }
15523}
15524impl crate::common::validate::Validatable for GroupHeader99 {
15525    fn validate_constraints(
15526        &self,
15527        path: &str,
15528        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15529    ) {
15530        {
15531            let snap = violations.len();
15532            self.msg_id.validate_constraints("", violations);
15533            if violations.len() > snap {
15534                let pfx = format!("{path}/MsgId");
15535                for v in &mut violations[snap..] {
15536                    v.path.insert_str(0, &pfx);
15537                }
15538            }
15539        }
15540        {
15541            let snap = violations.len();
15542            self.cre_dt_tm.validate_constraints("", violations);
15543            if violations.len() > snap {
15544                let pfx = format!("{path}/CreDtTm");
15545                for v in &mut violations[snap..] {
15546                    v.path.insert_str(0, &pfx);
15547                }
15548            }
15549        }
15550        for (idx, elem) in self.authstn.iter().enumerate() {
15551            let snap = violations.len();
15552            elem.inner.validate_constraints("", violations);
15553            if violations.len() > snap {
15554                let pfx = format!("{path}/Authstn[{idx}]");
15555                for v in &mut violations[snap..] {
15556                    v.path.insert_str(0, &pfx);
15557                }
15558            }
15559        }
15560        if let Some(ref val) = self.btch_bookg {
15561            let snap = violations.len();
15562            val.validate_constraints("", violations);
15563            if violations.len() > snap {
15564                let pfx = format!("{path}/BtchBookg");
15565                for v in &mut violations[snap..] {
15566                    v.path.insert_str(0, &pfx);
15567                }
15568            }
15569        }
15570        {
15571            let snap = violations.len();
15572            self.nb_of_txs.validate_constraints("", violations);
15573            if violations.len() > snap {
15574                let pfx = format!("{path}/NbOfTxs");
15575                for v in &mut violations[snap..] {
15576                    v.path.insert_str(0, &pfx);
15577                }
15578            }
15579        }
15580        if let Some(ref val) = self.ctrl_sum {
15581            let snap = violations.len();
15582            val.validate_constraints("", violations);
15583            if violations.len() > snap {
15584                let pfx = format!("{path}/CtrlSum");
15585                for v in &mut violations[snap..] {
15586                    v.path.insert_str(0, &pfx);
15587                }
15588            }
15589        }
15590        if let Some(ref val) = self.grp_rtr {
15591            let snap = violations.len();
15592            val.validate_constraints("", violations);
15593            if violations.len() > snap {
15594                let pfx = format!("{path}/GrpRtr");
15595                for v in &mut violations[snap..] {
15596                    v.path.insert_str(0, &pfx);
15597                }
15598            }
15599        }
15600        if let Some(ref val) = self.ttl_rtrd_intr_bk_sttlm_amt {
15601            let snap = violations.len();
15602            val.validate_constraints("", violations);
15603            if violations.len() > snap {
15604                let pfx = format!("{path}/TtlRtrdIntrBkSttlmAmt");
15605                for v in &mut violations[snap..] {
15606                    v.path.insert_str(0, &pfx);
15607                }
15608            }
15609        }
15610        if let Some(ref val) = self.intr_bk_sttlm_dt {
15611            let snap = violations.len();
15612            val.validate_constraints("", violations);
15613            if violations.len() > snap {
15614                let pfx = format!("{path}/IntrBkSttlmDt");
15615                for v in &mut violations[snap..] {
15616                    v.path.insert_str(0, &pfx);
15617                }
15618            }
15619        }
15620        {
15621            let snap = violations.len();
15622            self.sttlm_inf.validate_constraints("", violations);
15623            if violations.len() > snap {
15624                let pfx = format!("{path}/SttlmInf");
15625                for v in &mut violations[snap..] {
15626                    v.path.insert_str(0, &pfx);
15627                }
15628            }
15629        }
15630        if let Some(ref val) = self.pmt_tp_inf {
15631            let snap = violations.len();
15632            val.validate_constraints("", violations);
15633            if violations.len() > snap {
15634                let pfx = format!("{path}/PmtTpInf");
15635                for v in &mut violations[snap..] {
15636                    v.path.insert_str(0, &pfx);
15637                }
15638            }
15639        }
15640        if let Some(ref val) = self.instg_agt {
15641            let snap = violations.len();
15642            val.validate_constraints("", violations);
15643            if violations.len() > snap {
15644                let pfx = format!("{path}/InstgAgt");
15645                for v in &mut violations[snap..] {
15646                    v.path.insert_str(0, &pfx);
15647                }
15648            }
15649        }
15650        if let Some(ref val) = self.instd_agt {
15651            let snap = violations.len();
15652            val.validate_constraints("", violations);
15653            if violations.len() > snap {
15654                let pfx = format!("{path}/InstdAgt");
15655                for v in &mut violations[snap..] {
15656                    v.path.insert_str(0, &pfx);
15657                }
15658            }
15659        }
15660    }
15661}
15662impl crate::common::validate::Validatable for InstructionForCreditorAgent3 {
15663    fn validate_constraints(
15664        &self,
15665        path: &str,
15666        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15667    ) {
15668        if let Some(ref val) = self.cd {
15669            let snap = violations.len();
15670            val.validate_constraints("", violations);
15671            if violations.len() > snap {
15672                let pfx = format!("{path}/Cd");
15673                for v in &mut violations[snap..] {
15674                    v.path.insert_str(0, &pfx);
15675                }
15676            }
15677        }
15678        if let Some(ref val) = self.instr_inf {
15679            let snap = violations.len();
15680            val.validate_constraints("", violations);
15681            if violations.len() > snap {
15682                let pfx = format!("{path}/InstrInf");
15683                for v in &mut violations[snap..] {
15684                    v.path.insert_str(0, &pfx);
15685                }
15686            }
15687        }
15688    }
15689}
15690impl crate::common::validate::Validatable for InstructionForNextAgent1 {
15691    fn validate_constraints(
15692        &self,
15693        path: &str,
15694        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15695    ) {
15696        if let Some(ref val) = self.cd {
15697            let snap = violations.len();
15698            val.validate_constraints("", violations);
15699            if violations.len() > snap {
15700                let pfx = format!("{path}/Cd");
15701                for v in &mut violations[snap..] {
15702                    v.path.insert_str(0, &pfx);
15703                }
15704            }
15705        }
15706        if let Some(ref val) = self.instr_inf {
15707            let snap = violations.len();
15708            val.validate_constraints("", violations);
15709            if violations.len() > snap {
15710                let pfx = format!("{path}/InstrInf");
15711                for v in &mut violations[snap..] {
15712                    v.path.insert_str(0, &pfx);
15713                }
15714            }
15715        }
15716    }
15717}
15718impl crate::common::validate::Validatable for LocalInstrument2Choice {
15719    fn validate_constraints(
15720        &self,
15721        path: &str,
15722        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15723    ) {
15724        match self {
15725            Self::Cd(inner) => {
15726                let snap = violations.len();
15727                inner.validate_constraints("", violations);
15728                if violations.len() > snap {
15729                    let pfx = format!("{path}/Cd");
15730                    for v in &mut violations[snap..] {
15731                        v.path.insert_str(0, &pfx);
15732                    }
15733                }
15734            }
15735            Self::Prtry(inner) => {
15736                let snap = violations.len();
15737                inner.validate_constraints("", violations);
15738                if violations.len() > snap {
15739                    let pfx = format!("{path}/Prtry");
15740                    for v in &mut violations[snap..] {
15741                        v.path.insert_str(0, &pfx);
15742                    }
15743                }
15744            }
15745        }
15746    }
15747}
15748impl crate::common::validate::Validatable for MandateClassification1Choice {
15749    fn validate_constraints(
15750        &self,
15751        path: &str,
15752        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15753    ) {
15754        match self {
15755            Self::Cd(inner) => {
15756                let snap = violations.len();
15757                inner.validate_constraints("", violations);
15758                if violations.len() > snap {
15759                    let pfx = format!("{path}/Cd");
15760                    for v in &mut violations[snap..] {
15761                        v.path.insert_str(0, &pfx);
15762                    }
15763                }
15764            }
15765            Self::Prtry(inner) => {
15766                let snap = violations.len();
15767                inner.validate_constraints("", violations);
15768                if violations.len() > snap {
15769                    let pfx = format!("{path}/Prtry");
15770                    for v in &mut violations[snap..] {
15771                        v.path.insert_str(0, &pfx);
15772                    }
15773                }
15774            }
15775        }
15776    }
15777}
15778impl crate::common::validate::Validatable for MandateRelatedData2Choice {
15779    fn validate_constraints(
15780        &self,
15781        path: &str,
15782        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15783    ) {
15784        match self {
15785            Self::DrctDbtMndt(inner) => {
15786                let snap = violations.len();
15787                inner.validate_constraints("", violations);
15788                if violations.len() > snap {
15789                    let pfx = format!("{path}/DrctDbtMndt");
15790                    for v in &mut violations[snap..] {
15791                        v.path.insert_str(0, &pfx);
15792                    }
15793                }
15794            }
15795            Self::CdtTrfMndt(inner) => {
15796                let snap = violations.len();
15797                inner.validate_constraints("", violations);
15798                if violations.len() > snap {
15799                    let pfx = format!("{path}/CdtTrfMndt");
15800                    for v in &mut violations[snap..] {
15801                        v.path.insert_str(0, &pfx);
15802                    }
15803                }
15804            }
15805        }
15806    }
15807}
15808impl crate::common::validate::Validatable for MandateRelatedInformation15 {
15809    fn validate_constraints(
15810        &self,
15811        path: &str,
15812        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15813    ) {
15814        if let Some(ref val) = self.mndt_id {
15815            let snap = violations.len();
15816            val.validate_constraints("", violations);
15817            if violations.len() > snap {
15818                let pfx = format!("{path}/MndtId");
15819                for v in &mut violations[snap..] {
15820                    v.path.insert_str(0, &pfx);
15821                }
15822            }
15823        }
15824        if let Some(ref val) = self.dt_of_sgntr {
15825            let snap = violations.len();
15826            val.validate_constraints("", violations);
15827            if violations.len() > snap {
15828                let pfx = format!("{path}/DtOfSgntr");
15829                for v in &mut violations[snap..] {
15830                    v.path.insert_str(0, &pfx);
15831                }
15832            }
15833        }
15834        if let Some(ref val) = self.amdmnt_ind {
15835            let snap = violations.len();
15836            val.validate_constraints("", violations);
15837            if violations.len() > snap {
15838                let pfx = format!("{path}/AmdmntInd");
15839                for v in &mut violations[snap..] {
15840                    v.path.insert_str(0, &pfx);
15841                }
15842            }
15843        }
15844        if let Some(ref val) = self.amdmnt_inf_dtls {
15845            let snap = violations.len();
15846            val.validate_constraints("", violations);
15847            if violations.len() > snap {
15848                let pfx = format!("{path}/AmdmntInfDtls");
15849                for v in &mut violations[snap..] {
15850                    v.path.insert_str(0, &pfx);
15851                }
15852            }
15853        }
15854        if let Some(ref val) = self.elctrnc_sgntr {
15855            let snap = violations.len();
15856            val.validate_constraints("", violations);
15857            if violations.len() > snap {
15858                let pfx = format!("{path}/ElctrncSgntr");
15859                for v in &mut violations[snap..] {
15860                    v.path.insert_str(0, &pfx);
15861                }
15862            }
15863        }
15864        if let Some(ref val) = self.frst_colltn_dt {
15865            let snap = violations.len();
15866            val.validate_constraints("", violations);
15867            if violations.len() > snap {
15868                let pfx = format!("{path}/FrstColltnDt");
15869                for v in &mut violations[snap..] {
15870                    v.path.insert_str(0, &pfx);
15871                }
15872            }
15873        }
15874        if let Some(ref val) = self.fnl_colltn_dt {
15875            let snap = violations.len();
15876            val.validate_constraints("", violations);
15877            if violations.len() > snap {
15878                let pfx = format!("{path}/FnlColltnDt");
15879                for v in &mut violations[snap..] {
15880                    v.path.insert_str(0, &pfx);
15881                }
15882            }
15883        }
15884        if let Some(ref wrapper) = self.frqcy {
15885            let snap = violations.len();
15886            wrapper.inner.validate_constraints("", violations);
15887            if violations.len() > snap {
15888                let pfx = format!("{path}/Frqcy");
15889                for v in &mut violations[snap..] {
15890                    v.path.insert_str(0, &pfx);
15891                }
15892            }
15893        }
15894        if let Some(ref wrapper) = self.rsn {
15895            let snap = violations.len();
15896            wrapper.inner.validate_constraints("", violations);
15897            if violations.len() > snap {
15898                let pfx = format!("{path}/Rsn");
15899                for v in &mut violations[snap..] {
15900                    v.path.insert_str(0, &pfx);
15901                }
15902            }
15903        }
15904        if let Some(ref val) = self.trckg_days {
15905            let snap = violations.len();
15906            val.validate_constraints("", violations);
15907            if violations.len() > snap {
15908                let pfx = format!("{path}/TrckgDays");
15909                for v in &mut violations[snap..] {
15910                    v.path.insert_str(0, &pfx);
15911                }
15912            }
15913        }
15914    }
15915}
15916impl crate::common::validate::Validatable for MandateSetupReason1Choice {
15917    fn validate_constraints(
15918        &self,
15919        path: &str,
15920        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15921    ) {
15922        match self {
15923            Self::Cd(inner) => {
15924                let snap = violations.len();
15925                inner.validate_constraints("", violations);
15926                if violations.len() > snap {
15927                    let pfx = format!("{path}/Cd");
15928                    for v in &mut violations[snap..] {
15929                        v.path.insert_str(0, &pfx);
15930                    }
15931                }
15932            }
15933            Self::Prtry(inner) => {
15934                let snap = violations.len();
15935                inner.validate_constraints("", violations);
15936                if violations.len() > snap {
15937                    let pfx = format!("{path}/Prtry");
15938                    for v in &mut violations[snap..] {
15939                        v.path.insert_str(0, &pfx);
15940                    }
15941                }
15942            }
15943        }
15944    }
15945}
15946impl crate::common::validate::Validatable for MandateTypeInformation2 {
15947    fn validate_constraints(
15948        &self,
15949        path: &str,
15950        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15951    ) {
15952        if let Some(ref wrapper) = self.svc_lvl {
15953            let snap = violations.len();
15954            wrapper.inner.validate_constraints("", violations);
15955            if violations.len() > snap {
15956                let pfx = format!("{path}/SvcLvl");
15957                for v in &mut violations[snap..] {
15958                    v.path.insert_str(0, &pfx);
15959                }
15960            }
15961        }
15962        if let Some(ref wrapper) = self.lcl_instrm {
15963            let snap = violations.len();
15964            wrapper.inner.validate_constraints("", violations);
15965            if violations.len() > snap {
15966                let pfx = format!("{path}/LclInstrm");
15967                for v in &mut violations[snap..] {
15968                    v.path.insert_str(0, &pfx);
15969                }
15970            }
15971        }
15972        if let Some(ref wrapper) = self.ctgy_purp {
15973            let snap = violations.len();
15974            wrapper.inner.validate_constraints("", violations);
15975            if violations.len() > snap {
15976                let pfx = format!("{path}/CtgyPurp");
15977                for v in &mut violations[snap..] {
15978                    v.path.insert_str(0, &pfx);
15979                }
15980            }
15981        }
15982        if let Some(ref wrapper) = self.clssfctn {
15983            let snap = violations.len();
15984            wrapper.inner.validate_constraints("", violations);
15985            if violations.len() > snap {
15986                let pfx = format!("{path}/Clssfctn");
15987                for v in &mut violations[snap..] {
15988                    v.path.insert_str(0, &pfx);
15989                }
15990            }
15991        }
15992    }
15993}
15994impl crate::common::validate::Validatable for OrganisationIdentification29 {
15995    fn validate_constraints(
15996        &self,
15997        path: &str,
15998        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15999    ) {
16000        if let Some(ref val) = self.any_bic {
16001            let snap = violations.len();
16002            val.validate_constraints("", violations);
16003            if violations.len() > snap {
16004                let pfx = format!("{path}/AnyBIC");
16005                for v in &mut violations[snap..] {
16006                    v.path.insert_str(0, &pfx);
16007                }
16008            }
16009        }
16010        if let Some(ref val) = self.lei {
16011            let snap = violations.len();
16012            val.validate_constraints("", violations);
16013            if violations.len() > snap {
16014                let pfx = format!("{path}/LEI");
16015                for v in &mut violations[snap..] {
16016                    v.path.insert_str(0, &pfx);
16017                }
16018            }
16019        }
16020        for (idx, elem) in self.othr.iter().enumerate() {
16021            let snap = violations.len();
16022            elem.validate_constraints("", violations);
16023            if violations.len() > snap {
16024                let pfx = format!("{path}/Othr[{idx}]");
16025                for v in &mut violations[snap..] {
16026                    v.path.insert_str(0, &pfx);
16027                }
16028            }
16029        }
16030    }
16031}
16032impl crate::common::validate::Validatable for OrganisationIdentificationSchemeName1Choice {
16033    fn validate_constraints(
16034        &self,
16035        path: &str,
16036        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16037    ) {
16038        match self {
16039            Self::Cd(inner) => {
16040                let snap = violations.len();
16041                inner.validate_constraints("", violations);
16042                if violations.len() > snap {
16043                    let pfx = format!("{path}/Cd");
16044                    for v in &mut violations[snap..] {
16045                        v.path.insert_str(0, &pfx);
16046                    }
16047                }
16048            }
16049            Self::Prtry(inner) => {
16050                let snap = violations.len();
16051                inner.validate_constraints("", violations);
16052                if violations.len() > snap {
16053                    let pfx = format!("{path}/Prtry");
16054                    for v in &mut violations[snap..] {
16055                        v.path.insert_str(0, &pfx);
16056                    }
16057                }
16058            }
16059        }
16060    }
16061}
16062impl crate::common::validate::Validatable for OriginalGroupHeader18 {
16063    fn validate_constraints(
16064        &self,
16065        path: &str,
16066        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16067    ) {
16068        {
16069            let snap = violations.len();
16070            self.orgnl_msg_id.validate_constraints("", violations);
16071            if violations.len() > snap {
16072                let pfx = format!("{path}/OrgnlMsgId");
16073                for v in &mut violations[snap..] {
16074                    v.path.insert_str(0, &pfx);
16075                }
16076            }
16077        }
16078        {
16079            let snap = violations.len();
16080            self.orgnl_msg_nm_id.validate_constraints("", violations);
16081            if violations.len() > snap {
16082                let pfx = format!("{path}/OrgnlMsgNmId");
16083                for v in &mut violations[snap..] {
16084                    v.path.insert_str(0, &pfx);
16085                }
16086            }
16087        }
16088        if let Some(ref val) = self.orgnl_cre_dt_tm {
16089            let snap = violations.len();
16090            val.validate_constraints("", violations);
16091            if violations.len() > snap {
16092                let pfx = format!("{path}/OrgnlCreDtTm");
16093                for v in &mut violations[snap..] {
16094                    v.path.insert_str(0, &pfx);
16095                }
16096            }
16097        }
16098        for (idx, elem) in self.rtr_rsn_inf.iter().enumerate() {
16099            let snap = violations.len();
16100            elem.validate_constraints("", violations);
16101            if violations.len() > snap {
16102                let pfx = format!("{path}/RtrRsnInf[{idx}]");
16103                for v in &mut violations[snap..] {
16104                    v.path.insert_str(0, &pfx);
16105                }
16106            }
16107        }
16108    }
16109}
16110impl crate::common::validate::Validatable for OriginalGroupInformation29 {
16111    fn validate_constraints(
16112        &self,
16113        path: &str,
16114        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16115    ) {
16116        {
16117            let snap = violations.len();
16118            self.orgnl_msg_id.validate_constraints("", violations);
16119            if violations.len() > snap {
16120                let pfx = format!("{path}/OrgnlMsgId");
16121                for v in &mut violations[snap..] {
16122                    v.path.insert_str(0, &pfx);
16123                }
16124            }
16125        }
16126        {
16127            let snap = violations.len();
16128            self.orgnl_msg_nm_id.validate_constraints("", violations);
16129            if violations.len() > snap {
16130                let pfx = format!("{path}/OrgnlMsgNmId");
16131                for v in &mut violations[snap..] {
16132                    v.path.insert_str(0, &pfx);
16133                }
16134            }
16135        }
16136        if let Some(ref val) = self.orgnl_cre_dt_tm {
16137            let snap = violations.len();
16138            val.validate_constraints("", violations);
16139            if violations.len() > snap {
16140                let pfx = format!("{path}/OrgnlCreDtTm");
16141                for v in &mut violations[snap..] {
16142                    v.path.insert_str(0, &pfx);
16143                }
16144            }
16145        }
16146    }
16147}
16148impl crate::common::validate::Validatable for OriginalTransactionReference36 {
16149    fn validate_constraints(
16150        &self,
16151        path: &str,
16152        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16153    ) {
16154        if let Some(ref val) = self.intr_bk_sttlm_amt {
16155            let snap = violations.len();
16156            val.validate_constraints("", violations);
16157            if violations.len() > snap {
16158                let pfx = format!("{path}/IntrBkSttlmAmt");
16159                for v in &mut violations[snap..] {
16160                    v.path.insert_str(0, &pfx);
16161                }
16162            }
16163        }
16164        if let Some(ref wrapper) = self.amt {
16165            let snap = violations.len();
16166            wrapper.inner.validate_constraints("", violations);
16167            if violations.len() > snap {
16168                let pfx = format!("{path}/Amt");
16169                for v in &mut violations[snap..] {
16170                    v.path.insert_str(0, &pfx);
16171                }
16172            }
16173        }
16174        if let Some(ref val) = self.intr_bk_sttlm_dt {
16175            let snap = violations.len();
16176            val.validate_constraints("", violations);
16177            if violations.len() > snap {
16178                let pfx = format!("{path}/IntrBkSttlmDt");
16179                for v in &mut violations[snap..] {
16180                    v.path.insert_str(0, &pfx);
16181                }
16182            }
16183        }
16184        if let Some(ref val) = self.reqd_colltn_dt {
16185            let snap = violations.len();
16186            val.validate_constraints("", violations);
16187            if violations.len() > snap {
16188                let pfx = format!("{path}/ReqdColltnDt");
16189                for v in &mut violations[snap..] {
16190                    v.path.insert_str(0, &pfx);
16191                }
16192            }
16193        }
16194        if let Some(ref wrapper) = self.reqd_exctn_dt {
16195            let snap = violations.len();
16196            wrapper.inner.validate_constraints("", violations);
16197            if violations.len() > snap {
16198                let pfx = format!("{path}/ReqdExctnDt");
16199                for v in &mut violations[snap..] {
16200                    v.path.insert_str(0, &pfx);
16201                }
16202            }
16203        }
16204        if let Some(ref val) = self.cdtr_schme_id {
16205            let snap = violations.len();
16206            val.validate_constraints("", violations);
16207            if violations.len() > snap {
16208                let pfx = format!("{path}/CdtrSchmeId");
16209                for v in &mut violations[snap..] {
16210                    v.path.insert_str(0, &pfx);
16211                }
16212            }
16213        }
16214        if let Some(ref val) = self.sttlm_inf {
16215            let snap = violations.len();
16216            val.validate_constraints("", violations);
16217            if violations.len() > snap {
16218                let pfx = format!("{path}/SttlmInf");
16219                for v in &mut violations[snap..] {
16220                    v.path.insert_str(0, &pfx);
16221                }
16222            }
16223        }
16224        if let Some(ref val) = self.pmt_tp_inf {
16225            let snap = violations.len();
16226            val.validate_constraints("", violations);
16227            if violations.len() > snap {
16228                let pfx = format!("{path}/PmtTpInf");
16229                for v in &mut violations[snap..] {
16230                    v.path.insert_str(0, &pfx);
16231                }
16232            }
16233        }
16234        if let Some(ref val) = self.pmt_mtd {
16235            let snap = violations.len();
16236            val.validate_constraints("", violations);
16237            if violations.len() > snap {
16238                let pfx = format!("{path}/PmtMtd");
16239                for v in &mut violations[snap..] {
16240                    v.path.insert_str(0, &pfx);
16241                }
16242            }
16243        }
16244        if let Some(ref wrapper) = self.mndt_rltd_inf {
16245            let snap = violations.len();
16246            wrapper.inner.validate_constraints("", violations);
16247            if violations.len() > snap {
16248                let pfx = format!("{path}/MndtRltdInf");
16249                for v in &mut violations[snap..] {
16250                    v.path.insert_str(0, &pfx);
16251                }
16252            }
16253        }
16254        if let Some(ref val) = self.rmt_inf {
16255            let snap = violations.len();
16256            val.validate_constraints("", violations);
16257            if violations.len() > snap {
16258                let pfx = format!("{path}/RmtInf");
16259                for v in &mut violations[snap..] {
16260                    v.path.insert_str(0, &pfx);
16261                }
16262            }
16263        }
16264        if let Some(ref wrapper) = self.ultmt_dbtr {
16265            let snap = violations.len();
16266            wrapper.inner.validate_constraints("", violations);
16267            if violations.len() > snap {
16268                let pfx = format!("{path}/UltmtDbtr");
16269                for v in &mut violations[snap..] {
16270                    v.path.insert_str(0, &pfx);
16271                }
16272            }
16273        }
16274        if let Some(ref wrapper) = self.dbtr {
16275            let snap = violations.len();
16276            wrapper.inner.validate_constraints("", violations);
16277            if violations.len() > snap {
16278                let pfx = format!("{path}/Dbtr");
16279                for v in &mut violations[snap..] {
16280                    v.path.insert_str(0, &pfx);
16281                }
16282            }
16283        }
16284        if let Some(ref val) = self.dbtr_acct {
16285            let snap = violations.len();
16286            val.validate_constraints("", violations);
16287            if violations.len() > snap {
16288                let pfx = format!("{path}/DbtrAcct");
16289                for v in &mut violations[snap..] {
16290                    v.path.insert_str(0, &pfx);
16291                }
16292            }
16293        }
16294        if let Some(ref val) = self.dbtr_agt {
16295            let snap = violations.len();
16296            val.validate_constraints("", violations);
16297            if violations.len() > snap {
16298                let pfx = format!("{path}/DbtrAgt");
16299                for v in &mut violations[snap..] {
16300                    v.path.insert_str(0, &pfx);
16301                }
16302            }
16303        }
16304        if let Some(ref val) = self.dbtr_agt_acct {
16305            let snap = violations.len();
16306            val.validate_constraints("", violations);
16307            if violations.len() > snap {
16308                let pfx = format!("{path}/DbtrAgtAcct");
16309                for v in &mut violations[snap..] {
16310                    v.path.insert_str(0, &pfx);
16311                }
16312            }
16313        }
16314        if let Some(ref val) = self.cdtr_agt {
16315            let snap = violations.len();
16316            val.validate_constraints("", violations);
16317            if violations.len() > snap {
16318                let pfx = format!("{path}/CdtrAgt");
16319                for v in &mut violations[snap..] {
16320                    v.path.insert_str(0, &pfx);
16321                }
16322            }
16323        }
16324        if let Some(ref val) = self.cdtr_agt_acct {
16325            let snap = violations.len();
16326            val.validate_constraints("", violations);
16327            if violations.len() > snap {
16328                let pfx = format!("{path}/CdtrAgtAcct");
16329                for v in &mut violations[snap..] {
16330                    v.path.insert_str(0, &pfx);
16331                }
16332            }
16333        }
16334        if let Some(ref wrapper) = self.cdtr {
16335            let snap = violations.len();
16336            wrapper.inner.validate_constraints("", violations);
16337            if violations.len() > snap {
16338                let pfx = format!("{path}/Cdtr");
16339                for v in &mut violations[snap..] {
16340                    v.path.insert_str(0, &pfx);
16341                }
16342            }
16343        }
16344        if let Some(ref val) = self.cdtr_acct {
16345            let snap = violations.len();
16346            val.validate_constraints("", violations);
16347            if violations.len() > snap {
16348                let pfx = format!("{path}/CdtrAcct");
16349                for v in &mut violations[snap..] {
16350                    v.path.insert_str(0, &pfx);
16351                }
16352            }
16353        }
16354        if let Some(ref wrapper) = self.ultmt_cdtr {
16355            let snap = violations.len();
16356            wrapper.inner.validate_constraints("", violations);
16357            if violations.len() > snap {
16358                let pfx = format!("{path}/UltmtCdtr");
16359                for v in &mut violations[snap..] {
16360                    v.path.insert_str(0, &pfx);
16361                }
16362            }
16363        }
16364        if let Some(ref wrapper) = self.purp {
16365            let snap = violations.len();
16366            wrapper.inner.validate_constraints("", violations);
16367            if violations.len() > snap {
16368                let pfx = format!("{path}/Purp");
16369                for v in &mut violations[snap..] {
16370                    v.path.insert_str(0, &pfx);
16371                }
16372            }
16373        }
16374        if let Some(ref val) = self.undrlyg_cstmr_cdt_trf {
16375            let snap = violations.len();
16376            val.validate_constraints("", violations);
16377            if violations.len() > snap {
16378                let pfx = format!("{path}/UndrlygCstmrCdtTrf");
16379                for v in &mut violations[snap..] {
16380                    v.path.insert_str(0, &pfx);
16381                }
16382            }
16383        }
16384    }
16385}
16386impl crate::common::validate::Validatable for OtherContact1 {
16387    fn validate_constraints(
16388        &self,
16389        path: &str,
16390        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16391    ) {
16392        {
16393            let snap = violations.len();
16394            self.chanl_tp.validate_constraints("", violations);
16395            if violations.len() > snap {
16396                let pfx = format!("{path}/ChanlTp");
16397                for v in &mut violations[snap..] {
16398                    v.path.insert_str(0, &pfx);
16399                }
16400            }
16401        }
16402        if let Some(ref val) = self.id {
16403            let snap = violations.len();
16404            val.validate_constraints("", violations);
16405            if violations.len() > snap {
16406                let pfx = format!("{path}/Id");
16407                for v in &mut violations[snap..] {
16408                    v.path.insert_str(0, &pfx);
16409                }
16410            }
16411        }
16412    }
16413}
16414impl crate::common::validate::Validatable for Party38Choice {
16415    fn validate_constraints(
16416        &self,
16417        path: &str,
16418        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16419    ) {
16420        match self {
16421            Self::OrgId(inner) => {
16422                let snap = violations.len();
16423                inner.validate_constraints("", violations);
16424                if violations.len() > snap {
16425                    let pfx = format!("{path}/OrgId");
16426                    for v in &mut violations[snap..] {
16427                        v.path.insert_str(0, &pfx);
16428                    }
16429                }
16430            }
16431            Self::PrvtId(inner) => {
16432                let snap = violations.len();
16433                inner.validate_constraints("", violations);
16434                if violations.len() > snap {
16435                    let pfx = format!("{path}/PrvtId");
16436                    for v in &mut violations[snap..] {
16437                        v.path.insert_str(0, &pfx);
16438                    }
16439                }
16440            }
16441        }
16442    }
16443}
16444impl crate::common::validate::Validatable for Party40Choice {
16445    fn validate_constraints(
16446        &self,
16447        path: &str,
16448        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16449    ) {
16450        match self {
16451            Self::Pty(inner) => {
16452                let snap = violations.len();
16453                inner.validate_constraints("", violations);
16454                if violations.len() > snap {
16455                    let pfx = format!("{path}/Pty");
16456                    for v in &mut violations[snap..] {
16457                        v.path.insert_str(0, &pfx);
16458                    }
16459                }
16460            }
16461            Self::Agt(inner) => {
16462                let snap = violations.len();
16463                inner.validate_constraints("", violations);
16464                if violations.len() > snap {
16465                    let pfx = format!("{path}/Agt");
16466                    for v in &mut violations[snap..] {
16467                        v.path.insert_str(0, &pfx);
16468                    }
16469                }
16470            }
16471        }
16472    }
16473}
16474impl crate::common::validate::Validatable for PartyIdentification135 {
16475    fn validate_constraints(
16476        &self,
16477        path: &str,
16478        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16479    ) {
16480        if let Some(ref val) = self.nm {
16481            let snap = violations.len();
16482            val.validate_constraints("", violations);
16483            if violations.len() > snap {
16484                let pfx = format!("{path}/Nm");
16485                for v in &mut violations[snap..] {
16486                    v.path.insert_str(0, &pfx);
16487                }
16488            }
16489        }
16490        if let Some(ref val) = self.pstl_adr {
16491            let snap = violations.len();
16492            val.validate_constraints("", violations);
16493            if violations.len() > snap {
16494                let pfx = format!("{path}/PstlAdr");
16495                for v in &mut violations[snap..] {
16496                    v.path.insert_str(0, &pfx);
16497                }
16498            }
16499        }
16500        if let Some(ref wrapper) = self.id {
16501            let snap = violations.len();
16502            wrapper.inner.validate_constraints("", violations);
16503            if violations.len() > snap {
16504                let pfx = format!("{path}/Id");
16505                for v in &mut violations[snap..] {
16506                    v.path.insert_str(0, &pfx);
16507                }
16508            }
16509        }
16510        if let Some(ref val) = self.ctry_of_res {
16511            let snap = violations.len();
16512            val.validate_constraints("", violations);
16513            if violations.len() > snap {
16514                let pfx = format!("{path}/CtryOfRes");
16515                for v in &mut violations[snap..] {
16516                    v.path.insert_str(0, &pfx);
16517                }
16518            }
16519        }
16520        if let Some(ref val) = self.ctct_dtls {
16521            let snap = violations.len();
16522            val.validate_constraints("", violations);
16523            if violations.len() > snap {
16524                let pfx = format!("{path}/CtctDtls");
16525                for v in &mut violations[snap..] {
16526                    v.path.insert_str(0, &pfx);
16527                }
16528            }
16529        }
16530    }
16531}
16532impl crate::common::validate::Validatable for PaymentReturnReason6 {
16533    fn validate_constraints(
16534        &self,
16535        path: &str,
16536        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16537    ) {
16538        if let Some(ref val) = self.orgtr {
16539            let snap = violations.len();
16540            val.validate_constraints("", violations);
16541            if violations.len() > snap {
16542                let pfx = format!("{path}/Orgtr");
16543                for v in &mut violations[snap..] {
16544                    v.path.insert_str(0, &pfx);
16545                }
16546            }
16547        }
16548        if let Some(ref wrapper) = self.rsn {
16549            let snap = violations.len();
16550            wrapper.inner.validate_constraints("", violations);
16551            if violations.len() > snap {
16552                let pfx = format!("{path}/Rsn");
16553                for v in &mut violations[snap..] {
16554                    v.path.insert_str(0, &pfx);
16555                }
16556            }
16557        }
16558        for (idx, elem) in self.addtl_inf.iter().enumerate() {
16559            let snap = violations.len();
16560            elem.validate_constraints("", violations);
16561            if violations.len() > snap {
16562                let pfx = format!("{path}/AddtlInf[{idx}]");
16563                for v in &mut violations[snap..] {
16564                    v.path.insert_str(0, &pfx);
16565                }
16566            }
16567        }
16568    }
16569}
16570impl crate::common::validate::Validatable for PaymentReturnV11 {
16571    fn validate_constraints(
16572        &self,
16573        path: &str,
16574        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16575    ) {
16576        {
16577            let snap = violations.len();
16578            self.grp_hdr.validate_constraints("", violations);
16579            if violations.len() > snap {
16580                let pfx = format!("{path}/GrpHdr");
16581                for v in &mut violations[snap..] {
16582                    v.path.insert_str(0, &pfx);
16583                }
16584            }
16585        }
16586        if let Some(ref val) = self.orgnl_grp_inf {
16587            let snap = violations.len();
16588            val.validate_constraints("", violations);
16589            if violations.len() > snap {
16590                let pfx = format!("{path}/OrgnlGrpInf");
16591                for v in &mut violations[snap..] {
16592                    v.path.insert_str(0, &pfx);
16593                }
16594            }
16595        }
16596        for (idx, elem) in self.tx_inf.iter().enumerate() {
16597            let snap = violations.len();
16598            elem.validate_constraints("", violations);
16599            if violations.len() > snap {
16600                let pfx = format!("{path}/TxInf[{idx}]");
16601                for v in &mut violations[snap..] {
16602                    v.path.insert_str(0, &pfx);
16603                }
16604            }
16605        }
16606        for (idx, elem) in self.splmtry_data.iter().enumerate() {
16607            let snap = violations.len();
16608            elem.validate_constraints("", violations);
16609            if violations.len() > snap {
16610                let pfx = format!("{path}/SplmtryData[{idx}]");
16611                for v in &mut violations[snap..] {
16612                    v.path.insert_str(0, &pfx);
16613                }
16614            }
16615        }
16616    }
16617}
16618impl crate::common::validate::Validatable for PaymentTransaction133 {
16619    fn validate_constraints(
16620        &self,
16621        path: &str,
16622        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16623    ) {
16624        if let Some(ref val) = self.rtr_id {
16625            let snap = violations.len();
16626            val.validate_constraints("", violations);
16627            if violations.len() > snap {
16628                let pfx = format!("{path}/RtrId");
16629                for v in &mut violations[snap..] {
16630                    v.path.insert_str(0, &pfx);
16631                }
16632            }
16633        }
16634        if let Some(ref val) = self.orgnl_grp_inf {
16635            let snap = violations.len();
16636            val.validate_constraints("", violations);
16637            if violations.len() > snap {
16638                let pfx = format!("{path}/OrgnlGrpInf");
16639                for v in &mut violations[snap..] {
16640                    v.path.insert_str(0, &pfx);
16641                }
16642            }
16643        }
16644        if let Some(ref val) = self.orgnl_instr_id {
16645            let snap = violations.len();
16646            val.validate_constraints("", violations);
16647            if violations.len() > snap {
16648                let pfx = format!("{path}/OrgnlInstrId");
16649                for v in &mut violations[snap..] {
16650                    v.path.insert_str(0, &pfx);
16651                }
16652            }
16653        }
16654        if let Some(ref val) = self.orgnl_end_to_end_id {
16655            let snap = violations.len();
16656            val.validate_constraints("", violations);
16657            if violations.len() > snap {
16658                let pfx = format!("{path}/OrgnlEndToEndId");
16659                for v in &mut violations[snap..] {
16660                    v.path.insert_str(0, &pfx);
16661                }
16662            }
16663        }
16664        if let Some(ref val) = self.orgnl_tx_id {
16665            let snap = violations.len();
16666            val.validate_constraints("", violations);
16667            if violations.len() > snap {
16668                let pfx = format!("{path}/OrgnlTxId");
16669                for v in &mut violations[snap..] {
16670                    v.path.insert_str(0, &pfx);
16671                }
16672            }
16673        }
16674        if let Some(ref val) = self.orgnl_uetr {
16675            let snap = violations.len();
16676            val.validate_constraints("", violations);
16677            if violations.len() > snap {
16678                let pfx = format!("{path}/OrgnlUETR");
16679                for v in &mut violations[snap..] {
16680                    v.path.insert_str(0, &pfx);
16681                }
16682            }
16683        }
16684        if let Some(ref val) = self.orgnl_clr_sys_ref {
16685            let snap = violations.len();
16686            val.validate_constraints("", violations);
16687            if violations.len() > snap {
16688                let pfx = format!("{path}/OrgnlClrSysRef");
16689                for v in &mut violations[snap..] {
16690                    v.path.insert_str(0, &pfx);
16691                }
16692            }
16693        }
16694        if let Some(ref val) = self.orgnl_intr_bk_sttlm_amt {
16695            let snap = violations.len();
16696            val.validate_constraints("", violations);
16697            if violations.len() > snap {
16698                let pfx = format!("{path}/OrgnlIntrBkSttlmAmt");
16699                for v in &mut violations[snap..] {
16700                    v.path.insert_str(0, &pfx);
16701                }
16702            }
16703        }
16704        if let Some(ref val) = self.orgnl_intr_bk_sttlm_dt {
16705            let snap = violations.len();
16706            val.validate_constraints("", violations);
16707            if violations.len() > snap {
16708                let pfx = format!("{path}/OrgnlIntrBkSttlmDt");
16709                for v in &mut violations[snap..] {
16710                    v.path.insert_str(0, &pfx);
16711                }
16712            }
16713        }
16714        if let Some(ref val) = self.pmt_tp_inf {
16715            let snap = violations.len();
16716            val.validate_constraints("", violations);
16717            if violations.len() > snap {
16718                let pfx = format!("{path}/PmtTpInf");
16719                for v in &mut violations[snap..] {
16720                    v.path.insert_str(0, &pfx);
16721                }
16722            }
16723        }
16724        {
16725            let snap = violations.len();
16726            self.rtrd_intr_bk_sttlm_amt
16727                .validate_constraints("", violations);
16728            if violations.len() > snap {
16729                let pfx = format!("{path}/RtrdIntrBkSttlmAmt");
16730                for v in &mut violations[snap..] {
16731                    v.path.insert_str(0, &pfx);
16732                }
16733            }
16734        }
16735        if let Some(ref val) = self.intr_bk_sttlm_dt {
16736            let snap = violations.len();
16737            val.validate_constraints("", violations);
16738            if violations.len() > snap {
16739                let pfx = format!("{path}/IntrBkSttlmDt");
16740                for v in &mut violations[snap..] {
16741                    v.path.insert_str(0, &pfx);
16742                }
16743            }
16744        }
16745        if let Some(ref val) = self.sttlm_prty {
16746            let snap = violations.len();
16747            val.validate_constraints("", violations);
16748            if violations.len() > snap {
16749                let pfx = format!("{path}/SttlmPrty");
16750                for v in &mut violations[snap..] {
16751                    v.path.insert_str(0, &pfx);
16752                }
16753            }
16754        }
16755        if let Some(ref val) = self.sttlm_tm_indctn {
16756            let snap = violations.len();
16757            val.validate_constraints("", violations);
16758            if violations.len() > snap {
16759                let pfx = format!("{path}/SttlmTmIndctn");
16760                for v in &mut violations[snap..] {
16761                    v.path.insert_str(0, &pfx);
16762                }
16763            }
16764        }
16765        if let Some(ref val) = self.sttlm_tm_req {
16766            let snap = violations.len();
16767            val.validate_constraints("", violations);
16768            if violations.len() > snap {
16769                let pfx = format!("{path}/SttlmTmReq");
16770                for v in &mut violations[snap..] {
16771                    v.path.insert_str(0, &pfx);
16772                }
16773            }
16774        }
16775        if let Some(ref val) = self.rtrd_instd_amt {
16776            let snap = violations.len();
16777            val.validate_constraints("", violations);
16778            if violations.len() > snap {
16779                let pfx = format!("{path}/RtrdInstdAmt");
16780                for v in &mut violations[snap..] {
16781                    v.path.insert_str(0, &pfx);
16782                }
16783            }
16784        }
16785        if let Some(ref val) = self.xchg_rate {
16786            let snap = violations.len();
16787            val.validate_constraints("", violations);
16788            if violations.len() > snap {
16789                let pfx = format!("{path}/XchgRate");
16790                for v in &mut violations[snap..] {
16791                    v.path.insert_str(0, &pfx);
16792                }
16793            }
16794        }
16795        if let Some(ref val) = self.compstn_amt {
16796            let snap = violations.len();
16797            val.validate_constraints("", violations);
16798            if violations.len() > snap {
16799                let pfx = format!("{path}/CompstnAmt");
16800                for v in &mut violations[snap..] {
16801                    v.path.insert_str(0, &pfx);
16802                }
16803            }
16804        }
16805        if let Some(ref val) = self.chrg_br {
16806            let snap = violations.len();
16807            val.validate_constraints("", violations);
16808            if violations.len() > snap {
16809                let pfx = format!("{path}/ChrgBr");
16810                for v in &mut violations[snap..] {
16811                    v.path.insert_str(0, &pfx);
16812                }
16813            }
16814        }
16815        for (idx, elem) in self.chrgs_inf.iter().enumerate() {
16816            let snap = violations.len();
16817            elem.validate_constraints("", violations);
16818            if violations.len() > snap {
16819                let pfx = format!("{path}/ChrgsInf[{idx}]");
16820                for v in &mut violations[snap..] {
16821                    v.path.insert_str(0, &pfx);
16822                }
16823            }
16824        }
16825        if let Some(ref val) = self.clr_sys_ref {
16826            let snap = violations.len();
16827            val.validate_constraints("", violations);
16828            if violations.len() > snap {
16829                let pfx = format!("{path}/ClrSysRef");
16830                for v in &mut violations[snap..] {
16831                    v.path.insert_str(0, &pfx);
16832                }
16833            }
16834        }
16835        if let Some(ref val) = self.instg_agt {
16836            let snap = violations.len();
16837            val.validate_constraints("", violations);
16838            if violations.len() > snap {
16839                let pfx = format!("{path}/InstgAgt");
16840                for v in &mut violations[snap..] {
16841                    v.path.insert_str(0, &pfx);
16842                }
16843            }
16844        }
16845        if let Some(ref val) = self.instd_agt {
16846            let snap = violations.len();
16847            val.validate_constraints("", violations);
16848            if violations.len() > snap {
16849                let pfx = format!("{path}/InstdAgt");
16850                for v in &mut violations[snap..] {
16851                    v.path.insert_str(0, &pfx);
16852                }
16853            }
16854        }
16855        if let Some(ref val) = self.rtr_chain {
16856            let snap = violations.len();
16857            val.validate_constraints("", violations);
16858            if violations.len() > snap {
16859                let pfx = format!("{path}/RtrChain");
16860                for v in &mut violations[snap..] {
16861                    v.path.insert_str(0, &pfx);
16862                }
16863            }
16864        }
16865        for (idx, elem) in self.rtr_rsn_inf.iter().enumerate() {
16866            let snap = violations.len();
16867            elem.validate_constraints("", violations);
16868            if violations.len() > snap {
16869                let pfx = format!("{path}/RtrRsnInf[{idx}]");
16870                for v in &mut violations[snap..] {
16871                    v.path.insert_str(0, &pfx);
16872                }
16873            }
16874        }
16875        if let Some(ref val) = self.orgnl_tx_ref {
16876            let snap = violations.len();
16877            val.validate_constraints("", violations);
16878            if violations.len() > snap {
16879                let pfx = format!("{path}/OrgnlTxRef");
16880                for v in &mut violations[snap..] {
16881                    v.path.insert_str(0, &pfx);
16882                }
16883            }
16884        }
16885        for (idx, elem) in self.splmtry_data.iter().enumerate() {
16886            let snap = violations.len();
16887            elem.validate_constraints("", violations);
16888            if violations.len() > snap {
16889                let pfx = format!("{path}/SplmtryData[{idx}]");
16890                for v in &mut violations[snap..] {
16891                    v.path.insert_str(0, &pfx);
16892                }
16893            }
16894        }
16895    }
16896}
16897impl crate::common::validate::Validatable for PaymentTypeInformation27 {
16898    fn validate_constraints(
16899        &self,
16900        path: &str,
16901        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16902    ) {
16903        if let Some(ref val) = self.instr_prty {
16904            let snap = violations.len();
16905            val.validate_constraints("", violations);
16906            if violations.len() > snap {
16907                let pfx = format!("{path}/InstrPrty");
16908                for v in &mut violations[snap..] {
16909                    v.path.insert_str(0, &pfx);
16910                }
16911            }
16912        }
16913        if let Some(ref val) = self.clr_chanl {
16914            let snap = violations.len();
16915            val.validate_constraints("", violations);
16916            if violations.len() > snap {
16917                let pfx = format!("{path}/ClrChanl");
16918                for v in &mut violations[snap..] {
16919                    v.path.insert_str(0, &pfx);
16920                }
16921            }
16922        }
16923        for (idx, elem) in self.svc_lvl.iter().enumerate() {
16924            let snap = violations.len();
16925            elem.inner.validate_constraints("", violations);
16926            if violations.len() > snap {
16927                let pfx = format!("{path}/SvcLvl[{idx}]");
16928                for v in &mut violations[snap..] {
16929                    v.path.insert_str(0, &pfx);
16930                }
16931            }
16932        }
16933        if let Some(ref wrapper) = self.lcl_instrm {
16934            let snap = violations.len();
16935            wrapper.inner.validate_constraints("", violations);
16936            if violations.len() > snap {
16937                let pfx = format!("{path}/LclInstrm");
16938                for v in &mut violations[snap..] {
16939                    v.path.insert_str(0, &pfx);
16940                }
16941            }
16942        }
16943        if let Some(ref val) = self.seq_tp {
16944            let snap = violations.len();
16945            val.validate_constraints("", violations);
16946            if violations.len() > snap {
16947                let pfx = format!("{path}/SeqTp");
16948                for v in &mut violations[snap..] {
16949                    v.path.insert_str(0, &pfx);
16950                }
16951            }
16952        }
16953        if let Some(ref wrapper) = self.ctgy_purp {
16954            let snap = violations.len();
16955            wrapper.inner.validate_constraints("", violations);
16956            if violations.len() > snap {
16957                let pfx = format!("{path}/CtgyPurp");
16958                for v in &mut violations[snap..] {
16959                    v.path.insert_str(0, &pfx);
16960                }
16961            }
16962        }
16963    }
16964}
16965impl crate::common::validate::Validatable for PaymentTypeInformation28 {
16966    fn validate_constraints(
16967        &self,
16968        path: &str,
16969        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16970    ) {
16971        if let Some(ref val) = self.instr_prty {
16972            let snap = violations.len();
16973            val.validate_constraints("", violations);
16974            if violations.len() > snap {
16975                let pfx = format!("{path}/InstrPrty");
16976                for v in &mut violations[snap..] {
16977                    v.path.insert_str(0, &pfx);
16978                }
16979            }
16980        }
16981        if let Some(ref val) = self.clr_chanl {
16982            let snap = violations.len();
16983            val.validate_constraints("", violations);
16984            if violations.len() > snap {
16985                let pfx = format!("{path}/ClrChanl");
16986                for v in &mut violations[snap..] {
16987                    v.path.insert_str(0, &pfx);
16988                }
16989            }
16990        }
16991        for (idx, elem) in self.svc_lvl.iter().enumerate() {
16992            let snap = violations.len();
16993            elem.inner.validate_constraints("", violations);
16994            if violations.len() > snap {
16995                let pfx = format!("{path}/SvcLvl[{idx}]");
16996                for v in &mut violations[snap..] {
16997                    v.path.insert_str(0, &pfx);
16998                }
16999            }
17000        }
17001        if let Some(ref wrapper) = self.lcl_instrm {
17002            let snap = violations.len();
17003            wrapper.inner.validate_constraints("", violations);
17004            if violations.len() > snap {
17005                let pfx = format!("{path}/LclInstrm");
17006                for v in &mut violations[snap..] {
17007                    v.path.insert_str(0, &pfx);
17008                }
17009            }
17010        }
17011        if let Some(ref wrapper) = self.ctgy_purp {
17012            let snap = violations.len();
17013            wrapper.inner.validate_constraints("", violations);
17014            if violations.len() > snap {
17015                let pfx = format!("{path}/CtgyPurp");
17016                for v in &mut violations[snap..] {
17017                    v.path.insert_str(0, &pfx);
17018                }
17019            }
17020        }
17021    }
17022}
17023impl crate::common::validate::Validatable for PersonIdentification13 {
17024    fn validate_constraints(
17025        &self,
17026        path: &str,
17027        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17028    ) {
17029        if let Some(ref val) = self.dt_and_plc_of_birth {
17030            let snap = violations.len();
17031            val.validate_constraints("", violations);
17032            if violations.len() > snap {
17033                let pfx = format!("{path}/DtAndPlcOfBirth");
17034                for v in &mut violations[snap..] {
17035                    v.path.insert_str(0, &pfx);
17036                }
17037            }
17038        }
17039        for (idx, elem) in self.othr.iter().enumerate() {
17040            let snap = violations.len();
17041            elem.validate_constraints("", violations);
17042            if violations.len() > snap {
17043                let pfx = format!("{path}/Othr[{idx}]");
17044                for v in &mut violations[snap..] {
17045                    v.path.insert_str(0, &pfx);
17046                }
17047            }
17048        }
17049    }
17050}
17051impl crate::common::validate::Validatable for PersonIdentificationSchemeName1Choice {
17052    fn validate_constraints(
17053        &self,
17054        path: &str,
17055        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17056    ) {
17057        match self {
17058            Self::Cd(inner) => {
17059                let snap = violations.len();
17060                inner.validate_constraints("", violations);
17061                if violations.len() > snap {
17062                    let pfx = format!("{path}/Cd");
17063                    for v in &mut violations[snap..] {
17064                        v.path.insert_str(0, &pfx);
17065                    }
17066                }
17067            }
17068            Self::Prtry(inner) => {
17069                let snap = violations.len();
17070                inner.validate_constraints("", violations);
17071                if violations.len() > snap {
17072                    let pfx = format!("{path}/Prtry");
17073                    for v in &mut violations[snap..] {
17074                        v.path.insert_str(0, &pfx);
17075                    }
17076                }
17077            }
17078        }
17079    }
17080}
17081impl crate::common::validate::Validatable for PostalAddress24 {
17082    fn validate_constraints(
17083        &self,
17084        path: &str,
17085        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17086    ) {
17087        if let Some(ref wrapper) = self.adr_tp {
17088            let snap = violations.len();
17089            wrapper.inner.validate_constraints("", violations);
17090            if violations.len() > snap {
17091                let pfx = format!("{path}/AdrTp");
17092                for v in &mut violations[snap..] {
17093                    v.path.insert_str(0, &pfx);
17094                }
17095            }
17096        }
17097        if let Some(ref val) = self.dept {
17098            let snap = violations.len();
17099            val.validate_constraints("", violations);
17100            if violations.len() > snap {
17101                let pfx = format!("{path}/Dept");
17102                for v in &mut violations[snap..] {
17103                    v.path.insert_str(0, &pfx);
17104                }
17105            }
17106        }
17107        if let Some(ref val) = self.sub_dept {
17108            let snap = violations.len();
17109            val.validate_constraints("", violations);
17110            if violations.len() > snap {
17111                let pfx = format!("{path}/SubDept");
17112                for v in &mut violations[snap..] {
17113                    v.path.insert_str(0, &pfx);
17114                }
17115            }
17116        }
17117        if let Some(ref val) = self.strt_nm {
17118            let snap = violations.len();
17119            val.validate_constraints("", violations);
17120            if violations.len() > snap {
17121                let pfx = format!("{path}/StrtNm");
17122                for v in &mut violations[snap..] {
17123                    v.path.insert_str(0, &pfx);
17124                }
17125            }
17126        }
17127        if let Some(ref val) = self.bldg_nb {
17128            let snap = violations.len();
17129            val.validate_constraints("", violations);
17130            if violations.len() > snap {
17131                let pfx = format!("{path}/BldgNb");
17132                for v in &mut violations[snap..] {
17133                    v.path.insert_str(0, &pfx);
17134                }
17135            }
17136        }
17137        if let Some(ref val) = self.bldg_nm {
17138            let snap = violations.len();
17139            val.validate_constraints("", violations);
17140            if violations.len() > snap {
17141                let pfx = format!("{path}/BldgNm");
17142                for v in &mut violations[snap..] {
17143                    v.path.insert_str(0, &pfx);
17144                }
17145            }
17146        }
17147        if let Some(ref val) = self.flr {
17148            let snap = violations.len();
17149            val.validate_constraints("", violations);
17150            if violations.len() > snap {
17151                let pfx = format!("{path}/Flr");
17152                for v in &mut violations[snap..] {
17153                    v.path.insert_str(0, &pfx);
17154                }
17155            }
17156        }
17157        if let Some(ref val) = self.pst_bx {
17158            let snap = violations.len();
17159            val.validate_constraints("", violations);
17160            if violations.len() > snap {
17161                let pfx = format!("{path}/PstBx");
17162                for v in &mut violations[snap..] {
17163                    v.path.insert_str(0, &pfx);
17164                }
17165            }
17166        }
17167        if let Some(ref val) = self.room {
17168            let snap = violations.len();
17169            val.validate_constraints("", violations);
17170            if violations.len() > snap {
17171                let pfx = format!("{path}/Room");
17172                for v in &mut violations[snap..] {
17173                    v.path.insert_str(0, &pfx);
17174                }
17175            }
17176        }
17177        if let Some(ref val) = self.pst_cd {
17178            let snap = violations.len();
17179            val.validate_constraints("", violations);
17180            if violations.len() > snap {
17181                let pfx = format!("{path}/PstCd");
17182                for v in &mut violations[snap..] {
17183                    v.path.insert_str(0, &pfx);
17184                }
17185            }
17186        }
17187        if let Some(ref val) = self.twn_nm {
17188            let snap = violations.len();
17189            val.validate_constraints("", violations);
17190            if violations.len() > snap {
17191                let pfx = format!("{path}/TwnNm");
17192                for v in &mut violations[snap..] {
17193                    v.path.insert_str(0, &pfx);
17194                }
17195            }
17196        }
17197        if let Some(ref val) = self.twn_lctn_nm {
17198            let snap = violations.len();
17199            val.validate_constraints("", violations);
17200            if violations.len() > snap {
17201                let pfx = format!("{path}/TwnLctnNm");
17202                for v in &mut violations[snap..] {
17203                    v.path.insert_str(0, &pfx);
17204                }
17205            }
17206        }
17207        if let Some(ref val) = self.dstrct_nm {
17208            let snap = violations.len();
17209            val.validate_constraints("", violations);
17210            if violations.len() > snap {
17211                let pfx = format!("{path}/DstrctNm");
17212                for v in &mut violations[snap..] {
17213                    v.path.insert_str(0, &pfx);
17214                }
17215            }
17216        }
17217        if let Some(ref val) = self.ctry_sub_dvsn {
17218            let snap = violations.len();
17219            val.validate_constraints("", violations);
17220            if violations.len() > snap {
17221                let pfx = format!("{path}/CtrySubDvsn");
17222                for v in &mut violations[snap..] {
17223                    v.path.insert_str(0, &pfx);
17224                }
17225            }
17226        }
17227        if let Some(ref val) = self.ctry {
17228            let snap = violations.len();
17229            val.validate_constraints("", violations);
17230            if violations.len() > snap {
17231                let pfx = format!("{path}/Ctry");
17232                for v in &mut violations[snap..] {
17233                    v.path.insert_str(0, &pfx);
17234                }
17235            }
17236        }
17237        for (idx, elem) in self.adr_line.iter().enumerate() {
17238            let snap = violations.len();
17239            elem.validate_constraints("", violations);
17240            if violations.len() > snap {
17241                let pfx = format!("{path}/AdrLine[{idx}]");
17242                for v in &mut violations[snap..] {
17243                    v.path.insert_str(0, &pfx);
17244                }
17245            }
17246        }
17247    }
17248}
17249impl crate::common::validate::Validatable for ProxyAccountIdentification1 {
17250    fn validate_constraints(
17251        &self,
17252        path: &str,
17253        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17254    ) {
17255        if let Some(ref wrapper) = self.tp {
17256            let snap = violations.len();
17257            wrapper.inner.validate_constraints("", violations);
17258            if violations.len() > snap {
17259                let pfx = format!("{path}/Tp");
17260                for v in &mut violations[snap..] {
17261                    v.path.insert_str(0, &pfx);
17262                }
17263            }
17264        }
17265        {
17266            let snap = violations.len();
17267            self.id.validate_constraints("", violations);
17268            if violations.len() > snap {
17269                let pfx = format!("{path}/Id");
17270                for v in &mut violations[snap..] {
17271                    v.path.insert_str(0, &pfx);
17272                }
17273            }
17274        }
17275    }
17276}
17277impl crate::common::validate::Validatable for ProxyAccountType1Choice {
17278    fn validate_constraints(
17279        &self,
17280        path: &str,
17281        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17282    ) {
17283        match self {
17284            Self::Cd(inner) => {
17285                let snap = violations.len();
17286                inner.validate_constraints("", violations);
17287                if violations.len() > snap {
17288                    let pfx = format!("{path}/Cd");
17289                    for v in &mut violations[snap..] {
17290                        v.path.insert_str(0, &pfx);
17291                    }
17292                }
17293            }
17294            Self::Prtry(inner) => {
17295                let snap = violations.len();
17296                inner.validate_constraints("", violations);
17297                if violations.len() > snap {
17298                    let pfx = format!("{path}/Prtry");
17299                    for v in &mut violations[snap..] {
17300                        v.path.insert_str(0, &pfx);
17301                    }
17302                }
17303            }
17304        }
17305    }
17306}
17307impl crate::common::validate::Validatable for Purpose2Choice {
17308    fn validate_constraints(
17309        &self,
17310        path: &str,
17311        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17312    ) {
17313        match self {
17314            Self::Cd(inner) => {
17315                let snap = violations.len();
17316                inner.validate_constraints("", violations);
17317                if violations.len() > snap {
17318                    let pfx = format!("{path}/Cd");
17319                    for v in &mut violations[snap..] {
17320                        v.path.insert_str(0, &pfx);
17321                    }
17322                }
17323            }
17324            Self::Prtry(inner) => {
17325                let snap = violations.len();
17326                inner.validate_constraints("", violations);
17327                if violations.len() > snap {
17328                    let pfx = format!("{path}/Prtry");
17329                    for v in &mut violations[snap..] {
17330                        v.path.insert_str(0, &pfx);
17331                    }
17332                }
17333            }
17334        }
17335    }
17336}
17337impl crate::common::validate::Validatable for ReferredDocumentInformation7 {
17338    fn validate_constraints(
17339        &self,
17340        path: &str,
17341        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17342    ) {
17343        if let Some(ref val) = self.tp {
17344            let snap = violations.len();
17345            val.validate_constraints("", violations);
17346            if violations.len() > snap {
17347                let pfx = format!("{path}/Tp");
17348                for v in &mut violations[snap..] {
17349                    v.path.insert_str(0, &pfx);
17350                }
17351            }
17352        }
17353        if let Some(ref val) = self.nb {
17354            let snap = violations.len();
17355            val.validate_constraints("", violations);
17356            if violations.len() > snap {
17357                let pfx = format!("{path}/Nb");
17358                for v in &mut violations[snap..] {
17359                    v.path.insert_str(0, &pfx);
17360                }
17361            }
17362        }
17363        if let Some(ref val) = self.rltd_dt {
17364            let snap = violations.len();
17365            val.validate_constraints("", violations);
17366            if violations.len() > snap {
17367                let pfx = format!("{path}/RltdDt");
17368                for v in &mut violations[snap..] {
17369                    v.path.insert_str(0, &pfx);
17370                }
17371            }
17372        }
17373        for (idx, elem) in self.line_dtls.iter().enumerate() {
17374            let snap = violations.len();
17375            elem.validate_constraints("", violations);
17376            if violations.len() > snap {
17377                let pfx = format!("{path}/LineDtls[{idx}]");
17378                for v in &mut violations[snap..] {
17379                    v.path.insert_str(0, &pfx);
17380                }
17381            }
17382        }
17383    }
17384}
17385impl crate::common::validate::Validatable for ReferredDocumentType3Choice {
17386    fn validate_constraints(
17387        &self,
17388        path: &str,
17389        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17390    ) {
17391        match self {
17392            Self::Cd(inner) => {
17393                let snap = violations.len();
17394                inner.validate_constraints("", violations);
17395                if violations.len() > snap {
17396                    let pfx = format!("{path}/Cd");
17397                    for v in &mut violations[snap..] {
17398                        v.path.insert_str(0, &pfx);
17399                    }
17400                }
17401            }
17402            Self::Prtry(inner) => {
17403                let snap = violations.len();
17404                inner.validate_constraints("", violations);
17405                if violations.len() > snap {
17406                    let pfx = format!("{path}/Prtry");
17407                    for v in &mut violations[snap..] {
17408                        v.path.insert_str(0, &pfx);
17409                    }
17410                }
17411            }
17412        }
17413    }
17414}
17415impl crate::common::validate::Validatable for ReferredDocumentType4 {
17416    fn validate_constraints(
17417        &self,
17418        path: &str,
17419        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17420    ) {
17421        {
17422            let snap = violations.len();
17423            self.cd_or_prtry.inner.validate_constraints("", violations);
17424            if violations.len() > snap {
17425                let pfx = format!("{path}/CdOrPrtry");
17426                for v in &mut violations[snap..] {
17427                    v.path.insert_str(0, &pfx);
17428                }
17429            }
17430        }
17431        if let Some(ref val) = self.issr {
17432            let snap = violations.len();
17433            val.validate_constraints("", violations);
17434            if violations.len() > snap {
17435                let pfx = format!("{path}/Issr");
17436                for v in &mut violations[snap..] {
17437                    v.path.insert_str(0, &pfx);
17438                }
17439            }
17440        }
17441    }
17442}
17443impl crate::common::validate::Validatable for RemittanceAmount2 {
17444    fn validate_constraints(
17445        &self,
17446        path: &str,
17447        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17448    ) {
17449        if let Some(ref val) = self.due_pybl_amt {
17450            let snap = violations.len();
17451            val.validate_constraints("", violations);
17452            if violations.len() > snap {
17453                let pfx = format!("{path}/DuePyblAmt");
17454                for v in &mut violations[snap..] {
17455                    v.path.insert_str(0, &pfx);
17456                }
17457            }
17458        }
17459        for (idx, elem) in self.dscnt_apld_amt.iter().enumerate() {
17460            let snap = violations.len();
17461            elem.validate_constraints("", violations);
17462            if violations.len() > snap {
17463                let pfx = format!("{path}/DscntApldAmt[{idx}]");
17464                for v in &mut violations[snap..] {
17465                    v.path.insert_str(0, &pfx);
17466                }
17467            }
17468        }
17469        if let Some(ref val) = self.cdt_note_amt {
17470            let snap = violations.len();
17471            val.validate_constraints("", violations);
17472            if violations.len() > snap {
17473                let pfx = format!("{path}/CdtNoteAmt");
17474                for v in &mut violations[snap..] {
17475                    v.path.insert_str(0, &pfx);
17476                }
17477            }
17478        }
17479        for (idx, elem) in self.tax_amt.iter().enumerate() {
17480            let snap = violations.len();
17481            elem.validate_constraints("", violations);
17482            if violations.len() > snap {
17483                let pfx = format!("{path}/TaxAmt[{idx}]");
17484                for v in &mut violations[snap..] {
17485                    v.path.insert_str(0, &pfx);
17486                }
17487            }
17488        }
17489        for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
17490            let snap = violations.len();
17491            elem.validate_constraints("", violations);
17492            if violations.len() > snap {
17493                let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
17494                for v in &mut violations[snap..] {
17495                    v.path.insert_str(0, &pfx);
17496                }
17497            }
17498        }
17499        if let Some(ref val) = self.rmtd_amt {
17500            let snap = violations.len();
17501            val.validate_constraints("", violations);
17502            if violations.len() > snap {
17503                let pfx = format!("{path}/RmtdAmt");
17504                for v in &mut violations[snap..] {
17505                    v.path.insert_str(0, &pfx);
17506                }
17507            }
17508        }
17509    }
17510}
17511impl crate::common::validate::Validatable for RemittanceAmount3 {
17512    fn validate_constraints(
17513        &self,
17514        path: &str,
17515        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17516    ) {
17517        if let Some(ref val) = self.due_pybl_amt {
17518            let snap = violations.len();
17519            val.validate_constraints("", violations);
17520            if violations.len() > snap {
17521                let pfx = format!("{path}/DuePyblAmt");
17522                for v in &mut violations[snap..] {
17523                    v.path.insert_str(0, &pfx);
17524                }
17525            }
17526        }
17527        for (idx, elem) in self.dscnt_apld_amt.iter().enumerate() {
17528            let snap = violations.len();
17529            elem.validate_constraints("", violations);
17530            if violations.len() > snap {
17531                let pfx = format!("{path}/DscntApldAmt[{idx}]");
17532                for v in &mut violations[snap..] {
17533                    v.path.insert_str(0, &pfx);
17534                }
17535            }
17536        }
17537        if let Some(ref val) = self.cdt_note_amt {
17538            let snap = violations.len();
17539            val.validate_constraints("", violations);
17540            if violations.len() > snap {
17541                let pfx = format!("{path}/CdtNoteAmt");
17542                for v in &mut violations[snap..] {
17543                    v.path.insert_str(0, &pfx);
17544                }
17545            }
17546        }
17547        for (idx, elem) in self.tax_amt.iter().enumerate() {
17548            let snap = violations.len();
17549            elem.validate_constraints("", violations);
17550            if violations.len() > snap {
17551                let pfx = format!("{path}/TaxAmt[{idx}]");
17552                for v in &mut violations[snap..] {
17553                    v.path.insert_str(0, &pfx);
17554                }
17555            }
17556        }
17557        for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
17558            let snap = violations.len();
17559            elem.validate_constraints("", violations);
17560            if violations.len() > snap {
17561                let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
17562                for v in &mut violations[snap..] {
17563                    v.path.insert_str(0, &pfx);
17564                }
17565            }
17566        }
17567        if let Some(ref val) = self.rmtd_amt {
17568            let snap = violations.len();
17569            val.validate_constraints("", violations);
17570            if violations.len() > snap {
17571                let pfx = format!("{path}/RmtdAmt");
17572                for v in &mut violations[snap..] {
17573                    v.path.insert_str(0, &pfx);
17574                }
17575            }
17576        }
17577    }
17578}
17579impl crate::common::validate::Validatable for RemittanceInformation21 {
17580    fn validate_constraints(
17581        &self,
17582        path: &str,
17583        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17584    ) {
17585        for (idx, elem) in self.ustrd.iter().enumerate() {
17586            let snap = violations.len();
17587            elem.validate_constraints("", violations);
17588            if violations.len() > snap {
17589                let pfx = format!("{path}/Ustrd[{idx}]");
17590                for v in &mut violations[snap..] {
17591                    v.path.insert_str(0, &pfx);
17592                }
17593            }
17594        }
17595        for (idx, elem) in self.strd.iter().enumerate() {
17596            let snap = violations.len();
17597            elem.validate_constraints("", violations);
17598            if violations.len() > snap {
17599                let pfx = format!("{path}/Strd[{idx}]");
17600                for v in &mut violations[snap..] {
17601                    v.path.insert_str(0, &pfx);
17602                }
17603            }
17604        }
17605    }
17606}
17607impl crate::common::validate::Validatable for ReturnReason5Choice {
17608    fn validate_constraints(
17609        &self,
17610        path: &str,
17611        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17612    ) {
17613        match self {
17614            Self::Cd(inner) => {
17615                let snap = violations.len();
17616                inner.validate_constraints("", violations);
17617                if violations.len() > snap {
17618                    let pfx = format!("{path}/Cd");
17619                    for v in &mut violations[snap..] {
17620                        v.path.insert_str(0, &pfx);
17621                    }
17622                }
17623            }
17624            Self::Prtry(inner) => {
17625                let snap = violations.len();
17626                inner.validate_constraints("", violations);
17627                if violations.len() > snap {
17628                    let pfx = format!("{path}/Prtry");
17629                    for v in &mut violations[snap..] {
17630                        v.path.insert_str(0, &pfx);
17631                    }
17632                }
17633            }
17634        }
17635    }
17636}
17637impl crate::common::validate::Validatable for ServiceLevel8Choice {
17638    fn validate_constraints(
17639        &self,
17640        path: &str,
17641        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17642    ) {
17643        match self {
17644            Self::Cd(inner) => {
17645                let snap = violations.len();
17646                inner.validate_constraints("", violations);
17647                if violations.len() > snap {
17648                    let pfx = format!("{path}/Cd");
17649                    for v in &mut violations[snap..] {
17650                        v.path.insert_str(0, &pfx);
17651                    }
17652                }
17653            }
17654            Self::Prtry(inner) => {
17655                let snap = violations.len();
17656                inner.validate_constraints("", violations);
17657                if violations.len() > snap {
17658                    let pfx = format!("{path}/Prtry");
17659                    for v in &mut violations[snap..] {
17660                        v.path.insert_str(0, &pfx);
17661                    }
17662                }
17663            }
17664        }
17665    }
17666}
17667impl crate::common::validate::Validatable for SettlementDateTimeIndication1 {
17668    fn validate_constraints(
17669        &self,
17670        path: &str,
17671        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17672    ) {
17673        if let Some(ref val) = self.dbt_dt_tm {
17674            let snap = violations.len();
17675            val.validate_constraints("", violations);
17676            if violations.len() > snap {
17677                let pfx = format!("{path}/DbtDtTm");
17678                for v in &mut violations[snap..] {
17679                    v.path.insert_str(0, &pfx);
17680                }
17681            }
17682        }
17683        if let Some(ref val) = self.cdt_dt_tm {
17684            let snap = violations.len();
17685            val.validate_constraints("", violations);
17686            if violations.len() > snap {
17687                let pfx = format!("{path}/CdtDtTm");
17688                for v in &mut violations[snap..] {
17689                    v.path.insert_str(0, &pfx);
17690                }
17691            }
17692        }
17693    }
17694}
17695impl crate::common::validate::Validatable for SettlementInstruction11 {
17696    fn validate_constraints(
17697        &self,
17698        path: &str,
17699        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17700    ) {
17701        {
17702            let snap = violations.len();
17703            self.sttlm_mtd.validate_constraints("", violations);
17704            if violations.len() > snap {
17705                let pfx = format!("{path}/SttlmMtd");
17706                for v in &mut violations[snap..] {
17707                    v.path.insert_str(0, &pfx);
17708                }
17709            }
17710        }
17711        if let Some(ref val) = self.sttlm_acct {
17712            let snap = violations.len();
17713            val.validate_constraints("", violations);
17714            if violations.len() > snap {
17715                let pfx = format!("{path}/SttlmAcct");
17716                for v in &mut violations[snap..] {
17717                    v.path.insert_str(0, &pfx);
17718                }
17719            }
17720        }
17721        if let Some(ref wrapper) = self.clr_sys {
17722            let snap = violations.len();
17723            wrapper.inner.validate_constraints("", violations);
17724            if violations.len() > snap {
17725                let pfx = format!("{path}/ClrSys");
17726                for v in &mut violations[snap..] {
17727                    v.path.insert_str(0, &pfx);
17728                }
17729            }
17730        }
17731        if let Some(ref val) = self.instg_rmbrsmnt_agt {
17732            let snap = violations.len();
17733            val.validate_constraints("", violations);
17734            if violations.len() > snap {
17735                let pfx = format!("{path}/InstgRmbrsmntAgt");
17736                for v in &mut violations[snap..] {
17737                    v.path.insert_str(0, &pfx);
17738                }
17739            }
17740        }
17741        if let Some(ref val) = self.instg_rmbrsmnt_agt_acct {
17742            let snap = violations.len();
17743            val.validate_constraints("", violations);
17744            if violations.len() > snap {
17745                let pfx = format!("{path}/InstgRmbrsmntAgtAcct");
17746                for v in &mut violations[snap..] {
17747                    v.path.insert_str(0, &pfx);
17748                }
17749            }
17750        }
17751        if let Some(ref val) = self.instd_rmbrsmnt_agt {
17752            let snap = violations.len();
17753            val.validate_constraints("", violations);
17754            if violations.len() > snap {
17755                let pfx = format!("{path}/InstdRmbrsmntAgt");
17756                for v in &mut violations[snap..] {
17757                    v.path.insert_str(0, &pfx);
17758                }
17759            }
17760        }
17761        if let Some(ref val) = self.instd_rmbrsmnt_agt_acct {
17762            let snap = violations.len();
17763            val.validate_constraints("", violations);
17764            if violations.len() > snap {
17765                let pfx = format!("{path}/InstdRmbrsmntAgtAcct");
17766                for v in &mut violations[snap..] {
17767                    v.path.insert_str(0, &pfx);
17768                }
17769            }
17770        }
17771        if let Some(ref val) = self.thrd_rmbrsmnt_agt {
17772            let snap = violations.len();
17773            val.validate_constraints("", violations);
17774            if violations.len() > snap {
17775                let pfx = format!("{path}/ThrdRmbrsmntAgt");
17776                for v in &mut violations[snap..] {
17777                    v.path.insert_str(0, &pfx);
17778                }
17779            }
17780        }
17781        if let Some(ref val) = self.thrd_rmbrsmnt_agt_acct {
17782            let snap = violations.len();
17783            val.validate_constraints("", violations);
17784            if violations.len() > snap {
17785                let pfx = format!("{path}/ThrdRmbrsmntAgtAcct");
17786                for v in &mut violations[snap..] {
17787                    v.path.insert_str(0, &pfx);
17788                }
17789            }
17790        }
17791    }
17792}
17793impl crate::common::validate::Validatable for SettlementTimeRequest2 {
17794    fn validate_constraints(
17795        &self,
17796        path: &str,
17797        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17798    ) {
17799        if let Some(ref val) = self.cls_tm {
17800            let snap = violations.len();
17801            val.validate_constraints("", violations);
17802            if violations.len() > snap {
17803                let pfx = format!("{path}/CLSTm");
17804                for v in &mut violations[snap..] {
17805                    v.path.insert_str(0, &pfx);
17806                }
17807            }
17808        }
17809        if let Some(ref val) = self.till_tm {
17810            let snap = violations.len();
17811            val.validate_constraints("", violations);
17812            if violations.len() > snap {
17813                let pfx = format!("{path}/TillTm");
17814                for v in &mut violations[snap..] {
17815                    v.path.insert_str(0, &pfx);
17816                }
17817            }
17818        }
17819        if let Some(ref val) = self.fr_tm {
17820            let snap = violations.len();
17821            val.validate_constraints("", violations);
17822            if violations.len() > snap {
17823                let pfx = format!("{path}/FrTm");
17824                for v in &mut violations[snap..] {
17825                    v.path.insert_str(0, &pfx);
17826                }
17827            }
17828        }
17829        if let Some(ref val) = self.rjct_tm {
17830            let snap = violations.len();
17831            val.validate_constraints("", violations);
17832            if violations.len() > snap {
17833                let pfx = format!("{path}/RjctTm");
17834                for v in &mut violations[snap..] {
17835                    v.path.insert_str(0, &pfx);
17836                }
17837            }
17838        }
17839    }
17840}
17841impl crate::common::validate::Validatable for StructuredRemittanceInformation17 {
17842    fn validate_constraints(
17843        &self,
17844        path: &str,
17845        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17846    ) {
17847        for (idx, elem) in self.rfrd_doc_inf.iter().enumerate() {
17848            let snap = violations.len();
17849            elem.validate_constraints("", violations);
17850            if violations.len() > snap {
17851                let pfx = format!("{path}/RfrdDocInf[{idx}]");
17852                for v in &mut violations[snap..] {
17853                    v.path.insert_str(0, &pfx);
17854                }
17855            }
17856        }
17857        if let Some(ref val) = self.rfrd_doc_amt {
17858            let snap = violations.len();
17859            val.validate_constraints("", violations);
17860            if violations.len() > snap {
17861                let pfx = format!("{path}/RfrdDocAmt");
17862                for v in &mut violations[snap..] {
17863                    v.path.insert_str(0, &pfx);
17864                }
17865            }
17866        }
17867        if let Some(ref val) = self.cdtr_ref_inf {
17868            let snap = violations.len();
17869            val.validate_constraints("", violations);
17870            if violations.len() > snap {
17871                let pfx = format!("{path}/CdtrRefInf");
17872                for v in &mut violations[snap..] {
17873                    v.path.insert_str(0, &pfx);
17874                }
17875            }
17876        }
17877        if let Some(ref val) = self.invcr {
17878            let snap = violations.len();
17879            val.validate_constraints("", violations);
17880            if violations.len() > snap {
17881                let pfx = format!("{path}/Invcr");
17882                for v in &mut violations[snap..] {
17883                    v.path.insert_str(0, &pfx);
17884                }
17885            }
17886        }
17887        if let Some(ref val) = self.invcee {
17888            let snap = violations.len();
17889            val.validate_constraints("", violations);
17890            if violations.len() > snap {
17891                let pfx = format!("{path}/Invcee");
17892                for v in &mut violations[snap..] {
17893                    v.path.insert_str(0, &pfx);
17894                }
17895            }
17896        }
17897        if let Some(ref val) = self.tax_rmt {
17898            let snap = violations.len();
17899            val.validate_constraints("", violations);
17900            if violations.len() > snap {
17901                let pfx = format!("{path}/TaxRmt");
17902                for v in &mut violations[snap..] {
17903                    v.path.insert_str(0, &pfx);
17904                }
17905            }
17906        }
17907        if let Some(ref val) = self.grnshmt_rmt {
17908            let snap = violations.len();
17909            val.validate_constraints("", violations);
17910            if violations.len() > snap {
17911                let pfx = format!("{path}/GrnshmtRmt");
17912                for v in &mut violations[snap..] {
17913                    v.path.insert_str(0, &pfx);
17914                }
17915            }
17916        }
17917        for (idx, elem) in self.addtl_rmt_inf.iter().enumerate() {
17918            let snap = violations.len();
17919            elem.validate_constraints("", violations);
17920            if violations.len() > snap {
17921                let pfx = format!("{path}/AddtlRmtInf[{idx}]");
17922                for v in &mut violations[snap..] {
17923                    v.path.insert_str(0, &pfx);
17924                }
17925            }
17926        }
17927    }
17928}
17929impl crate::common::validate::Validatable for SupplementaryData1 {
17930    fn validate_constraints(
17931        &self,
17932        path: &str,
17933        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17934    ) {
17935        if let Some(ref val) = self.plc_and_nm {
17936            let snap = violations.len();
17937            val.validate_constraints("", violations);
17938            if violations.len() > snap {
17939                let pfx = format!("{path}/PlcAndNm");
17940                for v in &mut violations[snap..] {
17941                    v.path.insert_str(0, &pfx);
17942                }
17943            }
17944        }
17945        {
17946            let snap = violations.len();
17947            self.envlp.validate_constraints("", violations);
17948            if violations.len() > snap {
17949                let pfx = format!("{path}/Envlp");
17950                for v in &mut violations[snap..] {
17951                    v.path.insert_str(0, &pfx);
17952                }
17953            }
17954        }
17955    }
17956}
17957impl crate::common::validate::Validatable for SupplementaryDataEnvelope1 {
17958    fn validate_constraints(
17959        &self,
17960        _path: &str,
17961        _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17962    ) {
17963    }
17964}
17965impl crate::common::validate::Validatable for TaxAmount3 {
17966    fn validate_constraints(
17967        &self,
17968        path: &str,
17969        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17970    ) {
17971        if let Some(ref val) = self.rate {
17972            let snap = violations.len();
17973            val.validate_constraints("", violations);
17974            if violations.len() > snap {
17975                let pfx = format!("{path}/Rate");
17976                for v in &mut violations[snap..] {
17977                    v.path.insert_str(0, &pfx);
17978                }
17979            }
17980        }
17981        if let Some(ref val) = self.taxbl_base_amt {
17982            let snap = violations.len();
17983            val.validate_constraints("", violations);
17984            if violations.len() > snap {
17985                let pfx = format!("{path}/TaxblBaseAmt");
17986                for v in &mut violations[snap..] {
17987                    v.path.insert_str(0, &pfx);
17988                }
17989            }
17990        }
17991        if let Some(ref val) = self.ttl_amt {
17992            let snap = violations.len();
17993            val.validate_constraints("", violations);
17994            if violations.len() > snap {
17995                let pfx = format!("{path}/TtlAmt");
17996                for v in &mut violations[snap..] {
17997                    v.path.insert_str(0, &pfx);
17998                }
17999            }
18000        }
18001        for (idx, elem) in self.dtls.iter().enumerate() {
18002            let snap = violations.len();
18003            elem.validate_constraints("", violations);
18004            if violations.len() > snap {
18005                let pfx = format!("{path}/Dtls[{idx}]");
18006                for v in &mut violations[snap..] {
18007                    v.path.insert_str(0, &pfx);
18008                }
18009            }
18010        }
18011    }
18012}
18013impl crate::common::validate::Validatable for TaxAmountAndType1 {
18014    fn validate_constraints(
18015        &self,
18016        path: &str,
18017        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18018    ) {
18019        if let Some(ref wrapper) = self.tp {
18020            let snap = violations.len();
18021            wrapper.inner.validate_constraints("", violations);
18022            if violations.len() > snap {
18023                let pfx = format!("{path}/Tp");
18024                for v in &mut violations[snap..] {
18025                    v.path.insert_str(0, &pfx);
18026                }
18027            }
18028        }
18029        {
18030            let snap = violations.len();
18031            self.amt.validate_constraints("", violations);
18032            if violations.len() > snap {
18033                let pfx = format!("{path}/Amt");
18034                for v in &mut violations[snap..] {
18035                    v.path.insert_str(0, &pfx);
18036                }
18037            }
18038        }
18039    }
18040}
18041impl crate::common::validate::Validatable for TaxAmountType1Choice {
18042    fn validate_constraints(
18043        &self,
18044        path: &str,
18045        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18046    ) {
18047        match self {
18048            Self::Cd(inner) => {
18049                let snap = violations.len();
18050                inner.validate_constraints("", violations);
18051                if violations.len() > snap {
18052                    let pfx = format!("{path}/Cd");
18053                    for v in &mut violations[snap..] {
18054                        v.path.insert_str(0, &pfx);
18055                    }
18056                }
18057            }
18058            Self::Prtry(inner) => {
18059                let snap = violations.len();
18060                inner.validate_constraints("", violations);
18061                if violations.len() > snap {
18062                    let pfx = format!("{path}/Prtry");
18063                    for v in &mut violations[snap..] {
18064                        v.path.insert_str(0, &pfx);
18065                    }
18066                }
18067            }
18068        }
18069    }
18070}
18071impl crate::common::validate::Validatable for TaxAuthorisation1 {
18072    fn validate_constraints(
18073        &self,
18074        path: &str,
18075        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18076    ) {
18077        if let Some(ref val) = self.titl {
18078            let snap = violations.len();
18079            val.validate_constraints("", violations);
18080            if violations.len() > snap {
18081                let pfx = format!("{path}/Titl");
18082                for v in &mut violations[snap..] {
18083                    v.path.insert_str(0, &pfx);
18084                }
18085            }
18086        }
18087        if let Some(ref val) = self.nm {
18088            let snap = violations.len();
18089            val.validate_constraints("", violations);
18090            if violations.len() > snap {
18091                let pfx = format!("{path}/Nm");
18092                for v in &mut violations[snap..] {
18093                    v.path.insert_str(0, &pfx);
18094                }
18095            }
18096        }
18097    }
18098}
18099impl crate::common::validate::Validatable for TaxData1 {
18100    fn validate_constraints(
18101        &self,
18102        path: &str,
18103        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18104    ) {
18105        if let Some(ref val) = self.cdtr {
18106            let snap = violations.len();
18107            val.validate_constraints("", violations);
18108            if violations.len() > snap {
18109                let pfx = format!("{path}/Cdtr");
18110                for v in &mut violations[snap..] {
18111                    v.path.insert_str(0, &pfx);
18112                }
18113            }
18114        }
18115        if let Some(ref val) = self.dbtr {
18116            let snap = violations.len();
18117            val.validate_constraints("", violations);
18118            if violations.len() > snap {
18119                let pfx = format!("{path}/Dbtr");
18120                for v in &mut violations[snap..] {
18121                    v.path.insert_str(0, &pfx);
18122                }
18123            }
18124        }
18125        if let Some(ref val) = self.ultmt_dbtr {
18126            let snap = violations.len();
18127            val.validate_constraints("", violations);
18128            if violations.len() > snap {
18129                let pfx = format!("{path}/UltmtDbtr");
18130                for v in &mut violations[snap..] {
18131                    v.path.insert_str(0, &pfx);
18132                }
18133            }
18134        }
18135        if let Some(ref val) = self.admstn_zone {
18136            let snap = violations.len();
18137            val.validate_constraints("", violations);
18138            if violations.len() > snap {
18139                let pfx = format!("{path}/AdmstnZone");
18140                for v in &mut violations[snap..] {
18141                    v.path.insert_str(0, &pfx);
18142                }
18143            }
18144        }
18145        if let Some(ref val) = self.ref_nb {
18146            let snap = violations.len();
18147            val.validate_constraints("", violations);
18148            if violations.len() > snap {
18149                let pfx = format!("{path}/RefNb");
18150                for v in &mut violations[snap..] {
18151                    v.path.insert_str(0, &pfx);
18152                }
18153            }
18154        }
18155        if let Some(ref val) = self.mtd {
18156            let snap = violations.len();
18157            val.validate_constraints("", violations);
18158            if violations.len() > snap {
18159                let pfx = format!("{path}/Mtd");
18160                for v in &mut violations[snap..] {
18161                    v.path.insert_str(0, &pfx);
18162                }
18163            }
18164        }
18165        if let Some(ref val) = self.ttl_taxbl_base_amt {
18166            let snap = violations.len();
18167            val.validate_constraints("", violations);
18168            if violations.len() > snap {
18169                let pfx = format!("{path}/TtlTaxblBaseAmt");
18170                for v in &mut violations[snap..] {
18171                    v.path.insert_str(0, &pfx);
18172                }
18173            }
18174        }
18175        if let Some(ref val) = self.ttl_tax_amt {
18176            let snap = violations.len();
18177            val.validate_constraints("", violations);
18178            if violations.len() > snap {
18179                let pfx = format!("{path}/TtlTaxAmt");
18180                for v in &mut violations[snap..] {
18181                    v.path.insert_str(0, &pfx);
18182                }
18183            }
18184        }
18185        if let Some(ref val) = self.dt {
18186            let snap = violations.len();
18187            val.validate_constraints("", violations);
18188            if violations.len() > snap {
18189                let pfx = format!("{path}/Dt");
18190                for v in &mut violations[snap..] {
18191                    v.path.insert_str(0, &pfx);
18192                }
18193            }
18194        }
18195        if let Some(ref val) = self.seq_nb {
18196            let snap = violations.len();
18197            val.validate_constraints("", violations);
18198            if violations.len() > snap {
18199                let pfx = format!("{path}/SeqNb");
18200                for v in &mut violations[snap..] {
18201                    v.path.insert_str(0, &pfx);
18202                }
18203            }
18204        }
18205        for (idx, elem) in self.rcrd.iter().enumerate() {
18206            let snap = violations.len();
18207            elem.validate_constraints("", violations);
18208            if violations.len() > snap {
18209                let pfx = format!("{path}/Rcrd[{idx}]");
18210                for v in &mut violations[snap..] {
18211                    v.path.insert_str(0, &pfx);
18212                }
18213            }
18214        }
18215    }
18216}
18217impl crate::common::validate::Validatable for TaxInformation10 {
18218    fn validate_constraints(
18219        &self,
18220        path: &str,
18221        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18222    ) {
18223        if let Some(ref val) = self.cdtr {
18224            let snap = violations.len();
18225            val.validate_constraints("", violations);
18226            if violations.len() > snap {
18227                let pfx = format!("{path}/Cdtr");
18228                for v in &mut violations[snap..] {
18229                    v.path.insert_str(0, &pfx);
18230                }
18231            }
18232        }
18233        if let Some(ref val) = self.dbtr {
18234            let snap = violations.len();
18235            val.validate_constraints("", violations);
18236            if violations.len() > snap {
18237                let pfx = format!("{path}/Dbtr");
18238                for v in &mut violations[snap..] {
18239                    v.path.insert_str(0, &pfx);
18240                }
18241            }
18242        }
18243        if let Some(ref val) = self.admstn_zone {
18244            let snap = violations.len();
18245            val.validate_constraints("", violations);
18246            if violations.len() > snap {
18247                let pfx = format!("{path}/AdmstnZone");
18248                for v in &mut violations[snap..] {
18249                    v.path.insert_str(0, &pfx);
18250                }
18251            }
18252        }
18253        if let Some(ref val) = self.ref_nb {
18254            let snap = violations.len();
18255            val.validate_constraints("", violations);
18256            if violations.len() > snap {
18257                let pfx = format!("{path}/RefNb");
18258                for v in &mut violations[snap..] {
18259                    v.path.insert_str(0, &pfx);
18260                }
18261            }
18262        }
18263        if let Some(ref val) = self.mtd {
18264            let snap = violations.len();
18265            val.validate_constraints("", violations);
18266            if violations.len() > snap {
18267                let pfx = format!("{path}/Mtd");
18268                for v in &mut violations[snap..] {
18269                    v.path.insert_str(0, &pfx);
18270                }
18271            }
18272        }
18273        if let Some(ref val) = self.ttl_taxbl_base_amt {
18274            let snap = violations.len();
18275            val.validate_constraints("", violations);
18276            if violations.len() > snap {
18277                let pfx = format!("{path}/TtlTaxblBaseAmt");
18278                for v in &mut violations[snap..] {
18279                    v.path.insert_str(0, &pfx);
18280                }
18281            }
18282        }
18283        if let Some(ref val) = self.ttl_tax_amt {
18284            let snap = violations.len();
18285            val.validate_constraints("", violations);
18286            if violations.len() > snap {
18287                let pfx = format!("{path}/TtlTaxAmt");
18288                for v in &mut violations[snap..] {
18289                    v.path.insert_str(0, &pfx);
18290                }
18291            }
18292        }
18293        if let Some(ref val) = self.dt {
18294            let snap = violations.len();
18295            val.validate_constraints("", violations);
18296            if violations.len() > snap {
18297                let pfx = format!("{path}/Dt");
18298                for v in &mut violations[snap..] {
18299                    v.path.insert_str(0, &pfx);
18300                }
18301            }
18302        }
18303        if let Some(ref val) = self.seq_nb {
18304            let snap = violations.len();
18305            val.validate_constraints("", violations);
18306            if violations.len() > snap {
18307                let pfx = format!("{path}/SeqNb");
18308                for v in &mut violations[snap..] {
18309                    v.path.insert_str(0, &pfx);
18310                }
18311            }
18312        }
18313        for (idx, elem) in self.rcrd.iter().enumerate() {
18314            let snap = violations.len();
18315            elem.validate_constraints("", violations);
18316            if violations.len() > snap {
18317                let pfx = format!("{path}/Rcrd[{idx}]");
18318                for v in &mut violations[snap..] {
18319                    v.path.insert_str(0, &pfx);
18320                }
18321            }
18322        }
18323    }
18324}
18325impl crate::common::validate::Validatable for TaxParty1 {
18326    fn validate_constraints(
18327        &self,
18328        path: &str,
18329        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18330    ) {
18331        if let Some(ref val) = self.tax_id {
18332            let snap = violations.len();
18333            val.validate_constraints("", violations);
18334            if violations.len() > snap {
18335                let pfx = format!("{path}/TaxId");
18336                for v in &mut violations[snap..] {
18337                    v.path.insert_str(0, &pfx);
18338                }
18339            }
18340        }
18341        if let Some(ref val) = self.regn_id {
18342            let snap = violations.len();
18343            val.validate_constraints("", violations);
18344            if violations.len() > snap {
18345                let pfx = format!("{path}/RegnId");
18346                for v in &mut violations[snap..] {
18347                    v.path.insert_str(0, &pfx);
18348                }
18349            }
18350        }
18351        if let Some(ref val) = self.tax_tp {
18352            let snap = violations.len();
18353            val.validate_constraints("", violations);
18354            if violations.len() > snap {
18355                let pfx = format!("{path}/TaxTp");
18356                for v in &mut violations[snap..] {
18357                    v.path.insert_str(0, &pfx);
18358                }
18359            }
18360        }
18361    }
18362}
18363impl crate::common::validate::Validatable for TaxParty2 {
18364    fn validate_constraints(
18365        &self,
18366        path: &str,
18367        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18368    ) {
18369        if let Some(ref val) = self.tax_id {
18370            let snap = violations.len();
18371            val.validate_constraints("", violations);
18372            if violations.len() > snap {
18373                let pfx = format!("{path}/TaxId");
18374                for v in &mut violations[snap..] {
18375                    v.path.insert_str(0, &pfx);
18376                }
18377            }
18378        }
18379        if let Some(ref val) = self.regn_id {
18380            let snap = violations.len();
18381            val.validate_constraints("", violations);
18382            if violations.len() > snap {
18383                let pfx = format!("{path}/RegnId");
18384                for v in &mut violations[snap..] {
18385                    v.path.insert_str(0, &pfx);
18386                }
18387            }
18388        }
18389        if let Some(ref val) = self.tax_tp {
18390            let snap = violations.len();
18391            val.validate_constraints("", violations);
18392            if violations.len() > snap {
18393                let pfx = format!("{path}/TaxTp");
18394                for v in &mut violations[snap..] {
18395                    v.path.insert_str(0, &pfx);
18396                }
18397            }
18398        }
18399        if let Some(ref val) = self.authstn {
18400            let snap = violations.len();
18401            val.validate_constraints("", violations);
18402            if violations.len() > snap {
18403                let pfx = format!("{path}/Authstn");
18404                for v in &mut violations[snap..] {
18405                    v.path.insert_str(0, &pfx);
18406                }
18407            }
18408        }
18409    }
18410}
18411impl crate::common::validate::Validatable for TaxPeriod3 {
18412    fn validate_constraints(
18413        &self,
18414        path: &str,
18415        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18416    ) {
18417        if let Some(ref val) = self.yr {
18418            let snap = violations.len();
18419            val.validate_constraints("", violations);
18420            if violations.len() > snap {
18421                let pfx = format!("{path}/Yr");
18422                for v in &mut violations[snap..] {
18423                    v.path.insert_str(0, &pfx);
18424                }
18425            }
18426        }
18427        if let Some(ref val) = self.tp {
18428            let snap = violations.len();
18429            val.validate_constraints("", violations);
18430            if violations.len() > snap {
18431                let pfx = format!("{path}/Tp");
18432                for v in &mut violations[snap..] {
18433                    v.path.insert_str(0, &pfx);
18434                }
18435            }
18436        }
18437        if let Some(ref val) = self.fr_to_dt {
18438            let snap = violations.len();
18439            val.validate_constraints("", violations);
18440            if violations.len() > snap {
18441                let pfx = format!("{path}/FrToDt");
18442                for v in &mut violations[snap..] {
18443                    v.path.insert_str(0, &pfx);
18444                }
18445            }
18446        }
18447    }
18448}
18449impl crate::common::validate::Validatable for TaxRecord3 {
18450    fn validate_constraints(
18451        &self,
18452        path: &str,
18453        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18454    ) {
18455        if let Some(ref val) = self.tp {
18456            let snap = violations.len();
18457            val.validate_constraints("", violations);
18458            if violations.len() > snap {
18459                let pfx = format!("{path}/Tp");
18460                for v in &mut violations[snap..] {
18461                    v.path.insert_str(0, &pfx);
18462                }
18463            }
18464        }
18465        if let Some(ref val) = self.ctgy {
18466            let snap = violations.len();
18467            val.validate_constraints("", violations);
18468            if violations.len() > snap {
18469                let pfx = format!("{path}/Ctgy");
18470                for v in &mut violations[snap..] {
18471                    v.path.insert_str(0, &pfx);
18472                }
18473            }
18474        }
18475        if let Some(ref val) = self.ctgy_dtls {
18476            let snap = violations.len();
18477            val.validate_constraints("", violations);
18478            if violations.len() > snap {
18479                let pfx = format!("{path}/CtgyDtls");
18480                for v in &mut violations[snap..] {
18481                    v.path.insert_str(0, &pfx);
18482                }
18483            }
18484        }
18485        if let Some(ref val) = self.dbtr_sts {
18486            let snap = violations.len();
18487            val.validate_constraints("", violations);
18488            if violations.len() > snap {
18489                let pfx = format!("{path}/DbtrSts");
18490                for v in &mut violations[snap..] {
18491                    v.path.insert_str(0, &pfx);
18492                }
18493            }
18494        }
18495        if let Some(ref val) = self.cert_id {
18496            let snap = violations.len();
18497            val.validate_constraints("", violations);
18498            if violations.len() > snap {
18499                let pfx = format!("{path}/CertId");
18500                for v in &mut violations[snap..] {
18501                    v.path.insert_str(0, &pfx);
18502                }
18503            }
18504        }
18505        if let Some(ref val) = self.frms_cd {
18506            let snap = violations.len();
18507            val.validate_constraints("", violations);
18508            if violations.len() > snap {
18509                let pfx = format!("{path}/FrmsCd");
18510                for v in &mut violations[snap..] {
18511                    v.path.insert_str(0, &pfx);
18512                }
18513            }
18514        }
18515        if let Some(ref val) = self.prd {
18516            let snap = violations.len();
18517            val.validate_constraints("", violations);
18518            if violations.len() > snap {
18519                let pfx = format!("{path}/Prd");
18520                for v in &mut violations[snap..] {
18521                    v.path.insert_str(0, &pfx);
18522                }
18523            }
18524        }
18525        if let Some(ref val) = self.tax_amt {
18526            let snap = violations.len();
18527            val.validate_constraints("", violations);
18528            if violations.len() > snap {
18529                let pfx = format!("{path}/TaxAmt");
18530                for v in &mut violations[snap..] {
18531                    v.path.insert_str(0, &pfx);
18532                }
18533            }
18534        }
18535        if let Some(ref val) = self.addtl_inf {
18536            let snap = violations.len();
18537            val.validate_constraints("", violations);
18538            if violations.len() > snap {
18539                let pfx = format!("{path}/AddtlInf");
18540                for v in &mut violations[snap..] {
18541                    v.path.insert_str(0, &pfx);
18542                }
18543            }
18544        }
18545    }
18546}
18547impl crate::common::validate::Validatable for TaxRecordDetails3 {
18548    fn validate_constraints(
18549        &self,
18550        path: &str,
18551        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18552    ) {
18553        if let Some(ref val) = self.prd {
18554            let snap = violations.len();
18555            val.validate_constraints("", violations);
18556            if violations.len() > snap {
18557                let pfx = format!("{path}/Prd");
18558                for v in &mut violations[snap..] {
18559                    v.path.insert_str(0, &pfx);
18560                }
18561            }
18562        }
18563        {
18564            let snap = violations.len();
18565            self.amt.validate_constraints("", violations);
18566            if violations.len() > snap {
18567                let pfx = format!("{path}/Amt");
18568                for v in &mut violations[snap..] {
18569                    v.path.insert_str(0, &pfx);
18570                }
18571            }
18572        }
18573    }
18574}
18575impl crate::common::validate::Validatable for TransactionParties10 {
18576    fn validate_constraints(
18577        &self,
18578        path: &str,
18579        violations: &mut Vec<crate::common::validate::ConstraintViolation>,
18580    ) {
18581        if let Some(ref wrapper) = self.ultmt_dbtr {
18582            let snap = violations.len();
18583            wrapper.inner.validate_constraints("", violations);
18584            if violations.len() > snap {
18585                let pfx = format!("{path}/UltmtDbtr");
18586                for v in &mut violations[snap..] {
18587                    v.path.insert_str(0, &pfx);
18588                }
18589            }
18590        }
18591        {
18592            let snap = violations.len();
18593            self.dbtr.inner.validate_constraints("", violations);
18594            if violations.len() > snap {
18595                let pfx = format!("{path}/Dbtr");
18596                for v in &mut violations[snap..] {
18597                    v.path.insert_str(0, &pfx);
18598                }
18599            }
18600        }
18601        if let Some(ref val) = self.dbtr_acct {
18602            let snap = violations.len();
18603            val.validate_constraints("", violations);
18604            if violations.len() > snap {
18605                let pfx = format!("{path}/DbtrAcct");
18606                for v in &mut violations[snap..] {
18607                    v.path.insert_str(0, &pfx);
18608                }
18609            }
18610        }
18611        if let Some(ref wrapper) = self.initg_pty {
18612            let snap = violations.len();
18613            wrapper.inner.validate_constraints("", violations);
18614            if violations.len() > snap {
18615                let pfx = format!("{path}/InitgPty");
18616                for v in &mut violations[snap..] {
18617                    v.path.insert_str(0, &pfx);
18618                }
18619            }
18620        }
18621        if let Some(ref val) = self.dbtr_agt {
18622            let snap = violations.len();
18623            val.validate_constraints("", violations);
18624            if violations.len() > snap {
18625                let pfx = format!("{path}/DbtrAgt");
18626                for v in &mut violations[snap..] {
18627                    v.path.insert_str(0, &pfx);
18628                }
18629            }
18630        }
18631        if let Some(ref val) = self.dbtr_agt_acct {
18632            let snap = violations.len();
18633            val.validate_constraints("", violations);
18634            if violations.len() > snap {
18635                let pfx = format!("{path}/DbtrAgtAcct");
18636                for v in &mut violations[snap..] {
18637                    v.path.insert_str(0, &pfx);
18638                }
18639            }
18640        }
18641        if let Some(ref val) = self.prvs_instg_agt1 {
18642            let snap = violations.len();
18643            val.validate_constraints("", violations);
18644            if violations.len() > snap {
18645                let pfx = format!("{path}/PrvsInstgAgt1");
18646                for v in &mut violations[snap..] {
18647                    v.path.insert_str(0, &pfx);
18648                }
18649            }
18650        }
18651        if let Some(ref val) = self.prvs_instg_agt1acct {
18652            let snap = violations.len();
18653            val.validate_constraints("", violations);
18654            if violations.len() > snap {
18655                let pfx = format!("{path}/PrvsInstgAgt1Acct");
18656                for v in &mut violations[snap..] {
18657                    v.path.insert_str(0, &pfx);
18658                }
18659            }
18660        }
18661        if let Some(ref val) = self.prvs_instg_agt2 {
18662            let snap = violations.len();
18663            val.validate_constraints("", violations);
18664            if violations.len() > snap {
18665                let pfx = format!("{path}/PrvsInstgAgt2");
18666                for v in &mut violations[snap..] {
18667                    v.path.insert_str(0, &pfx);
18668                }
18669            }
18670        }
18671        if let Some(ref val) = self.prvs_instg_agt2acct {
18672            let snap = violations.len();
18673            val.validate_constraints("", violations);
18674            if violations.len() > snap {
18675                let pfx = format!("{path}/PrvsInstgAgt2Acct");
18676                for v in &mut violations[snap..] {
18677                    v.path.insert_str(0, &pfx);
18678                }
18679            }
18680        }
18681        if let Some(ref val) = self.prvs_instg_agt3 {
18682            let snap = violations.len();
18683            val.validate_constraints("", violations);
18684            if violations.len() > snap {
18685                let pfx = format!("{path}/PrvsInstgAgt3");
18686                for v in &mut violations[snap..] {
18687                    v.path.insert_str(0, &pfx);
18688                }
18689            }
18690        }
18691        if let Some(ref val) = self.prvs_instg_agt3acct {
18692            let snap = violations.len();
18693            val.validate_constraints("", violations);
18694            if violations.len() > snap {
18695                let pfx = format!("{path}/PrvsInstgAgt3Acct");
18696                for v in &mut violations[snap..] {
18697                    v.path.insert_str(0, &pfx);
18698                }
18699            }
18700        }
18701        if let Some(ref val) = self.intrmy_agt1 {
18702            let snap = violations.len();
18703            val.validate_constraints("", violations);
18704            if violations.len() > snap {
18705                let pfx = format!("{path}/IntrmyAgt1");
18706                for v in &mut violations[snap..] {
18707                    v.path.insert_str(0, &pfx);
18708                }
18709            }
18710        }
18711        if let Some(ref val) = self.intrmy_agt1acct {
18712            let snap = violations.len();
18713            val.validate_constraints("", violations);
18714            if violations.len() > snap {
18715                let pfx = format!("{path}/IntrmyAgt1Acct");
18716                for v in &mut violations[snap..] {
18717                    v.path.insert_str(0, &pfx);
18718                }
18719            }
18720        }
18721        if let Some(ref val) = self.intrmy_agt2 {
18722            let snap = violations.len();
18723            val.validate_constraints("", violations);
18724            if violations.len() > snap {
18725                let pfx = format!("{path}/IntrmyAgt2");
18726                for v in &mut violations[snap..] {
18727                    v.path.insert_str(0, &pfx);
18728                }
18729            }
18730        }
18731        if let Some(ref val) = self.intrmy_agt2acct {
18732            let snap = violations.len();
18733            val.validate_constraints("", violations);
18734            if violations.len() > snap {
18735                let pfx = format!("{path}/IntrmyAgt2Acct");
18736                for v in &mut violations[snap..] {
18737                    v.path.insert_str(0, &pfx);
18738                }
18739            }
18740        }
18741        if let Some(ref val) = self.intrmy_agt3 {
18742            let snap = violations.len();
18743            val.validate_constraints("", violations);
18744            if violations.len() > snap {
18745                let pfx = format!("{path}/IntrmyAgt3");
18746                for v in &mut violations[snap..] {
18747                    v.path.insert_str(0, &pfx);
18748                }
18749            }
18750        }
18751        if let Some(ref val) = self.intrmy_agt3acct {
18752            let snap = violations.len();
18753            val.validate_constraints("", violations);
18754            if violations.len() > snap {
18755                let pfx = format!("{path}/IntrmyAgt3Acct");
18756                for v in &mut violations[snap..] {
18757                    v.path.insert_str(0, &pfx);
18758                }
18759            }
18760        }
18761        if let Some(ref val) = self.cdtr_agt {
18762            let snap = violations.len();
18763            val.validate_constraints("", violations);
18764            if violations.len() > snap {
18765                let pfx = format!("{path}/CdtrAgt");
18766                for v in &mut violations[snap..] {
18767                    v.path.insert_str(0, &pfx);
18768                }
18769            }
18770        }
18771        if let Some(ref val) = self.cdtr_agt_acct {
18772            let snap = violations.len();
18773            val.validate_constraints("", violations);
18774            if violations.len() > snap {
18775                let pfx = format!("{path}/CdtrAgtAcct");
18776                for v in &mut violations[snap..] {
18777                    v.path.insert_str(0, &pfx);
18778                }
18779            }
18780        }
18781        {
18782            let snap = violations.len();
18783            self.cdtr.inner.validate_constraints("", violations);
18784            if violations.len() > snap {
18785                let pfx = format!("{path}/Cdtr");
18786                for v in &mut violations[snap..] {
18787                    v.path.insert_str(0, &pfx);
18788                }
18789            }
18790        }
18791        if let Some(ref val) = self.cdtr_acct {
18792            let snap = violations.len();
18793            val.validate_constraints("", violations);
18794            if violations.len() > snap {
18795                let pfx = format!("{path}/CdtrAcct");
18796                for v in &mut violations[snap..] {
18797                    v.path.insert_str(0, &pfx);
18798                }
18799            }
18800        }
18801        if let Some(ref wrapper) = self.ultmt_cdtr {
18802            let snap = violations.len();
18803            wrapper.inner.validate_constraints("", violations);
18804            if violations.len() > snap {
18805                let pfx = format!("{path}/UltmtCdtr");
18806                for v in &mut violations[snap..] {
18807                    v.path.insert_str(0, &pfx);
18808                }
18809            }
18810        }
18811    }
18812}
18813impl crate::common::validate::IsoMessage for Document {
18814    fn message_type(&self) -> &'static str {
18815        "pacs.004.001.11"
18816    }
18817    fn root_path(&self) -> &'static str {
18818        "/Document"
18819    }
18820}