1#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7#[serde(transparent)]
8pub struct ActiveOrHistoricCurrencyAndAmountSimpleType(pub String);
9impl TryFrom<String> for ActiveOrHistoricCurrencyAndAmountSimpleType {
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 ActiveOrHistoricCurrencyAndAmountSimpleType {
51 #[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<ActiveOrHistoricCurrencyAndAmountSimpleType> for String {
58 fn from(v: ActiveOrHistoricCurrencyAndAmountSimpleType) -> Self {
59 v.0
60 }
61}
62#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
64#[serde(transparent)]
65pub struct ActiveOrHistoricCurrencyCode(pub String);
66impl TryFrom<String> for ActiveOrHistoricCurrencyCode {
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 ActiveOrHistoricCurrencyCode {
101 #[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<ActiveOrHistoricCurrencyCode> for String {
108 fn from(v: ActiveOrHistoricCurrencyCode) -> Self {
109 v.0
110 }
111}
112#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
113pub enum AddressType2Code {
114 #[serde(rename = "ADDR")]
115 Addr,
116 #[serde(rename = "PBOX")]
117 Pbox,
118 #[serde(rename = "HOME")]
119 Home,
120 #[serde(rename = "BIZZ")]
121 Bizz,
122 #[serde(rename = "MLTO")]
123 Mlto,
124 #[serde(rename = "DLVY")]
125 Dlvy,
126}
127#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
129#[serde(transparent)]
130pub struct AnyBICDec2014Identifier(pub String);
131impl TryFrom<String> for AnyBICDec2014Identifier {
132 type Error = crate::common::validate::ConstraintError;
133 #[allow(clippy::unreadable_literal)]
134 fn try_from(value: String) -> Result<Self, Self::Error> {
135 {
136 let value: &str = &value;
137 {
138 let violated = {
139 let bytes = value.as_bytes();
140 let len = bytes.len();
141 let result: bool = (|| -> bool {
142 let mut pos: usize = 0;
143 if !(8usize..=11usize).contains(&len) {
144 return true;
145 }
146 {
147 let end = pos + 4usize;
148 if end > len {
149 return true;
150 }
151 for &b in &bytes[pos..end] {
152 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
153 return true;
154 }
155 }
156 pos = end;
157 }
158 {
159 let end = pos + 2usize;
160 if end > len {
161 return true;
162 }
163 for &b in &bytes[pos..end] {
164 if !(65u8..=90u8).contains(&b) {
165 return true;
166 }
167 }
168 pos = end;
169 }
170 {
171 let end = pos + 2usize;
172 if end > len {
173 return true;
174 }
175 for &b in &bytes[pos..end] {
176 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
177 return true;
178 }
179 }
180 pos = end;
181 }
182 {
183 let saved = pos;
184 let matched: bool = (|| -> bool {
185 {
186 let end = pos + 3usize;
187 if end > len {
188 return true;
189 }
190 for &b in &bytes[pos..end] {
191 if !(65u8..=90u8).contains(&b)
192 && !(48u8..=57u8).contains(&b)
193 {
194 return true;
195 }
196 }
197 pos = end;
198 }
199 false
200 })();
201 if matched {
202 pos = saved;
203 }
204 }
205 if pos != len {
206 return true;
207 }
208 false
209 })();
210 result
211 };
212 if violated {
213 return Err(crate::common::validate::ConstraintError {
214 kind: crate::common::validate::ConstraintKind::Pattern,
215 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}"
216 .to_string(),
217 });
218 }
219 }
220 }
221 Ok(Self(value))
222 }
223}
224impl AnyBICDec2014Identifier {
225 #[allow(clippy::unreadable_literal)]
227 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
228 Self::try_from(value.into())
229 }
230}
231impl From<AnyBICDec2014Identifier> for String {
232 fn from(v: AnyBICDec2014Identifier) -> Self {
233 v.0
234 }
235}
236#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
238#[serde(transparent)]
239pub struct BICFIDec2014Identifier(pub String);
240impl TryFrom<String> for BICFIDec2014Identifier {
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 BICFIDec2014Identifier {
334 #[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<BICFIDec2014Identifier> for String {
341 fn from(v: BICFIDec2014Identifier) -> Self {
342 v.0
343 }
344}
345#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
346pub enum ClearingChannel2Code {
347 #[serde(rename = "RTGS")]
348 Rtgs,
349 #[serde(rename = "RTNS")]
350 Rtns,
351 #[serde(rename = "MPNS")]
352 Mpns,
353 #[serde(rename = "BOOK")]
354 Book,
355}
356#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
358#[serde(transparent)]
359pub struct CountryCode(pub String);
360impl TryFrom<String> for CountryCode {
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 bytes.len() != 2usize
370 || ({
371 let b = bytes[0usize];
372 !(65u8..=90u8).contains(&b)
373 })
374 || ({
375 let b = bytes[1usize];
376 !(65u8..=90u8).contains(&b)
377 })
378 };
379 if violated {
380 return Err(crate::common::validate::ConstraintError {
381 kind: crate::common::validate::ConstraintKind::Pattern,
382 message: "value does not match pattern [A-Z]{2,2}".to_string(),
383 });
384 }
385 }
386 }
387 Ok(Self(value))
388 }
389}
390impl CountryCode {
391 #[allow(clippy::unreadable_literal)]
393 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
394 Self::try_from(value.into())
395 }
396}
397impl From<CountryCode> for String {
398 fn from(v: CountryCode) -> Self {
399 v.0
400 }
401}
402#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
403pub enum CreditDebitCode {
404 #[serde(rename = "CRDT")]
405 Crdt,
406 #[serde(rename = "DBIT")]
407 Dbit,
408}
409#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
412#[serde(transparent)]
413pub struct DecimalNumber(pub String);
414impl TryFrom<String> for DecimalNumber {
415 type Error = crate::common::validate::ConstraintError;
416 #[allow(clippy::unreadable_literal)]
417 fn try_from(value: String) -> Result<Self, Self::Error> {
418 {
419 let value: &str = &value;
420 {
421 let frac_count = value.find('.').map_or(0, |dot| {
422 value[dot + 1..]
423 .chars()
424 .filter(char::is_ascii_digit)
425 .count()
426 });
427 let violated = frac_count > 17usize;
428 if violated {
429 return Err(crate::common::validate::ConstraintError {
430 kind: crate::common::validate::ConstraintKind::FractionDigits,
431 message: format!(
432 "{} (got {})",
433 "value exceeds maximum fraction digits 17", frac_count
434 ),
435 });
436 }
437 }
438 {
439 let digit_count = value.chars().filter(char::is_ascii_digit).count();
440 let violated = digit_count > 18usize;
441 if violated {
442 return Err(crate::common::validate::ConstraintError {
443 kind: crate::common::validate::ConstraintKind::TotalDigits,
444 message: format!(
445 "{} (got {})",
446 "value exceeds maximum total digits 18", digit_count
447 ),
448 });
449 }
450 }
451 }
452 Ok(Self(value))
453 }
454}
455impl DecimalNumber {
456 #[allow(clippy::unreadable_literal)]
458 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
459 Self::try_from(value.into())
460 }
461}
462impl From<DecimalNumber> for String {
463 fn from(v: DecimalNumber) -> Self {
464 v.0
465 }
466}
467#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
469#[serde(transparent)]
470pub struct Exact2NumericText(pub String);
471impl TryFrom<String> for Exact2NumericText {
472 type Error = crate::common::validate::ConstraintError;
473 #[allow(clippy::unreadable_literal)]
474 fn try_from(value: String) -> Result<Self, Self::Error> {
475 {
476 let value: &str = &value;
477 {
478 let violated = {
479 let bytes = value.as_bytes();
480 bytes.len() != 2usize
481 || ({
482 let b = bytes[0usize];
483 !(48u8..=57u8).contains(&b)
484 })
485 || ({
486 let b = bytes[1usize];
487 !(48u8..=57u8).contains(&b)
488 })
489 };
490 if violated {
491 return Err(crate::common::validate::ConstraintError {
492 kind: crate::common::validate::ConstraintKind::Pattern,
493 message: "value does not match pattern [0-9]{2}".to_string(),
494 });
495 }
496 }
497 }
498 Ok(Self(value))
499 }
500}
501impl Exact2NumericText {
502 #[allow(clippy::unreadable_literal)]
504 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
505 Self::try_from(value.into())
506 }
507}
508impl From<Exact2NumericText> for String {
509 fn from(v: Exact2NumericText) -> Self {
510 v.0
511 }
512}
513#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
515#[serde(transparent)]
516pub struct Exact4AlphaNumericText(pub String);
517impl TryFrom<String> for Exact4AlphaNumericText {
518 type Error = crate::common::validate::ConstraintError;
519 #[allow(clippy::unreadable_literal)]
520 fn try_from(value: String) -> Result<Self, Self::Error> {
521 {
522 let value: &str = &value;
523 {
524 let violated = {
525 let bytes = value.as_bytes();
526 bytes.len() != 4usize
527 || ({
528 let b = bytes[0usize];
529 !(97u8..=122u8).contains(&b)
530 && !(65u8..=90u8).contains(&b)
531 && !(48u8..=57u8).contains(&b)
532 })
533 || ({
534 let b = bytes[1usize];
535 !(97u8..=122u8).contains(&b)
536 && !(65u8..=90u8).contains(&b)
537 && !(48u8..=57u8).contains(&b)
538 })
539 || ({
540 let b = bytes[2usize];
541 !(97u8..=122u8).contains(&b)
542 && !(65u8..=90u8).contains(&b)
543 && !(48u8..=57u8).contains(&b)
544 })
545 || ({
546 let b = bytes[3usize];
547 !(97u8..=122u8).contains(&b)
548 && !(65u8..=90u8).contains(&b)
549 && !(48u8..=57u8).contains(&b)
550 })
551 };
552 if violated {
553 return Err(crate::common::validate::ConstraintError {
554 kind: crate::common::validate::ConstraintKind::Pattern,
555 message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
556 });
557 }
558 }
559 }
560 Ok(Self(value))
561 }
562}
563impl Exact4AlphaNumericText {
564 #[allow(clippy::unreadable_literal)]
566 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
567 Self::try_from(value.into())
568 }
569}
570impl From<Exact4AlphaNumericText> for String {
571 fn from(v: Exact4AlphaNumericText) -> Self {
572 v.0
573 }
574}
575#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
578#[serde(transparent)]
579pub struct ExternalAccountIdentification1Code(pub String);
580impl TryFrom<String> for ExternalAccountIdentification1Code {
581 type Error = crate::common::validate::ConstraintError;
582 #[allow(clippy::unreadable_literal)]
583 fn try_from(value: String) -> Result<Self, Self::Error> {
584 {
585 let value: &str = &value;
586 {
587 let len = value.chars().count();
588 let violated = len < 1usize;
589 if violated {
590 return Err(crate::common::validate::ConstraintError {
591 kind: crate::common::validate::ConstraintKind::MinLength,
592 message: format!(
593 "{} (got {})",
594 "value is shorter than minimum length 1", len
595 ),
596 });
597 }
598 }
599 {
600 let len = value.chars().count();
601 let violated = len > 4usize;
602 if violated {
603 return Err(crate::common::validate::ConstraintError {
604 kind: crate::common::validate::ConstraintKind::MaxLength,
605 message: format!("{} (got {})", "value exceeds maximum length 4", len),
606 });
607 }
608 }
609 }
610 Ok(Self(value))
611 }
612}
613impl ExternalAccountIdentification1Code {
614 #[allow(clippy::unreadable_literal)]
616 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
617 Self::try_from(value.into())
618 }
619}
620impl From<ExternalAccountIdentification1Code> for String {
621 fn from(v: ExternalAccountIdentification1Code) -> Self {
622 v.0
623 }
624}
625#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
628#[serde(transparent)]
629pub struct ExternalCashAccountType1Code(pub String);
630impl TryFrom<String> for ExternalCashAccountType1Code {
631 type Error = crate::common::validate::ConstraintError;
632 #[allow(clippy::unreadable_literal)]
633 fn try_from(value: String) -> Result<Self, Self::Error> {
634 {
635 let value: &str = &value;
636 {
637 let len = value.chars().count();
638 let violated = len < 1usize;
639 if violated {
640 return Err(crate::common::validate::ConstraintError {
641 kind: crate::common::validate::ConstraintKind::MinLength,
642 message: format!(
643 "{} (got {})",
644 "value is shorter than minimum length 1", len
645 ),
646 });
647 }
648 }
649 {
650 let len = value.chars().count();
651 let violated = len > 4usize;
652 if violated {
653 return Err(crate::common::validate::ConstraintError {
654 kind: crate::common::validate::ConstraintKind::MaxLength,
655 message: format!("{} (got {})", "value exceeds maximum length 4", len),
656 });
657 }
658 }
659 }
660 Ok(Self(value))
661 }
662}
663impl ExternalCashAccountType1Code {
664 #[allow(clippy::unreadable_literal)]
666 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
667 Self::try_from(value.into())
668 }
669}
670impl From<ExternalCashAccountType1Code> for String {
671 fn from(v: ExternalCashAccountType1Code) -> Self {
672 v.0
673 }
674}
675#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
678#[serde(transparent)]
679pub struct ExternalCashClearingSystem1Code(pub String);
680impl TryFrom<String> for ExternalCashClearingSystem1Code {
681 type Error = crate::common::validate::ConstraintError;
682 #[allow(clippy::unreadable_literal)]
683 fn try_from(value: String) -> Result<Self, Self::Error> {
684 {
685 let value: &str = &value;
686 {
687 let len = value.chars().count();
688 let violated = len < 1usize;
689 if violated {
690 return Err(crate::common::validate::ConstraintError {
691 kind: crate::common::validate::ConstraintKind::MinLength,
692 message: format!(
693 "{} (got {})",
694 "value is shorter than minimum length 1", len
695 ),
696 });
697 }
698 }
699 {
700 let len = value.chars().count();
701 let violated = len > 3usize;
702 if violated {
703 return Err(crate::common::validate::ConstraintError {
704 kind: crate::common::validate::ConstraintKind::MaxLength,
705 message: format!("{} (got {})", "value exceeds maximum length 3", len),
706 });
707 }
708 }
709 }
710 Ok(Self(value))
711 }
712}
713impl ExternalCashClearingSystem1Code {
714 #[allow(clippy::unreadable_literal)]
716 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
717 Self::try_from(value.into())
718 }
719}
720impl From<ExternalCashClearingSystem1Code> for String {
721 fn from(v: ExternalCashClearingSystem1Code) -> Self {
722 v.0
723 }
724}
725#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
728#[serde(transparent)]
729pub struct ExternalCategoryPurpose1Code(pub String);
730impl TryFrom<String> for ExternalCategoryPurpose1Code {
731 type Error = crate::common::validate::ConstraintError;
732 #[allow(clippy::unreadable_literal)]
733 fn try_from(value: String) -> Result<Self, Self::Error> {
734 {
735 let value: &str = &value;
736 {
737 let len = value.chars().count();
738 let violated = len < 1usize;
739 if violated {
740 return Err(crate::common::validate::ConstraintError {
741 kind: crate::common::validate::ConstraintKind::MinLength,
742 message: format!(
743 "{} (got {})",
744 "value is shorter than minimum length 1", len
745 ),
746 });
747 }
748 }
749 {
750 let len = value.chars().count();
751 let violated = len > 4usize;
752 if violated {
753 return Err(crate::common::validate::ConstraintError {
754 kind: crate::common::validate::ConstraintKind::MaxLength,
755 message: format!("{} (got {})", "value exceeds maximum length 4", len),
756 });
757 }
758 }
759 }
760 Ok(Self(value))
761 }
762}
763impl ExternalCategoryPurpose1Code {
764 #[allow(clippy::unreadable_literal)]
766 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
767 Self::try_from(value.into())
768 }
769}
770impl From<ExternalCategoryPurpose1Code> for String {
771 fn from(v: ExternalCategoryPurpose1Code) -> Self {
772 v.0
773 }
774}
775#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
778#[serde(transparent)]
779pub struct ExternalChargeType1Code(pub String);
780impl TryFrom<String> for ExternalChargeType1Code {
781 type Error = crate::common::validate::ConstraintError;
782 #[allow(clippy::unreadable_literal)]
783 fn try_from(value: String) -> Result<Self, Self::Error> {
784 {
785 let value: &str = &value;
786 {
787 let len = value.chars().count();
788 let violated = len < 1usize;
789 if violated {
790 return Err(crate::common::validate::ConstraintError {
791 kind: crate::common::validate::ConstraintKind::MinLength,
792 message: format!(
793 "{} (got {})",
794 "value is shorter than minimum length 1", len
795 ),
796 });
797 }
798 }
799 {
800 let len = value.chars().count();
801 let violated = len > 4usize;
802 if violated {
803 return Err(crate::common::validate::ConstraintError {
804 kind: crate::common::validate::ConstraintKind::MaxLength,
805 message: format!("{} (got {})", "value exceeds maximum length 4", len),
806 });
807 }
808 }
809 }
810 Ok(Self(value))
811 }
812}
813impl ExternalChargeType1Code {
814 #[allow(clippy::unreadable_literal)]
816 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
817 Self::try_from(value.into())
818 }
819}
820impl From<ExternalChargeType1Code> for String {
821 fn from(v: ExternalChargeType1Code) -> Self {
822 v.0
823 }
824}
825#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
828#[serde(transparent)]
829pub struct ExternalClearingSystemIdentification1Code(pub String);
830impl TryFrom<String> for ExternalClearingSystemIdentification1Code {
831 type Error = crate::common::validate::ConstraintError;
832 #[allow(clippy::unreadable_literal)]
833 fn try_from(value: String) -> Result<Self, Self::Error> {
834 {
835 let value: &str = &value;
836 {
837 let len = value.chars().count();
838 let violated = len < 1usize;
839 if violated {
840 return Err(crate::common::validate::ConstraintError {
841 kind: crate::common::validate::ConstraintKind::MinLength,
842 message: format!(
843 "{} (got {})",
844 "value is shorter than minimum length 1", len
845 ),
846 });
847 }
848 }
849 {
850 let len = value.chars().count();
851 let violated = len > 5usize;
852 if violated {
853 return Err(crate::common::validate::ConstraintError {
854 kind: crate::common::validate::ConstraintKind::MaxLength,
855 message: format!("{} (got {})", "value exceeds maximum length 5", len),
856 });
857 }
858 }
859 }
860 Ok(Self(value))
861 }
862}
863impl ExternalClearingSystemIdentification1Code {
864 #[allow(clippy::unreadable_literal)]
866 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
867 Self::try_from(value.into())
868 }
869}
870impl From<ExternalClearingSystemIdentification1Code> for String {
871 fn from(v: ExternalClearingSystemIdentification1Code) -> Self {
872 v.0
873 }
874}
875#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
878#[serde(transparent)]
879pub struct ExternalCreditorReferenceType1Code(pub String);
880impl TryFrom<String> for ExternalCreditorReferenceType1Code {
881 type Error = crate::common::validate::ConstraintError;
882 #[allow(clippy::unreadable_literal)]
883 fn try_from(value: String) -> Result<Self, Self::Error> {
884 {
885 let value: &str = &value;
886 {
887 let len = value.chars().count();
888 let violated = len < 1usize;
889 if violated {
890 return Err(crate::common::validate::ConstraintError {
891 kind: crate::common::validate::ConstraintKind::MinLength,
892 message: format!(
893 "{} (got {})",
894 "value is shorter than minimum length 1", len
895 ),
896 });
897 }
898 }
899 {
900 let len = value.chars().count();
901 let violated = len > 4usize;
902 if violated {
903 return Err(crate::common::validate::ConstraintError {
904 kind: crate::common::validate::ConstraintKind::MaxLength,
905 message: format!("{} (got {})", "value exceeds maximum length 4", len),
906 });
907 }
908 }
909 }
910 Ok(Self(value))
911 }
912}
913impl ExternalCreditorReferenceType1Code {
914 #[allow(clippy::unreadable_literal)]
916 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
917 Self::try_from(value.into())
918 }
919}
920impl From<ExternalCreditorReferenceType1Code> for String {
921 fn from(v: ExternalCreditorReferenceType1Code) -> Self {
922 v.0
923 }
924}
925#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
928#[serde(transparent)]
929pub struct ExternalDateType1Code(pub String);
930impl TryFrom<String> for ExternalDateType1Code {
931 type Error = crate::common::validate::ConstraintError;
932 #[allow(clippy::unreadable_literal)]
933 fn try_from(value: String) -> Result<Self, Self::Error> {
934 {
935 let value: &str = &value;
936 {
937 let len = value.chars().count();
938 let violated = len < 1usize;
939 if violated {
940 return Err(crate::common::validate::ConstraintError {
941 kind: crate::common::validate::ConstraintKind::MinLength,
942 message: format!(
943 "{} (got {})",
944 "value is shorter than minimum length 1", len
945 ),
946 });
947 }
948 }
949 {
950 let len = value.chars().count();
951 let violated = len > 4usize;
952 if violated {
953 return Err(crate::common::validate::ConstraintError {
954 kind: crate::common::validate::ConstraintKind::MaxLength,
955 message: format!("{} (got {})", "value exceeds maximum length 4", len),
956 });
957 }
958 }
959 }
960 Ok(Self(value))
961 }
962}
963impl ExternalDateType1Code {
964 #[allow(clippy::unreadable_literal)]
966 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
967 Self::try_from(value.into())
968 }
969}
970impl From<ExternalDateType1Code> for String {
971 fn from(v: ExternalDateType1Code) -> Self {
972 v.0
973 }
974}
975#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
978#[serde(transparent)]
979pub struct ExternalDocumentAmountType1Code(pub String);
980impl TryFrom<String> for ExternalDocumentAmountType1Code {
981 type Error = crate::common::validate::ConstraintError;
982 #[allow(clippy::unreadable_literal)]
983 fn try_from(value: String) -> Result<Self, Self::Error> {
984 {
985 let value: &str = &value;
986 {
987 let len = value.chars().count();
988 let violated = len < 1usize;
989 if violated {
990 return Err(crate::common::validate::ConstraintError {
991 kind: crate::common::validate::ConstraintKind::MinLength,
992 message: format!(
993 "{} (got {})",
994 "value is shorter than minimum length 1", len
995 ),
996 });
997 }
998 }
999 {
1000 let len = value.chars().count();
1001 let violated = len > 4usize;
1002 if violated {
1003 return Err(crate::common::validate::ConstraintError {
1004 kind: crate::common::validate::ConstraintKind::MaxLength,
1005 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1006 });
1007 }
1008 }
1009 }
1010 Ok(Self(value))
1011 }
1012}
1013impl ExternalDocumentAmountType1Code {
1014 #[allow(clippy::unreadable_literal)]
1016 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1017 Self::try_from(value.into())
1018 }
1019}
1020impl From<ExternalDocumentAmountType1Code> for String {
1021 fn from(v: ExternalDocumentAmountType1Code) -> Self {
1022 v.0
1023 }
1024}
1025#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1028#[serde(transparent)]
1029pub struct ExternalDocumentLineType1Code(pub String);
1030impl TryFrom<String> for ExternalDocumentLineType1Code {
1031 type Error = crate::common::validate::ConstraintError;
1032 #[allow(clippy::unreadable_literal)]
1033 fn try_from(value: String) -> Result<Self, Self::Error> {
1034 {
1035 let value: &str = &value;
1036 {
1037 let len = value.chars().count();
1038 let violated = len < 1usize;
1039 if violated {
1040 return Err(crate::common::validate::ConstraintError {
1041 kind: crate::common::validate::ConstraintKind::MinLength,
1042 message: format!(
1043 "{} (got {})",
1044 "value is shorter than minimum length 1", len
1045 ),
1046 });
1047 }
1048 }
1049 {
1050 let len = value.chars().count();
1051 let violated = len > 4usize;
1052 if violated {
1053 return Err(crate::common::validate::ConstraintError {
1054 kind: crate::common::validate::ConstraintKind::MaxLength,
1055 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1056 });
1057 }
1058 }
1059 }
1060 Ok(Self(value))
1061 }
1062}
1063impl ExternalDocumentLineType1Code {
1064 #[allow(clippy::unreadable_literal)]
1066 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1067 Self::try_from(value.into())
1068 }
1069}
1070impl From<ExternalDocumentLineType1Code> for String {
1071 fn from(v: ExternalDocumentLineType1Code) -> Self {
1072 v.0
1073 }
1074}
1075#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1078#[serde(transparent)]
1079pub struct ExternalDocumentType1Code(pub String);
1080impl TryFrom<String> for ExternalDocumentType1Code {
1081 type Error = crate::common::validate::ConstraintError;
1082 #[allow(clippy::unreadable_literal)]
1083 fn try_from(value: String) -> Result<Self, Self::Error> {
1084 {
1085 let value: &str = &value;
1086 {
1087 let len = value.chars().count();
1088 let violated = len < 1usize;
1089 if violated {
1090 return Err(crate::common::validate::ConstraintError {
1091 kind: crate::common::validate::ConstraintKind::MinLength,
1092 message: format!(
1093 "{} (got {})",
1094 "value is shorter than minimum length 1", len
1095 ),
1096 });
1097 }
1098 }
1099 {
1100 let len = value.chars().count();
1101 let violated = len > 4usize;
1102 if violated {
1103 return Err(crate::common::validate::ConstraintError {
1104 kind: crate::common::validate::ConstraintKind::MaxLength,
1105 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1106 });
1107 }
1108 }
1109 }
1110 Ok(Self(value))
1111 }
1112}
1113impl ExternalDocumentType1Code {
1114 #[allow(clippy::unreadable_literal)]
1116 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1117 Self::try_from(value.into())
1118 }
1119}
1120impl From<ExternalDocumentType1Code> for String {
1121 fn from(v: ExternalDocumentType1Code) -> Self {
1122 v.0
1123 }
1124}
1125#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1128#[serde(transparent)]
1129pub struct ExternalFinancialInstitutionIdentification1Code(pub String);
1130impl TryFrom<String> for ExternalFinancialInstitutionIdentification1Code {
1131 type Error = crate::common::validate::ConstraintError;
1132 #[allow(clippy::unreadable_literal)]
1133 fn try_from(value: String) -> Result<Self, Self::Error> {
1134 {
1135 let value: &str = &value;
1136 {
1137 let len = value.chars().count();
1138 let violated = len < 1usize;
1139 if violated {
1140 return Err(crate::common::validate::ConstraintError {
1141 kind: crate::common::validate::ConstraintKind::MinLength,
1142 message: format!(
1143 "{} (got {})",
1144 "value is shorter than minimum length 1", len
1145 ),
1146 });
1147 }
1148 }
1149 {
1150 let len = value.chars().count();
1151 let violated = len > 4usize;
1152 if violated {
1153 return Err(crate::common::validate::ConstraintError {
1154 kind: crate::common::validate::ConstraintKind::MaxLength,
1155 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1156 });
1157 }
1158 }
1159 }
1160 Ok(Self(value))
1161 }
1162}
1163impl ExternalFinancialInstitutionIdentification1Code {
1164 #[allow(clippy::unreadable_literal)]
1166 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1167 Self::try_from(value.into())
1168 }
1169}
1170impl From<ExternalFinancialInstitutionIdentification1Code> for String {
1171 fn from(v: ExternalFinancialInstitutionIdentification1Code) -> Self {
1172 v.0
1173 }
1174}
1175#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1178#[serde(transparent)]
1179pub struct ExternalGarnishmentType1Code(pub String);
1180impl TryFrom<String> for ExternalGarnishmentType1Code {
1181 type Error = crate::common::validate::ConstraintError;
1182 #[allow(clippy::unreadable_literal)]
1183 fn try_from(value: String) -> Result<Self, Self::Error> {
1184 {
1185 let value: &str = &value;
1186 {
1187 let len = value.chars().count();
1188 let violated = len < 1usize;
1189 if violated {
1190 return Err(crate::common::validate::ConstraintError {
1191 kind: crate::common::validate::ConstraintKind::MinLength,
1192 message: format!(
1193 "{} (got {})",
1194 "value is shorter than minimum length 1", len
1195 ),
1196 });
1197 }
1198 }
1199 {
1200 let len = value.chars().count();
1201 let violated = len > 4usize;
1202 if violated {
1203 return Err(crate::common::validate::ConstraintError {
1204 kind: crate::common::validate::ConstraintKind::MaxLength,
1205 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1206 });
1207 }
1208 }
1209 }
1210 Ok(Self(value))
1211 }
1212}
1213impl ExternalGarnishmentType1Code {
1214 #[allow(clippy::unreadable_literal)]
1216 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1217 Self::try_from(value.into())
1218 }
1219}
1220impl From<ExternalGarnishmentType1Code> for String {
1221 fn from(v: ExternalGarnishmentType1Code) -> Self {
1222 v.0
1223 }
1224}
1225#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1228#[serde(transparent)]
1229pub struct ExternalLocalInstrument1Code(pub String);
1230impl TryFrom<String> for ExternalLocalInstrument1Code {
1231 type Error = crate::common::validate::ConstraintError;
1232 #[allow(clippy::unreadable_literal)]
1233 fn try_from(value: String) -> Result<Self, Self::Error> {
1234 {
1235 let value: &str = &value;
1236 {
1237 let len = value.chars().count();
1238 let violated = len < 1usize;
1239 if violated {
1240 return Err(crate::common::validate::ConstraintError {
1241 kind: crate::common::validate::ConstraintKind::MinLength,
1242 message: format!(
1243 "{} (got {})",
1244 "value is shorter than minimum length 1", len
1245 ),
1246 });
1247 }
1248 }
1249 {
1250 let len = value.chars().count();
1251 let violated = len > 35usize;
1252 if violated {
1253 return Err(crate::common::validate::ConstraintError {
1254 kind: crate::common::validate::ConstraintKind::MaxLength,
1255 message: format!("{} (got {})", "value exceeds maximum length 35", len),
1256 });
1257 }
1258 }
1259 }
1260 Ok(Self(value))
1261 }
1262}
1263impl ExternalLocalInstrument1Code {
1264 #[allow(clippy::unreadable_literal)]
1266 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1267 Self::try_from(value.into())
1268 }
1269}
1270impl From<ExternalLocalInstrument1Code> for String {
1271 fn from(v: ExternalLocalInstrument1Code) -> Self {
1272 v.0
1273 }
1274}
1275#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1278#[serde(transparent)]
1279pub struct ExternalMandateSetupReason1Code(pub String);
1280impl TryFrom<String> for ExternalMandateSetupReason1Code {
1281 type Error = crate::common::validate::ConstraintError;
1282 #[allow(clippy::unreadable_literal)]
1283 fn try_from(value: String) -> Result<Self, Self::Error> {
1284 {
1285 let value: &str = &value;
1286 {
1287 let len = value.chars().count();
1288 let violated = len < 1usize;
1289 if violated {
1290 return Err(crate::common::validate::ConstraintError {
1291 kind: crate::common::validate::ConstraintKind::MinLength,
1292 message: format!(
1293 "{} (got {})",
1294 "value is shorter than minimum length 1", len
1295 ),
1296 });
1297 }
1298 }
1299 {
1300 let len = value.chars().count();
1301 let violated = len > 4usize;
1302 if violated {
1303 return Err(crate::common::validate::ConstraintError {
1304 kind: crate::common::validate::ConstraintKind::MaxLength,
1305 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1306 });
1307 }
1308 }
1309 }
1310 Ok(Self(value))
1311 }
1312}
1313impl ExternalMandateSetupReason1Code {
1314 #[allow(clippy::unreadable_literal)]
1316 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1317 Self::try_from(value.into())
1318 }
1319}
1320impl From<ExternalMandateSetupReason1Code> for String {
1321 fn from(v: ExternalMandateSetupReason1Code) -> Self {
1322 v.0
1323 }
1324}
1325#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1328#[serde(transparent)]
1329pub struct ExternalOrganisationIdentification1Code(pub String);
1330impl TryFrom<String> for ExternalOrganisationIdentification1Code {
1331 type Error = crate::common::validate::ConstraintError;
1332 #[allow(clippy::unreadable_literal)]
1333 fn try_from(value: String) -> Result<Self, Self::Error> {
1334 {
1335 let value: &str = &value;
1336 {
1337 let len = value.chars().count();
1338 let violated = len < 1usize;
1339 if violated {
1340 return Err(crate::common::validate::ConstraintError {
1341 kind: crate::common::validate::ConstraintKind::MinLength,
1342 message: format!(
1343 "{} (got {})",
1344 "value is shorter than minimum length 1", len
1345 ),
1346 });
1347 }
1348 }
1349 {
1350 let len = value.chars().count();
1351 let violated = len > 4usize;
1352 if violated {
1353 return Err(crate::common::validate::ConstraintError {
1354 kind: crate::common::validate::ConstraintKind::MaxLength,
1355 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1356 });
1357 }
1358 }
1359 }
1360 Ok(Self(value))
1361 }
1362}
1363impl ExternalOrganisationIdentification1Code {
1364 #[allow(clippy::unreadable_literal)]
1366 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1367 Self::try_from(value.into())
1368 }
1369}
1370impl From<ExternalOrganisationIdentification1Code> for String {
1371 fn from(v: ExternalOrganisationIdentification1Code) -> Self {
1372 v.0
1373 }
1374}
1375#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1378#[serde(transparent)]
1379pub struct ExternalPaymentGroupStatus1Code(pub String);
1380impl TryFrom<String> for ExternalPaymentGroupStatus1Code {
1381 type Error = crate::common::validate::ConstraintError;
1382 #[allow(clippy::unreadable_literal)]
1383 fn try_from(value: String) -> Result<Self, Self::Error> {
1384 {
1385 let value: &str = &value;
1386 {
1387 let len = value.chars().count();
1388 let violated = len < 1usize;
1389 if violated {
1390 return Err(crate::common::validate::ConstraintError {
1391 kind: crate::common::validate::ConstraintKind::MinLength,
1392 message: format!(
1393 "{} (got {})",
1394 "value is shorter than minimum length 1", len
1395 ),
1396 });
1397 }
1398 }
1399 {
1400 let len = value.chars().count();
1401 let violated = len > 4usize;
1402 if violated {
1403 return Err(crate::common::validate::ConstraintError {
1404 kind: crate::common::validate::ConstraintKind::MaxLength,
1405 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1406 });
1407 }
1408 }
1409 }
1410 Ok(Self(value))
1411 }
1412}
1413impl ExternalPaymentGroupStatus1Code {
1414 #[allow(clippy::unreadable_literal)]
1416 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1417 Self::try_from(value.into())
1418 }
1419}
1420impl From<ExternalPaymentGroupStatus1Code> for String {
1421 fn from(v: ExternalPaymentGroupStatus1Code) -> Self {
1422 v.0
1423 }
1424}
1425#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1428#[serde(transparent)]
1429pub struct ExternalPaymentTransactionStatus1Code(pub String);
1430impl TryFrom<String> for ExternalPaymentTransactionStatus1Code {
1431 type Error = crate::common::validate::ConstraintError;
1432 #[allow(clippy::unreadable_literal)]
1433 fn try_from(value: String) -> Result<Self, Self::Error> {
1434 {
1435 let value: &str = &value;
1436 {
1437 let len = value.chars().count();
1438 let violated = len < 1usize;
1439 if violated {
1440 return Err(crate::common::validate::ConstraintError {
1441 kind: crate::common::validate::ConstraintKind::MinLength,
1442 message: format!(
1443 "{} (got {})",
1444 "value is shorter than minimum length 1", len
1445 ),
1446 });
1447 }
1448 }
1449 {
1450 let len = value.chars().count();
1451 let violated = len > 4usize;
1452 if violated {
1453 return Err(crate::common::validate::ConstraintError {
1454 kind: crate::common::validate::ConstraintKind::MaxLength,
1455 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1456 });
1457 }
1458 }
1459 }
1460 Ok(Self(value))
1461 }
1462}
1463impl ExternalPaymentTransactionStatus1Code {
1464 #[allow(clippy::unreadable_literal)]
1466 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1467 Self::try_from(value.into())
1468 }
1469}
1470impl From<ExternalPaymentTransactionStatus1Code> for String {
1471 fn from(v: ExternalPaymentTransactionStatus1Code) -> Self {
1472 v.0
1473 }
1474}
1475#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1478#[serde(transparent)]
1479pub struct ExternalPersonIdentification1Code(pub String);
1480impl TryFrom<String> for ExternalPersonIdentification1Code {
1481 type Error = crate::common::validate::ConstraintError;
1482 #[allow(clippy::unreadable_literal)]
1483 fn try_from(value: String) -> Result<Self, Self::Error> {
1484 {
1485 let value: &str = &value;
1486 {
1487 let len = value.chars().count();
1488 let violated = len < 1usize;
1489 if violated {
1490 return Err(crate::common::validate::ConstraintError {
1491 kind: crate::common::validate::ConstraintKind::MinLength,
1492 message: format!(
1493 "{} (got {})",
1494 "value is shorter than minimum length 1", len
1495 ),
1496 });
1497 }
1498 }
1499 {
1500 let len = value.chars().count();
1501 let violated = len > 4usize;
1502 if violated {
1503 return Err(crate::common::validate::ConstraintError {
1504 kind: crate::common::validate::ConstraintKind::MaxLength,
1505 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1506 });
1507 }
1508 }
1509 }
1510 Ok(Self(value))
1511 }
1512}
1513impl ExternalPersonIdentification1Code {
1514 #[allow(clippy::unreadable_literal)]
1516 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1517 Self::try_from(value.into())
1518 }
1519}
1520impl From<ExternalPersonIdentification1Code> for String {
1521 fn from(v: ExternalPersonIdentification1Code) -> Self {
1522 v.0
1523 }
1524}
1525#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1528#[serde(transparent)]
1529pub struct ExternalProxyAccountType1Code(pub String);
1530impl TryFrom<String> for ExternalProxyAccountType1Code {
1531 type Error = crate::common::validate::ConstraintError;
1532 #[allow(clippy::unreadable_literal)]
1533 fn try_from(value: String) -> Result<Self, Self::Error> {
1534 {
1535 let value: &str = &value;
1536 {
1537 let len = value.chars().count();
1538 let violated = len < 1usize;
1539 if violated {
1540 return Err(crate::common::validate::ConstraintError {
1541 kind: crate::common::validate::ConstraintKind::MinLength,
1542 message: format!(
1543 "{} (got {})",
1544 "value is shorter than minimum length 1", len
1545 ),
1546 });
1547 }
1548 }
1549 {
1550 let len = value.chars().count();
1551 let violated = len > 4usize;
1552 if violated {
1553 return Err(crate::common::validate::ConstraintError {
1554 kind: crate::common::validate::ConstraintKind::MaxLength,
1555 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1556 });
1557 }
1558 }
1559 }
1560 Ok(Self(value))
1561 }
1562}
1563impl ExternalProxyAccountType1Code {
1564 #[allow(clippy::unreadable_literal)]
1566 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1567 Self::try_from(value.into())
1568 }
1569}
1570impl From<ExternalProxyAccountType1Code> for String {
1571 fn from(v: ExternalProxyAccountType1Code) -> Self {
1572 v.0
1573 }
1574}
1575#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1578#[serde(transparent)]
1579pub struct ExternalPurpose1Code(pub String);
1580impl TryFrom<String> for ExternalPurpose1Code {
1581 type Error = crate::common::validate::ConstraintError;
1582 #[allow(clippy::unreadable_literal)]
1583 fn try_from(value: String) -> Result<Self, Self::Error> {
1584 {
1585 let value: &str = &value;
1586 {
1587 let len = value.chars().count();
1588 let violated = len < 1usize;
1589 if violated {
1590 return Err(crate::common::validate::ConstraintError {
1591 kind: crate::common::validate::ConstraintKind::MinLength,
1592 message: format!(
1593 "{} (got {})",
1594 "value is shorter than minimum length 1", len
1595 ),
1596 });
1597 }
1598 }
1599 {
1600 let len = value.chars().count();
1601 let violated = len > 4usize;
1602 if violated {
1603 return Err(crate::common::validate::ConstraintError {
1604 kind: crate::common::validate::ConstraintKind::MaxLength,
1605 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1606 });
1607 }
1608 }
1609 }
1610 Ok(Self(value))
1611 }
1612}
1613impl ExternalPurpose1Code {
1614 #[allow(clippy::unreadable_literal)]
1616 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1617 Self::try_from(value.into())
1618 }
1619}
1620impl From<ExternalPurpose1Code> for String {
1621 fn from(v: ExternalPurpose1Code) -> Self {
1622 v.0
1623 }
1624}
1625#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1628#[serde(transparent)]
1629pub struct ExternalServiceLevel1Code(pub String);
1630impl TryFrom<String> for ExternalServiceLevel1Code {
1631 type Error = crate::common::validate::ConstraintError;
1632 #[allow(clippy::unreadable_literal)]
1633 fn try_from(value: String) -> Result<Self, Self::Error> {
1634 {
1635 let value: &str = &value;
1636 {
1637 let len = value.chars().count();
1638 let violated = len < 1usize;
1639 if violated {
1640 return Err(crate::common::validate::ConstraintError {
1641 kind: crate::common::validate::ConstraintKind::MinLength,
1642 message: format!(
1643 "{} (got {})",
1644 "value is shorter than minimum length 1", len
1645 ),
1646 });
1647 }
1648 }
1649 {
1650 let len = value.chars().count();
1651 let violated = len > 4usize;
1652 if violated {
1653 return Err(crate::common::validate::ConstraintError {
1654 kind: crate::common::validate::ConstraintKind::MaxLength,
1655 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1656 });
1657 }
1658 }
1659 }
1660 Ok(Self(value))
1661 }
1662}
1663impl ExternalServiceLevel1Code {
1664 #[allow(clippy::unreadable_literal)]
1666 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1667 Self::try_from(value.into())
1668 }
1669}
1670impl From<ExternalServiceLevel1Code> for String {
1671 fn from(v: ExternalServiceLevel1Code) -> Self {
1672 v.0
1673 }
1674}
1675#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1678#[serde(transparent)]
1679pub struct ExternalStatusReason1Code(pub String);
1680impl TryFrom<String> for ExternalStatusReason1Code {
1681 type Error = crate::common::validate::ConstraintError;
1682 #[allow(clippy::unreadable_literal)]
1683 fn try_from(value: String) -> Result<Self, Self::Error> {
1684 {
1685 let value: &str = &value;
1686 {
1687 let len = value.chars().count();
1688 let violated = len < 1usize;
1689 if violated {
1690 return Err(crate::common::validate::ConstraintError {
1691 kind: crate::common::validate::ConstraintKind::MinLength,
1692 message: format!(
1693 "{} (got {})",
1694 "value is shorter than minimum length 1", len
1695 ),
1696 });
1697 }
1698 }
1699 {
1700 let len = value.chars().count();
1701 let violated = len > 4usize;
1702 if violated {
1703 return Err(crate::common::validate::ConstraintError {
1704 kind: crate::common::validate::ConstraintKind::MaxLength,
1705 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1706 });
1707 }
1708 }
1709 }
1710 Ok(Self(value))
1711 }
1712}
1713impl ExternalStatusReason1Code {
1714 #[allow(clippy::unreadable_literal)]
1716 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1717 Self::try_from(value.into())
1718 }
1719}
1720impl From<ExternalStatusReason1Code> for String {
1721 fn from(v: ExternalStatusReason1Code) -> Self {
1722 v.0
1723 }
1724}
1725#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1726pub enum Frequency6Code {
1727 #[serde(rename = "YEAR")]
1728 Year,
1729 #[serde(rename = "MNTH")]
1730 Mnth,
1731 #[serde(rename = "QURT")]
1732 Qurt,
1733 #[serde(rename = "MIAN")]
1734 Mian,
1735 #[serde(rename = "WEEK")]
1736 Week,
1737 #[serde(rename = "DAIL")]
1738 Dail,
1739 #[serde(rename = "ADHO")]
1740 Adho,
1741 #[serde(rename = "INDA")]
1742 Inda,
1743 #[serde(rename = "FRTN")]
1744 Frtn,
1745}
1746#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1748#[serde(transparent)]
1749pub struct IBAN2007Identifier(pub String);
1750impl TryFrom<String> for IBAN2007Identifier {
1751 type Error = crate::common::validate::ConstraintError;
1752 #[allow(clippy::unreadable_literal)]
1753 fn try_from(value: String) -> Result<Self, Self::Error> {
1754 {
1755 let value: &str = &value;
1756 {
1757 let violated = {
1758 let bytes = value.as_bytes();
1759 let len = bytes.len();
1760 let result: bool = (|| -> bool {
1761 let mut pos: usize = 0;
1762 if !(5usize..=34usize).contains(&len) {
1763 return true;
1764 }
1765 {
1766 let end = pos + 2usize;
1767 if end > len {
1768 return true;
1769 }
1770 for &b in &bytes[pos..end] {
1771 if !(65u8..=90u8).contains(&b) {
1772 return true;
1773 }
1774 }
1775 pos = end;
1776 }
1777 {
1778 let end = pos + 2usize;
1779 if end > len {
1780 return true;
1781 }
1782 for &b in &bytes[pos..end] {
1783 if !(48u8..=57u8).contains(&b) {
1784 return true;
1785 }
1786 }
1787 pos = end;
1788 }
1789 {
1790 let start = pos;
1791 let limit = if pos + 30usize < len {
1792 pos + 30usize
1793 } else {
1794 len
1795 };
1796 while pos < limit {
1797 let b = bytes[pos];
1798 if !(97u8..=122u8).contains(&b)
1799 && !(65u8..=90u8).contains(&b)
1800 && !(48u8..=57u8).contains(&b)
1801 {
1802 break;
1803 }
1804 pos += 1;
1805 }
1806 let matched = pos - start;
1807 if matched < 1usize {
1808 return true;
1809 }
1810 }
1811 if pos != len {
1812 return true;
1813 }
1814 false
1815 })();
1816 result
1817 };
1818 if violated {
1819 return Err(crate::common::validate::ConstraintError {
1820 kind: crate::common::validate::ConstraintKind::Pattern,
1821 message:
1822 "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
1823 .to_string(),
1824 });
1825 }
1826 }
1827 }
1828 Ok(Self(value))
1829 }
1830}
1831impl IBAN2007Identifier {
1832 #[allow(clippy::unreadable_literal)]
1834 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1835 Self::try_from(value.into())
1836 }
1837}
1838impl From<IBAN2007Identifier> for String {
1839 fn from(v: IBAN2007Identifier) -> Self {
1840 v.0
1841 }
1842}
1843#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1844#[serde(transparent)]
1845pub struct ISODate(pub String);
1846#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1847#[serde(transparent)]
1848pub struct ISODateTime(pub String);
1849#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1850#[serde(transparent)]
1851pub struct ISOYear(pub String);
1852#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1854#[serde(transparent)]
1855pub struct LEIIdentifier(pub String);
1856impl TryFrom<String> for LEIIdentifier {
1857 type Error = crate::common::validate::ConstraintError;
1858 #[allow(clippy::unreadable_literal)]
1859 fn try_from(value: String) -> Result<Self, Self::Error> {
1860 {
1861 let value: &str = &value;
1862 {
1863 let violated = {
1864 let bytes = value.as_bytes();
1865 bytes.len() != 20usize
1866 || ({
1867 let b = bytes[0usize];
1868 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1869 })
1870 || ({
1871 let b = bytes[1usize];
1872 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1873 })
1874 || ({
1875 let b = bytes[2usize];
1876 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1877 })
1878 || ({
1879 let b = bytes[3usize];
1880 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1881 })
1882 || ({
1883 let b = bytes[4usize];
1884 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1885 })
1886 || ({
1887 let b = bytes[5usize];
1888 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1889 })
1890 || ({
1891 let b = bytes[6usize];
1892 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1893 })
1894 || ({
1895 let b = bytes[7usize];
1896 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1897 })
1898 || ({
1899 let b = bytes[8usize];
1900 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1901 })
1902 || ({
1903 let b = bytes[9usize];
1904 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1905 })
1906 || ({
1907 let b = bytes[10usize];
1908 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1909 })
1910 || ({
1911 let b = bytes[11usize];
1912 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1913 })
1914 || ({
1915 let b = bytes[12usize];
1916 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1917 })
1918 || ({
1919 let b = bytes[13usize];
1920 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1921 })
1922 || ({
1923 let b = bytes[14usize];
1924 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1925 })
1926 || ({
1927 let b = bytes[15usize];
1928 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1929 })
1930 || ({
1931 let b = bytes[16usize];
1932 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1933 })
1934 || ({
1935 let b = bytes[17usize];
1936 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1937 })
1938 || ({
1939 let b = bytes[18usize];
1940 !(48u8..=57u8).contains(&b)
1941 })
1942 || ({
1943 let b = bytes[19usize];
1944 !(48u8..=57u8).contains(&b)
1945 })
1946 };
1947 if violated {
1948 return Err(crate::common::validate::ConstraintError {
1949 kind: crate::common::validate::ConstraintKind::Pattern,
1950 message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}"
1951 .to_string(),
1952 });
1953 }
1954 }
1955 }
1956 Ok(Self(value))
1957 }
1958}
1959impl LEIIdentifier {
1960 #[allow(clippy::unreadable_literal)]
1962 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1963 Self::try_from(value.into())
1964 }
1965}
1966impl From<LEIIdentifier> for String {
1967 fn from(v: LEIIdentifier) -> Self {
1968 v.0
1969 }
1970}
1971#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1972pub enum MandateClassification1Code {
1973 #[serde(rename = "FIXE")]
1974 Fixe,
1975 #[serde(rename = "USGB")]
1976 Usgb,
1977 #[serde(rename = "VARI")]
1978 Vari,
1979}
1980#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1983#[serde(transparent)]
1984pub struct Max1025Text(pub String);
1985impl TryFrom<String> for Max1025Text {
1986 type Error = crate::common::validate::ConstraintError;
1987 #[allow(clippy::unreadable_literal)]
1988 fn try_from(value: String) -> Result<Self, Self::Error> {
1989 {
1990 let value: &str = &value;
1991 {
1992 let len = value.chars().count();
1993 let violated = len < 1usize;
1994 if violated {
1995 return Err(crate::common::validate::ConstraintError {
1996 kind: crate::common::validate::ConstraintKind::MinLength,
1997 message: format!(
1998 "{} (got {})",
1999 "value is shorter than minimum length 1", len
2000 ),
2001 });
2002 }
2003 }
2004 {
2005 let len = value.chars().count();
2006 let violated = len > 1025usize;
2007 if violated {
2008 return Err(crate::common::validate::ConstraintError {
2009 kind: crate::common::validate::ConstraintKind::MaxLength,
2010 message: format!("{} (got {})", "value exceeds maximum length 1025", len),
2011 });
2012 }
2013 }
2014 }
2015 Ok(Self(value))
2016 }
2017}
2018impl Max1025Text {
2019 #[allow(clippy::unreadable_literal)]
2021 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2022 Self::try_from(value.into())
2023 }
2024}
2025impl From<Max1025Text> for String {
2026 fn from(v: Max1025Text) -> Self {
2027 v.0
2028 }
2029}
2030#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2033#[serde(transparent)]
2034pub struct Max105Text(pub String);
2035impl TryFrom<String> for Max105Text {
2036 type Error = crate::common::validate::ConstraintError;
2037 #[allow(clippy::unreadable_literal)]
2038 fn try_from(value: String) -> Result<Self, Self::Error> {
2039 {
2040 let value: &str = &value;
2041 {
2042 let len = value.chars().count();
2043 let violated = len < 1usize;
2044 if violated {
2045 return Err(crate::common::validate::ConstraintError {
2046 kind: crate::common::validate::ConstraintKind::MinLength,
2047 message: format!(
2048 "{} (got {})",
2049 "value is shorter than minimum length 1", len
2050 ),
2051 });
2052 }
2053 }
2054 {
2055 let len = value.chars().count();
2056 let violated = len > 105usize;
2057 if violated {
2058 return Err(crate::common::validate::ConstraintError {
2059 kind: crate::common::validate::ConstraintKind::MaxLength,
2060 message: format!("{} (got {})", "value exceeds maximum length 105", len),
2061 });
2062 }
2063 }
2064 }
2065 Ok(Self(value))
2066 }
2067}
2068impl Max105Text {
2069 #[allow(clippy::unreadable_literal)]
2071 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2072 Self::try_from(value.into())
2073 }
2074}
2075impl From<Max105Text> for String {
2076 fn from(v: Max105Text) -> Self {
2077 v.0
2078 }
2079}
2080#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2083#[serde(transparent)]
2084pub struct Max10KBinary(pub String);
2085impl TryFrom<String> for Max10KBinary {
2086 type Error = crate::common::validate::ConstraintError;
2087 #[allow(clippy::unreadable_literal)]
2088 fn try_from(value: String) -> Result<Self, Self::Error> {
2089 {
2090 let value: &str = &value;
2091 {
2092 let len = value.chars().count();
2093 let violated = len < 1usize;
2094 if violated {
2095 return Err(crate::common::validate::ConstraintError {
2096 kind: crate::common::validate::ConstraintKind::MinLength,
2097 message: format!(
2098 "{} (got {})",
2099 "value is shorter than minimum length 1", len
2100 ),
2101 });
2102 }
2103 }
2104 {
2105 let len = value.chars().count();
2106 let violated = len > 10240usize;
2107 if violated {
2108 return Err(crate::common::validate::ConstraintError {
2109 kind: crate::common::validate::ConstraintKind::MaxLength,
2110 message: format!("{} (got {})", "value exceeds maximum length 10240", len),
2111 });
2112 }
2113 }
2114 }
2115 Ok(Self(value))
2116 }
2117}
2118impl Max10KBinary {
2119 #[allow(clippy::unreadable_literal)]
2121 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2122 Self::try_from(value.into())
2123 }
2124}
2125impl From<Max10KBinary> for String {
2126 fn from(v: Max10KBinary) -> Self {
2127 v.0
2128 }
2129}
2130#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2133#[serde(transparent)]
2134pub struct Max128Text(pub String);
2135impl TryFrom<String> for Max128Text {
2136 type Error = crate::common::validate::ConstraintError;
2137 #[allow(clippy::unreadable_literal)]
2138 fn try_from(value: String) -> Result<Self, Self::Error> {
2139 {
2140 let value: &str = &value;
2141 {
2142 let len = value.chars().count();
2143 let violated = len < 1usize;
2144 if violated {
2145 return Err(crate::common::validate::ConstraintError {
2146 kind: crate::common::validate::ConstraintKind::MinLength,
2147 message: format!(
2148 "{} (got {})",
2149 "value is shorter than minimum length 1", len
2150 ),
2151 });
2152 }
2153 }
2154 {
2155 let len = value.chars().count();
2156 let violated = len > 128usize;
2157 if violated {
2158 return Err(crate::common::validate::ConstraintError {
2159 kind: crate::common::validate::ConstraintKind::MaxLength,
2160 message: format!("{} (got {})", "value exceeds maximum length 128", len),
2161 });
2162 }
2163 }
2164 }
2165 Ok(Self(value))
2166 }
2167}
2168impl Max128Text {
2169 #[allow(clippy::unreadable_literal)]
2171 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2172 Self::try_from(value.into())
2173 }
2174}
2175impl From<Max128Text> for String {
2176 fn from(v: Max128Text) -> Self {
2177 v.0
2178 }
2179}
2180#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2183#[serde(transparent)]
2184pub struct Max140Text(pub String);
2185impl TryFrom<String> for Max140Text {
2186 type Error = crate::common::validate::ConstraintError;
2187 #[allow(clippy::unreadable_literal)]
2188 fn try_from(value: String) -> Result<Self, Self::Error> {
2189 {
2190 let value: &str = &value;
2191 {
2192 let len = value.chars().count();
2193 let violated = len < 1usize;
2194 if violated {
2195 return Err(crate::common::validate::ConstraintError {
2196 kind: crate::common::validate::ConstraintKind::MinLength,
2197 message: format!(
2198 "{} (got {})",
2199 "value is shorter than minimum length 1", len
2200 ),
2201 });
2202 }
2203 }
2204 {
2205 let len = value.chars().count();
2206 let violated = len > 140usize;
2207 if violated {
2208 return Err(crate::common::validate::ConstraintError {
2209 kind: crate::common::validate::ConstraintKind::MaxLength,
2210 message: format!("{} (got {})", "value exceeds maximum length 140", len),
2211 });
2212 }
2213 }
2214 }
2215 Ok(Self(value))
2216 }
2217}
2218impl Max140Text {
2219 #[allow(clippy::unreadable_literal)]
2221 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2222 Self::try_from(value.into())
2223 }
2224}
2225impl From<Max140Text> for String {
2226 fn from(v: Max140Text) -> Self {
2227 v.0
2228 }
2229}
2230#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2232#[serde(transparent)]
2233pub struct Max15NumericText(pub String);
2234impl TryFrom<String> for Max15NumericText {
2235 type Error = crate::common::validate::ConstraintError;
2236 #[allow(clippy::unreadable_literal)]
2237 fn try_from(value: String) -> Result<Self, Self::Error> {
2238 {
2239 let value: &str = &value;
2240 {
2241 let violated = {
2242 let bytes = value.as_bytes();
2243 let len = bytes.len();
2244 let result: bool = (|| -> bool {
2245 let mut pos: usize = 0;
2246 if !(1usize..=15usize).contains(&len) {
2247 return true;
2248 }
2249 {
2250 let start = pos;
2251 let limit = if pos + 15usize < len {
2252 pos + 15usize
2253 } else {
2254 len
2255 };
2256 while pos < limit {
2257 let b = bytes[pos];
2258 if !(48u8..=57u8).contains(&b) {
2259 break;
2260 }
2261 pos += 1;
2262 }
2263 let matched = pos - start;
2264 if matched < 1usize {
2265 return true;
2266 }
2267 }
2268 if pos != len {
2269 return true;
2270 }
2271 false
2272 })();
2273 result
2274 };
2275 if violated {
2276 return Err(crate::common::validate::ConstraintError {
2277 kind: crate::common::validate::ConstraintKind::Pattern,
2278 message: "value does not match pattern [0-9]{1,15}".to_string(),
2279 });
2280 }
2281 }
2282 }
2283 Ok(Self(value))
2284 }
2285}
2286impl Max15NumericText {
2287 #[allow(clippy::unreadable_literal)]
2289 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2290 Self::try_from(value.into())
2291 }
2292}
2293impl From<Max15NumericText> for String {
2294 fn from(v: Max15NumericText) -> Self {
2295 v.0
2296 }
2297}
2298#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2301#[serde(transparent)]
2302pub struct Max16Text(pub String);
2303impl TryFrom<String> for Max16Text {
2304 type Error = crate::common::validate::ConstraintError;
2305 #[allow(clippy::unreadable_literal)]
2306 fn try_from(value: String) -> Result<Self, Self::Error> {
2307 {
2308 let value: &str = &value;
2309 {
2310 let len = value.chars().count();
2311 let violated = len < 1usize;
2312 if violated {
2313 return Err(crate::common::validate::ConstraintError {
2314 kind: crate::common::validate::ConstraintKind::MinLength,
2315 message: format!(
2316 "{} (got {})",
2317 "value is shorter than minimum length 1", len
2318 ),
2319 });
2320 }
2321 }
2322 {
2323 let len = value.chars().count();
2324 let violated = len > 16usize;
2325 if violated {
2326 return Err(crate::common::validate::ConstraintError {
2327 kind: crate::common::validate::ConstraintKind::MaxLength,
2328 message: format!("{} (got {})", "value exceeds maximum length 16", len),
2329 });
2330 }
2331 }
2332 }
2333 Ok(Self(value))
2334 }
2335}
2336impl Max16Text {
2337 #[allow(clippy::unreadable_literal)]
2339 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2340 Self::try_from(value.into())
2341 }
2342}
2343impl From<Max16Text> for String {
2344 fn from(v: Max16Text) -> Self {
2345 v.0
2346 }
2347}
2348#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2351#[serde(transparent)]
2352pub struct Max2048Text(pub String);
2353impl TryFrom<String> for Max2048Text {
2354 type Error = crate::common::validate::ConstraintError;
2355 #[allow(clippy::unreadable_literal)]
2356 fn try_from(value: String) -> Result<Self, Self::Error> {
2357 {
2358 let value: &str = &value;
2359 {
2360 let len = value.chars().count();
2361 let violated = len < 1usize;
2362 if violated {
2363 return Err(crate::common::validate::ConstraintError {
2364 kind: crate::common::validate::ConstraintKind::MinLength,
2365 message: format!(
2366 "{} (got {})",
2367 "value is shorter than minimum length 1", len
2368 ),
2369 });
2370 }
2371 }
2372 {
2373 let len = value.chars().count();
2374 let violated = len > 2048usize;
2375 if violated {
2376 return Err(crate::common::validate::ConstraintError {
2377 kind: crate::common::validate::ConstraintKind::MaxLength,
2378 message: format!("{} (got {})", "value exceeds maximum length 2048", len),
2379 });
2380 }
2381 }
2382 }
2383 Ok(Self(value))
2384 }
2385}
2386impl Max2048Text {
2387 #[allow(clippy::unreadable_literal)]
2389 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2390 Self::try_from(value.into())
2391 }
2392}
2393impl From<Max2048Text> for String {
2394 fn from(v: Max2048Text) -> Self {
2395 v.0
2396 }
2397}
2398#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2401#[serde(transparent)]
2402pub struct Max256Text(pub String);
2403impl TryFrom<String> for Max256Text {
2404 type Error = crate::common::validate::ConstraintError;
2405 #[allow(clippy::unreadable_literal)]
2406 fn try_from(value: String) -> Result<Self, Self::Error> {
2407 {
2408 let value: &str = &value;
2409 {
2410 let len = value.chars().count();
2411 let violated = len < 1usize;
2412 if violated {
2413 return Err(crate::common::validate::ConstraintError {
2414 kind: crate::common::validate::ConstraintKind::MinLength,
2415 message: format!(
2416 "{} (got {})",
2417 "value is shorter than minimum length 1", len
2418 ),
2419 });
2420 }
2421 }
2422 {
2423 let len = value.chars().count();
2424 let violated = len > 256usize;
2425 if violated {
2426 return Err(crate::common::validate::ConstraintError {
2427 kind: crate::common::validate::ConstraintKind::MaxLength,
2428 message: format!("{} (got {})", "value exceeds maximum length 256", len),
2429 });
2430 }
2431 }
2432 }
2433 Ok(Self(value))
2434 }
2435}
2436impl Max256Text {
2437 #[allow(clippy::unreadable_literal)]
2439 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2440 Self::try_from(value.into())
2441 }
2442}
2443impl From<Max256Text> for String {
2444 fn from(v: Max256Text) -> Self {
2445 v.0
2446 }
2447}
2448#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2451#[serde(transparent)]
2452pub struct Max34Text(pub String);
2453impl TryFrom<String> for Max34Text {
2454 type Error = crate::common::validate::ConstraintError;
2455 #[allow(clippy::unreadable_literal)]
2456 fn try_from(value: String) -> Result<Self, Self::Error> {
2457 {
2458 let value: &str = &value;
2459 {
2460 let len = value.chars().count();
2461 let violated = len < 1usize;
2462 if violated {
2463 return Err(crate::common::validate::ConstraintError {
2464 kind: crate::common::validate::ConstraintKind::MinLength,
2465 message: format!(
2466 "{} (got {})",
2467 "value is shorter than minimum length 1", len
2468 ),
2469 });
2470 }
2471 }
2472 {
2473 let len = value.chars().count();
2474 let violated = len > 34usize;
2475 if violated {
2476 return Err(crate::common::validate::ConstraintError {
2477 kind: crate::common::validate::ConstraintKind::MaxLength,
2478 message: format!("{} (got {})", "value exceeds maximum length 34", len),
2479 });
2480 }
2481 }
2482 }
2483 Ok(Self(value))
2484 }
2485}
2486impl Max34Text {
2487 #[allow(clippy::unreadable_literal)]
2489 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2490 Self::try_from(value.into())
2491 }
2492}
2493impl From<Max34Text> for String {
2494 fn from(v: Max34Text) -> Self {
2495 v.0
2496 }
2497}
2498#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2501#[serde(transparent)]
2502pub struct Max350Text(pub String);
2503impl TryFrom<String> for Max350Text {
2504 type Error = crate::common::validate::ConstraintError;
2505 #[allow(clippy::unreadable_literal)]
2506 fn try_from(value: String) -> Result<Self, Self::Error> {
2507 {
2508 let value: &str = &value;
2509 {
2510 let len = value.chars().count();
2511 let violated = len < 1usize;
2512 if violated {
2513 return Err(crate::common::validate::ConstraintError {
2514 kind: crate::common::validate::ConstraintKind::MinLength,
2515 message: format!(
2516 "{} (got {})",
2517 "value is shorter than minimum length 1", len
2518 ),
2519 });
2520 }
2521 }
2522 {
2523 let len = value.chars().count();
2524 let violated = len > 350usize;
2525 if violated {
2526 return Err(crate::common::validate::ConstraintError {
2527 kind: crate::common::validate::ConstraintKind::MaxLength,
2528 message: format!("{} (got {})", "value exceeds maximum length 350", len),
2529 });
2530 }
2531 }
2532 }
2533 Ok(Self(value))
2534 }
2535}
2536impl Max350Text {
2537 #[allow(clippy::unreadable_literal)]
2539 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2540 Self::try_from(value.into())
2541 }
2542}
2543impl From<Max350Text> for String {
2544 fn from(v: Max350Text) -> Self {
2545 v.0
2546 }
2547}
2548#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2551#[serde(transparent)]
2552pub struct Max35Text(pub String);
2553impl TryFrom<String> for Max35Text {
2554 type Error = crate::common::validate::ConstraintError;
2555 #[allow(clippy::unreadable_literal)]
2556 fn try_from(value: String) -> Result<Self, Self::Error> {
2557 {
2558 let value: &str = &value;
2559 {
2560 let len = value.chars().count();
2561 let violated = len < 1usize;
2562 if violated {
2563 return Err(crate::common::validate::ConstraintError {
2564 kind: crate::common::validate::ConstraintKind::MinLength,
2565 message: format!(
2566 "{} (got {})",
2567 "value is shorter than minimum length 1", len
2568 ),
2569 });
2570 }
2571 }
2572 {
2573 let len = value.chars().count();
2574 let violated = len > 35usize;
2575 if violated {
2576 return Err(crate::common::validate::ConstraintError {
2577 kind: crate::common::validate::ConstraintKind::MaxLength,
2578 message: format!("{} (got {})", "value exceeds maximum length 35", len),
2579 });
2580 }
2581 }
2582 }
2583 Ok(Self(value))
2584 }
2585}
2586impl Max35Text {
2587 #[allow(clippy::unreadable_literal)]
2589 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2590 Self::try_from(value.into())
2591 }
2592}
2593impl From<Max35Text> for String {
2594 fn from(v: Max35Text) -> Self {
2595 v.0
2596 }
2597}
2598#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2601#[serde(transparent)]
2602pub struct Max4Text(pub String);
2603impl TryFrom<String> for Max4Text {
2604 type Error = crate::common::validate::ConstraintError;
2605 #[allow(clippy::unreadable_literal)]
2606 fn try_from(value: String) -> Result<Self, Self::Error> {
2607 {
2608 let value: &str = &value;
2609 {
2610 let len = value.chars().count();
2611 let violated = len < 1usize;
2612 if violated {
2613 return Err(crate::common::validate::ConstraintError {
2614 kind: crate::common::validate::ConstraintKind::MinLength,
2615 message: format!(
2616 "{} (got {})",
2617 "value is shorter than minimum length 1", len
2618 ),
2619 });
2620 }
2621 }
2622 {
2623 let len = value.chars().count();
2624 let violated = len > 4usize;
2625 if violated {
2626 return Err(crate::common::validate::ConstraintError {
2627 kind: crate::common::validate::ConstraintKind::MaxLength,
2628 message: format!("{} (got {})", "value exceeds maximum length 4", len),
2629 });
2630 }
2631 }
2632 }
2633 Ok(Self(value))
2634 }
2635}
2636impl Max4Text {
2637 #[allow(clippy::unreadable_literal)]
2639 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2640 Self::try_from(value.into())
2641 }
2642}
2643impl From<Max4Text> for String {
2644 fn from(v: Max4Text) -> Self {
2645 v.0
2646 }
2647}
2648#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2651#[serde(transparent)]
2652pub struct Max70Text(pub String);
2653impl TryFrom<String> for Max70Text {
2654 type Error = crate::common::validate::ConstraintError;
2655 #[allow(clippy::unreadable_literal)]
2656 fn try_from(value: String) -> Result<Self, Self::Error> {
2657 {
2658 let value: &str = &value;
2659 {
2660 let len = value.chars().count();
2661 let violated = len < 1usize;
2662 if violated {
2663 return Err(crate::common::validate::ConstraintError {
2664 kind: crate::common::validate::ConstraintKind::MinLength,
2665 message: format!(
2666 "{} (got {})",
2667 "value is shorter than minimum length 1", len
2668 ),
2669 });
2670 }
2671 }
2672 {
2673 let len = value.chars().count();
2674 let violated = len > 70usize;
2675 if violated {
2676 return Err(crate::common::validate::ConstraintError {
2677 kind: crate::common::validate::ConstraintKind::MaxLength,
2678 message: format!("{} (got {})", "value exceeds maximum length 70", len),
2679 });
2680 }
2681 }
2682 }
2683 Ok(Self(value))
2684 }
2685}
2686impl Max70Text {
2687 #[allow(clippy::unreadable_literal)]
2689 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2690 Self::try_from(value.into())
2691 }
2692}
2693impl From<Max70Text> for String {
2694 fn from(v: Max70Text) -> Self {
2695 v.0
2696 }
2697}
2698#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2699pub enum NamePrefix2Code {
2700 #[serde(rename = "DOCT")]
2701 Doct,
2702 #[serde(rename = "MADM")]
2703 Madm,
2704 #[serde(rename = "MISS")]
2705 Miss,
2706 #[serde(rename = "MIST")]
2707 Mist,
2708 #[serde(rename = "MIKS")]
2709 Miks,
2710}
2711#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2714#[serde(transparent)]
2715pub struct Number(pub String);
2716impl TryFrom<String> for Number {
2717 type Error = crate::common::validate::ConstraintError;
2718 #[allow(clippy::unreadable_literal)]
2719 fn try_from(value: String) -> Result<Self, Self::Error> {
2720 {
2721 let value: &str = &value;
2722 {
2723 let frac_count = value.find('.').map_or(0, |dot| {
2724 value[dot + 1..]
2725 .chars()
2726 .filter(char::is_ascii_digit)
2727 .count()
2728 });
2729 let violated = frac_count > 0usize;
2730 if violated {
2731 return Err(crate::common::validate::ConstraintError {
2732 kind: crate::common::validate::ConstraintKind::FractionDigits,
2733 message: format!(
2734 "{} (got {})",
2735 "value exceeds maximum fraction digits 0", frac_count
2736 ),
2737 });
2738 }
2739 }
2740 {
2741 let digit_count = value.chars().filter(char::is_ascii_digit).count();
2742 let violated = digit_count > 18usize;
2743 if violated {
2744 return Err(crate::common::validate::ConstraintError {
2745 kind: crate::common::validate::ConstraintKind::TotalDigits,
2746 message: format!(
2747 "{} (got {})",
2748 "value exceeds maximum total digits 18", digit_count
2749 ),
2750 });
2751 }
2752 }
2753 }
2754 Ok(Self(value))
2755 }
2756}
2757impl Number {
2758 #[allow(clippy::unreadable_literal)]
2760 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2761 Self::try_from(value.into())
2762 }
2763}
2764impl From<Number> for String {
2765 fn from(v: Number) -> Self {
2766 v.0
2767 }
2768}
2769#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2770pub enum PaymentMethod4Code {
2771 #[serde(rename = "CHK")]
2772 Chk,
2773 #[serde(rename = "TRF")]
2774 Trf,
2775 #[serde(rename = "DD")]
2776 Dd,
2777 #[serde(rename = "TRA")]
2778 Tra,
2779}
2780#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2783#[serde(transparent)]
2784pub struct PercentageRate(pub String);
2785impl TryFrom<String> for PercentageRate {
2786 type Error = crate::common::validate::ConstraintError;
2787 #[allow(clippy::unreadable_literal)]
2788 fn try_from(value: String) -> Result<Self, Self::Error> {
2789 {
2790 let value: &str = &value;
2791 {
2792 let frac_count = value.find('.').map_or(0, |dot| {
2793 value[dot + 1..]
2794 .chars()
2795 .filter(char::is_ascii_digit)
2796 .count()
2797 });
2798 let violated = frac_count > 10usize;
2799 if violated {
2800 return Err(crate::common::validate::ConstraintError {
2801 kind: crate::common::validate::ConstraintKind::FractionDigits,
2802 message: format!(
2803 "{} (got {})",
2804 "value exceeds maximum fraction digits 10", frac_count
2805 ),
2806 });
2807 }
2808 }
2809 {
2810 let digit_count = value.chars().filter(char::is_ascii_digit).count();
2811 let violated = digit_count > 11usize;
2812 if violated {
2813 return Err(crate::common::validate::ConstraintError {
2814 kind: crate::common::validate::ConstraintKind::TotalDigits,
2815 message: format!(
2816 "{} (got {})",
2817 "value exceeds maximum total digits 11", digit_count
2818 ),
2819 });
2820 }
2821 }
2822 }
2823 Ok(Self(value))
2824 }
2825}
2826impl PercentageRate {
2827 #[allow(clippy::unreadable_literal)]
2829 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2830 Self::try_from(value.into())
2831 }
2832}
2833impl From<PercentageRate> for String {
2834 fn from(v: PercentageRate) -> Self {
2835 v.0
2836 }
2837}
2838#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2840#[serde(transparent)]
2841pub struct PhoneNumber(pub String);
2842impl TryFrom<String> for PhoneNumber {
2843 type Error = crate::common::validate::ConstraintError;
2844 #[allow(clippy::unreadable_literal)]
2845 fn try_from(value: String) -> Result<Self, Self::Error> {
2846 {
2847 let value: &str = &value;
2848 {
2849 let violated = {
2850 let bytes = value.as_bytes();
2851 let len = bytes.len();
2852 let result: bool = (|| -> bool {
2853 let mut pos: usize = 0;
2854 if !(4usize..=35usize).contains(&len) {
2855 return true;
2856 }
2857 if pos >= len || bytes[pos] != 43u8 {
2858 return true;
2859 }
2860 pos += 1;
2861 {
2862 let start = pos;
2863 let limit = if pos + 3usize < len {
2864 pos + 3usize
2865 } else {
2866 len
2867 };
2868 while pos < limit {
2869 let b = bytes[pos];
2870 if !(48u8..=57u8).contains(&b) {
2871 break;
2872 }
2873 pos += 1;
2874 }
2875 let matched = pos - start;
2876 if matched < 1usize {
2877 return true;
2878 }
2879 }
2880 if pos >= len || bytes[pos] != 45u8 {
2881 return true;
2882 }
2883 pos += 1;
2884 {
2885 let start = pos;
2886 let limit = if pos + 30usize < len {
2887 pos + 30usize
2888 } else {
2889 len
2890 };
2891 while pos < limit {
2892 let b = bytes[pos];
2893 if !(48u8..=57u8).contains(&b)
2894 && b != 40u8
2895 && b != 41u8
2896 && b != 43u8
2897 && b != 45u8
2898 {
2899 break;
2900 }
2901 pos += 1;
2902 }
2903 let matched = pos - start;
2904 if matched < 1usize {
2905 return true;
2906 }
2907 }
2908 if pos != len {
2909 return true;
2910 }
2911 false
2912 })();
2913 result
2914 };
2915 if violated {
2916 return Err(crate::common::validate::ConstraintError {
2917 kind: crate::common::validate::ConstraintKind::Pattern,
2918 message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
2919 .to_string(),
2920 });
2921 }
2922 }
2923 }
2924 Ok(Self(value))
2925 }
2926}
2927impl PhoneNumber {
2928 #[allow(clippy::unreadable_literal)]
2930 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2931 Self::try_from(value.into())
2932 }
2933}
2934impl From<PhoneNumber> for String {
2935 fn from(v: PhoneNumber) -> Self {
2936 v.0
2937 }
2938}
2939#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2940pub enum PreferredContactMethod2Code {
2941 #[serde(rename = "MAIL")]
2942 Mail,
2943 #[serde(rename = "FAXX")]
2944 Faxx,
2945 #[serde(rename = "LETT")]
2946 Lett,
2947 #[serde(rename = "CELL")]
2948 Cell,
2949 #[serde(rename = "ONLI")]
2950 Onli,
2951 #[serde(rename = "PHON")]
2952 Phon,
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 SequenceType3Code {
2963 #[serde(rename = "FRST")]
2964 Frst,
2965 #[serde(rename = "RCUR")]
2966 Rcur,
2967 #[serde(rename = "FNAL")]
2968 Fnal,
2969 #[serde(rename = "OOFF")]
2970 Ooff,
2971 #[serde(rename = "RPRE")]
2972 Rpre,
2973}
2974#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2975pub enum SettlementMethod1Code {
2976 #[serde(rename = "INDA")]
2977 Inda,
2978 #[serde(rename = "INGA")]
2979 Inga,
2980 #[serde(rename = "COVE")]
2981 Cove,
2982 #[serde(rename = "CLRG")]
2983 Clrg,
2984}
2985#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2986pub enum TaxRecordPeriod1Code {
2987 #[serde(rename = "MM01")]
2988 Mm01,
2989 #[serde(rename = "MM02")]
2990 Mm02,
2991 #[serde(rename = "MM03")]
2992 Mm03,
2993 #[serde(rename = "MM04")]
2994 Mm04,
2995 #[serde(rename = "MM05")]
2996 Mm05,
2997 #[serde(rename = "MM06")]
2998 Mm06,
2999 #[serde(rename = "MM07")]
3000 Mm07,
3001 #[serde(rename = "MM08")]
3002 Mm08,
3003 #[serde(rename = "MM09")]
3004 Mm09,
3005 #[serde(rename = "MM10")]
3006 Mm10,
3007 #[serde(rename = "MM11")]
3008 Mm11,
3009 #[serde(rename = "MM12")]
3010 Mm12,
3011 #[serde(rename = "QTR1")]
3012 Qtr1,
3013 #[serde(rename = "QTR2")]
3014 Qtr2,
3015 #[serde(rename = "QTR3")]
3016 Qtr3,
3017 #[serde(rename = "QTR4")]
3018 Qtr4,
3019 #[serde(rename = "HLF1")]
3020 Hlf1,
3021 #[serde(rename = "HLF2")]
3022 Hlf2,
3023}
3024#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3025#[serde(transparent)]
3026pub struct TrueFalseIndicator(pub bool);
3027#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3029#[serde(transparent)]
3030pub struct UUIDv4Identifier(pub String);
3031impl TryFrom<String> for UUIDv4Identifier {
3032 type Error = crate::common::validate::ConstraintError;
3033 #[allow(clippy::unreadable_literal)]
3034 fn try_from(value: String) -> Result<Self, Self::Error> {
3035 {
3036 let value: &str = &value;
3037 {
3038 let violated = {
3039 let bytes = value.as_bytes();
3040 bytes.len() != 36usize
3041 || ({
3042 let b = bytes[0usize];
3043 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3044 })
3045 || ({
3046 let b = bytes[1usize];
3047 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3048 })
3049 || ({
3050 let b = bytes[2usize];
3051 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3052 })
3053 || ({
3054 let b = bytes[3usize];
3055 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3056 })
3057 || ({
3058 let b = bytes[4usize];
3059 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3060 })
3061 || ({
3062 let b = bytes[5usize];
3063 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3064 })
3065 || ({
3066 let b = bytes[6usize];
3067 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3068 })
3069 || ({
3070 let b = bytes[7usize];
3071 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3072 })
3073 || bytes[8usize] != 45u8
3074 || ({
3075 let b = bytes[9usize];
3076 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3077 })
3078 || ({
3079 let b = bytes[10usize];
3080 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3081 })
3082 || ({
3083 let b = bytes[11usize];
3084 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3085 })
3086 || ({
3087 let b = bytes[12usize];
3088 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3089 })
3090 || bytes[13usize] != 45u8
3091 || bytes[14usize] != 52u8
3092 || ({
3093 let b = bytes[15usize];
3094 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3095 })
3096 || ({
3097 let b = bytes[16usize];
3098 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3099 })
3100 || ({
3101 let b = bytes[17usize];
3102 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3103 })
3104 || bytes[18usize] != 45u8
3105 || ({
3106 let b = bytes[19usize];
3107 b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
3108 })
3109 || ({
3110 let b = bytes[20usize];
3111 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3112 })
3113 || ({
3114 let b = bytes[21usize];
3115 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3116 })
3117 || ({
3118 let b = bytes[22usize];
3119 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3120 })
3121 || bytes[23usize] != 45u8
3122 || ({
3123 let b = bytes[24usize];
3124 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3125 })
3126 || ({
3127 let b = bytes[25usize];
3128 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3129 })
3130 || ({
3131 let b = bytes[26usize];
3132 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3133 })
3134 || ({
3135 let b = bytes[27usize];
3136 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3137 })
3138 || ({
3139 let b = bytes[28usize];
3140 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3141 })
3142 || ({
3143 let b = bytes[29usize];
3144 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3145 })
3146 || ({
3147 let b = bytes[30usize];
3148 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3149 })
3150 || ({
3151 let b = bytes[31usize];
3152 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3153 })
3154 || ({
3155 let b = bytes[32usize];
3156 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3157 })
3158 || ({
3159 let b = bytes[33usize];
3160 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3161 })
3162 || ({
3163 let b = bytes[34usize];
3164 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3165 })
3166 || ({
3167 let b = bytes[35usize];
3168 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3169 })
3170 };
3171 if violated {
3172 return Err(crate::common::validate::ConstraintError {
3173 kind: crate::common::validate::ConstraintKind::Pattern,
3174 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}"
3175 .to_string(),
3176 });
3177 }
3178 }
3179 }
3180 Ok(Self(value))
3181 }
3182}
3183impl UUIDv4Identifier {
3184 #[allow(clippy::unreadable_literal)]
3186 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
3187 Self::try_from(value.into())
3188 }
3189}
3190impl From<UUIDv4Identifier> for String {
3191 fn from(v: UUIDv4Identifier) -> Self {
3192 v.0
3193 }
3194}
3195#[allow(clippy::large_enum_variant)]
3196#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3197pub enum AccountIdentification4Choice {
3198 #[serde(rename = "IBAN")]
3199 IBAN(IBAN2007Identifier),
3200 #[serde(rename = "Othr")]
3201 Othr(GenericAccountIdentification1),
3202}
3203#[allow(clippy::large_enum_variant)]
3204#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3205pub enum AccountSchemeName1Choice {
3206 #[serde(rename = "Cd")]
3207 Cd(ExternalAccountIdentification1Code),
3208 #[serde(rename = "Prtry")]
3209 Prtry(Max35Text),
3210}
3211#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3212pub struct ActiveOrHistoricCurrencyAndAmount {
3213 #[serde(rename = "$value")]
3214 pub value: ActiveOrHistoricCurrencyAndAmountSimpleType,
3215 #[serde(rename = "@Ccy")]
3216 pub ccy: ActiveOrHistoricCurrencyCode,
3217}
3218#[allow(clippy::large_enum_variant)]
3219#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3220pub enum AddressType3Choice {
3221 #[serde(rename = "Cd")]
3222 Cd(AddressType2Code),
3223 #[serde(rename = "Prtry")]
3224 Prtry(GenericIdentification30),
3225}
3226#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3227pub struct AmendmentInformationDetails15 {
3228 #[serde(rename = "OrgnlMndtId")]
3229 #[serde(skip_serializing_if = "Option::is_none")]
3230 pub orgnl_mndt_id: Option<Max35Text>,
3231 #[serde(rename = "OrgnlCdtrSchmeId")]
3232 #[serde(skip_serializing_if = "Option::is_none")]
3233 pub orgnl_cdtr_schme_id: Option<PartyIdentification272>,
3234 #[serde(rename = "OrgnlCdtrAgt")]
3235 #[serde(skip_serializing_if = "Option::is_none")]
3236 pub orgnl_cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
3237 #[serde(rename = "OrgnlCdtrAgtAcct")]
3238 #[serde(skip_serializing_if = "Option::is_none")]
3239 pub orgnl_cdtr_agt_acct: Option<CashAccount40>,
3240 #[serde(rename = "OrgnlDbtr")]
3241 #[serde(skip_serializing_if = "Option::is_none")]
3242 pub orgnl_dbtr: Option<PartyIdentification272>,
3243 #[serde(rename = "OrgnlDbtrAcct")]
3244 #[serde(skip_serializing_if = "Option::is_none")]
3245 pub orgnl_dbtr_acct: Option<CashAccount40>,
3246 #[serde(rename = "OrgnlDbtrAgt")]
3247 #[serde(skip_serializing_if = "Option::is_none")]
3248 pub orgnl_dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
3249 #[serde(rename = "OrgnlDbtrAgtAcct")]
3250 #[serde(skip_serializing_if = "Option::is_none")]
3251 pub orgnl_dbtr_agt_acct: Option<CashAccount40>,
3252 #[serde(rename = "OrgnlFnlColltnDt")]
3253 #[serde(skip_serializing_if = "Option::is_none")]
3254 pub orgnl_fnl_colltn_dt: Option<ISODate>,
3255 #[serde(rename = "OrgnlFrqcy")]
3256 #[serde(skip_serializing_if = "Option::is_none")]
3257 pub orgnl_frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
3258 #[serde(rename = "OrgnlRsn")]
3259 #[serde(skip_serializing_if = "Option::is_none")]
3260 pub orgnl_rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
3261 #[serde(rename = "OrgnlTrckgDays")]
3262 #[serde(skip_serializing_if = "Option::is_none")]
3263 pub orgnl_trckg_days: Option<Exact2NumericText>,
3264}
3265#[allow(clippy::struct_field_names)]
3267#[derive(Default)]
3268pub struct AmendmentInformationDetails15Builder {
3269 orgnl_mndt_id: ::std::option::Option<Max35Text>,
3270 orgnl_cdtr_schme_id: ::std::option::Option<PartyIdentification272>,
3271 orgnl_cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
3272 orgnl_cdtr_agt_acct: ::std::option::Option<CashAccount40>,
3273 orgnl_dbtr: ::std::option::Option<PartyIdentification272>,
3274 orgnl_dbtr_acct: ::std::option::Option<CashAccount40>,
3275 orgnl_dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
3276 orgnl_dbtr_agt_acct: ::std::option::Option<CashAccount40>,
3277 orgnl_fnl_colltn_dt: ::std::option::Option<ISODate>,
3278 orgnl_frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
3279 orgnl_rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
3280 orgnl_trckg_days: ::std::option::Option<Exact2NumericText>,
3281}
3282impl AmendmentInformationDetails15Builder {
3283 #[must_use]
3285 pub fn orgnl_mndt_id(mut self, value: Max35Text) -> AmendmentInformationDetails15Builder {
3286 self.orgnl_mndt_id = ::std::option::Option::Some(value);
3287 self
3288 }
3289 #[must_use]
3291 pub fn orgnl_cdtr_schme_id(
3292 mut self,
3293 value: PartyIdentification272,
3294 ) -> AmendmentInformationDetails15Builder {
3295 self.orgnl_cdtr_schme_id = ::std::option::Option::Some(value);
3296 self
3297 }
3298 #[must_use]
3300 pub fn orgnl_cdtr_agt(
3301 mut self,
3302 value: BranchAndFinancialInstitutionIdentification8,
3303 ) -> AmendmentInformationDetails15Builder {
3304 self.orgnl_cdtr_agt = ::std::option::Option::Some(value);
3305 self
3306 }
3307 #[must_use]
3309 pub fn orgnl_cdtr_agt_acct(
3310 mut self,
3311 value: CashAccount40,
3312 ) -> AmendmentInformationDetails15Builder {
3313 self.orgnl_cdtr_agt_acct = ::std::option::Option::Some(value);
3314 self
3315 }
3316 #[must_use]
3318 pub fn orgnl_dbtr(
3319 mut self,
3320 value: PartyIdentification272,
3321 ) -> AmendmentInformationDetails15Builder {
3322 self.orgnl_dbtr = ::std::option::Option::Some(value);
3323 self
3324 }
3325 #[must_use]
3327 pub fn orgnl_dbtr_acct(mut self, value: CashAccount40) -> AmendmentInformationDetails15Builder {
3328 self.orgnl_dbtr_acct = ::std::option::Option::Some(value);
3329 self
3330 }
3331 #[must_use]
3333 pub fn orgnl_dbtr_agt(
3334 mut self,
3335 value: BranchAndFinancialInstitutionIdentification8,
3336 ) -> AmendmentInformationDetails15Builder {
3337 self.orgnl_dbtr_agt = ::std::option::Option::Some(value);
3338 self
3339 }
3340 #[must_use]
3342 pub fn orgnl_dbtr_agt_acct(
3343 mut self,
3344 value: CashAccount40,
3345 ) -> AmendmentInformationDetails15Builder {
3346 self.orgnl_dbtr_agt_acct = ::std::option::Option::Some(value);
3347 self
3348 }
3349 #[must_use]
3351 pub fn orgnl_fnl_colltn_dt(mut self, value: ISODate) -> AmendmentInformationDetails15Builder {
3352 self.orgnl_fnl_colltn_dt = ::std::option::Option::Some(value);
3353 self
3354 }
3355 #[must_use]
3357 pub fn orgnl_frqcy(
3358 mut self,
3359 value: crate::common::ChoiceWrapper<Frequency36Choice>,
3360 ) -> AmendmentInformationDetails15Builder {
3361 self.orgnl_frqcy = ::std::option::Option::Some(value);
3362 self
3363 }
3364 #[must_use]
3366 pub fn orgnl_rsn(
3367 mut self,
3368 value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
3369 ) -> AmendmentInformationDetails15Builder {
3370 self.orgnl_rsn = ::std::option::Option::Some(value);
3371 self
3372 }
3373 #[must_use]
3375 pub fn orgnl_trckg_days(
3376 mut self,
3377 value: Exact2NumericText,
3378 ) -> AmendmentInformationDetails15Builder {
3379 self.orgnl_trckg_days = ::std::option::Option::Some(value);
3380 self
3381 }
3382 pub fn build(
3394 self,
3395 ) -> ::std::result::Result<AmendmentInformationDetails15, crate::common::BuilderError> {
3396 ::std::result::Result::Ok(AmendmentInformationDetails15 {
3397 orgnl_mndt_id: self.orgnl_mndt_id,
3398 orgnl_cdtr_schme_id: self.orgnl_cdtr_schme_id,
3399 orgnl_cdtr_agt: self.orgnl_cdtr_agt,
3400 orgnl_cdtr_agt_acct: self.orgnl_cdtr_agt_acct,
3401 orgnl_dbtr: self.orgnl_dbtr,
3402 orgnl_dbtr_acct: self.orgnl_dbtr_acct,
3403 orgnl_dbtr_agt: self.orgnl_dbtr_agt,
3404 orgnl_dbtr_agt_acct: self.orgnl_dbtr_agt_acct,
3405 orgnl_fnl_colltn_dt: self.orgnl_fnl_colltn_dt,
3406 orgnl_frqcy: self.orgnl_frqcy,
3407 orgnl_rsn: self.orgnl_rsn,
3408 orgnl_trckg_days: self.orgnl_trckg_days,
3409 })
3410 }
3411}
3412impl AmendmentInformationDetails15 {
3413 #[must_use]
3415 pub fn builder() -> AmendmentInformationDetails15Builder {
3416 AmendmentInformationDetails15Builder::default()
3417 }
3418}
3419#[allow(clippy::large_enum_variant)]
3420#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3421pub enum AmountType4Choice {
3422 #[serde(rename = "InstdAmt")]
3423 InstdAmt(ActiveOrHistoricCurrencyAndAmount),
3424 #[serde(rename = "EqvtAmt")]
3425 EqvtAmt(EquivalentAmount2),
3426}
3427#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3428pub struct BranchAndFinancialInstitutionIdentification8 {
3429 #[serde(rename = "FinInstnId")]
3430 pub fin_instn_id: FinancialInstitutionIdentification23,
3431 #[serde(rename = "BrnchId")]
3432 #[serde(skip_serializing_if = "Option::is_none")]
3433 pub brnch_id: Option<BranchData5>,
3434}
3435#[allow(clippy::struct_field_names)]
3437#[derive(Default)]
3438pub struct BranchAndFinancialInstitutionIdentification8Builder {
3439 fin_instn_id: ::std::option::Option<FinancialInstitutionIdentification23>,
3440 brnch_id: ::std::option::Option<BranchData5>,
3441}
3442impl BranchAndFinancialInstitutionIdentification8Builder {
3443 #[must_use]
3445 pub fn fin_instn_id(
3446 mut self,
3447 value: FinancialInstitutionIdentification23,
3448 ) -> BranchAndFinancialInstitutionIdentification8Builder {
3449 self.fin_instn_id = ::std::option::Option::Some(value);
3450 self
3451 }
3452 #[must_use]
3454 pub fn brnch_id(
3455 mut self,
3456 value: BranchData5,
3457 ) -> BranchAndFinancialInstitutionIdentification8Builder {
3458 self.brnch_id = ::std::option::Option::Some(value);
3459 self
3460 }
3461 pub fn build(
3473 self,
3474 ) -> ::std::result::Result<
3475 BranchAndFinancialInstitutionIdentification8,
3476 crate::common::BuilderError,
3477 > {
3478 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3479 if self.fin_instn_id.is_none() {
3480 missing.push("fin_instn_id".to_owned());
3481 }
3482 if !missing.is_empty() {
3483 return ::std::result::Result::Err(crate::common::BuilderError {
3484 type_name: "BranchAndFinancialInstitutionIdentification8".to_owned(),
3485 missing_fields: missing,
3486 });
3487 }
3488 ::std::result::Result::Ok(BranchAndFinancialInstitutionIdentification8 {
3489 fin_instn_id: self.fin_instn_id.unwrap(),
3490 brnch_id: self.brnch_id,
3491 })
3492 }
3493}
3494impl BranchAndFinancialInstitutionIdentification8 {
3495 #[must_use]
3497 pub fn builder() -> BranchAndFinancialInstitutionIdentification8Builder {
3498 BranchAndFinancialInstitutionIdentification8Builder::default()
3499 }
3500}
3501#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3502pub struct BranchData5 {
3503 #[serde(rename = "Id")]
3504 #[serde(skip_serializing_if = "Option::is_none")]
3505 pub id: Option<Max35Text>,
3506 #[serde(rename = "LEI")]
3507 #[serde(skip_serializing_if = "Option::is_none")]
3508 pub lei: Option<LEIIdentifier>,
3509 #[serde(rename = "Nm")]
3510 #[serde(skip_serializing_if = "Option::is_none")]
3511 pub nm: Option<Max140Text>,
3512 #[serde(rename = "PstlAdr")]
3513 #[serde(skip_serializing_if = "Option::is_none")]
3514 pub pstl_adr: Option<PostalAddress27>,
3515}
3516#[allow(clippy::struct_field_names)]
3518#[derive(Default)]
3519pub struct BranchData5Builder {
3520 id: ::std::option::Option<Max35Text>,
3521 lei: ::std::option::Option<LEIIdentifier>,
3522 nm: ::std::option::Option<Max140Text>,
3523 pstl_adr: ::std::option::Option<PostalAddress27>,
3524}
3525impl BranchData5Builder {
3526 #[must_use]
3528 pub fn id(mut self, value: Max35Text) -> BranchData5Builder {
3529 self.id = ::std::option::Option::Some(value);
3530 self
3531 }
3532 #[must_use]
3534 pub fn lei(mut self, value: LEIIdentifier) -> BranchData5Builder {
3535 self.lei = ::std::option::Option::Some(value);
3536 self
3537 }
3538 #[must_use]
3540 pub fn nm(mut self, value: Max140Text) -> BranchData5Builder {
3541 self.nm = ::std::option::Option::Some(value);
3542 self
3543 }
3544 #[must_use]
3546 pub fn pstl_adr(mut self, value: PostalAddress27) -> BranchData5Builder {
3547 self.pstl_adr = ::std::option::Option::Some(value);
3548 self
3549 }
3550 pub fn build(self) -> ::std::result::Result<BranchData5, crate::common::BuilderError> {
3562 ::std::result::Result::Ok(BranchData5 {
3563 id: self.id,
3564 lei: self.lei,
3565 nm: self.nm,
3566 pstl_adr: self.pstl_adr,
3567 })
3568 }
3569}
3570impl BranchData5 {
3571 #[must_use]
3573 pub fn builder() -> BranchData5Builder {
3574 BranchData5Builder::default()
3575 }
3576}
3577#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3578pub struct CashAccount40 {
3579 #[serde(rename = "Id")]
3580 #[serde(skip_serializing_if = "Option::is_none")]
3581 pub id: Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3582 #[serde(rename = "Tp")]
3583 #[serde(skip_serializing_if = "Option::is_none")]
3584 pub tp: Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3585 #[serde(rename = "Ccy")]
3586 #[serde(skip_serializing_if = "Option::is_none")]
3587 pub ccy: Option<ActiveOrHistoricCurrencyCode>,
3588 #[serde(rename = "Nm")]
3589 #[serde(skip_serializing_if = "Option::is_none")]
3590 pub nm: Option<Max70Text>,
3591 #[serde(rename = "Prxy")]
3592 #[serde(skip_serializing_if = "Option::is_none")]
3593 pub prxy: Option<ProxyAccountIdentification1>,
3594}
3595#[allow(clippy::struct_field_names)]
3597#[derive(Default)]
3598pub struct CashAccount40Builder {
3599 id: ::std::option::Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3600 tp: ::std::option::Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3601 ccy: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
3602 nm: ::std::option::Option<Max70Text>,
3603 prxy: ::std::option::Option<ProxyAccountIdentification1>,
3604}
3605impl CashAccount40Builder {
3606 #[must_use]
3608 pub fn id(
3609 mut self,
3610 value: crate::common::ChoiceWrapper<AccountIdentification4Choice>,
3611 ) -> CashAccount40Builder {
3612 self.id = ::std::option::Option::Some(value);
3613 self
3614 }
3615 #[must_use]
3617 pub fn tp(
3618 mut self,
3619 value: crate::common::ChoiceWrapper<CashAccountType2Choice>,
3620 ) -> CashAccount40Builder {
3621 self.tp = ::std::option::Option::Some(value);
3622 self
3623 }
3624 #[must_use]
3626 pub fn ccy(mut self, value: ActiveOrHistoricCurrencyCode) -> CashAccount40Builder {
3627 self.ccy = ::std::option::Option::Some(value);
3628 self
3629 }
3630 #[must_use]
3632 pub fn nm(mut self, value: Max70Text) -> CashAccount40Builder {
3633 self.nm = ::std::option::Option::Some(value);
3634 self
3635 }
3636 #[must_use]
3638 pub fn prxy(mut self, value: ProxyAccountIdentification1) -> CashAccount40Builder {
3639 self.prxy = ::std::option::Option::Some(value);
3640 self
3641 }
3642 pub fn build(self) -> ::std::result::Result<CashAccount40, crate::common::BuilderError> {
3654 ::std::result::Result::Ok(CashAccount40 {
3655 id: self.id,
3656 tp: self.tp,
3657 ccy: self.ccy,
3658 nm: self.nm,
3659 prxy: self.prxy,
3660 })
3661 }
3662}
3663impl CashAccount40 {
3664 #[must_use]
3666 pub fn builder() -> CashAccount40Builder {
3667 CashAccount40Builder::default()
3668 }
3669}
3670#[allow(clippy::large_enum_variant)]
3671#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3672pub enum CashAccountType2Choice {
3673 #[serde(rename = "Cd")]
3674 Cd(ExternalCashAccountType1Code),
3675 #[serde(rename = "Prtry")]
3676 Prtry(Max35Text),
3677}
3678#[allow(clippy::large_enum_variant)]
3679#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3680pub enum CategoryPurpose1Choice {
3681 #[serde(rename = "Cd")]
3682 Cd(ExternalCategoryPurpose1Code),
3683 #[serde(rename = "Prtry")]
3684 Prtry(Max35Text),
3685}
3686#[allow(clippy::large_enum_variant)]
3687#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3688pub enum ChargeType3Choice {
3689 #[serde(rename = "Cd")]
3690 Cd(ExternalChargeType1Code),
3691 #[serde(rename = "Prtry")]
3692 Prtry(GenericIdentification3),
3693}
3694#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3695pub struct Charges16 {
3696 #[serde(rename = "Amt")]
3697 pub amt: ActiveOrHistoricCurrencyAndAmount,
3698 #[serde(rename = "Agt")]
3699 pub agt: BranchAndFinancialInstitutionIdentification8,
3700 #[serde(rename = "Tp")]
3701 #[serde(skip_serializing_if = "Option::is_none")]
3702 pub tp: Option<crate::common::ChoiceWrapper<ChargeType3Choice>>,
3703}
3704#[allow(clippy::struct_field_names)]
3706#[derive(Default)]
3707pub struct Charges16Builder {
3708 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
3709 agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
3710 tp: ::std::option::Option<crate::common::ChoiceWrapper<ChargeType3Choice>>,
3711}
3712impl Charges16Builder {
3713 #[must_use]
3715 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Charges16Builder {
3716 self.amt = ::std::option::Option::Some(value);
3717 self
3718 }
3719 #[must_use]
3721 pub fn agt(mut self, value: BranchAndFinancialInstitutionIdentification8) -> Charges16Builder {
3722 self.agt = ::std::option::Option::Some(value);
3723 self
3724 }
3725 #[must_use]
3727 pub fn tp(
3728 mut self,
3729 value: crate::common::ChoiceWrapper<ChargeType3Choice>,
3730 ) -> Charges16Builder {
3731 self.tp = ::std::option::Option::Some(value);
3732 self
3733 }
3734 pub fn build(self) -> ::std::result::Result<Charges16, crate::common::BuilderError> {
3746 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3747 if self.amt.is_none() {
3748 missing.push("amt".to_owned());
3749 }
3750 if self.agt.is_none() {
3751 missing.push("agt".to_owned());
3752 }
3753 if !missing.is_empty() {
3754 return ::std::result::Result::Err(crate::common::BuilderError {
3755 type_name: "Charges16".to_owned(),
3756 missing_fields: missing,
3757 });
3758 }
3759 ::std::result::Result::Ok(Charges16 {
3760 amt: self.amt.unwrap(),
3761 agt: self.agt.unwrap(),
3762 tp: self.tp,
3763 })
3764 }
3765}
3766impl Charges16 {
3767 #[must_use]
3769 pub fn builder() -> Charges16Builder {
3770 Charges16Builder::default()
3771 }
3772}
3773#[allow(clippy::large_enum_variant)]
3774#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3775pub enum ClearingSystemIdentification2Choice {
3776 #[serde(rename = "Cd")]
3777 Cd(ExternalClearingSystemIdentification1Code),
3778 #[serde(rename = "Prtry")]
3779 Prtry(Max35Text),
3780}
3781#[allow(clippy::large_enum_variant)]
3782#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3783pub enum ClearingSystemIdentification3Choice {
3784 #[serde(rename = "Cd")]
3785 Cd(ExternalCashClearingSystem1Code),
3786 #[serde(rename = "Prtry")]
3787 Prtry(Max35Text),
3788}
3789#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3790pub struct ClearingSystemMemberIdentification2 {
3791 #[serde(rename = "ClrSysId")]
3792 #[serde(skip_serializing_if = "Option::is_none")]
3793 pub clr_sys_id: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3794 #[serde(rename = "MmbId")]
3795 pub mmb_id: Max35Text,
3796}
3797#[allow(clippy::struct_field_names)]
3799#[derive(Default)]
3800pub struct ClearingSystemMemberIdentification2Builder {
3801 clr_sys_id:
3802 ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3803 mmb_id: ::std::option::Option<Max35Text>,
3804}
3805impl ClearingSystemMemberIdentification2Builder {
3806 #[must_use]
3808 pub fn clr_sys_id(
3809 mut self,
3810 value: crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>,
3811 ) -> ClearingSystemMemberIdentification2Builder {
3812 self.clr_sys_id = ::std::option::Option::Some(value);
3813 self
3814 }
3815 #[must_use]
3817 pub fn mmb_id(mut self, value: Max35Text) -> ClearingSystemMemberIdentification2Builder {
3818 self.mmb_id = ::std::option::Option::Some(value);
3819 self
3820 }
3821 pub fn build(
3833 self,
3834 ) -> ::std::result::Result<ClearingSystemMemberIdentification2, crate::common::BuilderError>
3835 {
3836 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3837 if self.mmb_id.is_none() {
3838 missing.push("mmb_id".to_owned());
3839 }
3840 if !missing.is_empty() {
3841 return ::std::result::Result::Err(crate::common::BuilderError {
3842 type_name: "ClearingSystemMemberIdentification2".to_owned(),
3843 missing_fields: missing,
3844 });
3845 }
3846 ::std::result::Result::Ok(ClearingSystemMemberIdentification2 {
3847 clr_sys_id: self.clr_sys_id,
3848 mmb_id: self.mmb_id.unwrap(),
3849 })
3850 }
3851}
3852impl ClearingSystemMemberIdentification2 {
3853 #[must_use]
3855 pub fn builder() -> ClearingSystemMemberIdentification2Builder {
3856 ClearingSystemMemberIdentification2Builder::default()
3857 }
3858}
3859#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3860pub struct Contact13 {
3861 #[serde(rename = "NmPrfx")]
3862 #[serde(skip_serializing_if = "Option::is_none")]
3863 pub nm_prfx: Option<NamePrefix2Code>,
3864 #[serde(rename = "Nm")]
3865 #[serde(skip_serializing_if = "Option::is_none")]
3866 pub nm: Option<Max140Text>,
3867 #[serde(rename = "PhneNb")]
3868 #[serde(skip_serializing_if = "Option::is_none")]
3869 pub phne_nb: Option<PhoneNumber>,
3870 #[serde(rename = "MobNb")]
3871 #[serde(skip_serializing_if = "Option::is_none")]
3872 pub mob_nb: Option<PhoneNumber>,
3873 #[serde(rename = "FaxNb")]
3874 #[serde(skip_serializing_if = "Option::is_none")]
3875 pub fax_nb: Option<PhoneNumber>,
3876 #[serde(rename = "URLAdr")]
3877 #[serde(skip_serializing_if = "Option::is_none")]
3878 pub url_adr: Option<Max2048Text>,
3879 #[serde(rename = "EmailAdr")]
3880 #[serde(skip_serializing_if = "Option::is_none")]
3881 pub email_adr: Option<Max256Text>,
3882 #[serde(rename = "EmailPurp")]
3883 #[serde(skip_serializing_if = "Option::is_none")]
3884 pub email_purp: Option<Max35Text>,
3885 #[serde(rename = "JobTitl")]
3886 #[serde(skip_serializing_if = "Option::is_none")]
3887 pub job_titl: Option<Max35Text>,
3888 #[serde(rename = "Rspnsblty")]
3889 #[serde(skip_serializing_if = "Option::is_none")]
3890 pub rspnsblty: Option<Max35Text>,
3891 #[serde(rename = "Dept")]
3892 #[serde(skip_serializing_if = "Option::is_none")]
3893 pub dept: Option<Max70Text>,
3894 #[serde(rename = "Othr")]
3895 #[serde(default)]
3896 #[serde(skip_serializing_if = "Vec::is_empty")]
3897 pub othr: Vec<OtherContact1>,
3898 #[serde(rename = "PrefrdMtd")]
3899 #[serde(skip_serializing_if = "Option::is_none")]
3900 pub prefrd_mtd: Option<PreferredContactMethod2Code>,
3901}
3902#[allow(clippy::struct_field_names)]
3904#[derive(Default)]
3905pub struct Contact13Builder {
3906 nm_prfx: ::std::option::Option<NamePrefix2Code>,
3907 nm: ::std::option::Option<Max140Text>,
3908 phne_nb: ::std::option::Option<PhoneNumber>,
3909 mob_nb: ::std::option::Option<PhoneNumber>,
3910 fax_nb: ::std::option::Option<PhoneNumber>,
3911 url_adr: ::std::option::Option<Max2048Text>,
3912 email_adr: ::std::option::Option<Max256Text>,
3913 email_purp: ::std::option::Option<Max35Text>,
3914 job_titl: ::std::option::Option<Max35Text>,
3915 rspnsblty: ::std::option::Option<Max35Text>,
3916 dept: ::std::option::Option<Max70Text>,
3917 othr: ::std::vec::Vec<OtherContact1>,
3918 prefrd_mtd: ::std::option::Option<PreferredContactMethod2Code>,
3919}
3920impl Contact13Builder {
3921 #[must_use]
3923 pub fn nm_prfx(mut self, value: NamePrefix2Code) -> Contact13Builder {
3924 self.nm_prfx = ::std::option::Option::Some(value);
3925 self
3926 }
3927 #[must_use]
3929 pub fn nm(mut self, value: Max140Text) -> Contact13Builder {
3930 self.nm = ::std::option::Option::Some(value);
3931 self
3932 }
3933 #[must_use]
3935 pub fn phne_nb(mut self, value: PhoneNumber) -> Contact13Builder {
3936 self.phne_nb = ::std::option::Option::Some(value);
3937 self
3938 }
3939 #[must_use]
3941 pub fn mob_nb(mut self, value: PhoneNumber) -> Contact13Builder {
3942 self.mob_nb = ::std::option::Option::Some(value);
3943 self
3944 }
3945 #[must_use]
3947 pub fn fax_nb(mut self, value: PhoneNumber) -> Contact13Builder {
3948 self.fax_nb = ::std::option::Option::Some(value);
3949 self
3950 }
3951 #[must_use]
3953 pub fn url_adr(mut self, value: Max2048Text) -> Contact13Builder {
3954 self.url_adr = ::std::option::Option::Some(value);
3955 self
3956 }
3957 #[must_use]
3959 pub fn email_adr(mut self, value: Max256Text) -> Contact13Builder {
3960 self.email_adr = ::std::option::Option::Some(value);
3961 self
3962 }
3963 #[must_use]
3965 pub fn email_purp(mut self, value: Max35Text) -> Contact13Builder {
3966 self.email_purp = ::std::option::Option::Some(value);
3967 self
3968 }
3969 #[must_use]
3971 pub fn job_titl(mut self, value: Max35Text) -> Contact13Builder {
3972 self.job_titl = ::std::option::Option::Some(value);
3973 self
3974 }
3975 #[must_use]
3977 pub fn rspnsblty(mut self, value: Max35Text) -> Contact13Builder {
3978 self.rspnsblty = ::std::option::Option::Some(value);
3979 self
3980 }
3981 #[must_use]
3983 pub fn dept(mut self, value: Max70Text) -> Contact13Builder {
3984 self.dept = ::std::option::Option::Some(value);
3985 self
3986 }
3987 #[must_use]
3989 pub fn othr(mut self, value: ::std::vec::Vec<OtherContact1>) -> Contact13Builder {
3990 self.othr = value;
3991 self
3992 }
3993 #[must_use]
3995 pub fn add_othr(mut self, value: OtherContact1) -> Contact13Builder {
3996 self.othr.push(value);
3997 self
3998 }
3999 #[must_use]
4001 pub fn prefrd_mtd(mut self, value: PreferredContactMethod2Code) -> Contact13Builder {
4002 self.prefrd_mtd = ::std::option::Option::Some(value);
4003 self
4004 }
4005 pub fn build(self) -> ::std::result::Result<Contact13, crate::common::BuilderError> {
4017 ::std::result::Result::Ok(Contact13 {
4018 nm_prfx: self.nm_prfx,
4019 nm: self.nm,
4020 phne_nb: self.phne_nb,
4021 mob_nb: self.mob_nb,
4022 fax_nb: self.fax_nb,
4023 url_adr: self.url_adr,
4024 email_adr: self.email_adr,
4025 email_purp: self.email_purp,
4026 job_titl: self.job_titl,
4027 rspnsblty: self.rspnsblty,
4028 dept: self.dept,
4029 othr: self.othr,
4030 prefrd_mtd: self.prefrd_mtd,
4031 })
4032 }
4033}
4034impl Contact13 {
4035 #[must_use]
4037 pub fn builder() -> Contact13Builder {
4038 Contact13Builder::default()
4039 }
4040}
4041#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4042pub struct CreditTransferMandateData1 {
4043 #[serde(rename = "MndtId")]
4044 #[serde(skip_serializing_if = "Option::is_none")]
4045 pub mndt_id: Option<Max35Text>,
4046 #[serde(rename = "Tp")]
4047 #[serde(skip_serializing_if = "Option::is_none")]
4048 pub tp: Option<MandateTypeInformation2>,
4049 #[serde(rename = "DtOfSgntr")]
4050 #[serde(skip_serializing_if = "Option::is_none")]
4051 pub dt_of_sgntr: Option<ISODate>,
4052 #[serde(rename = "DtOfVrfctn")]
4053 #[serde(skip_serializing_if = "Option::is_none")]
4054 pub dt_of_vrfctn: Option<ISODateTime>,
4055 #[serde(rename = "ElctrncSgntr")]
4056 #[serde(skip_serializing_if = "Option::is_none")]
4057 pub elctrnc_sgntr: Option<Max10KBinary>,
4058 #[serde(rename = "FrstPmtDt")]
4059 #[serde(skip_serializing_if = "Option::is_none")]
4060 pub frst_pmt_dt: Option<ISODate>,
4061 #[serde(rename = "FnlPmtDt")]
4062 #[serde(skip_serializing_if = "Option::is_none")]
4063 pub fnl_pmt_dt: Option<ISODate>,
4064 #[serde(rename = "Frqcy")]
4065 #[serde(skip_serializing_if = "Option::is_none")]
4066 pub frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
4067 #[serde(rename = "Rsn")]
4068 #[serde(skip_serializing_if = "Option::is_none")]
4069 pub rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
4070}
4071#[allow(clippy::struct_field_names)]
4073#[derive(Default)]
4074pub struct CreditTransferMandateData1Builder {
4075 mndt_id: ::std::option::Option<Max35Text>,
4076 tp: ::std::option::Option<MandateTypeInformation2>,
4077 dt_of_sgntr: ::std::option::Option<ISODate>,
4078 dt_of_vrfctn: ::std::option::Option<ISODateTime>,
4079 elctrnc_sgntr: ::std::option::Option<Max10KBinary>,
4080 frst_pmt_dt: ::std::option::Option<ISODate>,
4081 fnl_pmt_dt: ::std::option::Option<ISODate>,
4082 frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
4083 rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
4084}
4085impl CreditTransferMandateData1Builder {
4086 #[must_use]
4088 pub fn mndt_id(mut self, value: Max35Text) -> CreditTransferMandateData1Builder {
4089 self.mndt_id = ::std::option::Option::Some(value);
4090 self
4091 }
4092 #[must_use]
4094 pub fn tp(mut self, value: MandateTypeInformation2) -> CreditTransferMandateData1Builder {
4095 self.tp = ::std::option::Option::Some(value);
4096 self
4097 }
4098 #[must_use]
4100 pub fn dt_of_sgntr(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4101 self.dt_of_sgntr = ::std::option::Option::Some(value);
4102 self
4103 }
4104 #[must_use]
4106 pub fn dt_of_vrfctn(mut self, value: ISODateTime) -> CreditTransferMandateData1Builder {
4107 self.dt_of_vrfctn = ::std::option::Option::Some(value);
4108 self
4109 }
4110 #[must_use]
4112 pub fn elctrnc_sgntr(mut self, value: Max10KBinary) -> CreditTransferMandateData1Builder {
4113 self.elctrnc_sgntr = ::std::option::Option::Some(value);
4114 self
4115 }
4116 #[must_use]
4118 pub fn frst_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4119 self.frst_pmt_dt = ::std::option::Option::Some(value);
4120 self
4121 }
4122 #[must_use]
4124 pub fn fnl_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4125 self.fnl_pmt_dt = ::std::option::Option::Some(value);
4126 self
4127 }
4128 #[must_use]
4130 pub fn frqcy(
4131 mut self,
4132 value: crate::common::ChoiceWrapper<Frequency36Choice>,
4133 ) -> CreditTransferMandateData1Builder {
4134 self.frqcy = ::std::option::Option::Some(value);
4135 self
4136 }
4137 #[must_use]
4139 pub fn rsn(
4140 mut self,
4141 value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
4142 ) -> CreditTransferMandateData1Builder {
4143 self.rsn = ::std::option::Option::Some(value);
4144 self
4145 }
4146 pub fn build(
4158 self,
4159 ) -> ::std::result::Result<CreditTransferMandateData1, crate::common::BuilderError> {
4160 ::std::result::Result::Ok(CreditTransferMandateData1 {
4161 mndt_id: self.mndt_id,
4162 tp: self.tp,
4163 dt_of_sgntr: self.dt_of_sgntr,
4164 dt_of_vrfctn: self.dt_of_vrfctn,
4165 elctrnc_sgntr: self.elctrnc_sgntr,
4166 frst_pmt_dt: self.frst_pmt_dt,
4167 fnl_pmt_dt: self.fnl_pmt_dt,
4168 frqcy: self.frqcy,
4169 rsn: self.rsn,
4170 })
4171 }
4172}
4173impl CreditTransferMandateData1 {
4174 #[must_use]
4176 pub fn builder() -> CreditTransferMandateData1Builder {
4177 CreditTransferMandateData1Builder::default()
4178 }
4179}
4180#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4181pub struct CreditorReferenceInformation3 {
4182 #[serde(rename = "Tp")]
4183 #[serde(skip_serializing_if = "Option::is_none")]
4184 pub tp: Option<CreditorReferenceType3>,
4185 #[serde(rename = "Ref")]
4186 #[serde(skip_serializing_if = "Option::is_none")]
4187 pub r#ref: Option<Max35Text>,
4188}
4189#[allow(clippy::struct_field_names)]
4191#[derive(Default)]
4192pub struct CreditorReferenceInformation3Builder {
4193 tp: ::std::option::Option<CreditorReferenceType3>,
4194 r#ref: ::std::option::Option<Max35Text>,
4195}
4196impl CreditorReferenceInformation3Builder {
4197 #[must_use]
4199 pub fn tp(mut self, value: CreditorReferenceType3) -> CreditorReferenceInformation3Builder {
4200 self.tp = ::std::option::Option::Some(value);
4201 self
4202 }
4203 #[must_use]
4205 pub fn r#ref(mut self, value: Max35Text) -> CreditorReferenceInformation3Builder {
4206 self.r#ref = ::std::option::Option::Some(value);
4207 self
4208 }
4209 pub fn build(
4221 self,
4222 ) -> ::std::result::Result<CreditorReferenceInformation3, crate::common::BuilderError> {
4223 ::std::result::Result::Ok(CreditorReferenceInformation3 {
4224 tp: self.tp,
4225 r#ref: self.r#ref,
4226 })
4227 }
4228}
4229impl CreditorReferenceInformation3 {
4230 #[must_use]
4232 pub fn builder() -> CreditorReferenceInformation3Builder {
4233 CreditorReferenceInformation3Builder::default()
4234 }
4235}
4236#[allow(clippy::large_enum_variant)]
4237#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4238pub enum CreditorReferenceType2Choice {
4239 #[serde(rename = "Cd")]
4240 Cd(ExternalCreditorReferenceType1Code),
4241 #[serde(rename = "Prtry")]
4242 Prtry(Max35Text),
4243}
4244#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4245pub struct CreditorReferenceType3 {
4246 #[serde(rename = "CdOrPrtry")]
4247 pub cd_or_prtry: crate::common::ChoiceWrapper<CreditorReferenceType2Choice>,
4248 #[serde(rename = "Issr")]
4249 #[serde(skip_serializing_if = "Option::is_none")]
4250 pub issr: Option<Max35Text>,
4251}
4252#[allow(clippy::struct_field_names)]
4254#[derive(Default)]
4255pub struct CreditorReferenceType3Builder {
4256 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<CreditorReferenceType2Choice>>,
4257 issr: ::std::option::Option<Max35Text>,
4258}
4259impl CreditorReferenceType3Builder {
4260 #[must_use]
4262 pub fn cd_or_prtry(
4263 mut self,
4264 value: crate::common::ChoiceWrapper<CreditorReferenceType2Choice>,
4265 ) -> CreditorReferenceType3Builder {
4266 self.cd_or_prtry = ::std::option::Option::Some(value);
4267 self
4268 }
4269 #[must_use]
4271 pub fn issr(mut self, value: Max35Text) -> CreditorReferenceType3Builder {
4272 self.issr = ::std::option::Option::Some(value);
4273 self
4274 }
4275 pub fn build(
4287 self,
4288 ) -> ::std::result::Result<CreditorReferenceType3, crate::common::BuilderError> {
4289 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4290 if self.cd_or_prtry.is_none() {
4291 missing.push("cd_or_prtry".to_owned());
4292 }
4293 if !missing.is_empty() {
4294 return ::std::result::Result::Err(crate::common::BuilderError {
4295 type_name: "CreditorReferenceType3".to_owned(),
4296 missing_fields: missing,
4297 });
4298 }
4299 ::std::result::Result::Ok(CreditorReferenceType3 {
4300 cd_or_prtry: self.cd_or_prtry.unwrap(),
4301 issr: self.issr,
4302 })
4303 }
4304}
4305impl CreditorReferenceType3 {
4306 #[must_use]
4308 pub fn builder() -> CreditorReferenceType3Builder {
4309 CreditorReferenceType3Builder::default()
4310 }
4311}
4312#[allow(clippy::large_enum_variant)]
4313#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4314pub enum DateAndDateTime2Choice {
4315 #[serde(rename = "Dt")]
4316 Dt(ISODate),
4317 #[serde(rename = "DtTm")]
4318 DtTm(ISODateTime),
4319}
4320#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4321pub struct DateAndPlaceOfBirth1 {
4322 #[serde(rename = "BirthDt")]
4323 pub birth_dt: ISODate,
4324 #[serde(rename = "PrvcOfBirth")]
4325 #[serde(skip_serializing_if = "Option::is_none")]
4326 pub prvc_of_birth: Option<Max35Text>,
4327 #[serde(rename = "CityOfBirth")]
4328 pub city_of_birth: Max35Text,
4329 #[serde(rename = "CtryOfBirth")]
4330 pub ctry_of_birth: CountryCode,
4331}
4332#[allow(clippy::struct_field_names)]
4334#[derive(Default)]
4335pub struct DateAndPlaceOfBirth1Builder {
4336 birth_dt: ::std::option::Option<ISODate>,
4337 prvc_of_birth: ::std::option::Option<Max35Text>,
4338 city_of_birth: ::std::option::Option<Max35Text>,
4339 ctry_of_birth: ::std::option::Option<CountryCode>,
4340}
4341impl DateAndPlaceOfBirth1Builder {
4342 #[must_use]
4344 pub fn birth_dt(mut self, value: ISODate) -> DateAndPlaceOfBirth1Builder {
4345 self.birth_dt = ::std::option::Option::Some(value);
4346 self
4347 }
4348 #[must_use]
4350 pub fn prvc_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
4351 self.prvc_of_birth = ::std::option::Option::Some(value);
4352 self
4353 }
4354 #[must_use]
4356 pub fn city_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
4357 self.city_of_birth = ::std::option::Option::Some(value);
4358 self
4359 }
4360 #[must_use]
4362 pub fn ctry_of_birth(mut self, value: CountryCode) -> DateAndPlaceOfBirth1Builder {
4363 self.ctry_of_birth = ::std::option::Option::Some(value);
4364 self
4365 }
4366 pub fn build(self) -> ::std::result::Result<DateAndPlaceOfBirth1, crate::common::BuilderError> {
4378 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4379 if self.birth_dt.is_none() {
4380 missing.push("birth_dt".to_owned());
4381 }
4382 if self.city_of_birth.is_none() {
4383 missing.push("city_of_birth".to_owned());
4384 }
4385 if self.ctry_of_birth.is_none() {
4386 missing.push("ctry_of_birth".to_owned());
4387 }
4388 if !missing.is_empty() {
4389 return ::std::result::Result::Err(crate::common::BuilderError {
4390 type_name: "DateAndPlaceOfBirth1".to_owned(),
4391 missing_fields: missing,
4392 });
4393 }
4394 ::std::result::Result::Ok(DateAndPlaceOfBirth1 {
4395 birth_dt: self.birth_dt.unwrap(),
4396 prvc_of_birth: self.prvc_of_birth,
4397 city_of_birth: self.city_of_birth.unwrap(),
4398 ctry_of_birth: self.ctry_of_birth.unwrap(),
4399 })
4400 }
4401}
4402impl DateAndPlaceOfBirth1 {
4403 #[must_use]
4405 pub fn builder() -> DateAndPlaceOfBirth1Builder {
4406 DateAndPlaceOfBirth1Builder::default()
4407 }
4408}
4409#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4410pub struct DateAndType1 {
4411 #[serde(rename = "Tp")]
4412 pub tp: crate::common::ChoiceWrapper<DateType2Choice>,
4413 #[serde(rename = "Dt")]
4414 pub dt: ISODate,
4415}
4416#[allow(clippy::struct_field_names)]
4418#[derive(Default)]
4419pub struct DateAndType1Builder {
4420 tp: ::std::option::Option<crate::common::ChoiceWrapper<DateType2Choice>>,
4421 dt: ::std::option::Option<ISODate>,
4422}
4423impl DateAndType1Builder {
4424 #[must_use]
4426 pub fn tp(
4427 mut self,
4428 value: crate::common::ChoiceWrapper<DateType2Choice>,
4429 ) -> DateAndType1Builder {
4430 self.tp = ::std::option::Option::Some(value);
4431 self
4432 }
4433 #[must_use]
4435 pub fn dt(mut self, value: ISODate) -> DateAndType1Builder {
4436 self.dt = ::std::option::Option::Some(value);
4437 self
4438 }
4439 pub fn build(self) -> ::std::result::Result<DateAndType1, crate::common::BuilderError> {
4451 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4452 if self.tp.is_none() {
4453 missing.push("tp".to_owned());
4454 }
4455 if self.dt.is_none() {
4456 missing.push("dt".to_owned());
4457 }
4458 if !missing.is_empty() {
4459 return ::std::result::Result::Err(crate::common::BuilderError {
4460 type_name: "DateAndType1".to_owned(),
4461 missing_fields: missing,
4462 });
4463 }
4464 ::std::result::Result::Ok(DateAndType1 {
4465 tp: self.tp.unwrap(),
4466 dt: self.dt.unwrap(),
4467 })
4468 }
4469}
4470impl DateAndType1 {
4471 #[must_use]
4473 pub fn builder() -> DateAndType1Builder {
4474 DateAndType1Builder::default()
4475 }
4476}
4477#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4478pub struct DatePeriod2 {
4479 #[serde(rename = "FrDt")]
4480 pub fr_dt: ISODate,
4481 #[serde(rename = "ToDt")]
4482 pub to_dt: ISODate,
4483}
4484#[allow(clippy::struct_field_names)]
4486#[derive(Default)]
4487pub struct DatePeriod2Builder {
4488 fr_dt: ::std::option::Option<ISODate>,
4489 to_dt: ::std::option::Option<ISODate>,
4490}
4491impl DatePeriod2Builder {
4492 #[must_use]
4494 pub fn fr_dt(mut self, value: ISODate) -> DatePeriod2Builder {
4495 self.fr_dt = ::std::option::Option::Some(value);
4496 self
4497 }
4498 #[must_use]
4500 pub fn to_dt(mut self, value: ISODate) -> DatePeriod2Builder {
4501 self.to_dt = ::std::option::Option::Some(value);
4502 self
4503 }
4504 pub fn build(self) -> ::std::result::Result<DatePeriod2, crate::common::BuilderError> {
4516 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4517 if self.fr_dt.is_none() {
4518 missing.push("fr_dt".to_owned());
4519 }
4520 if self.to_dt.is_none() {
4521 missing.push("to_dt".to_owned());
4522 }
4523 if !missing.is_empty() {
4524 return ::std::result::Result::Err(crate::common::BuilderError {
4525 type_name: "DatePeriod2".to_owned(),
4526 missing_fields: missing,
4527 });
4528 }
4529 ::std::result::Result::Ok(DatePeriod2 {
4530 fr_dt: self.fr_dt.unwrap(),
4531 to_dt: self.to_dt.unwrap(),
4532 })
4533 }
4534}
4535impl DatePeriod2 {
4536 #[must_use]
4538 pub fn builder() -> DatePeriod2Builder {
4539 DatePeriod2Builder::default()
4540 }
4541}
4542#[allow(clippy::large_enum_variant)]
4543#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4544pub enum DateType2Choice {
4545 #[serde(rename = "Cd")]
4546 Cd(ExternalDateType1Code),
4547 #[serde(rename = "Prtry")]
4548 Prtry(Max35Text),
4549}
4550#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4551pub struct Document {
4552 #[serde(rename = "FIToFIPmtStsRpt")]
4553 pub fi_to_fi_pmt_sts_rpt: FIToFIPaymentStatusReportV14,
4554}
4555#[allow(clippy::struct_field_names)]
4557#[derive(Default)]
4558pub struct DocumentBuilder {
4559 fi_to_fi_pmt_sts_rpt: ::std::option::Option<FIToFIPaymentStatusReportV14>,
4560}
4561impl DocumentBuilder {
4562 #[must_use]
4564 pub fn fi_to_fi_pmt_sts_rpt(mut self, value: FIToFIPaymentStatusReportV14) -> DocumentBuilder {
4565 self.fi_to_fi_pmt_sts_rpt = ::std::option::Option::Some(value);
4566 self
4567 }
4568 pub fn build(self) -> ::std::result::Result<Document, crate::common::BuilderError> {
4580 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4581 if self.fi_to_fi_pmt_sts_rpt.is_none() {
4582 missing.push("fi_to_fi_pmt_sts_rpt".to_owned());
4583 }
4584 if !missing.is_empty() {
4585 return ::std::result::Result::Err(crate::common::BuilderError {
4586 type_name: "Document".to_owned(),
4587 missing_fields: missing,
4588 });
4589 }
4590 ::std::result::Result::Ok(Document {
4591 fi_to_fi_pmt_sts_rpt: self.fi_to_fi_pmt_sts_rpt.unwrap(),
4592 })
4593 }
4594}
4595impl Document {
4596 #[must_use]
4598 pub fn builder() -> DocumentBuilder {
4599 DocumentBuilder::default()
4600 }
4601}
4602#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4603pub struct DocumentAdjustment1 {
4604 #[serde(rename = "Amt")]
4605 pub amt: ActiveOrHistoricCurrencyAndAmount,
4606 #[serde(rename = "CdtDbtInd")]
4607 #[serde(skip_serializing_if = "Option::is_none")]
4608 pub cdt_dbt_ind: Option<CreditDebitCode>,
4609 #[serde(rename = "Rsn")]
4610 #[serde(skip_serializing_if = "Option::is_none")]
4611 pub rsn: Option<Max4Text>,
4612 #[serde(rename = "AddtlInf")]
4613 #[serde(skip_serializing_if = "Option::is_none")]
4614 pub addtl_inf: Option<Max140Text>,
4615}
4616#[allow(clippy::struct_field_names)]
4618#[derive(Default)]
4619pub struct DocumentAdjustment1Builder {
4620 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4621 cdt_dbt_ind: ::std::option::Option<CreditDebitCode>,
4622 rsn: ::std::option::Option<Max4Text>,
4623 addtl_inf: ::std::option::Option<Max140Text>,
4624}
4625impl DocumentAdjustment1Builder {
4626 #[must_use]
4628 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> DocumentAdjustment1Builder {
4629 self.amt = ::std::option::Option::Some(value);
4630 self
4631 }
4632 #[must_use]
4634 pub fn cdt_dbt_ind(mut self, value: CreditDebitCode) -> DocumentAdjustment1Builder {
4635 self.cdt_dbt_ind = ::std::option::Option::Some(value);
4636 self
4637 }
4638 #[must_use]
4640 pub fn rsn(mut self, value: Max4Text) -> DocumentAdjustment1Builder {
4641 self.rsn = ::std::option::Option::Some(value);
4642 self
4643 }
4644 #[must_use]
4646 pub fn addtl_inf(mut self, value: Max140Text) -> DocumentAdjustment1Builder {
4647 self.addtl_inf = ::std::option::Option::Some(value);
4648 self
4649 }
4650 pub fn build(self) -> ::std::result::Result<DocumentAdjustment1, crate::common::BuilderError> {
4662 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4663 if self.amt.is_none() {
4664 missing.push("amt".to_owned());
4665 }
4666 if !missing.is_empty() {
4667 return ::std::result::Result::Err(crate::common::BuilderError {
4668 type_name: "DocumentAdjustment1".to_owned(),
4669 missing_fields: missing,
4670 });
4671 }
4672 ::std::result::Result::Ok(DocumentAdjustment1 {
4673 amt: self.amt.unwrap(),
4674 cdt_dbt_ind: self.cdt_dbt_ind,
4675 rsn: self.rsn,
4676 addtl_inf: self.addtl_inf,
4677 })
4678 }
4679}
4680impl DocumentAdjustment1 {
4681 #[must_use]
4683 pub fn builder() -> DocumentAdjustment1Builder {
4684 DocumentAdjustment1Builder::default()
4685 }
4686}
4687#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4688pub struct DocumentAmount1 {
4689 #[serde(rename = "Tp")]
4690 pub tp: crate::common::ChoiceWrapper<DocumentAmountType1Choice>,
4691 #[serde(rename = "Amt")]
4692 pub amt: ActiveOrHistoricCurrencyAndAmount,
4693}
4694#[allow(clippy::struct_field_names)]
4696#[derive(Default)]
4697pub struct DocumentAmount1Builder {
4698 tp: ::std::option::Option<crate::common::ChoiceWrapper<DocumentAmountType1Choice>>,
4699 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4700}
4701impl DocumentAmount1Builder {
4702 #[must_use]
4704 pub fn tp(
4705 mut self,
4706 value: crate::common::ChoiceWrapper<DocumentAmountType1Choice>,
4707 ) -> DocumentAmount1Builder {
4708 self.tp = ::std::option::Option::Some(value);
4709 self
4710 }
4711 #[must_use]
4713 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> DocumentAmount1Builder {
4714 self.amt = ::std::option::Option::Some(value);
4715 self
4716 }
4717 pub fn build(self) -> ::std::result::Result<DocumentAmount1, crate::common::BuilderError> {
4729 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4730 if self.tp.is_none() {
4731 missing.push("tp".to_owned());
4732 }
4733 if self.amt.is_none() {
4734 missing.push("amt".to_owned());
4735 }
4736 if !missing.is_empty() {
4737 return ::std::result::Result::Err(crate::common::BuilderError {
4738 type_name: "DocumentAmount1".to_owned(),
4739 missing_fields: missing,
4740 });
4741 }
4742 ::std::result::Result::Ok(DocumentAmount1 {
4743 tp: self.tp.unwrap(),
4744 amt: self.amt.unwrap(),
4745 })
4746 }
4747}
4748impl DocumentAmount1 {
4749 #[must_use]
4751 pub fn builder() -> DocumentAmount1Builder {
4752 DocumentAmount1Builder::default()
4753 }
4754}
4755#[allow(clippy::large_enum_variant)]
4756#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4757pub enum DocumentAmountType1Choice {
4758 #[serde(rename = "Cd")]
4759 Cd(ExternalDocumentAmountType1Code),
4760 #[serde(rename = "Prtry")]
4761 Prtry(Max35Text),
4762}
4763#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4764pub struct DocumentLineIdentification1 {
4765 #[serde(rename = "Tp")]
4766 #[serde(skip_serializing_if = "Option::is_none")]
4767 pub tp: Option<DocumentLineType1>,
4768 #[serde(rename = "Nb")]
4769 #[serde(skip_serializing_if = "Option::is_none")]
4770 pub nb: Option<Max35Text>,
4771 #[serde(rename = "RltdDt")]
4772 #[serde(skip_serializing_if = "Option::is_none")]
4773 pub rltd_dt: Option<ISODate>,
4774}
4775#[allow(clippy::struct_field_names)]
4777#[derive(Default)]
4778pub struct DocumentLineIdentification1Builder {
4779 tp: ::std::option::Option<DocumentLineType1>,
4780 nb: ::std::option::Option<Max35Text>,
4781 rltd_dt: ::std::option::Option<ISODate>,
4782}
4783impl DocumentLineIdentification1Builder {
4784 #[must_use]
4786 pub fn tp(mut self, value: DocumentLineType1) -> DocumentLineIdentification1Builder {
4787 self.tp = ::std::option::Option::Some(value);
4788 self
4789 }
4790 #[must_use]
4792 pub fn nb(mut self, value: Max35Text) -> DocumentLineIdentification1Builder {
4793 self.nb = ::std::option::Option::Some(value);
4794 self
4795 }
4796 #[must_use]
4798 pub fn rltd_dt(mut self, value: ISODate) -> DocumentLineIdentification1Builder {
4799 self.rltd_dt = ::std::option::Option::Some(value);
4800 self
4801 }
4802 pub fn build(
4814 self,
4815 ) -> ::std::result::Result<DocumentLineIdentification1, crate::common::BuilderError> {
4816 ::std::result::Result::Ok(DocumentLineIdentification1 {
4817 tp: self.tp,
4818 nb: self.nb,
4819 rltd_dt: self.rltd_dt,
4820 })
4821 }
4822}
4823impl DocumentLineIdentification1 {
4824 #[must_use]
4826 pub fn builder() -> DocumentLineIdentification1Builder {
4827 DocumentLineIdentification1Builder::default()
4828 }
4829}
4830#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4831pub struct DocumentLineInformation2 {
4832 #[serde(rename = "Id")]
4833 #[serde(default)]
4834 #[serde(skip_serializing_if = "Vec::is_empty")]
4835 pub id: Vec<DocumentLineIdentification1>,
4836 #[serde(rename = "Desc")]
4837 #[serde(skip_serializing_if = "Option::is_none")]
4838 pub desc: Option<Max2048Text>,
4839 #[serde(rename = "Amt")]
4840 #[serde(skip_serializing_if = "Option::is_none")]
4841 pub amt: Option<RemittanceAmount4>,
4842}
4843#[allow(clippy::struct_field_names)]
4845#[derive(Default)]
4846pub struct DocumentLineInformation2Builder {
4847 id: ::std::vec::Vec<DocumentLineIdentification1>,
4848 desc: ::std::option::Option<Max2048Text>,
4849 amt: ::std::option::Option<RemittanceAmount4>,
4850}
4851impl DocumentLineInformation2Builder {
4852 #[must_use]
4854 pub fn id(
4855 mut self,
4856 value: ::std::vec::Vec<DocumentLineIdentification1>,
4857 ) -> DocumentLineInformation2Builder {
4858 self.id = value;
4859 self
4860 }
4861 #[must_use]
4863 pub fn add_id(mut self, value: DocumentLineIdentification1) -> DocumentLineInformation2Builder {
4864 self.id.push(value);
4865 self
4866 }
4867 #[must_use]
4869 pub fn desc(mut self, value: Max2048Text) -> DocumentLineInformation2Builder {
4870 self.desc = ::std::option::Option::Some(value);
4871 self
4872 }
4873 #[must_use]
4875 pub fn amt(mut self, value: RemittanceAmount4) -> DocumentLineInformation2Builder {
4876 self.amt = ::std::option::Option::Some(value);
4877 self
4878 }
4879 pub fn build(
4891 self,
4892 ) -> ::std::result::Result<DocumentLineInformation2, crate::common::BuilderError> {
4893 ::std::result::Result::Ok(DocumentLineInformation2 {
4894 id: self.id,
4895 desc: self.desc,
4896 amt: self.amt,
4897 })
4898 }
4899}
4900impl DocumentLineInformation2 {
4901 #[must_use]
4903 pub fn builder() -> DocumentLineInformation2Builder {
4904 DocumentLineInformation2Builder::default()
4905 }
4906}
4907#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4908pub struct DocumentLineType1 {
4909 #[serde(rename = "CdOrPrtry")]
4910 pub cd_or_prtry: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
4911 #[serde(rename = "Issr")]
4912 #[serde(skip_serializing_if = "Option::is_none")]
4913 pub issr: Option<Max35Text>,
4914}
4915#[allow(clippy::struct_field_names)]
4917#[derive(Default)]
4918pub struct DocumentLineType1Builder {
4919 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<DocumentLineType1Choice>>,
4920 issr: ::std::option::Option<Max35Text>,
4921}
4922impl DocumentLineType1Builder {
4923 #[must_use]
4925 pub fn cd_or_prtry(
4926 mut self,
4927 value: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
4928 ) -> DocumentLineType1Builder {
4929 self.cd_or_prtry = ::std::option::Option::Some(value);
4930 self
4931 }
4932 #[must_use]
4934 pub fn issr(mut self, value: Max35Text) -> DocumentLineType1Builder {
4935 self.issr = ::std::option::Option::Some(value);
4936 self
4937 }
4938 pub fn build(self) -> ::std::result::Result<DocumentLineType1, crate::common::BuilderError> {
4950 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4951 if self.cd_or_prtry.is_none() {
4952 missing.push("cd_or_prtry".to_owned());
4953 }
4954 if !missing.is_empty() {
4955 return ::std::result::Result::Err(crate::common::BuilderError {
4956 type_name: "DocumentLineType1".to_owned(),
4957 missing_fields: missing,
4958 });
4959 }
4960 ::std::result::Result::Ok(DocumentLineType1 {
4961 cd_or_prtry: self.cd_or_prtry.unwrap(),
4962 issr: self.issr,
4963 })
4964 }
4965}
4966impl DocumentLineType1 {
4967 #[must_use]
4969 pub fn builder() -> DocumentLineType1Builder {
4970 DocumentLineType1Builder::default()
4971 }
4972}
4973#[allow(clippy::large_enum_variant)]
4974#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4975pub enum DocumentLineType1Choice {
4976 #[serde(rename = "Cd")]
4977 Cd(ExternalDocumentLineType1Code),
4978 #[serde(rename = "Prtry")]
4979 Prtry(Max35Text),
4980}
4981#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4982pub struct DocumentType1 {
4983 #[serde(rename = "CdOrPrtry")]
4984 pub cd_or_prtry: crate::common::ChoiceWrapper<DocumentType2Choice>,
4985 #[serde(rename = "Issr")]
4986 #[serde(skip_serializing_if = "Option::is_none")]
4987 pub issr: Option<Max35Text>,
4988}
4989#[allow(clippy::struct_field_names)]
4991#[derive(Default)]
4992pub struct DocumentType1Builder {
4993 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<DocumentType2Choice>>,
4994 issr: ::std::option::Option<Max35Text>,
4995}
4996impl DocumentType1Builder {
4997 #[must_use]
4999 pub fn cd_or_prtry(
5000 mut self,
5001 value: crate::common::ChoiceWrapper<DocumentType2Choice>,
5002 ) -> DocumentType1Builder {
5003 self.cd_or_prtry = ::std::option::Option::Some(value);
5004 self
5005 }
5006 #[must_use]
5008 pub fn issr(mut self, value: Max35Text) -> DocumentType1Builder {
5009 self.issr = ::std::option::Option::Some(value);
5010 self
5011 }
5012 pub fn build(self) -> ::std::result::Result<DocumentType1, crate::common::BuilderError> {
5024 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5025 if self.cd_or_prtry.is_none() {
5026 missing.push("cd_or_prtry".to_owned());
5027 }
5028 if !missing.is_empty() {
5029 return ::std::result::Result::Err(crate::common::BuilderError {
5030 type_name: "DocumentType1".to_owned(),
5031 missing_fields: missing,
5032 });
5033 }
5034 ::std::result::Result::Ok(DocumentType1 {
5035 cd_or_prtry: self.cd_or_prtry.unwrap(),
5036 issr: self.issr,
5037 })
5038 }
5039}
5040impl DocumentType1 {
5041 #[must_use]
5043 pub fn builder() -> DocumentType1Builder {
5044 DocumentType1Builder::default()
5045 }
5046}
5047#[allow(clippy::large_enum_variant)]
5048#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5049pub enum DocumentType2Choice {
5050 #[serde(rename = "Cd")]
5051 Cd(ExternalDocumentType1Code),
5052 #[serde(rename = "Prtry")]
5053 Prtry(Max35Text),
5054}
5055#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5056pub struct EquivalentAmount2 {
5057 #[serde(rename = "Amt")]
5058 pub amt: ActiveOrHistoricCurrencyAndAmount,
5059 #[serde(rename = "CcyOfTrf")]
5060 pub ccy_of_trf: ActiveOrHistoricCurrencyCode,
5061}
5062#[allow(clippy::struct_field_names)]
5064#[derive(Default)]
5065pub struct EquivalentAmount2Builder {
5066 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5067 ccy_of_trf: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
5068}
5069impl EquivalentAmount2Builder {
5070 #[must_use]
5072 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> EquivalentAmount2Builder {
5073 self.amt = ::std::option::Option::Some(value);
5074 self
5075 }
5076 #[must_use]
5078 pub fn ccy_of_trf(mut self, value: ActiveOrHistoricCurrencyCode) -> EquivalentAmount2Builder {
5079 self.ccy_of_trf = ::std::option::Option::Some(value);
5080 self
5081 }
5082 pub fn build(self) -> ::std::result::Result<EquivalentAmount2, crate::common::BuilderError> {
5094 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5095 if self.amt.is_none() {
5096 missing.push("amt".to_owned());
5097 }
5098 if self.ccy_of_trf.is_none() {
5099 missing.push("ccy_of_trf".to_owned());
5100 }
5101 if !missing.is_empty() {
5102 return ::std::result::Result::Err(crate::common::BuilderError {
5103 type_name: "EquivalentAmount2".to_owned(),
5104 missing_fields: missing,
5105 });
5106 }
5107 ::std::result::Result::Ok(EquivalentAmount2 {
5108 amt: self.amt.unwrap(),
5109 ccy_of_trf: self.ccy_of_trf.unwrap(),
5110 })
5111 }
5112}
5113impl EquivalentAmount2 {
5114 #[must_use]
5116 pub fn builder() -> EquivalentAmount2Builder {
5117 EquivalentAmount2Builder::default()
5118 }
5119}
5120#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5121pub struct FIToFIPaymentStatusReportV14 {
5122 #[serde(rename = "GrpHdr")]
5123 pub grp_hdr: GroupHeader120,
5124 #[serde(rename = "OrgnlGrpInfAndSts")]
5125 #[serde(default)]
5126 #[serde(skip_serializing_if = "Vec::is_empty")]
5127 pub orgnl_grp_inf_and_sts: Vec<OriginalGroupHeader22>,
5128 #[serde(rename = "TxInfAndSts")]
5129 #[serde(default)]
5130 #[serde(skip_serializing_if = "Vec::is_empty")]
5131 pub tx_inf_and_sts: Vec<PaymentTransaction161>,
5132 #[serde(rename = "SplmtryData")]
5133 #[serde(default)]
5134 #[serde(skip_serializing_if = "Vec::is_empty")]
5135 pub splmtry_data: Vec<SupplementaryData1>,
5136}
5137#[allow(clippy::struct_field_names)]
5139#[derive(Default)]
5140pub struct FIToFIPaymentStatusReportV14Builder {
5141 grp_hdr: ::std::option::Option<GroupHeader120>,
5142 orgnl_grp_inf_and_sts: ::std::vec::Vec<OriginalGroupHeader22>,
5143 tx_inf_and_sts: ::std::vec::Vec<PaymentTransaction161>,
5144 splmtry_data: ::std::vec::Vec<SupplementaryData1>,
5145}
5146impl FIToFIPaymentStatusReportV14Builder {
5147 #[must_use]
5149 pub fn grp_hdr(mut self, value: GroupHeader120) -> FIToFIPaymentStatusReportV14Builder {
5150 self.grp_hdr = ::std::option::Option::Some(value);
5151 self
5152 }
5153 #[must_use]
5155 pub fn orgnl_grp_inf_and_sts(
5156 mut self,
5157 value: ::std::vec::Vec<OriginalGroupHeader22>,
5158 ) -> FIToFIPaymentStatusReportV14Builder {
5159 self.orgnl_grp_inf_and_sts = value;
5160 self
5161 }
5162 #[must_use]
5164 pub fn add_orgnl_grp_inf_and_sts(
5165 mut self,
5166 value: OriginalGroupHeader22,
5167 ) -> FIToFIPaymentStatusReportV14Builder {
5168 self.orgnl_grp_inf_and_sts.push(value);
5169 self
5170 }
5171 #[must_use]
5173 pub fn tx_inf_and_sts(
5174 mut self,
5175 value: ::std::vec::Vec<PaymentTransaction161>,
5176 ) -> FIToFIPaymentStatusReportV14Builder {
5177 self.tx_inf_and_sts = value;
5178 self
5179 }
5180 #[must_use]
5182 pub fn add_tx_inf_and_sts(
5183 mut self,
5184 value: PaymentTransaction161,
5185 ) -> FIToFIPaymentStatusReportV14Builder {
5186 self.tx_inf_and_sts.push(value);
5187 self
5188 }
5189 #[must_use]
5191 pub fn splmtry_data(
5192 mut self,
5193 value: ::std::vec::Vec<SupplementaryData1>,
5194 ) -> FIToFIPaymentStatusReportV14Builder {
5195 self.splmtry_data = value;
5196 self
5197 }
5198 #[must_use]
5200 pub fn add_splmtry_data(
5201 mut self,
5202 value: SupplementaryData1,
5203 ) -> FIToFIPaymentStatusReportV14Builder {
5204 self.splmtry_data.push(value);
5205 self
5206 }
5207 pub fn build(
5219 self,
5220 ) -> ::std::result::Result<FIToFIPaymentStatusReportV14, crate::common::BuilderError> {
5221 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5222 if self.grp_hdr.is_none() {
5223 missing.push("grp_hdr".to_owned());
5224 }
5225 if !missing.is_empty() {
5226 return ::std::result::Result::Err(crate::common::BuilderError {
5227 type_name: "FIToFIPaymentStatusReportV14".to_owned(),
5228 missing_fields: missing,
5229 });
5230 }
5231 ::std::result::Result::Ok(FIToFIPaymentStatusReportV14 {
5232 grp_hdr: self.grp_hdr.unwrap(),
5233 orgnl_grp_inf_and_sts: self.orgnl_grp_inf_and_sts,
5234 tx_inf_and_sts: self.tx_inf_and_sts,
5235 splmtry_data: self.splmtry_data,
5236 })
5237 }
5238}
5239impl FIToFIPaymentStatusReportV14 {
5240 #[must_use]
5242 pub fn builder() -> FIToFIPaymentStatusReportV14Builder {
5243 FIToFIPaymentStatusReportV14Builder::default()
5244 }
5245}
5246#[allow(clippy::large_enum_variant)]
5247#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5248pub enum FinancialIdentificationSchemeName1Choice {
5249 #[serde(rename = "Cd")]
5250 Cd(ExternalFinancialInstitutionIdentification1Code),
5251 #[serde(rename = "Prtry")]
5252 Prtry(Max35Text),
5253}
5254#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5255pub struct FinancialInstitutionIdentification23 {
5256 #[serde(rename = "BICFI")]
5257 #[serde(skip_serializing_if = "Option::is_none")]
5258 pub bicfi: Option<BICFIDec2014Identifier>,
5259 #[serde(rename = "ClrSysMmbId")]
5260 #[serde(skip_serializing_if = "Option::is_none")]
5261 pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
5262 #[serde(rename = "LEI")]
5263 #[serde(skip_serializing_if = "Option::is_none")]
5264 pub lei: Option<LEIIdentifier>,
5265 #[serde(rename = "Nm")]
5266 #[serde(skip_serializing_if = "Option::is_none")]
5267 pub nm: Option<Max140Text>,
5268 #[serde(rename = "PstlAdr")]
5269 #[serde(skip_serializing_if = "Option::is_none")]
5270 pub pstl_adr: Option<PostalAddress27>,
5271 #[serde(rename = "Othr")]
5272 #[serde(skip_serializing_if = "Option::is_none")]
5273 pub othr: Option<GenericFinancialIdentification1>,
5274}
5275#[allow(clippy::struct_field_names)]
5277#[derive(Default)]
5278pub struct FinancialInstitutionIdentification23Builder {
5279 bicfi: ::std::option::Option<BICFIDec2014Identifier>,
5280 clr_sys_mmb_id: ::std::option::Option<ClearingSystemMemberIdentification2>,
5281 lei: ::std::option::Option<LEIIdentifier>,
5282 nm: ::std::option::Option<Max140Text>,
5283 pstl_adr: ::std::option::Option<PostalAddress27>,
5284 othr: ::std::option::Option<GenericFinancialIdentification1>,
5285}
5286impl FinancialInstitutionIdentification23Builder {
5287 #[must_use]
5289 pub fn bicfi(
5290 mut self,
5291 value: BICFIDec2014Identifier,
5292 ) -> FinancialInstitutionIdentification23Builder {
5293 self.bicfi = ::std::option::Option::Some(value);
5294 self
5295 }
5296 #[must_use]
5298 pub fn clr_sys_mmb_id(
5299 mut self,
5300 value: ClearingSystemMemberIdentification2,
5301 ) -> FinancialInstitutionIdentification23Builder {
5302 self.clr_sys_mmb_id = ::std::option::Option::Some(value);
5303 self
5304 }
5305 #[must_use]
5307 pub fn lei(mut self, value: LEIIdentifier) -> FinancialInstitutionIdentification23Builder {
5308 self.lei = ::std::option::Option::Some(value);
5309 self
5310 }
5311 #[must_use]
5313 pub fn nm(mut self, value: Max140Text) -> FinancialInstitutionIdentification23Builder {
5314 self.nm = ::std::option::Option::Some(value);
5315 self
5316 }
5317 #[must_use]
5319 pub fn pstl_adr(
5320 mut self,
5321 value: PostalAddress27,
5322 ) -> FinancialInstitutionIdentification23Builder {
5323 self.pstl_adr = ::std::option::Option::Some(value);
5324 self
5325 }
5326 #[must_use]
5328 pub fn othr(
5329 mut self,
5330 value: GenericFinancialIdentification1,
5331 ) -> FinancialInstitutionIdentification23Builder {
5332 self.othr = ::std::option::Option::Some(value);
5333 self
5334 }
5335 pub fn build(
5347 self,
5348 ) -> ::std::result::Result<FinancialInstitutionIdentification23, crate::common::BuilderError>
5349 {
5350 ::std::result::Result::Ok(FinancialInstitutionIdentification23 {
5351 bicfi: self.bicfi,
5352 clr_sys_mmb_id: self.clr_sys_mmb_id,
5353 lei: self.lei,
5354 nm: self.nm,
5355 pstl_adr: self.pstl_adr,
5356 othr: self.othr,
5357 })
5358 }
5359}
5360impl FinancialInstitutionIdentification23 {
5361 #[must_use]
5363 pub fn builder() -> FinancialInstitutionIdentification23Builder {
5364 FinancialInstitutionIdentification23Builder::default()
5365 }
5366}
5367#[allow(clippy::large_enum_variant)]
5368#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5369pub enum Frequency36Choice {
5370 #[serde(rename = "Tp")]
5371 Tp(Frequency6Code),
5372 #[serde(rename = "Prd")]
5373 Prd(FrequencyPeriod1),
5374 #[serde(rename = "PtInTm")]
5375 PtInTm(FrequencyAndMoment1),
5376}
5377#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5378pub struct FrequencyAndMoment1 {
5379 #[serde(rename = "Tp")]
5380 pub tp: Frequency6Code,
5381 #[serde(rename = "PtInTm")]
5382 pub pt_in_tm: Exact2NumericText,
5383}
5384#[allow(clippy::struct_field_names)]
5386#[derive(Default)]
5387pub struct FrequencyAndMoment1Builder {
5388 tp: ::std::option::Option<Frequency6Code>,
5389 pt_in_tm: ::std::option::Option<Exact2NumericText>,
5390}
5391impl FrequencyAndMoment1Builder {
5392 #[must_use]
5394 pub fn tp(mut self, value: Frequency6Code) -> FrequencyAndMoment1Builder {
5395 self.tp = ::std::option::Option::Some(value);
5396 self
5397 }
5398 #[must_use]
5400 pub fn pt_in_tm(mut self, value: Exact2NumericText) -> FrequencyAndMoment1Builder {
5401 self.pt_in_tm = ::std::option::Option::Some(value);
5402 self
5403 }
5404 pub fn build(self) -> ::std::result::Result<FrequencyAndMoment1, crate::common::BuilderError> {
5416 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5417 if self.tp.is_none() {
5418 missing.push("tp".to_owned());
5419 }
5420 if self.pt_in_tm.is_none() {
5421 missing.push("pt_in_tm".to_owned());
5422 }
5423 if !missing.is_empty() {
5424 return ::std::result::Result::Err(crate::common::BuilderError {
5425 type_name: "FrequencyAndMoment1".to_owned(),
5426 missing_fields: missing,
5427 });
5428 }
5429 ::std::result::Result::Ok(FrequencyAndMoment1 {
5430 tp: self.tp.unwrap(),
5431 pt_in_tm: self.pt_in_tm.unwrap(),
5432 })
5433 }
5434}
5435impl FrequencyAndMoment1 {
5436 #[must_use]
5438 pub fn builder() -> FrequencyAndMoment1Builder {
5439 FrequencyAndMoment1Builder::default()
5440 }
5441}
5442#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5443pub struct FrequencyPeriod1 {
5444 #[serde(rename = "Tp")]
5445 pub tp: Frequency6Code,
5446 #[serde(rename = "CntPerPrd")]
5447 pub cnt_per_prd: DecimalNumber,
5448}
5449#[allow(clippy::struct_field_names)]
5451#[derive(Default)]
5452pub struct FrequencyPeriod1Builder {
5453 tp: ::std::option::Option<Frequency6Code>,
5454 cnt_per_prd: ::std::option::Option<DecimalNumber>,
5455}
5456impl FrequencyPeriod1Builder {
5457 #[must_use]
5459 pub fn tp(mut self, value: Frequency6Code) -> FrequencyPeriod1Builder {
5460 self.tp = ::std::option::Option::Some(value);
5461 self
5462 }
5463 #[must_use]
5465 pub fn cnt_per_prd(mut self, value: DecimalNumber) -> FrequencyPeriod1Builder {
5466 self.cnt_per_prd = ::std::option::Option::Some(value);
5467 self
5468 }
5469 pub fn build(self) -> ::std::result::Result<FrequencyPeriod1, crate::common::BuilderError> {
5481 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5482 if self.tp.is_none() {
5483 missing.push("tp".to_owned());
5484 }
5485 if self.cnt_per_prd.is_none() {
5486 missing.push("cnt_per_prd".to_owned());
5487 }
5488 if !missing.is_empty() {
5489 return ::std::result::Result::Err(crate::common::BuilderError {
5490 type_name: "FrequencyPeriod1".to_owned(),
5491 missing_fields: missing,
5492 });
5493 }
5494 ::std::result::Result::Ok(FrequencyPeriod1 {
5495 tp: self.tp.unwrap(),
5496 cnt_per_prd: self.cnt_per_prd.unwrap(),
5497 })
5498 }
5499}
5500impl FrequencyPeriod1 {
5501 #[must_use]
5503 pub fn builder() -> FrequencyPeriod1Builder {
5504 FrequencyPeriod1Builder::default()
5505 }
5506}
5507#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5508pub struct Garnishment4 {
5509 #[serde(rename = "Tp")]
5510 pub tp: GarnishmentType1,
5511 #[serde(rename = "Grnshee")]
5512 #[serde(skip_serializing_if = "Option::is_none")]
5513 pub grnshee: Option<PartyIdentification272>,
5514 #[serde(rename = "GrnshmtAdmstr")]
5515 #[serde(skip_serializing_if = "Option::is_none")]
5516 pub grnshmt_admstr: Option<PartyIdentification272>,
5517 #[serde(rename = "RefNb")]
5518 #[serde(skip_serializing_if = "Option::is_none")]
5519 pub ref_nb: Option<Max140Text>,
5520 #[serde(rename = "Dt")]
5521 #[serde(skip_serializing_if = "Option::is_none")]
5522 pub dt: Option<ISODate>,
5523 #[serde(rename = "RmtdAmt")]
5524 #[serde(skip_serializing_if = "Option::is_none")]
5525 pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
5526 #[serde(rename = "FmlyMdclInsrncInd")]
5527 #[serde(skip_serializing_if = "Option::is_none")]
5528 pub fmly_mdcl_insrnc_ind: Option<TrueFalseIndicator>,
5529 #[serde(rename = "MplyeeTermntnInd")]
5530 #[serde(skip_serializing_if = "Option::is_none")]
5531 pub mplyee_termntn_ind: Option<TrueFalseIndicator>,
5532}
5533#[allow(clippy::struct_field_names)]
5535#[derive(Default)]
5536pub struct Garnishment4Builder {
5537 tp: ::std::option::Option<GarnishmentType1>,
5538 grnshee: ::std::option::Option<PartyIdentification272>,
5539 grnshmt_admstr: ::std::option::Option<PartyIdentification272>,
5540 ref_nb: ::std::option::Option<Max140Text>,
5541 dt: ::std::option::Option<ISODate>,
5542 rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5543 fmly_mdcl_insrnc_ind: ::std::option::Option<TrueFalseIndicator>,
5544 mplyee_termntn_ind: ::std::option::Option<TrueFalseIndicator>,
5545}
5546impl Garnishment4Builder {
5547 #[must_use]
5549 pub fn tp(mut self, value: GarnishmentType1) -> Garnishment4Builder {
5550 self.tp = ::std::option::Option::Some(value);
5551 self
5552 }
5553 #[must_use]
5555 pub fn grnshee(mut self, value: PartyIdentification272) -> Garnishment4Builder {
5556 self.grnshee = ::std::option::Option::Some(value);
5557 self
5558 }
5559 #[must_use]
5561 pub fn grnshmt_admstr(mut self, value: PartyIdentification272) -> Garnishment4Builder {
5562 self.grnshmt_admstr = ::std::option::Option::Some(value);
5563 self
5564 }
5565 #[must_use]
5567 pub fn ref_nb(mut self, value: Max140Text) -> Garnishment4Builder {
5568 self.ref_nb = ::std::option::Option::Some(value);
5569 self
5570 }
5571 #[must_use]
5573 pub fn dt(mut self, value: ISODate) -> Garnishment4Builder {
5574 self.dt = ::std::option::Option::Some(value);
5575 self
5576 }
5577 #[must_use]
5579 pub fn rmtd_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Garnishment4Builder {
5580 self.rmtd_amt = ::std::option::Option::Some(value);
5581 self
5582 }
5583 #[must_use]
5585 pub fn fmly_mdcl_insrnc_ind(mut self, value: TrueFalseIndicator) -> Garnishment4Builder {
5586 self.fmly_mdcl_insrnc_ind = ::std::option::Option::Some(value);
5587 self
5588 }
5589 #[must_use]
5591 pub fn mplyee_termntn_ind(mut self, value: TrueFalseIndicator) -> Garnishment4Builder {
5592 self.mplyee_termntn_ind = ::std::option::Option::Some(value);
5593 self
5594 }
5595 pub fn build(self) -> ::std::result::Result<Garnishment4, crate::common::BuilderError> {
5607 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5608 if self.tp.is_none() {
5609 missing.push("tp".to_owned());
5610 }
5611 if !missing.is_empty() {
5612 return ::std::result::Result::Err(crate::common::BuilderError {
5613 type_name: "Garnishment4".to_owned(),
5614 missing_fields: missing,
5615 });
5616 }
5617 ::std::result::Result::Ok(Garnishment4 {
5618 tp: self.tp.unwrap(),
5619 grnshee: self.grnshee,
5620 grnshmt_admstr: self.grnshmt_admstr,
5621 ref_nb: self.ref_nb,
5622 dt: self.dt,
5623 rmtd_amt: self.rmtd_amt,
5624 fmly_mdcl_insrnc_ind: self.fmly_mdcl_insrnc_ind,
5625 mplyee_termntn_ind: self.mplyee_termntn_ind,
5626 })
5627 }
5628}
5629impl Garnishment4 {
5630 #[must_use]
5632 pub fn builder() -> Garnishment4Builder {
5633 Garnishment4Builder::default()
5634 }
5635}
5636#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5637pub struct GarnishmentType1 {
5638 #[serde(rename = "CdOrPrtry")]
5639 pub cd_or_prtry: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5640 #[serde(rename = "Issr")]
5641 #[serde(skip_serializing_if = "Option::is_none")]
5642 pub issr: Option<Max35Text>,
5643}
5644#[allow(clippy::struct_field_names)]
5646#[derive(Default)]
5647pub struct GarnishmentType1Builder {
5648 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<GarnishmentType1Choice>>,
5649 issr: ::std::option::Option<Max35Text>,
5650}
5651impl GarnishmentType1Builder {
5652 #[must_use]
5654 pub fn cd_or_prtry(
5655 mut self,
5656 value: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5657 ) -> GarnishmentType1Builder {
5658 self.cd_or_prtry = ::std::option::Option::Some(value);
5659 self
5660 }
5661 #[must_use]
5663 pub fn issr(mut self, value: Max35Text) -> GarnishmentType1Builder {
5664 self.issr = ::std::option::Option::Some(value);
5665 self
5666 }
5667 pub fn build(self) -> ::std::result::Result<GarnishmentType1, crate::common::BuilderError> {
5679 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5680 if self.cd_or_prtry.is_none() {
5681 missing.push("cd_or_prtry".to_owned());
5682 }
5683 if !missing.is_empty() {
5684 return ::std::result::Result::Err(crate::common::BuilderError {
5685 type_name: "GarnishmentType1".to_owned(),
5686 missing_fields: missing,
5687 });
5688 }
5689 ::std::result::Result::Ok(GarnishmentType1 {
5690 cd_or_prtry: self.cd_or_prtry.unwrap(),
5691 issr: self.issr,
5692 })
5693 }
5694}
5695impl GarnishmentType1 {
5696 #[must_use]
5698 pub fn builder() -> GarnishmentType1Builder {
5699 GarnishmentType1Builder::default()
5700 }
5701}
5702#[allow(clippy::large_enum_variant)]
5703#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5704pub enum GarnishmentType1Choice {
5705 #[serde(rename = "Cd")]
5706 Cd(ExternalGarnishmentType1Code),
5707 #[serde(rename = "Prtry")]
5708 Prtry(Max35Text),
5709}
5710#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5711pub struct GenericAccountIdentification1 {
5712 #[serde(rename = "Id")]
5713 pub id: Max34Text,
5714 #[serde(rename = "SchmeNm")]
5715 #[serde(skip_serializing_if = "Option::is_none")]
5716 pub schme_nm: Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5717 #[serde(rename = "Issr")]
5718 #[serde(skip_serializing_if = "Option::is_none")]
5719 pub issr: Option<Max35Text>,
5720}
5721#[allow(clippy::struct_field_names)]
5723#[derive(Default)]
5724pub struct GenericAccountIdentification1Builder {
5725 id: ::std::option::Option<Max34Text>,
5726 schme_nm: ::std::option::Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5727 issr: ::std::option::Option<Max35Text>,
5728}
5729impl GenericAccountIdentification1Builder {
5730 #[must_use]
5732 pub fn id(mut self, value: Max34Text) -> GenericAccountIdentification1Builder {
5733 self.id = ::std::option::Option::Some(value);
5734 self
5735 }
5736 #[must_use]
5738 pub fn schme_nm(
5739 mut self,
5740 value: crate::common::ChoiceWrapper<AccountSchemeName1Choice>,
5741 ) -> GenericAccountIdentification1Builder {
5742 self.schme_nm = ::std::option::Option::Some(value);
5743 self
5744 }
5745 #[must_use]
5747 pub fn issr(mut self, value: Max35Text) -> GenericAccountIdentification1Builder {
5748 self.issr = ::std::option::Option::Some(value);
5749 self
5750 }
5751 pub fn build(
5763 self,
5764 ) -> ::std::result::Result<GenericAccountIdentification1, crate::common::BuilderError> {
5765 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5766 if self.id.is_none() {
5767 missing.push("id".to_owned());
5768 }
5769 if !missing.is_empty() {
5770 return ::std::result::Result::Err(crate::common::BuilderError {
5771 type_name: "GenericAccountIdentification1".to_owned(),
5772 missing_fields: missing,
5773 });
5774 }
5775 ::std::result::Result::Ok(GenericAccountIdentification1 {
5776 id: self.id.unwrap(),
5777 schme_nm: self.schme_nm,
5778 issr: self.issr,
5779 })
5780 }
5781}
5782impl GenericAccountIdentification1 {
5783 #[must_use]
5785 pub fn builder() -> GenericAccountIdentification1Builder {
5786 GenericAccountIdentification1Builder::default()
5787 }
5788}
5789#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5790pub struct GenericFinancialIdentification1 {
5791 #[serde(rename = "Id")]
5792 pub id: Max35Text,
5793 #[serde(rename = "SchmeNm")]
5794 #[serde(skip_serializing_if = "Option::is_none")]
5795 pub schme_nm: Option<crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>>,
5796 #[serde(rename = "Issr")]
5797 #[serde(skip_serializing_if = "Option::is_none")]
5798 pub issr: Option<Max35Text>,
5799}
5800#[allow(clippy::struct_field_names)]
5802#[derive(Default)]
5803pub struct GenericFinancialIdentification1Builder {
5804 id: ::std::option::Option<Max35Text>,
5805 schme_nm: ::std::option::Option<
5806 crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5807 >,
5808 issr: ::std::option::Option<Max35Text>,
5809}
5810impl GenericFinancialIdentification1Builder {
5811 #[must_use]
5813 pub fn id(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5814 self.id = ::std::option::Option::Some(value);
5815 self
5816 }
5817 #[must_use]
5819 pub fn schme_nm(
5820 mut self,
5821 value: crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5822 ) -> GenericFinancialIdentification1Builder {
5823 self.schme_nm = ::std::option::Option::Some(value);
5824 self
5825 }
5826 #[must_use]
5828 pub fn issr(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5829 self.issr = ::std::option::Option::Some(value);
5830 self
5831 }
5832 pub fn build(
5844 self,
5845 ) -> ::std::result::Result<GenericFinancialIdentification1, crate::common::BuilderError> {
5846 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5847 if self.id.is_none() {
5848 missing.push("id".to_owned());
5849 }
5850 if !missing.is_empty() {
5851 return ::std::result::Result::Err(crate::common::BuilderError {
5852 type_name: "GenericFinancialIdentification1".to_owned(),
5853 missing_fields: missing,
5854 });
5855 }
5856 ::std::result::Result::Ok(GenericFinancialIdentification1 {
5857 id: self.id.unwrap(),
5858 schme_nm: self.schme_nm,
5859 issr: self.issr,
5860 })
5861 }
5862}
5863impl GenericFinancialIdentification1 {
5864 #[must_use]
5866 pub fn builder() -> GenericFinancialIdentification1Builder {
5867 GenericFinancialIdentification1Builder::default()
5868 }
5869}
5870#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5871pub struct GenericIdentification3 {
5872 #[serde(rename = "Id")]
5873 pub id: Max35Text,
5874 #[serde(rename = "Issr")]
5875 #[serde(skip_serializing_if = "Option::is_none")]
5876 pub issr: Option<Max35Text>,
5877}
5878#[allow(clippy::struct_field_names)]
5880#[derive(Default)]
5881pub struct GenericIdentification3Builder {
5882 id: ::std::option::Option<Max35Text>,
5883 issr: ::std::option::Option<Max35Text>,
5884}
5885impl GenericIdentification3Builder {
5886 #[must_use]
5888 pub fn id(mut self, value: Max35Text) -> GenericIdentification3Builder {
5889 self.id = ::std::option::Option::Some(value);
5890 self
5891 }
5892 #[must_use]
5894 pub fn issr(mut self, value: Max35Text) -> GenericIdentification3Builder {
5895 self.issr = ::std::option::Option::Some(value);
5896 self
5897 }
5898 pub fn build(
5910 self,
5911 ) -> ::std::result::Result<GenericIdentification3, crate::common::BuilderError> {
5912 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5913 if self.id.is_none() {
5914 missing.push("id".to_owned());
5915 }
5916 if !missing.is_empty() {
5917 return ::std::result::Result::Err(crate::common::BuilderError {
5918 type_name: "GenericIdentification3".to_owned(),
5919 missing_fields: missing,
5920 });
5921 }
5922 ::std::result::Result::Ok(GenericIdentification3 {
5923 id: self.id.unwrap(),
5924 issr: self.issr,
5925 })
5926 }
5927}
5928impl GenericIdentification3 {
5929 #[must_use]
5931 pub fn builder() -> GenericIdentification3Builder {
5932 GenericIdentification3Builder::default()
5933 }
5934}
5935#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5936pub struct GenericIdentification30 {
5937 #[serde(rename = "Id")]
5938 pub id: Exact4AlphaNumericText,
5939 #[serde(rename = "Issr")]
5940 pub issr: Max35Text,
5941 #[serde(rename = "SchmeNm")]
5942 #[serde(skip_serializing_if = "Option::is_none")]
5943 pub schme_nm: Option<Max35Text>,
5944}
5945#[allow(clippy::struct_field_names)]
5947#[derive(Default)]
5948pub struct GenericIdentification30Builder {
5949 id: ::std::option::Option<Exact4AlphaNumericText>,
5950 issr: ::std::option::Option<Max35Text>,
5951 schme_nm: ::std::option::Option<Max35Text>,
5952}
5953impl GenericIdentification30Builder {
5954 #[must_use]
5956 pub fn id(mut self, value: Exact4AlphaNumericText) -> GenericIdentification30Builder {
5957 self.id = ::std::option::Option::Some(value);
5958 self
5959 }
5960 #[must_use]
5962 pub fn issr(mut self, value: Max35Text) -> GenericIdentification30Builder {
5963 self.issr = ::std::option::Option::Some(value);
5964 self
5965 }
5966 #[must_use]
5968 pub fn schme_nm(mut self, value: Max35Text) -> GenericIdentification30Builder {
5969 self.schme_nm = ::std::option::Option::Some(value);
5970 self
5971 }
5972 pub fn build(
5984 self,
5985 ) -> ::std::result::Result<GenericIdentification30, crate::common::BuilderError> {
5986 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5987 if self.id.is_none() {
5988 missing.push("id".to_owned());
5989 }
5990 if self.issr.is_none() {
5991 missing.push("issr".to_owned());
5992 }
5993 if !missing.is_empty() {
5994 return ::std::result::Result::Err(crate::common::BuilderError {
5995 type_name: "GenericIdentification30".to_owned(),
5996 missing_fields: missing,
5997 });
5998 }
5999 ::std::result::Result::Ok(GenericIdentification30 {
6000 id: self.id.unwrap(),
6001 issr: self.issr.unwrap(),
6002 schme_nm: self.schme_nm,
6003 })
6004 }
6005}
6006impl GenericIdentification30 {
6007 #[must_use]
6009 pub fn builder() -> GenericIdentification30Builder {
6010 GenericIdentification30Builder::default()
6011 }
6012}
6013#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6014pub struct GenericOrganisationIdentification3 {
6015 #[serde(rename = "Id")]
6016 pub id: Max256Text,
6017 #[serde(rename = "SchmeNm")]
6018 #[serde(skip_serializing_if = "Option::is_none")]
6019 pub schme_nm: Option<crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>>,
6020 #[serde(rename = "Issr")]
6021 #[serde(skip_serializing_if = "Option::is_none")]
6022 pub issr: Option<Max35Text>,
6023}
6024#[allow(clippy::struct_field_names)]
6026#[derive(Default)]
6027pub struct GenericOrganisationIdentification3Builder {
6028 id: ::std::option::Option<Max256Text>,
6029 schme_nm: ::std::option::Option<
6030 crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
6031 >,
6032 issr: ::std::option::Option<Max35Text>,
6033}
6034impl GenericOrganisationIdentification3Builder {
6035 #[must_use]
6037 pub fn id(mut self, value: Max256Text) -> GenericOrganisationIdentification3Builder {
6038 self.id = ::std::option::Option::Some(value);
6039 self
6040 }
6041 #[must_use]
6043 pub fn schme_nm(
6044 mut self,
6045 value: crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
6046 ) -> GenericOrganisationIdentification3Builder {
6047 self.schme_nm = ::std::option::Option::Some(value);
6048 self
6049 }
6050 #[must_use]
6052 pub fn issr(mut self, value: Max35Text) -> GenericOrganisationIdentification3Builder {
6053 self.issr = ::std::option::Option::Some(value);
6054 self
6055 }
6056 pub fn build(
6068 self,
6069 ) -> ::std::result::Result<GenericOrganisationIdentification3, crate::common::BuilderError>
6070 {
6071 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6072 if self.id.is_none() {
6073 missing.push("id".to_owned());
6074 }
6075 if !missing.is_empty() {
6076 return ::std::result::Result::Err(crate::common::BuilderError {
6077 type_name: "GenericOrganisationIdentification3".to_owned(),
6078 missing_fields: missing,
6079 });
6080 }
6081 ::std::result::Result::Ok(GenericOrganisationIdentification3 {
6082 id: self.id.unwrap(),
6083 schme_nm: self.schme_nm,
6084 issr: self.issr,
6085 })
6086 }
6087}
6088impl GenericOrganisationIdentification3 {
6089 #[must_use]
6091 pub fn builder() -> GenericOrganisationIdentification3Builder {
6092 GenericOrganisationIdentification3Builder::default()
6093 }
6094}
6095#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6096pub struct GenericPersonIdentification2 {
6097 #[serde(rename = "Id")]
6098 pub id: Max256Text,
6099 #[serde(rename = "SchmeNm")]
6100 #[serde(skip_serializing_if = "Option::is_none")]
6101 pub schme_nm: Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
6102 #[serde(rename = "Issr")]
6103 #[serde(skip_serializing_if = "Option::is_none")]
6104 pub issr: Option<Max35Text>,
6105}
6106#[allow(clippy::struct_field_names)]
6108#[derive(Default)]
6109pub struct GenericPersonIdentification2Builder {
6110 id: ::std::option::Option<Max256Text>,
6111 schme_nm:
6112 ::std::option::Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
6113 issr: ::std::option::Option<Max35Text>,
6114}
6115impl GenericPersonIdentification2Builder {
6116 #[must_use]
6118 pub fn id(mut self, value: Max256Text) -> GenericPersonIdentification2Builder {
6119 self.id = ::std::option::Option::Some(value);
6120 self
6121 }
6122 #[must_use]
6124 pub fn schme_nm(
6125 mut self,
6126 value: crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>,
6127 ) -> GenericPersonIdentification2Builder {
6128 self.schme_nm = ::std::option::Option::Some(value);
6129 self
6130 }
6131 #[must_use]
6133 pub fn issr(mut self, value: Max35Text) -> GenericPersonIdentification2Builder {
6134 self.issr = ::std::option::Option::Some(value);
6135 self
6136 }
6137 pub fn build(
6149 self,
6150 ) -> ::std::result::Result<GenericPersonIdentification2, crate::common::BuilderError> {
6151 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6152 if self.id.is_none() {
6153 missing.push("id".to_owned());
6154 }
6155 if !missing.is_empty() {
6156 return ::std::result::Result::Err(crate::common::BuilderError {
6157 type_name: "GenericPersonIdentification2".to_owned(),
6158 missing_fields: missing,
6159 });
6160 }
6161 ::std::result::Result::Ok(GenericPersonIdentification2 {
6162 id: self.id.unwrap(),
6163 schme_nm: self.schme_nm,
6164 issr: self.issr,
6165 })
6166 }
6167}
6168impl GenericPersonIdentification2 {
6169 #[must_use]
6171 pub fn builder() -> GenericPersonIdentification2Builder {
6172 GenericPersonIdentification2Builder::default()
6173 }
6174}
6175#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6176pub struct GroupHeader120 {
6177 #[serde(rename = "MsgId")]
6178 pub msg_id: Max35Text,
6179 #[serde(rename = "CreDtTm")]
6180 pub cre_dt_tm: ISODateTime,
6181 #[serde(rename = "InstgAgt")]
6182 #[serde(skip_serializing_if = "Option::is_none")]
6183 pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
6184 #[serde(rename = "InstdAgt")]
6185 #[serde(skip_serializing_if = "Option::is_none")]
6186 pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
6187 #[serde(rename = "OrgnlBizQry")]
6188 #[serde(skip_serializing_if = "Option::is_none")]
6189 pub orgnl_biz_qry: Option<OriginalBusinessQuery1>,
6190}
6191#[allow(clippy::struct_field_names)]
6193#[derive(Default)]
6194pub struct GroupHeader120Builder {
6195 msg_id: ::std::option::Option<Max35Text>,
6196 cre_dt_tm: ::std::option::Option<ISODateTime>,
6197 instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
6198 instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
6199 orgnl_biz_qry: ::std::option::Option<OriginalBusinessQuery1>,
6200}
6201impl GroupHeader120Builder {
6202 #[must_use]
6204 pub fn msg_id(mut self, value: Max35Text) -> GroupHeader120Builder {
6205 self.msg_id = ::std::option::Option::Some(value);
6206 self
6207 }
6208 #[must_use]
6210 pub fn cre_dt_tm(mut self, value: ISODateTime) -> GroupHeader120Builder {
6211 self.cre_dt_tm = ::std::option::Option::Some(value);
6212 self
6213 }
6214 #[must_use]
6216 pub fn instg_agt(
6217 mut self,
6218 value: BranchAndFinancialInstitutionIdentification8,
6219 ) -> GroupHeader120Builder {
6220 self.instg_agt = ::std::option::Option::Some(value);
6221 self
6222 }
6223 #[must_use]
6225 pub fn instd_agt(
6226 mut self,
6227 value: BranchAndFinancialInstitutionIdentification8,
6228 ) -> GroupHeader120Builder {
6229 self.instd_agt = ::std::option::Option::Some(value);
6230 self
6231 }
6232 #[must_use]
6234 pub fn orgnl_biz_qry(mut self, value: OriginalBusinessQuery1) -> GroupHeader120Builder {
6235 self.orgnl_biz_qry = ::std::option::Option::Some(value);
6236 self
6237 }
6238 pub fn build(self) -> ::std::result::Result<GroupHeader120, crate::common::BuilderError> {
6250 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6251 if self.msg_id.is_none() {
6252 missing.push("msg_id".to_owned());
6253 }
6254 if self.cre_dt_tm.is_none() {
6255 missing.push("cre_dt_tm".to_owned());
6256 }
6257 if !missing.is_empty() {
6258 return ::std::result::Result::Err(crate::common::BuilderError {
6259 type_name: "GroupHeader120".to_owned(),
6260 missing_fields: missing,
6261 });
6262 }
6263 ::std::result::Result::Ok(GroupHeader120 {
6264 msg_id: self.msg_id.unwrap(),
6265 cre_dt_tm: self.cre_dt_tm.unwrap(),
6266 instg_agt: self.instg_agt,
6267 instd_agt: self.instd_agt,
6268 orgnl_biz_qry: self.orgnl_biz_qry,
6269 })
6270 }
6271}
6272impl GroupHeader120 {
6273 #[must_use]
6275 pub fn builder() -> GroupHeader120Builder {
6276 GroupHeader120Builder::default()
6277 }
6278}
6279#[allow(clippy::large_enum_variant)]
6280#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6281pub enum LocalInstrument2Choice {
6282 #[serde(rename = "Cd")]
6283 Cd(ExternalLocalInstrument1Code),
6284 #[serde(rename = "Prtry")]
6285 Prtry(Max35Text),
6286}
6287#[allow(clippy::large_enum_variant)]
6288#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6289pub enum MandateClassification1Choice {
6290 #[serde(rename = "Cd")]
6291 Cd(MandateClassification1Code),
6292 #[serde(rename = "Prtry")]
6293 Prtry(Max35Text),
6294}
6295#[allow(clippy::large_enum_variant)]
6296#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6297pub enum MandateRelatedData3Choice {
6298 #[serde(rename = "DrctDbtMndt")]
6299 DrctDbtMndt(MandateRelatedInformation16),
6300 #[serde(rename = "CdtTrfMndt")]
6301 CdtTrfMndt(CreditTransferMandateData1),
6302}
6303#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6304pub struct MandateRelatedInformation16 {
6305 #[serde(rename = "MndtId")]
6306 #[serde(skip_serializing_if = "Option::is_none")]
6307 pub mndt_id: Option<Max35Text>,
6308 #[serde(rename = "DtOfSgntr")]
6309 #[serde(skip_serializing_if = "Option::is_none")]
6310 pub dt_of_sgntr: Option<ISODate>,
6311 #[serde(rename = "AmdmntInd")]
6312 #[serde(skip_serializing_if = "Option::is_none")]
6313 pub amdmnt_ind: Option<TrueFalseIndicator>,
6314 #[serde(rename = "AmdmntInfDtls")]
6315 #[serde(skip_serializing_if = "Option::is_none")]
6316 pub amdmnt_inf_dtls: Option<AmendmentInformationDetails15>,
6317 #[serde(rename = "ElctrncSgntr")]
6318 #[serde(skip_serializing_if = "Option::is_none")]
6319 pub elctrnc_sgntr: Option<Max1025Text>,
6320 #[serde(rename = "FrstColltnDt")]
6321 #[serde(skip_serializing_if = "Option::is_none")]
6322 pub frst_colltn_dt: Option<ISODate>,
6323 #[serde(rename = "FnlColltnDt")]
6324 #[serde(skip_serializing_if = "Option::is_none")]
6325 pub fnl_colltn_dt: Option<ISODate>,
6326 #[serde(rename = "Frqcy")]
6327 #[serde(skip_serializing_if = "Option::is_none")]
6328 pub frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
6329 #[serde(rename = "Rsn")]
6330 #[serde(skip_serializing_if = "Option::is_none")]
6331 pub rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
6332 #[serde(rename = "TrckgDays")]
6333 #[serde(skip_serializing_if = "Option::is_none")]
6334 pub trckg_days: Option<Exact2NumericText>,
6335}
6336#[allow(clippy::struct_field_names)]
6338#[derive(Default)]
6339pub struct MandateRelatedInformation16Builder {
6340 mndt_id: ::std::option::Option<Max35Text>,
6341 dt_of_sgntr: ::std::option::Option<ISODate>,
6342 amdmnt_ind: ::std::option::Option<TrueFalseIndicator>,
6343 amdmnt_inf_dtls: ::std::option::Option<AmendmentInformationDetails15>,
6344 elctrnc_sgntr: ::std::option::Option<Max1025Text>,
6345 frst_colltn_dt: ::std::option::Option<ISODate>,
6346 fnl_colltn_dt: ::std::option::Option<ISODate>,
6347 frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
6348 rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
6349 trckg_days: ::std::option::Option<Exact2NumericText>,
6350}
6351impl MandateRelatedInformation16Builder {
6352 #[must_use]
6354 pub fn mndt_id(mut self, value: Max35Text) -> MandateRelatedInformation16Builder {
6355 self.mndt_id = ::std::option::Option::Some(value);
6356 self
6357 }
6358 #[must_use]
6360 pub fn dt_of_sgntr(mut self, value: ISODate) -> MandateRelatedInformation16Builder {
6361 self.dt_of_sgntr = ::std::option::Option::Some(value);
6362 self
6363 }
6364 #[must_use]
6366 pub fn amdmnt_ind(mut self, value: TrueFalseIndicator) -> MandateRelatedInformation16Builder {
6367 self.amdmnt_ind = ::std::option::Option::Some(value);
6368 self
6369 }
6370 #[must_use]
6372 pub fn amdmnt_inf_dtls(
6373 mut self,
6374 value: AmendmentInformationDetails15,
6375 ) -> MandateRelatedInformation16Builder {
6376 self.amdmnt_inf_dtls = ::std::option::Option::Some(value);
6377 self
6378 }
6379 #[must_use]
6381 pub fn elctrnc_sgntr(mut self, value: Max1025Text) -> MandateRelatedInformation16Builder {
6382 self.elctrnc_sgntr = ::std::option::Option::Some(value);
6383 self
6384 }
6385 #[must_use]
6387 pub fn frst_colltn_dt(mut self, value: ISODate) -> MandateRelatedInformation16Builder {
6388 self.frst_colltn_dt = ::std::option::Option::Some(value);
6389 self
6390 }
6391 #[must_use]
6393 pub fn fnl_colltn_dt(mut self, value: ISODate) -> MandateRelatedInformation16Builder {
6394 self.fnl_colltn_dt = ::std::option::Option::Some(value);
6395 self
6396 }
6397 #[must_use]
6399 pub fn frqcy(
6400 mut self,
6401 value: crate::common::ChoiceWrapper<Frequency36Choice>,
6402 ) -> MandateRelatedInformation16Builder {
6403 self.frqcy = ::std::option::Option::Some(value);
6404 self
6405 }
6406 #[must_use]
6408 pub fn rsn(
6409 mut self,
6410 value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
6411 ) -> MandateRelatedInformation16Builder {
6412 self.rsn = ::std::option::Option::Some(value);
6413 self
6414 }
6415 #[must_use]
6417 pub fn trckg_days(mut self, value: Exact2NumericText) -> MandateRelatedInformation16Builder {
6418 self.trckg_days = ::std::option::Option::Some(value);
6419 self
6420 }
6421 pub fn build(
6433 self,
6434 ) -> ::std::result::Result<MandateRelatedInformation16, crate::common::BuilderError> {
6435 ::std::result::Result::Ok(MandateRelatedInformation16 {
6436 mndt_id: self.mndt_id,
6437 dt_of_sgntr: self.dt_of_sgntr,
6438 amdmnt_ind: self.amdmnt_ind,
6439 amdmnt_inf_dtls: self.amdmnt_inf_dtls,
6440 elctrnc_sgntr: self.elctrnc_sgntr,
6441 frst_colltn_dt: self.frst_colltn_dt,
6442 fnl_colltn_dt: self.fnl_colltn_dt,
6443 frqcy: self.frqcy,
6444 rsn: self.rsn,
6445 trckg_days: self.trckg_days,
6446 })
6447 }
6448}
6449impl MandateRelatedInformation16 {
6450 #[must_use]
6452 pub fn builder() -> MandateRelatedInformation16Builder {
6453 MandateRelatedInformation16Builder::default()
6454 }
6455}
6456#[allow(clippy::large_enum_variant)]
6457#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6458pub enum MandateSetupReason1Choice {
6459 #[serde(rename = "Cd")]
6460 Cd(ExternalMandateSetupReason1Code),
6461 #[serde(rename = "Prtry")]
6462 Prtry(Max70Text),
6463}
6464#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6465pub struct MandateTypeInformation2 {
6466 #[serde(rename = "SvcLvl")]
6467 #[serde(skip_serializing_if = "Option::is_none")]
6468 pub svc_lvl: Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6469 #[serde(rename = "LclInstrm")]
6470 #[serde(skip_serializing_if = "Option::is_none")]
6471 pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6472 #[serde(rename = "CtgyPurp")]
6473 #[serde(skip_serializing_if = "Option::is_none")]
6474 pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6475 #[serde(rename = "Clssfctn")]
6476 #[serde(skip_serializing_if = "Option::is_none")]
6477 pub clssfctn: Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
6478}
6479#[allow(clippy::struct_field_names)]
6481#[derive(Default)]
6482pub struct MandateTypeInformation2Builder {
6483 svc_lvl: ::std::option::Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6484 lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6485 ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6486 clssfctn: ::std::option::Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
6487}
6488impl MandateTypeInformation2Builder {
6489 #[must_use]
6491 pub fn svc_lvl(
6492 mut self,
6493 value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
6494 ) -> MandateTypeInformation2Builder {
6495 self.svc_lvl = ::std::option::Option::Some(value);
6496 self
6497 }
6498 #[must_use]
6500 pub fn lcl_instrm(
6501 mut self,
6502 value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
6503 ) -> MandateTypeInformation2Builder {
6504 self.lcl_instrm = ::std::option::Option::Some(value);
6505 self
6506 }
6507 #[must_use]
6509 pub fn ctgy_purp(
6510 mut self,
6511 value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
6512 ) -> MandateTypeInformation2Builder {
6513 self.ctgy_purp = ::std::option::Option::Some(value);
6514 self
6515 }
6516 #[must_use]
6518 pub fn clssfctn(
6519 mut self,
6520 value: crate::common::ChoiceWrapper<MandateClassification1Choice>,
6521 ) -> MandateTypeInformation2Builder {
6522 self.clssfctn = ::std::option::Option::Some(value);
6523 self
6524 }
6525 pub fn build(
6537 self,
6538 ) -> ::std::result::Result<MandateTypeInformation2, crate::common::BuilderError> {
6539 ::std::result::Result::Ok(MandateTypeInformation2 {
6540 svc_lvl: self.svc_lvl,
6541 lcl_instrm: self.lcl_instrm,
6542 ctgy_purp: self.ctgy_purp,
6543 clssfctn: self.clssfctn,
6544 })
6545 }
6546}
6547impl MandateTypeInformation2 {
6548 #[must_use]
6550 pub fn builder() -> MandateTypeInformation2Builder {
6551 MandateTypeInformation2Builder::default()
6552 }
6553}
6554#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6555pub struct NumberOfTransactionsPerStatus5 {
6556 #[serde(rename = "DtldNbOfTxs")]
6557 pub dtld_nb_of_txs: Max15NumericText,
6558 #[serde(rename = "DtldSts")]
6559 pub dtld_sts: ExternalPaymentTransactionStatus1Code,
6560 #[serde(rename = "DtldCtrlSum")]
6561 #[serde(skip_serializing_if = "Option::is_none")]
6562 pub dtld_ctrl_sum: Option<DecimalNumber>,
6563}
6564#[allow(clippy::struct_field_names)]
6566#[derive(Default)]
6567pub struct NumberOfTransactionsPerStatus5Builder {
6568 dtld_nb_of_txs: ::std::option::Option<Max15NumericText>,
6569 dtld_sts: ::std::option::Option<ExternalPaymentTransactionStatus1Code>,
6570 dtld_ctrl_sum: ::std::option::Option<DecimalNumber>,
6571}
6572impl NumberOfTransactionsPerStatus5Builder {
6573 #[must_use]
6575 pub fn dtld_nb_of_txs(
6576 mut self,
6577 value: Max15NumericText,
6578 ) -> NumberOfTransactionsPerStatus5Builder {
6579 self.dtld_nb_of_txs = ::std::option::Option::Some(value);
6580 self
6581 }
6582 #[must_use]
6584 pub fn dtld_sts(
6585 mut self,
6586 value: ExternalPaymentTransactionStatus1Code,
6587 ) -> NumberOfTransactionsPerStatus5Builder {
6588 self.dtld_sts = ::std::option::Option::Some(value);
6589 self
6590 }
6591 #[must_use]
6593 pub fn dtld_ctrl_sum(mut self, value: DecimalNumber) -> NumberOfTransactionsPerStatus5Builder {
6594 self.dtld_ctrl_sum = ::std::option::Option::Some(value);
6595 self
6596 }
6597 pub fn build(
6609 self,
6610 ) -> ::std::result::Result<NumberOfTransactionsPerStatus5, crate::common::BuilderError> {
6611 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6612 if self.dtld_nb_of_txs.is_none() {
6613 missing.push("dtld_nb_of_txs".to_owned());
6614 }
6615 if self.dtld_sts.is_none() {
6616 missing.push("dtld_sts".to_owned());
6617 }
6618 if !missing.is_empty() {
6619 return ::std::result::Result::Err(crate::common::BuilderError {
6620 type_name: "NumberOfTransactionsPerStatus5".to_owned(),
6621 missing_fields: missing,
6622 });
6623 }
6624 ::std::result::Result::Ok(NumberOfTransactionsPerStatus5 {
6625 dtld_nb_of_txs: self.dtld_nb_of_txs.unwrap(),
6626 dtld_sts: self.dtld_sts.unwrap(),
6627 dtld_ctrl_sum: self.dtld_ctrl_sum,
6628 })
6629 }
6630}
6631impl NumberOfTransactionsPerStatus5 {
6632 #[must_use]
6634 pub fn builder() -> NumberOfTransactionsPerStatus5Builder {
6635 NumberOfTransactionsPerStatus5Builder::default()
6636 }
6637}
6638#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6639pub struct OrganisationIdentification39 {
6640 #[serde(rename = "AnyBIC")]
6641 #[serde(skip_serializing_if = "Option::is_none")]
6642 pub any_bic: Option<AnyBICDec2014Identifier>,
6643 #[serde(rename = "LEI")]
6644 #[serde(skip_serializing_if = "Option::is_none")]
6645 pub lei: Option<LEIIdentifier>,
6646 #[serde(rename = "Othr")]
6647 #[serde(default)]
6648 #[serde(skip_serializing_if = "Vec::is_empty")]
6649 pub othr: Vec<GenericOrganisationIdentification3>,
6650}
6651#[allow(clippy::struct_field_names)]
6653#[derive(Default)]
6654pub struct OrganisationIdentification39Builder {
6655 any_bic: ::std::option::Option<AnyBICDec2014Identifier>,
6656 lei: ::std::option::Option<LEIIdentifier>,
6657 othr: ::std::vec::Vec<GenericOrganisationIdentification3>,
6658}
6659impl OrganisationIdentification39Builder {
6660 #[must_use]
6662 pub fn any_bic(
6663 mut self,
6664 value: AnyBICDec2014Identifier,
6665 ) -> OrganisationIdentification39Builder {
6666 self.any_bic = ::std::option::Option::Some(value);
6667 self
6668 }
6669 #[must_use]
6671 pub fn lei(mut self, value: LEIIdentifier) -> OrganisationIdentification39Builder {
6672 self.lei = ::std::option::Option::Some(value);
6673 self
6674 }
6675 #[must_use]
6677 pub fn othr(
6678 mut self,
6679 value: ::std::vec::Vec<GenericOrganisationIdentification3>,
6680 ) -> OrganisationIdentification39Builder {
6681 self.othr = value;
6682 self
6683 }
6684 #[must_use]
6686 pub fn add_othr(
6687 mut self,
6688 value: GenericOrganisationIdentification3,
6689 ) -> OrganisationIdentification39Builder {
6690 self.othr.push(value);
6691 self
6692 }
6693 pub fn build(
6705 self,
6706 ) -> ::std::result::Result<OrganisationIdentification39, crate::common::BuilderError> {
6707 ::std::result::Result::Ok(OrganisationIdentification39 {
6708 any_bic: self.any_bic,
6709 lei: self.lei,
6710 othr: self.othr,
6711 })
6712 }
6713}
6714impl OrganisationIdentification39 {
6715 #[must_use]
6717 pub fn builder() -> OrganisationIdentification39Builder {
6718 OrganisationIdentification39Builder::default()
6719 }
6720}
6721#[allow(clippy::large_enum_variant)]
6722#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6723pub enum OrganisationIdentificationSchemeName1Choice {
6724 #[serde(rename = "Cd")]
6725 Cd(ExternalOrganisationIdentification1Code),
6726 #[serde(rename = "Prtry")]
6727 Prtry(Max35Text),
6728}
6729#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6730pub struct OriginalBusinessQuery1 {
6731 #[serde(rename = "MsgId")]
6732 pub msg_id: Max35Text,
6733 #[serde(rename = "MsgNmId")]
6734 #[serde(skip_serializing_if = "Option::is_none")]
6735 pub msg_nm_id: Option<Max35Text>,
6736 #[serde(rename = "CreDtTm")]
6737 #[serde(skip_serializing_if = "Option::is_none")]
6738 pub cre_dt_tm: Option<ISODateTime>,
6739}
6740#[allow(clippy::struct_field_names)]
6742#[derive(Default)]
6743pub struct OriginalBusinessQuery1Builder {
6744 msg_id: ::std::option::Option<Max35Text>,
6745 msg_nm_id: ::std::option::Option<Max35Text>,
6746 cre_dt_tm: ::std::option::Option<ISODateTime>,
6747}
6748impl OriginalBusinessQuery1Builder {
6749 #[must_use]
6751 pub fn msg_id(mut self, value: Max35Text) -> OriginalBusinessQuery1Builder {
6752 self.msg_id = ::std::option::Option::Some(value);
6753 self
6754 }
6755 #[must_use]
6757 pub fn msg_nm_id(mut self, value: Max35Text) -> OriginalBusinessQuery1Builder {
6758 self.msg_nm_id = ::std::option::Option::Some(value);
6759 self
6760 }
6761 #[must_use]
6763 pub fn cre_dt_tm(mut self, value: ISODateTime) -> OriginalBusinessQuery1Builder {
6764 self.cre_dt_tm = ::std::option::Option::Some(value);
6765 self
6766 }
6767 pub fn build(
6779 self,
6780 ) -> ::std::result::Result<OriginalBusinessQuery1, crate::common::BuilderError> {
6781 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6782 if self.msg_id.is_none() {
6783 missing.push("msg_id".to_owned());
6784 }
6785 if !missing.is_empty() {
6786 return ::std::result::Result::Err(crate::common::BuilderError {
6787 type_name: "OriginalBusinessQuery1".to_owned(),
6788 missing_fields: missing,
6789 });
6790 }
6791 ::std::result::Result::Ok(OriginalBusinessQuery1 {
6792 msg_id: self.msg_id.unwrap(),
6793 msg_nm_id: self.msg_nm_id,
6794 cre_dt_tm: self.cre_dt_tm,
6795 })
6796 }
6797}
6798impl OriginalBusinessQuery1 {
6799 #[must_use]
6801 pub fn builder() -> OriginalBusinessQuery1Builder {
6802 OriginalBusinessQuery1Builder::default()
6803 }
6804}
6805#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6806pub struct OriginalGroupHeader22 {
6807 #[serde(rename = "OrgnlMsgId")]
6808 pub orgnl_msg_id: Max35Text,
6809 #[serde(rename = "OrgnlMsgNmId")]
6810 pub orgnl_msg_nm_id: Max35Text,
6811 #[serde(rename = "OrgnlCreDtTm")]
6812 #[serde(skip_serializing_if = "Option::is_none")]
6813 pub orgnl_cre_dt_tm: Option<ISODateTime>,
6814 #[serde(rename = "OrgnlNbOfTxs")]
6815 #[serde(skip_serializing_if = "Option::is_none")]
6816 pub orgnl_nb_of_txs: Option<Max15NumericText>,
6817 #[serde(rename = "OrgnlCtrlSum")]
6818 #[serde(skip_serializing_if = "Option::is_none")]
6819 pub orgnl_ctrl_sum: Option<DecimalNumber>,
6820 #[serde(rename = "GrpSts")]
6821 #[serde(skip_serializing_if = "Option::is_none")]
6822 pub grp_sts: Option<ExternalPaymentGroupStatus1Code>,
6823 #[serde(rename = "StsRsnInf")]
6824 #[serde(default)]
6825 #[serde(skip_serializing_if = "Vec::is_empty")]
6826 pub sts_rsn_inf: Vec<StatusReasonInformation14>,
6827 #[serde(rename = "NbOfTxsPerSts")]
6828 #[serde(default)]
6829 #[serde(skip_serializing_if = "Vec::is_empty")]
6830 pub nb_of_txs_per_sts: Vec<NumberOfTransactionsPerStatus5>,
6831}
6832#[allow(clippy::struct_field_names)]
6834#[derive(Default)]
6835pub struct OriginalGroupHeader22Builder {
6836 orgnl_msg_id: ::std::option::Option<Max35Text>,
6837 orgnl_msg_nm_id: ::std::option::Option<Max35Text>,
6838 orgnl_cre_dt_tm: ::std::option::Option<ISODateTime>,
6839 orgnl_nb_of_txs: ::std::option::Option<Max15NumericText>,
6840 orgnl_ctrl_sum: ::std::option::Option<DecimalNumber>,
6841 grp_sts: ::std::option::Option<ExternalPaymentGroupStatus1Code>,
6842 sts_rsn_inf: ::std::vec::Vec<StatusReasonInformation14>,
6843 nb_of_txs_per_sts: ::std::vec::Vec<NumberOfTransactionsPerStatus5>,
6844}
6845impl OriginalGroupHeader22Builder {
6846 #[must_use]
6848 pub fn orgnl_msg_id(mut self, value: Max35Text) -> OriginalGroupHeader22Builder {
6849 self.orgnl_msg_id = ::std::option::Option::Some(value);
6850 self
6851 }
6852 #[must_use]
6854 pub fn orgnl_msg_nm_id(mut self, value: Max35Text) -> OriginalGroupHeader22Builder {
6855 self.orgnl_msg_nm_id = ::std::option::Option::Some(value);
6856 self
6857 }
6858 #[must_use]
6860 pub fn orgnl_cre_dt_tm(mut self, value: ISODateTime) -> OriginalGroupHeader22Builder {
6861 self.orgnl_cre_dt_tm = ::std::option::Option::Some(value);
6862 self
6863 }
6864 #[must_use]
6866 pub fn orgnl_nb_of_txs(mut self, value: Max15NumericText) -> OriginalGroupHeader22Builder {
6867 self.orgnl_nb_of_txs = ::std::option::Option::Some(value);
6868 self
6869 }
6870 #[must_use]
6872 pub fn orgnl_ctrl_sum(mut self, value: DecimalNumber) -> OriginalGroupHeader22Builder {
6873 self.orgnl_ctrl_sum = ::std::option::Option::Some(value);
6874 self
6875 }
6876 #[must_use]
6878 pub fn grp_sts(
6879 mut self,
6880 value: ExternalPaymentGroupStatus1Code,
6881 ) -> OriginalGroupHeader22Builder {
6882 self.grp_sts = ::std::option::Option::Some(value);
6883 self
6884 }
6885 #[must_use]
6887 pub fn sts_rsn_inf(
6888 mut self,
6889 value: ::std::vec::Vec<StatusReasonInformation14>,
6890 ) -> OriginalGroupHeader22Builder {
6891 self.sts_rsn_inf = value;
6892 self
6893 }
6894 #[must_use]
6896 pub fn add_sts_rsn_inf(
6897 mut self,
6898 value: StatusReasonInformation14,
6899 ) -> OriginalGroupHeader22Builder {
6900 self.sts_rsn_inf.push(value);
6901 self
6902 }
6903 #[must_use]
6905 pub fn nb_of_txs_per_sts(
6906 mut self,
6907 value: ::std::vec::Vec<NumberOfTransactionsPerStatus5>,
6908 ) -> OriginalGroupHeader22Builder {
6909 self.nb_of_txs_per_sts = value;
6910 self
6911 }
6912 #[must_use]
6914 pub fn add_nb_of_txs_per_sts(
6915 mut self,
6916 value: NumberOfTransactionsPerStatus5,
6917 ) -> OriginalGroupHeader22Builder {
6918 self.nb_of_txs_per_sts.push(value);
6919 self
6920 }
6921 pub fn build(
6933 self,
6934 ) -> ::std::result::Result<OriginalGroupHeader22, crate::common::BuilderError> {
6935 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6936 if self.orgnl_msg_id.is_none() {
6937 missing.push("orgnl_msg_id".to_owned());
6938 }
6939 if self.orgnl_msg_nm_id.is_none() {
6940 missing.push("orgnl_msg_nm_id".to_owned());
6941 }
6942 if !missing.is_empty() {
6943 return ::std::result::Result::Err(crate::common::BuilderError {
6944 type_name: "OriginalGroupHeader22".to_owned(),
6945 missing_fields: missing,
6946 });
6947 }
6948 ::std::result::Result::Ok(OriginalGroupHeader22 {
6949 orgnl_msg_id: self.orgnl_msg_id.unwrap(),
6950 orgnl_msg_nm_id: self.orgnl_msg_nm_id.unwrap(),
6951 orgnl_cre_dt_tm: self.orgnl_cre_dt_tm,
6952 orgnl_nb_of_txs: self.orgnl_nb_of_txs,
6953 orgnl_ctrl_sum: self.orgnl_ctrl_sum,
6954 grp_sts: self.grp_sts,
6955 sts_rsn_inf: self.sts_rsn_inf,
6956 nb_of_txs_per_sts: self.nb_of_txs_per_sts,
6957 })
6958 }
6959}
6960impl OriginalGroupHeader22 {
6961 #[must_use]
6963 pub fn builder() -> OriginalGroupHeader22Builder {
6964 OriginalGroupHeader22Builder::default()
6965 }
6966}
6967#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6968pub struct OriginalGroupInformation29 {
6969 #[serde(rename = "OrgnlMsgId")]
6970 pub orgnl_msg_id: Max35Text,
6971 #[serde(rename = "OrgnlMsgNmId")]
6972 pub orgnl_msg_nm_id: Max35Text,
6973 #[serde(rename = "OrgnlCreDtTm")]
6974 #[serde(skip_serializing_if = "Option::is_none")]
6975 pub orgnl_cre_dt_tm: Option<ISODateTime>,
6976}
6977#[allow(clippy::struct_field_names)]
6979#[derive(Default)]
6980pub struct OriginalGroupInformation29Builder {
6981 orgnl_msg_id: ::std::option::Option<Max35Text>,
6982 orgnl_msg_nm_id: ::std::option::Option<Max35Text>,
6983 orgnl_cre_dt_tm: ::std::option::Option<ISODateTime>,
6984}
6985impl OriginalGroupInformation29Builder {
6986 #[must_use]
6988 pub fn orgnl_msg_id(mut self, value: Max35Text) -> OriginalGroupInformation29Builder {
6989 self.orgnl_msg_id = ::std::option::Option::Some(value);
6990 self
6991 }
6992 #[must_use]
6994 pub fn orgnl_msg_nm_id(mut self, value: Max35Text) -> OriginalGroupInformation29Builder {
6995 self.orgnl_msg_nm_id = ::std::option::Option::Some(value);
6996 self
6997 }
6998 #[must_use]
7000 pub fn orgnl_cre_dt_tm(mut self, value: ISODateTime) -> OriginalGroupInformation29Builder {
7001 self.orgnl_cre_dt_tm = ::std::option::Option::Some(value);
7002 self
7003 }
7004 pub fn build(
7016 self,
7017 ) -> ::std::result::Result<OriginalGroupInformation29, crate::common::BuilderError> {
7018 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7019 if self.orgnl_msg_id.is_none() {
7020 missing.push("orgnl_msg_id".to_owned());
7021 }
7022 if self.orgnl_msg_nm_id.is_none() {
7023 missing.push("orgnl_msg_nm_id".to_owned());
7024 }
7025 if !missing.is_empty() {
7026 return ::std::result::Result::Err(crate::common::BuilderError {
7027 type_name: "OriginalGroupInformation29".to_owned(),
7028 missing_fields: missing,
7029 });
7030 }
7031 ::std::result::Result::Ok(OriginalGroupInformation29 {
7032 orgnl_msg_id: self.orgnl_msg_id.unwrap(),
7033 orgnl_msg_nm_id: self.orgnl_msg_nm_id.unwrap(),
7034 orgnl_cre_dt_tm: self.orgnl_cre_dt_tm,
7035 })
7036 }
7037}
7038impl OriginalGroupInformation29 {
7039 #[must_use]
7041 pub fn builder() -> OriginalGroupInformation29Builder {
7042 OriginalGroupInformation29Builder::default()
7043 }
7044}
7045#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7046pub struct OriginalTransactionReference42 {
7047 #[serde(rename = "IntrBkSttlmAmt")]
7048 #[serde(skip_serializing_if = "Option::is_none")]
7049 pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7050 #[serde(rename = "Amt")]
7051 #[serde(skip_serializing_if = "Option::is_none")]
7052 pub amt: Option<crate::common::ChoiceWrapper<AmountType4Choice>>,
7053 #[serde(rename = "IntrBkSttlmDt")]
7054 #[serde(skip_serializing_if = "Option::is_none")]
7055 pub intr_bk_sttlm_dt: Option<ISODate>,
7056 #[serde(rename = "ReqdColltnDt")]
7057 #[serde(skip_serializing_if = "Option::is_none")]
7058 pub reqd_colltn_dt: Option<ISODate>,
7059 #[serde(rename = "ReqdExctnDt")]
7060 #[serde(skip_serializing_if = "Option::is_none")]
7061 pub reqd_exctn_dt: Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7062 #[serde(rename = "CdtrSchmeId")]
7063 #[serde(skip_serializing_if = "Option::is_none")]
7064 pub cdtr_schme_id: Option<PartyIdentification272>,
7065 #[serde(rename = "SttlmInf")]
7066 #[serde(skip_serializing_if = "Option::is_none")]
7067 pub sttlm_inf: Option<SettlementInstruction15>,
7068 #[serde(rename = "PmtTpInf")]
7069 #[serde(skip_serializing_if = "Option::is_none")]
7070 pub pmt_tp_inf: Option<PaymentTypeInformation27>,
7071 #[serde(rename = "PmtMtd")]
7072 #[serde(skip_serializing_if = "Option::is_none")]
7073 pub pmt_mtd: Option<PaymentMethod4Code>,
7074 #[serde(rename = "MndtRltdInf")]
7075 #[serde(skip_serializing_if = "Option::is_none")]
7076 pub mndt_rltd_inf: Option<crate::common::ChoiceWrapper<MandateRelatedData3Choice>>,
7077 #[serde(rename = "RmtInf")]
7078 #[serde(skip_serializing_if = "Option::is_none")]
7079 pub rmt_inf: Option<RemittanceInformation22>,
7080 #[serde(rename = "UltmtDbtr")]
7081 #[serde(skip_serializing_if = "Option::is_none")]
7082 pub ultmt_dbtr: Option<crate::common::ChoiceWrapper<Party50Choice>>,
7083 #[serde(rename = "Dbtr")]
7084 #[serde(skip_serializing_if = "Option::is_none")]
7085 pub dbtr: Option<crate::common::ChoiceWrapper<Party50Choice>>,
7086 #[serde(rename = "DbtrAcct")]
7087 #[serde(skip_serializing_if = "Option::is_none")]
7088 pub dbtr_acct: Option<CashAccount40>,
7089 #[serde(rename = "DbtrAgt")]
7090 #[serde(skip_serializing_if = "Option::is_none")]
7091 pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
7092 #[serde(rename = "DbtrAgtAcct")]
7093 #[serde(skip_serializing_if = "Option::is_none")]
7094 pub dbtr_agt_acct: Option<CashAccount40>,
7095 #[serde(rename = "CdtrAgt")]
7096 #[serde(skip_serializing_if = "Option::is_none")]
7097 pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification8>,
7098 #[serde(rename = "CdtrAgtAcct")]
7099 #[serde(skip_serializing_if = "Option::is_none")]
7100 pub cdtr_agt_acct: Option<CashAccount40>,
7101 #[serde(rename = "Cdtr")]
7102 #[serde(skip_serializing_if = "Option::is_none")]
7103 pub cdtr: Option<crate::common::ChoiceWrapper<Party50Choice>>,
7104 #[serde(rename = "CdtrAcct")]
7105 #[serde(skip_serializing_if = "Option::is_none")]
7106 pub cdtr_acct: Option<CashAccount40>,
7107 #[serde(rename = "UltmtCdtr")]
7108 #[serde(skip_serializing_if = "Option::is_none")]
7109 pub ultmt_cdtr: Option<crate::common::ChoiceWrapper<Party50Choice>>,
7110 #[serde(rename = "Purp")]
7111 #[serde(skip_serializing_if = "Option::is_none")]
7112 pub purp: Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
7113}
7114#[allow(clippy::struct_field_names)]
7116#[derive(Default)]
7117pub struct OriginalTransactionReference42Builder {
7118 intr_bk_sttlm_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7119 amt: ::std::option::Option<crate::common::ChoiceWrapper<AmountType4Choice>>,
7120 intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
7121 reqd_colltn_dt: ::std::option::Option<ISODate>,
7122 reqd_exctn_dt: ::std::option::Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7123 cdtr_schme_id: ::std::option::Option<PartyIdentification272>,
7124 sttlm_inf: ::std::option::Option<SettlementInstruction15>,
7125 pmt_tp_inf: ::std::option::Option<PaymentTypeInformation27>,
7126 pmt_mtd: ::std::option::Option<PaymentMethod4Code>,
7127 mndt_rltd_inf: ::std::option::Option<crate::common::ChoiceWrapper<MandateRelatedData3Choice>>,
7128 rmt_inf: ::std::option::Option<RemittanceInformation22>,
7129 ultmt_dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party50Choice>>,
7130 dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party50Choice>>,
7131 dbtr_acct: ::std::option::Option<CashAccount40>,
7132 dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
7133 dbtr_agt_acct: ::std::option::Option<CashAccount40>,
7134 cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
7135 cdtr_agt_acct: ::std::option::Option<CashAccount40>,
7136 cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party50Choice>>,
7137 cdtr_acct: ::std::option::Option<CashAccount40>,
7138 ultmt_cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party50Choice>>,
7139 purp: ::std::option::Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
7140}
7141impl OriginalTransactionReference42Builder {
7142 #[must_use]
7144 pub fn intr_bk_sttlm_amt(
7145 mut self,
7146 value: ActiveOrHistoricCurrencyAndAmount,
7147 ) -> OriginalTransactionReference42Builder {
7148 self.intr_bk_sttlm_amt = ::std::option::Option::Some(value);
7149 self
7150 }
7151 #[must_use]
7153 pub fn amt(
7154 mut self,
7155 value: crate::common::ChoiceWrapper<AmountType4Choice>,
7156 ) -> OriginalTransactionReference42Builder {
7157 self.amt = ::std::option::Option::Some(value);
7158 self
7159 }
7160 #[must_use]
7162 pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> OriginalTransactionReference42Builder {
7163 self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
7164 self
7165 }
7166 #[must_use]
7168 pub fn reqd_colltn_dt(mut self, value: ISODate) -> OriginalTransactionReference42Builder {
7169 self.reqd_colltn_dt = ::std::option::Option::Some(value);
7170 self
7171 }
7172 #[must_use]
7174 pub fn reqd_exctn_dt(
7175 mut self,
7176 value: crate::common::ChoiceWrapper<DateAndDateTime2Choice>,
7177 ) -> OriginalTransactionReference42Builder {
7178 self.reqd_exctn_dt = ::std::option::Option::Some(value);
7179 self
7180 }
7181 #[must_use]
7183 pub fn cdtr_schme_id(
7184 mut self,
7185 value: PartyIdentification272,
7186 ) -> OriginalTransactionReference42Builder {
7187 self.cdtr_schme_id = ::std::option::Option::Some(value);
7188 self
7189 }
7190 #[must_use]
7192 pub fn sttlm_inf(
7193 mut self,
7194 value: SettlementInstruction15,
7195 ) -> OriginalTransactionReference42Builder {
7196 self.sttlm_inf = ::std::option::Option::Some(value);
7197 self
7198 }
7199 #[must_use]
7201 pub fn pmt_tp_inf(
7202 mut self,
7203 value: PaymentTypeInformation27,
7204 ) -> OriginalTransactionReference42Builder {
7205 self.pmt_tp_inf = ::std::option::Option::Some(value);
7206 self
7207 }
7208 #[must_use]
7210 pub fn pmt_mtd(mut self, value: PaymentMethod4Code) -> OriginalTransactionReference42Builder {
7211 self.pmt_mtd = ::std::option::Option::Some(value);
7212 self
7213 }
7214 #[must_use]
7216 pub fn mndt_rltd_inf(
7217 mut self,
7218 value: crate::common::ChoiceWrapper<MandateRelatedData3Choice>,
7219 ) -> OriginalTransactionReference42Builder {
7220 self.mndt_rltd_inf = ::std::option::Option::Some(value);
7221 self
7222 }
7223 #[must_use]
7225 pub fn rmt_inf(
7226 mut self,
7227 value: RemittanceInformation22,
7228 ) -> OriginalTransactionReference42Builder {
7229 self.rmt_inf = ::std::option::Option::Some(value);
7230 self
7231 }
7232 #[must_use]
7234 pub fn ultmt_dbtr(
7235 mut self,
7236 value: crate::common::ChoiceWrapper<Party50Choice>,
7237 ) -> OriginalTransactionReference42Builder {
7238 self.ultmt_dbtr = ::std::option::Option::Some(value);
7239 self
7240 }
7241 #[must_use]
7243 pub fn dbtr(
7244 mut self,
7245 value: crate::common::ChoiceWrapper<Party50Choice>,
7246 ) -> OriginalTransactionReference42Builder {
7247 self.dbtr = ::std::option::Option::Some(value);
7248 self
7249 }
7250 #[must_use]
7252 pub fn dbtr_acct(mut self, value: CashAccount40) -> OriginalTransactionReference42Builder {
7253 self.dbtr_acct = ::std::option::Option::Some(value);
7254 self
7255 }
7256 #[must_use]
7258 pub fn dbtr_agt(
7259 mut self,
7260 value: BranchAndFinancialInstitutionIdentification8,
7261 ) -> OriginalTransactionReference42Builder {
7262 self.dbtr_agt = ::std::option::Option::Some(value);
7263 self
7264 }
7265 #[must_use]
7267 pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> OriginalTransactionReference42Builder {
7268 self.dbtr_agt_acct = ::std::option::Option::Some(value);
7269 self
7270 }
7271 #[must_use]
7273 pub fn cdtr_agt(
7274 mut self,
7275 value: BranchAndFinancialInstitutionIdentification8,
7276 ) -> OriginalTransactionReference42Builder {
7277 self.cdtr_agt = ::std::option::Option::Some(value);
7278 self
7279 }
7280 #[must_use]
7282 pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> OriginalTransactionReference42Builder {
7283 self.cdtr_agt_acct = ::std::option::Option::Some(value);
7284 self
7285 }
7286 #[must_use]
7288 pub fn cdtr(
7289 mut self,
7290 value: crate::common::ChoiceWrapper<Party50Choice>,
7291 ) -> OriginalTransactionReference42Builder {
7292 self.cdtr = ::std::option::Option::Some(value);
7293 self
7294 }
7295 #[must_use]
7297 pub fn cdtr_acct(mut self, value: CashAccount40) -> OriginalTransactionReference42Builder {
7298 self.cdtr_acct = ::std::option::Option::Some(value);
7299 self
7300 }
7301 #[must_use]
7303 pub fn ultmt_cdtr(
7304 mut self,
7305 value: crate::common::ChoiceWrapper<Party50Choice>,
7306 ) -> OriginalTransactionReference42Builder {
7307 self.ultmt_cdtr = ::std::option::Option::Some(value);
7308 self
7309 }
7310 #[must_use]
7312 pub fn purp(
7313 mut self,
7314 value: crate::common::ChoiceWrapper<Purpose2Choice>,
7315 ) -> OriginalTransactionReference42Builder {
7316 self.purp = ::std::option::Option::Some(value);
7317 self
7318 }
7319 pub fn build(
7331 self,
7332 ) -> ::std::result::Result<OriginalTransactionReference42, crate::common::BuilderError> {
7333 ::std::result::Result::Ok(OriginalTransactionReference42 {
7334 intr_bk_sttlm_amt: self.intr_bk_sttlm_amt,
7335 amt: self.amt,
7336 intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
7337 reqd_colltn_dt: self.reqd_colltn_dt,
7338 reqd_exctn_dt: self.reqd_exctn_dt,
7339 cdtr_schme_id: self.cdtr_schme_id,
7340 sttlm_inf: self.sttlm_inf,
7341 pmt_tp_inf: self.pmt_tp_inf,
7342 pmt_mtd: self.pmt_mtd,
7343 mndt_rltd_inf: self.mndt_rltd_inf,
7344 rmt_inf: self.rmt_inf,
7345 ultmt_dbtr: self.ultmt_dbtr,
7346 dbtr: self.dbtr,
7347 dbtr_acct: self.dbtr_acct,
7348 dbtr_agt: self.dbtr_agt,
7349 dbtr_agt_acct: self.dbtr_agt_acct,
7350 cdtr_agt: self.cdtr_agt,
7351 cdtr_agt_acct: self.cdtr_agt_acct,
7352 cdtr: self.cdtr,
7353 cdtr_acct: self.cdtr_acct,
7354 ultmt_cdtr: self.ultmt_cdtr,
7355 purp: self.purp,
7356 })
7357 }
7358}
7359impl OriginalTransactionReference42 {
7360 #[must_use]
7362 pub fn builder() -> OriginalTransactionReference42Builder {
7363 OriginalTransactionReference42Builder::default()
7364 }
7365}
7366#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7367pub struct OtherContact1 {
7368 #[serde(rename = "ChanlTp")]
7369 pub chanl_tp: Max4Text,
7370 #[serde(rename = "Id")]
7371 #[serde(skip_serializing_if = "Option::is_none")]
7372 pub id: Option<Max128Text>,
7373}
7374#[allow(clippy::struct_field_names)]
7376#[derive(Default)]
7377pub struct OtherContact1Builder {
7378 chanl_tp: ::std::option::Option<Max4Text>,
7379 id: ::std::option::Option<Max128Text>,
7380}
7381impl OtherContact1Builder {
7382 #[must_use]
7384 pub fn chanl_tp(mut self, value: Max4Text) -> OtherContact1Builder {
7385 self.chanl_tp = ::std::option::Option::Some(value);
7386 self
7387 }
7388 #[must_use]
7390 pub fn id(mut self, value: Max128Text) -> OtherContact1Builder {
7391 self.id = ::std::option::Option::Some(value);
7392 self
7393 }
7394 pub fn build(self) -> ::std::result::Result<OtherContact1, crate::common::BuilderError> {
7406 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7407 if self.chanl_tp.is_none() {
7408 missing.push("chanl_tp".to_owned());
7409 }
7410 if !missing.is_empty() {
7411 return ::std::result::Result::Err(crate::common::BuilderError {
7412 type_name: "OtherContact1".to_owned(),
7413 missing_fields: missing,
7414 });
7415 }
7416 ::std::result::Result::Ok(OtherContact1 {
7417 chanl_tp: self.chanl_tp.unwrap(),
7418 id: self.id,
7419 })
7420 }
7421}
7422impl OtherContact1 {
7423 #[must_use]
7425 pub fn builder() -> OtherContact1Builder {
7426 OtherContact1Builder::default()
7427 }
7428}
7429#[allow(clippy::large_enum_variant)]
7430#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7431pub enum Party50Choice {
7432 #[serde(rename = "Pty")]
7433 Pty(PartyIdentification272),
7434 #[serde(rename = "Agt")]
7435 Agt(BranchAndFinancialInstitutionIdentification8),
7436}
7437#[allow(clippy::large_enum_variant)]
7438#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7439pub enum Party52Choice {
7440 #[serde(rename = "OrgId")]
7441 OrgId(OrganisationIdentification39),
7442 #[serde(rename = "PrvtId")]
7443 PrvtId(PersonIdentification18),
7444}
7445#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7446pub struct PartyIdentification272 {
7447 #[serde(rename = "Nm")]
7448 #[serde(skip_serializing_if = "Option::is_none")]
7449 pub nm: Option<Max140Text>,
7450 #[serde(rename = "PstlAdr")]
7451 #[serde(skip_serializing_if = "Option::is_none")]
7452 pub pstl_adr: Option<PostalAddress27>,
7453 #[serde(rename = "Id")]
7454 #[serde(skip_serializing_if = "Option::is_none")]
7455 pub id: Option<crate::common::ChoiceWrapper<Party52Choice>>,
7456 #[serde(rename = "CtryOfRes")]
7457 #[serde(skip_serializing_if = "Option::is_none")]
7458 pub ctry_of_res: Option<CountryCode>,
7459 #[serde(rename = "CtctDtls")]
7460 #[serde(skip_serializing_if = "Option::is_none")]
7461 pub ctct_dtls: Option<Contact13>,
7462}
7463#[allow(clippy::struct_field_names)]
7465#[derive(Default)]
7466pub struct PartyIdentification272Builder {
7467 nm: ::std::option::Option<Max140Text>,
7468 pstl_adr: ::std::option::Option<PostalAddress27>,
7469 id: ::std::option::Option<crate::common::ChoiceWrapper<Party52Choice>>,
7470 ctry_of_res: ::std::option::Option<CountryCode>,
7471 ctct_dtls: ::std::option::Option<Contact13>,
7472}
7473impl PartyIdentification272Builder {
7474 #[must_use]
7476 pub fn nm(mut self, value: Max140Text) -> PartyIdentification272Builder {
7477 self.nm = ::std::option::Option::Some(value);
7478 self
7479 }
7480 #[must_use]
7482 pub fn pstl_adr(mut self, value: PostalAddress27) -> PartyIdentification272Builder {
7483 self.pstl_adr = ::std::option::Option::Some(value);
7484 self
7485 }
7486 #[must_use]
7488 pub fn id(
7489 mut self,
7490 value: crate::common::ChoiceWrapper<Party52Choice>,
7491 ) -> PartyIdentification272Builder {
7492 self.id = ::std::option::Option::Some(value);
7493 self
7494 }
7495 #[must_use]
7497 pub fn ctry_of_res(mut self, value: CountryCode) -> PartyIdentification272Builder {
7498 self.ctry_of_res = ::std::option::Option::Some(value);
7499 self
7500 }
7501 #[must_use]
7503 pub fn ctct_dtls(mut self, value: Contact13) -> PartyIdentification272Builder {
7504 self.ctct_dtls = ::std::option::Option::Some(value);
7505 self
7506 }
7507 pub fn build(
7519 self,
7520 ) -> ::std::result::Result<PartyIdentification272, crate::common::BuilderError> {
7521 ::std::result::Result::Ok(PartyIdentification272 {
7522 nm: self.nm,
7523 pstl_adr: self.pstl_adr,
7524 id: self.id,
7525 ctry_of_res: self.ctry_of_res,
7526 ctct_dtls: self.ctct_dtls,
7527 })
7528 }
7529}
7530impl PartyIdentification272 {
7531 #[must_use]
7533 pub fn builder() -> PartyIdentification272Builder {
7534 PartyIdentification272Builder::default()
7535 }
7536}
7537#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7538pub struct PaymentTransaction161 {
7539 #[serde(rename = "StsId")]
7540 #[serde(skip_serializing_if = "Option::is_none")]
7541 pub sts_id: Option<Max35Text>,
7542 #[serde(rename = "OrgnlGrpInf")]
7543 #[serde(skip_serializing_if = "Option::is_none")]
7544 pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
7545 #[serde(rename = "OrgnlInstrId")]
7546 #[serde(skip_serializing_if = "Option::is_none")]
7547 pub orgnl_instr_id: Option<Max35Text>,
7548 #[serde(rename = "OrgnlEndToEndId")]
7549 #[serde(skip_serializing_if = "Option::is_none")]
7550 pub orgnl_end_to_end_id: Option<Max35Text>,
7551 #[serde(rename = "OrgnlTxId")]
7552 #[serde(skip_serializing_if = "Option::is_none")]
7553 pub orgnl_tx_id: Option<Max35Text>,
7554 #[serde(rename = "OrgnlUETR")]
7555 #[serde(skip_serializing_if = "Option::is_none")]
7556 pub orgnl_uetr: Option<UUIDv4Identifier>,
7557 #[serde(rename = "TxSts")]
7558 #[serde(skip_serializing_if = "Option::is_none")]
7559 pub tx_sts: Option<ExternalPaymentTransactionStatus1Code>,
7560 #[serde(rename = "StsRsnInf")]
7561 #[serde(default)]
7562 #[serde(skip_serializing_if = "Vec::is_empty")]
7563 pub sts_rsn_inf: Vec<StatusReasonInformation14>,
7564 #[serde(rename = "ChrgsInf")]
7565 #[serde(default)]
7566 #[serde(skip_serializing_if = "Vec::is_empty")]
7567 pub chrgs_inf: Vec<Charges16>,
7568 #[serde(rename = "AccptncDtTm")]
7569 #[serde(skip_serializing_if = "Option::is_none")]
7570 pub accptnc_dt_tm: Option<ISODateTime>,
7571 #[serde(rename = "PrcgDt")]
7572 #[serde(skip_serializing_if = "Option::is_none")]
7573 pub prcg_dt: Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7574 #[serde(rename = "FctvIntrBkSttlmDt")]
7575 #[serde(skip_serializing_if = "Option::is_none")]
7576 pub fctv_intr_bk_sttlm_dt: Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7577 #[serde(rename = "AcctSvcrRef")]
7578 #[serde(skip_serializing_if = "Option::is_none")]
7579 pub acct_svcr_ref: Option<Max35Text>,
7580 #[serde(rename = "ClrSysRef")]
7581 #[serde(skip_serializing_if = "Option::is_none")]
7582 pub clr_sys_ref: Option<Max35Text>,
7583 #[serde(rename = "InstgAgt")]
7584 #[serde(skip_serializing_if = "Option::is_none")]
7585 pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
7586 #[serde(rename = "InstdAgt")]
7587 #[serde(skip_serializing_if = "Option::is_none")]
7588 pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
7589 #[serde(rename = "OrgnlTxRef")]
7590 #[serde(skip_serializing_if = "Option::is_none")]
7591 pub orgnl_tx_ref: Option<OriginalTransactionReference42>,
7592 #[serde(rename = "SplmtryData")]
7593 #[serde(default)]
7594 #[serde(skip_serializing_if = "Vec::is_empty")]
7595 pub splmtry_data: Vec<SupplementaryData1>,
7596}
7597#[allow(clippy::struct_field_names)]
7599#[derive(Default)]
7600pub struct PaymentTransaction161Builder {
7601 sts_id: ::std::option::Option<Max35Text>,
7602 orgnl_grp_inf: ::std::option::Option<OriginalGroupInformation29>,
7603 orgnl_instr_id: ::std::option::Option<Max35Text>,
7604 orgnl_end_to_end_id: ::std::option::Option<Max35Text>,
7605 orgnl_tx_id: ::std::option::Option<Max35Text>,
7606 orgnl_uetr: ::std::option::Option<UUIDv4Identifier>,
7607 tx_sts: ::std::option::Option<ExternalPaymentTransactionStatus1Code>,
7608 sts_rsn_inf: ::std::vec::Vec<StatusReasonInformation14>,
7609 chrgs_inf: ::std::vec::Vec<Charges16>,
7610 accptnc_dt_tm: ::std::option::Option<ISODateTime>,
7611 prcg_dt: ::std::option::Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7612 fctv_intr_bk_sttlm_dt:
7613 ::std::option::Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
7614 acct_svcr_ref: ::std::option::Option<Max35Text>,
7615 clr_sys_ref: ::std::option::Option<Max35Text>,
7616 instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
7617 instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
7618 orgnl_tx_ref: ::std::option::Option<OriginalTransactionReference42>,
7619 splmtry_data: ::std::vec::Vec<SupplementaryData1>,
7620}
7621impl PaymentTransaction161Builder {
7622 #[must_use]
7624 pub fn sts_id(mut self, value: Max35Text) -> PaymentTransaction161Builder {
7625 self.sts_id = ::std::option::Option::Some(value);
7626 self
7627 }
7628 #[must_use]
7630 pub fn orgnl_grp_inf(
7631 mut self,
7632 value: OriginalGroupInformation29,
7633 ) -> PaymentTransaction161Builder {
7634 self.orgnl_grp_inf = ::std::option::Option::Some(value);
7635 self
7636 }
7637 #[must_use]
7639 pub fn orgnl_instr_id(mut self, value: Max35Text) -> PaymentTransaction161Builder {
7640 self.orgnl_instr_id = ::std::option::Option::Some(value);
7641 self
7642 }
7643 #[must_use]
7645 pub fn orgnl_end_to_end_id(mut self, value: Max35Text) -> PaymentTransaction161Builder {
7646 self.orgnl_end_to_end_id = ::std::option::Option::Some(value);
7647 self
7648 }
7649 #[must_use]
7651 pub fn orgnl_tx_id(mut self, value: Max35Text) -> PaymentTransaction161Builder {
7652 self.orgnl_tx_id = ::std::option::Option::Some(value);
7653 self
7654 }
7655 #[must_use]
7657 pub fn orgnl_uetr(mut self, value: UUIDv4Identifier) -> PaymentTransaction161Builder {
7658 self.orgnl_uetr = ::std::option::Option::Some(value);
7659 self
7660 }
7661 #[must_use]
7663 pub fn tx_sts(
7664 mut self,
7665 value: ExternalPaymentTransactionStatus1Code,
7666 ) -> PaymentTransaction161Builder {
7667 self.tx_sts = ::std::option::Option::Some(value);
7668 self
7669 }
7670 #[must_use]
7672 pub fn sts_rsn_inf(
7673 mut self,
7674 value: ::std::vec::Vec<StatusReasonInformation14>,
7675 ) -> PaymentTransaction161Builder {
7676 self.sts_rsn_inf = value;
7677 self
7678 }
7679 #[must_use]
7681 pub fn add_sts_rsn_inf(
7682 mut self,
7683 value: StatusReasonInformation14,
7684 ) -> PaymentTransaction161Builder {
7685 self.sts_rsn_inf.push(value);
7686 self
7687 }
7688 #[must_use]
7690 pub fn chrgs_inf(mut self, value: ::std::vec::Vec<Charges16>) -> PaymentTransaction161Builder {
7691 self.chrgs_inf = value;
7692 self
7693 }
7694 #[must_use]
7696 pub fn add_chrgs_inf(mut self, value: Charges16) -> PaymentTransaction161Builder {
7697 self.chrgs_inf.push(value);
7698 self
7699 }
7700 #[must_use]
7702 pub fn accptnc_dt_tm(mut self, value: ISODateTime) -> PaymentTransaction161Builder {
7703 self.accptnc_dt_tm = ::std::option::Option::Some(value);
7704 self
7705 }
7706 #[must_use]
7708 pub fn prcg_dt(
7709 mut self,
7710 value: crate::common::ChoiceWrapper<DateAndDateTime2Choice>,
7711 ) -> PaymentTransaction161Builder {
7712 self.prcg_dt = ::std::option::Option::Some(value);
7713 self
7714 }
7715 #[must_use]
7717 pub fn fctv_intr_bk_sttlm_dt(
7718 mut self,
7719 value: crate::common::ChoiceWrapper<DateAndDateTime2Choice>,
7720 ) -> PaymentTransaction161Builder {
7721 self.fctv_intr_bk_sttlm_dt = ::std::option::Option::Some(value);
7722 self
7723 }
7724 #[must_use]
7726 pub fn acct_svcr_ref(mut self, value: Max35Text) -> PaymentTransaction161Builder {
7727 self.acct_svcr_ref = ::std::option::Option::Some(value);
7728 self
7729 }
7730 #[must_use]
7732 pub fn clr_sys_ref(mut self, value: Max35Text) -> PaymentTransaction161Builder {
7733 self.clr_sys_ref = ::std::option::Option::Some(value);
7734 self
7735 }
7736 #[must_use]
7738 pub fn instg_agt(
7739 mut self,
7740 value: BranchAndFinancialInstitutionIdentification8,
7741 ) -> PaymentTransaction161Builder {
7742 self.instg_agt = ::std::option::Option::Some(value);
7743 self
7744 }
7745 #[must_use]
7747 pub fn instd_agt(
7748 mut self,
7749 value: BranchAndFinancialInstitutionIdentification8,
7750 ) -> PaymentTransaction161Builder {
7751 self.instd_agt = ::std::option::Option::Some(value);
7752 self
7753 }
7754 #[must_use]
7756 pub fn orgnl_tx_ref(
7757 mut self,
7758 value: OriginalTransactionReference42,
7759 ) -> PaymentTransaction161Builder {
7760 self.orgnl_tx_ref = ::std::option::Option::Some(value);
7761 self
7762 }
7763 #[must_use]
7765 pub fn splmtry_data(
7766 mut self,
7767 value: ::std::vec::Vec<SupplementaryData1>,
7768 ) -> PaymentTransaction161Builder {
7769 self.splmtry_data = value;
7770 self
7771 }
7772 #[must_use]
7774 pub fn add_splmtry_data(mut self, value: SupplementaryData1) -> PaymentTransaction161Builder {
7775 self.splmtry_data.push(value);
7776 self
7777 }
7778 pub fn build(
7790 self,
7791 ) -> ::std::result::Result<PaymentTransaction161, crate::common::BuilderError> {
7792 ::std::result::Result::Ok(PaymentTransaction161 {
7793 sts_id: self.sts_id,
7794 orgnl_grp_inf: self.orgnl_grp_inf,
7795 orgnl_instr_id: self.orgnl_instr_id,
7796 orgnl_end_to_end_id: self.orgnl_end_to_end_id,
7797 orgnl_tx_id: self.orgnl_tx_id,
7798 orgnl_uetr: self.orgnl_uetr,
7799 tx_sts: self.tx_sts,
7800 sts_rsn_inf: self.sts_rsn_inf,
7801 chrgs_inf: self.chrgs_inf,
7802 accptnc_dt_tm: self.accptnc_dt_tm,
7803 prcg_dt: self.prcg_dt,
7804 fctv_intr_bk_sttlm_dt: self.fctv_intr_bk_sttlm_dt,
7805 acct_svcr_ref: self.acct_svcr_ref,
7806 clr_sys_ref: self.clr_sys_ref,
7807 instg_agt: self.instg_agt,
7808 instd_agt: self.instd_agt,
7809 orgnl_tx_ref: self.orgnl_tx_ref,
7810 splmtry_data: self.splmtry_data,
7811 })
7812 }
7813}
7814impl PaymentTransaction161 {
7815 #[must_use]
7817 pub fn builder() -> PaymentTransaction161Builder {
7818 PaymentTransaction161Builder::default()
7819 }
7820}
7821#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7822pub struct PaymentTypeInformation27 {
7823 #[serde(rename = "InstrPrty")]
7824 #[serde(skip_serializing_if = "Option::is_none")]
7825 pub instr_prty: Option<Priority2Code>,
7826 #[serde(rename = "ClrChanl")]
7827 #[serde(skip_serializing_if = "Option::is_none")]
7828 pub clr_chanl: Option<ClearingChannel2Code>,
7829 #[serde(rename = "SvcLvl")]
7830 #[serde(default)]
7831 #[serde(skip_serializing_if = "Vec::is_empty")]
7832 pub svc_lvl: Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
7833 #[serde(rename = "LclInstrm")]
7834 #[serde(skip_serializing_if = "Option::is_none")]
7835 pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
7836 #[serde(rename = "SeqTp")]
7837 #[serde(skip_serializing_if = "Option::is_none")]
7838 pub seq_tp: Option<SequenceType3Code>,
7839 #[serde(rename = "CtgyPurp")]
7840 #[serde(skip_serializing_if = "Option::is_none")]
7841 pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
7842}
7843#[allow(clippy::struct_field_names)]
7845#[derive(Default)]
7846pub struct PaymentTypeInformation27Builder {
7847 instr_prty: ::std::option::Option<Priority2Code>,
7848 clr_chanl: ::std::option::Option<ClearingChannel2Code>,
7849 svc_lvl: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
7850 lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
7851 seq_tp: ::std::option::Option<SequenceType3Code>,
7852 ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
7853}
7854impl PaymentTypeInformation27Builder {
7855 #[must_use]
7857 pub fn instr_prty(mut self, value: Priority2Code) -> PaymentTypeInformation27Builder {
7858 self.instr_prty = ::std::option::Option::Some(value);
7859 self
7860 }
7861 #[must_use]
7863 pub fn clr_chanl(mut self, value: ClearingChannel2Code) -> PaymentTypeInformation27Builder {
7864 self.clr_chanl = ::std::option::Option::Some(value);
7865 self
7866 }
7867 #[must_use]
7869 pub fn svc_lvl(
7870 mut self,
7871 value: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
7872 ) -> PaymentTypeInformation27Builder {
7873 self.svc_lvl = value;
7874 self
7875 }
7876 #[must_use]
7878 pub fn add_svc_lvl(
7879 mut self,
7880 value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
7881 ) -> PaymentTypeInformation27Builder {
7882 self.svc_lvl.push(value);
7883 self
7884 }
7885 #[must_use]
7887 pub fn lcl_instrm(
7888 mut self,
7889 value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
7890 ) -> PaymentTypeInformation27Builder {
7891 self.lcl_instrm = ::std::option::Option::Some(value);
7892 self
7893 }
7894 #[must_use]
7896 pub fn seq_tp(mut self, value: SequenceType3Code) -> PaymentTypeInformation27Builder {
7897 self.seq_tp = ::std::option::Option::Some(value);
7898 self
7899 }
7900 #[must_use]
7902 pub fn ctgy_purp(
7903 mut self,
7904 value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
7905 ) -> PaymentTypeInformation27Builder {
7906 self.ctgy_purp = ::std::option::Option::Some(value);
7907 self
7908 }
7909 pub fn build(
7921 self,
7922 ) -> ::std::result::Result<PaymentTypeInformation27, crate::common::BuilderError> {
7923 ::std::result::Result::Ok(PaymentTypeInformation27 {
7924 instr_prty: self.instr_prty,
7925 clr_chanl: self.clr_chanl,
7926 svc_lvl: self.svc_lvl,
7927 lcl_instrm: self.lcl_instrm,
7928 seq_tp: self.seq_tp,
7929 ctgy_purp: self.ctgy_purp,
7930 })
7931 }
7932}
7933impl PaymentTypeInformation27 {
7934 #[must_use]
7936 pub fn builder() -> PaymentTypeInformation27Builder {
7937 PaymentTypeInformation27Builder::default()
7938 }
7939}
7940#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7941pub struct PersonIdentification18 {
7942 #[serde(rename = "DtAndPlcOfBirth")]
7943 #[serde(skip_serializing_if = "Option::is_none")]
7944 pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
7945 #[serde(rename = "Othr")]
7946 #[serde(default)]
7947 #[serde(skip_serializing_if = "Vec::is_empty")]
7948 pub othr: Vec<GenericPersonIdentification2>,
7949}
7950#[allow(clippy::struct_field_names)]
7952#[derive(Default)]
7953pub struct PersonIdentification18Builder {
7954 dt_and_plc_of_birth: ::std::option::Option<DateAndPlaceOfBirth1>,
7955 othr: ::std::vec::Vec<GenericPersonIdentification2>,
7956}
7957impl PersonIdentification18Builder {
7958 #[must_use]
7960 pub fn dt_and_plc_of_birth(
7961 mut self,
7962 value: DateAndPlaceOfBirth1,
7963 ) -> PersonIdentification18Builder {
7964 self.dt_and_plc_of_birth = ::std::option::Option::Some(value);
7965 self
7966 }
7967 #[must_use]
7969 pub fn othr(
7970 mut self,
7971 value: ::std::vec::Vec<GenericPersonIdentification2>,
7972 ) -> PersonIdentification18Builder {
7973 self.othr = value;
7974 self
7975 }
7976 #[must_use]
7978 pub fn add_othr(
7979 mut self,
7980 value: GenericPersonIdentification2,
7981 ) -> PersonIdentification18Builder {
7982 self.othr.push(value);
7983 self
7984 }
7985 pub fn build(
7997 self,
7998 ) -> ::std::result::Result<PersonIdentification18, crate::common::BuilderError> {
7999 ::std::result::Result::Ok(PersonIdentification18 {
8000 dt_and_plc_of_birth: self.dt_and_plc_of_birth,
8001 othr: self.othr,
8002 })
8003 }
8004}
8005impl PersonIdentification18 {
8006 #[must_use]
8008 pub fn builder() -> PersonIdentification18Builder {
8009 PersonIdentification18Builder::default()
8010 }
8011}
8012#[allow(clippy::large_enum_variant)]
8013#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8014pub enum PersonIdentificationSchemeName1Choice {
8015 #[serde(rename = "Cd")]
8016 Cd(ExternalPersonIdentification1Code),
8017 #[serde(rename = "Prtry")]
8018 Prtry(Max35Text),
8019}
8020#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8021pub struct PostalAddress27 {
8022 #[serde(rename = "AdrTp")]
8023 #[serde(skip_serializing_if = "Option::is_none")]
8024 pub adr_tp: Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
8025 #[serde(rename = "CareOf")]
8026 #[serde(skip_serializing_if = "Option::is_none")]
8027 pub care_of: Option<Max140Text>,
8028 #[serde(rename = "Dept")]
8029 #[serde(skip_serializing_if = "Option::is_none")]
8030 pub dept: Option<Max70Text>,
8031 #[serde(rename = "SubDept")]
8032 #[serde(skip_serializing_if = "Option::is_none")]
8033 pub sub_dept: Option<Max70Text>,
8034 #[serde(rename = "StrtNm")]
8035 #[serde(skip_serializing_if = "Option::is_none")]
8036 pub strt_nm: Option<Max140Text>,
8037 #[serde(rename = "BldgNb")]
8038 #[serde(skip_serializing_if = "Option::is_none")]
8039 pub bldg_nb: Option<Max16Text>,
8040 #[serde(rename = "BldgNm")]
8041 #[serde(skip_serializing_if = "Option::is_none")]
8042 pub bldg_nm: Option<Max140Text>,
8043 #[serde(rename = "Flr")]
8044 #[serde(skip_serializing_if = "Option::is_none")]
8045 pub flr: Option<Max70Text>,
8046 #[serde(rename = "UnitNb")]
8047 #[serde(skip_serializing_if = "Option::is_none")]
8048 pub unit_nb: Option<Max16Text>,
8049 #[serde(rename = "PstBx")]
8050 #[serde(skip_serializing_if = "Option::is_none")]
8051 pub pst_bx: Option<Max16Text>,
8052 #[serde(rename = "Room")]
8053 #[serde(skip_serializing_if = "Option::is_none")]
8054 pub room: Option<Max70Text>,
8055 #[serde(rename = "PstCd")]
8056 #[serde(skip_serializing_if = "Option::is_none")]
8057 pub pst_cd: Option<Max16Text>,
8058 #[serde(rename = "TwnNm")]
8059 #[serde(skip_serializing_if = "Option::is_none")]
8060 pub twn_nm: Option<Max140Text>,
8061 #[serde(rename = "TwnLctnNm")]
8062 #[serde(skip_serializing_if = "Option::is_none")]
8063 pub twn_lctn_nm: Option<Max140Text>,
8064 #[serde(rename = "DstrctNm")]
8065 #[serde(skip_serializing_if = "Option::is_none")]
8066 pub dstrct_nm: Option<Max140Text>,
8067 #[serde(rename = "CtrySubDvsn")]
8068 #[serde(skip_serializing_if = "Option::is_none")]
8069 pub ctry_sub_dvsn: Option<Max35Text>,
8070 #[serde(rename = "Ctry")]
8071 #[serde(skip_serializing_if = "Option::is_none")]
8072 pub ctry: Option<CountryCode>,
8073 #[serde(rename = "AdrLine")]
8074 #[serde(default)]
8076 #[serde(skip_serializing_if = "Vec::is_empty")]
8077 pub adr_line: Vec<Max70Text>,
8078}
8079#[allow(clippy::struct_field_names)]
8081#[derive(Default)]
8082pub struct PostalAddress27Builder {
8083 adr_tp: ::std::option::Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
8084 care_of: ::std::option::Option<Max140Text>,
8085 dept: ::std::option::Option<Max70Text>,
8086 sub_dept: ::std::option::Option<Max70Text>,
8087 strt_nm: ::std::option::Option<Max140Text>,
8088 bldg_nb: ::std::option::Option<Max16Text>,
8089 bldg_nm: ::std::option::Option<Max140Text>,
8090 flr: ::std::option::Option<Max70Text>,
8091 unit_nb: ::std::option::Option<Max16Text>,
8092 pst_bx: ::std::option::Option<Max16Text>,
8093 room: ::std::option::Option<Max70Text>,
8094 pst_cd: ::std::option::Option<Max16Text>,
8095 twn_nm: ::std::option::Option<Max140Text>,
8096 twn_lctn_nm: ::std::option::Option<Max140Text>,
8097 dstrct_nm: ::std::option::Option<Max140Text>,
8098 ctry_sub_dvsn: ::std::option::Option<Max35Text>,
8099 ctry: ::std::option::Option<CountryCode>,
8100 adr_line: ::std::vec::Vec<Max70Text>,
8101}
8102impl PostalAddress27Builder {
8103 #[must_use]
8105 pub fn adr_tp(
8106 mut self,
8107 value: crate::common::ChoiceWrapper<AddressType3Choice>,
8108 ) -> PostalAddress27Builder {
8109 self.adr_tp = ::std::option::Option::Some(value);
8110 self
8111 }
8112 #[must_use]
8114 pub fn care_of(mut self, value: Max140Text) -> PostalAddress27Builder {
8115 self.care_of = ::std::option::Option::Some(value);
8116 self
8117 }
8118 #[must_use]
8120 pub fn dept(mut self, value: Max70Text) -> PostalAddress27Builder {
8121 self.dept = ::std::option::Option::Some(value);
8122 self
8123 }
8124 #[must_use]
8126 pub fn sub_dept(mut self, value: Max70Text) -> PostalAddress27Builder {
8127 self.sub_dept = ::std::option::Option::Some(value);
8128 self
8129 }
8130 #[must_use]
8132 pub fn strt_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8133 self.strt_nm = ::std::option::Option::Some(value);
8134 self
8135 }
8136 #[must_use]
8138 pub fn bldg_nb(mut self, value: Max16Text) -> PostalAddress27Builder {
8139 self.bldg_nb = ::std::option::Option::Some(value);
8140 self
8141 }
8142 #[must_use]
8144 pub fn bldg_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8145 self.bldg_nm = ::std::option::Option::Some(value);
8146 self
8147 }
8148 #[must_use]
8150 pub fn flr(mut self, value: Max70Text) -> PostalAddress27Builder {
8151 self.flr = ::std::option::Option::Some(value);
8152 self
8153 }
8154 #[must_use]
8156 pub fn unit_nb(mut self, value: Max16Text) -> PostalAddress27Builder {
8157 self.unit_nb = ::std::option::Option::Some(value);
8158 self
8159 }
8160 #[must_use]
8162 pub fn pst_bx(mut self, value: Max16Text) -> PostalAddress27Builder {
8163 self.pst_bx = ::std::option::Option::Some(value);
8164 self
8165 }
8166 #[must_use]
8168 pub fn room(mut self, value: Max70Text) -> PostalAddress27Builder {
8169 self.room = ::std::option::Option::Some(value);
8170 self
8171 }
8172 #[must_use]
8174 pub fn pst_cd(mut self, value: Max16Text) -> PostalAddress27Builder {
8175 self.pst_cd = ::std::option::Option::Some(value);
8176 self
8177 }
8178 #[must_use]
8180 pub fn twn_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8181 self.twn_nm = ::std::option::Option::Some(value);
8182 self
8183 }
8184 #[must_use]
8186 pub fn twn_lctn_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8187 self.twn_lctn_nm = ::std::option::Option::Some(value);
8188 self
8189 }
8190 #[must_use]
8192 pub fn dstrct_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8193 self.dstrct_nm = ::std::option::Option::Some(value);
8194 self
8195 }
8196 #[must_use]
8198 pub fn ctry_sub_dvsn(mut self, value: Max35Text) -> PostalAddress27Builder {
8199 self.ctry_sub_dvsn = ::std::option::Option::Some(value);
8200 self
8201 }
8202 #[must_use]
8204 pub fn ctry(mut self, value: CountryCode) -> PostalAddress27Builder {
8205 self.ctry = ::std::option::Option::Some(value);
8206 self
8207 }
8208 #[must_use]
8210 pub fn adr_line(mut self, value: ::std::vec::Vec<Max70Text>) -> PostalAddress27Builder {
8211 self.adr_line = value;
8212 self
8213 }
8214 #[must_use]
8216 pub fn add_adr_line(mut self, value: Max70Text) -> PostalAddress27Builder {
8217 self.adr_line.push(value);
8218 self
8219 }
8220 pub fn build(self) -> ::std::result::Result<PostalAddress27, crate::common::BuilderError> {
8232 ::std::result::Result::Ok(PostalAddress27 {
8233 adr_tp: self.adr_tp,
8234 care_of: self.care_of,
8235 dept: self.dept,
8236 sub_dept: self.sub_dept,
8237 strt_nm: self.strt_nm,
8238 bldg_nb: self.bldg_nb,
8239 bldg_nm: self.bldg_nm,
8240 flr: self.flr,
8241 unit_nb: self.unit_nb,
8242 pst_bx: self.pst_bx,
8243 room: self.room,
8244 pst_cd: self.pst_cd,
8245 twn_nm: self.twn_nm,
8246 twn_lctn_nm: self.twn_lctn_nm,
8247 dstrct_nm: self.dstrct_nm,
8248 ctry_sub_dvsn: self.ctry_sub_dvsn,
8249 ctry: self.ctry,
8250 adr_line: self.adr_line,
8251 })
8252 }
8253}
8254impl PostalAddress27 {
8255 #[must_use]
8257 pub fn builder() -> PostalAddress27Builder {
8258 PostalAddress27Builder::default()
8259 }
8260}
8261#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8262pub struct ProxyAccountIdentification1 {
8263 #[serde(rename = "Tp")]
8264 #[serde(skip_serializing_if = "Option::is_none")]
8265 pub tp: Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
8266 #[serde(rename = "Id")]
8267 pub id: Max2048Text,
8268}
8269#[allow(clippy::struct_field_names)]
8271#[derive(Default)]
8272pub struct ProxyAccountIdentification1Builder {
8273 tp: ::std::option::Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
8274 id: ::std::option::Option<Max2048Text>,
8275}
8276impl ProxyAccountIdentification1Builder {
8277 #[must_use]
8279 pub fn tp(
8280 mut self,
8281 value: crate::common::ChoiceWrapper<ProxyAccountType1Choice>,
8282 ) -> ProxyAccountIdentification1Builder {
8283 self.tp = ::std::option::Option::Some(value);
8284 self
8285 }
8286 #[must_use]
8288 pub fn id(mut self, value: Max2048Text) -> ProxyAccountIdentification1Builder {
8289 self.id = ::std::option::Option::Some(value);
8290 self
8291 }
8292 pub fn build(
8304 self,
8305 ) -> ::std::result::Result<ProxyAccountIdentification1, crate::common::BuilderError> {
8306 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8307 if self.id.is_none() {
8308 missing.push("id".to_owned());
8309 }
8310 if !missing.is_empty() {
8311 return ::std::result::Result::Err(crate::common::BuilderError {
8312 type_name: "ProxyAccountIdentification1".to_owned(),
8313 missing_fields: missing,
8314 });
8315 }
8316 ::std::result::Result::Ok(ProxyAccountIdentification1 {
8317 tp: self.tp,
8318 id: self.id.unwrap(),
8319 })
8320 }
8321}
8322impl ProxyAccountIdentification1 {
8323 #[must_use]
8325 pub fn builder() -> ProxyAccountIdentification1Builder {
8326 ProxyAccountIdentification1Builder::default()
8327 }
8328}
8329#[allow(clippy::large_enum_variant)]
8330#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8331pub enum ProxyAccountType1Choice {
8332 #[serde(rename = "Cd")]
8333 Cd(ExternalProxyAccountType1Code),
8334 #[serde(rename = "Prtry")]
8335 Prtry(Max35Text),
8336}
8337#[allow(clippy::large_enum_variant)]
8338#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8339pub enum Purpose2Choice {
8340 #[serde(rename = "Cd")]
8341 Cd(ExternalPurpose1Code),
8342 #[serde(rename = "Prtry")]
8343 Prtry(Max35Text),
8344}
8345#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8346pub struct ReferredDocumentInformation8 {
8347 #[serde(rename = "Tp")]
8348 #[serde(skip_serializing_if = "Option::is_none")]
8349 pub tp: Option<DocumentType1>,
8350 #[serde(rename = "Nb")]
8351 #[serde(skip_serializing_if = "Option::is_none")]
8352 pub nb: Option<Max35Text>,
8353 #[serde(rename = "RltdDt")]
8354 #[serde(skip_serializing_if = "Option::is_none")]
8355 pub rltd_dt: Option<DateAndType1>,
8356 #[serde(rename = "LineDtls")]
8357 #[serde(default)]
8358 #[serde(skip_serializing_if = "Vec::is_empty")]
8359 pub line_dtls: Vec<DocumentLineInformation2>,
8360}
8361#[allow(clippy::struct_field_names)]
8363#[derive(Default)]
8364pub struct ReferredDocumentInformation8Builder {
8365 tp: ::std::option::Option<DocumentType1>,
8366 nb: ::std::option::Option<Max35Text>,
8367 rltd_dt: ::std::option::Option<DateAndType1>,
8368 line_dtls: ::std::vec::Vec<DocumentLineInformation2>,
8369}
8370impl ReferredDocumentInformation8Builder {
8371 #[must_use]
8373 pub fn tp(mut self, value: DocumentType1) -> ReferredDocumentInformation8Builder {
8374 self.tp = ::std::option::Option::Some(value);
8375 self
8376 }
8377 #[must_use]
8379 pub fn nb(mut self, value: Max35Text) -> ReferredDocumentInformation8Builder {
8380 self.nb = ::std::option::Option::Some(value);
8381 self
8382 }
8383 #[must_use]
8385 pub fn rltd_dt(mut self, value: DateAndType1) -> ReferredDocumentInformation8Builder {
8386 self.rltd_dt = ::std::option::Option::Some(value);
8387 self
8388 }
8389 #[must_use]
8391 pub fn line_dtls(
8392 mut self,
8393 value: ::std::vec::Vec<DocumentLineInformation2>,
8394 ) -> ReferredDocumentInformation8Builder {
8395 self.line_dtls = value;
8396 self
8397 }
8398 #[must_use]
8400 pub fn add_line_dtls(
8401 mut self,
8402 value: DocumentLineInformation2,
8403 ) -> ReferredDocumentInformation8Builder {
8404 self.line_dtls.push(value);
8405 self
8406 }
8407 pub fn build(
8419 self,
8420 ) -> ::std::result::Result<ReferredDocumentInformation8, crate::common::BuilderError> {
8421 ::std::result::Result::Ok(ReferredDocumentInformation8 {
8422 tp: self.tp,
8423 nb: self.nb,
8424 rltd_dt: self.rltd_dt,
8425 line_dtls: self.line_dtls,
8426 })
8427 }
8428}
8429impl ReferredDocumentInformation8 {
8430 #[must_use]
8432 pub fn builder() -> ReferredDocumentInformation8Builder {
8433 ReferredDocumentInformation8Builder::default()
8434 }
8435}
8436#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8437pub struct RemittanceAmount4 {
8438 #[serde(rename = "RmtAmtAndTp")]
8439 #[serde(default)]
8440 #[serde(skip_serializing_if = "Vec::is_empty")]
8441 pub rmt_amt_and_tp: Vec<DocumentAmount1>,
8442 #[serde(rename = "AdjstmntAmtAndRsn")]
8443 #[serde(default)]
8444 #[serde(skip_serializing_if = "Vec::is_empty")]
8445 pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
8446}
8447#[allow(clippy::struct_field_names)]
8449#[derive(Default)]
8450pub struct RemittanceAmount4Builder {
8451 rmt_amt_and_tp: ::std::vec::Vec<DocumentAmount1>,
8452 adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
8453}
8454impl RemittanceAmount4Builder {
8455 #[must_use]
8457 pub fn rmt_amt_and_tp(
8458 mut self,
8459 value: ::std::vec::Vec<DocumentAmount1>,
8460 ) -> RemittanceAmount4Builder {
8461 self.rmt_amt_and_tp = value;
8462 self
8463 }
8464 #[must_use]
8466 pub fn add_rmt_amt_and_tp(mut self, value: DocumentAmount1) -> RemittanceAmount4Builder {
8467 self.rmt_amt_and_tp.push(value);
8468 self
8469 }
8470 #[must_use]
8472 pub fn adjstmnt_amt_and_rsn(
8473 mut self,
8474 value: ::std::vec::Vec<DocumentAdjustment1>,
8475 ) -> RemittanceAmount4Builder {
8476 self.adjstmnt_amt_and_rsn = value;
8477 self
8478 }
8479 #[must_use]
8481 pub fn add_adjstmnt_amt_and_rsn(
8482 mut self,
8483 value: DocumentAdjustment1,
8484 ) -> RemittanceAmount4Builder {
8485 self.adjstmnt_amt_and_rsn.push(value);
8486 self
8487 }
8488 pub fn build(self) -> ::std::result::Result<RemittanceAmount4, crate::common::BuilderError> {
8500 ::std::result::Result::Ok(RemittanceAmount4 {
8501 rmt_amt_and_tp: self.rmt_amt_and_tp,
8502 adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
8503 })
8504 }
8505}
8506impl RemittanceAmount4 {
8507 #[must_use]
8509 pub fn builder() -> RemittanceAmount4Builder {
8510 RemittanceAmount4Builder::default()
8511 }
8512}
8513#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8514pub struct RemittanceInformation22 {
8515 #[serde(rename = "Ustrd")]
8516 #[serde(default)]
8517 #[serde(skip_serializing_if = "Vec::is_empty")]
8518 pub ustrd: Vec<Max140Text>,
8519 #[serde(rename = "Strd")]
8520 #[serde(default)]
8521 #[serde(skip_serializing_if = "Vec::is_empty")]
8522 pub strd: Vec<StructuredRemittanceInformation18>,
8523}
8524#[allow(clippy::struct_field_names)]
8526#[derive(Default)]
8527pub struct RemittanceInformation22Builder {
8528 ustrd: ::std::vec::Vec<Max140Text>,
8529 strd: ::std::vec::Vec<StructuredRemittanceInformation18>,
8530}
8531impl RemittanceInformation22Builder {
8532 #[must_use]
8534 pub fn ustrd(mut self, value: ::std::vec::Vec<Max140Text>) -> RemittanceInformation22Builder {
8535 self.ustrd = value;
8536 self
8537 }
8538 #[must_use]
8540 pub fn add_ustrd(mut self, value: Max140Text) -> RemittanceInformation22Builder {
8541 self.ustrd.push(value);
8542 self
8543 }
8544 #[must_use]
8546 pub fn strd(
8547 mut self,
8548 value: ::std::vec::Vec<StructuredRemittanceInformation18>,
8549 ) -> RemittanceInformation22Builder {
8550 self.strd = value;
8551 self
8552 }
8553 #[must_use]
8555 pub fn add_strd(
8556 mut self,
8557 value: StructuredRemittanceInformation18,
8558 ) -> RemittanceInformation22Builder {
8559 self.strd.push(value);
8560 self
8561 }
8562 pub fn build(
8574 self,
8575 ) -> ::std::result::Result<RemittanceInformation22, crate::common::BuilderError> {
8576 ::std::result::Result::Ok(RemittanceInformation22 {
8577 ustrd: self.ustrd,
8578 strd: self.strd,
8579 })
8580 }
8581}
8582impl RemittanceInformation22 {
8583 #[must_use]
8585 pub fn builder() -> RemittanceInformation22Builder {
8586 RemittanceInformation22Builder::default()
8587 }
8588}
8589#[allow(clippy::large_enum_variant)]
8590#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8591pub enum ServiceLevel8Choice {
8592 #[serde(rename = "Cd")]
8593 Cd(ExternalServiceLevel1Code),
8594 #[serde(rename = "Prtry")]
8595 Prtry(Max35Text),
8596}
8597#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8598pub struct SettlementInstruction15 {
8599 #[serde(rename = "SttlmMtd")]
8600 pub sttlm_mtd: SettlementMethod1Code,
8601 #[serde(rename = "SttlmAcct")]
8602 #[serde(skip_serializing_if = "Option::is_none")]
8603 pub sttlm_acct: Option<CashAccount40>,
8604 #[serde(rename = "ClrSys")]
8605 #[serde(skip_serializing_if = "Option::is_none")]
8606 pub clr_sys: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
8607 #[serde(rename = "InstgRmbrsmntAgt")]
8608 #[serde(skip_serializing_if = "Option::is_none")]
8609 pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
8610 #[serde(rename = "InstgRmbrsmntAgtAcct")]
8611 #[serde(skip_serializing_if = "Option::is_none")]
8612 pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
8613 #[serde(rename = "InstdRmbrsmntAgt")]
8614 #[serde(skip_serializing_if = "Option::is_none")]
8615 pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
8616 #[serde(rename = "InstdRmbrsmntAgtAcct")]
8617 #[serde(skip_serializing_if = "Option::is_none")]
8618 pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
8619 #[serde(rename = "ThrdRmbrsmntAgt")]
8620 #[serde(skip_serializing_if = "Option::is_none")]
8621 pub thrd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
8622 #[serde(rename = "ThrdRmbrsmntAgtAcct")]
8623 #[serde(skip_serializing_if = "Option::is_none")]
8624 pub thrd_rmbrsmnt_agt_acct: Option<CashAccount40>,
8625}
8626#[allow(clippy::struct_field_names)]
8628#[derive(Default)]
8629pub struct SettlementInstruction15Builder {
8630 sttlm_mtd: ::std::option::Option<SettlementMethod1Code>,
8631 sttlm_acct: ::std::option::Option<CashAccount40>,
8632 clr_sys:
8633 ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
8634 instg_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
8635 instg_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
8636 instd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
8637 instd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
8638 thrd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
8639 thrd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
8640}
8641impl SettlementInstruction15Builder {
8642 #[must_use]
8644 pub fn sttlm_mtd(mut self, value: SettlementMethod1Code) -> SettlementInstruction15Builder {
8645 self.sttlm_mtd = ::std::option::Option::Some(value);
8646 self
8647 }
8648 #[must_use]
8650 pub fn sttlm_acct(mut self, value: CashAccount40) -> SettlementInstruction15Builder {
8651 self.sttlm_acct = ::std::option::Option::Some(value);
8652 self
8653 }
8654 #[must_use]
8656 pub fn clr_sys(
8657 mut self,
8658 value: crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>,
8659 ) -> SettlementInstruction15Builder {
8660 self.clr_sys = ::std::option::Option::Some(value);
8661 self
8662 }
8663 #[must_use]
8665 pub fn instg_rmbrsmnt_agt(
8666 mut self,
8667 value: BranchAndFinancialInstitutionIdentification8,
8668 ) -> SettlementInstruction15Builder {
8669 self.instg_rmbrsmnt_agt = ::std::option::Option::Some(value);
8670 self
8671 }
8672 #[must_use]
8674 pub fn instg_rmbrsmnt_agt_acct(
8675 mut self,
8676 value: CashAccount40,
8677 ) -> SettlementInstruction15Builder {
8678 self.instg_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
8679 self
8680 }
8681 #[must_use]
8683 pub fn instd_rmbrsmnt_agt(
8684 mut self,
8685 value: BranchAndFinancialInstitutionIdentification8,
8686 ) -> SettlementInstruction15Builder {
8687 self.instd_rmbrsmnt_agt = ::std::option::Option::Some(value);
8688 self
8689 }
8690 #[must_use]
8692 pub fn instd_rmbrsmnt_agt_acct(
8693 mut self,
8694 value: CashAccount40,
8695 ) -> SettlementInstruction15Builder {
8696 self.instd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
8697 self
8698 }
8699 #[must_use]
8701 pub fn thrd_rmbrsmnt_agt(
8702 mut self,
8703 value: BranchAndFinancialInstitutionIdentification8,
8704 ) -> SettlementInstruction15Builder {
8705 self.thrd_rmbrsmnt_agt = ::std::option::Option::Some(value);
8706 self
8707 }
8708 #[must_use]
8710 pub fn thrd_rmbrsmnt_agt_acct(
8711 mut self,
8712 value: CashAccount40,
8713 ) -> SettlementInstruction15Builder {
8714 self.thrd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
8715 self
8716 }
8717 pub fn build(
8729 self,
8730 ) -> ::std::result::Result<SettlementInstruction15, crate::common::BuilderError> {
8731 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8732 if self.sttlm_mtd.is_none() {
8733 missing.push("sttlm_mtd".to_owned());
8734 }
8735 if !missing.is_empty() {
8736 return ::std::result::Result::Err(crate::common::BuilderError {
8737 type_name: "SettlementInstruction15".to_owned(),
8738 missing_fields: missing,
8739 });
8740 }
8741 ::std::result::Result::Ok(SettlementInstruction15 {
8742 sttlm_mtd: self.sttlm_mtd.unwrap(),
8743 sttlm_acct: self.sttlm_acct,
8744 clr_sys: self.clr_sys,
8745 instg_rmbrsmnt_agt: self.instg_rmbrsmnt_agt,
8746 instg_rmbrsmnt_agt_acct: self.instg_rmbrsmnt_agt_acct,
8747 instd_rmbrsmnt_agt: self.instd_rmbrsmnt_agt,
8748 instd_rmbrsmnt_agt_acct: self.instd_rmbrsmnt_agt_acct,
8749 thrd_rmbrsmnt_agt: self.thrd_rmbrsmnt_agt,
8750 thrd_rmbrsmnt_agt_acct: self.thrd_rmbrsmnt_agt_acct,
8751 })
8752 }
8753}
8754impl SettlementInstruction15 {
8755 #[must_use]
8757 pub fn builder() -> SettlementInstruction15Builder {
8758 SettlementInstruction15Builder::default()
8759 }
8760}
8761#[allow(clippy::large_enum_variant)]
8762#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8763pub enum StatusReason6Choice {
8764 #[serde(rename = "Cd")]
8765 Cd(ExternalStatusReason1Code),
8766 #[serde(rename = "Prtry")]
8767 Prtry(Max35Text),
8768}
8769#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8770pub struct StatusReasonInformation14 {
8771 #[serde(rename = "Orgtr")]
8772 #[serde(skip_serializing_if = "Option::is_none")]
8773 pub orgtr: Option<PartyIdentification272>,
8774 #[serde(rename = "Rsn")]
8775 #[serde(skip_serializing_if = "Option::is_none")]
8776 pub rsn: Option<crate::common::ChoiceWrapper<StatusReason6Choice>>,
8777 #[serde(rename = "AddtlInf")]
8778 #[serde(default)]
8779 #[serde(skip_serializing_if = "Vec::is_empty")]
8780 pub addtl_inf: Vec<Max105Text>,
8781}
8782#[allow(clippy::struct_field_names)]
8784#[derive(Default)]
8785pub struct StatusReasonInformation14Builder {
8786 orgtr: ::std::option::Option<PartyIdentification272>,
8787 rsn: ::std::option::Option<crate::common::ChoiceWrapper<StatusReason6Choice>>,
8788 addtl_inf: ::std::vec::Vec<Max105Text>,
8789}
8790impl StatusReasonInformation14Builder {
8791 #[must_use]
8793 pub fn orgtr(mut self, value: PartyIdentification272) -> StatusReasonInformation14Builder {
8794 self.orgtr = ::std::option::Option::Some(value);
8795 self
8796 }
8797 #[must_use]
8799 pub fn rsn(
8800 mut self,
8801 value: crate::common::ChoiceWrapper<StatusReason6Choice>,
8802 ) -> StatusReasonInformation14Builder {
8803 self.rsn = ::std::option::Option::Some(value);
8804 self
8805 }
8806 #[must_use]
8808 pub fn addtl_inf(
8809 mut self,
8810 value: ::std::vec::Vec<Max105Text>,
8811 ) -> StatusReasonInformation14Builder {
8812 self.addtl_inf = value;
8813 self
8814 }
8815 #[must_use]
8817 pub fn add_addtl_inf(mut self, value: Max105Text) -> StatusReasonInformation14Builder {
8818 self.addtl_inf.push(value);
8819 self
8820 }
8821 pub fn build(
8833 self,
8834 ) -> ::std::result::Result<StatusReasonInformation14, crate::common::BuilderError> {
8835 ::std::result::Result::Ok(StatusReasonInformation14 {
8836 orgtr: self.orgtr,
8837 rsn: self.rsn,
8838 addtl_inf: self.addtl_inf,
8839 })
8840 }
8841}
8842impl StatusReasonInformation14 {
8843 #[must_use]
8845 pub fn builder() -> StatusReasonInformation14Builder {
8846 StatusReasonInformation14Builder::default()
8847 }
8848}
8849#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8850pub struct StructuredRemittanceInformation18 {
8851 #[serde(rename = "RfrdDocInf")]
8852 #[serde(default)]
8853 #[serde(skip_serializing_if = "Vec::is_empty")]
8854 pub rfrd_doc_inf: Vec<ReferredDocumentInformation8>,
8855 #[serde(rename = "RfrdDocAmt")]
8856 #[serde(skip_serializing_if = "Option::is_none")]
8857 pub rfrd_doc_amt: Option<RemittanceAmount4>,
8858 #[serde(rename = "CdtrRefInf")]
8859 #[serde(skip_serializing_if = "Option::is_none")]
8860 pub cdtr_ref_inf: Option<CreditorReferenceInformation3>,
8861 #[serde(rename = "Invcr")]
8862 #[serde(skip_serializing_if = "Option::is_none")]
8863 pub invcr: Option<PartyIdentification272>,
8864 #[serde(rename = "Invcee")]
8865 #[serde(skip_serializing_if = "Option::is_none")]
8866 pub invcee: Option<PartyIdentification272>,
8867 #[serde(rename = "TaxRmt")]
8868 #[serde(skip_serializing_if = "Option::is_none")]
8869 pub tax_rmt: Option<TaxData1>,
8870 #[serde(rename = "GrnshmtRmt")]
8871 #[serde(skip_serializing_if = "Option::is_none")]
8872 pub grnshmt_rmt: Option<Garnishment4>,
8873 #[serde(rename = "AddtlRmtInf")]
8874 #[serde(default)]
8876 #[serde(skip_serializing_if = "Vec::is_empty")]
8877 pub addtl_rmt_inf: Vec<Max140Text>,
8878}
8879#[allow(clippy::struct_field_names)]
8881#[derive(Default)]
8882pub struct StructuredRemittanceInformation18Builder {
8883 rfrd_doc_inf: ::std::vec::Vec<ReferredDocumentInformation8>,
8884 rfrd_doc_amt: ::std::option::Option<RemittanceAmount4>,
8885 cdtr_ref_inf: ::std::option::Option<CreditorReferenceInformation3>,
8886 invcr: ::std::option::Option<PartyIdentification272>,
8887 invcee: ::std::option::Option<PartyIdentification272>,
8888 tax_rmt: ::std::option::Option<TaxData1>,
8889 grnshmt_rmt: ::std::option::Option<Garnishment4>,
8890 addtl_rmt_inf: ::std::vec::Vec<Max140Text>,
8891}
8892impl StructuredRemittanceInformation18Builder {
8893 #[must_use]
8895 pub fn rfrd_doc_inf(
8896 mut self,
8897 value: ::std::vec::Vec<ReferredDocumentInformation8>,
8898 ) -> StructuredRemittanceInformation18Builder {
8899 self.rfrd_doc_inf = value;
8900 self
8901 }
8902 #[must_use]
8904 pub fn add_rfrd_doc_inf(
8905 mut self,
8906 value: ReferredDocumentInformation8,
8907 ) -> StructuredRemittanceInformation18Builder {
8908 self.rfrd_doc_inf.push(value);
8909 self
8910 }
8911 #[must_use]
8913 pub fn rfrd_doc_amt(
8914 mut self,
8915 value: RemittanceAmount4,
8916 ) -> StructuredRemittanceInformation18Builder {
8917 self.rfrd_doc_amt = ::std::option::Option::Some(value);
8918 self
8919 }
8920 #[must_use]
8922 pub fn cdtr_ref_inf(
8923 mut self,
8924 value: CreditorReferenceInformation3,
8925 ) -> StructuredRemittanceInformation18Builder {
8926 self.cdtr_ref_inf = ::std::option::Option::Some(value);
8927 self
8928 }
8929 #[must_use]
8931 pub fn invcr(
8932 mut self,
8933 value: PartyIdentification272,
8934 ) -> StructuredRemittanceInformation18Builder {
8935 self.invcr = ::std::option::Option::Some(value);
8936 self
8937 }
8938 #[must_use]
8940 pub fn invcee(
8941 mut self,
8942 value: PartyIdentification272,
8943 ) -> StructuredRemittanceInformation18Builder {
8944 self.invcee = ::std::option::Option::Some(value);
8945 self
8946 }
8947 #[must_use]
8949 pub fn tax_rmt(mut self, value: TaxData1) -> StructuredRemittanceInformation18Builder {
8950 self.tax_rmt = ::std::option::Option::Some(value);
8951 self
8952 }
8953 #[must_use]
8955 pub fn grnshmt_rmt(mut self, value: Garnishment4) -> StructuredRemittanceInformation18Builder {
8956 self.grnshmt_rmt = ::std::option::Option::Some(value);
8957 self
8958 }
8959 #[must_use]
8961 pub fn addtl_rmt_inf(
8962 mut self,
8963 value: ::std::vec::Vec<Max140Text>,
8964 ) -> StructuredRemittanceInformation18Builder {
8965 self.addtl_rmt_inf = value;
8966 self
8967 }
8968 #[must_use]
8970 pub fn add_addtl_rmt_inf(
8971 mut self,
8972 value: Max140Text,
8973 ) -> StructuredRemittanceInformation18Builder {
8974 self.addtl_rmt_inf.push(value);
8975 self
8976 }
8977 pub fn build(
8989 self,
8990 ) -> ::std::result::Result<StructuredRemittanceInformation18, crate::common::BuilderError> {
8991 ::std::result::Result::Ok(StructuredRemittanceInformation18 {
8992 rfrd_doc_inf: self.rfrd_doc_inf,
8993 rfrd_doc_amt: self.rfrd_doc_amt,
8994 cdtr_ref_inf: self.cdtr_ref_inf,
8995 invcr: self.invcr,
8996 invcee: self.invcee,
8997 tax_rmt: self.tax_rmt,
8998 grnshmt_rmt: self.grnshmt_rmt,
8999 addtl_rmt_inf: self.addtl_rmt_inf,
9000 })
9001 }
9002}
9003impl StructuredRemittanceInformation18 {
9004 #[must_use]
9006 pub fn builder() -> StructuredRemittanceInformation18Builder {
9007 StructuredRemittanceInformation18Builder::default()
9008 }
9009}
9010#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9011pub struct SupplementaryData1 {
9012 #[serde(rename = "PlcAndNm")]
9013 #[serde(skip_serializing_if = "Option::is_none")]
9014 pub plc_and_nm: Option<Max350Text>,
9015 #[serde(rename = "Envlp")]
9016 pub envlp: SupplementaryDataEnvelope1,
9017}
9018#[allow(clippy::struct_field_names)]
9020#[derive(Default)]
9021pub struct SupplementaryData1Builder {
9022 plc_and_nm: ::std::option::Option<Max350Text>,
9023 envlp: ::std::option::Option<SupplementaryDataEnvelope1>,
9024}
9025impl SupplementaryData1Builder {
9026 #[must_use]
9028 pub fn plc_and_nm(mut self, value: Max350Text) -> SupplementaryData1Builder {
9029 self.plc_and_nm = ::std::option::Option::Some(value);
9030 self
9031 }
9032 #[must_use]
9034 pub fn envlp(mut self, value: SupplementaryDataEnvelope1) -> SupplementaryData1Builder {
9035 self.envlp = ::std::option::Option::Some(value);
9036 self
9037 }
9038 pub fn build(self) -> ::std::result::Result<SupplementaryData1, crate::common::BuilderError> {
9050 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9051 if self.envlp.is_none() {
9052 missing.push("envlp".to_owned());
9053 }
9054 if !missing.is_empty() {
9055 return ::std::result::Result::Err(crate::common::BuilderError {
9056 type_name: "SupplementaryData1".to_owned(),
9057 missing_fields: missing,
9058 });
9059 }
9060 ::std::result::Result::Ok(SupplementaryData1 {
9061 plc_and_nm: self.plc_and_nm,
9062 envlp: self.envlp.unwrap(),
9063 })
9064 }
9065}
9066impl SupplementaryData1 {
9067 #[must_use]
9069 pub fn builder() -> SupplementaryData1Builder {
9070 SupplementaryData1Builder::default()
9071 }
9072}
9073#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9075pub struct SupplementaryDataEnvelope1 {
9076 #[serde(rename = "$value")]
9077 pub value: String,
9078}
9079#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9080pub struct TaxAmount3 {
9081 #[serde(rename = "Rate")]
9082 #[serde(skip_serializing_if = "Option::is_none")]
9083 pub rate: Option<PercentageRate>,
9084 #[serde(rename = "TaxblBaseAmt")]
9085 #[serde(skip_serializing_if = "Option::is_none")]
9086 pub taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9087 #[serde(rename = "TtlAmt")]
9088 #[serde(skip_serializing_if = "Option::is_none")]
9089 pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9090 #[serde(rename = "Dtls")]
9091 #[serde(default)]
9092 #[serde(skip_serializing_if = "Vec::is_empty")]
9093 pub dtls: Vec<TaxRecordDetails3>,
9094}
9095#[allow(clippy::struct_field_names)]
9097#[derive(Default)]
9098pub struct TaxAmount3Builder {
9099 rate: ::std::option::Option<PercentageRate>,
9100 taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9101 ttl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9102 dtls: ::std::vec::Vec<TaxRecordDetails3>,
9103}
9104impl TaxAmount3Builder {
9105 #[must_use]
9107 pub fn rate(mut self, value: PercentageRate) -> TaxAmount3Builder {
9108 self.rate = ::std::option::Option::Some(value);
9109 self
9110 }
9111 #[must_use]
9113 pub fn taxbl_base_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
9114 self.taxbl_base_amt = ::std::option::Option::Some(value);
9115 self
9116 }
9117 #[must_use]
9119 pub fn ttl_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
9120 self.ttl_amt = ::std::option::Option::Some(value);
9121 self
9122 }
9123 #[must_use]
9125 pub fn dtls(mut self, value: ::std::vec::Vec<TaxRecordDetails3>) -> TaxAmount3Builder {
9126 self.dtls = value;
9127 self
9128 }
9129 #[must_use]
9131 pub fn add_dtls(mut self, value: TaxRecordDetails3) -> TaxAmount3Builder {
9132 self.dtls.push(value);
9133 self
9134 }
9135 pub fn build(self) -> ::std::result::Result<TaxAmount3, crate::common::BuilderError> {
9147 ::std::result::Result::Ok(TaxAmount3 {
9148 rate: self.rate,
9149 taxbl_base_amt: self.taxbl_base_amt,
9150 ttl_amt: self.ttl_amt,
9151 dtls: self.dtls,
9152 })
9153 }
9154}
9155impl TaxAmount3 {
9156 #[must_use]
9158 pub fn builder() -> TaxAmount3Builder {
9159 TaxAmount3Builder::default()
9160 }
9161}
9162#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9163pub struct TaxAuthorisation1 {
9164 #[serde(rename = "Titl")]
9165 #[serde(skip_serializing_if = "Option::is_none")]
9166 pub titl: Option<Max35Text>,
9167 #[serde(rename = "Nm")]
9168 #[serde(skip_serializing_if = "Option::is_none")]
9169 pub nm: Option<Max140Text>,
9170}
9171#[allow(clippy::struct_field_names)]
9173#[derive(Default)]
9174pub struct TaxAuthorisation1Builder {
9175 titl: ::std::option::Option<Max35Text>,
9176 nm: ::std::option::Option<Max140Text>,
9177}
9178impl TaxAuthorisation1Builder {
9179 #[must_use]
9181 pub fn titl(mut self, value: Max35Text) -> TaxAuthorisation1Builder {
9182 self.titl = ::std::option::Option::Some(value);
9183 self
9184 }
9185 #[must_use]
9187 pub fn nm(mut self, value: Max140Text) -> TaxAuthorisation1Builder {
9188 self.nm = ::std::option::Option::Some(value);
9189 self
9190 }
9191 pub fn build(self) -> ::std::result::Result<TaxAuthorisation1, crate::common::BuilderError> {
9203 ::std::result::Result::Ok(TaxAuthorisation1 {
9204 titl: self.titl,
9205 nm: self.nm,
9206 })
9207 }
9208}
9209impl TaxAuthorisation1 {
9210 #[must_use]
9212 pub fn builder() -> TaxAuthorisation1Builder {
9213 TaxAuthorisation1Builder::default()
9214 }
9215}
9216#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9217pub struct TaxData1 {
9218 #[serde(rename = "Cdtr")]
9219 #[serde(skip_serializing_if = "Option::is_none")]
9220 pub cdtr: Option<TaxParty1>,
9221 #[serde(rename = "Dbtr")]
9222 #[serde(skip_serializing_if = "Option::is_none")]
9223 pub dbtr: Option<TaxParty2>,
9224 #[serde(rename = "UltmtDbtr")]
9225 #[serde(skip_serializing_if = "Option::is_none")]
9226 pub ultmt_dbtr: Option<TaxParty2>,
9227 #[serde(rename = "AdmstnZone")]
9228 #[serde(skip_serializing_if = "Option::is_none")]
9229 pub admstn_zone: Option<Max35Text>,
9230 #[serde(rename = "RefNb")]
9231 #[serde(skip_serializing_if = "Option::is_none")]
9232 pub ref_nb: Option<Max140Text>,
9233 #[serde(rename = "Mtd")]
9234 #[serde(skip_serializing_if = "Option::is_none")]
9235 pub mtd: Option<Max35Text>,
9236 #[serde(rename = "TtlTaxblBaseAmt")]
9237 #[serde(skip_serializing_if = "Option::is_none")]
9238 pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9239 #[serde(rename = "TtlTaxAmt")]
9240 #[serde(skip_serializing_if = "Option::is_none")]
9241 pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9242 #[serde(rename = "Dt")]
9243 #[serde(skip_serializing_if = "Option::is_none")]
9244 pub dt: Option<ISODate>,
9245 #[serde(rename = "SeqNb")]
9246 #[serde(skip_serializing_if = "Option::is_none")]
9247 pub seq_nb: Option<Number>,
9248 #[serde(rename = "Rcrd")]
9249 #[serde(default)]
9250 #[serde(skip_serializing_if = "Vec::is_empty")]
9251 pub rcrd: Vec<TaxRecord3>,
9252}
9253#[allow(clippy::struct_field_names)]
9255#[derive(Default)]
9256pub struct TaxData1Builder {
9257 cdtr: ::std::option::Option<TaxParty1>,
9258 dbtr: ::std::option::Option<TaxParty2>,
9259 ultmt_dbtr: ::std::option::Option<TaxParty2>,
9260 admstn_zone: ::std::option::Option<Max35Text>,
9261 ref_nb: ::std::option::Option<Max140Text>,
9262 mtd: ::std::option::Option<Max35Text>,
9263 ttl_taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9264 ttl_tax_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9265 dt: ::std::option::Option<ISODate>,
9266 seq_nb: ::std::option::Option<Number>,
9267 rcrd: ::std::vec::Vec<TaxRecord3>,
9268}
9269impl TaxData1Builder {
9270 #[must_use]
9272 pub fn cdtr(mut self, value: TaxParty1) -> TaxData1Builder {
9273 self.cdtr = ::std::option::Option::Some(value);
9274 self
9275 }
9276 #[must_use]
9278 pub fn dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
9279 self.dbtr = ::std::option::Option::Some(value);
9280 self
9281 }
9282 #[must_use]
9284 pub fn ultmt_dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
9285 self.ultmt_dbtr = ::std::option::Option::Some(value);
9286 self
9287 }
9288 #[must_use]
9290 pub fn admstn_zone(mut self, value: Max35Text) -> TaxData1Builder {
9291 self.admstn_zone = ::std::option::Option::Some(value);
9292 self
9293 }
9294 #[must_use]
9296 pub fn ref_nb(mut self, value: Max140Text) -> TaxData1Builder {
9297 self.ref_nb = ::std::option::Option::Some(value);
9298 self
9299 }
9300 #[must_use]
9302 pub fn mtd(mut self, value: Max35Text) -> TaxData1Builder {
9303 self.mtd = ::std::option::Option::Some(value);
9304 self
9305 }
9306 #[must_use]
9308 pub fn ttl_taxbl_base_amt(
9309 mut self,
9310 value: ActiveOrHistoricCurrencyAndAmount,
9311 ) -> TaxData1Builder {
9312 self.ttl_taxbl_base_amt = ::std::option::Option::Some(value);
9313 self
9314 }
9315 #[must_use]
9317 pub fn ttl_tax_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxData1Builder {
9318 self.ttl_tax_amt = ::std::option::Option::Some(value);
9319 self
9320 }
9321 #[must_use]
9323 pub fn dt(mut self, value: ISODate) -> TaxData1Builder {
9324 self.dt = ::std::option::Option::Some(value);
9325 self
9326 }
9327 #[must_use]
9329 pub fn seq_nb(mut self, value: Number) -> TaxData1Builder {
9330 self.seq_nb = ::std::option::Option::Some(value);
9331 self
9332 }
9333 #[must_use]
9335 pub fn rcrd(mut self, value: ::std::vec::Vec<TaxRecord3>) -> TaxData1Builder {
9336 self.rcrd = value;
9337 self
9338 }
9339 #[must_use]
9341 pub fn add_rcrd(mut self, value: TaxRecord3) -> TaxData1Builder {
9342 self.rcrd.push(value);
9343 self
9344 }
9345 pub fn build(self) -> ::std::result::Result<TaxData1, crate::common::BuilderError> {
9357 ::std::result::Result::Ok(TaxData1 {
9358 cdtr: self.cdtr,
9359 dbtr: self.dbtr,
9360 ultmt_dbtr: self.ultmt_dbtr,
9361 admstn_zone: self.admstn_zone,
9362 ref_nb: self.ref_nb,
9363 mtd: self.mtd,
9364 ttl_taxbl_base_amt: self.ttl_taxbl_base_amt,
9365 ttl_tax_amt: self.ttl_tax_amt,
9366 dt: self.dt,
9367 seq_nb: self.seq_nb,
9368 rcrd: self.rcrd,
9369 })
9370 }
9371}
9372impl TaxData1 {
9373 #[must_use]
9375 pub fn builder() -> TaxData1Builder {
9376 TaxData1Builder::default()
9377 }
9378}
9379#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9380pub struct TaxParty1 {
9381 #[serde(rename = "TaxId")]
9382 #[serde(skip_serializing_if = "Option::is_none")]
9383 pub tax_id: Option<Max35Text>,
9384 #[serde(rename = "RegnId")]
9385 #[serde(skip_serializing_if = "Option::is_none")]
9386 pub regn_id: Option<Max35Text>,
9387 #[serde(rename = "TaxTp")]
9388 #[serde(skip_serializing_if = "Option::is_none")]
9389 pub tax_tp: Option<Max35Text>,
9390}
9391#[allow(clippy::struct_field_names)]
9393#[derive(Default)]
9394pub struct TaxParty1Builder {
9395 tax_id: ::std::option::Option<Max35Text>,
9396 regn_id: ::std::option::Option<Max35Text>,
9397 tax_tp: ::std::option::Option<Max35Text>,
9398}
9399impl TaxParty1Builder {
9400 #[must_use]
9402 pub fn tax_id(mut self, value: Max35Text) -> TaxParty1Builder {
9403 self.tax_id = ::std::option::Option::Some(value);
9404 self
9405 }
9406 #[must_use]
9408 pub fn regn_id(mut self, value: Max35Text) -> TaxParty1Builder {
9409 self.regn_id = ::std::option::Option::Some(value);
9410 self
9411 }
9412 #[must_use]
9414 pub fn tax_tp(mut self, value: Max35Text) -> TaxParty1Builder {
9415 self.tax_tp = ::std::option::Option::Some(value);
9416 self
9417 }
9418 pub fn build(self) -> ::std::result::Result<TaxParty1, crate::common::BuilderError> {
9430 ::std::result::Result::Ok(TaxParty1 {
9431 tax_id: self.tax_id,
9432 regn_id: self.regn_id,
9433 tax_tp: self.tax_tp,
9434 })
9435 }
9436}
9437impl TaxParty1 {
9438 #[must_use]
9440 pub fn builder() -> TaxParty1Builder {
9441 TaxParty1Builder::default()
9442 }
9443}
9444#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9445pub struct TaxParty2 {
9446 #[serde(rename = "TaxId")]
9447 #[serde(skip_serializing_if = "Option::is_none")]
9448 pub tax_id: Option<Max35Text>,
9449 #[serde(rename = "RegnId")]
9450 #[serde(skip_serializing_if = "Option::is_none")]
9451 pub regn_id: Option<Max35Text>,
9452 #[serde(rename = "TaxTp")]
9453 #[serde(skip_serializing_if = "Option::is_none")]
9454 pub tax_tp: Option<Max35Text>,
9455 #[serde(rename = "Authstn")]
9456 #[serde(skip_serializing_if = "Option::is_none")]
9457 pub authstn: Option<TaxAuthorisation1>,
9458}
9459#[allow(clippy::struct_field_names)]
9461#[derive(Default)]
9462pub struct TaxParty2Builder {
9463 tax_id: ::std::option::Option<Max35Text>,
9464 regn_id: ::std::option::Option<Max35Text>,
9465 tax_tp: ::std::option::Option<Max35Text>,
9466 authstn: ::std::option::Option<TaxAuthorisation1>,
9467}
9468impl TaxParty2Builder {
9469 #[must_use]
9471 pub fn tax_id(mut self, value: Max35Text) -> TaxParty2Builder {
9472 self.tax_id = ::std::option::Option::Some(value);
9473 self
9474 }
9475 #[must_use]
9477 pub fn regn_id(mut self, value: Max35Text) -> TaxParty2Builder {
9478 self.regn_id = ::std::option::Option::Some(value);
9479 self
9480 }
9481 #[must_use]
9483 pub fn tax_tp(mut self, value: Max35Text) -> TaxParty2Builder {
9484 self.tax_tp = ::std::option::Option::Some(value);
9485 self
9486 }
9487 #[must_use]
9489 pub fn authstn(mut self, value: TaxAuthorisation1) -> TaxParty2Builder {
9490 self.authstn = ::std::option::Option::Some(value);
9491 self
9492 }
9493 pub fn build(self) -> ::std::result::Result<TaxParty2, crate::common::BuilderError> {
9505 ::std::result::Result::Ok(TaxParty2 {
9506 tax_id: self.tax_id,
9507 regn_id: self.regn_id,
9508 tax_tp: self.tax_tp,
9509 authstn: self.authstn,
9510 })
9511 }
9512}
9513impl TaxParty2 {
9514 #[must_use]
9516 pub fn builder() -> TaxParty2Builder {
9517 TaxParty2Builder::default()
9518 }
9519}
9520#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9521pub struct TaxPeriod3 {
9522 #[serde(rename = "Yr")]
9523 #[serde(skip_serializing_if = "Option::is_none")]
9524 pub yr: Option<ISOYear>,
9525 #[serde(rename = "Tp")]
9526 #[serde(skip_serializing_if = "Option::is_none")]
9527 pub tp: Option<TaxRecordPeriod1Code>,
9528 #[serde(rename = "FrToDt")]
9529 #[serde(skip_serializing_if = "Option::is_none")]
9530 pub fr_to_dt: Option<DatePeriod2>,
9531}
9532#[allow(clippy::struct_field_names)]
9534#[derive(Default)]
9535pub struct TaxPeriod3Builder {
9536 yr: ::std::option::Option<ISOYear>,
9537 tp: ::std::option::Option<TaxRecordPeriod1Code>,
9538 fr_to_dt: ::std::option::Option<DatePeriod2>,
9539}
9540impl TaxPeriod3Builder {
9541 #[must_use]
9543 pub fn yr(mut self, value: ISOYear) -> TaxPeriod3Builder {
9544 self.yr = ::std::option::Option::Some(value);
9545 self
9546 }
9547 #[must_use]
9549 pub fn tp(mut self, value: TaxRecordPeriod1Code) -> TaxPeriod3Builder {
9550 self.tp = ::std::option::Option::Some(value);
9551 self
9552 }
9553 #[must_use]
9555 pub fn fr_to_dt(mut self, value: DatePeriod2) -> TaxPeriod3Builder {
9556 self.fr_to_dt = ::std::option::Option::Some(value);
9557 self
9558 }
9559 pub fn build(self) -> ::std::result::Result<TaxPeriod3, crate::common::BuilderError> {
9571 ::std::result::Result::Ok(TaxPeriod3 {
9572 yr: self.yr,
9573 tp: self.tp,
9574 fr_to_dt: self.fr_to_dt,
9575 })
9576 }
9577}
9578impl TaxPeriod3 {
9579 #[must_use]
9581 pub fn builder() -> TaxPeriod3Builder {
9582 TaxPeriod3Builder::default()
9583 }
9584}
9585#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9586pub struct TaxRecord3 {
9587 #[serde(rename = "Tp")]
9588 #[serde(skip_serializing_if = "Option::is_none")]
9589 pub tp: Option<Max35Text>,
9590 #[serde(rename = "Ctgy")]
9591 #[serde(skip_serializing_if = "Option::is_none")]
9592 pub ctgy: Option<Max35Text>,
9593 #[serde(rename = "CtgyDtls")]
9594 #[serde(skip_serializing_if = "Option::is_none")]
9595 pub ctgy_dtls: Option<Max35Text>,
9596 #[serde(rename = "DbtrSts")]
9597 #[serde(skip_serializing_if = "Option::is_none")]
9598 pub dbtr_sts: Option<Max35Text>,
9599 #[serde(rename = "CertId")]
9600 #[serde(skip_serializing_if = "Option::is_none")]
9601 pub cert_id: Option<Max35Text>,
9602 #[serde(rename = "FrmsCd")]
9603 #[serde(skip_serializing_if = "Option::is_none")]
9604 pub frms_cd: Option<Max35Text>,
9605 #[serde(rename = "Prd")]
9606 #[serde(skip_serializing_if = "Option::is_none")]
9607 pub prd: Option<TaxPeriod3>,
9608 #[serde(rename = "TaxAmt")]
9609 #[serde(skip_serializing_if = "Option::is_none")]
9610 pub tax_amt: Option<TaxAmount3>,
9611 #[serde(rename = "AddtlInf")]
9612 #[serde(skip_serializing_if = "Option::is_none")]
9613 pub addtl_inf: Option<Max140Text>,
9614}
9615#[allow(clippy::struct_field_names)]
9617#[derive(Default)]
9618pub struct TaxRecord3Builder {
9619 tp: ::std::option::Option<Max35Text>,
9620 ctgy: ::std::option::Option<Max35Text>,
9621 ctgy_dtls: ::std::option::Option<Max35Text>,
9622 dbtr_sts: ::std::option::Option<Max35Text>,
9623 cert_id: ::std::option::Option<Max35Text>,
9624 frms_cd: ::std::option::Option<Max35Text>,
9625 prd: ::std::option::Option<TaxPeriod3>,
9626 tax_amt: ::std::option::Option<TaxAmount3>,
9627 addtl_inf: ::std::option::Option<Max140Text>,
9628}
9629impl TaxRecord3Builder {
9630 #[must_use]
9632 pub fn tp(mut self, value: Max35Text) -> TaxRecord3Builder {
9633 self.tp = ::std::option::Option::Some(value);
9634 self
9635 }
9636 #[must_use]
9638 pub fn ctgy(mut self, value: Max35Text) -> TaxRecord3Builder {
9639 self.ctgy = ::std::option::Option::Some(value);
9640 self
9641 }
9642 #[must_use]
9644 pub fn ctgy_dtls(mut self, value: Max35Text) -> TaxRecord3Builder {
9645 self.ctgy_dtls = ::std::option::Option::Some(value);
9646 self
9647 }
9648 #[must_use]
9650 pub fn dbtr_sts(mut self, value: Max35Text) -> TaxRecord3Builder {
9651 self.dbtr_sts = ::std::option::Option::Some(value);
9652 self
9653 }
9654 #[must_use]
9656 pub fn cert_id(mut self, value: Max35Text) -> TaxRecord3Builder {
9657 self.cert_id = ::std::option::Option::Some(value);
9658 self
9659 }
9660 #[must_use]
9662 pub fn frms_cd(mut self, value: Max35Text) -> TaxRecord3Builder {
9663 self.frms_cd = ::std::option::Option::Some(value);
9664 self
9665 }
9666 #[must_use]
9668 pub fn prd(mut self, value: TaxPeriod3) -> TaxRecord3Builder {
9669 self.prd = ::std::option::Option::Some(value);
9670 self
9671 }
9672 #[must_use]
9674 pub fn tax_amt(mut self, value: TaxAmount3) -> TaxRecord3Builder {
9675 self.tax_amt = ::std::option::Option::Some(value);
9676 self
9677 }
9678 #[must_use]
9680 pub fn addtl_inf(mut self, value: Max140Text) -> TaxRecord3Builder {
9681 self.addtl_inf = ::std::option::Option::Some(value);
9682 self
9683 }
9684 pub fn build(self) -> ::std::result::Result<TaxRecord3, crate::common::BuilderError> {
9696 ::std::result::Result::Ok(TaxRecord3 {
9697 tp: self.tp,
9698 ctgy: self.ctgy,
9699 ctgy_dtls: self.ctgy_dtls,
9700 dbtr_sts: self.dbtr_sts,
9701 cert_id: self.cert_id,
9702 frms_cd: self.frms_cd,
9703 prd: self.prd,
9704 tax_amt: self.tax_amt,
9705 addtl_inf: self.addtl_inf,
9706 })
9707 }
9708}
9709impl TaxRecord3 {
9710 #[must_use]
9712 pub fn builder() -> TaxRecord3Builder {
9713 TaxRecord3Builder::default()
9714 }
9715}
9716#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9717pub struct TaxRecordDetails3 {
9718 #[serde(rename = "Prd")]
9719 #[serde(skip_serializing_if = "Option::is_none")]
9720 pub prd: Option<TaxPeriod3>,
9721 #[serde(rename = "Amt")]
9722 pub amt: ActiveOrHistoricCurrencyAndAmount,
9723}
9724#[allow(clippy::struct_field_names)]
9726#[derive(Default)]
9727pub struct TaxRecordDetails3Builder {
9728 prd: ::std::option::Option<TaxPeriod3>,
9729 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9730}
9731impl TaxRecordDetails3Builder {
9732 #[must_use]
9734 pub fn prd(mut self, value: TaxPeriod3) -> TaxRecordDetails3Builder {
9735 self.prd = ::std::option::Option::Some(value);
9736 self
9737 }
9738 #[must_use]
9740 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxRecordDetails3Builder {
9741 self.amt = ::std::option::Option::Some(value);
9742 self
9743 }
9744 pub fn build(self) -> ::std::result::Result<TaxRecordDetails3, crate::common::BuilderError> {
9756 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9757 if self.amt.is_none() {
9758 missing.push("amt".to_owned());
9759 }
9760 if !missing.is_empty() {
9761 return ::std::result::Result::Err(crate::common::BuilderError {
9762 type_name: "TaxRecordDetails3".to_owned(),
9763 missing_fields: missing,
9764 });
9765 }
9766 ::std::result::Result::Ok(TaxRecordDetails3 {
9767 prd: self.prd,
9768 amt: self.amt.unwrap(),
9769 })
9770 }
9771}
9772impl TaxRecordDetails3 {
9773 #[must_use]
9775 pub fn builder() -> TaxRecordDetails3Builder {
9776 TaxRecordDetails3Builder::default()
9777 }
9778}
9779impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmountSimpleType {
9780 #[allow(clippy::unreadable_literal)]
9781 fn validate_constraints(
9782 &self,
9783 path: &str,
9784 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9785 ) {
9786 {
9787 let value: &str = &self.0;
9788 let frac_count = value.find('.').map_or(0, |dot| {
9789 value[dot + 1..]
9790 .chars()
9791 .filter(char::is_ascii_digit)
9792 .count()
9793 });
9794 let violated = frac_count > 5usize;
9795 if violated {
9796 violations.push(crate::common::validate::ConstraintViolation {
9797 path: path.to_string(),
9798 message: format!(
9799 "{} (got {})",
9800 "value exceeds maximum fraction digits 5", frac_count
9801 ),
9802 kind: crate::common::validate::ConstraintKind::FractionDigits,
9803 });
9804 }
9805 }
9806 {
9807 let value: &str = &self.0;
9808 let digit_count = value.chars().filter(char::is_ascii_digit).count();
9809 let violated = digit_count > 18usize;
9810 if violated {
9811 violations.push(crate::common::validate::ConstraintViolation {
9812 path: path.to_string(),
9813 message: format!(
9814 "{} (got {})",
9815 "value exceeds maximum total digits 18", digit_count
9816 ),
9817 kind: crate::common::validate::ConstraintKind::TotalDigits,
9818 });
9819 }
9820 }
9821 }
9822}
9823impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyCode {
9824 #[allow(clippy::unreadable_literal)]
9825 fn validate_constraints(
9826 &self,
9827 path: &str,
9828 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9829 ) {
9830 {
9831 let value: &str = &self.0;
9832 let violated = {
9833 let bytes = value.as_bytes();
9834 bytes.len() != 3usize
9835 || ({
9836 let b = bytes[0usize];
9837 !(65u8..=90u8).contains(&b)
9838 })
9839 || ({
9840 let b = bytes[1usize];
9841 !(65u8..=90u8).contains(&b)
9842 })
9843 || ({
9844 let b = bytes[2usize];
9845 !(65u8..=90u8).contains(&b)
9846 })
9847 };
9848 if violated {
9849 violations.push(crate::common::validate::ConstraintViolation {
9850 path: path.to_string(),
9851 message: "value does not match pattern [A-Z]{3,3}".to_string(),
9852 kind: crate::common::validate::ConstraintKind::Pattern,
9853 });
9854 }
9855 }
9856 }
9857}
9858impl crate::common::validate::Validatable for AddressType2Code {
9859 fn validate_constraints(
9860 &self,
9861 _path: &str,
9862 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9863 ) {
9864 }
9865}
9866impl crate::common::validate::Validatable for AnyBICDec2014Identifier {
9867 #[allow(clippy::unreadable_literal)]
9868 fn validate_constraints(
9869 &self,
9870 path: &str,
9871 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9872 ) {
9873 {
9874 let value: &str = &self.0;
9875 let violated = {
9876 let bytes = value.as_bytes();
9877 let len = bytes.len();
9878 let result: bool = (|| -> bool {
9879 let mut pos: usize = 0;
9880 if !(8usize..=11usize).contains(&len) {
9881 return true;
9882 }
9883 {
9884 let end = pos + 4usize;
9885 if end > len {
9886 return true;
9887 }
9888 for &b in &bytes[pos..end] {
9889 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9890 return true;
9891 }
9892 }
9893 pos = end;
9894 }
9895 {
9896 let end = pos + 2usize;
9897 if end > len {
9898 return true;
9899 }
9900 for &b in &bytes[pos..end] {
9901 if !(65u8..=90u8).contains(&b) {
9902 return true;
9903 }
9904 }
9905 pos = end;
9906 }
9907 {
9908 let end = pos + 2usize;
9909 if end > len {
9910 return true;
9911 }
9912 for &b in &bytes[pos..end] {
9913 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9914 return true;
9915 }
9916 }
9917 pos = end;
9918 }
9919 {
9920 let saved = pos;
9921 let matched: bool = (|| -> bool {
9922 {
9923 let end = pos + 3usize;
9924 if end > len {
9925 return true;
9926 }
9927 for &b in &bytes[pos..end] {
9928 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9929 return true;
9930 }
9931 }
9932 pos = end;
9933 }
9934 false
9935 })();
9936 if matched {
9937 pos = saved;
9938 }
9939 }
9940 if pos != len {
9941 return true;
9942 }
9943 false
9944 })();
9945 result
9946 };
9947 if violated {
9948 violations
9949 .push(crate::common::validate::ConstraintViolation {
9950 path: path.to_string(),
9951 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}"
9952 .to_string(),
9953 kind: crate::common::validate::ConstraintKind::Pattern,
9954 });
9955 }
9956 }
9957 }
9958}
9959impl crate::common::validate::Validatable for BICFIDec2014Identifier {
9960 #[allow(clippy::unreadable_literal)]
9961 fn validate_constraints(
9962 &self,
9963 path: &str,
9964 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9965 ) {
9966 {
9967 let value: &str = &self.0;
9968 let violated = {
9969 let bytes = value.as_bytes();
9970 let len = bytes.len();
9971 let result: bool = (|| -> bool {
9972 let mut pos: usize = 0;
9973 if !(8usize..=11usize).contains(&len) {
9974 return true;
9975 }
9976 {
9977 let end = pos + 4usize;
9978 if end > len {
9979 return true;
9980 }
9981 for &b in &bytes[pos..end] {
9982 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9983 return true;
9984 }
9985 }
9986 pos = end;
9987 }
9988 {
9989 let end = pos + 2usize;
9990 if end > len {
9991 return true;
9992 }
9993 for &b in &bytes[pos..end] {
9994 if !(65u8..=90u8).contains(&b) {
9995 return true;
9996 }
9997 }
9998 pos = end;
9999 }
10000 {
10001 let end = pos + 2usize;
10002 if end > len {
10003 return true;
10004 }
10005 for &b in &bytes[pos..end] {
10006 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10007 return true;
10008 }
10009 }
10010 pos = end;
10011 }
10012 {
10013 let saved = pos;
10014 let matched: bool = (|| -> bool {
10015 {
10016 let end = pos + 3usize;
10017 if end > len {
10018 return true;
10019 }
10020 for &b in &bytes[pos..end] {
10021 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10022 return true;
10023 }
10024 }
10025 pos = end;
10026 }
10027 false
10028 })();
10029 if matched {
10030 pos = saved;
10031 }
10032 }
10033 if pos != len {
10034 return true;
10035 }
10036 false
10037 })();
10038 result
10039 };
10040 if violated {
10041 violations
10042 .push(crate::common::validate::ConstraintViolation {
10043 path: path.to_string(),
10044 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}"
10045 .to_string(),
10046 kind: crate::common::validate::ConstraintKind::Pattern,
10047 });
10048 }
10049 }
10050 }
10051}
10052impl crate::common::validate::Validatable for ClearingChannel2Code {
10053 fn validate_constraints(
10054 &self,
10055 _path: &str,
10056 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10057 ) {
10058 }
10059}
10060impl crate::common::validate::Validatable for CountryCode {
10061 #[allow(clippy::unreadable_literal)]
10062 fn validate_constraints(
10063 &self,
10064 path: &str,
10065 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10066 ) {
10067 {
10068 let value: &str = &self.0;
10069 let violated = {
10070 let bytes = value.as_bytes();
10071 bytes.len() != 2usize
10072 || ({
10073 let b = bytes[0usize];
10074 !(65u8..=90u8).contains(&b)
10075 })
10076 || ({
10077 let b = bytes[1usize];
10078 !(65u8..=90u8).contains(&b)
10079 })
10080 };
10081 if violated {
10082 violations.push(crate::common::validate::ConstraintViolation {
10083 path: path.to_string(),
10084 message: "value does not match pattern [A-Z]{2,2}".to_string(),
10085 kind: crate::common::validate::ConstraintKind::Pattern,
10086 });
10087 }
10088 }
10089 }
10090}
10091impl crate::common::validate::Validatable for CreditDebitCode {
10092 fn validate_constraints(
10093 &self,
10094 _path: &str,
10095 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10096 ) {
10097 }
10098}
10099impl crate::common::validate::Validatable for DecimalNumber {
10100 #[allow(clippy::unreadable_literal)]
10101 fn validate_constraints(
10102 &self,
10103 path: &str,
10104 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10105 ) {
10106 {
10107 let value: &str = &self.0;
10108 let frac_count = value.find('.').map_or(0, |dot| {
10109 value[dot + 1..]
10110 .chars()
10111 .filter(char::is_ascii_digit)
10112 .count()
10113 });
10114 let violated = frac_count > 17usize;
10115 if violated {
10116 violations.push(crate::common::validate::ConstraintViolation {
10117 path: path.to_string(),
10118 message: format!(
10119 "{} (got {})",
10120 "value exceeds maximum fraction digits 17", frac_count
10121 ),
10122 kind: crate::common::validate::ConstraintKind::FractionDigits,
10123 });
10124 }
10125 }
10126 {
10127 let value: &str = &self.0;
10128 let digit_count = value.chars().filter(char::is_ascii_digit).count();
10129 let violated = digit_count > 18usize;
10130 if violated {
10131 violations.push(crate::common::validate::ConstraintViolation {
10132 path: path.to_string(),
10133 message: format!(
10134 "{} (got {})",
10135 "value exceeds maximum total digits 18", digit_count
10136 ),
10137 kind: crate::common::validate::ConstraintKind::TotalDigits,
10138 });
10139 }
10140 }
10141 }
10142}
10143impl crate::common::validate::Validatable for Exact2NumericText {
10144 #[allow(clippy::unreadable_literal)]
10145 fn validate_constraints(
10146 &self,
10147 path: &str,
10148 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10149 ) {
10150 {
10151 let value: &str = &self.0;
10152 let violated = {
10153 let bytes = value.as_bytes();
10154 bytes.len() != 2usize
10155 || ({
10156 let b = bytes[0usize];
10157 !(48u8..=57u8).contains(&b)
10158 })
10159 || ({
10160 let b = bytes[1usize];
10161 !(48u8..=57u8).contains(&b)
10162 })
10163 };
10164 if violated {
10165 violations.push(crate::common::validate::ConstraintViolation {
10166 path: path.to_string(),
10167 message: "value does not match pattern [0-9]{2}".to_string(),
10168 kind: crate::common::validate::ConstraintKind::Pattern,
10169 });
10170 }
10171 }
10172 }
10173}
10174impl crate::common::validate::Validatable for Exact4AlphaNumericText {
10175 #[allow(clippy::unreadable_literal)]
10176 fn validate_constraints(
10177 &self,
10178 path: &str,
10179 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10180 ) {
10181 {
10182 let value: &str = &self.0;
10183 let violated = {
10184 let bytes = value.as_bytes();
10185 bytes.len() != 4usize
10186 || ({
10187 let b = bytes[0usize];
10188 !(97u8..=122u8).contains(&b)
10189 && !(65u8..=90u8).contains(&b)
10190 && !(48u8..=57u8).contains(&b)
10191 })
10192 || ({
10193 let b = bytes[1usize];
10194 !(97u8..=122u8).contains(&b)
10195 && !(65u8..=90u8).contains(&b)
10196 && !(48u8..=57u8).contains(&b)
10197 })
10198 || ({
10199 let b = bytes[2usize];
10200 !(97u8..=122u8).contains(&b)
10201 && !(65u8..=90u8).contains(&b)
10202 && !(48u8..=57u8).contains(&b)
10203 })
10204 || ({
10205 let b = bytes[3usize];
10206 !(97u8..=122u8).contains(&b)
10207 && !(65u8..=90u8).contains(&b)
10208 && !(48u8..=57u8).contains(&b)
10209 })
10210 };
10211 if violated {
10212 violations.push(crate::common::validate::ConstraintViolation {
10213 path: path.to_string(),
10214 message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
10215 kind: crate::common::validate::ConstraintKind::Pattern,
10216 });
10217 }
10218 }
10219 }
10220}
10221impl crate::common::validate::Validatable for ExternalAccountIdentification1Code {
10222 #[allow(clippy::unreadable_literal)]
10223 fn validate_constraints(
10224 &self,
10225 path: &str,
10226 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10227 ) {
10228 let len = self.0.chars().count();
10229 {
10230 let violated = len < 1usize;
10231 if violated {
10232 violations.push(crate::common::validate::ConstraintViolation {
10233 path: path.to_string(),
10234 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10235 kind: crate::common::validate::ConstraintKind::MinLength,
10236 });
10237 }
10238 }
10239 {
10240 let violated = len > 4usize;
10241 if violated {
10242 violations.push(crate::common::validate::ConstraintViolation {
10243 path: path.to_string(),
10244 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10245 kind: crate::common::validate::ConstraintKind::MaxLength,
10246 });
10247 }
10248 }
10249 }
10250}
10251impl crate::common::validate::Validatable for ExternalCashAccountType1Code {
10252 #[allow(clippy::unreadable_literal)]
10253 fn validate_constraints(
10254 &self,
10255 path: &str,
10256 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10257 ) {
10258 let len = self.0.chars().count();
10259 {
10260 let violated = len < 1usize;
10261 if violated {
10262 violations.push(crate::common::validate::ConstraintViolation {
10263 path: path.to_string(),
10264 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10265 kind: crate::common::validate::ConstraintKind::MinLength,
10266 });
10267 }
10268 }
10269 {
10270 let violated = len > 4usize;
10271 if violated {
10272 violations.push(crate::common::validate::ConstraintViolation {
10273 path: path.to_string(),
10274 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10275 kind: crate::common::validate::ConstraintKind::MaxLength,
10276 });
10277 }
10278 }
10279 }
10280}
10281impl crate::common::validate::Validatable for ExternalCashClearingSystem1Code {
10282 #[allow(clippy::unreadable_literal)]
10283 fn validate_constraints(
10284 &self,
10285 path: &str,
10286 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10287 ) {
10288 let len = self.0.chars().count();
10289 {
10290 let violated = len < 1usize;
10291 if violated {
10292 violations.push(crate::common::validate::ConstraintViolation {
10293 path: path.to_string(),
10294 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10295 kind: crate::common::validate::ConstraintKind::MinLength,
10296 });
10297 }
10298 }
10299 {
10300 let violated = len > 3usize;
10301 if violated {
10302 violations.push(crate::common::validate::ConstraintViolation {
10303 path: path.to_string(),
10304 message: format!("{} (got {})", "value exceeds maximum length 3", len),
10305 kind: crate::common::validate::ConstraintKind::MaxLength,
10306 });
10307 }
10308 }
10309 }
10310}
10311impl crate::common::validate::Validatable for ExternalCategoryPurpose1Code {
10312 #[allow(clippy::unreadable_literal)]
10313 fn validate_constraints(
10314 &self,
10315 path: &str,
10316 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10317 ) {
10318 let len = self.0.chars().count();
10319 {
10320 let violated = len < 1usize;
10321 if violated {
10322 violations.push(crate::common::validate::ConstraintViolation {
10323 path: path.to_string(),
10324 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10325 kind: crate::common::validate::ConstraintKind::MinLength,
10326 });
10327 }
10328 }
10329 {
10330 let violated = len > 4usize;
10331 if violated {
10332 violations.push(crate::common::validate::ConstraintViolation {
10333 path: path.to_string(),
10334 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10335 kind: crate::common::validate::ConstraintKind::MaxLength,
10336 });
10337 }
10338 }
10339 }
10340}
10341impl crate::common::validate::Validatable for ExternalChargeType1Code {
10342 #[allow(clippy::unreadable_literal)]
10343 fn validate_constraints(
10344 &self,
10345 path: &str,
10346 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10347 ) {
10348 let len = self.0.chars().count();
10349 {
10350 let violated = len < 1usize;
10351 if violated {
10352 violations.push(crate::common::validate::ConstraintViolation {
10353 path: path.to_string(),
10354 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10355 kind: crate::common::validate::ConstraintKind::MinLength,
10356 });
10357 }
10358 }
10359 {
10360 let violated = len > 4usize;
10361 if violated {
10362 violations.push(crate::common::validate::ConstraintViolation {
10363 path: path.to_string(),
10364 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10365 kind: crate::common::validate::ConstraintKind::MaxLength,
10366 });
10367 }
10368 }
10369 }
10370}
10371impl crate::common::validate::Validatable for ExternalClearingSystemIdentification1Code {
10372 #[allow(clippy::unreadable_literal)]
10373 fn validate_constraints(
10374 &self,
10375 path: &str,
10376 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10377 ) {
10378 let len = self.0.chars().count();
10379 {
10380 let violated = len < 1usize;
10381 if violated {
10382 violations.push(crate::common::validate::ConstraintViolation {
10383 path: path.to_string(),
10384 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10385 kind: crate::common::validate::ConstraintKind::MinLength,
10386 });
10387 }
10388 }
10389 {
10390 let violated = len > 5usize;
10391 if violated {
10392 violations.push(crate::common::validate::ConstraintViolation {
10393 path: path.to_string(),
10394 message: format!("{} (got {})", "value exceeds maximum length 5", len),
10395 kind: crate::common::validate::ConstraintKind::MaxLength,
10396 });
10397 }
10398 }
10399 }
10400}
10401impl crate::common::validate::Validatable for ExternalCreditorReferenceType1Code {
10402 #[allow(clippy::unreadable_literal)]
10403 fn validate_constraints(
10404 &self,
10405 path: &str,
10406 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10407 ) {
10408 let len = self.0.chars().count();
10409 {
10410 let violated = len < 1usize;
10411 if violated {
10412 violations.push(crate::common::validate::ConstraintViolation {
10413 path: path.to_string(),
10414 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10415 kind: crate::common::validate::ConstraintKind::MinLength,
10416 });
10417 }
10418 }
10419 {
10420 let violated = len > 4usize;
10421 if violated {
10422 violations.push(crate::common::validate::ConstraintViolation {
10423 path: path.to_string(),
10424 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10425 kind: crate::common::validate::ConstraintKind::MaxLength,
10426 });
10427 }
10428 }
10429 }
10430}
10431impl crate::common::validate::Validatable for ExternalDateType1Code {
10432 #[allow(clippy::unreadable_literal)]
10433 fn validate_constraints(
10434 &self,
10435 path: &str,
10436 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10437 ) {
10438 let len = self.0.chars().count();
10439 {
10440 let violated = len < 1usize;
10441 if violated {
10442 violations.push(crate::common::validate::ConstraintViolation {
10443 path: path.to_string(),
10444 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10445 kind: crate::common::validate::ConstraintKind::MinLength,
10446 });
10447 }
10448 }
10449 {
10450 let violated = len > 4usize;
10451 if violated {
10452 violations.push(crate::common::validate::ConstraintViolation {
10453 path: path.to_string(),
10454 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10455 kind: crate::common::validate::ConstraintKind::MaxLength,
10456 });
10457 }
10458 }
10459 }
10460}
10461impl crate::common::validate::Validatable for ExternalDocumentAmountType1Code {
10462 #[allow(clippy::unreadable_literal)]
10463 fn validate_constraints(
10464 &self,
10465 path: &str,
10466 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10467 ) {
10468 let len = self.0.chars().count();
10469 {
10470 let violated = len < 1usize;
10471 if violated {
10472 violations.push(crate::common::validate::ConstraintViolation {
10473 path: path.to_string(),
10474 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10475 kind: crate::common::validate::ConstraintKind::MinLength,
10476 });
10477 }
10478 }
10479 {
10480 let violated = len > 4usize;
10481 if violated {
10482 violations.push(crate::common::validate::ConstraintViolation {
10483 path: path.to_string(),
10484 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10485 kind: crate::common::validate::ConstraintKind::MaxLength,
10486 });
10487 }
10488 }
10489 }
10490}
10491impl crate::common::validate::Validatable for ExternalDocumentLineType1Code {
10492 #[allow(clippy::unreadable_literal)]
10493 fn validate_constraints(
10494 &self,
10495 path: &str,
10496 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10497 ) {
10498 let len = self.0.chars().count();
10499 {
10500 let violated = len < 1usize;
10501 if violated {
10502 violations.push(crate::common::validate::ConstraintViolation {
10503 path: path.to_string(),
10504 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10505 kind: crate::common::validate::ConstraintKind::MinLength,
10506 });
10507 }
10508 }
10509 {
10510 let violated = len > 4usize;
10511 if violated {
10512 violations.push(crate::common::validate::ConstraintViolation {
10513 path: path.to_string(),
10514 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10515 kind: crate::common::validate::ConstraintKind::MaxLength,
10516 });
10517 }
10518 }
10519 }
10520}
10521impl crate::common::validate::Validatable for ExternalDocumentType1Code {
10522 #[allow(clippy::unreadable_literal)]
10523 fn validate_constraints(
10524 &self,
10525 path: &str,
10526 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10527 ) {
10528 let len = self.0.chars().count();
10529 {
10530 let violated = len < 1usize;
10531 if violated {
10532 violations.push(crate::common::validate::ConstraintViolation {
10533 path: path.to_string(),
10534 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10535 kind: crate::common::validate::ConstraintKind::MinLength,
10536 });
10537 }
10538 }
10539 {
10540 let violated = len > 4usize;
10541 if violated {
10542 violations.push(crate::common::validate::ConstraintViolation {
10543 path: path.to_string(),
10544 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10545 kind: crate::common::validate::ConstraintKind::MaxLength,
10546 });
10547 }
10548 }
10549 }
10550}
10551impl crate::common::validate::Validatable for ExternalFinancialInstitutionIdentification1Code {
10552 #[allow(clippy::unreadable_literal)]
10553 fn validate_constraints(
10554 &self,
10555 path: &str,
10556 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10557 ) {
10558 let len = self.0.chars().count();
10559 {
10560 let violated = len < 1usize;
10561 if violated {
10562 violations.push(crate::common::validate::ConstraintViolation {
10563 path: path.to_string(),
10564 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10565 kind: crate::common::validate::ConstraintKind::MinLength,
10566 });
10567 }
10568 }
10569 {
10570 let violated = len > 4usize;
10571 if violated {
10572 violations.push(crate::common::validate::ConstraintViolation {
10573 path: path.to_string(),
10574 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10575 kind: crate::common::validate::ConstraintKind::MaxLength,
10576 });
10577 }
10578 }
10579 }
10580}
10581impl crate::common::validate::Validatable for ExternalGarnishmentType1Code {
10582 #[allow(clippy::unreadable_literal)]
10583 fn validate_constraints(
10584 &self,
10585 path: &str,
10586 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10587 ) {
10588 let len = self.0.chars().count();
10589 {
10590 let violated = len < 1usize;
10591 if violated {
10592 violations.push(crate::common::validate::ConstraintViolation {
10593 path: path.to_string(),
10594 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10595 kind: crate::common::validate::ConstraintKind::MinLength,
10596 });
10597 }
10598 }
10599 {
10600 let violated = len > 4usize;
10601 if violated {
10602 violations.push(crate::common::validate::ConstraintViolation {
10603 path: path.to_string(),
10604 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10605 kind: crate::common::validate::ConstraintKind::MaxLength,
10606 });
10607 }
10608 }
10609 }
10610}
10611impl crate::common::validate::Validatable for ExternalLocalInstrument1Code {
10612 #[allow(clippy::unreadable_literal)]
10613 fn validate_constraints(
10614 &self,
10615 path: &str,
10616 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10617 ) {
10618 let len = self.0.chars().count();
10619 {
10620 let violated = len < 1usize;
10621 if violated {
10622 violations.push(crate::common::validate::ConstraintViolation {
10623 path: path.to_string(),
10624 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10625 kind: crate::common::validate::ConstraintKind::MinLength,
10626 });
10627 }
10628 }
10629 {
10630 let violated = len > 35usize;
10631 if violated {
10632 violations.push(crate::common::validate::ConstraintViolation {
10633 path: path.to_string(),
10634 message: format!("{} (got {})", "value exceeds maximum length 35", len),
10635 kind: crate::common::validate::ConstraintKind::MaxLength,
10636 });
10637 }
10638 }
10639 }
10640}
10641impl crate::common::validate::Validatable for ExternalMandateSetupReason1Code {
10642 #[allow(clippy::unreadable_literal)]
10643 fn validate_constraints(
10644 &self,
10645 path: &str,
10646 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10647 ) {
10648 let len = self.0.chars().count();
10649 {
10650 let violated = len < 1usize;
10651 if violated {
10652 violations.push(crate::common::validate::ConstraintViolation {
10653 path: path.to_string(),
10654 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10655 kind: crate::common::validate::ConstraintKind::MinLength,
10656 });
10657 }
10658 }
10659 {
10660 let violated = len > 4usize;
10661 if violated {
10662 violations.push(crate::common::validate::ConstraintViolation {
10663 path: path.to_string(),
10664 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10665 kind: crate::common::validate::ConstraintKind::MaxLength,
10666 });
10667 }
10668 }
10669 }
10670}
10671impl crate::common::validate::Validatable for ExternalOrganisationIdentification1Code {
10672 #[allow(clippy::unreadable_literal)]
10673 fn validate_constraints(
10674 &self,
10675 path: &str,
10676 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10677 ) {
10678 let len = self.0.chars().count();
10679 {
10680 let violated = len < 1usize;
10681 if violated {
10682 violations.push(crate::common::validate::ConstraintViolation {
10683 path: path.to_string(),
10684 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10685 kind: crate::common::validate::ConstraintKind::MinLength,
10686 });
10687 }
10688 }
10689 {
10690 let violated = len > 4usize;
10691 if violated {
10692 violations.push(crate::common::validate::ConstraintViolation {
10693 path: path.to_string(),
10694 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10695 kind: crate::common::validate::ConstraintKind::MaxLength,
10696 });
10697 }
10698 }
10699 }
10700}
10701impl crate::common::validate::Validatable for ExternalPaymentGroupStatus1Code {
10702 #[allow(clippy::unreadable_literal)]
10703 fn validate_constraints(
10704 &self,
10705 path: &str,
10706 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10707 ) {
10708 let len = self.0.chars().count();
10709 {
10710 let violated = len < 1usize;
10711 if violated {
10712 violations.push(crate::common::validate::ConstraintViolation {
10713 path: path.to_string(),
10714 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10715 kind: crate::common::validate::ConstraintKind::MinLength,
10716 });
10717 }
10718 }
10719 {
10720 let violated = len > 4usize;
10721 if violated {
10722 violations.push(crate::common::validate::ConstraintViolation {
10723 path: path.to_string(),
10724 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10725 kind: crate::common::validate::ConstraintKind::MaxLength,
10726 });
10727 }
10728 }
10729 }
10730}
10731impl crate::common::validate::Validatable for ExternalPaymentTransactionStatus1Code {
10732 #[allow(clippy::unreadable_literal)]
10733 fn validate_constraints(
10734 &self,
10735 path: &str,
10736 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10737 ) {
10738 let len = self.0.chars().count();
10739 {
10740 let violated = len < 1usize;
10741 if violated {
10742 violations.push(crate::common::validate::ConstraintViolation {
10743 path: path.to_string(),
10744 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10745 kind: crate::common::validate::ConstraintKind::MinLength,
10746 });
10747 }
10748 }
10749 {
10750 let violated = len > 4usize;
10751 if violated {
10752 violations.push(crate::common::validate::ConstraintViolation {
10753 path: path.to_string(),
10754 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10755 kind: crate::common::validate::ConstraintKind::MaxLength,
10756 });
10757 }
10758 }
10759 }
10760}
10761impl crate::common::validate::Validatable for ExternalPersonIdentification1Code {
10762 #[allow(clippy::unreadable_literal)]
10763 fn validate_constraints(
10764 &self,
10765 path: &str,
10766 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10767 ) {
10768 let len = self.0.chars().count();
10769 {
10770 let violated = len < 1usize;
10771 if violated {
10772 violations.push(crate::common::validate::ConstraintViolation {
10773 path: path.to_string(),
10774 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10775 kind: crate::common::validate::ConstraintKind::MinLength,
10776 });
10777 }
10778 }
10779 {
10780 let violated = len > 4usize;
10781 if violated {
10782 violations.push(crate::common::validate::ConstraintViolation {
10783 path: path.to_string(),
10784 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10785 kind: crate::common::validate::ConstraintKind::MaxLength,
10786 });
10787 }
10788 }
10789 }
10790}
10791impl crate::common::validate::Validatable for ExternalProxyAccountType1Code {
10792 #[allow(clippy::unreadable_literal)]
10793 fn validate_constraints(
10794 &self,
10795 path: &str,
10796 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10797 ) {
10798 let len = self.0.chars().count();
10799 {
10800 let violated = len < 1usize;
10801 if violated {
10802 violations.push(crate::common::validate::ConstraintViolation {
10803 path: path.to_string(),
10804 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10805 kind: crate::common::validate::ConstraintKind::MinLength,
10806 });
10807 }
10808 }
10809 {
10810 let violated = len > 4usize;
10811 if violated {
10812 violations.push(crate::common::validate::ConstraintViolation {
10813 path: path.to_string(),
10814 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10815 kind: crate::common::validate::ConstraintKind::MaxLength,
10816 });
10817 }
10818 }
10819 }
10820}
10821impl crate::common::validate::Validatable for ExternalPurpose1Code {
10822 #[allow(clippy::unreadable_literal)]
10823 fn validate_constraints(
10824 &self,
10825 path: &str,
10826 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10827 ) {
10828 let len = self.0.chars().count();
10829 {
10830 let violated = len < 1usize;
10831 if violated {
10832 violations.push(crate::common::validate::ConstraintViolation {
10833 path: path.to_string(),
10834 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10835 kind: crate::common::validate::ConstraintKind::MinLength,
10836 });
10837 }
10838 }
10839 {
10840 let violated = len > 4usize;
10841 if violated {
10842 violations.push(crate::common::validate::ConstraintViolation {
10843 path: path.to_string(),
10844 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10845 kind: crate::common::validate::ConstraintKind::MaxLength,
10846 });
10847 }
10848 }
10849 }
10850}
10851impl crate::common::validate::Validatable for ExternalServiceLevel1Code {
10852 #[allow(clippy::unreadable_literal)]
10853 fn validate_constraints(
10854 &self,
10855 path: &str,
10856 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10857 ) {
10858 let len = self.0.chars().count();
10859 {
10860 let violated = len < 1usize;
10861 if violated {
10862 violations.push(crate::common::validate::ConstraintViolation {
10863 path: path.to_string(),
10864 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10865 kind: crate::common::validate::ConstraintKind::MinLength,
10866 });
10867 }
10868 }
10869 {
10870 let violated = len > 4usize;
10871 if violated {
10872 violations.push(crate::common::validate::ConstraintViolation {
10873 path: path.to_string(),
10874 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10875 kind: crate::common::validate::ConstraintKind::MaxLength,
10876 });
10877 }
10878 }
10879 }
10880}
10881impl crate::common::validate::Validatable for ExternalStatusReason1Code {
10882 #[allow(clippy::unreadable_literal)]
10883 fn validate_constraints(
10884 &self,
10885 path: &str,
10886 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10887 ) {
10888 let len = self.0.chars().count();
10889 {
10890 let violated = len < 1usize;
10891 if violated {
10892 violations.push(crate::common::validate::ConstraintViolation {
10893 path: path.to_string(),
10894 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10895 kind: crate::common::validate::ConstraintKind::MinLength,
10896 });
10897 }
10898 }
10899 {
10900 let violated = len > 4usize;
10901 if violated {
10902 violations.push(crate::common::validate::ConstraintViolation {
10903 path: path.to_string(),
10904 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10905 kind: crate::common::validate::ConstraintKind::MaxLength,
10906 });
10907 }
10908 }
10909 }
10910}
10911impl crate::common::validate::Validatable for Frequency6Code {
10912 fn validate_constraints(
10913 &self,
10914 _path: &str,
10915 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10916 ) {
10917 }
10918}
10919impl crate::common::validate::Validatable for IBAN2007Identifier {
10920 #[allow(clippy::unreadable_literal)]
10921 fn validate_constraints(
10922 &self,
10923 path: &str,
10924 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10925 ) {
10926 {
10927 let value: &str = &self.0;
10928 let violated = {
10929 let bytes = value.as_bytes();
10930 let len = bytes.len();
10931 let result: bool = (|| -> bool {
10932 let mut pos: usize = 0;
10933 if !(5usize..=34usize).contains(&len) {
10934 return true;
10935 }
10936 {
10937 let end = pos + 2usize;
10938 if end > len {
10939 return true;
10940 }
10941 for &b in &bytes[pos..end] {
10942 if !(65u8..=90u8).contains(&b) {
10943 return true;
10944 }
10945 }
10946 pos = end;
10947 }
10948 {
10949 let end = pos + 2usize;
10950 if end > len {
10951 return true;
10952 }
10953 for &b in &bytes[pos..end] {
10954 if !(48u8..=57u8).contains(&b) {
10955 return true;
10956 }
10957 }
10958 pos = end;
10959 }
10960 {
10961 let start = pos;
10962 let limit = if pos + 30usize < len {
10963 pos + 30usize
10964 } else {
10965 len
10966 };
10967 while pos < limit {
10968 let b = bytes[pos];
10969 if !(97u8..=122u8).contains(&b)
10970 && !(65u8..=90u8).contains(&b)
10971 && !(48u8..=57u8).contains(&b)
10972 {
10973 break;
10974 }
10975 pos += 1;
10976 }
10977 let matched = pos - start;
10978 if matched < 1usize {
10979 return true;
10980 }
10981 }
10982 if pos != len {
10983 return true;
10984 }
10985 false
10986 })();
10987 result
10988 };
10989 if violated {
10990 violations.push(crate::common::validate::ConstraintViolation {
10991 path: path.to_string(),
10992 message: "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
10993 .to_string(),
10994 kind: crate::common::validate::ConstraintKind::Pattern,
10995 });
10996 }
10997 }
10998 }
10999}
11000impl crate::common::validate::Validatable for ISODate {
11001 fn validate_constraints(
11002 &self,
11003 _path: &str,
11004 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11005 ) {
11006 }
11007}
11008impl crate::common::validate::Validatable for ISODateTime {
11009 fn validate_constraints(
11010 &self,
11011 _path: &str,
11012 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11013 ) {
11014 }
11015}
11016impl crate::common::validate::Validatable for ISOYear {
11017 fn validate_constraints(
11018 &self,
11019 _path: &str,
11020 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11021 ) {
11022 }
11023}
11024impl crate::common::validate::Validatable for LEIIdentifier {
11025 #[allow(clippy::unreadable_literal)]
11026 fn validate_constraints(
11027 &self,
11028 path: &str,
11029 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11030 ) {
11031 {
11032 let value: &str = &self.0;
11033 let violated = {
11034 let bytes = value.as_bytes();
11035 bytes.len() != 20usize
11036 || ({
11037 let b = bytes[0usize];
11038 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11039 })
11040 || ({
11041 let b = bytes[1usize];
11042 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11043 })
11044 || ({
11045 let b = bytes[2usize];
11046 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11047 })
11048 || ({
11049 let b = bytes[3usize];
11050 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11051 })
11052 || ({
11053 let b = bytes[4usize];
11054 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11055 })
11056 || ({
11057 let b = bytes[5usize];
11058 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11059 })
11060 || ({
11061 let b = bytes[6usize];
11062 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11063 })
11064 || ({
11065 let b = bytes[7usize];
11066 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11067 })
11068 || ({
11069 let b = bytes[8usize];
11070 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11071 })
11072 || ({
11073 let b = bytes[9usize];
11074 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11075 })
11076 || ({
11077 let b = bytes[10usize];
11078 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11079 })
11080 || ({
11081 let b = bytes[11usize];
11082 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11083 })
11084 || ({
11085 let b = bytes[12usize];
11086 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11087 })
11088 || ({
11089 let b = bytes[13usize];
11090 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11091 })
11092 || ({
11093 let b = bytes[14usize];
11094 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11095 })
11096 || ({
11097 let b = bytes[15usize];
11098 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11099 })
11100 || ({
11101 let b = bytes[16usize];
11102 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11103 })
11104 || ({
11105 let b = bytes[17usize];
11106 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11107 })
11108 || ({
11109 let b = bytes[18usize];
11110 !(48u8..=57u8).contains(&b)
11111 })
11112 || ({
11113 let b = bytes[19usize];
11114 !(48u8..=57u8).contains(&b)
11115 })
11116 };
11117 if violated {
11118 violations.push(crate::common::validate::ConstraintViolation {
11119 path: path.to_string(),
11120 message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}".to_string(),
11121 kind: crate::common::validate::ConstraintKind::Pattern,
11122 });
11123 }
11124 }
11125 }
11126}
11127impl crate::common::validate::Validatable for MandateClassification1Code {
11128 fn validate_constraints(
11129 &self,
11130 _path: &str,
11131 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11132 ) {
11133 }
11134}
11135impl crate::common::validate::Validatable for Max1025Text {
11136 #[allow(clippy::unreadable_literal)]
11137 fn validate_constraints(
11138 &self,
11139 path: &str,
11140 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11141 ) {
11142 let len = self.0.chars().count();
11143 {
11144 let violated = len < 1usize;
11145 if violated {
11146 violations.push(crate::common::validate::ConstraintViolation {
11147 path: path.to_string(),
11148 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11149 kind: crate::common::validate::ConstraintKind::MinLength,
11150 });
11151 }
11152 }
11153 {
11154 let violated = len > 1025usize;
11155 if violated {
11156 violations.push(crate::common::validate::ConstraintViolation {
11157 path: path.to_string(),
11158 message: format!("{} (got {})", "value exceeds maximum length 1025", len),
11159 kind: crate::common::validate::ConstraintKind::MaxLength,
11160 });
11161 }
11162 }
11163 }
11164}
11165impl crate::common::validate::Validatable for Max105Text {
11166 #[allow(clippy::unreadable_literal)]
11167 fn validate_constraints(
11168 &self,
11169 path: &str,
11170 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11171 ) {
11172 let len = self.0.chars().count();
11173 {
11174 let violated = len < 1usize;
11175 if violated {
11176 violations.push(crate::common::validate::ConstraintViolation {
11177 path: path.to_string(),
11178 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11179 kind: crate::common::validate::ConstraintKind::MinLength,
11180 });
11181 }
11182 }
11183 {
11184 let violated = len > 105usize;
11185 if violated {
11186 violations.push(crate::common::validate::ConstraintViolation {
11187 path: path.to_string(),
11188 message: format!("{} (got {})", "value exceeds maximum length 105", len),
11189 kind: crate::common::validate::ConstraintKind::MaxLength,
11190 });
11191 }
11192 }
11193 }
11194}
11195impl crate::common::validate::Validatable for Max10KBinary {
11196 #[allow(clippy::unreadable_literal)]
11197 fn validate_constraints(
11198 &self,
11199 path: &str,
11200 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11201 ) {
11202 let len = self.0.chars().count();
11203 {
11204 let violated = len < 1usize;
11205 if violated {
11206 violations.push(crate::common::validate::ConstraintViolation {
11207 path: path.to_string(),
11208 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11209 kind: crate::common::validate::ConstraintKind::MinLength,
11210 });
11211 }
11212 }
11213 {
11214 let violated = len > 10240usize;
11215 if violated {
11216 violations.push(crate::common::validate::ConstraintViolation {
11217 path: path.to_string(),
11218 message: format!("{} (got {})", "value exceeds maximum length 10240", len),
11219 kind: crate::common::validate::ConstraintKind::MaxLength,
11220 });
11221 }
11222 }
11223 }
11224}
11225impl crate::common::validate::Validatable for Max128Text {
11226 #[allow(clippy::unreadable_literal)]
11227 fn validate_constraints(
11228 &self,
11229 path: &str,
11230 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11231 ) {
11232 let len = self.0.chars().count();
11233 {
11234 let violated = len < 1usize;
11235 if violated {
11236 violations.push(crate::common::validate::ConstraintViolation {
11237 path: path.to_string(),
11238 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11239 kind: crate::common::validate::ConstraintKind::MinLength,
11240 });
11241 }
11242 }
11243 {
11244 let violated = len > 128usize;
11245 if violated {
11246 violations.push(crate::common::validate::ConstraintViolation {
11247 path: path.to_string(),
11248 message: format!("{} (got {})", "value exceeds maximum length 128", len),
11249 kind: crate::common::validate::ConstraintKind::MaxLength,
11250 });
11251 }
11252 }
11253 }
11254}
11255impl crate::common::validate::Validatable for Max140Text {
11256 #[allow(clippy::unreadable_literal)]
11257 fn validate_constraints(
11258 &self,
11259 path: &str,
11260 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11261 ) {
11262 let len = self.0.chars().count();
11263 {
11264 let violated = len < 1usize;
11265 if violated {
11266 violations.push(crate::common::validate::ConstraintViolation {
11267 path: path.to_string(),
11268 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11269 kind: crate::common::validate::ConstraintKind::MinLength,
11270 });
11271 }
11272 }
11273 {
11274 let violated = len > 140usize;
11275 if violated {
11276 violations.push(crate::common::validate::ConstraintViolation {
11277 path: path.to_string(),
11278 message: format!("{} (got {})", "value exceeds maximum length 140", len),
11279 kind: crate::common::validate::ConstraintKind::MaxLength,
11280 });
11281 }
11282 }
11283 }
11284}
11285impl crate::common::validate::Validatable for Max15NumericText {
11286 #[allow(clippy::unreadable_literal)]
11287 fn validate_constraints(
11288 &self,
11289 path: &str,
11290 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11291 ) {
11292 {
11293 let value: &str = &self.0;
11294 let violated = {
11295 let bytes = value.as_bytes();
11296 let len = bytes.len();
11297 let result: bool = (|| -> bool {
11298 let mut pos: usize = 0;
11299 if !(1usize..=15usize).contains(&len) {
11300 return true;
11301 }
11302 {
11303 let start = pos;
11304 let limit = if pos + 15usize < len {
11305 pos + 15usize
11306 } else {
11307 len
11308 };
11309 while pos < limit {
11310 let b = bytes[pos];
11311 if !(48u8..=57u8).contains(&b) {
11312 break;
11313 }
11314 pos += 1;
11315 }
11316 let matched = pos - start;
11317 if matched < 1usize {
11318 return true;
11319 }
11320 }
11321 if pos != len {
11322 return true;
11323 }
11324 false
11325 })();
11326 result
11327 };
11328 if violated {
11329 violations.push(crate::common::validate::ConstraintViolation {
11330 path: path.to_string(),
11331 message: "value does not match pattern [0-9]{1,15}".to_string(),
11332 kind: crate::common::validate::ConstraintKind::Pattern,
11333 });
11334 }
11335 }
11336 }
11337}
11338impl crate::common::validate::Validatable for Max16Text {
11339 #[allow(clippy::unreadable_literal)]
11340 fn validate_constraints(
11341 &self,
11342 path: &str,
11343 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11344 ) {
11345 let len = self.0.chars().count();
11346 {
11347 let violated = len < 1usize;
11348 if violated {
11349 violations.push(crate::common::validate::ConstraintViolation {
11350 path: path.to_string(),
11351 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11352 kind: crate::common::validate::ConstraintKind::MinLength,
11353 });
11354 }
11355 }
11356 {
11357 let violated = len > 16usize;
11358 if violated {
11359 violations.push(crate::common::validate::ConstraintViolation {
11360 path: path.to_string(),
11361 message: format!("{} (got {})", "value exceeds maximum length 16", len),
11362 kind: crate::common::validate::ConstraintKind::MaxLength,
11363 });
11364 }
11365 }
11366 }
11367}
11368impl crate::common::validate::Validatable for Max2048Text {
11369 #[allow(clippy::unreadable_literal)]
11370 fn validate_constraints(
11371 &self,
11372 path: &str,
11373 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11374 ) {
11375 let len = self.0.chars().count();
11376 {
11377 let violated = len < 1usize;
11378 if violated {
11379 violations.push(crate::common::validate::ConstraintViolation {
11380 path: path.to_string(),
11381 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11382 kind: crate::common::validate::ConstraintKind::MinLength,
11383 });
11384 }
11385 }
11386 {
11387 let violated = len > 2048usize;
11388 if violated {
11389 violations.push(crate::common::validate::ConstraintViolation {
11390 path: path.to_string(),
11391 message: format!("{} (got {})", "value exceeds maximum length 2048", len),
11392 kind: crate::common::validate::ConstraintKind::MaxLength,
11393 });
11394 }
11395 }
11396 }
11397}
11398impl crate::common::validate::Validatable for Max256Text {
11399 #[allow(clippy::unreadable_literal)]
11400 fn validate_constraints(
11401 &self,
11402 path: &str,
11403 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11404 ) {
11405 let len = self.0.chars().count();
11406 {
11407 let violated = len < 1usize;
11408 if violated {
11409 violations.push(crate::common::validate::ConstraintViolation {
11410 path: path.to_string(),
11411 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11412 kind: crate::common::validate::ConstraintKind::MinLength,
11413 });
11414 }
11415 }
11416 {
11417 let violated = len > 256usize;
11418 if violated {
11419 violations.push(crate::common::validate::ConstraintViolation {
11420 path: path.to_string(),
11421 message: format!("{} (got {})", "value exceeds maximum length 256", len),
11422 kind: crate::common::validate::ConstraintKind::MaxLength,
11423 });
11424 }
11425 }
11426 }
11427}
11428impl crate::common::validate::Validatable for Max34Text {
11429 #[allow(clippy::unreadable_literal)]
11430 fn validate_constraints(
11431 &self,
11432 path: &str,
11433 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11434 ) {
11435 let len = self.0.chars().count();
11436 {
11437 let violated = len < 1usize;
11438 if violated {
11439 violations.push(crate::common::validate::ConstraintViolation {
11440 path: path.to_string(),
11441 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11442 kind: crate::common::validate::ConstraintKind::MinLength,
11443 });
11444 }
11445 }
11446 {
11447 let violated = len > 34usize;
11448 if violated {
11449 violations.push(crate::common::validate::ConstraintViolation {
11450 path: path.to_string(),
11451 message: format!("{} (got {})", "value exceeds maximum length 34", len),
11452 kind: crate::common::validate::ConstraintKind::MaxLength,
11453 });
11454 }
11455 }
11456 }
11457}
11458impl crate::common::validate::Validatable for Max350Text {
11459 #[allow(clippy::unreadable_literal)]
11460 fn validate_constraints(
11461 &self,
11462 path: &str,
11463 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11464 ) {
11465 let len = self.0.chars().count();
11466 {
11467 let violated = len < 1usize;
11468 if violated {
11469 violations.push(crate::common::validate::ConstraintViolation {
11470 path: path.to_string(),
11471 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11472 kind: crate::common::validate::ConstraintKind::MinLength,
11473 });
11474 }
11475 }
11476 {
11477 let violated = len > 350usize;
11478 if violated {
11479 violations.push(crate::common::validate::ConstraintViolation {
11480 path: path.to_string(),
11481 message: format!("{} (got {})", "value exceeds maximum length 350", len),
11482 kind: crate::common::validate::ConstraintKind::MaxLength,
11483 });
11484 }
11485 }
11486 }
11487}
11488impl crate::common::validate::Validatable for Max35Text {
11489 #[allow(clippy::unreadable_literal)]
11490 fn validate_constraints(
11491 &self,
11492 path: &str,
11493 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11494 ) {
11495 let len = self.0.chars().count();
11496 {
11497 let violated = len < 1usize;
11498 if violated {
11499 violations.push(crate::common::validate::ConstraintViolation {
11500 path: path.to_string(),
11501 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11502 kind: crate::common::validate::ConstraintKind::MinLength,
11503 });
11504 }
11505 }
11506 {
11507 let violated = len > 35usize;
11508 if violated {
11509 violations.push(crate::common::validate::ConstraintViolation {
11510 path: path.to_string(),
11511 message: format!("{} (got {})", "value exceeds maximum length 35", len),
11512 kind: crate::common::validate::ConstraintKind::MaxLength,
11513 });
11514 }
11515 }
11516 }
11517}
11518impl crate::common::validate::Validatable for Max4Text {
11519 #[allow(clippy::unreadable_literal)]
11520 fn validate_constraints(
11521 &self,
11522 path: &str,
11523 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11524 ) {
11525 let len = self.0.chars().count();
11526 {
11527 let violated = len < 1usize;
11528 if violated {
11529 violations.push(crate::common::validate::ConstraintViolation {
11530 path: path.to_string(),
11531 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11532 kind: crate::common::validate::ConstraintKind::MinLength,
11533 });
11534 }
11535 }
11536 {
11537 let violated = len > 4usize;
11538 if violated {
11539 violations.push(crate::common::validate::ConstraintViolation {
11540 path: path.to_string(),
11541 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11542 kind: crate::common::validate::ConstraintKind::MaxLength,
11543 });
11544 }
11545 }
11546 }
11547}
11548impl crate::common::validate::Validatable for Max70Text {
11549 #[allow(clippy::unreadable_literal)]
11550 fn validate_constraints(
11551 &self,
11552 path: &str,
11553 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11554 ) {
11555 let len = self.0.chars().count();
11556 {
11557 let violated = len < 1usize;
11558 if violated {
11559 violations.push(crate::common::validate::ConstraintViolation {
11560 path: path.to_string(),
11561 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11562 kind: crate::common::validate::ConstraintKind::MinLength,
11563 });
11564 }
11565 }
11566 {
11567 let violated = len > 70usize;
11568 if violated {
11569 violations.push(crate::common::validate::ConstraintViolation {
11570 path: path.to_string(),
11571 message: format!("{} (got {})", "value exceeds maximum length 70", len),
11572 kind: crate::common::validate::ConstraintKind::MaxLength,
11573 });
11574 }
11575 }
11576 }
11577}
11578impl crate::common::validate::Validatable for NamePrefix2Code {
11579 fn validate_constraints(
11580 &self,
11581 _path: &str,
11582 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11583 ) {
11584 }
11585}
11586impl crate::common::validate::Validatable for Number {
11587 #[allow(clippy::unreadable_literal)]
11588 fn validate_constraints(
11589 &self,
11590 path: &str,
11591 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11592 ) {
11593 {
11594 let value: &str = &self.0;
11595 let frac_count = value.find('.').map_or(0, |dot| {
11596 value[dot + 1..]
11597 .chars()
11598 .filter(char::is_ascii_digit)
11599 .count()
11600 });
11601 let violated = frac_count > 0usize;
11602 if violated {
11603 violations.push(crate::common::validate::ConstraintViolation {
11604 path: path.to_string(),
11605 message: format!(
11606 "{} (got {})",
11607 "value exceeds maximum fraction digits 0", frac_count
11608 ),
11609 kind: crate::common::validate::ConstraintKind::FractionDigits,
11610 });
11611 }
11612 }
11613 {
11614 let value: &str = &self.0;
11615 let digit_count = value.chars().filter(char::is_ascii_digit).count();
11616 let violated = digit_count > 18usize;
11617 if violated {
11618 violations.push(crate::common::validate::ConstraintViolation {
11619 path: path.to_string(),
11620 message: format!(
11621 "{} (got {})",
11622 "value exceeds maximum total digits 18", digit_count
11623 ),
11624 kind: crate::common::validate::ConstraintKind::TotalDigits,
11625 });
11626 }
11627 }
11628 }
11629}
11630impl crate::common::validate::Validatable for PaymentMethod4Code {
11631 fn validate_constraints(
11632 &self,
11633 _path: &str,
11634 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11635 ) {
11636 }
11637}
11638impl crate::common::validate::Validatable for PercentageRate {
11639 #[allow(clippy::unreadable_literal)]
11640 fn validate_constraints(
11641 &self,
11642 path: &str,
11643 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11644 ) {
11645 {
11646 let value: &str = &self.0;
11647 let frac_count = value.find('.').map_or(0, |dot| {
11648 value[dot + 1..]
11649 .chars()
11650 .filter(char::is_ascii_digit)
11651 .count()
11652 });
11653 let violated = frac_count > 10usize;
11654 if violated {
11655 violations.push(crate::common::validate::ConstraintViolation {
11656 path: path.to_string(),
11657 message: format!(
11658 "{} (got {})",
11659 "value exceeds maximum fraction digits 10", frac_count
11660 ),
11661 kind: crate::common::validate::ConstraintKind::FractionDigits,
11662 });
11663 }
11664 }
11665 {
11666 let value: &str = &self.0;
11667 let digit_count = value.chars().filter(char::is_ascii_digit).count();
11668 let violated = digit_count > 11usize;
11669 if violated {
11670 violations.push(crate::common::validate::ConstraintViolation {
11671 path: path.to_string(),
11672 message: format!(
11673 "{} (got {})",
11674 "value exceeds maximum total digits 11", digit_count
11675 ),
11676 kind: crate::common::validate::ConstraintKind::TotalDigits,
11677 });
11678 }
11679 }
11680 }
11681}
11682impl crate::common::validate::Validatable for PhoneNumber {
11683 #[allow(clippy::unreadable_literal)]
11684 fn validate_constraints(
11685 &self,
11686 path: &str,
11687 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11688 ) {
11689 {
11690 let value: &str = &self.0;
11691 let violated = {
11692 let bytes = value.as_bytes();
11693 let len = bytes.len();
11694 let result: bool = (|| -> bool {
11695 let mut pos: usize = 0;
11696 if !(4usize..=35usize).contains(&len) {
11697 return true;
11698 }
11699 if pos >= len || bytes[pos] != 43u8 {
11700 return true;
11701 }
11702 pos += 1;
11703 {
11704 let start = pos;
11705 let limit = if pos + 3usize < len {
11706 pos + 3usize
11707 } else {
11708 len
11709 };
11710 while pos < limit {
11711 let b = bytes[pos];
11712 if !(48u8..=57u8).contains(&b) {
11713 break;
11714 }
11715 pos += 1;
11716 }
11717 let matched = pos - start;
11718 if matched < 1usize {
11719 return true;
11720 }
11721 }
11722 if pos >= len || bytes[pos] != 45u8 {
11723 return true;
11724 }
11725 pos += 1;
11726 {
11727 let start = pos;
11728 let limit = if pos + 30usize < len {
11729 pos + 30usize
11730 } else {
11731 len
11732 };
11733 while pos < limit {
11734 let b = bytes[pos];
11735 if !(48u8..=57u8).contains(&b)
11736 && b != 40u8
11737 && b != 41u8
11738 && b != 43u8
11739 && b != 45u8
11740 {
11741 break;
11742 }
11743 pos += 1;
11744 }
11745 let matched = pos - start;
11746 if matched < 1usize {
11747 return true;
11748 }
11749 }
11750 if pos != len {
11751 return true;
11752 }
11753 false
11754 })();
11755 result
11756 };
11757 if violated {
11758 violations.push(crate::common::validate::ConstraintViolation {
11759 path: path.to_string(),
11760 message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
11761 .to_string(),
11762 kind: crate::common::validate::ConstraintKind::Pattern,
11763 });
11764 }
11765 }
11766 }
11767}
11768impl crate::common::validate::Validatable for PreferredContactMethod2Code {
11769 fn validate_constraints(
11770 &self,
11771 _path: &str,
11772 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11773 ) {
11774 }
11775}
11776impl crate::common::validate::Validatable for Priority2Code {
11777 fn validate_constraints(
11778 &self,
11779 _path: &str,
11780 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11781 ) {
11782 }
11783}
11784impl crate::common::validate::Validatable for SequenceType3Code {
11785 fn validate_constraints(
11786 &self,
11787 _path: &str,
11788 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11789 ) {
11790 }
11791}
11792impl crate::common::validate::Validatable for SettlementMethod1Code {
11793 fn validate_constraints(
11794 &self,
11795 _path: &str,
11796 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11797 ) {
11798 }
11799}
11800impl crate::common::validate::Validatable for TaxRecordPeriod1Code {
11801 fn validate_constraints(
11802 &self,
11803 _path: &str,
11804 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11805 ) {
11806 }
11807}
11808impl crate::common::validate::Validatable for TrueFalseIndicator {
11809 fn validate_constraints(
11810 &self,
11811 _path: &str,
11812 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11813 ) {
11814 }
11815}
11816impl crate::common::validate::Validatable for UUIDv4Identifier {
11817 #[allow(clippy::unreadable_literal)]
11818 fn validate_constraints(
11819 &self,
11820 path: &str,
11821 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11822 ) {
11823 {
11824 let value: &str = &self.0;
11825 let violated = {
11826 let bytes = value.as_bytes();
11827 bytes.len() != 36usize
11828 || ({
11829 let b = bytes[0usize];
11830 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11831 })
11832 || ({
11833 let b = bytes[1usize];
11834 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11835 })
11836 || ({
11837 let b = bytes[2usize];
11838 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11839 })
11840 || ({
11841 let b = bytes[3usize];
11842 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11843 })
11844 || ({
11845 let b = bytes[4usize];
11846 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11847 })
11848 || ({
11849 let b = bytes[5usize];
11850 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11851 })
11852 || ({
11853 let b = bytes[6usize];
11854 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11855 })
11856 || ({
11857 let b = bytes[7usize];
11858 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11859 })
11860 || bytes[8usize] != 45u8
11861 || ({
11862 let b = bytes[9usize];
11863 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11864 })
11865 || ({
11866 let b = bytes[10usize];
11867 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11868 })
11869 || ({
11870 let b = bytes[11usize];
11871 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11872 })
11873 || ({
11874 let b = bytes[12usize];
11875 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11876 })
11877 || bytes[13usize] != 45u8
11878 || bytes[14usize] != 52u8
11879 || ({
11880 let b = bytes[15usize];
11881 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11882 })
11883 || ({
11884 let b = bytes[16usize];
11885 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11886 })
11887 || ({
11888 let b = bytes[17usize];
11889 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11890 })
11891 || bytes[18usize] != 45u8
11892 || ({
11893 let b = bytes[19usize];
11894 b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
11895 })
11896 || ({
11897 let b = bytes[20usize];
11898 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11899 })
11900 || ({
11901 let b = bytes[21usize];
11902 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11903 })
11904 || ({
11905 let b = bytes[22usize];
11906 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11907 })
11908 || bytes[23usize] != 45u8
11909 || ({
11910 let b = bytes[24usize];
11911 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11912 })
11913 || ({
11914 let b = bytes[25usize];
11915 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11916 })
11917 || ({
11918 let b = bytes[26usize];
11919 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11920 })
11921 || ({
11922 let b = bytes[27usize];
11923 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11924 })
11925 || ({
11926 let b = bytes[28usize];
11927 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11928 })
11929 || ({
11930 let b = bytes[29usize];
11931 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11932 })
11933 || ({
11934 let b = bytes[30usize];
11935 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11936 })
11937 || ({
11938 let b = bytes[31usize];
11939 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11940 })
11941 || ({
11942 let b = bytes[32usize];
11943 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11944 })
11945 || ({
11946 let b = bytes[33usize];
11947 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11948 })
11949 || ({
11950 let b = bytes[34usize];
11951 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11952 })
11953 || ({
11954 let b = bytes[35usize];
11955 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
11956 })
11957 };
11958 if violated {
11959 violations
11960 .push(crate::common::validate::ConstraintViolation {
11961 path: path.to_string(),
11962 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}"
11963 .to_string(),
11964 kind: crate::common::validate::ConstraintKind::Pattern,
11965 });
11966 }
11967 }
11968 }
11969}
11970impl crate::common::validate::Validatable for AccountIdentification4Choice {
11971 fn validate_constraints(
11972 &self,
11973 path: &str,
11974 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11975 ) {
11976 match self {
11977 Self::IBAN(inner) => {
11978 let snap = violations.len();
11979 inner.validate_constraints("", violations);
11980 if violations.len() > snap {
11981 let pfx = format!("{path}/IBAN");
11982 for v in &mut violations[snap..] {
11983 v.path.insert_str(0, &pfx);
11984 }
11985 }
11986 }
11987 Self::Othr(inner) => {
11988 let snap = violations.len();
11989 inner.validate_constraints("", violations);
11990 if violations.len() > snap {
11991 let pfx = format!("{path}/Othr");
11992 for v in &mut violations[snap..] {
11993 v.path.insert_str(0, &pfx);
11994 }
11995 }
11996 }
11997 }
11998 }
11999}
12000impl crate::common::validate::Validatable for AccountSchemeName1Choice {
12001 fn validate_constraints(
12002 &self,
12003 path: &str,
12004 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12005 ) {
12006 match self {
12007 Self::Cd(inner) => {
12008 let snap = violations.len();
12009 inner.validate_constraints("", violations);
12010 if violations.len() > snap {
12011 let pfx = format!("{path}/Cd");
12012 for v in &mut violations[snap..] {
12013 v.path.insert_str(0, &pfx);
12014 }
12015 }
12016 }
12017 Self::Prtry(inner) => {
12018 let snap = violations.len();
12019 inner.validate_constraints("", violations);
12020 if violations.len() > snap {
12021 let pfx = format!("{path}/Prtry");
12022 for v in &mut violations[snap..] {
12023 v.path.insert_str(0, &pfx);
12024 }
12025 }
12026 }
12027 }
12028 }
12029}
12030impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmount {
12031 fn validate_constraints(
12032 &self,
12033 path: &str,
12034 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12035 ) {
12036 self.value.validate_constraints(path, violations);
12037 {
12038 let snap = violations.len();
12039 self.ccy.validate_constraints("", violations);
12040 if violations.len() > snap {
12041 let pfx = format!("{path}/@Ccy");
12042 for v in &mut violations[snap..] {
12043 v.path.insert_str(0, &pfx);
12044 }
12045 }
12046 }
12047 }
12048}
12049impl crate::common::validate::Validatable for AddressType3Choice {
12050 fn validate_constraints(
12051 &self,
12052 path: &str,
12053 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12054 ) {
12055 match self {
12056 Self::Cd(inner) => {
12057 let snap = violations.len();
12058 inner.validate_constraints("", violations);
12059 if violations.len() > snap {
12060 let pfx = format!("{path}/Cd");
12061 for v in &mut violations[snap..] {
12062 v.path.insert_str(0, &pfx);
12063 }
12064 }
12065 }
12066 Self::Prtry(inner) => {
12067 let snap = violations.len();
12068 inner.validate_constraints("", violations);
12069 if violations.len() > snap {
12070 let pfx = format!("{path}/Prtry");
12071 for v in &mut violations[snap..] {
12072 v.path.insert_str(0, &pfx);
12073 }
12074 }
12075 }
12076 }
12077 }
12078}
12079impl crate::common::validate::Validatable for AmendmentInformationDetails15 {
12080 fn validate_constraints(
12081 &self,
12082 path: &str,
12083 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12084 ) {
12085 if let Some(ref val) = self.orgnl_mndt_id {
12086 let snap = violations.len();
12087 val.validate_constraints("", violations);
12088 if violations.len() > snap {
12089 let pfx = format!("{path}/OrgnlMndtId");
12090 for v in &mut violations[snap..] {
12091 v.path.insert_str(0, &pfx);
12092 }
12093 }
12094 }
12095 if let Some(ref val) = self.orgnl_cdtr_schme_id {
12096 let snap = violations.len();
12097 val.validate_constraints("", violations);
12098 if violations.len() > snap {
12099 let pfx = format!("{path}/OrgnlCdtrSchmeId");
12100 for v in &mut violations[snap..] {
12101 v.path.insert_str(0, &pfx);
12102 }
12103 }
12104 }
12105 if let Some(ref val) = self.orgnl_cdtr_agt {
12106 let snap = violations.len();
12107 val.validate_constraints("", violations);
12108 if violations.len() > snap {
12109 let pfx = format!("{path}/OrgnlCdtrAgt");
12110 for v in &mut violations[snap..] {
12111 v.path.insert_str(0, &pfx);
12112 }
12113 }
12114 }
12115 if let Some(ref val) = self.orgnl_cdtr_agt_acct {
12116 let snap = violations.len();
12117 val.validate_constraints("", violations);
12118 if violations.len() > snap {
12119 let pfx = format!("{path}/OrgnlCdtrAgtAcct");
12120 for v in &mut violations[snap..] {
12121 v.path.insert_str(0, &pfx);
12122 }
12123 }
12124 }
12125 if let Some(ref val) = self.orgnl_dbtr {
12126 let snap = violations.len();
12127 val.validate_constraints("", violations);
12128 if violations.len() > snap {
12129 let pfx = format!("{path}/OrgnlDbtr");
12130 for v in &mut violations[snap..] {
12131 v.path.insert_str(0, &pfx);
12132 }
12133 }
12134 }
12135 if let Some(ref val) = self.orgnl_dbtr_acct {
12136 let snap = violations.len();
12137 val.validate_constraints("", violations);
12138 if violations.len() > snap {
12139 let pfx = format!("{path}/OrgnlDbtrAcct");
12140 for v in &mut violations[snap..] {
12141 v.path.insert_str(0, &pfx);
12142 }
12143 }
12144 }
12145 if let Some(ref val) = self.orgnl_dbtr_agt {
12146 let snap = violations.len();
12147 val.validate_constraints("", violations);
12148 if violations.len() > snap {
12149 let pfx = format!("{path}/OrgnlDbtrAgt");
12150 for v in &mut violations[snap..] {
12151 v.path.insert_str(0, &pfx);
12152 }
12153 }
12154 }
12155 if let Some(ref val) = self.orgnl_dbtr_agt_acct {
12156 let snap = violations.len();
12157 val.validate_constraints("", violations);
12158 if violations.len() > snap {
12159 let pfx = format!("{path}/OrgnlDbtrAgtAcct");
12160 for v in &mut violations[snap..] {
12161 v.path.insert_str(0, &pfx);
12162 }
12163 }
12164 }
12165 if let Some(ref val) = self.orgnl_fnl_colltn_dt {
12166 let snap = violations.len();
12167 val.validate_constraints("", violations);
12168 if violations.len() > snap {
12169 let pfx = format!("{path}/OrgnlFnlColltnDt");
12170 for v in &mut violations[snap..] {
12171 v.path.insert_str(0, &pfx);
12172 }
12173 }
12174 }
12175 if let Some(ref wrapper) = self.orgnl_frqcy {
12176 let snap = violations.len();
12177 wrapper.inner.validate_constraints("", violations);
12178 if violations.len() > snap {
12179 let pfx = format!("{path}/OrgnlFrqcy");
12180 for v in &mut violations[snap..] {
12181 v.path.insert_str(0, &pfx);
12182 }
12183 }
12184 }
12185 if let Some(ref wrapper) = self.orgnl_rsn {
12186 let snap = violations.len();
12187 wrapper.inner.validate_constraints("", violations);
12188 if violations.len() > snap {
12189 let pfx = format!("{path}/OrgnlRsn");
12190 for v in &mut violations[snap..] {
12191 v.path.insert_str(0, &pfx);
12192 }
12193 }
12194 }
12195 if let Some(ref val) = self.orgnl_trckg_days {
12196 let snap = violations.len();
12197 val.validate_constraints("", violations);
12198 if violations.len() > snap {
12199 let pfx = format!("{path}/OrgnlTrckgDays");
12200 for v in &mut violations[snap..] {
12201 v.path.insert_str(0, &pfx);
12202 }
12203 }
12204 }
12205 }
12206}
12207impl crate::common::validate::Validatable for AmountType4Choice {
12208 fn validate_constraints(
12209 &self,
12210 path: &str,
12211 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12212 ) {
12213 match self {
12214 Self::InstdAmt(inner) => {
12215 let snap = violations.len();
12216 inner.validate_constraints("", violations);
12217 if violations.len() > snap {
12218 let pfx = format!("{path}/InstdAmt");
12219 for v in &mut violations[snap..] {
12220 v.path.insert_str(0, &pfx);
12221 }
12222 }
12223 }
12224 Self::EqvtAmt(inner) => {
12225 let snap = violations.len();
12226 inner.validate_constraints("", violations);
12227 if violations.len() > snap {
12228 let pfx = format!("{path}/EqvtAmt");
12229 for v in &mut violations[snap..] {
12230 v.path.insert_str(0, &pfx);
12231 }
12232 }
12233 }
12234 }
12235 }
12236}
12237impl crate::common::validate::Validatable for BranchAndFinancialInstitutionIdentification8 {
12238 fn validate_constraints(
12239 &self,
12240 path: &str,
12241 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12242 ) {
12243 {
12244 let snap = violations.len();
12245 self.fin_instn_id.validate_constraints("", violations);
12246 if violations.len() > snap {
12247 let pfx = format!("{path}/FinInstnId");
12248 for v in &mut violations[snap..] {
12249 v.path.insert_str(0, &pfx);
12250 }
12251 }
12252 }
12253 if let Some(ref val) = self.brnch_id {
12254 let snap = violations.len();
12255 val.validate_constraints("", violations);
12256 if violations.len() > snap {
12257 let pfx = format!("{path}/BrnchId");
12258 for v in &mut violations[snap..] {
12259 v.path.insert_str(0, &pfx);
12260 }
12261 }
12262 }
12263 }
12264}
12265impl crate::common::validate::Validatable for BranchData5 {
12266 fn validate_constraints(
12267 &self,
12268 path: &str,
12269 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12270 ) {
12271 if let Some(ref val) = self.id {
12272 let snap = violations.len();
12273 val.validate_constraints("", violations);
12274 if violations.len() > snap {
12275 let pfx = format!("{path}/Id");
12276 for v in &mut violations[snap..] {
12277 v.path.insert_str(0, &pfx);
12278 }
12279 }
12280 }
12281 if let Some(ref val) = self.lei {
12282 let snap = violations.len();
12283 val.validate_constraints("", violations);
12284 if violations.len() > snap {
12285 let pfx = format!("{path}/LEI");
12286 for v in &mut violations[snap..] {
12287 v.path.insert_str(0, &pfx);
12288 }
12289 }
12290 }
12291 if let Some(ref val) = self.nm {
12292 let snap = violations.len();
12293 val.validate_constraints("", violations);
12294 if violations.len() > snap {
12295 let pfx = format!("{path}/Nm");
12296 for v in &mut violations[snap..] {
12297 v.path.insert_str(0, &pfx);
12298 }
12299 }
12300 }
12301 if let Some(ref val) = self.pstl_adr {
12302 let snap = violations.len();
12303 val.validate_constraints("", violations);
12304 if violations.len() > snap {
12305 let pfx = format!("{path}/PstlAdr");
12306 for v in &mut violations[snap..] {
12307 v.path.insert_str(0, &pfx);
12308 }
12309 }
12310 }
12311 }
12312}
12313impl crate::common::validate::Validatable for CashAccount40 {
12314 fn validate_constraints(
12315 &self,
12316 path: &str,
12317 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12318 ) {
12319 if let Some(ref wrapper) = self.id {
12320 let snap = violations.len();
12321 wrapper.inner.validate_constraints("", violations);
12322 if violations.len() > snap {
12323 let pfx = format!("{path}/Id");
12324 for v in &mut violations[snap..] {
12325 v.path.insert_str(0, &pfx);
12326 }
12327 }
12328 }
12329 if let Some(ref wrapper) = self.tp {
12330 let snap = violations.len();
12331 wrapper.inner.validate_constraints("", violations);
12332 if violations.len() > snap {
12333 let pfx = format!("{path}/Tp");
12334 for v in &mut violations[snap..] {
12335 v.path.insert_str(0, &pfx);
12336 }
12337 }
12338 }
12339 if let Some(ref val) = self.ccy {
12340 let snap = violations.len();
12341 val.validate_constraints("", violations);
12342 if violations.len() > snap {
12343 let pfx = format!("{path}/Ccy");
12344 for v in &mut violations[snap..] {
12345 v.path.insert_str(0, &pfx);
12346 }
12347 }
12348 }
12349 if let Some(ref val) = self.nm {
12350 let snap = violations.len();
12351 val.validate_constraints("", violations);
12352 if violations.len() > snap {
12353 let pfx = format!("{path}/Nm");
12354 for v in &mut violations[snap..] {
12355 v.path.insert_str(0, &pfx);
12356 }
12357 }
12358 }
12359 if let Some(ref val) = self.prxy {
12360 let snap = violations.len();
12361 val.validate_constraints("", violations);
12362 if violations.len() > snap {
12363 let pfx = format!("{path}/Prxy");
12364 for v in &mut violations[snap..] {
12365 v.path.insert_str(0, &pfx);
12366 }
12367 }
12368 }
12369 }
12370}
12371impl crate::common::validate::Validatable for CashAccountType2Choice {
12372 fn validate_constraints(
12373 &self,
12374 path: &str,
12375 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12376 ) {
12377 match self {
12378 Self::Cd(inner) => {
12379 let snap = violations.len();
12380 inner.validate_constraints("", violations);
12381 if violations.len() > snap {
12382 let pfx = format!("{path}/Cd");
12383 for v in &mut violations[snap..] {
12384 v.path.insert_str(0, &pfx);
12385 }
12386 }
12387 }
12388 Self::Prtry(inner) => {
12389 let snap = violations.len();
12390 inner.validate_constraints("", violations);
12391 if violations.len() > snap {
12392 let pfx = format!("{path}/Prtry");
12393 for v in &mut violations[snap..] {
12394 v.path.insert_str(0, &pfx);
12395 }
12396 }
12397 }
12398 }
12399 }
12400}
12401impl crate::common::validate::Validatable for CategoryPurpose1Choice {
12402 fn validate_constraints(
12403 &self,
12404 path: &str,
12405 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12406 ) {
12407 match self {
12408 Self::Cd(inner) => {
12409 let snap = violations.len();
12410 inner.validate_constraints("", violations);
12411 if violations.len() > snap {
12412 let pfx = format!("{path}/Cd");
12413 for v in &mut violations[snap..] {
12414 v.path.insert_str(0, &pfx);
12415 }
12416 }
12417 }
12418 Self::Prtry(inner) => {
12419 let snap = violations.len();
12420 inner.validate_constraints("", violations);
12421 if violations.len() > snap {
12422 let pfx = format!("{path}/Prtry");
12423 for v in &mut violations[snap..] {
12424 v.path.insert_str(0, &pfx);
12425 }
12426 }
12427 }
12428 }
12429 }
12430}
12431impl crate::common::validate::Validatable for ChargeType3Choice {
12432 fn validate_constraints(
12433 &self,
12434 path: &str,
12435 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12436 ) {
12437 match self {
12438 Self::Cd(inner) => {
12439 let snap = violations.len();
12440 inner.validate_constraints("", violations);
12441 if violations.len() > snap {
12442 let pfx = format!("{path}/Cd");
12443 for v in &mut violations[snap..] {
12444 v.path.insert_str(0, &pfx);
12445 }
12446 }
12447 }
12448 Self::Prtry(inner) => {
12449 let snap = violations.len();
12450 inner.validate_constraints("", violations);
12451 if violations.len() > snap {
12452 let pfx = format!("{path}/Prtry");
12453 for v in &mut violations[snap..] {
12454 v.path.insert_str(0, &pfx);
12455 }
12456 }
12457 }
12458 }
12459 }
12460}
12461impl crate::common::validate::Validatable for Charges16 {
12462 fn validate_constraints(
12463 &self,
12464 path: &str,
12465 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12466 ) {
12467 {
12468 let snap = violations.len();
12469 self.amt.validate_constraints("", violations);
12470 if violations.len() > snap {
12471 let pfx = format!("{path}/Amt");
12472 for v in &mut violations[snap..] {
12473 v.path.insert_str(0, &pfx);
12474 }
12475 }
12476 }
12477 {
12478 let snap = violations.len();
12479 self.agt.validate_constraints("", violations);
12480 if violations.len() > snap {
12481 let pfx = format!("{path}/Agt");
12482 for v in &mut violations[snap..] {
12483 v.path.insert_str(0, &pfx);
12484 }
12485 }
12486 }
12487 if let Some(ref wrapper) = self.tp {
12488 let snap = violations.len();
12489 wrapper.inner.validate_constraints("", violations);
12490 if violations.len() > snap {
12491 let pfx = format!("{path}/Tp");
12492 for v in &mut violations[snap..] {
12493 v.path.insert_str(0, &pfx);
12494 }
12495 }
12496 }
12497 }
12498}
12499impl crate::common::validate::Validatable for ClearingSystemIdentification2Choice {
12500 fn validate_constraints(
12501 &self,
12502 path: &str,
12503 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12504 ) {
12505 match self {
12506 Self::Cd(inner) => {
12507 let snap = violations.len();
12508 inner.validate_constraints("", violations);
12509 if violations.len() > snap {
12510 let pfx = format!("{path}/Cd");
12511 for v in &mut violations[snap..] {
12512 v.path.insert_str(0, &pfx);
12513 }
12514 }
12515 }
12516 Self::Prtry(inner) => {
12517 let snap = violations.len();
12518 inner.validate_constraints("", violations);
12519 if violations.len() > snap {
12520 let pfx = format!("{path}/Prtry");
12521 for v in &mut violations[snap..] {
12522 v.path.insert_str(0, &pfx);
12523 }
12524 }
12525 }
12526 }
12527 }
12528}
12529impl crate::common::validate::Validatable for ClearingSystemIdentification3Choice {
12530 fn validate_constraints(
12531 &self,
12532 path: &str,
12533 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12534 ) {
12535 match self {
12536 Self::Cd(inner) => {
12537 let snap = violations.len();
12538 inner.validate_constraints("", violations);
12539 if violations.len() > snap {
12540 let pfx = format!("{path}/Cd");
12541 for v in &mut violations[snap..] {
12542 v.path.insert_str(0, &pfx);
12543 }
12544 }
12545 }
12546 Self::Prtry(inner) => {
12547 let snap = violations.len();
12548 inner.validate_constraints("", violations);
12549 if violations.len() > snap {
12550 let pfx = format!("{path}/Prtry");
12551 for v in &mut violations[snap..] {
12552 v.path.insert_str(0, &pfx);
12553 }
12554 }
12555 }
12556 }
12557 }
12558}
12559impl crate::common::validate::Validatable for ClearingSystemMemberIdentification2 {
12560 fn validate_constraints(
12561 &self,
12562 path: &str,
12563 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12564 ) {
12565 if let Some(ref wrapper) = self.clr_sys_id {
12566 let snap = violations.len();
12567 wrapper.inner.validate_constraints("", violations);
12568 if violations.len() > snap {
12569 let pfx = format!("{path}/ClrSysId");
12570 for v in &mut violations[snap..] {
12571 v.path.insert_str(0, &pfx);
12572 }
12573 }
12574 }
12575 {
12576 let snap = violations.len();
12577 self.mmb_id.validate_constraints("", violations);
12578 if violations.len() > snap {
12579 let pfx = format!("{path}/MmbId");
12580 for v in &mut violations[snap..] {
12581 v.path.insert_str(0, &pfx);
12582 }
12583 }
12584 }
12585 }
12586}
12587impl crate::common::validate::Validatable for Contact13 {
12588 fn validate_constraints(
12589 &self,
12590 path: &str,
12591 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12592 ) {
12593 if let Some(ref val) = self.nm_prfx {
12594 let snap = violations.len();
12595 val.validate_constraints("", violations);
12596 if violations.len() > snap {
12597 let pfx = format!("{path}/NmPrfx");
12598 for v in &mut violations[snap..] {
12599 v.path.insert_str(0, &pfx);
12600 }
12601 }
12602 }
12603 if let Some(ref val) = self.nm {
12604 let snap = violations.len();
12605 val.validate_constraints("", violations);
12606 if violations.len() > snap {
12607 let pfx = format!("{path}/Nm");
12608 for v in &mut violations[snap..] {
12609 v.path.insert_str(0, &pfx);
12610 }
12611 }
12612 }
12613 if let Some(ref val) = self.phne_nb {
12614 let snap = violations.len();
12615 val.validate_constraints("", violations);
12616 if violations.len() > snap {
12617 let pfx = format!("{path}/PhneNb");
12618 for v in &mut violations[snap..] {
12619 v.path.insert_str(0, &pfx);
12620 }
12621 }
12622 }
12623 if let Some(ref val) = self.mob_nb {
12624 let snap = violations.len();
12625 val.validate_constraints("", violations);
12626 if violations.len() > snap {
12627 let pfx = format!("{path}/MobNb");
12628 for v in &mut violations[snap..] {
12629 v.path.insert_str(0, &pfx);
12630 }
12631 }
12632 }
12633 if let Some(ref val) = self.fax_nb {
12634 let snap = violations.len();
12635 val.validate_constraints("", violations);
12636 if violations.len() > snap {
12637 let pfx = format!("{path}/FaxNb");
12638 for v in &mut violations[snap..] {
12639 v.path.insert_str(0, &pfx);
12640 }
12641 }
12642 }
12643 if let Some(ref val) = self.url_adr {
12644 let snap = violations.len();
12645 val.validate_constraints("", violations);
12646 if violations.len() > snap {
12647 let pfx = format!("{path}/URLAdr");
12648 for v in &mut violations[snap..] {
12649 v.path.insert_str(0, &pfx);
12650 }
12651 }
12652 }
12653 if let Some(ref val) = self.email_adr {
12654 let snap = violations.len();
12655 val.validate_constraints("", violations);
12656 if violations.len() > snap {
12657 let pfx = format!("{path}/EmailAdr");
12658 for v in &mut violations[snap..] {
12659 v.path.insert_str(0, &pfx);
12660 }
12661 }
12662 }
12663 if let Some(ref val) = self.email_purp {
12664 let snap = violations.len();
12665 val.validate_constraints("", violations);
12666 if violations.len() > snap {
12667 let pfx = format!("{path}/EmailPurp");
12668 for v in &mut violations[snap..] {
12669 v.path.insert_str(0, &pfx);
12670 }
12671 }
12672 }
12673 if let Some(ref val) = self.job_titl {
12674 let snap = violations.len();
12675 val.validate_constraints("", violations);
12676 if violations.len() > snap {
12677 let pfx = format!("{path}/JobTitl");
12678 for v in &mut violations[snap..] {
12679 v.path.insert_str(0, &pfx);
12680 }
12681 }
12682 }
12683 if let Some(ref val) = self.rspnsblty {
12684 let snap = violations.len();
12685 val.validate_constraints("", violations);
12686 if violations.len() > snap {
12687 let pfx = format!("{path}/Rspnsblty");
12688 for v in &mut violations[snap..] {
12689 v.path.insert_str(0, &pfx);
12690 }
12691 }
12692 }
12693 if let Some(ref val) = self.dept {
12694 let snap = violations.len();
12695 val.validate_constraints("", violations);
12696 if violations.len() > snap {
12697 let pfx = format!("{path}/Dept");
12698 for v in &mut violations[snap..] {
12699 v.path.insert_str(0, &pfx);
12700 }
12701 }
12702 }
12703 for (idx, elem) in self.othr.iter().enumerate() {
12704 let snap = violations.len();
12705 elem.validate_constraints("", violations);
12706 if violations.len() > snap {
12707 let pfx = format!("{path}/Othr[{idx}]");
12708 for v in &mut violations[snap..] {
12709 v.path.insert_str(0, &pfx);
12710 }
12711 }
12712 }
12713 if let Some(ref val) = self.prefrd_mtd {
12714 let snap = violations.len();
12715 val.validate_constraints("", violations);
12716 if violations.len() > snap {
12717 let pfx = format!("{path}/PrefrdMtd");
12718 for v in &mut violations[snap..] {
12719 v.path.insert_str(0, &pfx);
12720 }
12721 }
12722 }
12723 }
12724}
12725impl crate::common::validate::Validatable for CreditTransferMandateData1 {
12726 fn validate_constraints(
12727 &self,
12728 path: &str,
12729 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12730 ) {
12731 if let Some(ref val) = self.mndt_id {
12732 let snap = violations.len();
12733 val.validate_constraints("", violations);
12734 if violations.len() > snap {
12735 let pfx = format!("{path}/MndtId");
12736 for v in &mut violations[snap..] {
12737 v.path.insert_str(0, &pfx);
12738 }
12739 }
12740 }
12741 if let Some(ref val) = self.tp {
12742 let snap = violations.len();
12743 val.validate_constraints("", violations);
12744 if violations.len() > snap {
12745 let pfx = format!("{path}/Tp");
12746 for v in &mut violations[snap..] {
12747 v.path.insert_str(0, &pfx);
12748 }
12749 }
12750 }
12751 if let Some(ref val) = self.dt_of_sgntr {
12752 let snap = violations.len();
12753 val.validate_constraints("", violations);
12754 if violations.len() > snap {
12755 let pfx = format!("{path}/DtOfSgntr");
12756 for v in &mut violations[snap..] {
12757 v.path.insert_str(0, &pfx);
12758 }
12759 }
12760 }
12761 if let Some(ref val) = self.dt_of_vrfctn {
12762 let snap = violations.len();
12763 val.validate_constraints("", violations);
12764 if violations.len() > snap {
12765 let pfx = format!("{path}/DtOfVrfctn");
12766 for v in &mut violations[snap..] {
12767 v.path.insert_str(0, &pfx);
12768 }
12769 }
12770 }
12771 if let Some(ref val) = self.elctrnc_sgntr {
12772 let snap = violations.len();
12773 val.validate_constraints("", violations);
12774 if violations.len() > snap {
12775 let pfx = format!("{path}/ElctrncSgntr");
12776 for v in &mut violations[snap..] {
12777 v.path.insert_str(0, &pfx);
12778 }
12779 }
12780 }
12781 if let Some(ref val) = self.frst_pmt_dt {
12782 let snap = violations.len();
12783 val.validate_constraints("", violations);
12784 if violations.len() > snap {
12785 let pfx = format!("{path}/FrstPmtDt");
12786 for v in &mut violations[snap..] {
12787 v.path.insert_str(0, &pfx);
12788 }
12789 }
12790 }
12791 if let Some(ref val) = self.fnl_pmt_dt {
12792 let snap = violations.len();
12793 val.validate_constraints("", violations);
12794 if violations.len() > snap {
12795 let pfx = format!("{path}/FnlPmtDt");
12796 for v in &mut violations[snap..] {
12797 v.path.insert_str(0, &pfx);
12798 }
12799 }
12800 }
12801 if let Some(ref wrapper) = self.frqcy {
12802 let snap = violations.len();
12803 wrapper.inner.validate_constraints("", violations);
12804 if violations.len() > snap {
12805 let pfx = format!("{path}/Frqcy");
12806 for v in &mut violations[snap..] {
12807 v.path.insert_str(0, &pfx);
12808 }
12809 }
12810 }
12811 if let Some(ref wrapper) = self.rsn {
12812 let snap = violations.len();
12813 wrapper.inner.validate_constraints("", violations);
12814 if violations.len() > snap {
12815 let pfx = format!("{path}/Rsn");
12816 for v in &mut violations[snap..] {
12817 v.path.insert_str(0, &pfx);
12818 }
12819 }
12820 }
12821 }
12822}
12823impl crate::common::validate::Validatable for CreditorReferenceInformation3 {
12824 fn validate_constraints(
12825 &self,
12826 path: &str,
12827 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12828 ) {
12829 if let Some(ref val) = self.tp {
12830 let snap = violations.len();
12831 val.validate_constraints("", violations);
12832 if violations.len() > snap {
12833 let pfx = format!("{path}/Tp");
12834 for v in &mut violations[snap..] {
12835 v.path.insert_str(0, &pfx);
12836 }
12837 }
12838 }
12839 if let Some(ref val) = self.r#ref {
12840 let snap = violations.len();
12841 val.validate_constraints("", violations);
12842 if violations.len() > snap {
12843 let pfx = format!("{path}/Ref");
12844 for v in &mut violations[snap..] {
12845 v.path.insert_str(0, &pfx);
12846 }
12847 }
12848 }
12849 }
12850}
12851impl crate::common::validate::Validatable for CreditorReferenceType2Choice {
12852 fn validate_constraints(
12853 &self,
12854 path: &str,
12855 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12856 ) {
12857 match self {
12858 Self::Cd(inner) => {
12859 let snap = violations.len();
12860 inner.validate_constraints("", violations);
12861 if violations.len() > snap {
12862 let pfx = format!("{path}/Cd");
12863 for v in &mut violations[snap..] {
12864 v.path.insert_str(0, &pfx);
12865 }
12866 }
12867 }
12868 Self::Prtry(inner) => {
12869 let snap = violations.len();
12870 inner.validate_constraints("", violations);
12871 if violations.len() > snap {
12872 let pfx = format!("{path}/Prtry");
12873 for v in &mut violations[snap..] {
12874 v.path.insert_str(0, &pfx);
12875 }
12876 }
12877 }
12878 }
12879 }
12880}
12881impl crate::common::validate::Validatable for CreditorReferenceType3 {
12882 fn validate_constraints(
12883 &self,
12884 path: &str,
12885 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12886 ) {
12887 {
12888 let snap = violations.len();
12889 self.cd_or_prtry.inner.validate_constraints("", violations);
12890 if violations.len() > snap {
12891 let pfx = format!("{path}/CdOrPrtry");
12892 for v in &mut violations[snap..] {
12893 v.path.insert_str(0, &pfx);
12894 }
12895 }
12896 }
12897 if let Some(ref val) = self.issr {
12898 let snap = violations.len();
12899 val.validate_constraints("", violations);
12900 if violations.len() > snap {
12901 let pfx = format!("{path}/Issr");
12902 for v in &mut violations[snap..] {
12903 v.path.insert_str(0, &pfx);
12904 }
12905 }
12906 }
12907 }
12908}
12909impl crate::common::validate::Validatable for DateAndDateTime2Choice {
12910 fn validate_constraints(
12911 &self,
12912 path: &str,
12913 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12914 ) {
12915 match self {
12916 Self::Dt(inner) => {
12917 let snap = violations.len();
12918 inner.validate_constraints("", violations);
12919 if violations.len() > snap {
12920 let pfx = format!("{path}/Dt");
12921 for v in &mut violations[snap..] {
12922 v.path.insert_str(0, &pfx);
12923 }
12924 }
12925 }
12926 Self::DtTm(inner) => {
12927 let snap = violations.len();
12928 inner.validate_constraints("", violations);
12929 if violations.len() > snap {
12930 let pfx = format!("{path}/DtTm");
12931 for v in &mut violations[snap..] {
12932 v.path.insert_str(0, &pfx);
12933 }
12934 }
12935 }
12936 }
12937 }
12938}
12939impl crate::common::validate::Validatable for DateAndPlaceOfBirth1 {
12940 fn validate_constraints(
12941 &self,
12942 path: &str,
12943 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12944 ) {
12945 {
12946 let snap = violations.len();
12947 self.birth_dt.validate_constraints("", violations);
12948 if violations.len() > snap {
12949 let pfx = format!("{path}/BirthDt");
12950 for v in &mut violations[snap..] {
12951 v.path.insert_str(0, &pfx);
12952 }
12953 }
12954 }
12955 if let Some(ref val) = self.prvc_of_birth {
12956 let snap = violations.len();
12957 val.validate_constraints("", violations);
12958 if violations.len() > snap {
12959 let pfx = format!("{path}/PrvcOfBirth");
12960 for v in &mut violations[snap..] {
12961 v.path.insert_str(0, &pfx);
12962 }
12963 }
12964 }
12965 {
12966 let snap = violations.len();
12967 self.city_of_birth.validate_constraints("", violations);
12968 if violations.len() > snap {
12969 let pfx = format!("{path}/CityOfBirth");
12970 for v in &mut violations[snap..] {
12971 v.path.insert_str(0, &pfx);
12972 }
12973 }
12974 }
12975 {
12976 let snap = violations.len();
12977 self.ctry_of_birth.validate_constraints("", violations);
12978 if violations.len() > snap {
12979 let pfx = format!("{path}/CtryOfBirth");
12980 for v in &mut violations[snap..] {
12981 v.path.insert_str(0, &pfx);
12982 }
12983 }
12984 }
12985 }
12986}
12987impl crate::common::validate::Validatable for DateAndType1 {
12988 fn validate_constraints(
12989 &self,
12990 path: &str,
12991 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12992 ) {
12993 {
12994 let snap = violations.len();
12995 self.tp.inner.validate_constraints("", violations);
12996 if violations.len() > snap {
12997 let pfx = format!("{path}/Tp");
12998 for v in &mut violations[snap..] {
12999 v.path.insert_str(0, &pfx);
13000 }
13001 }
13002 }
13003 {
13004 let snap = violations.len();
13005 self.dt.validate_constraints("", violations);
13006 if violations.len() > snap {
13007 let pfx = format!("{path}/Dt");
13008 for v in &mut violations[snap..] {
13009 v.path.insert_str(0, &pfx);
13010 }
13011 }
13012 }
13013 }
13014}
13015impl crate::common::validate::Validatable for DatePeriod2 {
13016 fn validate_constraints(
13017 &self,
13018 path: &str,
13019 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13020 ) {
13021 {
13022 let snap = violations.len();
13023 self.fr_dt.validate_constraints("", violations);
13024 if violations.len() > snap {
13025 let pfx = format!("{path}/FrDt");
13026 for v in &mut violations[snap..] {
13027 v.path.insert_str(0, &pfx);
13028 }
13029 }
13030 }
13031 {
13032 let snap = violations.len();
13033 self.to_dt.validate_constraints("", violations);
13034 if violations.len() > snap {
13035 let pfx = format!("{path}/ToDt");
13036 for v in &mut violations[snap..] {
13037 v.path.insert_str(0, &pfx);
13038 }
13039 }
13040 }
13041 }
13042}
13043impl crate::common::validate::Validatable for DateType2Choice {
13044 fn validate_constraints(
13045 &self,
13046 path: &str,
13047 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13048 ) {
13049 match self {
13050 Self::Cd(inner) => {
13051 let snap = violations.len();
13052 inner.validate_constraints("", violations);
13053 if violations.len() > snap {
13054 let pfx = format!("{path}/Cd");
13055 for v in &mut violations[snap..] {
13056 v.path.insert_str(0, &pfx);
13057 }
13058 }
13059 }
13060 Self::Prtry(inner) => {
13061 let snap = violations.len();
13062 inner.validate_constraints("", violations);
13063 if violations.len() > snap {
13064 let pfx = format!("{path}/Prtry");
13065 for v in &mut violations[snap..] {
13066 v.path.insert_str(0, &pfx);
13067 }
13068 }
13069 }
13070 }
13071 }
13072}
13073impl crate::common::validate::Validatable for Document {
13074 fn validate_constraints(
13075 &self,
13076 path: &str,
13077 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13078 ) {
13079 {
13080 let snap = violations.len();
13081 self.fi_to_fi_pmt_sts_rpt
13082 .validate_constraints("", violations);
13083 if violations.len() > snap {
13084 let pfx = format!("{path}/FIToFIPmtStsRpt");
13085 for v in &mut violations[snap..] {
13086 v.path.insert_str(0, &pfx);
13087 }
13088 }
13089 }
13090 }
13091}
13092impl crate::common::validate::Validatable for DocumentAdjustment1 {
13093 fn validate_constraints(
13094 &self,
13095 path: &str,
13096 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13097 ) {
13098 {
13099 let snap = violations.len();
13100 self.amt.validate_constraints("", violations);
13101 if violations.len() > snap {
13102 let pfx = format!("{path}/Amt");
13103 for v in &mut violations[snap..] {
13104 v.path.insert_str(0, &pfx);
13105 }
13106 }
13107 }
13108 if let Some(ref val) = self.cdt_dbt_ind {
13109 let snap = violations.len();
13110 val.validate_constraints("", violations);
13111 if violations.len() > snap {
13112 let pfx = format!("{path}/CdtDbtInd");
13113 for v in &mut violations[snap..] {
13114 v.path.insert_str(0, &pfx);
13115 }
13116 }
13117 }
13118 if let Some(ref val) = self.rsn {
13119 let snap = violations.len();
13120 val.validate_constraints("", violations);
13121 if violations.len() > snap {
13122 let pfx = format!("{path}/Rsn");
13123 for v in &mut violations[snap..] {
13124 v.path.insert_str(0, &pfx);
13125 }
13126 }
13127 }
13128 if let Some(ref val) = self.addtl_inf {
13129 let snap = violations.len();
13130 val.validate_constraints("", violations);
13131 if violations.len() > snap {
13132 let pfx = format!("{path}/AddtlInf");
13133 for v in &mut violations[snap..] {
13134 v.path.insert_str(0, &pfx);
13135 }
13136 }
13137 }
13138 }
13139}
13140impl crate::common::validate::Validatable for DocumentAmount1 {
13141 fn validate_constraints(
13142 &self,
13143 path: &str,
13144 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13145 ) {
13146 {
13147 let snap = violations.len();
13148 self.tp.inner.validate_constraints("", violations);
13149 if violations.len() > snap {
13150 let pfx = format!("{path}/Tp");
13151 for v in &mut violations[snap..] {
13152 v.path.insert_str(0, &pfx);
13153 }
13154 }
13155 }
13156 {
13157 let snap = violations.len();
13158 self.amt.validate_constraints("", violations);
13159 if violations.len() > snap {
13160 let pfx = format!("{path}/Amt");
13161 for v in &mut violations[snap..] {
13162 v.path.insert_str(0, &pfx);
13163 }
13164 }
13165 }
13166 }
13167}
13168impl crate::common::validate::Validatable for DocumentAmountType1Choice {
13169 fn validate_constraints(
13170 &self,
13171 path: &str,
13172 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13173 ) {
13174 match self {
13175 Self::Cd(inner) => {
13176 let snap = violations.len();
13177 inner.validate_constraints("", violations);
13178 if violations.len() > snap {
13179 let pfx = format!("{path}/Cd");
13180 for v in &mut violations[snap..] {
13181 v.path.insert_str(0, &pfx);
13182 }
13183 }
13184 }
13185 Self::Prtry(inner) => {
13186 let snap = violations.len();
13187 inner.validate_constraints("", violations);
13188 if violations.len() > snap {
13189 let pfx = format!("{path}/Prtry");
13190 for v in &mut violations[snap..] {
13191 v.path.insert_str(0, &pfx);
13192 }
13193 }
13194 }
13195 }
13196 }
13197}
13198impl crate::common::validate::Validatable for DocumentLineIdentification1 {
13199 fn validate_constraints(
13200 &self,
13201 path: &str,
13202 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13203 ) {
13204 if let Some(ref val) = self.tp {
13205 let snap = violations.len();
13206 val.validate_constraints("", violations);
13207 if violations.len() > snap {
13208 let pfx = format!("{path}/Tp");
13209 for v in &mut violations[snap..] {
13210 v.path.insert_str(0, &pfx);
13211 }
13212 }
13213 }
13214 if let Some(ref val) = self.nb {
13215 let snap = violations.len();
13216 val.validate_constraints("", violations);
13217 if violations.len() > snap {
13218 let pfx = format!("{path}/Nb");
13219 for v in &mut violations[snap..] {
13220 v.path.insert_str(0, &pfx);
13221 }
13222 }
13223 }
13224 if let Some(ref val) = self.rltd_dt {
13225 let snap = violations.len();
13226 val.validate_constraints("", violations);
13227 if violations.len() > snap {
13228 let pfx = format!("{path}/RltdDt");
13229 for v in &mut violations[snap..] {
13230 v.path.insert_str(0, &pfx);
13231 }
13232 }
13233 }
13234 }
13235}
13236impl crate::common::validate::Validatable for DocumentLineInformation2 {
13237 fn validate_constraints(
13238 &self,
13239 path: &str,
13240 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13241 ) {
13242 for (idx, elem) in self.id.iter().enumerate() {
13243 let snap = violations.len();
13244 elem.validate_constraints("", violations);
13245 if violations.len() > snap {
13246 let pfx = format!("{path}/Id[{idx}]");
13247 for v in &mut violations[snap..] {
13248 v.path.insert_str(0, &pfx);
13249 }
13250 }
13251 }
13252 if let Some(ref val) = self.desc {
13253 let snap = violations.len();
13254 val.validate_constraints("", violations);
13255 if violations.len() > snap {
13256 let pfx = format!("{path}/Desc");
13257 for v in &mut violations[snap..] {
13258 v.path.insert_str(0, &pfx);
13259 }
13260 }
13261 }
13262 if let Some(ref val) = self.amt {
13263 let snap = violations.len();
13264 val.validate_constraints("", violations);
13265 if violations.len() > snap {
13266 let pfx = format!("{path}/Amt");
13267 for v in &mut violations[snap..] {
13268 v.path.insert_str(0, &pfx);
13269 }
13270 }
13271 }
13272 }
13273}
13274impl crate::common::validate::Validatable for DocumentLineType1 {
13275 fn validate_constraints(
13276 &self,
13277 path: &str,
13278 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13279 ) {
13280 {
13281 let snap = violations.len();
13282 self.cd_or_prtry.inner.validate_constraints("", violations);
13283 if violations.len() > snap {
13284 let pfx = format!("{path}/CdOrPrtry");
13285 for v in &mut violations[snap..] {
13286 v.path.insert_str(0, &pfx);
13287 }
13288 }
13289 }
13290 if let Some(ref val) = self.issr {
13291 let snap = violations.len();
13292 val.validate_constraints("", violations);
13293 if violations.len() > snap {
13294 let pfx = format!("{path}/Issr");
13295 for v in &mut violations[snap..] {
13296 v.path.insert_str(0, &pfx);
13297 }
13298 }
13299 }
13300 }
13301}
13302impl crate::common::validate::Validatable for DocumentLineType1Choice {
13303 fn validate_constraints(
13304 &self,
13305 path: &str,
13306 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13307 ) {
13308 match self {
13309 Self::Cd(inner) => {
13310 let snap = violations.len();
13311 inner.validate_constraints("", violations);
13312 if violations.len() > snap {
13313 let pfx = format!("{path}/Cd");
13314 for v in &mut violations[snap..] {
13315 v.path.insert_str(0, &pfx);
13316 }
13317 }
13318 }
13319 Self::Prtry(inner) => {
13320 let snap = violations.len();
13321 inner.validate_constraints("", violations);
13322 if violations.len() > snap {
13323 let pfx = format!("{path}/Prtry");
13324 for v in &mut violations[snap..] {
13325 v.path.insert_str(0, &pfx);
13326 }
13327 }
13328 }
13329 }
13330 }
13331}
13332impl crate::common::validate::Validatable for DocumentType1 {
13333 fn validate_constraints(
13334 &self,
13335 path: &str,
13336 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13337 ) {
13338 {
13339 let snap = violations.len();
13340 self.cd_or_prtry.inner.validate_constraints("", violations);
13341 if violations.len() > snap {
13342 let pfx = format!("{path}/CdOrPrtry");
13343 for v in &mut violations[snap..] {
13344 v.path.insert_str(0, &pfx);
13345 }
13346 }
13347 }
13348 if let Some(ref val) = self.issr {
13349 let snap = violations.len();
13350 val.validate_constraints("", violations);
13351 if violations.len() > snap {
13352 let pfx = format!("{path}/Issr");
13353 for v in &mut violations[snap..] {
13354 v.path.insert_str(0, &pfx);
13355 }
13356 }
13357 }
13358 }
13359}
13360impl crate::common::validate::Validatable for DocumentType2Choice {
13361 fn validate_constraints(
13362 &self,
13363 path: &str,
13364 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13365 ) {
13366 match self {
13367 Self::Cd(inner) => {
13368 let snap = violations.len();
13369 inner.validate_constraints("", violations);
13370 if violations.len() > snap {
13371 let pfx = format!("{path}/Cd");
13372 for v in &mut violations[snap..] {
13373 v.path.insert_str(0, &pfx);
13374 }
13375 }
13376 }
13377 Self::Prtry(inner) => {
13378 let snap = violations.len();
13379 inner.validate_constraints("", violations);
13380 if violations.len() > snap {
13381 let pfx = format!("{path}/Prtry");
13382 for v in &mut violations[snap..] {
13383 v.path.insert_str(0, &pfx);
13384 }
13385 }
13386 }
13387 }
13388 }
13389}
13390impl crate::common::validate::Validatable for EquivalentAmount2 {
13391 fn validate_constraints(
13392 &self,
13393 path: &str,
13394 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13395 ) {
13396 {
13397 let snap = violations.len();
13398 self.amt.validate_constraints("", violations);
13399 if violations.len() > snap {
13400 let pfx = format!("{path}/Amt");
13401 for v in &mut violations[snap..] {
13402 v.path.insert_str(0, &pfx);
13403 }
13404 }
13405 }
13406 {
13407 let snap = violations.len();
13408 self.ccy_of_trf.validate_constraints("", violations);
13409 if violations.len() > snap {
13410 let pfx = format!("{path}/CcyOfTrf");
13411 for v in &mut violations[snap..] {
13412 v.path.insert_str(0, &pfx);
13413 }
13414 }
13415 }
13416 }
13417}
13418impl crate::common::validate::Validatable for FIToFIPaymentStatusReportV14 {
13419 fn validate_constraints(
13420 &self,
13421 path: &str,
13422 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13423 ) {
13424 {
13425 let snap = violations.len();
13426 self.grp_hdr.validate_constraints("", violations);
13427 if violations.len() > snap {
13428 let pfx = format!("{path}/GrpHdr");
13429 for v in &mut violations[snap..] {
13430 v.path.insert_str(0, &pfx);
13431 }
13432 }
13433 }
13434 for (idx, elem) in self.orgnl_grp_inf_and_sts.iter().enumerate() {
13435 let snap = violations.len();
13436 elem.validate_constraints("", violations);
13437 if violations.len() > snap {
13438 let pfx = format!("{path}/OrgnlGrpInfAndSts[{idx}]");
13439 for v in &mut violations[snap..] {
13440 v.path.insert_str(0, &pfx);
13441 }
13442 }
13443 }
13444 for (idx, elem) in self.tx_inf_and_sts.iter().enumerate() {
13445 let snap = violations.len();
13446 elem.validate_constraints("", violations);
13447 if violations.len() > snap {
13448 let pfx = format!("{path}/TxInfAndSts[{idx}]");
13449 for v in &mut violations[snap..] {
13450 v.path.insert_str(0, &pfx);
13451 }
13452 }
13453 }
13454 for (idx, elem) in self.splmtry_data.iter().enumerate() {
13455 let snap = violations.len();
13456 elem.validate_constraints("", violations);
13457 if violations.len() > snap {
13458 let pfx = format!("{path}/SplmtryData[{idx}]");
13459 for v in &mut violations[snap..] {
13460 v.path.insert_str(0, &pfx);
13461 }
13462 }
13463 }
13464 }
13465}
13466impl crate::common::validate::Validatable for FinancialIdentificationSchemeName1Choice {
13467 fn validate_constraints(
13468 &self,
13469 path: &str,
13470 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13471 ) {
13472 match self {
13473 Self::Cd(inner) => {
13474 let snap = violations.len();
13475 inner.validate_constraints("", violations);
13476 if violations.len() > snap {
13477 let pfx = format!("{path}/Cd");
13478 for v in &mut violations[snap..] {
13479 v.path.insert_str(0, &pfx);
13480 }
13481 }
13482 }
13483 Self::Prtry(inner) => {
13484 let snap = violations.len();
13485 inner.validate_constraints("", violations);
13486 if violations.len() > snap {
13487 let pfx = format!("{path}/Prtry");
13488 for v in &mut violations[snap..] {
13489 v.path.insert_str(0, &pfx);
13490 }
13491 }
13492 }
13493 }
13494 }
13495}
13496impl crate::common::validate::Validatable for FinancialInstitutionIdentification23 {
13497 fn validate_constraints(
13498 &self,
13499 path: &str,
13500 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13501 ) {
13502 if let Some(ref val) = self.bicfi {
13503 let snap = violations.len();
13504 val.validate_constraints("", violations);
13505 if violations.len() > snap {
13506 let pfx = format!("{path}/BICFI");
13507 for v in &mut violations[snap..] {
13508 v.path.insert_str(0, &pfx);
13509 }
13510 }
13511 }
13512 if let Some(ref val) = self.clr_sys_mmb_id {
13513 let snap = violations.len();
13514 val.validate_constraints("", violations);
13515 if violations.len() > snap {
13516 let pfx = format!("{path}/ClrSysMmbId");
13517 for v in &mut violations[snap..] {
13518 v.path.insert_str(0, &pfx);
13519 }
13520 }
13521 }
13522 if let Some(ref val) = self.lei {
13523 let snap = violations.len();
13524 val.validate_constraints("", violations);
13525 if violations.len() > snap {
13526 let pfx = format!("{path}/LEI");
13527 for v in &mut violations[snap..] {
13528 v.path.insert_str(0, &pfx);
13529 }
13530 }
13531 }
13532 if let Some(ref val) = self.nm {
13533 let snap = violations.len();
13534 val.validate_constraints("", violations);
13535 if violations.len() > snap {
13536 let pfx = format!("{path}/Nm");
13537 for v in &mut violations[snap..] {
13538 v.path.insert_str(0, &pfx);
13539 }
13540 }
13541 }
13542 if let Some(ref val) = self.pstl_adr {
13543 let snap = violations.len();
13544 val.validate_constraints("", violations);
13545 if violations.len() > snap {
13546 let pfx = format!("{path}/PstlAdr");
13547 for v in &mut violations[snap..] {
13548 v.path.insert_str(0, &pfx);
13549 }
13550 }
13551 }
13552 if let Some(ref val) = self.othr {
13553 let snap = violations.len();
13554 val.validate_constraints("", violations);
13555 if violations.len() > snap {
13556 let pfx = format!("{path}/Othr");
13557 for v in &mut violations[snap..] {
13558 v.path.insert_str(0, &pfx);
13559 }
13560 }
13561 }
13562 }
13563}
13564impl crate::common::validate::Validatable for Frequency36Choice {
13565 fn validate_constraints(
13566 &self,
13567 path: &str,
13568 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13569 ) {
13570 match self {
13571 Self::Tp(inner) => {
13572 let snap = violations.len();
13573 inner.validate_constraints("", violations);
13574 if violations.len() > snap {
13575 let pfx = format!("{path}/Tp");
13576 for v in &mut violations[snap..] {
13577 v.path.insert_str(0, &pfx);
13578 }
13579 }
13580 }
13581 Self::Prd(inner) => {
13582 let snap = violations.len();
13583 inner.validate_constraints("", violations);
13584 if violations.len() > snap {
13585 let pfx = format!("{path}/Prd");
13586 for v in &mut violations[snap..] {
13587 v.path.insert_str(0, &pfx);
13588 }
13589 }
13590 }
13591 Self::PtInTm(inner) => {
13592 let snap = violations.len();
13593 inner.validate_constraints("", violations);
13594 if violations.len() > snap {
13595 let pfx = format!("{path}/PtInTm");
13596 for v in &mut violations[snap..] {
13597 v.path.insert_str(0, &pfx);
13598 }
13599 }
13600 }
13601 }
13602 }
13603}
13604impl crate::common::validate::Validatable for FrequencyAndMoment1 {
13605 fn validate_constraints(
13606 &self,
13607 path: &str,
13608 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13609 ) {
13610 {
13611 let snap = violations.len();
13612 self.tp.validate_constraints("", violations);
13613 if violations.len() > snap {
13614 let pfx = format!("{path}/Tp");
13615 for v in &mut violations[snap..] {
13616 v.path.insert_str(0, &pfx);
13617 }
13618 }
13619 }
13620 {
13621 let snap = violations.len();
13622 self.pt_in_tm.validate_constraints("", violations);
13623 if violations.len() > snap {
13624 let pfx = format!("{path}/PtInTm");
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 FrequencyPeriod1 {
13633 fn validate_constraints(
13634 &self,
13635 path: &str,
13636 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13637 ) {
13638 {
13639 let snap = violations.len();
13640 self.tp.validate_constraints("", violations);
13641 if violations.len() > snap {
13642 let pfx = format!("{path}/Tp");
13643 for v in &mut violations[snap..] {
13644 v.path.insert_str(0, &pfx);
13645 }
13646 }
13647 }
13648 {
13649 let snap = violations.len();
13650 self.cnt_per_prd.validate_constraints("", violations);
13651 if violations.len() > snap {
13652 let pfx = format!("{path}/CntPerPrd");
13653 for v in &mut violations[snap..] {
13654 v.path.insert_str(0, &pfx);
13655 }
13656 }
13657 }
13658 }
13659}
13660impl crate::common::validate::Validatable for Garnishment4 {
13661 fn validate_constraints(
13662 &self,
13663 path: &str,
13664 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13665 ) {
13666 {
13667 let snap = violations.len();
13668 self.tp.validate_constraints("", violations);
13669 if violations.len() > snap {
13670 let pfx = format!("{path}/Tp");
13671 for v in &mut violations[snap..] {
13672 v.path.insert_str(0, &pfx);
13673 }
13674 }
13675 }
13676 if let Some(ref val) = self.grnshee {
13677 let snap = violations.len();
13678 val.validate_constraints("", violations);
13679 if violations.len() > snap {
13680 let pfx = format!("{path}/Grnshee");
13681 for v in &mut violations[snap..] {
13682 v.path.insert_str(0, &pfx);
13683 }
13684 }
13685 }
13686 if let Some(ref val) = self.grnshmt_admstr {
13687 let snap = violations.len();
13688 val.validate_constraints("", violations);
13689 if violations.len() > snap {
13690 let pfx = format!("{path}/GrnshmtAdmstr");
13691 for v in &mut violations[snap..] {
13692 v.path.insert_str(0, &pfx);
13693 }
13694 }
13695 }
13696 if let Some(ref val) = self.ref_nb {
13697 let snap = violations.len();
13698 val.validate_constraints("", violations);
13699 if violations.len() > snap {
13700 let pfx = format!("{path}/RefNb");
13701 for v in &mut violations[snap..] {
13702 v.path.insert_str(0, &pfx);
13703 }
13704 }
13705 }
13706 if let Some(ref val) = self.dt {
13707 let snap = violations.len();
13708 val.validate_constraints("", violations);
13709 if violations.len() > snap {
13710 let pfx = format!("{path}/Dt");
13711 for v in &mut violations[snap..] {
13712 v.path.insert_str(0, &pfx);
13713 }
13714 }
13715 }
13716 if let Some(ref val) = self.rmtd_amt {
13717 let snap = violations.len();
13718 val.validate_constraints("", violations);
13719 if violations.len() > snap {
13720 let pfx = format!("{path}/RmtdAmt");
13721 for v in &mut violations[snap..] {
13722 v.path.insert_str(0, &pfx);
13723 }
13724 }
13725 }
13726 if let Some(ref val) = self.fmly_mdcl_insrnc_ind {
13727 let snap = violations.len();
13728 val.validate_constraints("", violations);
13729 if violations.len() > snap {
13730 let pfx = format!("{path}/FmlyMdclInsrncInd");
13731 for v in &mut violations[snap..] {
13732 v.path.insert_str(0, &pfx);
13733 }
13734 }
13735 }
13736 if let Some(ref val) = self.mplyee_termntn_ind {
13737 let snap = violations.len();
13738 val.validate_constraints("", violations);
13739 if violations.len() > snap {
13740 let pfx = format!("{path}/MplyeeTermntnInd");
13741 for v in &mut violations[snap..] {
13742 v.path.insert_str(0, &pfx);
13743 }
13744 }
13745 }
13746 }
13747}
13748impl crate::common::validate::Validatable for GarnishmentType1 {
13749 fn validate_constraints(
13750 &self,
13751 path: &str,
13752 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13753 ) {
13754 {
13755 let snap = violations.len();
13756 self.cd_or_prtry.inner.validate_constraints("", violations);
13757 if violations.len() > snap {
13758 let pfx = format!("{path}/CdOrPrtry");
13759 for v in &mut violations[snap..] {
13760 v.path.insert_str(0, &pfx);
13761 }
13762 }
13763 }
13764 if let Some(ref val) = self.issr {
13765 let snap = violations.len();
13766 val.validate_constraints("", violations);
13767 if violations.len() > snap {
13768 let pfx = format!("{path}/Issr");
13769 for v in &mut violations[snap..] {
13770 v.path.insert_str(0, &pfx);
13771 }
13772 }
13773 }
13774 }
13775}
13776impl crate::common::validate::Validatable for GarnishmentType1Choice {
13777 fn validate_constraints(
13778 &self,
13779 path: &str,
13780 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13781 ) {
13782 match self {
13783 Self::Cd(inner) => {
13784 let snap = violations.len();
13785 inner.validate_constraints("", violations);
13786 if violations.len() > snap {
13787 let pfx = format!("{path}/Cd");
13788 for v in &mut violations[snap..] {
13789 v.path.insert_str(0, &pfx);
13790 }
13791 }
13792 }
13793 Self::Prtry(inner) => {
13794 let snap = violations.len();
13795 inner.validate_constraints("", violations);
13796 if violations.len() > snap {
13797 let pfx = format!("{path}/Prtry");
13798 for v in &mut violations[snap..] {
13799 v.path.insert_str(0, &pfx);
13800 }
13801 }
13802 }
13803 }
13804 }
13805}
13806impl crate::common::validate::Validatable for GenericAccountIdentification1 {
13807 fn validate_constraints(
13808 &self,
13809 path: &str,
13810 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13811 ) {
13812 {
13813 let snap = violations.len();
13814 self.id.validate_constraints("", violations);
13815 if violations.len() > snap {
13816 let pfx = format!("{path}/Id");
13817 for v in &mut violations[snap..] {
13818 v.path.insert_str(0, &pfx);
13819 }
13820 }
13821 }
13822 if let Some(ref wrapper) = self.schme_nm {
13823 let snap = violations.len();
13824 wrapper.inner.validate_constraints("", violations);
13825 if violations.len() > snap {
13826 let pfx = format!("{path}/SchmeNm");
13827 for v in &mut violations[snap..] {
13828 v.path.insert_str(0, &pfx);
13829 }
13830 }
13831 }
13832 if let Some(ref val) = self.issr {
13833 let snap = violations.len();
13834 val.validate_constraints("", violations);
13835 if violations.len() > snap {
13836 let pfx = format!("{path}/Issr");
13837 for v in &mut violations[snap..] {
13838 v.path.insert_str(0, &pfx);
13839 }
13840 }
13841 }
13842 }
13843}
13844impl crate::common::validate::Validatable for GenericFinancialIdentification1 {
13845 fn validate_constraints(
13846 &self,
13847 path: &str,
13848 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13849 ) {
13850 {
13851 let snap = violations.len();
13852 self.id.validate_constraints("", violations);
13853 if violations.len() > snap {
13854 let pfx = format!("{path}/Id");
13855 for v in &mut violations[snap..] {
13856 v.path.insert_str(0, &pfx);
13857 }
13858 }
13859 }
13860 if let Some(ref wrapper) = self.schme_nm {
13861 let snap = violations.len();
13862 wrapper.inner.validate_constraints("", violations);
13863 if violations.len() > snap {
13864 let pfx = format!("{path}/SchmeNm");
13865 for v in &mut violations[snap..] {
13866 v.path.insert_str(0, &pfx);
13867 }
13868 }
13869 }
13870 if let Some(ref val) = self.issr {
13871 let snap = violations.len();
13872 val.validate_constraints("", violations);
13873 if violations.len() > snap {
13874 let pfx = format!("{path}/Issr");
13875 for v in &mut violations[snap..] {
13876 v.path.insert_str(0, &pfx);
13877 }
13878 }
13879 }
13880 }
13881}
13882impl crate::common::validate::Validatable for GenericIdentification3 {
13883 fn validate_constraints(
13884 &self,
13885 path: &str,
13886 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13887 ) {
13888 {
13889 let snap = violations.len();
13890 self.id.validate_constraints("", violations);
13891 if violations.len() > snap {
13892 let pfx = format!("{path}/Id");
13893 for v in &mut violations[snap..] {
13894 v.path.insert_str(0, &pfx);
13895 }
13896 }
13897 }
13898 if let Some(ref val) = self.issr {
13899 let snap = violations.len();
13900 val.validate_constraints("", violations);
13901 if violations.len() > snap {
13902 let pfx = format!("{path}/Issr");
13903 for v in &mut violations[snap..] {
13904 v.path.insert_str(0, &pfx);
13905 }
13906 }
13907 }
13908 }
13909}
13910impl crate::common::validate::Validatable for GenericIdentification30 {
13911 fn validate_constraints(
13912 &self,
13913 path: &str,
13914 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13915 ) {
13916 {
13917 let snap = violations.len();
13918 self.id.validate_constraints("", violations);
13919 if violations.len() > snap {
13920 let pfx = format!("{path}/Id");
13921 for v in &mut violations[snap..] {
13922 v.path.insert_str(0, &pfx);
13923 }
13924 }
13925 }
13926 {
13927 let snap = violations.len();
13928 self.issr.validate_constraints("", violations);
13929 if violations.len() > snap {
13930 let pfx = format!("{path}/Issr");
13931 for v in &mut violations[snap..] {
13932 v.path.insert_str(0, &pfx);
13933 }
13934 }
13935 }
13936 if let Some(ref val) = self.schme_nm {
13937 let snap = violations.len();
13938 val.validate_constraints("", violations);
13939 if violations.len() > snap {
13940 let pfx = format!("{path}/SchmeNm");
13941 for v in &mut violations[snap..] {
13942 v.path.insert_str(0, &pfx);
13943 }
13944 }
13945 }
13946 }
13947}
13948impl crate::common::validate::Validatable for GenericOrganisationIdentification3 {
13949 fn validate_constraints(
13950 &self,
13951 path: &str,
13952 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13953 ) {
13954 {
13955 let snap = violations.len();
13956 self.id.validate_constraints("", violations);
13957 if violations.len() > snap {
13958 let pfx = format!("{path}/Id");
13959 for v in &mut violations[snap..] {
13960 v.path.insert_str(0, &pfx);
13961 }
13962 }
13963 }
13964 if let Some(ref wrapper) = self.schme_nm {
13965 let snap = violations.len();
13966 wrapper.inner.validate_constraints("", violations);
13967 if violations.len() > snap {
13968 let pfx = format!("{path}/SchmeNm");
13969 for v in &mut violations[snap..] {
13970 v.path.insert_str(0, &pfx);
13971 }
13972 }
13973 }
13974 if let Some(ref val) = self.issr {
13975 let snap = violations.len();
13976 val.validate_constraints("", violations);
13977 if violations.len() > snap {
13978 let pfx = format!("{path}/Issr");
13979 for v in &mut violations[snap..] {
13980 v.path.insert_str(0, &pfx);
13981 }
13982 }
13983 }
13984 }
13985}
13986impl crate::common::validate::Validatable for GenericPersonIdentification2 {
13987 fn validate_constraints(
13988 &self,
13989 path: &str,
13990 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13991 ) {
13992 {
13993 let snap = violations.len();
13994 self.id.validate_constraints("", violations);
13995 if violations.len() > snap {
13996 let pfx = format!("{path}/Id");
13997 for v in &mut violations[snap..] {
13998 v.path.insert_str(0, &pfx);
13999 }
14000 }
14001 }
14002 if let Some(ref wrapper) = self.schme_nm {
14003 let snap = violations.len();
14004 wrapper.inner.validate_constraints("", violations);
14005 if violations.len() > snap {
14006 let pfx = format!("{path}/SchmeNm");
14007 for v in &mut violations[snap..] {
14008 v.path.insert_str(0, &pfx);
14009 }
14010 }
14011 }
14012 if let Some(ref val) = self.issr {
14013 let snap = violations.len();
14014 val.validate_constraints("", violations);
14015 if violations.len() > snap {
14016 let pfx = format!("{path}/Issr");
14017 for v in &mut violations[snap..] {
14018 v.path.insert_str(0, &pfx);
14019 }
14020 }
14021 }
14022 }
14023}
14024impl crate::common::validate::Validatable for GroupHeader120 {
14025 fn validate_constraints(
14026 &self,
14027 path: &str,
14028 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14029 ) {
14030 {
14031 let snap = violations.len();
14032 self.msg_id.validate_constraints("", violations);
14033 if violations.len() > snap {
14034 let pfx = format!("{path}/MsgId");
14035 for v in &mut violations[snap..] {
14036 v.path.insert_str(0, &pfx);
14037 }
14038 }
14039 }
14040 {
14041 let snap = violations.len();
14042 self.cre_dt_tm.validate_constraints("", violations);
14043 if violations.len() > snap {
14044 let pfx = format!("{path}/CreDtTm");
14045 for v in &mut violations[snap..] {
14046 v.path.insert_str(0, &pfx);
14047 }
14048 }
14049 }
14050 if let Some(ref val) = self.instg_agt {
14051 let snap = violations.len();
14052 val.validate_constraints("", violations);
14053 if violations.len() > snap {
14054 let pfx = format!("{path}/InstgAgt");
14055 for v in &mut violations[snap..] {
14056 v.path.insert_str(0, &pfx);
14057 }
14058 }
14059 }
14060 if let Some(ref val) = self.instd_agt {
14061 let snap = violations.len();
14062 val.validate_constraints("", violations);
14063 if violations.len() > snap {
14064 let pfx = format!("{path}/InstdAgt");
14065 for v in &mut violations[snap..] {
14066 v.path.insert_str(0, &pfx);
14067 }
14068 }
14069 }
14070 if let Some(ref val) = self.orgnl_biz_qry {
14071 let snap = violations.len();
14072 val.validate_constraints("", violations);
14073 if violations.len() > snap {
14074 let pfx = format!("{path}/OrgnlBizQry");
14075 for v in &mut violations[snap..] {
14076 v.path.insert_str(0, &pfx);
14077 }
14078 }
14079 }
14080 }
14081}
14082impl crate::common::validate::Validatable for LocalInstrument2Choice {
14083 fn validate_constraints(
14084 &self,
14085 path: &str,
14086 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14087 ) {
14088 match self {
14089 Self::Cd(inner) => {
14090 let snap = violations.len();
14091 inner.validate_constraints("", violations);
14092 if violations.len() > snap {
14093 let pfx = format!("{path}/Cd");
14094 for v in &mut violations[snap..] {
14095 v.path.insert_str(0, &pfx);
14096 }
14097 }
14098 }
14099 Self::Prtry(inner) => {
14100 let snap = violations.len();
14101 inner.validate_constraints("", violations);
14102 if violations.len() > snap {
14103 let pfx = format!("{path}/Prtry");
14104 for v in &mut violations[snap..] {
14105 v.path.insert_str(0, &pfx);
14106 }
14107 }
14108 }
14109 }
14110 }
14111}
14112impl crate::common::validate::Validatable for MandateClassification1Choice {
14113 fn validate_constraints(
14114 &self,
14115 path: &str,
14116 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14117 ) {
14118 match self {
14119 Self::Cd(inner) => {
14120 let snap = violations.len();
14121 inner.validate_constraints("", violations);
14122 if violations.len() > snap {
14123 let pfx = format!("{path}/Cd");
14124 for v in &mut violations[snap..] {
14125 v.path.insert_str(0, &pfx);
14126 }
14127 }
14128 }
14129 Self::Prtry(inner) => {
14130 let snap = violations.len();
14131 inner.validate_constraints("", violations);
14132 if violations.len() > snap {
14133 let pfx = format!("{path}/Prtry");
14134 for v in &mut violations[snap..] {
14135 v.path.insert_str(0, &pfx);
14136 }
14137 }
14138 }
14139 }
14140 }
14141}
14142impl crate::common::validate::Validatable for MandateRelatedData3Choice {
14143 fn validate_constraints(
14144 &self,
14145 path: &str,
14146 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14147 ) {
14148 match self {
14149 Self::DrctDbtMndt(inner) => {
14150 let snap = violations.len();
14151 inner.validate_constraints("", violations);
14152 if violations.len() > snap {
14153 let pfx = format!("{path}/DrctDbtMndt");
14154 for v in &mut violations[snap..] {
14155 v.path.insert_str(0, &pfx);
14156 }
14157 }
14158 }
14159 Self::CdtTrfMndt(inner) => {
14160 let snap = violations.len();
14161 inner.validate_constraints("", violations);
14162 if violations.len() > snap {
14163 let pfx = format!("{path}/CdtTrfMndt");
14164 for v in &mut violations[snap..] {
14165 v.path.insert_str(0, &pfx);
14166 }
14167 }
14168 }
14169 }
14170 }
14171}
14172impl crate::common::validate::Validatable for MandateRelatedInformation16 {
14173 fn validate_constraints(
14174 &self,
14175 path: &str,
14176 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14177 ) {
14178 if let Some(ref val) = self.mndt_id {
14179 let snap = violations.len();
14180 val.validate_constraints("", violations);
14181 if violations.len() > snap {
14182 let pfx = format!("{path}/MndtId");
14183 for v in &mut violations[snap..] {
14184 v.path.insert_str(0, &pfx);
14185 }
14186 }
14187 }
14188 if let Some(ref val) = self.dt_of_sgntr {
14189 let snap = violations.len();
14190 val.validate_constraints("", violations);
14191 if violations.len() > snap {
14192 let pfx = format!("{path}/DtOfSgntr");
14193 for v in &mut violations[snap..] {
14194 v.path.insert_str(0, &pfx);
14195 }
14196 }
14197 }
14198 if let Some(ref val) = self.amdmnt_ind {
14199 let snap = violations.len();
14200 val.validate_constraints("", violations);
14201 if violations.len() > snap {
14202 let pfx = format!("{path}/AmdmntInd");
14203 for v in &mut violations[snap..] {
14204 v.path.insert_str(0, &pfx);
14205 }
14206 }
14207 }
14208 if let Some(ref val) = self.amdmnt_inf_dtls {
14209 let snap = violations.len();
14210 val.validate_constraints("", violations);
14211 if violations.len() > snap {
14212 let pfx = format!("{path}/AmdmntInfDtls");
14213 for v in &mut violations[snap..] {
14214 v.path.insert_str(0, &pfx);
14215 }
14216 }
14217 }
14218 if let Some(ref val) = self.elctrnc_sgntr {
14219 let snap = violations.len();
14220 val.validate_constraints("", violations);
14221 if violations.len() > snap {
14222 let pfx = format!("{path}/ElctrncSgntr");
14223 for v in &mut violations[snap..] {
14224 v.path.insert_str(0, &pfx);
14225 }
14226 }
14227 }
14228 if let Some(ref val) = self.frst_colltn_dt {
14229 let snap = violations.len();
14230 val.validate_constraints("", violations);
14231 if violations.len() > snap {
14232 let pfx = format!("{path}/FrstColltnDt");
14233 for v in &mut violations[snap..] {
14234 v.path.insert_str(0, &pfx);
14235 }
14236 }
14237 }
14238 if let Some(ref val) = self.fnl_colltn_dt {
14239 let snap = violations.len();
14240 val.validate_constraints("", violations);
14241 if violations.len() > snap {
14242 let pfx = format!("{path}/FnlColltnDt");
14243 for v in &mut violations[snap..] {
14244 v.path.insert_str(0, &pfx);
14245 }
14246 }
14247 }
14248 if let Some(ref wrapper) = self.frqcy {
14249 let snap = violations.len();
14250 wrapper.inner.validate_constraints("", violations);
14251 if violations.len() > snap {
14252 let pfx = format!("{path}/Frqcy");
14253 for v in &mut violations[snap..] {
14254 v.path.insert_str(0, &pfx);
14255 }
14256 }
14257 }
14258 if let Some(ref wrapper) = self.rsn {
14259 let snap = violations.len();
14260 wrapper.inner.validate_constraints("", violations);
14261 if violations.len() > snap {
14262 let pfx = format!("{path}/Rsn");
14263 for v in &mut violations[snap..] {
14264 v.path.insert_str(0, &pfx);
14265 }
14266 }
14267 }
14268 if let Some(ref val) = self.trckg_days {
14269 let snap = violations.len();
14270 val.validate_constraints("", violations);
14271 if violations.len() > snap {
14272 let pfx = format!("{path}/TrckgDays");
14273 for v in &mut violations[snap..] {
14274 v.path.insert_str(0, &pfx);
14275 }
14276 }
14277 }
14278 }
14279}
14280impl crate::common::validate::Validatable for MandateSetupReason1Choice {
14281 fn validate_constraints(
14282 &self,
14283 path: &str,
14284 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14285 ) {
14286 match self {
14287 Self::Cd(inner) => {
14288 let snap = violations.len();
14289 inner.validate_constraints("", violations);
14290 if violations.len() > snap {
14291 let pfx = format!("{path}/Cd");
14292 for v in &mut violations[snap..] {
14293 v.path.insert_str(0, &pfx);
14294 }
14295 }
14296 }
14297 Self::Prtry(inner) => {
14298 let snap = violations.len();
14299 inner.validate_constraints("", violations);
14300 if violations.len() > snap {
14301 let pfx = format!("{path}/Prtry");
14302 for v in &mut violations[snap..] {
14303 v.path.insert_str(0, &pfx);
14304 }
14305 }
14306 }
14307 }
14308 }
14309}
14310impl crate::common::validate::Validatable for MandateTypeInformation2 {
14311 fn validate_constraints(
14312 &self,
14313 path: &str,
14314 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14315 ) {
14316 if let Some(ref wrapper) = self.svc_lvl {
14317 let snap = violations.len();
14318 wrapper.inner.validate_constraints("", violations);
14319 if violations.len() > snap {
14320 let pfx = format!("{path}/SvcLvl");
14321 for v in &mut violations[snap..] {
14322 v.path.insert_str(0, &pfx);
14323 }
14324 }
14325 }
14326 if let Some(ref wrapper) = self.lcl_instrm {
14327 let snap = violations.len();
14328 wrapper.inner.validate_constraints("", violations);
14329 if violations.len() > snap {
14330 let pfx = format!("{path}/LclInstrm");
14331 for v in &mut violations[snap..] {
14332 v.path.insert_str(0, &pfx);
14333 }
14334 }
14335 }
14336 if let Some(ref wrapper) = self.ctgy_purp {
14337 let snap = violations.len();
14338 wrapper.inner.validate_constraints("", violations);
14339 if violations.len() > snap {
14340 let pfx = format!("{path}/CtgyPurp");
14341 for v in &mut violations[snap..] {
14342 v.path.insert_str(0, &pfx);
14343 }
14344 }
14345 }
14346 if let Some(ref wrapper) = self.clssfctn {
14347 let snap = violations.len();
14348 wrapper.inner.validate_constraints("", violations);
14349 if violations.len() > snap {
14350 let pfx = format!("{path}/Clssfctn");
14351 for v in &mut violations[snap..] {
14352 v.path.insert_str(0, &pfx);
14353 }
14354 }
14355 }
14356 }
14357}
14358impl crate::common::validate::Validatable for NumberOfTransactionsPerStatus5 {
14359 fn validate_constraints(
14360 &self,
14361 path: &str,
14362 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14363 ) {
14364 {
14365 let snap = violations.len();
14366 self.dtld_nb_of_txs.validate_constraints("", violations);
14367 if violations.len() > snap {
14368 let pfx = format!("{path}/DtldNbOfTxs");
14369 for v in &mut violations[snap..] {
14370 v.path.insert_str(0, &pfx);
14371 }
14372 }
14373 }
14374 {
14375 let snap = violations.len();
14376 self.dtld_sts.validate_constraints("", violations);
14377 if violations.len() > snap {
14378 let pfx = format!("{path}/DtldSts");
14379 for v in &mut violations[snap..] {
14380 v.path.insert_str(0, &pfx);
14381 }
14382 }
14383 }
14384 if let Some(ref val) = self.dtld_ctrl_sum {
14385 let snap = violations.len();
14386 val.validate_constraints("", violations);
14387 if violations.len() > snap {
14388 let pfx = format!("{path}/DtldCtrlSum");
14389 for v in &mut violations[snap..] {
14390 v.path.insert_str(0, &pfx);
14391 }
14392 }
14393 }
14394 }
14395}
14396impl crate::common::validate::Validatable for OrganisationIdentification39 {
14397 fn validate_constraints(
14398 &self,
14399 path: &str,
14400 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14401 ) {
14402 if let Some(ref val) = self.any_bic {
14403 let snap = violations.len();
14404 val.validate_constraints("", violations);
14405 if violations.len() > snap {
14406 let pfx = format!("{path}/AnyBIC");
14407 for v in &mut violations[snap..] {
14408 v.path.insert_str(0, &pfx);
14409 }
14410 }
14411 }
14412 if let Some(ref val) = self.lei {
14413 let snap = violations.len();
14414 val.validate_constraints("", violations);
14415 if violations.len() > snap {
14416 let pfx = format!("{path}/LEI");
14417 for v in &mut violations[snap..] {
14418 v.path.insert_str(0, &pfx);
14419 }
14420 }
14421 }
14422 for (idx, elem) in self.othr.iter().enumerate() {
14423 let snap = violations.len();
14424 elem.validate_constraints("", violations);
14425 if violations.len() > snap {
14426 let pfx = format!("{path}/Othr[{idx}]");
14427 for v in &mut violations[snap..] {
14428 v.path.insert_str(0, &pfx);
14429 }
14430 }
14431 }
14432 }
14433}
14434impl crate::common::validate::Validatable for OrganisationIdentificationSchemeName1Choice {
14435 fn validate_constraints(
14436 &self,
14437 path: &str,
14438 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14439 ) {
14440 match self {
14441 Self::Cd(inner) => {
14442 let snap = violations.len();
14443 inner.validate_constraints("", violations);
14444 if violations.len() > snap {
14445 let pfx = format!("{path}/Cd");
14446 for v in &mut violations[snap..] {
14447 v.path.insert_str(0, &pfx);
14448 }
14449 }
14450 }
14451 Self::Prtry(inner) => {
14452 let snap = violations.len();
14453 inner.validate_constraints("", violations);
14454 if violations.len() > snap {
14455 let pfx = format!("{path}/Prtry");
14456 for v in &mut violations[snap..] {
14457 v.path.insert_str(0, &pfx);
14458 }
14459 }
14460 }
14461 }
14462 }
14463}
14464impl crate::common::validate::Validatable for OriginalBusinessQuery1 {
14465 fn validate_constraints(
14466 &self,
14467 path: &str,
14468 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14469 ) {
14470 {
14471 let snap = violations.len();
14472 self.msg_id.validate_constraints("", violations);
14473 if violations.len() > snap {
14474 let pfx = format!("{path}/MsgId");
14475 for v in &mut violations[snap..] {
14476 v.path.insert_str(0, &pfx);
14477 }
14478 }
14479 }
14480 if let Some(ref val) = self.msg_nm_id {
14481 let snap = violations.len();
14482 val.validate_constraints("", violations);
14483 if violations.len() > snap {
14484 let pfx = format!("{path}/MsgNmId");
14485 for v in &mut violations[snap..] {
14486 v.path.insert_str(0, &pfx);
14487 }
14488 }
14489 }
14490 if let Some(ref val) = self.cre_dt_tm {
14491 let snap = violations.len();
14492 val.validate_constraints("", violations);
14493 if violations.len() > snap {
14494 let pfx = format!("{path}/CreDtTm");
14495 for v in &mut violations[snap..] {
14496 v.path.insert_str(0, &pfx);
14497 }
14498 }
14499 }
14500 }
14501}
14502impl crate::common::validate::Validatable for OriginalGroupHeader22 {
14503 fn validate_constraints(
14504 &self,
14505 path: &str,
14506 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14507 ) {
14508 {
14509 let snap = violations.len();
14510 self.orgnl_msg_id.validate_constraints("", violations);
14511 if violations.len() > snap {
14512 let pfx = format!("{path}/OrgnlMsgId");
14513 for v in &mut violations[snap..] {
14514 v.path.insert_str(0, &pfx);
14515 }
14516 }
14517 }
14518 {
14519 let snap = violations.len();
14520 self.orgnl_msg_nm_id.validate_constraints("", violations);
14521 if violations.len() > snap {
14522 let pfx = format!("{path}/OrgnlMsgNmId");
14523 for v in &mut violations[snap..] {
14524 v.path.insert_str(0, &pfx);
14525 }
14526 }
14527 }
14528 if let Some(ref val) = self.orgnl_cre_dt_tm {
14529 let snap = violations.len();
14530 val.validate_constraints("", violations);
14531 if violations.len() > snap {
14532 let pfx = format!("{path}/OrgnlCreDtTm");
14533 for v in &mut violations[snap..] {
14534 v.path.insert_str(0, &pfx);
14535 }
14536 }
14537 }
14538 if let Some(ref val) = self.orgnl_nb_of_txs {
14539 let snap = violations.len();
14540 val.validate_constraints("", violations);
14541 if violations.len() > snap {
14542 let pfx = format!("{path}/OrgnlNbOfTxs");
14543 for v in &mut violations[snap..] {
14544 v.path.insert_str(0, &pfx);
14545 }
14546 }
14547 }
14548 if let Some(ref val) = self.orgnl_ctrl_sum {
14549 let snap = violations.len();
14550 val.validate_constraints("", violations);
14551 if violations.len() > snap {
14552 let pfx = format!("{path}/OrgnlCtrlSum");
14553 for v in &mut violations[snap..] {
14554 v.path.insert_str(0, &pfx);
14555 }
14556 }
14557 }
14558 if let Some(ref val) = self.grp_sts {
14559 let snap = violations.len();
14560 val.validate_constraints("", violations);
14561 if violations.len() > snap {
14562 let pfx = format!("{path}/GrpSts");
14563 for v in &mut violations[snap..] {
14564 v.path.insert_str(0, &pfx);
14565 }
14566 }
14567 }
14568 for (idx, elem) in self.sts_rsn_inf.iter().enumerate() {
14569 let snap = violations.len();
14570 elem.validate_constraints("", violations);
14571 if violations.len() > snap {
14572 let pfx = format!("{path}/StsRsnInf[{idx}]");
14573 for v in &mut violations[snap..] {
14574 v.path.insert_str(0, &pfx);
14575 }
14576 }
14577 }
14578 for (idx, elem) in self.nb_of_txs_per_sts.iter().enumerate() {
14579 let snap = violations.len();
14580 elem.validate_constraints("", violations);
14581 if violations.len() > snap {
14582 let pfx = format!("{path}/NbOfTxsPerSts[{idx}]");
14583 for v in &mut violations[snap..] {
14584 v.path.insert_str(0, &pfx);
14585 }
14586 }
14587 }
14588 }
14589}
14590impl crate::common::validate::Validatable for OriginalGroupInformation29 {
14591 fn validate_constraints(
14592 &self,
14593 path: &str,
14594 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14595 ) {
14596 {
14597 let snap = violations.len();
14598 self.orgnl_msg_id.validate_constraints("", violations);
14599 if violations.len() > snap {
14600 let pfx = format!("{path}/OrgnlMsgId");
14601 for v in &mut violations[snap..] {
14602 v.path.insert_str(0, &pfx);
14603 }
14604 }
14605 }
14606 {
14607 let snap = violations.len();
14608 self.orgnl_msg_nm_id.validate_constraints("", violations);
14609 if violations.len() > snap {
14610 let pfx = format!("{path}/OrgnlMsgNmId");
14611 for v in &mut violations[snap..] {
14612 v.path.insert_str(0, &pfx);
14613 }
14614 }
14615 }
14616 if let Some(ref val) = self.orgnl_cre_dt_tm {
14617 let snap = violations.len();
14618 val.validate_constraints("", violations);
14619 if violations.len() > snap {
14620 let pfx = format!("{path}/OrgnlCreDtTm");
14621 for v in &mut violations[snap..] {
14622 v.path.insert_str(0, &pfx);
14623 }
14624 }
14625 }
14626 }
14627}
14628impl crate::common::validate::Validatable for OriginalTransactionReference42 {
14629 fn validate_constraints(
14630 &self,
14631 path: &str,
14632 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14633 ) {
14634 if let Some(ref val) = self.intr_bk_sttlm_amt {
14635 let snap = violations.len();
14636 val.validate_constraints("", violations);
14637 if violations.len() > snap {
14638 let pfx = format!("{path}/IntrBkSttlmAmt");
14639 for v in &mut violations[snap..] {
14640 v.path.insert_str(0, &pfx);
14641 }
14642 }
14643 }
14644 if let Some(ref wrapper) = self.amt {
14645 let snap = violations.len();
14646 wrapper.inner.validate_constraints("", violations);
14647 if violations.len() > snap {
14648 let pfx = format!("{path}/Amt");
14649 for v in &mut violations[snap..] {
14650 v.path.insert_str(0, &pfx);
14651 }
14652 }
14653 }
14654 if let Some(ref val) = self.intr_bk_sttlm_dt {
14655 let snap = violations.len();
14656 val.validate_constraints("", violations);
14657 if violations.len() > snap {
14658 let pfx = format!("{path}/IntrBkSttlmDt");
14659 for v in &mut violations[snap..] {
14660 v.path.insert_str(0, &pfx);
14661 }
14662 }
14663 }
14664 if let Some(ref val) = self.reqd_colltn_dt {
14665 let snap = violations.len();
14666 val.validate_constraints("", violations);
14667 if violations.len() > snap {
14668 let pfx = format!("{path}/ReqdColltnDt");
14669 for v in &mut violations[snap..] {
14670 v.path.insert_str(0, &pfx);
14671 }
14672 }
14673 }
14674 if let Some(ref wrapper) = self.reqd_exctn_dt {
14675 let snap = violations.len();
14676 wrapper.inner.validate_constraints("", violations);
14677 if violations.len() > snap {
14678 let pfx = format!("{path}/ReqdExctnDt");
14679 for v in &mut violations[snap..] {
14680 v.path.insert_str(0, &pfx);
14681 }
14682 }
14683 }
14684 if let Some(ref val) = self.cdtr_schme_id {
14685 let snap = violations.len();
14686 val.validate_constraints("", violations);
14687 if violations.len() > snap {
14688 let pfx = format!("{path}/CdtrSchmeId");
14689 for v in &mut violations[snap..] {
14690 v.path.insert_str(0, &pfx);
14691 }
14692 }
14693 }
14694 if let Some(ref val) = self.sttlm_inf {
14695 let snap = violations.len();
14696 val.validate_constraints("", violations);
14697 if violations.len() > snap {
14698 let pfx = format!("{path}/SttlmInf");
14699 for v in &mut violations[snap..] {
14700 v.path.insert_str(0, &pfx);
14701 }
14702 }
14703 }
14704 if let Some(ref val) = self.pmt_tp_inf {
14705 let snap = violations.len();
14706 val.validate_constraints("", violations);
14707 if violations.len() > snap {
14708 let pfx = format!("{path}/PmtTpInf");
14709 for v in &mut violations[snap..] {
14710 v.path.insert_str(0, &pfx);
14711 }
14712 }
14713 }
14714 if let Some(ref val) = self.pmt_mtd {
14715 let snap = violations.len();
14716 val.validate_constraints("", violations);
14717 if violations.len() > snap {
14718 let pfx = format!("{path}/PmtMtd");
14719 for v in &mut violations[snap..] {
14720 v.path.insert_str(0, &pfx);
14721 }
14722 }
14723 }
14724 if let Some(ref wrapper) = self.mndt_rltd_inf {
14725 let snap = violations.len();
14726 wrapper.inner.validate_constraints("", violations);
14727 if violations.len() > snap {
14728 let pfx = format!("{path}/MndtRltdInf");
14729 for v in &mut violations[snap..] {
14730 v.path.insert_str(0, &pfx);
14731 }
14732 }
14733 }
14734 if let Some(ref val) = self.rmt_inf {
14735 let snap = violations.len();
14736 val.validate_constraints("", violations);
14737 if violations.len() > snap {
14738 let pfx = format!("{path}/RmtInf");
14739 for v in &mut violations[snap..] {
14740 v.path.insert_str(0, &pfx);
14741 }
14742 }
14743 }
14744 if let Some(ref wrapper) = self.ultmt_dbtr {
14745 let snap = violations.len();
14746 wrapper.inner.validate_constraints("", violations);
14747 if violations.len() > snap {
14748 let pfx = format!("{path}/UltmtDbtr");
14749 for v in &mut violations[snap..] {
14750 v.path.insert_str(0, &pfx);
14751 }
14752 }
14753 }
14754 if let Some(ref wrapper) = self.dbtr {
14755 let snap = violations.len();
14756 wrapper.inner.validate_constraints("", violations);
14757 if violations.len() > snap {
14758 let pfx = format!("{path}/Dbtr");
14759 for v in &mut violations[snap..] {
14760 v.path.insert_str(0, &pfx);
14761 }
14762 }
14763 }
14764 if let Some(ref val) = self.dbtr_acct {
14765 let snap = violations.len();
14766 val.validate_constraints("", violations);
14767 if violations.len() > snap {
14768 let pfx = format!("{path}/DbtrAcct");
14769 for v in &mut violations[snap..] {
14770 v.path.insert_str(0, &pfx);
14771 }
14772 }
14773 }
14774 if let Some(ref val) = self.dbtr_agt {
14775 let snap = violations.len();
14776 val.validate_constraints("", violations);
14777 if violations.len() > snap {
14778 let pfx = format!("{path}/DbtrAgt");
14779 for v in &mut violations[snap..] {
14780 v.path.insert_str(0, &pfx);
14781 }
14782 }
14783 }
14784 if let Some(ref val) = self.dbtr_agt_acct {
14785 let snap = violations.len();
14786 val.validate_constraints("", violations);
14787 if violations.len() > snap {
14788 let pfx = format!("{path}/DbtrAgtAcct");
14789 for v in &mut violations[snap..] {
14790 v.path.insert_str(0, &pfx);
14791 }
14792 }
14793 }
14794 if let Some(ref val) = self.cdtr_agt {
14795 let snap = violations.len();
14796 val.validate_constraints("", violations);
14797 if violations.len() > snap {
14798 let pfx = format!("{path}/CdtrAgt");
14799 for v in &mut violations[snap..] {
14800 v.path.insert_str(0, &pfx);
14801 }
14802 }
14803 }
14804 if let Some(ref val) = self.cdtr_agt_acct {
14805 let snap = violations.len();
14806 val.validate_constraints("", violations);
14807 if violations.len() > snap {
14808 let pfx = format!("{path}/CdtrAgtAcct");
14809 for v in &mut violations[snap..] {
14810 v.path.insert_str(0, &pfx);
14811 }
14812 }
14813 }
14814 if let Some(ref wrapper) = self.cdtr {
14815 let snap = violations.len();
14816 wrapper.inner.validate_constraints("", violations);
14817 if violations.len() > snap {
14818 let pfx = format!("{path}/Cdtr");
14819 for v in &mut violations[snap..] {
14820 v.path.insert_str(0, &pfx);
14821 }
14822 }
14823 }
14824 if let Some(ref val) = self.cdtr_acct {
14825 let snap = violations.len();
14826 val.validate_constraints("", violations);
14827 if violations.len() > snap {
14828 let pfx = format!("{path}/CdtrAcct");
14829 for v in &mut violations[snap..] {
14830 v.path.insert_str(0, &pfx);
14831 }
14832 }
14833 }
14834 if let Some(ref wrapper) = self.ultmt_cdtr {
14835 let snap = violations.len();
14836 wrapper.inner.validate_constraints("", violations);
14837 if violations.len() > snap {
14838 let pfx = format!("{path}/UltmtCdtr");
14839 for v in &mut violations[snap..] {
14840 v.path.insert_str(0, &pfx);
14841 }
14842 }
14843 }
14844 if let Some(ref wrapper) = self.purp {
14845 let snap = violations.len();
14846 wrapper.inner.validate_constraints("", violations);
14847 if violations.len() > snap {
14848 let pfx = format!("{path}/Purp");
14849 for v in &mut violations[snap..] {
14850 v.path.insert_str(0, &pfx);
14851 }
14852 }
14853 }
14854 }
14855}
14856impl crate::common::validate::Validatable for OtherContact1 {
14857 fn validate_constraints(
14858 &self,
14859 path: &str,
14860 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14861 ) {
14862 {
14863 let snap = violations.len();
14864 self.chanl_tp.validate_constraints("", violations);
14865 if violations.len() > snap {
14866 let pfx = format!("{path}/ChanlTp");
14867 for v in &mut violations[snap..] {
14868 v.path.insert_str(0, &pfx);
14869 }
14870 }
14871 }
14872 if let Some(ref val) = self.id {
14873 let snap = violations.len();
14874 val.validate_constraints("", violations);
14875 if violations.len() > snap {
14876 let pfx = format!("{path}/Id");
14877 for v in &mut violations[snap..] {
14878 v.path.insert_str(0, &pfx);
14879 }
14880 }
14881 }
14882 }
14883}
14884impl crate::common::validate::Validatable for Party50Choice {
14885 fn validate_constraints(
14886 &self,
14887 path: &str,
14888 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14889 ) {
14890 match self {
14891 Self::Pty(inner) => {
14892 let snap = violations.len();
14893 inner.validate_constraints("", violations);
14894 if violations.len() > snap {
14895 let pfx = format!("{path}/Pty");
14896 for v in &mut violations[snap..] {
14897 v.path.insert_str(0, &pfx);
14898 }
14899 }
14900 }
14901 Self::Agt(inner) => {
14902 let snap = violations.len();
14903 inner.validate_constraints("", violations);
14904 if violations.len() > snap {
14905 let pfx = format!("{path}/Agt");
14906 for v in &mut violations[snap..] {
14907 v.path.insert_str(0, &pfx);
14908 }
14909 }
14910 }
14911 }
14912 }
14913}
14914impl crate::common::validate::Validatable for Party52Choice {
14915 fn validate_constraints(
14916 &self,
14917 path: &str,
14918 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14919 ) {
14920 match self {
14921 Self::OrgId(inner) => {
14922 let snap = violations.len();
14923 inner.validate_constraints("", violations);
14924 if violations.len() > snap {
14925 let pfx = format!("{path}/OrgId");
14926 for v in &mut violations[snap..] {
14927 v.path.insert_str(0, &pfx);
14928 }
14929 }
14930 }
14931 Self::PrvtId(inner) => {
14932 let snap = violations.len();
14933 inner.validate_constraints("", violations);
14934 if violations.len() > snap {
14935 let pfx = format!("{path}/PrvtId");
14936 for v in &mut violations[snap..] {
14937 v.path.insert_str(0, &pfx);
14938 }
14939 }
14940 }
14941 }
14942 }
14943}
14944impl crate::common::validate::Validatable for PartyIdentification272 {
14945 fn validate_constraints(
14946 &self,
14947 path: &str,
14948 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14949 ) {
14950 if let Some(ref val) = self.nm {
14951 let snap = violations.len();
14952 val.validate_constraints("", violations);
14953 if violations.len() > snap {
14954 let pfx = format!("{path}/Nm");
14955 for v in &mut violations[snap..] {
14956 v.path.insert_str(0, &pfx);
14957 }
14958 }
14959 }
14960 if let Some(ref val) = self.pstl_adr {
14961 let snap = violations.len();
14962 val.validate_constraints("", violations);
14963 if violations.len() > snap {
14964 let pfx = format!("{path}/PstlAdr");
14965 for v in &mut violations[snap..] {
14966 v.path.insert_str(0, &pfx);
14967 }
14968 }
14969 }
14970 if let Some(ref wrapper) = self.id {
14971 let snap = violations.len();
14972 wrapper.inner.validate_constraints("", violations);
14973 if violations.len() > snap {
14974 let pfx = format!("{path}/Id");
14975 for v in &mut violations[snap..] {
14976 v.path.insert_str(0, &pfx);
14977 }
14978 }
14979 }
14980 if let Some(ref val) = self.ctry_of_res {
14981 let snap = violations.len();
14982 val.validate_constraints("", violations);
14983 if violations.len() > snap {
14984 let pfx = format!("{path}/CtryOfRes");
14985 for v in &mut violations[snap..] {
14986 v.path.insert_str(0, &pfx);
14987 }
14988 }
14989 }
14990 if let Some(ref val) = self.ctct_dtls {
14991 let snap = violations.len();
14992 val.validate_constraints("", violations);
14993 if violations.len() > snap {
14994 let pfx = format!("{path}/CtctDtls");
14995 for v in &mut violations[snap..] {
14996 v.path.insert_str(0, &pfx);
14997 }
14998 }
14999 }
15000 }
15001}
15002impl crate::common::validate::Validatable for PaymentTransaction161 {
15003 fn validate_constraints(
15004 &self,
15005 path: &str,
15006 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15007 ) {
15008 if let Some(ref val) = self.sts_id {
15009 let snap = violations.len();
15010 val.validate_constraints("", violations);
15011 if violations.len() > snap {
15012 let pfx = format!("{path}/StsId");
15013 for v in &mut violations[snap..] {
15014 v.path.insert_str(0, &pfx);
15015 }
15016 }
15017 }
15018 if let Some(ref val) = self.orgnl_grp_inf {
15019 let snap = violations.len();
15020 val.validate_constraints("", violations);
15021 if violations.len() > snap {
15022 let pfx = format!("{path}/OrgnlGrpInf");
15023 for v in &mut violations[snap..] {
15024 v.path.insert_str(0, &pfx);
15025 }
15026 }
15027 }
15028 if let Some(ref val) = self.orgnl_instr_id {
15029 let snap = violations.len();
15030 val.validate_constraints("", violations);
15031 if violations.len() > snap {
15032 let pfx = format!("{path}/OrgnlInstrId");
15033 for v in &mut violations[snap..] {
15034 v.path.insert_str(0, &pfx);
15035 }
15036 }
15037 }
15038 if let Some(ref val) = self.orgnl_end_to_end_id {
15039 let snap = violations.len();
15040 val.validate_constraints("", violations);
15041 if violations.len() > snap {
15042 let pfx = format!("{path}/OrgnlEndToEndId");
15043 for v in &mut violations[snap..] {
15044 v.path.insert_str(0, &pfx);
15045 }
15046 }
15047 }
15048 if let Some(ref val) = self.orgnl_tx_id {
15049 let snap = violations.len();
15050 val.validate_constraints("", violations);
15051 if violations.len() > snap {
15052 let pfx = format!("{path}/OrgnlTxId");
15053 for v in &mut violations[snap..] {
15054 v.path.insert_str(0, &pfx);
15055 }
15056 }
15057 }
15058 if let Some(ref val) = self.orgnl_uetr {
15059 let snap = violations.len();
15060 val.validate_constraints("", violations);
15061 if violations.len() > snap {
15062 let pfx = format!("{path}/OrgnlUETR");
15063 for v in &mut violations[snap..] {
15064 v.path.insert_str(0, &pfx);
15065 }
15066 }
15067 }
15068 if let Some(ref val) = self.tx_sts {
15069 let snap = violations.len();
15070 val.validate_constraints("", violations);
15071 if violations.len() > snap {
15072 let pfx = format!("{path}/TxSts");
15073 for v in &mut violations[snap..] {
15074 v.path.insert_str(0, &pfx);
15075 }
15076 }
15077 }
15078 for (idx, elem) in self.sts_rsn_inf.iter().enumerate() {
15079 let snap = violations.len();
15080 elem.validate_constraints("", violations);
15081 if violations.len() > snap {
15082 let pfx = format!("{path}/StsRsnInf[{idx}]");
15083 for v in &mut violations[snap..] {
15084 v.path.insert_str(0, &pfx);
15085 }
15086 }
15087 }
15088 for (idx, elem) in self.chrgs_inf.iter().enumerate() {
15089 let snap = violations.len();
15090 elem.validate_constraints("", violations);
15091 if violations.len() > snap {
15092 let pfx = format!("{path}/ChrgsInf[{idx}]");
15093 for v in &mut violations[snap..] {
15094 v.path.insert_str(0, &pfx);
15095 }
15096 }
15097 }
15098 if let Some(ref val) = self.accptnc_dt_tm {
15099 let snap = violations.len();
15100 val.validate_constraints("", violations);
15101 if violations.len() > snap {
15102 let pfx = format!("{path}/AccptncDtTm");
15103 for v in &mut violations[snap..] {
15104 v.path.insert_str(0, &pfx);
15105 }
15106 }
15107 }
15108 if let Some(ref wrapper) = self.prcg_dt {
15109 let snap = violations.len();
15110 wrapper.inner.validate_constraints("", violations);
15111 if violations.len() > snap {
15112 let pfx = format!("{path}/PrcgDt");
15113 for v in &mut violations[snap..] {
15114 v.path.insert_str(0, &pfx);
15115 }
15116 }
15117 }
15118 if let Some(ref wrapper) = self.fctv_intr_bk_sttlm_dt {
15119 let snap = violations.len();
15120 wrapper.inner.validate_constraints("", violations);
15121 if violations.len() > snap {
15122 let pfx = format!("{path}/FctvIntrBkSttlmDt");
15123 for v in &mut violations[snap..] {
15124 v.path.insert_str(0, &pfx);
15125 }
15126 }
15127 }
15128 if let Some(ref val) = self.acct_svcr_ref {
15129 let snap = violations.len();
15130 val.validate_constraints("", violations);
15131 if violations.len() > snap {
15132 let pfx = format!("{path}/AcctSvcrRef");
15133 for v in &mut violations[snap..] {
15134 v.path.insert_str(0, &pfx);
15135 }
15136 }
15137 }
15138 if let Some(ref val) = self.clr_sys_ref {
15139 let snap = violations.len();
15140 val.validate_constraints("", violations);
15141 if violations.len() > snap {
15142 let pfx = format!("{path}/ClrSysRef");
15143 for v in &mut violations[snap..] {
15144 v.path.insert_str(0, &pfx);
15145 }
15146 }
15147 }
15148 if let Some(ref val) = self.instg_agt {
15149 let snap = violations.len();
15150 val.validate_constraints("", violations);
15151 if violations.len() > snap {
15152 let pfx = format!("{path}/InstgAgt");
15153 for v in &mut violations[snap..] {
15154 v.path.insert_str(0, &pfx);
15155 }
15156 }
15157 }
15158 if let Some(ref val) = self.instd_agt {
15159 let snap = violations.len();
15160 val.validate_constraints("", violations);
15161 if violations.len() > snap {
15162 let pfx = format!("{path}/InstdAgt");
15163 for v in &mut violations[snap..] {
15164 v.path.insert_str(0, &pfx);
15165 }
15166 }
15167 }
15168 if let Some(ref val) = self.orgnl_tx_ref {
15169 let snap = violations.len();
15170 val.validate_constraints("", violations);
15171 if violations.len() > snap {
15172 let pfx = format!("{path}/OrgnlTxRef");
15173 for v in &mut violations[snap..] {
15174 v.path.insert_str(0, &pfx);
15175 }
15176 }
15177 }
15178 for (idx, elem) in self.splmtry_data.iter().enumerate() {
15179 let snap = violations.len();
15180 elem.validate_constraints("", violations);
15181 if violations.len() > snap {
15182 let pfx = format!("{path}/SplmtryData[{idx}]");
15183 for v in &mut violations[snap..] {
15184 v.path.insert_str(0, &pfx);
15185 }
15186 }
15187 }
15188 }
15189}
15190impl crate::common::validate::Validatable for PaymentTypeInformation27 {
15191 fn validate_constraints(
15192 &self,
15193 path: &str,
15194 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15195 ) {
15196 if let Some(ref val) = self.instr_prty {
15197 let snap = violations.len();
15198 val.validate_constraints("", violations);
15199 if violations.len() > snap {
15200 let pfx = format!("{path}/InstrPrty");
15201 for v in &mut violations[snap..] {
15202 v.path.insert_str(0, &pfx);
15203 }
15204 }
15205 }
15206 if let Some(ref val) = self.clr_chanl {
15207 let snap = violations.len();
15208 val.validate_constraints("", violations);
15209 if violations.len() > snap {
15210 let pfx = format!("{path}/ClrChanl");
15211 for v in &mut violations[snap..] {
15212 v.path.insert_str(0, &pfx);
15213 }
15214 }
15215 }
15216 for (idx, elem) in self.svc_lvl.iter().enumerate() {
15217 let snap = violations.len();
15218 elem.inner.validate_constraints("", violations);
15219 if violations.len() > snap {
15220 let pfx = format!("{path}/SvcLvl[{idx}]");
15221 for v in &mut violations[snap..] {
15222 v.path.insert_str(0, &pfx);
15223 }
15224 }
15225 }
15226 if let Some(ref wrapper) = self.lcl_instrm {
15227 let snap = violations.len();
15228 wrapper.inner.validate_constraints("", violations);
15229 if violations.len() > snap {
15230 let pfx = format!("{path}/LclInstrm");
15231 for v in &mut violations[snap..] {
15232 v.path.insert_str(0, &pfx);
15233 }
15234 }
15235 }
15236 if let Some(ref val) = self.seq_tp {
15237 let snap = violations.len();
15238 val.validate_constraints("", violations);
15239 if violations.len() > snap {
15240 let pfx = format!("{path}/SeqTp");
15241 for v in &mut violations[snap..] {
15242 v.path.insert_str(0, &pfx);
15243 }
15244 }
15245 }
15246 if let Some(ref wrapper) = self.ctgy_purp {
15247 let snap = violations.len();
15248 wrapper.inner.validate_constraints("", violations);
15249 if violations.len() > snap {
15250 let pfx = format!("{path}/CtgyPurp");
15251 for v in &mut violations[snap..] {
15252 v.path.insert_str(0, &pfx);
15253 }
15254 }
15255 }
15256 }
15257}
15258impl crate::common::validate::Validatable for PersonIdentification18 {
15259 fn validate_constraints(
15260 &self,
15261 path: &str,
15262 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15263 ) {
15264 if let Some(ref val) = self.dt_and_plc_of_birth {
15265 let snap = violations.len();
15266 val.validate_constraints("", violations);
15267 if violations.len() > snap {
15268 let pfx = format!("{path}/DtAndPlcOfBirth");
15269 for v in &mut violations[snap..] {
15270 v.path.insert_str(0, &pfx);
15271 }
15272 }
15273 }
15274 for (idx, elem) in self.othr.iter().enumerate() {
15275 let snap = violations.len();
15276 elem.validate_constraints("", violations);
15277 if violations.len() > snap {
15278 let pfx = format!("{path}/Othr[{idx}]");
15279 for v in &mut violations[snap..] {
15280 v.path.insert_str(0, &pfx);
15281 }
15282 }
15283 }
15284 }
15285}
15286impl crate::common::validate::Validatable for PersonIdentificationSchemeName1Choice {
15287 fn validate_constraints(
15288 &self,
15289 path: &str,
15290 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15291 ) {
15292 match self {
15293 Self::Cd(inner) => {
15294 let snap = violations.len();
15295 inner.validate_constraints("", violations);
15296 if violations.len() > snap {
15297 let pfx = format!("{path}/Cd");
15298 for v in &mut violations[snap..] {
15299 v.path.insert_str(0, &pfx);
15300 }
15301 }
15302 }
15303 Self::Prtry(inner) => {
15304 let snap = violations.len();
15305 inner.validate_constraints("", violations);
15306 if violations.len() > snap {
15307 let pfx = format!("{path}/Prtry");
15308 for v in &mut violations[snap..] {
15309 v.path.insert_str(0, &pfx);
15310 }
15311 }
15312 }
15313 }
15314 }
15315}
15316impl crate::common::validate::Validatable for PostalAddress27 {
15317 fn validate_constraints(
15318 &self,
15319 path: &str,
15320 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15321 ) {
15322 if let Some(ref wrapper) = self.adr_tp {
15323 let snap = violations.len();
15324 wrapper.inner.validate_constraints("", violations);
15325 if violations.len() > snap {
15326 let pfx = format!("{path}/AdrTp");
15327 for v in &mut violations[snap..] {
15328 v.path.insert_str(0, &pfx);
15329 }
15330 }
15331 }
15332 if let Some(ref val) = self.care_of {
15333 let snap = violations.len();
15334 val.validate_constraints("", violations);
15335 if violations.len() > snap {
15336 let pfx = format!("{path}/CareOf");
15337 for v in &mut violations[snap..] {
15338 v.path.insert_str(0, &pfx);
15339 }
15340 }
15341 }
15342 if let Some(ref val) = self.dept {
15343 let snap = violations.len();
15344 val.validate_constraints("", violations);
15345 if violations.len() > snap {
15346 let pfx = format!("{path}/Dept");
15347 for v in &mut violations[snap..] {
15348 v.path.insert_str(0, &pfx);
15349 }
15350 }
15351 }
15352 if let Some(ref val) = self.sub_dept {
15353 let snap = violations.len();
15354 val.validate_constraints("", violations);
15355 if violations.len() > snap {
15356 let pfx = format!("{path}/SubDept");
15357 for v in &mut violations[snap..] {
15358 v.path.insert_str(0, &pfx);
15359 }
15360 }
15361 }
15362 if let Some(ref val) = self.strt_nm {
15363 let snap = violations.len();
15364 val.validate_constraints("", violations);
15365 if violations.len() > snap {
15366 let pfx = format!("{path}/StrtNm");
15367 for v in &mut violations[snap..] {
15368 v.path.insert_str(0, &pfx);
15369 }
15370 }
15371 }
15372 if let Some(ref val) = self.bldg_nb {
15373 let snap = violations.len();
15374 val.validate_constraints("", violations);
15375 if violations.len() > snap {
15376 let pfx = format!("{path}/BldgNb");
15377 for v in &mut violations[snap..] {
15378 v.path.insert_str(0, &pfx);
15379 }
15380 }
15381 }
15382 if let Some(ref val) = self.bldg_nm {
15383 let snap = violations.len();
15384 val.validate_constraints("", violations);
15385 if violations.len() > snap {
15386 let pfx = format!("{path}/BldgNm");
15387 for v in &mut violations[snap..] {
15388 v.path.insert_str(0, &pfx);
15389 }
15390 }
15391 }
15392 if let Some(ref val) = self.flr {
15393 let snap = violations.len();
15394 val.validate_constraints("", violations);
15395 if violations.len() > snap {
15396 let pfx = format!("{path}/Flr");
15397 for v in &mut violations[snap..] {
15398 v.path.insert_str(0, &pfx);
15399 }
15400 }
15401 }
15402 if let Some(ref val) = self.unit_nb {
15403 let snap = violations.len();
15404 val.validate_constraints("", violations);
15405 if violations.len() > snap {
15406 let pfx = format!("{path}/UnitNb");
15407 for v in &mut violations[snap..] {
15408 v.path.insert_str(0, &pfx);
15409 }
15410 }
15411 }
15412 if let Some(ref val) = self.pst_bx {
15413 let snap = violations.len();
15414 val.validate_constraints("", violations);
15415 if violations.len() > snap {
15416 let pfx = format!("{path}/PstBx");
15417 for v in &mut violations[snap..] {
15418 v.path.insert_str(0, &pfx);
15419 }
15420 }
15421 }
15422 if let Some(ref val) = self.room {
15423 let snap = violations.len();
15424 val.validate_constraints("", violations);
15425 if violations.len() > snap {
15426 let pfx = format!("{path}/Room");
15427 for v in &mut violations[snap..] {
15428 v.path.insert_str(0, &pfx);
15429 }
15430 }
15431 }
15432 if let Some(ref val) = self.pst_cd {
15433 let snap = violations.len();
15434 val.validate_constraints("", violations);
15435 if violations.len() > snap {
15436 let pfx = format!("{path}/PstCd");
15437 for v in &mut violations[snap..] {
15438 v.path.insert_str(0, &pfx);
15439 }
15440 }
15441 }
15442 if let Some(ref val) = self.twn_nm {
15443 let snap = violations.len();
15444 val.validate_constraints("", violations);
15445 if violations.len() > snap {
15446 let pfx = format!("{path}/TwnNm");
15447 for v in &mut violations[snap..] {
15448 v.path.insert_str(0, &pfx);
15449 }
15450 }
15451 }
15452 if let Some(ref val) = self.twn_lctn_nm {
15453 let snap = violations.len();
15454 val.validate_constraints("", violations);
15455 if violations.len() > snap {
15456 let pfx = format!("{path}/TwnLctnNm");
15457 for v in &mut violations[snap..] {
15458 v.path.insert_str(0, &pfx);
15459 }
15460 }
15461 }
15462 if let Some(ref val) = self.dstrct_nm {
15463 let snap = violations.len();
15464 val.validate_constraints("", violations);
15465 if violations.len() > snap {
15466 let pfx = format!("{path}/DstrctNm");
15467 for v in &mut violations[snap..] {
15468 v.path.insert_str(0, &pfx);
15469 }
15470 }
15471 }
15472 if let Some(ref val) = self.ctry_sub_dvsn {
15473 let snap = violations.len();
15474 val.validate_constraints("", violations);
15475 if violations.len() > snap {
15476 let pfx = format!("{path}/CtrySubDvsn");
15477 for v in &mut violations[snap..] {
15478 v.path.insert_str(0, &pfx);
15479 }
15480 }
15481 }
15482 if let Some(ref val) = self.ctry {
15483 let snap = violations.len();
15484 val.validate_constraints("", violations);
15485 if violations.len() > snap {
15486 let pfx = format!("{path}/Ctry");
15487 for v in &mut violations[snap..] {
15488 v.path.insert_str(0, &pfx);
15489 }
15490 }
15491 }
15492 for (idx, elem) in self.adr_line.iter().enumerate() {
15493 let snap = violations.len();
15494 elem.validate_constraints("", violations);
15495 if violations.len() > snap {
15496 let pfx = format!("{path}/AdrLine[{idx}]");
15497 for v in &mut violations[snap..] {
15498 v.path.insert_str(0, &pfx);
15499 }
15500 }
15501 }
15502 }
15503}
15504impl crate::common::validate::Validatable for ProxyAccountIdentification1 {
15505 fn validate_constraints(
15506 &self,
15507 path: &str,
15508 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15509 ) {
15510 if let Some(ref wrapper) = self.tp {
15511 let snap = violations.len();
15512 wrapper.inner.validate_constraints("", violations);
15513 if violations.len() > snap {
15514 let pfx = format!("{path}/Tp");
15515 for v in &mut violations[snap..] {
15516 v.path.insert_str(0, &pfx);
15517 }
15518 }
15519 }
15520 {
15521 let snap = violations.len();
15522 self.id.validate_constraints("", violations);
15523 if violations.len() > snap {
15524 let pfx = format!("{path}/Id");
15525 for v in &mut violations[snap..] {
15526 v.path.insert_str(0, &pfx);
15527 }
15528 }
15529 }
15530 }
15531}
15532impl crate::common::validate::Validatable for ProxyAccountType1Choice {
15533 fn validate_constraints(
15534 &self,
15535 path: &str,
15536 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15537 ) {
15538 match self {
15539 Self::Cd(inner) => {
15540 let snap = violations.len();
15541 inner.validate_constraints("", violations);
15542 if violations.len() > snap {
15543 let pfx = format!("{path}/Cd");
15544 for v in &mut violations[snap..] {
15545 v.path.insert_str(0, &pfx);
15546 }
15547 }
15548 }
15549 Self::Prtry(inner) => {
15550 let snap = violations.len();
15551 inner.validate_constraints("", violations);
15552 if violations.len() > snap {
15553 let pfx = format!("{path}/Prtry");
15554 for v in &mut violations[snap..] {
15555 v.path.insert_str(0, &pfx);
15556 }
15557 }
15558 }
15559 }
15560 }
15561}
15562impl crate::common::validate::Validatable for Purpose2Choice {
15563 fn validate_constraints(
15564 &self,
15565 path: &str,
15566 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15567 ) {
15568 match self {
15569 Self::Cd(inner) => {
15570 let snap = violations.len();
15571 inner.validate_constraints("", violations);
15572 if violations.len() > snap {
15573 let pfx = format!("{path}/Cd");
15574 for v in &mut violations[snap..] {
15575 v.path.insert_str(0, &pfx);
15576 }
15577 }
15578 }
15579 Self::Prtry(inner) => {
15580 let snap = violations.len();
15581 inner.validate_constraints("", violations);
15582 if violations.len() > snap {
15583 let pfx = format!("{path}/Prtry");
15584 for v in &mut violations[snap..] {
15585 v.path.insert_str(0, &pfx);
15586 }
15587 }
15588 }
15589 }
15590 }
15591}
15592impl crate::common::validate::Validatable for ReferredDocumentInformation8 {
15593 fn validate_constraints(
15594 &self,
15595 path: &str,
15596 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15597 ) {
15598 if let Some(ref val) = self.tp {
15599 let snap = violations.len();
15600 val.validate_constraints("", violations);
15601 if violations.len() > snap {
15602 let pfx = format!("{path}/Tp");
15603 for v in &mut violations[snap..] {
15604 v.path.insert_str(0, &pfx);
15605 }
15606 }
15607 }
15608 if let Some(ref val) = self.nb {
15609 let snap = violations.len();
15610 val.validate_constraints("", violations);
15611 if violations.len() > snap {
15612 let pfx = format!("{path}/Nb");
15613 for v in &mut violations[snap..] {
15614 v.path.insert_str(0, &pfx);
15615 }
15616 }
15617 }
15618 if let Some(ref val) = self.rltd_dt {
15619 let snap = violations.len();
15620 val.validate_constraints("", violations);
15621 if violations.len() > snap {
15622 let pfx = format!("{path}/RltdDt");
15623 for v in &mut violations[snap..] {
15624 v.path.insert_str(0, &pfx);
15625 }
15626 }
15627 }
15628 for (idx, elem) in self.line_dtls.iter().enumerate() {
15629 let snap = violations.len();
15630 elem.validate_constraints("", violations);
15631 if violations.len() > snap {
15632 let pfx = format!("{path}/LineDtls[{idx}]");
15633 for v in &mut violations[snap..] {
15634 v.path.insert_str(0, &pfx);
15635 }
15636 }
15637 }
15638 }
15639}
15640impl crate::common::validate::Validatable for RemittanceAmount4 {
15641 fn validate_constraints(
15642 &self,
15643 path: &str,
15644 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15645 ) {
15646 for (idx, elem) in self.rmt_amt_and_tp.iter().enumerate() {
15647 let snap = violations.len();
15648 elem.validate_constraints("", violations);
15649 if violations.len() > snap {
15650 let pfx = format!("{path}/RmtAmtAndTp[{idx}]");
15651 for v in &mut violations[snap..] {
15652 v.path.insert_str(0, &pfx);
15653 }
15654 }
15655 }
15656 for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
15657 let snap = violations.len();
15658 elem.validate_constraints("", violations);
15659 if violations.len() > snap {
15660 let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
15661 for v in &mut violations[snap..] {
15662 v.path.insert_str(0, &pfx);
15663 }
15664 }
15665 }
15666 }
15667}
15668impl crate::common::validate::Validatable for RemittanceInformation22 {
15669 fn validate_constraints(
15670 &self,
15671 path: &str,
15672 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15673 ) {
15674 for (idx, elem) in self.ustrd.iter().enumerate() {
15675 let snap = violations.len();
15676 elem.validate_constraints("", violations);
15677 if violations.len() > snap {
15678 let pfx = format!("{path}/Ustrd[{idx}]");
15679 for v in &mut violations[snap..] {
15680 v.path.insert_str(0, &pfx);
15681 }
15682 }
15683 }
15684 for (idx, elem) in self.strd.iter().enumerate() {
15685 let snap = violations.len();
15686 elem.validate_constraints("", violations);
15687 if violations.len() > snap {
15688 let pfx = format!("{path}/Strd[{idx}]");
15689 for v in &mut violations[snap..] {
15690 v.path.insert_str(0, &pfx);
15691 }
15692 }
15693 }
15694 }
15695}
15696impl crate::common::validate::Validatable for ServiceLevel8Choice {
15697 fn validate_constraints(
15698 &self,
15699 path: &str,
15700 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15701 ) {
15702 match self {
15703 Self::Cd(inner) => {
15704 let snap = violations.len();
15705 inner.validate_constraints("", violations);
15706 if violations.len() > snap {
15707 let pfx = format!("{path}/Cd");
15708 for v in &mut violations[snap..] {
15709 v.path.insert_str(0, &pfx);
15710 }
15711 }
15712 }
15713 Self::Prtry(inner) => {
15714 let snap = violations.len();
15715 inner.validate_constraints("", violations);
15716 if violations.len() > snap {
15717 let pfx = format!("{path}/Prtry");
15718 for v in &mut violations[snap..] {
15719 v.path.insert_str(0, &pfx);
15720 }
15721 }
15722 }
15723 }
15724 }
15725}
15726impl crate::common::validate::Validatable for SettlementInstruction15 {
15727 fn validate_constraints(
15728 &self,
15729 path: &str,
15730 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15731 ) {
15732 {
15733 let snap = violations.len();
15734 self.sttlm_mtd.validate_constraints("", violations);
15735 if violations.len() > snap {
15736 let pfx = format!("{path}/SttlmMtd");
15737 for v in &mut violations[snap..] {
15738 v.path.insert_str(0, &pfx);
15739 }
15740 }
15741 }
15742 if let Some(ref val) = self.sttlm_acct {
15743 let snap = violations.len();
15744 val.validate_constraints("", violations);
15745 if violations.len() > snap {
15746 let pfx = format!("{path}/SttlmAcct");
15747 for v in &mut violations[snap..] {
15748 v.path.insert_str(0, &pfx);
15749 }
15750 }
15751 }
15752 if let Some(ref wrapper) = self.clr_sys {
15753 let snap = violations.len();
15754 wrapper.inner.validate_constraints("", violations);
15755 if violations.len() > snap {
15756 let pfx = format!("{path}/ClrSys");
15757 for v in &mut violations[snap..] {
15758 v.path.insert_str(0, &pfx);
15759 }
15760 }
15761 }
15762 if let Some(ref val) = self.instg_rmbrsmnt_agt {
15763 let snap = violations.len();
15764 val.validate_constraints("", violations);
15765 if violations.len() > snap {
15766 let pfx = format!("{path}/InstgRmbrsmntAgt");
15767 for v in &mut violations[snap..] {
15768 v.path.insert_str(0, &pfx);
15769 }
15770 }
15771 }
15772 if let Some(ref val) = self.instg_rmbrsmnt_agt_acct {
15773 let snap = violations.len();
15774 val.validate_constraints("", violations);
15775 if violations.len() > snap {
15776 let pfx = format!("{path}/InstgRmbrsmntAgtAcct");
15777 for v in &mut violations[snap..] {
15778 v.path.insert_str(0, &pfx);
15779 }
15780 }
15781 }
15782 if let Some(ref val) = self.instd_rmbrsmnt_agt {
15783 let snap = violations.len();
15784 val.validate_constraints("", violations);
15785 if violations.len() > snap {
15786 let pfx = format!("{path}/InstdRmbrsmntAgt");
15787 for v in &mut violations[snap..] {
15788 v.path.insert_str(0, &pfx);
15789 }
15790 }
15791 }
15792 if let Some(ref val) = self.instd_rmbrsmnt_agt_acct {
15793 let snap = violations.len();
15794 val.validate_constraints("", violations);
15795 if violations.len() > snap {
15796 let pfx = format!("{path}/InstdRmbrsmntAgtAcct");
15797 for v in &mut violations[snap..] {
15798 v.path.insert_str(0, &pfx);
15799 }
15800 }
15801 }
15802 if let Some(ref val) = self.thrd_rmbrsmnt_agt {
15803 let snap = violations.len();
15804 val.validate_constraints("", violations);
15805 if violations.len() > snap {
15806 let pfx = format!("{path}/ThrdRmbrsmntAgt");
15807 for v in &mut violations[snap..] {
15808 v.path.insert_str(0, &pfx);
15809 }
15810 }
15811 }
15812 if let Some(ref val) = self.thrd_rmbrsmnt_agt_acct {
15813 let snap = violations.len();
15814 val.validate_constraints("", violations);
15815 if violations.len() > snap {
15816 let pfx = format!("{path}/ThrdRmbrsmntAgtAcct");
15817 for v in &mut violations[snap..] {
15818 v.path.insert_str(0, &pfx);
15819 }
15820 }
15821 }
15822 }
15823}
15824impl crate::common::validate::Validatable for StatusReason6Choice {
15825 fn validate_constraints(
15826 &self,
15827 path: &str,
15828 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15829 ) {
15830 match self {
15831 Self::Cd(inner) => {
15832 let snap = violations.len();
15833 inner.validate_constraints("", violations);
15834 if violations.len() > snap {
15835 let pfx = format!("{path}/Cd");
15836 for v in &mut violations[snap..] {
15837 v.path.insert_str(0, &pfx);
15838 }
15839 }
15840 }
15841 Self::Prtry(inner) => {
15842 let snap = violations.len();
15843 inner.validate_constraints("", violations);
15844 if violations.len() > snap {
15845 let pfx = format!("{path}/Prtry");
15846 for v in &mut violations[snap..] {
15847 v.path.insert_str(0, &pfx);
15848 }
15849 }
15850 }
15851 }
15852 }
15853}
15854impl crate::common::validate::Validatable for StatusReasonInformation14 {
15855 fn validate_constraints(
15856 &self,
15857 path: &str,
15858 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15859 ) {
15860 if let Some(ref val) = self.orgtr {
15861 let snap = violations.len();
15862 val.validate_constraints("", violations);
15863 if violations.len() > snap {
15864 let pfx = format!("{path}/Orgtr");
15865 for v in &mut violations[snap..] {
15866 v.path.insert_str(0, &pfx);
15867 }
15868 }
15869 }
15870 if let Some(ref wrapper) = self.rsn {
15871 let snap = violations.len();
15872 wrapper.inner.validate_constraints("", violations);
15873 if violations.len() > snap {
15874 let pfx = format!("{path}/Rsn");
15875 for v in &mut violations[snap..] {
15876 v.path.insert_str(0, &pfx);
15877 }
15878 }
15879 }
15880 for (idx, elem) in self.addtl_inf.iter().enumerate() {
15881 let snap = violations.len();
15882 elem.validate_constraints("", violations);
15883 if violations.len() > snap {
15884 let pfx = format!("{path}/AddtlInf[{idx}]");
15885 for v in &mut violations[snap..] {
15886 v.path.insert_str(0, &pfx);
15887 }
15888 }
15889 }
15890 }
15891}
15892impl crate::common::validate::Validatable for StructuredRemittanceInformation18 {
15893 fn validate_constraints(
15894 &self,
15895 path: &str,
15896 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15897 ) {
15898 for (idx, elem) in self.rfrd_doc_inf.iter().enumerate() {
15899 let snap = violations.len();
15900 elem.validate_constraints("", violations);
15901 if violations.len() > snap {
15902 let pfx = format!("{path}/RfrdDocInf[{idx}]");
15903 for v in &mut violations[snap..] {
15904 v.path.insert_str(0, &pfx);
15905 }
15906 }
15907 }
15908 if let Some(ref val) = self.rfrd_doc_amt {
15909 let snap = violations.len();
15910 val.validate_constraints("", violations);
15911 if violations.len() > snap {
15912 let pfx = format!("{path}/RfrdDocAmt");
15913 for v in &mut violations[snap..] {
15914 v.path.insert_str(0, &pfx);
15915 }
15916 }
15917 }
15918 if let Some(ref val) = self.cdtr_ref_inf {
15919 let snap = violations.len();
15920 val.validate_constraints("", violations);
15921 if violations.len() > snap {
15922 let pfx = format!("{path}/CdtrRefInf");
15923 for v in &mut violations[snap..] {
15924 v.path.insert_str(0, &pfx);
15925 }
15926 }
15927 }
15928 if let Some(ref val) = self.invcr {
15929 let snap = violations.len();
15930 val.validate_constraints("", violations);
15931 if violations.len() > snap {
15932 let pfx = format!("{path}/Invcr");
15933 for v in &mut violations[snap..] {
15934 v.path.insert_str(0, &pfx);
15935 }
15936 }
15937 }
15938 if let Some(ref val) = self.invcee {
15939 let snap = violations.len();
15940 val.validate_constraints("", violations);
15941 if violations.len() > snap {
15942 let pfx = format!("{path}/Invcee");
15943 for v in &mut violations[snap..] {
15944 v.path.insert_str(0, &pfx);
15945 }
15946 }
15947 }
15948 if let Some(ref val) = self.tax_rmt {
15949 let snap = violations.len();
15950 val.validate_constraints("", violations);
15951 if violations.len() > snap {
15952 let pfx = format!("{path}/TaxRmt");
15953 for v in &mut violations[snap..] {
15954 v.path.insert_str(0, &pfx);
15955 }
15956 }
15957 }
15958 if let Some(ref val) = self.grnshmt_rmt {
15959 let snap = violations.len();
15960 val.validate_constraints("", violations);
15961 if violations.len() > snap {
15962 let pfx = format!("{path}/GrnshmtRmt");
15963 for v in &mut violations[snap..] {
15964 v.path.insert_str(0, &pfx);
15965 }
15966 }
15967 }
15968 for (idx, elem) in self.addtl_rmt_inf.iter().enumerate() {
15969 let snap = violations.len();
15970 elem.validate_constraints("", violations);
15971 if violations.len() > snap {
15972 let pfx = format!("{path}/AddtlRmtInf[{idx}]");
15973 for v in &mut violations[snap..] {
15974 v.path.insert_str(0, &pfx);
15975 }
15976 }
15977 }
15978 }
15979}
15980impl crate::common::validate::Validatable for SupplementaryData1 {
15981 fn validate_constraints(
15982 &self,
15983 path: &str,
15984 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15985 ) {
15986 if let Some(ref val) = self.plc_and_nm {
15987 let snap = violations.len();
15988 val.validate_constraints("", violations);
15989 if violations.len() > snap {
15990 let pfx = format!("{path}/PlcAndNm");
15991 for v in &mut violations[snap..] {
15992 v.path.insert_str(0, &pfx);
15993 }
15994 }
15995 }
15996 {
15997 let snap = violations.len();
15998 self.envlp.validate_constraints("", violations);
15999 if violations.len() > snap {
16000 let pfx = format!("{path}/Envlp");
16001 for v in &mut violations[snap..] {
16002 v.path.insert_str(0, &pfx);
16003 }
16004 }
16005 }
16006 }
16007}
16008impl crate::common::validate::Validatable for SupplementaryDataEnvelope1 {
16009 fn validate_constraints(
16010 &self,
16011 _path: &str,
16012 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16013 ) {
16014 }
16015}
16016impl crate::common::validate::Validatable for TaxAmount3 {
16017 fn validate_constraints(
16018 &self,
16019 path: &str,
16020 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16021 ) {
16022 if let Some(ref val) = self.rate {
16023 let snap = violations.len();
16024 val.validate_constraints("", violations);
16025 if violations.len() > snap {
16026 let pfx = format!("{path}/Rate");
16027 for v in &mut violations[snap..] {
16028 v.path.insert_str(0, &pfx);
16029 }
16030 }
16031 }
16032 if let Some(ref val) = self.taxbl_base_amt {
16033 let snap = violations.len();
16034 val.validate_constraints("", violations);
16035 if violations.len() > snap {
16036 let pfx = format!("{path}/TaxblBaseAmt");
16037 for v in &mut violations[snap..] {
16038 v.path.insert_str(0, &pfx);
16039 }
16040 }
16041 }
16042 if let Some(ref val) = self.ttl_amt {
16043 let snap = violations.len();
16044 val.validate_constraints("", violations);
16045 if violations.len() > snap {
16046 let pfx = format!("{path}/TtlAmt");
16047 for v in &mut violations[snap..] {
16048 v.path.insert_str(0, &pfx);
16049 }
16050 }
16051 }
16052 for (idx, elem) in self.dtls.iter().enumerate() {
16053 let snap = violations.len();
16054 elem.validate_constraints("", violations);
16055 if violations.len() > snap {
16056 let pfx = format!("{path}/Dtls[{idx}]");
16057 for v in &mut violations[snap..] {
16058 v.path.insert_str(0, &pfx);
16059 }
16060 }
16061 }
16062 }
16063}
16064impl crate::common::validate::Validatable for TaxAuthorisation1 {
16065 fn validate_constraints(
16066 &self,
16067 path: &str,
16068 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16069 ) {
16070 if let Some(ref val) = self.titl {
16071 let snap = violations.len();
16072 val.validate_constraints("", violations);
16073 if violations.len() > snap {
16074 let pfx = format!("{path}/Titl");
16075 for v in &mut violations[snap..] {
16076 v.path.insert_str(0, &pfx);
16077 }
16078 }
16079 }
16080 if let Some(ref val) = self.nm {
16081 let snap = violations.len();
16082 val.validate_constraints("", violations);
16083 if violations.len() > snap {
16084 let pfx = format!("{path}/Nm");
16085 for v in &mut violations[snap..] {
16086 v.path.insert_str(0, &pfx);
16087 }
16088 }
16089 }
16090 }
16091}
16092impl crate::common::validate::Validatable for TaxData1 {
16093 fn validate_constraints(
16094 &self,
16095 path: &str,
16096 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16097 ) {
16098 if let Some(ref val) = self.cdtr {
16099 let snap = violations.len();
16100 val.validate_constraints("", violations);
16101 if violations.len() > snap {
16102 let pfx = format!("{path}/Cdtr");
16103 for v in &mut violations[snap..] {
16104 v.path.insert_str(0, &pfx);
16105 }
16106 }
16107 }
16108 if let Some(ref val) = self.dbtr {
16109 let snap = violations.len();
16110 val.validate_constraints("", violations);
16111 if violations.len() > snap {
16112 let pfx = format!("{path}/Dbtr");
16113 for v in &mut violations[snap..] {
16114 v.path.insert_str(0, &pfx);
16115 }
16116 }
16117 }
16118 if let Some(ref val) = self.ultmt_dbtr {
16119 let snap = violations.len();
16120 val.validate_constraints("", violations);
16121 if violations.len() > snap {
16122 let pfx = format!("{path}/UltmtDbtr");
16123 for v in &mut violations[snap..] {
16124 v.path.insert_str(0, &pfx);
16125 }
16126 }
16127 }
16128 if let Some(ref val) = self.admstn_zone {
16129 let snap = violations.len();
16130 val.validate_constraints("", violations);
16131 if violations.len() > snap {
16132 let pfx = format!("{path}/AdmstnZone");
16133 for v in &mut violations[snap..] {
16134 v.path.insert_str(0, &pfx);
16135 }
16136 }
16137 }
16138 if let Some(ref val) = self.ref_nb {
16139 let snap = violations.len();
16140 val.validate_constraints("", violations);
16141 if violations.len() > snap {
16142 let pfx = format!("{path}/RefNb");
16143 for v in &mut violations[snap..] {
16144 v.path.insert_str(0, &pfx);
16145 }
16146 }
16147 }
16148 if let Some(ref val) = self.mtd {
16149 let snap = violations.len();
16150 val.validate_constraints("", violations);
16151 if violations.len() > snap {
16152 let pfx = format!("{path}/Mtd");
16153 for v in &mut violations[snap..] {
16154 v.path.insert_str(0, &pfx);
16155 }
16156 }
16157 }
16158 if let Some(ref val) = self.ttl_taxbl_base_amt {
16159 let snap = violations.len();
16160 val.validate_constraints("", violations);
16161 if violations.len() > snap {
16162 let pfx = format!("{path}/TtlTaxblBaseAmt");
16163 for v in &mut violations[snap..] {
16164 v.path.insert_str(0, &pfx);
16165 }
16166 }
16167 }
16168 if let Some(ref val) = self.ttl_tax_amt {
16169 let snap = violations.len();
16170 val.validate_constraints("", violations);
16171 if violations.len() > snap {
16172 let pfx = format!("{path}/TtlTaxAmt");
16173 for v in &mut violations[snap..] {
16174 v.path.insert_str(0, &pfx);
16175 }
16176 }
16177 }
16178 if let Some(ref val) = self.dt {
16179 let snap = violations.len();
16180 val.validate_constraints("", violations);
16181 if violations.len() > snap {
16182 let pfx = format!("{path}/Dt");
16183 for v in &mut violations[snap..] {
16184 v.path.insert_str(0, &pfx);
16185 }
16186 }
16187 }
16188 if let Some(ref val) = self.seq_nb {
16189 let snap = violations.len();
16190 val.validate_constraints("", violations);
16191 if violations.len() > snap {
16192 let pfx = format!("{path}/SeqNb");
16193 for v in &mut violations[snap..] {
16194 v.path.insert_str(0, &pfx);
16195 }
16196 }
16197 }
16198 for (idx, elem) in self.rcrd.iter().enumerate() {
16199 let snap = violations.len();
16200 elem.validate_constraints("", violations);
16201 if violations.len() > snap {
16202 let pfx = format!("{path}/Rcrd[{idx}]");
16203 for v in &mut violations[snap..] {
16204 v.path.insert_str(0, &pfx);
16205 }
16206 }
16207 }
16208 }
16209}
16210impl crate::common::validate::Validatable for TaxParty1 {
16211 fn validate_constraints(
16212 &self,
16213 path: &str,
16214 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16215 ) {
16216 if let Some(ref val) = self.tax_id {
16217 let snap = violations.len();
16218 val.validate_constraints("", violations);
16219 if violations.len() > snap {
16220 let pfx = format!("{path}/TaxId");
16221 for v in &mut violations[snap..] {
16222 v.path.insert_str(0, &pfx);
16223 }
16224 }
16225 }
16226 if let Some(ref val) = self.regn_id {
16227 let snap = violations.len();
16228 val.validate_constraints("", violations);
16229 if violations.len() > snap {
16230 let pfx = format!("{path}/RegnId");
16231 for v in &mut violations[snap..] {
16232 v.path.insert_str(0, &pfx);
16233 }
16234 }
16235 }
16236 if let Some(ref val) = self.tax_tp {
16237 let snap = violations.len();
16238 val.validate_constraints("", violations);
16239 if violations.len() > snap {
16240 let pfx = format!("{path}/TaxTp");
16241 for v in &mut violations[snap..] {
16242 v.path.insert_str(0, &pfx);
16243 }
16244 }
16245 }
16246 }
16247}
16248impl crate::common::validate::Validatable for TaxParty2 {
16249 fn validate_constraints(
16250 &self,
16251 path: &str,
16252 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16253 ) {
16254 if let Some(ref val) = self.tax_id {
16255 let snap = violations.len();
16256 val.validate_constraints("", violations);
16257 if violations.len() > snap {
16258 let pfx = format!("{path}/TaxId");
16259 for v in &mut violations[snap..] {
16260 v.path.insert_str(0, &pfx);
16261 }
16262 }
16263 }
16264 if let Some(ref val) = self.regn_id {
16265 let snap = violations.len();
16266 val.validate_constraints("", violations);
16267 if violations.len() > snap {
16268 let pfx = format!("{path}/RegnId");
16269 for v in &mut violations[snap..] {
16270 v.path.insert_str(0, &pfx);
16271 }
16272 }
16273 }
16274 if let Some(ref val) = self.tax_tp {
16275 let snap = violations.len();
16276 val.validate_constraints("", violations);
16277 if violations.len() > snap {
16278 let pfx = format!("{path}/TaxTp");
16279 for v in &mut violations[snap..] {
16280 v.path.insert_str(0, &pfx);
16281 }
16282 }
16283 }
16284 if let Some(ref val) = self.authstn {
16285 let snap = violations.len();
16286 val.validate_constraints("", violations);
16287 if violations.len() > snap {
16288 let pfx = format!("{path}/Authstn");
16289 for v in &mut violations[snap..] {
16290 v.path.insert_str(0, &pfx);
16291 }
16292 }
16293 }
16294 }
16295}
16296impl crate::common::validate::Validatable for TaxPeriod3 {
16297 fn validate_constraints(
16298 &self,
16299 path: &str,
16300 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16301 ) {
16302 if let Some(ref val) = self.yr {
16303 let snap = violations.len();
16304 val.validate_constraints("", violations);
16305 if violations.len() > snap {
16306 let pfx = format!("{path}/Yr");
16307 for v in &mut violations[snap..] {
16308 v.path.insert_str(0, &pfx);
16309 }
16310 }
16311 }
16312 if let Some(ref val) = self.tp {
16313 let snap = violations.len();
16314 val.validate_constraints("", violations);
16315 if violations.len() > snap {
16316 let pfx = format!("{path}/Tp");
16317 for v in &mut violations[snap..] {
16318 v.path.insert_str(0, &pfx);
16319 }
16320 }
16321 }
16322 if let Some(ref val) = self.fr_to_dt {
16323 let snap = violations.len();
16324 val.validate_constraints("", violations);
16325 if violations.len() > snap {
16326 let pfx = format!("{path}/FrToDt");
16327 for v in &mut violations[snap..] {
16328 v.path.insert_str(0, &pfx);
16329 }
16330 }
16331 }
16332 }
16333}
16334impl crate::common::validate::Validatable for TaxRecord3 {
16335 fn validate_constraints(
16336 &self,
16337 path: &str,
16338 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16339 ) {
16340 if let Some(ref val) = self.tp {
16341 let snap = violations.len();
16342 val.validate_constraints("", violations);
16343 if violations.len() > snap {
16344 let pfx = format!("{path}/Tp");
16345 for v in &mut violations[snap..] {
16346 v.path.insert_str(0, &pfx);
16347 }
16348 }
16349 }
16350 if let Some(ref val) = self.ctgy {
16351 let snap = violations.len();
16352 val.validate_constraints("", violations);
16353 if violations.len() > snap {
16354 let pfx = format!("{path}/Ctgy");
16355 for v in &mut violations[snap..] {
16356 v.path.insert_str(0, &pfx);
16357 }
16358 }
16359 }
16360 if let Some(ref val) = self.ctgy_dtls {
16361 let snap = violations.len();
16362 val.validate_constraints("", violations);
16363 if violations.len() > snap {
16364 let pfx = format!("{path}/CtgyDtls");
16365 for v in &mut violations[snap..] {
16366 v.path.insert_str(0, &pfx);
16367 }
16368 }
16369 }
16370 if let Some(ref val) = self.dbtr_sts {
16371 let snap = violations.len();
16372 val.validate_constraints("", violations);
16373 if violations.len() > snap {
16374 let pfx = format!("{path}/DbtrSts");
16375 for v in &mut violations[snap..] {
16376 v.path.insert_str(0, &pfx);
16377 }
16378 }
16379 }
16380 if let Some(ref val) = self.cert_id {
16381 let snap = violations.len();
16382 val.validate_constraints("", violations);
16383 if violations.len() > snap {
16384 let pfx = format!("{path}/CertId");
16385 for v in &mut violations[snap..] {
16386 v.path.insert_str(0, &pfx);
16387 }
16388 }
16389 }
16390 if let Some(ref val) = self.frms_cd {
16391 let snap = violations.len();
16392 val.validate_constraints("", violations);
16393 if violations.len() > snap {
16394 let pfx = format!("{path}/FrmsCd");
16395 for v in &mut violations[snap..] {
16396 v.path.insert_str(0, &pfx);
16397 }
16398 }
16399 }
16400 if let Some(ref val) = self.prd {
16401 let snap = violations.len();
16402 val.validate_constraints("", violations);
16403 if violations.len() > snap {
16404 let pfx = format!("{path}/Prd");
16405 for v in &mut violations[snap..] {
16406 v.path.insert_str(0, &pfx);
16407 }
16408 }
16409 }
16410 if let Some(ref val) = self.tax_amt {
16411 let snap = violations.len();
16412 val.validate_constraints("", violations);
16413 if violations.len() > snap {
16414 let pfx = format!("{path}/TaxAmt");
16415 for v in &mut violations[snap..] {
16416 v.path.insert_str(0, &pfx);
16417 }
16418 }
16419 }
16420 if let Some(ref val) = self.addtl_inf {
16421 let snap = violations.len();
16422 val.validate_constraints("", violations);
16423 if violations.len() > snap {
16424 let pfx = format!("{path}/AddtlInf");
16425 for v in &mut violations[snap..] {
16426 v.path.insert_str(0, &pfx);
16427 }
16428 }
16429 }
16430 }
16431}
16432impl crate::common::validate::Validatable for TaxRecordDetails3 {
16433 fn validate_constraints(
16434 &self,
16435 path: &str,
16436 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16437 ) {
16438 if let Some(ref val) = self.prd {
16439 let snap = violations.len();
16440 val.validate_constraints("", violations);
16441 if violations.len() > snap {
16442 let pfx = format!("{path}/Prd");
16443 for v in &mut violations[snap..] {
16444 v.path.insert_str(0, &pfx);
16445 }
16446 }
16447 }
16448 {
16449 let snap = violations.len();
16450 self.amt.validate_constraints("", violations);
16451 if violations.len() > snap {
16452 let pfx = format!("{path}/Amt");
16453 for v in &mut violations[snap..] {
16454 v.path.insert_str(0, &pfx);
16455 }
16456 }
16457 }
16458 }
16459}
16460impl crate::common::validate::IsoMessage for Document {
16461 fn message_type(&self) -> &'static str {
16462 "pacs.002.001.14"
16463 }
16464 fn root_path(&self) -> &'static str {
16465 "/Document"
16466 }
16467}