1#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7#[serde(transparent)]
8pub struct ActiveCurrencyAndAmountSimpleType(pub String);
9impl TryFrom<String> for ActiveCurrencyAndAmountSimpleType {
10 type Error = crate::common::validate::ConstraintError;
11 #[allow(clippy::unreadable_literal)]
12 fn try_from(value: String) -> Result<Self, Self::Error> {
13 {
14 let value: &str = &value;
15 {
16 let frac_count = value.find('.').map_or(0, |dot| {
17 value[dot + 1..]
18 .chars()
19 .filter(char::is_ascii_digit)
20 .count()
21 });
22 let violated = frac_count > 5usize;
23 if violated {
24 return Err(crate::common::validate::ConstraintError {
25 kind: crate::common::validate::ConstraintKind::FractionDigits,
26 message: format!(
27 "{} (got {})",
28 "value exceeds maximum fraction digits 5", frac_count
29 ),
30 });
31 }
32 }
33 {
34 let digit_count = value.chars().filter(char::is_ascii_digit).count();
35 let violated = digit_count > 18usize;
36 if violated {
37 return Err(crate::common::validate::ConstraintError {
38 kind: crate::common::validate::ConstraintKind::TotalDigits,
39 message: format!(
40 "{} (got {})",
41 "value exceeds maximum total digits 18", digit_count
42 ),
43 });
44 }
45 }
46 }
47 Ok(Self(value))
48 }
49}
50impl ActiveCurrencyAndAmountSimpleType {
51 #[allow(clippy::unreadable_literal)]
53 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
54 Self::try_from(value.into())
55 }
56}
57impl From<ActiveCurrencyAndAmountSimpleType> for String {
58 fn from(v: ActiveCurrencyAndAmountSimpleType) -> Self {
59 v.0
60 }
61}
62#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
64#[serde(transparent)]
65pub struct ActiveCurrencyCode(pub String);
66impl TryFrom<String> for ActiveCurrencyCode {
67 type Error = crate::common::validate::ConstraintError;
68 #[allow(clippy::unreadable_literal)]
69 fn try_from(value: String) -> Result<Self, Self::Error> {
70 {
71 let value: &str = &value;
72 {
73 let violated = {
74 let bytes = value.as_bytes();
75 bytes.len() != 3usize
76 || ({
77 let b = bytes[0usize];
78 !(65u8..=90u8).contains(&b)
79 })
80 || ({
81 let b = bytes[1usize];
82 !(65u8..=90u8).contains(&b)
83 })
84 || ({
85 let b = bytes[2usize];
86 !(65u8..=90u8).contains(&b)
87 })
88 };
89 if violated {
90 return Err(crate::common::validate::ConstraintError {
91 kind: crate::common::validate::ConstraintKind::Pattern,
92 message: "value does not match pattern [A-Z]{3,3}".to_string(),
93 });
94 }
95 }
96 }
97 Ok(Self(value))
98 }
99}
100impl ActiveCurrencyCode {
101 #[allow(clippy::unreadable_literal)]
103 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
104 Self::try_from(value.into())
105 }
106}
107impl From<ActiveCurrencyCode> for String {
108 fn from(v: ActiveCurrencyCode) -> Self {
109 v.0
110 }
111}
112#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
116#[serde(transparent)]
117pub struct ActiveOrHistoricCurrencyAndAmountSimpleType(pub String);
118impl TryFrom<String> for ActiveOrHistoricCurrencyAndAmountSimpleType {
119 type Error = crate::common::validate::ConstraintError;
120 #[allow(clippy::unreadable_literal)]
121 fn try_from(value: String) -> Result<Self, Self::Error> {
122 {
123 let value: &str = &value;
124 {
125 let frac_count = value.find('.').map_or(0, |dot| {
126 value[dot + 1..]
127 .chars()
128 .filter(char::is_ascii_digit)
129 .count()
130 });
131 let violated = frac_count > 5usize;
132 if violated {
133 return Err(crate::common::validate::ConstraintError {
134 kind: crate::common::validate::ConstraintKind::FractionDigits,
135 message: format!(
136 "{} (got {})",
137 "value exceeds maximum fraction digits 5", frac_count
138 ),
139 });
140 }
141 }
142 {
143 let digit_count = value.chars().filter(char::is_ascii_digit).count();
144 let violated = digit_count > 18usize;
145 if violated {
146 return Err(crate::common::validate::ConstraintError {
147 kind: crate::common::validate::ConstraintKind::TotalDigits,
148 message: format!(
149 "{} (got {})",
150 "value exceeds maximum total digits 18", digit_count
151 ),
152 });
153 }
154 }
155 }
156 Ok(Self(value))
157 }
158}
159impl ActiveOrHistoricCurrencyAndAmountSimpleType {
160 #[allow(clippy::unreadable_literal)]
162 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
163 Self::try_from(value.into())
164 }
165}
166impl From<ActiveOrHistoricCurrencyAndAmountSimpleType> for String {
167 fn from(v: ActiveOrHistoricCurrencyAndAmountSimpleType) -> Self {
168 v.0
169 }
170}
171#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
173#[serde(transparent)]
174pub struct ActiveOrHistoricCurrencyCode(pub String);
175impl TryFrom<String> for ActiveOrHistoricCurrencyCode {
176 type Error = crate::common::validate::ConstraintError;
177 #[allow(clippy::unreadable_literal)]
178 fn try_from(value: String) -> Result<Self, Self::Error> {
179 {
180 let value: &str = &value;
181 {
182 let violated = {
183 let bytes = value.as_bytes();
184 bytes.len() != 3usize
185 || ({
186 let b = bytes[0usize];
187 !(65u8..=90u8).contains(&b)
188 })
189 || ({
190 let b = bytes[1usize];
191 !(65u8..=90u8).contains(&b)
192 })
193 || ({
194 let b = bytes[2usize];
195 !(65u8..=90u8).contains(&b)
196 })
197 };
198 if violated {
199 return Err(crate::common::validate::ConstraintError {
200 kind: crate::common::validate::ConstraintKind::Pattern,
201 message: "value does not match pattern [A-Z]{3,3}".to_string(),
202 });
203 }
204 }
205 }
206 Ok(Self(value))
207 }
208}
209impl ActiveOrHistoricCurrencyCode {
210 #[allow(clippy::unreadable_literal)]
212 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
213 Self::try_from(value.into())
214 }
215}
216impl From<ActiveOrHistoricCurrencyCode> for String {
217 fn from(v: ActiveOrHistoricCurrencyCode) -> Self {
218 v.0
219 }
220}
221#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
222pub enum AddressType2Code {
223 #[serde(rename = "ADDR")]
224 Addr,
225 #[serde(rename = "PBOX")]
226 Pbox,
227 #[serde(rename = "HOME")]
228 Home,
229 #[serde(rename = "BIZZ")]
230 Bizz,
231 #[serde(rename = "MLTO")]
232 Mlto,
233 #[serde(rename = "DLVY")]
234 Dlvy,
235}
236#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
238#[serde(transparent)]
239pub struct AnyBICDec2014Identifier(pub String);
240impl TryFrom<String> for AnyBICDec2014Identifier {
241 type Error = crate::common::validate::ConstraintError;
242 #[allow(clippy::unreadable_literal)]
243 fn try_from(value: String) -> Result<Self, Self::Error> {
244 {
245 let value: &str = &value;
246 {
247 let violated = {
248 let bytes = value.as_bytes();
249 let len = bytes.len();
250 let result: bool = (|| -> bool {
251 let mut pos: usize = 0;
252 if !(8usize..=11usize).contains(&len) {
253 return true;
254 }
255 {
256 let end = pos + 4usize;
257 if end > len {
258 return true;
259 }
260 for &b in &bytes[pos..end] {
261 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
262 return true;
263 }
264 }
265 pos = end;
266 }
267 {
268 let end = pos + 2usize;
269 if end > len {
270 return true;
271 }
272 for &b in &bytes[pos..end] {
273 if !(65u8..=90u8).contains(&b) {
274 return true;
275 }
276 }
277 pos = end;
278 }
279 {
280 let end = pos + 2usize;
281 if end > len {
282 return true;
283 }
284 for &b in &bytes[pos..end] {
285 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
286 return true;
287 }
288 }
289 pos = end;
290 }
291 {
292 let saved = pos;
293 let matched: bool = (|| -> bool {
294 {
295 let end = pos + 3usize;
296 if end > len {
297 return true;
298 }
299 for &b in &bytes[pos..end] {
300 if !(65u8..=90u8).contains(&b)
301 && !(48u8..=57u8).contains(&b)
302 {
303 return true;
304 }
305 }
306 pos = end;
307 }
308 false
309 })();
310 if matched {
311 pos = saved;
312 }
313 }
314 if pos != len {
315 return true;
316 }
317 false
318 })();
319 result
320 };
321 if violated {
322 return Err(crate::common::validate::ConstraintError {
323 kind: crate::common::validate::ConstraintKind::Pattern,
324 message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
325 .to_string(),
326 });
327 }
328 }
329 }
330 Ok(Self(value))
331 }
332}
333impl AnyBICDec2014Identifier {
334 #[allow(clippy::unreadable_literal)]
336 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
337 Self::try_from(value.into())
338 }
339}
340impl From<AnyBICDec2014Identifier> for String {
341 fn from(v: AnyBICDec2014Identifier) -> Self {
342 v.0
343 }
344}
345#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
347#[serde(transparent)]
348pub struct BICFIDec2014Identifier(pub String);
349impl TryFrom<String> for BICFIDec2014Identifier {
350 type Error = crate::common::validate::ConstraintError;
351 #[allow(clippy::unreadable_literal)]
352 fn try_from(value: String) -> Result<Self, Self::Error> {
353 {
354 let value: &str = &value;
355 {
356 let violated = {
357 let bytes = value.as_bytes();
358 let len = bytes.len();
359 let result: bool = (|| -> bool {
360 let mut pos: usize = 0;
361 if !(8usize..=11usize).contains(&len) {
362 return true;
363 }
364 {
365 let end = pos + 4usize;
366 if end > len {
367 return true;
368 }
369 for &b in &bytes[pos..end] {
370 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
371 return true;
372 }
373 }
374 pos = end;
375 }
376 {
377 let end = pos + 2usize;
378 if end > len {
379 return true;
380 }
381 for &b in &bytes[pos..end] {
382 if !(65u8..=90u8).contains(&b) {
383 return true;
384 }
385 }
386 pos = end;
387 }
388 {
389 let end = pos + 2usize;
390 if end > len {
391 return true;
392 }
393 for &b in &bytes[pos..end] {
394 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
395 return true;
396 }
397 }
398 pos = end;
399 }
400 {
401 let saved = pos;
402 let matched: bool = (|| -> bool {
403 {
404 let end = pos + 3usize;
405 if end > len {
406 return true;
407 }
408 for &b in &bytes[pos..end] {
409 if !(65u8..=90u8).contains(&b)
410 && !(48u8..=57u8).contains(&b)
411 {
412 return true;
413 }
414 }
415 pos = end;
416 }
417 false
418 })();
419 if matched {
420 pos = saved;
421 }
422 }
423 if pos != len {
424 return true;
425 }
426 false
427 })();
428 result
429 };
430 if violated {
431 return Err(crate::common::validate::ConstraintError {
432 kind: crate::common::validate::ConstraintKind::Pattern,
433 message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
434 .to_string(),
435 });
436 }
437 }
438 }
439 Ok(Self(value))
440 }
441}
442impl BICFIDec2014Identifier {
443 #[allow(clippy::unreadable_literal)]
445 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
446 Self::try_from(value.into())
447 }
448}
449impl From<BICFIDec2014Identifier> for String {
450 fn from(v: BICFIDec2014Identifier) -> Self {
451 v.0
452 }
453}
454#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
457#[serde(transparent)]
458pub struct BaseOneRate(pub String);
459impl TryFrom<String> for BaseOneRate {
460 type Error = crate::common::validate::ConstraintError;
461 #[allow(clippy::unreadable_literal)]
462 fn try_from(value: String) -> Result<Self, Self::Error> {
463 {
464 let value: &str = &value;
465 {
466 let frac_count = value.find('.').map_or(0, |dot| {
467 value[dot + 1..]
468 .chars()
469 .filter(char::is_ascii_digit)
470 .count()
471 });
472 let violated = frac_count > 10usize;
473 if violated {
474 return Err(crate::common::validate::ConstraintError {
475 kind: crate::common::validate::ConstraintKind::FractionDigits,
476 message: format!(
477 "{} (got {})",
478 "value exceeds maximum fraction digits 10", frac_count
479 ),
480 });
481 }
482 }
483 {
484 let digit_count = value.chars().filter(char::is_ascii_digit).count();
485 let violated = digit_count > 11usize;
486 if violated {
487 return Err(crate::common::validate::ConstraintError {
488 kind: crate::common::validate::ConstraintKind::TotalDigits,
489 message: format!(
490 "{} (got {})",
491 "value exceeds maximum total digits 11", digit_count
492 ),
493 });
494 }
495 }
496 }
497 Ok(Self(value))
498 }
499}
500impl BaseOneRate {
501 #[allow(clippy::unreadable_literal)]
503 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
504 Self::try_from(value.into())
505 }
506}
507impl From<BaseOneRate> for String {
508 fn from(v: BaseOneRate) -> Self {
509 v.0
510 }
511}
512#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
513#[serde(transparent)]
514pub struct BatchBookingIndicator(pub bool);
515#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
516pub enum ChargeBearerType1Code {
517 #[serde(rename = "DEBT")]
518 Debt,
519 #[serde(rename = "CRED")]
520 Cred,
521 #[serde(rename = "SHAR")]
522 Shar,
523 #[serde(rename = "SLEV")]
524 Slev,
525}
526#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
527pub enum ClearingChannel2Code {
528 #[serde(rename = "RTGS")]
529 Rtgs,
530 #[serde(rename = "RTNS")]
531 Rtns,
532 #[serde(rename = "MPNS")]
533 Mpns,
534 #[serde(rename = "BOOK")]
535 Book,
536}
537#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
539#[serde(transparent)]
540pub struct CountryCode(pub String);
541impl TryFrom<String> for CountryCode {
542 type Error = crate::common::validate::ConstraintError;
543 #[allow(clippy::unreadable_literal)]
544 fn try_from(value: String) -> Result<Self, Self::Error> {
545 {
546 let value: &str = &value;
547 {
548 let violated = {
549 let bytes = value.as_bytes();
550 bytes.len() != 2usize
551 || ({
552 let b = bytes[0usize];
553 !(65u8..=90u8).contains(&b)
554 })
555 || ({
556 let b = bytes[1usize];
557 !(65u8..=90u8).contains(&b)
558 })
559 };
560 if violated {
561 return Err(crate::common::validate::ConstraintError {
562 kind: crate::common::validate::ConstraintKind::Pattern,
563 message: "value does not match pattern [A-Z]{2,2}".to_string(),
564 });
565 }
566 }
567 }
568 Ok(Self(value))
569 }
570}
571impl CountryCode {
572 #[allow(clippy::unreadable_literal)]
574 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
575 Self::try_from(value.into())
576 }
577}
578impl From<CountryCode> for String {
579 fn from(v: CountryCode) -> Self {
580 v.0
581 }
582}
583#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
584pub enum CreditDebitCode {
585 #[serde(rename = "CRDT")]
586 Crdt,
587 #[serde(rename = "DBIT")]
588 Dbit,
589}
590#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
593#[serde(transparent)]
594pub struct DecimalNumber(pub String);
595impl TryFrom<String> for DecimalNumber {
596 type Error = crate::common::validate::ConstraintError;
597 #[allow(clippy::unreadable_literal)]
598 fn try_from(value: String) -> Result<Self, Self::Error> {
599 {
600 let value: &str = &value;
601 {
602 let frac_count = value.find('.').map_or(0, |dot| {
603 value[dot + 1..]
604 .chars()
605 .filter(char::is_ascii_digit)
606 .count()
607 });
608 let violated = frac_count > 17usize;
609 if violated {
610 return Err(crate::common::validate::ConstraintError {
611 kind: crate::common::validate::ConstraintKind::FractionDigits,
612 message: format!(
613 "{} (got {})",
614 "value exceeds maximum fraction digits 17", frac_count
615 ),
616 });
617 }
618 }
619 {
620 let digit_count = value.chars().filter(char::is_ascii_digit).count();
621 let violated = digit_count > 18usize;
622 if violated {
623 return Err(crate::common::validate::ConstraintError {
624 kind: crate::common::validate::ConstraintKind::TotalDigits,
625 message: format!(
626 "{} (got {})",
627 "value exceeds maximum total digits 18", digit_count
628 ),
629 });
630 }
631 }
632 }
633 Ok(Self(value))
634 }
635}
636impl DecimalNumber {
637 #[allow(clippy::unreadable_literal)]
639 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
640 Self::try_from(value.into())
641 }
642}
643impl From<DecimalNumber> for String {
644 fn from(v: DecimalNumber) -> Self {
645 v.0
646 }
647}
648#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
650#[serde(transparent)]
651pub struct Exact2NumericText(pub String);
652impl TryFrom<String> for Exact2NumericText {
653 type Error = crate::common::validate::ConstraintError;
654 #[allow(clippy::unreadable_literal)]
655 fn try_from(value: String) -> Result<Self, Self::Error> {
656 {
657 let value: &str = &value;
658 {
659 let violated = {
660 let bytes = value.as_bytes();
661 bytes.len() != 2usize
662 || ({
663 let b = bytes[0usize];
664 !(48u8..=57u8).contains(&b)
665 })
666 || ({
667 let b = bytes[1usize];
668 !(48u8..=57u8).contains(&b)
669 })
670 };
671 if violated {
672 return Err(crate::common::validate::ConstraintError {
673 kind: crate::common::validate::ConstraintKind::Pattern,
674 message: "value does not match pattern [0-9]{2}".to_string(),
675 });
676 }
677 }
678 }
679 Ok(Self(value))
680 }
681}
682impl Exact2NumericText {
683 #[allow(clippy::unreadable_literal)]
685 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
686 Self::try_from(value.into())
687 }
688}
689impl From<Exact2NumericText> for String {
690 fn from(v: Exact2NumericText) -> Self {
691 v.0
692 }
693}
694#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
696#[serde(transparent)]
697pub struct Exact4AlphaNumericText(pub String);
698impl TryFrom<String> for Exact4AlphaNumericText {
699 type Error = crate::common::validate::ConstraintError;
700 #[allow(clippy::unreadable_literal)]
701 fn try_from(value: String) -> Result<Self, Self::Error> {
702 {
703 let value: &str = &value;
704 {
705 let violated = {
706 let bytes = value.as_bytes();
707 bytes.len() != 4usize
708 || ({
709 let b = bytes[0usize];
710 !(97u8..=122u8).contains(&b)
711 && !(65u8..=90u8).contains(&b)
712 && !(48u8..=57u8).contains(&b)
713 })
714 || ({
715 let b = bytes[1usize];
716 !(97u8..=122u8).contains(&b)
717 && !(65u8..=90u8).contains(&b)
718 && !(48u8..=57u8).contains(&b)
719 })
720 || ({
721 let b = bytes[2usize];
722 !(97u8..=122u8).contains(&b)
723 && !(65u8..=90u8).contains(&b)
724 && !(48u8..=57u8).contains(&b)
725 })
726 || ({
727 let b = bytes[3usize];
728 !(97u8..=122u8).contains(&b)
729 && !(65u8..=90u8).contains(&b)
730 && !(48u8..=57u8).contains(&b)
731 })
732 };
733 if violated {
734 return Err(crate::common::validate::ConstraintError {
735 kind: crate::common::validate::ConstraintKind::Pattern,
736 message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
737 });
738 }
739 }
740 }
741 Ok(Self(value))
742 }
743}
744impl Exact4AlphaNumericText {
745 #[allow(clippy::unreadable_literal)]
747 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
748 Self::try_from(value.into())
749 }
750}
751impl From<Exact4AlphaNumericText> for String {
752 fn from(v: Exact4AlphaNumericText) -> Self {
753 v.0
754 }
755}
756#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
759#[serde(transparent)]
760pub struct ExternalAccountIdentification1Code(pub String);
761impl TryFrom<String> for ExternalAccountIdentification1Code {
762 type Error = crate::common::validate::ConstraintError;
763 #[allow(clippy::unreadable_literal)]
764 fn try_from(value: String) -> Result<Self, Self::Error> {
765 {
766 let value: &str = &value;
767 {
768 let len = value.chars().count();
769 let violated = len < 1usize;
770 if violated {
771 return Err(crate::common::validate::ConstraintError {
772 kind: crate::common::validate::ConstraintKind::MinLength,
773 message: format!(
774 "{} (got {})",
775 "value is shorter than minimum length 1", len
776 ),
777 });
778 }
779 }
780 {
781 let len = value.chars().count();
782 let violated = len > 4usize;
783 if violated {
784 return Err(crate::common::validate::ConstraintError {
785 kind: crate::common::validate::ConstraintKind::MaxLength,
786 message: format!("{} (got {})", "value exceeds maximum length 4", len),
787 });
788 }
789 }
790 }
791 Ok(Self(value))
792 }
793}
794impl ExternalAccountIdentification1Code {
795 #[allow(clippy::unreadable_literal)]
797 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
798 Self::try_from(value.into())
799 }
800}
801impl From<ExternalAccountIdentification1Code> for String {
802 fn from(v: ExternalAccountIdentification1Code) -> Self {
803 v.0
804 }
805}
806#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
809#[serde(transparent)]
810pub struct ExternalCashAccountType1Code(pub String);
811impl TryFrom<String> for ExternalCashAccountType1Code {
812 type Error = crate::common::validate::ConstraintError;
813 #[allow(clippy::unreadable_literal)]
814 fn try_from(value: String) -> Result<Self, Self::Error> {
815 {
816 let value: &str = &value;
817 {
818 let len = value.chars().count();
819 let violated = len < 1usize;
820 if violated {
821 return Err(crate::common::validate::ConstraintError {
822 kind: crate::common::validate::ConstraintKind::MinLength,
823 message: format!(
824 "{} (got {})",
825 "value is shorter than minimum length 1", len
826 ),
827 });
828 }
829 }
830 {
831 let len = value.chars().count();
832 let violated = len > 4usize;
833 if violated {
834 return Err(crate::common::validate::ConstraintError {
835 kind: crate::common::validate::ConstraintKind::MaxLength,
836 message: format!("{} (got {})", "value exceeds maximum length 4", len),
837 });
838 }
839 }
840 }
841 Ok(Self(value))
842 }
843}
844impl ExternalCashAccountType1Code {
845 #[allow(clippy::unreadable_literal)]
847 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
848 Self::try_from(value.into())
849 }
850}
851impl From<ExternalCashAccountType1Code> for String {
852 fn from(v: ExternalCashAccountType1Code) -> Self {
853 v.0
854 }
855}
856#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
859#[serde(transparent)]
860pub struct ExternalCashClearingSystem1Code(pub String);
861impl TryFrom<String> for ExternalCashClearingSystem1Code {
862 type Error = crate::common::validate::ConstraintError;
863 #[allow(clippy::unreadable_literal)]
864 fn try_from(value: String) -> Result<Self, Self::Error> {
865 {
866 let value: &str = &value;
867 {
868 let len = value.chars().count();
869 let violated = len < 1usize;
870 if violated {
871 return Err(crate::common::validate::ConstraintError {
872 kind: crate::common::validate::ConstraintKind::MinLength,
873 message: format!(
874 "{} (got {})",
875 "value is shorter than minimum length 1", len
876 ),
877 });
878 }
879 }
880 {
881 let len = value.chars().count();
882 let violated = len > 3usize;
883 if violated {
884 return Err(crate::common::validate::ConstraintError {
885 kind: crate::common::validate::ConstraintKind::MaxLength,
886 message: format!("{} (got {})", "value exceeds maximum length 3", len),
887 });
888 }
889 }
890 }
891 Ok(Self(value))
892 }
893}
894impl ExternalCashClearingSystem1Code {
895 #[allow(clippy::unreadable_literal)]
897 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
898 Self::try_from(value.into())
899 }
900}
901impl From<ExternalCashClearingSystem1Code> for String {
902 fn from(v: ExternalCashClearingSystem1Code) -> Self {
903 v.0
904 }
905}
906#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
909#[serde(transparent)]
910pub struct ExternalCategoryPurpose1Code(pub String);
911impl TryFrom<String> for ExternalCategoryPurpose1Code {
912 type Error = crate::common::validate::ConstraintError;
913 #[allow(clippy::unreadable_literal)]
914 fn try_from(value: String) -> Result<Self, Self::Error> {
915 {
916 let value: &str = &value;
917 {
918 let len = value.chars().count();
919 let violated = len < 1usize;
920 if violated {
921 return Err(crate::common::validate::ConstraintError {
922 kind: crate::common::validate::ConstraintKind::MinLength,
923 message: format!(
924 "{} (got {})",
925 "value is shorter than minimum length 1", len
926 ),
927 });
928 }
929 }
930 {
931 let len = value.chars().count();
932 let violated = len > 4usize;
933 if violated {
934 return Err(crate::common::validate::ConstraintError {
935 kind: crate::common::validate::ConstraintKind::MaxLength,
936 message: format!("{} (got {})", "value exceeds maximum length 4", len),
937 });
938 }
939 }
940 }
941 Ok(Self(value))
942 }
943}
944impl ExternalCategoryPurpose1Code {
945 #[allow(clippy::unreadable_literal)]
947 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
948 Self::try_from(value.into())
949 }
950}
951impl From<ExternalCategoryPurpose1Code> for String {
952 fn from(v: ExternalCategoryPurpose1Code) -> Self {
953 v.0
954 }
955}
956#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
959#[serde(transparent)]
960pub struct ExternalChargeType1Code(pub String);
961impl TryFrom<String> for ExternalChargeType1Code {
962 type Error = crate::common::validate::ConstraintError;
963 #[allow(clippy::unreadable_literal)]
964 fn try_from(value: String) -> Result<Self, Self::Error> {
965 {
966 let value: &str = &value;
967 {
968 let len = value.chars().count();
969 let violated = len < 1usize;
970 if violated {
971 return Err(crate::common::validate::ConstraintError {
972 kind: crate::common::validate::ConstraintKind::MinLength,
973 message: format!(
974 "{} (got {})",
975 "value is shorter than minimum length 1", len
976 ),
977 });
978 }
979 }
980 {
981 let len = value.chars().count();
982 let violated = len > 4usize;
983 if violated {
984 return Err(crate::common::validate::ConstraintError {
985 kind: crate::common::validate::ConstraintKind::MaxLength,
986 message: format!("{} (got {})", "value exceeds maximum length 4", len),
987 });
988 }
989 }
990 }
991 Ok(Self(value))
992 }
993}
994impl ExternalChargeType1Code {
995 #[allow(clippy::unreadable_literal)]
997 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
998 Self::try_from(value.into())
999 }
1000}
1001impl From<ExternalChargeType1Code> for String {
1002 fn from(v: ExternalChargeType1Code) -> Self {
1003 v.0
1004 }
1005}
1006#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1009#[serde(transparent)]
1010pub struct ExternalClearingSystemIdentification1Code(pub String);
1011impl TryFrom<String> for ExternalClearingSystemIdentification1Code {
1012 type Error = crate::common::validate::ConstraintError;
1013 #[allow(clippy::unreadable_literal)]
1014 fn try_from(value: String) -> Result<Self, Self::Error> {
1015 {
1016 let value: &str = &value;
1017 {
1018 let len = value.chars().count();
1019 let violated = len < 1usize;
1020 if violated {
1021 return Err(crate::common::validate::ConstraintError {
1022 kind: crate::common::validate::ConstraintKind::MinLength,
1023 message: format!(
1024 "{} (got {})",
1025 "value is shorter than minimum length 1", len
1026 ),
1027 });
1028 }
1029 }
1030 {
1031 let len = value.chars().count();
1032 let violated = len > 5usize;
1033 if violated {
1034 return Err(crate::common::validate::ConstraintError {
1035 kind: crate::common::validate::ConstraintKind::MaxLength,
1036 message: format!("{} (got {})", "value exceeds maximum length 5", len),
1037 });
1038 }
1039 }
1040 }
1041 Ok(Self(value))
1042 }
1043}
1044impl ExternalClearingSystemIdentification1Code {
1045 #[allow(clippy::unreadable_literal)]
1047 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1048 Self::try_from(value.into())
1049 }
1050}
1051impl From<ExternalClearingSystemIdentification1Code> for String {
1052 fn from(v: ExternalClearingSystemIdentification1Code) -> Self {
1053 v.0
1054 }
1055}
1056#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1059#[serde(transparent)]
1060pub struct ExternalCreditorAgentInstruction1Code(pub String);
1061impl TryFrom<String> for ExternalCreditorAgentInstruction1Code {
1062 type Error = crate::common::validate::ConstraintError;
1063 #[allow(clippy::unreadable_literal)]
1064 fn try_from(value: String) -> Result<Self, Self::Error> {
1065 {
1066 let value: &str = &value;
1067 {
1068 let len = value.chars().count();
1069 let violated = len < 1usize;
1070 if violated {
1071 return Err(crate::common::validate::ConstraintError {
1072 kind: crate::common::validate::ConstraintKind::MinLength,
1073 message: format!(
1074 "{} (got {})",
1075 "value is shorter than minimum length 1", len
1076 ),
1077 });
1078 }
1079 }
1080 {
1081 let len = value.chars().count();
1082 let violated = len > 4usize;
1083 if violated {
1084 return Err(crate::common::validate::ConstraintError {
1085 kind: crate::common::validate::ConstraintKind::MaxLength,
1086 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1087 });
1088 }
1089 }
1090 }
1091 Ok(Self(value))
1092 }
1093}
1094impl ExternalCreditorAgentInstruction1Code {
1095 #[allow(clippy::unreadable_literal)]
1097 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1098 Self::try_from(value.into())
1099 }
1100}
1101impl From<ExternalCreditorAgentInstruction1Code> for String {
1102 fn from(v: ExternalCreditorAgentInstruction1Code) -> Self {
1103 v.0
1104 }
1105}
1106#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1109#[serde(transparent)]
1110pub struct ExternalCreditorReferenceType1Code(pub String);
1111impl TryFrom<String> for ExternalCreditorReferenceType1Code {
1112 type Error = crate::common::validate::ConstraintError;
1113 #[allow(clippy::unreadable_literal)]
1114 fn try_from(value: String) -> Result<Self, Self::Error> {
1115 {
1116 let value: &str = &value;
1117 {
1118 let len = value.chars().count();
1119 let violated = len < 1usize;
1120 if violated {
1121 return Err(crate::common::validate::ConstraintError {
1122 kind: crate::common::validate::ConstraintKind::MinLength,
1123 message: format!(
1124 "{} (got {})",
1125 "value is shorter than minimum length 1", len
1126 ),
1127 });
1128 }
1129 }
1130 {
1131 let len = value.chars().count();
1132 let violated = len > 4usize;
1133 if violated {
1134 return Err(crate::common::validate::ConstraintError {
1135 kind: crate::common::validate::ConstraintKind::MaxLength,
1136 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1137 });
1138 }
1139 }
1140 }
1141 Ok(Self(value))
1142 }
1143}
1144impl ExternalCreditorReferenceType1Code {
1145 #[allow(clippy::unreadable_literal)]
1147 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1148 Self::try_from(value.into())
1149 }
1150}
1151impl From<ExternalCreditorReferenceType1Code> for String {
1152 fn from(v: ExternalCreditorReferenceType1Code) -> Self {
1153 v.0
1154 }
1155}
1156#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1159#[serde(transparent)]
1160pub struct ExternalDateType1Code(pub String);
1161impl TryFrom<String> for ExternalDateType1Code {
1162 type Error = crate::common::validate::ConstraintError;
1163 #[allow(clippy::unreadable_literal)]
1164 fn try_from(value: String) -> Result<Self, Self::Error> {
1165 {
1166 let value: &str = &value;
1167 {
1168 let len = value.chars().count();
1169 let violated = len < 1usize;
1170 if violated {
1171 return Err(crate::common::validate::ConstraintError {
1172 kind: crate::common::validate::ConstraintKind::MinLength,
1173 message: format!(
1174 "{} (got {})",
1175 "value is shorter than minimum length 1", len
1176 ),
1177 });
1178 }
1179 }
1180 {
1181 let len = value.chars().count();
1182 let violated = len > 4usize;
1183 if violated {
1184 return Err(crate::common::validate::ConstraintError {
1185 kind: crate::common::validate::ConstraintKind::MaxLength,
1186 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1187 });
1188 }
1189 }
1190 }
1191 Ok(Self(value))
1192 }
1193}
1194impl ExternalDateType1Code {
1195 #[allow(clippy::unreadable_literal)]
1197 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1198 Self::try_from(value.into())
1199 }
1200}
1201impl From<ExternalDateType1Code> for String {
1202 fn from(v: ExternalDateType1Code) -> Self {
1203 v.0
1204 }
1205}
1206#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1209#[serde(transparent)]
1210pub struct ExternalDocumentAmountType1Code(pub String);
1211impl TryFrom<String> for ExternalDocumentAmountType1Code {
1212 type Error = crate::common::validate::ConstraintError;
1213 #[allow(clippy::unreadable_literal)]
1214 fn try_from(value: String) -> Result<Self, Self::Error> {
1215 {
1216 let value: &str = &value;
1217 {
1218 let len = value.chars().count();
1219 let violated = len < 1usize;
1220 if violated {
1221 return Err(crate::common::validate::ConstraintError {
1222 kind: crate::common::validate::ConstraintKind::MinLength,
1223 message: format!(
1224 "{} (got {})",
1225 "value is shorter than minimum length 1", len
1226 ),
1227 });
1228 }
1229 }
1230 {
1231 let len = value.chars().count();
1232 let violated = len > 4usize;
1233 if violated {
1234 return Err(crate::common::validate::ConstraintError {
1235 kind: crate::common::validate::ConstraintKind::MaxLength,
1236 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1237 });
1238 }
1239 }
1240 }
1241 Ok(Self(value))
1242 }
1243}
1244impl ExternalDocumentAmountType1Code {
1245 #[allow(clippy::unreadable_literal)]
1247 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1248 Self::try_from(value.into())
1249 }
1250}
1251impl From<ExternalDocumentAmountType1Code> for String {
1252 fn from(v: ExternalDocumentAmountType1Code) -> Self {
1253 v.0
1254 }
1255}
1256#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1259#[serde(transparent)]
1260pub struct ExternalDocumentLineType1Code(pub String);
1261impl TryFrom<String> for ExternalDocumentLineType1Code {
1262 type Error = crate::common::validate::ConstraintError;
1263 #[allow(clippy::unreadable_literal)]
1264 fn try_from(value: String) -> Result<Self, Self::Error> {
1265 {
1266 let value: &str = &value;
1267 {
1268 let len = value.chars().count();
1269 let violated = len < 1usize;
1270 if violated {
1271 return Err(crate::common::validate::ConstraintError {
1272 kind: crate::common::validate::ConstraintKind::MinLength,
1273 message: format!(
1274 "{} (got {})",
1275 "value is shorter than minimum length 1", len
1276 ),
1277 });
1278 }
1279 }
1280 {
1281 let len = value.chars().count();
1282 let violated = len > 4usize;
1283 if violated {
1284 return Err(crate::common::validate::ConstraintError {
1285 kind: crate::common::validate::ConstraintKind::MaxLength,
1286 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1287 });
1288 }
1289 }
1290 }
1291 Ok(Self(value))
1292 }
1293}
1294impl ExternalDocumentLineType1Code {
1295 #[allow(clippy::unreadable_literal)]
1297 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1298 Self::try_from(value.into())
1299 }
1300}
1301impl From<ExternalDocumentLineType1Code> for String {
1302 fn from(v: ExternalDocumentLineType1Code) -> Self {
1303 v.0
1304 }
1305}
1306#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1309#[serde(transparent)]
1310pub struct ExternalDocumentType1Code(pub String);
1311impl TryFrom<String> for ExternalDocumentType1Code {
1312 type Error = crate::common::validate::ConstraintError;
1313 #[allow(clippy::unreadable_literal)]
1314 fn try_from(value: String) -> Result<Self, Self::Error> {
1315 {
1316 let value: &str = &value;
1317 {
1318 let len = value.chars().count();
1319 let violated = len < 1usize;
1320 if violated {
1321 return Err(crate::common::validate::ConstraintError {
1322 kind: crate::common::validate::ConstraintKind::MinLength,
1323 message: format!(
1324 "{} (got {})",
1325 "value is shorter than minimum length 1", len
1326 ),
1327 });
1328 }
1329 }
1330 {
1331 let len = value.chars().count();
1332 let violated = len > 4usize;
1333 if violated {
1334 return Err(crate::common::validate::ConstraintError {
1335 kind: crate::common::validate::ConstraintKind::MaxLength,
1336 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1337 });
1338 }
1339 }
1340 }
1341 Ok(Self(value))
1342 }
1343}
1344impl ExternalDocumentType1Code {
1345 #[allow(clippy::unreadable_literal)]
1347 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1348 Self::try_from(value.into())
1349 }
1350}
1351impl From<ExternalDocumentType1Code> for String {
1352 fn from(v: ExternalDocumentType1Code) -> Self {
1353 v.0
1354 }
1355}
1356#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1359#[serde(transparent)]
1360pub struct ExternalFinancialInstitutionIdentification1Code(pub String);
1361impl TryFrom<String> for ExternalFinancialInstitutionIdentification1Code {
1362 type Error = crate::common::validate::ConstraintError;
1363 #[allow(clippy::unreadable_literal)]
1364 fn try_from(value: String) -> Result<Self, Self::Error> {
1365 {
1366 let value: &str = &value;
1367 {
1368 let len = value.chars().count();
1369 let violated = len < 1usize;
1370 if violated {
1371 return Err(crate::common::validate::ConstraintError {
1372 kind: crate::common::validate::ConstraintKind::MinLength,
1373 message: format!(
1374 "{} (got {})",
1375 "value is shorter than minimum length 1", len
1376 ),
1377 });
1378 }
1379 }
1380 {
1381 let len = value.chars().count();
1382 let violated = len > 4usize;
1383 if violated {
1384 return Err(crate::common::validate::ConstraintError {
1385 kind: crate::common::validate::ConstraintKind::MaxLength,
1386 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1387 });
1388 }
1389 }
1390 }
1391 Ok(Self(value))
1392 }
1393}
1394impl ExternalFinancialInstitutionIdentification1Code {
1395 #[allow(clippy::unreadable_literal)]
1397 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1398 Self::try_from(value.into())
1399 }
1400}
1401impl From<ExternalFinancialInstitutionIdentification1Code> for String {
1402 fn from(v: ExternalFinancialInstitutionIdentification1Code) -> Self {
1403 v.0
1404 }
1405}
1406#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1409#[serde(transparent)]
1410pub struct ExternalGarnishmentType1Code(pub String);
1411impl TryFrom<String> for ExternalGarnishmentType1Code {
1412 type Error = crate::common::validate::ConstraintError;
1413 #[allow(clippy::unreadable_literal)]
1414 fn try_from(value: String) -> Result<Self, Self::Error> {
1415 {
1416 let value: &str = &value;
1417 {
1418 let len = value.chars().count();
1419 let violated = len < 1usize;
1420 if violated {
1421 return Err(crate::common::validate::ConstraintError {
1422 kind: crate::common::validate::ConstraintKind::MinLength,
1423 message: format!(
1424 "{} (got {})",
1425 "value is shorter than minimum length 1", len
1426 ),
1427 });
1428 }
1429 }
1430 {
1431 let len = value.chars().count();
1432 let violated = len > 4usize;
1433 if violated {
1434 return Err(crate::common::validate::ConstraintError {
1435 kind: crate::common::validate::ConstraintKind::MaxLength,
1436 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1437 });
1438 }
1439 }
1440 }
1441 Ok(Self(value))
1442 }
1443}
1444impl ExternalGarnishmentType1Code {
1445 #[allow(clippy::unreadable_literal)]
1447 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1448 Self::try_from(value.into())
1449 }
1450}
1451impl From<ExternalGarnishmentType1Code> for String {
1452 fn from(v: ExternalGarnishmentType1Code) -> Self {
1453 v.0
1454 }
1455}
1456#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1459#[serde(transparent)]
1460pub struct ExternalLocalInstrument1Code(pub String);
1461impl TryFrom<String> for ExternalLocalInstrument1Code {
1462 type Error = crate::common::validate::ConstraintError;
1463 #[allow(clippy::unreadable_literal)]
1464 fn try_from(value: String) -> Result<Self, Self::Error> {
1465 {
1466 let value: &str = &value;
1467 {
1468 let len = value.chars().count();
1469 let violated = len < 1usize;
1470 if violated {
1471 return Err(crate::common::validate::ConstraintError {
1472 kind: crate::common::validate::ConstraintKind::MinLength,
1473 message: format!(
1474 "{} (got {})",
1475 "value is shorter than minimum length 1", len
1476 ),
1477 });
1478 }
1479 }
1480 {
1481 let len = value.chars().count();
1482 let violated = len > 35usize;
1483 if violated {
1484 return Err(crate::common::validate::ConstraintError {
1485 kind: crate::common::validate::ConstraintKind::MaxLength,
1486 message: format!("{} (got {})", "value exceeds maximum length 35", len),
1487 });
1488 }
1489 }
1490 }
1491 Ok(Self(value))
1492 }
1493}
1494impl ExternalLocalInstrument1Code {
1495 #[allow(clippy::unreadable_literal)]
1497 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1498 Self::try_from(value.into())
1499 }
1500}
1501impl From<ExternalLocalInstrument1Code> for String {
1502 fn from(v: ExternalLocalInstrument1Code) -> Self {
1503 v.0
1504 }
1505}
1506#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1509#[serde(transparent)]
1510pub struct ExternalMandateSetupReason1Code(pub String);
1511impl TryFrom<String> for ExternalMandateSetupReason1Code {
1512 type Error = crate::common::validate::ConstraintError;
1513 #[allow(clippy::unreadable_literal)]
1514 fn try_from(value: String) -> Result<Self, Self::Error> {
1515 {
1516 let value: &str = &value;
1517 {
1518 let len = value.chars().count();
1519 let violated = len < 1usize;
1520 if violated {
1521 return Err(crate::common::validate::ConstraintError {
1522 kind: crate::common::validate::ConstraintKind::MinLength,
1523 message: format!(
1524 "{} (got {})",
1525 "value is shorter than minimum length 1", len
1526 ),
1527 });
1528 }
1529 }
1530 {
1531 let len = value.chars().count();
1532 let violated = len > 4usize;
1533 if violated {
1534 return Err(crate::common::validate::ConstraintError {
1535 kind: crate::common::validate::ConstraintKind::MaxLength,
1536 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1537 });
1538 }
1539 }
1540 }
1541 Ok(Self(value))
1542 }
1543}
1544impl ExternalMandateSetupReason1Code {
1545 #[allow(clippy::unreadable_literal)]
1547 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1548 Self::try_from(value.into())
1549 }
1550}
1551impl From<ExternalMandateSetupReason1Code> for String {
1552 fn from(v: ExternalMandateSetupReason1Code) -> Self {
1553 v.0
1554 }
1555}
1556#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1559#[serde(transparent)]
1560pub struct ExternalOrganisationIdentification1Code(pub String);
1561impl TryFrom<String> for ExternalOrganisationIdentification1Code {
1562 type Error = crate::common::validate::ConstraintError;
1563 #[allow(clippy::unreadable_literal)]
1564 fn try_from(value: String) -> Result<Self, Self::Error> {
1565 {
1566 let value: &str = &value;
1567 {
1568 let len = value.chars().count();
1569 let violated = len < 1usize;
1570 if violated {
1571 return Err(crate::common::validate::ConstraintError {
1572 kind: crate::common::validate::ConstraintKind::MinLength,
1573 message: format!(
1574 "{} (got {})",
1575 "value is shorter than minimum length 1", len
1576 ),
1577 });
1578 }
1579 }
1580 {
1581 let len = value.chars().count();
1582 let violated = len > 4usize;
1583 if violated {
1584 return Err(crate::common::validate::ConstraintError {
1585 kind: crate::common::validate::ConstraintKind::MaxLength,
1586 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1587 });
1588 }
1589 }
1590 }
1591 Ok(Self(value))
1592 }
1593}
1594impl ExternalOrganisationIdentification1Code {
1595 #[allow(clippy::unreadable_literal)]
1597 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1598 Self::try_from(value.into())
1599 }
1600}
1601impl From<ExternalOrganisationIdentification1Code> for String {
1602 fn from(v: ExternalOrganisationIdentification1Code) -> Self {
1603 v.0
1604 }
1605}
1606#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1609#[serde(transparent)]
1610pub struct ExternalPersonIdentification1Code(pub String);
1611impl TryFrom<String> for ExternalPersonIdentification1Code {
1612 type Error = crate::common::validate::ConstraintError;
1613 #[allow(clippy::unreadable_literal)]
1614 fn try_from(value: String) -> Result<Self, Self::Error> {
1615 {
1616 let value: &str = &value;
1617 {
1618 let len = value.chars().count();
1619 let violated = len < 1usize;
1620 if violated {
1621 return Err(crate::common::validate::ConstraintError {
1622 kind: crate::common::validate::ConstraintKind::MinLength,
1623 message: format!(
1624 "{} (got {})",
1625 "value is shorter than minimum length 1", len
1626 ),
1627 });
1628 }
1629 }
1630 {
1631 let len = value.chars().count();
1632 let violated = len > 4usize;
1633 if violated {
1634 return Err(crate::common::validate::ConstraintError {
1635 kind: crate::common::validate::ConstraintKind::MaxLength,
1636 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1637 });
1638 }
1639 }
1640 }
1641 Ok(Self(value))
1642 }
1643}
1644impl ExternalPersonIdentification1Code {
1645 #[allow(clippy::unreadable_literal)]
1647 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1648 Self::try_from(value.into())
1649 }
1650}
1651impl From<ExternalPersonIdentification1Code> for String {
1652 fn from(v: ExternalPersonIdentification1Code) -> Self {
1653 v.0
1654 }
1655}
1656#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1659#[serde(transparent)]
1660pub struct ExternalProxyAccountType1Code(pub String);
1661impl TryFrom<String> for ExternalProxyAccountType1Code {
1662 type Error = crate::common::validate::ConstraintError;
1663 #[allow(clippy::unreadable_literal)]
1664 fn try_from(value: String) -> Result<Self, Self::Error> {
1665 {
1666 let value: &str = &value;
1667 {
1668 let len = value.chars().count();
1669 let violated = len < 1usize;
1670 if violated {
1671 return Err(crate::common::validate::ConstraintError {
1672 kind: crate::common::validate::ConstraintKind::MinLength,
1673 message: format!(
1674 "{} (got {})",
1675 "value is shorter than minimum length 1", len
1676 ),
1677 });
1678 }
1679 }
1680 {
1681 let len = value.chars().count();
1682 let violated = len > 4usize;
1683 if violated {
1684 return Err(crate::common::validate::ConstraintError {
1685 kind: crate::common::validate::ConstraintKind::MaxLength,
1686 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1687 });
1688 }
1689 }
1690 }
1691 Ok(Self(value))
1692 }
1693}
1694impl ExternalProxyAccountType1Code {
1695 #[allow(clippy::unreadable_literal)]
1697 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1698 Self::try_from(value.into())
1699 }
1700}
1701impl From<ExternalProxyAccountType1Code> for String {
1702 fn from(v: ExternalProxyAccountType1Code) -> Self {
1703 v.0
1704 }
1705}
1706#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1709#[serde(transparent)]
1710pub struct ExternalPurpose1Code(pub String);
1711impl TryFrom<String> for ExternalPurpose1Code {
1712 type Error = crate::common::validate::ConstraintError;
1713 #[allow(clippy::unreadable_literal)]
1714 fn try_from(value: String) -> Result<Self, Self::Error> {
1715 {
1716 let value: &str = &value;
1717 {
1718 let len = value.chars().count();
1719 let violated = len < 1usize;
1720 if violated {
1721 return Err(crate::common::validate::ConstraintError {
1722 kind: crate::common::validate::ConstraintKind::MinLength,
1723 message: format!(
1724 "{} (got {})",
1725 "value is shorter than minimum length 1", len
1726 ),
1727 });
1728 }
1729 }
1730 {
1731 let len = value.chars().count();
1732 let violated = len > 4usize;
1733 if violated {
1734 return Err(crate::common::validate::ConstraintError {
1735 kind: crate::common::validate::ConstraintKind::MaxLength,
1736 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1737 });
1738 }
1739 }
1740 }
1741 Ok(Self(value))
1742 }
1743}
1744impl ExternalPurpose1Code {
1745 #[allow(clippy::unreadable_literal)]
1747 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1748 Self::try_from(value.into())
1749 }
1750}
1751impl From<ExternalPurpose1Code> for String {
1752 fn from(v: ExternalPurpose1Code) -> Self {
1753 v.0
1754 }
1755}
1756#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1759#[serde(transparent)]
1760pub struct ExternalServiceLevel1Code(pub String);
1761impl TryFrom<String> for ExternalServiceLevel1Code {
1762 type Error = crate::common::validate::ConstraintError;
1763 #[allow(clippy::unreadable_literal)]
1764 fn try_from(value: String) -> Result<Self, Self::Error> {
1765 {
1766 let value: &str = &value;
1767 {
1768 let len = value.chars().count();
1769 let violated = len < 1usize;
1770 if violated {
1771 return Err(crate::common::validate::ConstraintError {
1772 kind: crate::common::validate::ConstraintKind::MinLength,
1773 message: format!(
1774 "{} (got {})",
1775 "value is shorter than minimum length 1", len
1776 ),
1777 });
1778 }
1779 }
1780 {
1781 let len = value.chars().count();
1782 let violated = len > 4usize;
1783 if violated {
1784 return Err(crate::common::validate::ConstraintError {
1785 kind: crate::common::validate::ConstraintKind::MaxLength,
1786 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1787 });
1788 }
1789 }
1790 }
1791 Ok(Self(value))
1792 }
1793}
1794impl ExternalServiceLevel1Code {
1795 #[allow(clippy::unreadable_literal)]
1797 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1798 Self::try_from(value.into())
1799 }
1800}
1801impl From<ExternalServiceLevel1Code> for String {
1802 fn from(v: ExternalServiceLevel1Code) -> Self {
1803 v.0
1804 }
1805}
1806#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1807pub enum Frequency6Code {
1808 #[serde(rename = "YEAR")]
1809 Year,
1810 #[serde(rename = "MNTH")]
1811 Mnth,
1812 #[serde(rename = "QURT")]
1813 Qurt,
1814 #[serde(rename = "MIAN")]
1815 Mian,
1816 #[serde(rename = "WEEK")]
1817 Week,
1818 #[serde(rename = "DAIL")]
1819 Dail,
1820 #[serde(rename = "ADHO")]
1821 Adho,
1822 #[serde(rename = "INDA")]
1823 Inda,
1824 #[serde(rename = "FRTN")]
1825 Frtn,
1826}
1827#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1829#[serde(transparent)]
1830pub struct HexBinaryText(pub String);
1831impl TryFrom<String> for HexBinaryText {
1832 type Error = crate::common::validate::ConstraintError;
1833 #[allow(clippy::unreadable_literal)]
1834 fn try_from(value: String) -> Result<Self, Self::Error> {
1835 {
1836 let value: &str = &value;
1837 {
1838 let violated = {
1839 let bytes = value.as_bytes();
1840 let len = bytes.len();
1841 let result: bool = (|| -> bool {
1842 let mut pos: usize = 0;
1843 if len < 1usize {
1844 return true;
1845 }
1846 {
1847 let start = pos;
1848 while pos < len {
1849 let b = bytes[pos];
1850 if !(48u8..=57u8).contains(&b)
1851 && !(97u8..=102u8).contains(&b)
1852 && !(65u8..=70u8).contains(&b)
1853 {
1854 break;
1855 }
1856 pos += 1;
1857 }
1858 let matched = pos - start;
1859 if matched < 1usize {
1860 return true;
1861 }
1862 }
1863 if pos != len {
1864 return true;
1865 }
1866 false
1867 })();
1868 result
1869 };
1870 if violated {
1871 return Err(crate::common::validate::ConstraintError {
1872 kind: crate::common::validate::ConstraintKind::Pattern,
1873 message: "value does not match pattern [0-9a-fA-F]+".to_string(),
1874 });
1875 }
1876 }
1877 }
1878 Ok(Self(value))
1879 }
1880}
1881impl HexBinaryText {
1882 #[allow(clippy::unreadable_literal)]
1884 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1885 Self::try_from(value.into())
1886 }
1887}
1888impl From<HexBinaryText> for String {
1889 fn from(v: HexBinaryText) -> Self {
1890 v.0
1891 }
1892}
1893#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1895#[serde(transparent)]
1896pub struct IBAN2007Identifier(pub String);
1897impl TryFrom<String> for IBAN2007Identifier {
1898 type Error = crate::common::validate::ConstraintError;
1899 #[allow(clippy::unreadable_literal)]
1900 fn try_from(value: String) -> Result<Self, Self::Error> {
1901 {
1902 let value: &str = &value;
1903 {
1904 let violated = {
1905 let bytes = value.as_bytes();
1906 let len = bytes.len();
1907 let result: bool = (|| -> bool {
1908 let mut pos: usize = 0;
1909 if !(5usize..=34usize).contains(&len) {
1910 return true;
1911 }
1912 {
1913 let end = pos + 2usize;
1914 if end > len {
1915 return true;
1916 }
1917 for &b in &bytes[pos..end] {
1918 if !(65u8..=90u8).contains(&b) {
1919 return true;
1920 }
1921 }
1922 pos = end;
1923 }
1924 {
1925 let end = pos + 2usize;
1926 if end > len {
1927 return true;
1928 }
1929 for &b in &bytes[pos..end] {
1930 if !(48u8..=57u8).contains(&b) {
1931 return true;
1932 }
1933 }
1934 pos = end;
1935 }
1936 {
1937 let start = pos;
1938 let limit = if pos + 30usize < len {
1939 pos + 30usize
1940 } else {
1941 len
1942 };
1943 while pos < limit {
1944 let b = bytes[pos];
1945 if !(97u8..=122u8).contains(&b)
1946 && !(65u8..=90u8).contains(&b)
1947 && !(48u8..=57u8).contains(&b)
1948 {
1949 break;
1950 }
1951 pos += 1;
1952 }
1953 let matched = pos - start;
1954 if matched < 1usize {
1955 return true;
1956 }
1957 }
1958 if pos != len {
1959 return true;
1960 }
1961 false
1962 })();
1963 result
1964 };
1965 if violated {
1966 return Err(crate::common::validate::ConstraintError {
1967 kind: crate::common::validate::ConstraintKind::Pattern,
1968 message:
1969 "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
1970 .to_string(),
1971 });
1972 }
1973 }
1974 }
1975 Ok(Self(value))
1976 }
1977}
1978impl IBAN2007Identifier {
1979 #[allow(clippy::unreadable_literal)]
1981 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1982 Self::try_from(value.into())
1983 }
1984}
1985impl From<IBAN2007Identifier> for String {
1986 fn from(v: IBAN2007Identifier) -> Self {
1987 v.0
1988 }
1989}
1990#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1991#[serde(transparent)]
1992pub struct ISODate(pub String);
1993#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1994#[serde(transparent)]
1995pub struct ISODateTime(pub String);
1996#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1997#[serde(transparent)]
1998pub struct ISOTime(pub String);
1999#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2000#[serde(transparent)]
2001pub struct ISOYear(pub String);
2002#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2003pub enum Instruction4Code {
2004 #[serde(rename = "PHOA")]
2005 Phoa,
2006 #[serde(rename = "TELA")]
2007 Tela,
2008}
2009#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2011#[serde(transparent)]
2012pub struct LEIIdentifier(pub String);
2013impl TryFrom<String> for LEIIdentifier {
2014 type Error = crate::common::validate::ConstraintError;
2015 #[allow(clippy::unreadable_literal)]
2016 fn try_from(value: String) -> Result<Self, Self::Error> {
2017 {
2018 let value: &str = &value;
2019 {
2020 let violated = {
2021 let bytes = value.as_bytes();
2022 bytes.len() != 20usize
2023 || ({
2024 let b = bytes[0usize];
2025 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2026 })
2027 || ({
2028 let b = bytes[1usize];
2029 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2030 })
2031 || ({
2032 let b = bytes[2usize];
2033 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2034 })
2035 || ({
2036 let b = bytes[3usize];
2037 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2038 })
2039 || ({
2040 let b = bytes[4usize];
2041 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2042 })
2043 || ({
2044 let b = bytes[5usize];
2045 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2046 })
2047 || ({
2048 let b = bytes[6usize];
2049 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2050 })
2051 || ({
2052 let b = bytes[7usize];
2053 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2054 })
2055 || ({
2056 let b = bytes[8usize];
2057 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2058 })
2059 || ({
2060 let b = bytes[9usize];
2061 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2062 })
2063 || ({
2064 let b = bytes[10usize];
2065 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2066 })
2067 || ({
2068 let b = bytes[11usize];
2069 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2070 })
2071 || ({
2072 let b = bytes[12usize];
2073 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2074 })
2075 || ({
2076 let b = bytes[13usize];
2077 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2078 })
2079 || ({
2080 let b = bytes[14usize];
2081 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2082 })
2083 || ({
2084 let b = bytes[15usize];
2085 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2086 })
2087 || ({
2088 let b = bytes[16usize];
2089 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2090 })
2091 || ({
2092 let b = bytes[17usize];
2093 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
2094 })
2095 || ({
2096 let b = bytes[18usize];
2097 !(48u8..=57u8).contains(&b)
2098 })
2099 || ({
2100 let b = bytes[19usize];
2101 !(48u8..=57u8).contains(&b)
2102 })
2103 };
2104 if violated {
2105 return Err(crate::common::validate::ConstraintError {
2106 kind: crate::common::validate::ConstraintKind::Pattern,
2107 message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}"
2108 .to_string(),
2109 });
2110 }
2111 }
2112 }
2113 Ok(Self(value))
2114 }
2115}
2116impl LEIIdentifier {
2117 #[allow(clippy::unreadable_literal)]
2119 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2120 Self::try_from(value.into())
2121 }
2122}
2123impl From<LEIIdentifier> for String {
2124 fn from(v: LEIIdentifier) -> Self {
2125 v.0
2126 }
2127}
2128#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2129pub enum MandateClassification1Code {
2130 #[serde(rename = "FIXE")]
2131 Fixe,
2132 #[serde(rename = "USGB")]
2133 Usgb,
2134 #[serde(rename = "VARI")]
2135 Vari,
2136}
2137#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2140#[serde(transparent)]
2141pub struct Max10KBinary(pub String);
2142impl TryFrom<String> for Max10KBinary {
2143 type Error = crate::common::validate::ConstraintError;
2144 #[allow(clippy::unreadable_literal)]
2145 fn try_from(value: String) -> Result<Self, Self::Error> {
2146 {
2147 let value: &str = &value;
2148 {
2149 let len = value.chars().count();
2150 let violated = len < 1usize;
2151 if violated {
2152 return Err(crate::common::validate::ConstraintError {
2153 kind: crate::common::validate::ConstraintKind::MinLength,
2154 message: format!(
2155 "{} (got {})",
2156 "value is shorter than minimum length 1", len
2157 ),
2158 });
2159 }
2160 }
2161 {
2162 let len = value.chars().count();
2163 let violated = len > 10240usize;
2164 if violated {
2165 return Err(crate::common::validate::ConstraintError {
2166 kind: crate::common::validate::ConstraintKind::MaxLength,
2167 message: format!("{} (got {})", "value exceeds maximum length 10240", len),
2168 });
2169 }
2170 }
2171 }
2172 Ok(Self(value))
2173 }
2174}
2175impl Max10KBinary {
2176 #[allow(clippy::unreadable_literal)]
2178 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2179 Self::try_from(value.into())
2180 }
2181}
2182impl From<Max10KBinary> for String {
2183 fn from(v: Max10KBinary) -> Self {
2184 v.0
2185 }
2186}
2187#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2190#[serde(transparent)]
2191pub struct Max10Text(pub String);
2192impl TryFrom<String> for Max10Text {
2193 type Error = crate::common::validate::ConstraintError;
2194 #[allow(clippy::unreadable_literal)]
2195 fn try_from(value: String) -> Result<Self, Self::Error> {
2196 {
2197 let value: &str = &value;
2198 {
2199 let len = value.chars().count();
2200 let violated = len < 1usize;
2201 if violated {
2202 return Err(crate::common::validate::ConstraintError {
2203 kind: crate::common::validate::ConstraintKind::MinLength,
2204 message: format!(
2205 "{} (got {})",
2206 "value is shorter than minimum length 1", len
2207 ),
2208 });
2209 }
2210 }
2211 {
2212 let len = value.chars().count();
2213 let violated = len > 10usize;
2214 if violated {
2215 return Err(crate::common::validate::ConstraintError {
2216 kind: crate::common::validate::ConstraintKind::MaxLength,
2217 message: format!("{} (got {})", "value exceeds maximum length 10", len),
2218 });
2219 }
2220 }
2221 }
2222 Ok(Self(value))
2223 }
2224}
2225impl Max10Text {
2226 #[allow(clippy::unreadable_literal)]
2228 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2229 Self::try_from(value.into())
2230 }
2231}
2232impl From<Max10Text> for String {
2233 fn from(v: Max10Text) -> Self {
2234 v.0
2235 }
2236}
2237#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2240#[serde(transparent)]
2241pub struct Max128Text(pub String);
2242impl TryFrom<String> for Max128Text {
2243 type Error = crate::common::validate::ConstraintError;
2244 #[allow(clippy::unreadable_literal)]
2245 fn try_from(value: String) -> Result<Self, Self::Error> {
2246 {
2247 let value: &str = &value;
2248 {
2249 let len = value.chars().count();
2250 let violated = len < 1usize;
2251 if violated {
2252 return Err(crate::common::validate::ConstraintError {
2253 kind: crate::common::validate::ConstraintKind::MinLength,
2254 message: format!(
2255 "{} (got {})",
2256 "value is shorter than minimum length 1", len
2257 ),
2258 });
2259 }
2260 }
2261 {
2262 let len = value.chars().count();
2263 let violated = len > 128usize;
2264 if violated {
2265 return Err(crate::common::validate::ConstraintError {
2266 kind: crate::common::validate::ConstraintKind::MaxLength,
2267 message: format!("{} (got {})", "value exceeds maximum length 128", len),
2268 });
2269 }
2270 }
2271 }
2272 Ok(Self(value))
2273 }
2274}
2275impl Max128Text {
2276 #[allow(clippy::unreadable_literal)]
2278 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2279 Self::try_from(value.into())
2280 }
2281}
2282impl From<Max128Text> for String {
2283 fn from(v: Max128Text) -> Self {
2284 v.0
2285 }
2286}
2287#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2290#[serde(transparent)]
2291pub struct Max140Text(pub String);
2292impl TryFrom<String> for Max140Text {
2293 type Error = crate::common::validate::ConstraintError;
2294 #[allow(clippy::unreadable_literal)]
2295 fn try_from(value: String) -> Result<Self, Self::Error> {
2296 {
2297 let value: &str = &value;
2298 {
2299 let len = value.chars().count();
2300 let violated = len < 1usize;
2301 if violated {
2302 return Err(crate::common::validate::ConstraintError {
2303 kind: crate::common::validate::ConstraintKind::MinLength,
2304 message: format!(
2305 "{} (got {})",
2306 "value is shorter than minimum length 1", len
2307 ),
2308 });
2309 }
2310 }
2311 {
2312 let len = value.chars().count();
2313 let violated = len > 140usize;
2314 if violated {
2315 return Err(crate::common::validate::ConstraintError {
2316 kind: crate::common::validate::ConstraintKind::MaxLength,
2317 message: format!("{} (got {})", "value exceeds maximum length 140", len),
2318 });
2319 }
2320 }
2321 }
2322 Ok(Self(value))
2323 }
2324}
2325impl Max140Text {
2326 #[allow(clippy::unreadable_literal)]
2328 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2329 Self::try_from(value.into())
2330 }
2331}
2332impl From<Max140Text> for String {
2333 fn from(v: Max140Text) -> Self {
2334 v.0
2335 }
2336}
2337#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2339#[serde(transparent)]
2340pub struct Max15NumericText(pub String);
2341impl TryFrom<String> for Max15NumericText {
2342 type Error = crate::common::validate::ConstraintError;
2343 #[allow(clippy::unreadable_literal)]
2344 fn try_from(value: String) -> Result<Self, Self::Error> {
2345 {
2346 let value: &str = &value;
2347 {
2348 let violated = {
2349 let bytes = value.as_bytes();
2350 let len = bytes.len();
2351 let result: bool = (|| -> bool {
2352 let mut pos: usize = 0;
2353 if !(1usize..=15usize).contains(&len) {
2354 return true;
2355 }
2356 {
2357 let start = pos;
2358 let limit = if pos + 15usize < len {
2359 pos + 15usize
2360 } else {
2361 len
2362 };
2363 while pos < limit {
2364 let b = bytes[pos];
2365 if !(48u8..=57u8).contains(&b) {
2366 break;
2367 }
2368 pos += 1;
2369 }
2370 let matched = pos - start;
2371 if matched < 1usize {
2372 return true;
2373 }
2374 }
2375 if pos != len {
2376 return true;
2377 }
2378 false
2379 })();
2380 result
2381 };
2382 if violated {
2383 return Err(crate::common::validate::ConstraintError {
2384 kind: crate::common::validate::ConstraintKind::Pattern,
2385 message: "value does not match pattern [0-9]{1,15}".to_string(),
2386 });
2387 }
2388 }
2389 }
2390 Ok(Self(value))
2391 }
2392}
2393impl Max15NumericText {
2394 #[allow(clippy::unreadable_literal)]
2396 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2397 Self::try_from(value.into())
2398 }
2399}
2400impl From<Max15NumericText> for String {
2401 fn from(v: Max15NumericText) -> Self {
2402 v.0
2403 }
2404}
2405#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2408#[serde(transparent)]
2409pub struct Max16Text(pub String);
2410impl TryFrom<String> for Max16Text {
2411 type Error = crate::common::validate::ConstraintError;
2412 #[allow(clippy::unreadable_literal)]
2413 fn try_from(value: String) -> Result<Self, Self::Error> {
2414 {
2415 let value: &str = &value;
2416 {
2417 let len = value.chars().count();
2418 let violated = len < 1usize;
2419 if violated {
2420 return Err(crate::common::validate::ConstraintError {
2421 kind: crate::common::validate::ConstraintKind::MinLength,
2422 message: format!(
2423 "{} (got {})",
2424 "value is shorter than minimum length 1", len
2425 ),
2426 });
2427 }
2428 }
2429 {
2430 let len = value.chars().count();
2431 let violated = len > 16usize;
2432 if violated {
2433 return Err(crate::common::validate::ConstraintError {
2434 kind: crate::common::validate::ConstraintKind::MaxLength,
2435 message: format!("{} (got {})", "value exceeds maximum length 16", len),
2436 });
2437 }
2438 }
2439 }
2440 Ok(Self(value))
2441 }
2442}
2443impl Max16Text {
2444 #[allow(clippy::unreadable_literal)]
2446 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2447 Self::try_from(value.into())
2448 }
2449}
2450impl From<Max16Text> for String {
2451 fn from(v: Max16Text) -> Self {
2452 v.0
2453 }
2454}
2455#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2458#[serde(transparent)]
2459pub struct Max2048Text(pub String);
2460impl TryFrom<String> for Max2048Text {
2461 type Error = crate::common::validate::ConstraintError;
2462 #[allow(clippy::unreadable_literal)]
2463 fn try_from(value: String) -> Result<Self, Self::Error> {
2464 {
2465 let value: &str = &value;
2466 {
2467 let len = value.chars().count();
2468 let violated = len < 1usize;
2469 if violated {
2470 return Err(crate::common::validate::ConstraintError {
2471 kind: crate::common::validate::ConstraintKind::MinLength,
2472 message: format!(
2473 "{} (got {})",
2474 "value is shorter than minimum length 1", len
2475 ),
2476 });
2477 }
2478 }
2479 {
2480 let len = value.chars().count();
2481 let violated = len > 2048usize;
2482 if violated {
2483 return Err(crate::common::validate::ConstraintError {
2484 kind: crate::common::validate::ConstraintKind::MaxLength,
2485 message: format!("{} (got {})", "value exceeds maximum length 2048", len),
2486 });
2487 }
2488 }
2489 }
2490 Ok(Self(value))
2491 }
2492}
2493impl Max2048Text {
2494 #[allow(clippy::unreadable_literal)]
2496 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2497 Self::try_from(value.into())
2498 }
2499}
2500impl From<Max2048Text> for String {
2501 fn from(v: Max2048Text) -> Self {
2502 v.0
2503 }
2504}
2505#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2508#[serde(transparent)]
2509pub struct Max256Text(pub String);
2510impl TryFrom<String> for Max256Text {
2511 type Error = crate::common::validate::ConstraintError;
2512 #[allow(clippy::unreadable_literal)]
2513 fn try_from(value: String) -> Result<Self, Self::Error> {
2514 {
2515 let value: &str = &value;
2516 {
2517 let len = value.chars().count();
2518 let violated = len < 1usize;
2519 if violated {
2520 return Err(crate::common::validate::ConstraintError {
2521 kind: crate::common::validate::ConstraintKind::MinLength,
2522 message: format!(
2523 "{} (got {})",
2524 "value is shorter than minimum length 1", len
2525 ),
2526 });
2527 }
2528 }
2529 {
2530 let len = value.chars().count();
2531 let violated = len > 256usize;
2532 if violated {
2533 return Err(crate::common::validate::ConstraintError {
2534 kind: crate::common::validate::ConstraintKind::MaxLength,
2535 message: format!("{} (got {})", "value exceeds maximum length 256", len),
2536 });
2537 }
2538 }
2539 }
2540 Ok(Self(value))
2541 }
2542}
2543impl Max256Text {
2544 #[allow(clippy::unreadable_literal)]
2546 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2547 Self::try_from(value.into())
2548 }
2549}
2550impl From<Max256Text> for String {
2551 fn from(v: Max256Text) -> Self {
2552 v.0
2553 }
2554}
2555#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2558#[serde(transparent)]
2559pub struct Max34Text(pub String);
2560impl TryFrom<String> for Max34Text {
2561 type Error = crate::common::validate::ConstraintError;
2562 #[allow(clippy::unreadable_literal)]
2563 fn try_from(value: String) -> Result<Self, Self::Error> {
2564 {
2565 let value: &str = &value;
2566 {
2567 let len = value.chars().count();
2568 let violated = len < 1usize;
2569 if violated {
2570 return Err(crate::common::validate::ConstraintError {
2571 kind: crate::common::validate::ConstraintKind::MinLength,
2572 message: format!(
2573 "{} (got {})",
2574 "value is shorter than minimum length 1", len
2575 ),
2576 });
2577 }
2578 }
2579 {
2580 let len = value.chars().count();
2581 let violated = len > 34usize;
2582 if violated {
2583 return Err(crate::common::validate::ConstraintError {
2584 kind: crate::common::validate::ConstraintKind::MaxLength,
2585 message: format!("{} (got {})", "value exceeds maximum length 34", len),
2586 });
2587 }
2588 }
2589 }
2590 Ok(Self(value))
2591 }
2592}
2593impl Max34Text {
2594 #[allow(clippy::unreadable_literal)]
2596 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2597 Self::try_from(value.into())
2598 }
2599}
2600impl From<Max34Text> for String {
2601 fn from(v: Max34Text) -> Self {
2602 v.0
2603 }
2604}
2605#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2608#[serde(transparent)]
2609pub struct Max350Text(pub String);
2610impl TryFrom<String> for Max350Text {
2611 type Error = crate::common::validate::ConstraintError;
2612 #[allow(clippy::unreadable_literal)]
2613 fn try_from(value: String) -> Result<Self, Self::Error> {
2614 {
2615 let value: &str = &value;
2616 {
2617 let len = value.chars().count();
2618 let violated = len < 1usize;
2619 if violated {
2620 return Err(crate::common::validate::ConstraintError {
2621 kind: crate::common::validate::ConstraintKind::MinLength,
2622 message: format!(
2623 "{} (got {})",
2624 "value is shorter than minimum length 1", len
2625 ),
2626 });
2627 }
2628 }
2629 {
2630 let len = value.chars().count();
2631 let violated = len > 350usize;
2632 if violated {
2633 return Err(crate::common::validate::ConstraintError {
2634 kind: crate::common::validate::ConstraintKind::MaxLength,
2635 message: format!("{} (got {})", "value exceeds maximum length 350", len),
2636 });
2637 }
2638 }
2639 }
2640 Ok(Self(value))
2641 }
2642}
2643impl Max350Text {
2644 #[allow(clippy::unreadable_literal)]
2646 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2647 Self::try_from(value.into())
2648 }
2649}
2650impl From<Max350Text> for String {
2651 fn from(v: Max350Text) -> Self {
2652 v.0
2653 }
2654}
2655#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2658#[serde(transparent)]
2659pub struct Max35Text(pub String);
2660impl TryFrom<String> for Max35Text {
2661 type Error = crate::common::validate::ConstraintError;
2662 #[allow(clippy::unreadable_literal)]
2663 fn try_from(value: String) -> Result<Self, Self::Error> {
2664 {
2665 let value: &str = &value;
2666 {
2667 let len = value.chars().count();
2668 let violated = len < 1usize;
2669 if violated {
2670 return Err(crate::common::validate::ConstraintError {
2671 kind: crate::common::validate::ConstraintKind::MinLength,
2672 message: format!(
2673 "{} (got {})",
2674 "value is shorter than minimum length 1", len
2675 ),
2676 });
2677 }
2678 }
2679 {
2680 let len = value.chars().count();
2681 let violated = len > 35usize;
2682 if violated {
2683 return Err(crate::common::validate::ConstraintError {
2684 kind: crate::common::validate::ConstraintKind::MaxLength,
2685 message: format!("{} (got {})", "value exceeds maximum length 35", len),
2686 });
2687 }
2688 }
2689 }
2690 Ok(Self(value))
2691 }
2692}
2693impl Max35Text {
2694 #[allow(clippy::unreadable_literal)]
2696 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2697 Self::try_from(value.into())
2698 }
2699}
2700impl From<Max35Text> for String {
2701 fn from(v: Max35Text) -> Self {
2702 v.0
2703 }
2704}
2705#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2708#[serde(transparent)]
2709pub struct Max4Text(pub String);
2710impl TryFrom<String> for Max4Text {
2711 type Error = crate::common::validate::ConstraintError;
2712 #[allow(clippy::unreadable_literal)]
2713 fn try_from(value: String) -> Result<Self, Self::Error> {
2714 {
2715 let value: &str = &value;
2716 {
2717 let len = value.chars().count();
2718 let violated = len < 1usize;
2719 if violated {
2720 return Err(crate::common::validate::ConstraintError {
2721 kind: crate::common::validate::ConstraintKind::MinLength,
2722 message: format!(
2723 "{} (got {})",
2724 "value is shorter than minimum length 1", len
2725 ),
2726 });
2727 }
2728 }
2729 {
2730 let len = value.chars().count();
2731 let violated = len > 4usize;
2732 if violated {
2733 return Err(crate::common::validate::ConstraintError {
2734 kind: crate::common::validate::ConstraintKind::MaxLength,
2735 message: format!("{} (got {})", "value exceeds maximum length 4", len),
2736 });
2737 }
2738 }
2739 }
2740 Ok(Self(value))
2741 }
2742}
2743impl Max4Text {
2744 #[allow(clippy::unreadable_literal)]
2746 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2747 Self::try_from(value.into())
2748 }
2749}
2750impl From<Max4Text> for String {
2751 fn from(v: Max4Text) -> Self {
2752 v.0
2753 }
2754}
2755#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2758#[serde(transparent)]
2759pub struct Max70Text(pub String);
2760impl TryFrom<String> for Max70Text {
2761 type Error = crate::common::validate::ConstraintError;
2762 #[allow(clippy::unreadable_literal)]
2763 fn try_from(value: String) -> Result<Self, Self::Error> {
2764 {
2765 let value: &str = &value;
2766 {
2767 let len = value.chars().count();
2768 let violated = len < 1usize;
2769 if violated {
2770 return Err(crate::common::validate::ConstraintError {
2771 kind: crate::common::validate::ConstraintKind::MinLength,
2772 message: format!(
2773 "{} (got {})",
2774 "value is shorter than minimum length 1", len
2775 ),
2776 });
2777 }
2778 }
2779 {
2780 let len = value.chars().count();
2781 let violated = len > 70usize;
2782 if violated {
2783 return Err(crate::common::validate::ConstraintError {
2784 kind: crate::common::validate::ConstraintKind::MaxLength,
2785 message: format!("{} (got {})", "value exceeds maximum length 70", len),
2786 });
2787 }
2788 }
2789 }
2790 Ok(Self(value))
2791 }
2792}
2793impl Max70Text {
2794 #[allow(clippy::unreadable_literal)]
2796 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2797 Self::try_from(value.into())
2798 }
2799}
2800impl From<Max70Text> for String {
2801 fn from(v: Max70Text) -> Self {
2802 v.0
2803 }
2804}
2805#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2806pub enum NamePrefix2Code {
2807 #[serde(rename = "DOCT")]
2808 Doct,
2809 #[serde(rename = "MADM")]
2810 Madm,
2811 #[serde(rename = "MISS")]
2812 Miss,
2813 #[serde(rename = "MIST")]
2814 Mist,
2815 #[serde(rename = "MIKS")]
2816 Miks,
2817}
2818#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2821#[serde(transparent)]
2822pub struct Number(pub String);
2823impl TryFrom<String> for Number {
2824 type Error = crate::common::validate::ConstraintError;
2825 #[allow(clippy::unreadable_literal)]
2826 fn try_from(value: String) -> Result<Self, Self::Error> {
2827 {
2828 let value: &str = &value;
2829 {
2830 let frac_count = value.find('.').map_or(0, |dot| {
2831 value[dot + 1..]
2832 .chars()
2833 .filter(char::is_ascii_digit)
2834 .count()
2835 });
2836 let violated = frac_count > 0usize;
2837 if violated {
2838 return Err(crate::common::validate::ConstraintError {
2839 kind: crate::common::validate::ConstraintKind::FractionDigits,
2840 message: format!(
2841 "{} (got {})",
2842 "value exceeds maximum fraction digits 0", frac_count
2843 ),
2844 });
2845 }
2846 }
2847 {
2848 let digit_count = value.chars().filter(char::is_ascii_digit).count();
2849 let violated = digit_count > 18usize;
2850 if violated {
2851 return Err(crate::common::validate::ConstraintError {
2852 kind: crate::common::validate::ConstraintKind::TotalDigits,
2853 message: format!(
2854 "{} (got {})",
2855 "value exceeds maximum total digits 18", digit_count
2856 ),
2857 });
2858 }
2859 }
2860 }
2861 Ok(Self(value))
2862 }
2863}
2864impl Number {
2865 #[allow(clippy::unreadable_literal)]
2867 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2868 Self::try_from(value.into())
2869 }
2870}
2871impl From<Number> for String {
2872 fn from(v: Number) -> Self {
2873 v.0
2874 }
2875}
2876#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2879#[serde(transparent)]
2880pub struct PercentageRate(pub String);
2881impl TryFrom<String> for PercentageRate {
2882 type Error = crate::common::validate::ConstraintError;
2883 #[allow(clippy::unreadable_literal)]
2884 fn try_from(value: String) -> Result<Self, Self::Error> {
2885 {
2886 let value: &str = &value;
2887 {
2888 let frac_count = value.find('.').map_or(0, |dot| {
2889 value[dot + 1..]
2890 .chars()
2891 .filter(char::is_ascii_digit)
2892 .count()
2893 });
2894 let violated = frac_count > 10usize;
2895 if violated {
2896 return Err(crate::common::validate::ConstraintError {
2897 kind: crate::common::validate::ConstraintKind::FractionDigits,
2898 message: format!(
2899 "{} (got {})",
2900 "value exceeds maximum fraction digits 10", frac_count
2901 ),
2902 });
2903 }
2904 }
2905 {
2906 let digit_count = value.chars().filter(char::is_ascii_digit).count();
2907 let violated = digit_count > 11usize;
2908 if violated {
2909 return Err(crate::common::validate::ConstraintError {
2910 kind: crate::common::validate::ConstraintKind::TotalDigits,
2911 message: format!(
2912 "{} (got {})",
2913 "value exceeds maximum total digits 11", digit_count
2914 ),
2915 });
2916 }
2917 }
2918 }
2919 Ok(Self(value))
2920 }
2921}
2922impl PercentageRate {
2923 #[allow(clippy::unreadable_literal)]
2925 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2926 Self::try_from(value.into())
2927 }
2928}
2929impl From<PercentageRate> for String {
2930 fn from(v: PercentageRate) -> Self {
2931 v.0
2932 }
2933}
2934#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2936#[serde(transparent)]
2937pub struct PhoneNumber(pub String);
2938impl TryFrom<String> for PhoneNumber {
2939 type Error = crate::common::validate::ConstraintError;
2940 #[allow(clippy::unreadable_literal)]
2941 fn try_from(value: String) -> Result<Self, Self::Error> {
2942 {
2943 let value: &str = &value;
2944 {
2945 let violated = {
2946 let bytes = value.as_bytes();
2947 let len = bytes.len();
2948 let result: bool = (|| -> bool {
2949 let mut pos: usize = 0;
2950 if !(4usize..=35usize).contains(&len) {
2951 return true;
2952 }
2953 if pos >= len || bytes[pos] != 43u8 {
2954 return true;
2955 }
2956 pos += 1;
2957 {
2958 let start = pos;
2959 let limit = if pos + 3usize < len {
2960 pos + 3usize
2961 } else {
2962 len
2963 };
2964 while pos < limit {
2965 let b = bytes[pos];
2966 if !(48u8..=57u8).contains(&b) {
2967 break;
2968 }
2969 pos += 1;
2970 }
2971 let matched = pos - start;
2972 if matched < 1usize {
2973 return true;
2974 }
2975 }
2976 if pos >= len || bytes[pos] != 45u8 {
2977 return true;
2978 }
2979 pos += 1;
2980 {
2981 let start = pos;
2982 let limit = if pos + 30usize < len {
2983 pos + 30usize
2984 } else {
2985 len
2986 };
2987 while pos < limit {
2988 let b = bytes[pos];
2989 if !(48u8..=57u8).contains(&b)
2990 && b != 40u8
2991 && b != 41u8
2992 && b != 43u8
2993 && b != 45u8
2994 {
2995 break;
2996 }
2997 pos += 1;
2998 }
2999 let matched = pos - start;
3000 if matched < 1usize {
3001 return true;
3002 }
3003 }
3004 if pos != len {
3005 return true;
3006 }
3007 false
3008 })();
3009 result
3010 };
3011 if violated {
3012 return Err(crate::common::validate::ConstraintError {
3013 kind: crate::common::validate::ConstraintKind::Pattern,
3014 message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
3015 .to_string(),
3016 });
3017 }
3018 }
3019 }
3020 Ok(Self(value))
3021 }
3022}
3023impl PhoneNumber {
3024 #[allow(clippy::unreadable_literal)]
3026 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
3027 Self::try_from(value.into())
3028 }
3029}
3030impl From<PhoneNumber> for String {
3031 fn from(v: PhoneNumber) -> Self {
3032 v.0
3033 }
3034}
3035#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3036pub enum PreferredContactMethod2Code {
3037 #[serde(rename = "MAIL")]
3038 Mail,
3039 #[serde(rename = "FAXX")]
3040 Faxx,
3041 #[serde(rename = "LETT")]
3042 Lett,
3043 #[serde(rename = "CELL")]
3044 Cell,
3045 #[serde(rename = "ONLI")]
3046 Onli,
3047 #[serde(rename = "PHON")]
3048 Phon,
3049}
3050#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3051pub enum Priority2Code {
3052 #[serde(rename = "HIGH")]
3053 High,
3054 #[serde(rename = "NORM")]
3055 Norm,
3056}
3057#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3058pub enum Priority3Code {
3059 #[serde(rename = "URGT")]
3060 Urgt,
3061 #[serde(rename = "HIGH")]
3062 High,
3063 #[serde(rename = "NORM")]
3064 Norm,
3065}
3066#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3067pub enum RegulatoryReportingType1Code {
3068 #[serde(rename = "CRED")]
3069 Cred,
3070 #[serde(rename = "DEBT")]
3071 Debt,
3072 #[serde(rename = "BOTH")]
3073 Both,
3074}
3075#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3076pub enum RemittanceLocationMethod2Code {
3077 #[serde(rename = "FAXI")]
3078 Faxi,
3079 #[serde(rename = "EDIC")]
3080 Edic,
3081 #[serde(rename = "URID")]
3082 Urid,
3083 #[serde(rename = "EMAL")]
3084 Emal,
3085 #[serde(rename = "POST")]
3086 Post,
3087 #[serde(rename = "SMSM")]
3088 Smsm,
3089}
3090#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3092#[serde(transparent)]
3093pub struct SHA256SignatureText(pub String);
3094impl TryFrom<String> for SHA256SignatureText {
3095 type Error = crate::common::validate::ConstraintError;
3096 #[allow(clippy::unreadable_literal)]
3097 fn try_from(value: String) -> Result<Self, Self::Error> {
3098 {
3099 let value: &str = &value;
3100 {
3101 let violated = {
3102 let bytes = value.as_bytes();
3103 bytes.len() != 64usize
3104 || ({
3105 let b = bytes[0usize];
3106 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3107 })
3108 || ({
3109 let b = bytes[1usize];
3110 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3111 })
3112 || ({
3113 let b = bytes[2usize];
3114 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3115 })
3116 || ({
3117 let b = bytes[3usize];
3118 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3119 })
3120 || ({
3121 let b = bytes[4usize];
3122 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3123 })
3124 || ({
3125 let b = bytes[5usize];
3126 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3127 })
3128 || ({
3129 let b = bytes[6usize];
3130 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3131 })
3132 || ({
3133 let b = bytes[7usize];
3134 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3135 })
3136 || ({
3137 let b = bytes[8usize];
3138 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3139 })
3140 || ({
3141 let b = bytes[9usize];
3142 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3143 })
3144 || ({
3145 let b = bytes[10usize];
3146 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3147 })
3148 || ({
3149 let b = bytes[11usize];
3150 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3151 })
3152 || ({
3153 let b = bytes[12usize];
3154 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3155 })
3156 || ({
3157 let b = bytes[13usize];
3158 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3159 })
3160 || ({
3161 let b = bytes[14usize];
3162 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3163 })
3164 || ({
3165 let b = bytes[15usize];
3166 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3167 })
3168 || ({
3169 let b = bytes[16usize];
3170 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3171 })
3172 || ({
3173 let b = bytes[17usize];
3174 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3175 })
3176 || ({
3177 let b = bytes[18usize];
3178 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3179 })
3180 || ({
3181 let b = bytes[19usize];
3182 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3183 })
3184 || ({
3185 let b = bytes[20usize];
3186 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3187 })
3188 || ({
3189 let b = bytes[21usize];
3190 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3191 })
3192 || ({
3193 let b = bytes[22usize];
3194 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3195 })
3196 || ({
3197 let b = bytes[23usize];
3198 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3199 })
3200 || ({
3201 let b = bytes[24usize];
3202 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3203 })
3204 || ({
3205 let b = bytes[25usize];
3206 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3207 })
3208 || ({
3209 let b = bytes[26usize];
3210 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3211 })
3212 || ({
3213 let b = bytes[27usize];
3214 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3215 })
3216 || ({
3217 let b = bytes[28usize];
3218 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3219 })
3220 || ({
3221 let b = bytes[29usize];
3222 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3223 })
3224 || ({
3225 let b = bytes[30usize];
3226 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3227 })
3228 || ({
3229 let b = bytes[31usize];
3230 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3231 })
3232 || ({
3233 let b = bytes[32usize];
3234 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3235 })
3236 || ({
3237 let b = bytes[33usize];
3238 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3239 })
3240 || ({
3241 let b = bytes[34usize];
3242 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3243 })
3244 || ({
3245 let b = bytes[35usize];
3246 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3247 })
3248 || ({
3249 let b = bytes[36usize];
3250 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3251 })
3252 || ({
3253 let b = bytes[37usize];
3254 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3255 })
3256 || ({
3257 let b = bytes[38usize];
3258 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3259 })
3260 || ({
3261 let b = bytes[39usize];
3262 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3263 })
3264 || ({
3265 let b = bytes[40usize];
3266 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3267 })
3268 || ({
3269 let b = bytes[41usize];
3270 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3271 })
3272 || ({
3273 let b = bytes[42usize];
3274 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3275 })
3276 || ({
3277 let b = bytes[43usize];
3278 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3279 })
3280 || ({
3281 let b = bytes[44usize];
3282 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3283 })
3284 || ({
3285 let b = bytes[45usize];
3286 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3287 })
3288 || ({
3289 let b = bytes[46usize];
3290 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3291 })
3292 || ({
3293 let b = bytes[47usize];
3294 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3295 })
3296 || ({
3297 let b = bytes[48usize];
3298 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3299 })
3300 || ({
3301 let b = bytes[49usize];
3302 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3303 })
3304 || ({
3305 let b = bytes[50usize];
3306 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3307 })
3308 || ({
3309 let b = bytes[51usize];
3310 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3311 })
3312 || ({
3313 let b = bytes[52usize];
3314 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3315 })
3316 || ({
3317 let b = bytes[53usize];
3318 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3319 })
3320 || ({
3321 let b = bytes[54usize];
3322 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3323 })
3324 || ({
3325 let b = bytes[55usize];
3326 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3327 })
3328 || ({
3329 let b = bytes[56usize];
3330 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3331 })
3332 || ({
3333 let b = bytes[57usize];
3334 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3335 })
3336 || ({
3337 let b = bytes[58usize];
3338 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3339 })
3340 || ({
3341 let b = bytes[59usize];
3342 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3343 })
3344 || ({
3345 let b = bytes[60usize];
3346 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3347 })
3348 || ({
3349 let b = bytes[61usize];
3350 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3351 })
3352 || ({
3353 let b = bytes[62usize];
3354 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3355 })
3356 || ({
3357 let b = bytes[63usize];
3358 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
3359 })
3360 };
3361 if violated {
3362 return Err(crate::common::validate::ConstraintError {
3363 kind: crate::common::validate::ConstraintKind::Pattern,
3364 message: "value does not match pattern ([0-9A-F][0-9A-F]){32}".to_string(),
3365 });
3366 }
3367 }
3368 }
3369 Ok(Self(value))
3370 }
3371}
3372impl SHA256SignatureText {
3373 #[allow(clippy::unreadable_literal)]
3375 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
3376 Self::try_from(value.into())
3377 }
3378}
3379impl From<SHA256SignatureText> for String {
3380 fn from(v: SHA256SignatureText) -> Self {
3381 v.0
3382 }
3383}
3384#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3385pub enum SettlementMethod1Code {
3386 #[serde(rename = "INDA")]
3387 Inda,
3388 #[serde(rename = "INGA")]
3389 Inga,
3390 #[serde(rename = "COVE")]
3391 Cove,
3392 #[serde(rename = "CLRG")]
3393 Clrg,
3394}
3395#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3396pub enum TaxRecordPeriod1Code {
3397 #[serde(rename = "MM01")]
3398 Mm01,
3399 #[serde(rename = "MM02")]
3400 Mm02,
3401 #[serde(rename = "MM03")]
3402 Mm03,
3403 #[serde(rename = "MM04")]
3404 Mm04,
3405 #[serde(rename = "MM05")]
3406 Mm05,
3407 #[serde(rename = "MM06")]
3408 Mm06,
3409 #[serde(rename = "MM07")]
3410 Mm07,
3411 #[serde(rename = "MM08")]
3412 Mm08,
3413 #[serde(rename = "MM09")]
3414 Mm09,
3415 #[serde(rename = "MM10")]
3416 Mm10,
3417 #[serde(rename = "MM11")]
3418 Mm11,
3419 #[serde(rename = "MM12")]
3420 Mm12,
3421 #[serde(rename = "QTR1")]
3422 Qtr1,
3423 #[serde(rename = "QTR2")]
3424 Qtr2,
3425 #[serde(rename = "QTR3")]
3426 Qtr3,
3427 #[serde(rename = "QTR4")]
3428 Qtr4,
3429 #[serde(rename = "HLF1")]
3430 Hlf1,
3431 #[serde(rename = "HLF2")]
3432 Hlf2,
3433}
3434#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3435#[serde(transparent)]
3436pub struct TrueFalseIndicator(pub bool);
3437#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3439#[serde(transparent)]
3440pub struct UUIDv4Identifier(pub String);
3441impl TryFrom<String> for UUIDv4Identifier {
3442 type Error = crate::common::validate::ConstraintError;
3443 #[allow(clippy::unreadable_literal)]
3444 fn try_from(value: String) -> Result<Self, Self::Error> {
3445 {
3446 let value: &str = &value;
3447 {
3448 let violated = {
3449 let bytes = value.as_bytes();
3450 bytes.len() != 36usize
3451 || ({
3452 let b = bytes[0usize];
3453 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3454 })
3455 || ({
3456 let b = bytes[1usize];
3457 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3458 })
3459 || ({
3460 let b = bytes[2usize];
3461 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3462 })
3463 || ({
3464 let b = bytes[3usize];
3465 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3466 })
3467 || ({
3468 let b = bytes[4usize];
3469 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3470 })
3471 || ({
3472 let b = bytes[5usize];
3473 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3474 })
3475 || ({
3476 let b = bytes[6usize];
3477 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3478 })
3479 || ({
3480 let b = bytes[7usize];
3481 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3482 })
3483 || bytes[8usize] != 45u8
3484 || ({
3485 let b = bytes[9usize];
3486 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3487 })
3488 || ({
3489 let b = bytes[10usize];
3490 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3491 })
3492 || ({
3493 let b = bytes[11usize];
3494 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3495 })
3496 || ({
3497 let b = bytes[12usize];
3498 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3499 })
3500 || bytes[13usize] != 45u8
3501 || bytes[14usize] != 52u8
3502 || ({
3503 let b = bytes[15usize];
3504 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3505 })
3506 || ({
3507 let b = bytes[16usize];
3508 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3509 })
3510 || ({
3511 let b = bytes[17usize];
3512 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3513 })
3514 || bytes[18usize] != 45u8
3515 || ({
3516 let b = bytes[19usize];
3517 b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
3518 })
3519 || ({
3520 let b = bytes[20usize];
3521 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3522 })
3523 || ({
3524 let b = bytes[21usize];
3525 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3526 })
3527 || ({
3528 let b = bytes[22usize];
3529 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3530 })
3531 || bytes[23usize] != 45u8
3532 || ({
3533 let b = bytes[24usize];
3534 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3535 })
3536 || ({
3537 let b = bytes[25usize];
3538 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3539 })
3540 || ({
3541 let b = bytes[26usize];
3542 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3543 })
3544 || ({
3545 let b = bytes[27usize];
3546 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3547 })
3548 || ({
3549 let b = bytes[28usize];
3550 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3551 })
3552 || ({
3553 let b = bytes[29usize];
3554 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3555 })
3556 || ({
3557 let b = bytes[30usize];
3558 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3559 })
3560 || ({
3561 let b = bytes[31usize];
3562 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3563 })
3564 || ({
3565 let b = bytes[32usize];
3566 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3567 })
3568 || ({
3569 let b = bytes[33usize];
3570 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3571 })
3572 || ({
3573 let b = bytes[34usize];
3574 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3575 })
3576 || ({
3577 let b = bytes[35usize];
3578 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
3579 })
3580 };
3581 if violated {
3582 return Err(crate::common::validate::ConstraintError {
3583 kind: crate::common::validate::ConstraintKind::Pattern,
3584 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}"
3585 .to_string(),
3586 });
3587 }
3588 }
3589 }
3590 Ok(Self(value))
3591 }
3592}
3593impl UUIDv4Identifier {
3594 #[allow(clippy::unreadable_literal)]
3596 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
3597 Self::try_from(value.into())
3598 }
3599}
3600impl From<UUIDv4Identifier> for String {
3601 fn from(v: UUIDv4Identifier) -> Self {
3602 v.0
3603 }
3604}
3605#[allow(clippy::large_enum_variant)]
3606#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3607pub enum AccountIdentification4Choice {
3608 #[serde(rename = "IBAN")]
3609 IBAN(IBAN2007Identifier),
3610 #[serde(rename = "Othr")]
3611 Othr(GenericAccountIdentification1),
3612}
3613#[allow(clippy::large_enum_variant)]
3614#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3615pub enum AccountSchemeName1Choice {
3616 #[serde(rename = "Cd")]
3617 Cd(ExternalAccountIdentification1Code),
3618 #[serde(rename = "Prtry")]
3619 Prtry(Max35Text),
3620}
3621#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3622pub struct ActiveCurrencyAndAmount {
3623 #[serde(rename = "$value")]
3624 pub value: ActiveCurrencyAndAmountSimpleType,
3625 #[serde(rename = "@Ccy")]
3626 pub ccy: ActiveCurrencyCode,
3627}
3628#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3629pub struct ActiveOrHistoricCurrencyAndAmount {
3630 #[serde(rename = "$value")]
3631 pub value: ActiveOrHistoricCurrencyAndAmountSimpleType,
3632 #[serde(rename = "@Ccy")]
3633 pub ccy: ActiveOrHistoricCurrencyCode,
3634}
3635#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3636pub struct AdditionalDateTime1 {
3637 #[serde(rename = "AccptncDtTm")]
3638 #[serde(skip_serializing_if = "Option::is_none")]
3639 pub accptnc_dt_tm: Option<ISODateTime>,
3640 #[serde(rename = "PoolgAdjstmntDt")]
3641 #[serde(skip_serializing_if = "Option::is_none")]
3642 pub poolg_adjstmnt_dt: Option<ISODate>,
3643 #[serde(rename = "XpryDtTm")]
3644 #[serde(skip_serializing_if = "Option::is_none")]
3645 pub xpry_dt_tm: Option<ISODateTime>,
3646}
3647#[allow(clippy::struct_field_names)]
3649#[derive(Default)]
3650pub struct AdditionalDateTime1Builder {
3651 accptnc_dt_tm: ::std::option::Option<ISODateTime>,
3652 poolg_adjstmnt_dt: ::std::option::Option<ISODate>,
3653 xpry_dt_tm: ::std::option::Option<ISODateTime>,
3654}
3655impl AdditionalDateTime1Builder {
3656 #[must_use]
3658 pub fn accptnc_dt_tm(mut self, value: ISODateTime) -> AdditionalDateTime1Builder {
3659 self.accptnc_dt_tm = ::std::option::Option::Some(value);
3660 self
3661 }
3662 #[must_use]
3664 pub fn poolg_adjstmnt_dt(mut self, value: ISODate) -> AdditionalDateTime1Builder {
3665 self.poolg_adjstmnt_dt = ::std::option::Option::Some(value);
3666 self
3667 }
3668 #[must_use]
3670 pub fn xpry_dt_tm(mut self, value: ISODateTime) -> AdditionalDateTime1Builder {
3671 self.xpry_dt_tm = ::std::option::Option::Some(value);
3672 self
3673 }
3674 pub fn build(self) -> ::std::result::Result<AdditionalDateTime1, crate::common::BuilderError> {
3686 ::std::result::Result::Ok(AdditionalDateTime1 {
3687 accptnc_dt_tm: self.accptnc_dt_tm,
3688 poolg_adjstmnt_dt: self.poolg_adjstmnt_dt,
3689 xpry_dt_tm: self.xpry_dt_tm,
3690 })
3691 }
3692}
3693impl AdditionalDateTime1 {
3694 #[must_use]
3696 pub fn builder() -> AdditionalDateTime1Builder {
3697 AdditionalDateTime1Builder::default()
3698 }
3699}
3700#[allow(clippy::large_enum_variant)]
3701#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3702pub enum AddressType3Choice {
3703 #[serde(rename = "Cd")]
3704 Cd(AddressType2Code),
3705 #[serde(rename = "Prtry")]
3706 Prtry(GenericIdentification30),
3707}
3708#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3709pub struct BranchAndFinancialInstitutionIdentification8 {
3710 #[serde(rename = "FinInstnId")]
3711 pub fin_instn_id: FinancialInstitutionIdentification23,
3712 #[serde(rename = "BrnchId")]
3713 #[serde(skip_serializing_if = "Option::is_none")]
3714 pub brnch_id: Option<BranchData5>,
3715}
3716#[allow(clippy::struct_field_names)]
3718#[derive(Default)]
3719pub struct BranchAndFinancialInstitutionIdentification8Builder {
3720 fin_instn_id: ::std::option::Option<FinancialInstitutionIdentification23>,
3721 brnch_id: ::std::option::Option<BranchData5>,
3722}
3723impl BranchAndFinancialInstitutionIdentification8Builder {
3724 #[must_use]
3726 pub fn fin_instn_id(
3727 mut self,
3728 value: FinancialInstitutionIdentification23,
3729 ) -> BranchAndFinancialInstitutionIdentification8Builder {
3730 self.fin_instn_id = ::std::option::Option::Some(value);
3731 self
3732 }
3733 #[must_use]
3735 pub fn brnch_id(
3736 mut self,
3737 value: BranchData5,
3738 ) -> BranchAndFinancialInstitutionIdentification8Builder {
3739 self.brnch_id = ::std::option::Option::Some(value);
3740 self
3741 }
3742 pub fn build(
3754 self,
3755 ) -> ::std::result::Result<
3756 BranchAndFinancialInstitutionIdentification8,
3757 crate::common::BuilderError,
3758 > {
3759 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3760 if self.fin_instn_id.is_none() {
3761 missing.push("fin_instn_id".to_owned());
3762 }
3763 if !missing.is_empty() {
3764 return ::std::result::Result::Err(crate::common::BuilderError {
3765 type_name: "BranchAndFinancialInstitutionIdentification8".to_owned(),
3766 missing_fields: missing,
3767 });
3768 }
3769 ::std::result::Result::Ok(BranchAndFinancialInstitutionIdentification8 {
3770 fin_instn_id: self.fin_instn_id.unwrap(),
3771 brnch_id: self.brnch_id,
3772 })
3773 }
3774}
3775impl BranchAndFinancialInstitutionIdentification8 {
3776 #[must_use]
3778 pub fn builder() -> BranchAndFinancialInstitutionIdentification8Builder {
3779 BranchAndFinancialInstitutionIdentification8Builder::default()
3780 }
3781}
3782#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3783pub struct BranchData5 {
3784 #[serde(rename = "Id")]
3785 #[serde(skip_serializing_if = "Option::is_none")]
3786 pub id: Option<Max35Text>,
3787 #[serde(rename = "LEI")]
3788 #[serde(skip_serializing_if = "Option::is_none")]
3789 pub lei: Option<LEIIdentifier>,
3790 #[serde(rename = "Nm")]
3791 #[serde(skip_serializing_if = "Option::is_none")]
3792 pub nm: Option<Max140Text>,
3793 #[serde(rename = "PstlAdr")]
3794 #[serde(skip_serializing_if = "Option::is_none")]
3795 pub pstl_adr: Option<PostalAddress27>,
3796}
3797#[allow(clippy::struct_field_names)]
3799#[derive(Default)]
3800pub struct BranchData5Builder {
3801 id: ::std::option::Option<Max35Text>,
3802 lei: ::std::option::Option<LEIIdentifier>,
3803 nm: ::std::option::Option<Max140Text>,
3804 pstl_adr: ::std::option::Option<PostalAddress27>,
3805}
3806impl BranchData5Builder {
3807 #[must_use]
3809 pub fn id(mut self, value: Max35Text) -> BranchData5Builder {
3810 self.id = ::std::option::Option::Some(value);
3811 self
3812 }
3813 #[must_use]
3815 pub fn lei(mut self, value: LEIIdentifier) -> BranchData5Builder {
3816 self.lei = ::std::option::Option::Some(value);
3817 self
3818 }
3819 #[must_use]
3821 pub fn nm(mut self, value: Max140Text) -> BranchData5Builder {
3822 self.nm = ::std::option::Option::Some(value);
3823 self
3824 }
3825 #[must_use]
3827 pub fn pstl_adr(mut self, value: PostalAddress27) -> BranchData5Builder {
3828 self.pstl_adr = ::std::option::Option::Some(value);
3829 self
3830 }
3831 pub fn build(self) -> ::std::result::Result<BranchData5, crate::common::BuilderError> {
3843 ::std::result::Result::Ok(BranchData5 {
3844 id: self.id,
3845 lei: self.lei,
3846 nm: self.nm,
3847 pstl_adr: self.pstl_adr,
3848 })
3849 }
3850}
3851impl BranchData5 {
3852 #[must_use]
3854 pub fn builder() -> BranchData5Builder {
3855 BranchData5Builder::default()
3856 }
3857}
3858#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3859pub struct CashAccount40 {
3860 #[serde(rename = "Id")]
3861 #[serde(skip_serializing_if = "Option::is_none")]
3862 pub id: Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3863 #[serde(rename = "Tp")]
3864 #[serde(skip_serializing_if = "Option::is_none")]
3865 pub tp: Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3866 #[serde(rename = "Ccy")]
3867 #[serde(skip_serializing_if = "Option::is_none")]
3868 pub ccy: Option<ActiveOrHistoricCurrencyCode>,
3869 #[serde(rename = "Nm")]
3870 #[serde(skip_serializing_if = "Option::is_none")]
3871 pub nm: Option<Max70Text>,
3872 #[serde(rename = "Prxy")]
3873 #[serde(skip_serializing_if = "Option::is_none")]
3874 pub prxy: Option<ProxyAccountIdentification1>,
3875}
3876#[allow(clippy::struct_field_names)]
3878#[derive(Default)]
3879pub struct CashAccount40Builder {
3880 id: ::std::option::Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3881 tp: ::std::option::Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3882 ccy: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
3883 nm: ::std::option::Option<Max70Text>,
3884 prxy: ::std::option::Option<ProxyAccountIdentification1>,
3885}
3886impl CashAccount40Builder {
3887 #[must_use]
3889 pub fn id(
3890 mut self,
3891 value: crate::common::ChoiceWrapper<AccountIdentification4Choice>,
3892 ) -> CashAccount40Builder {
3893 self.id = ::std::option::Option::Some(value);
3894 self
3895 }
3896 #[must_use]
3898 pub fn tp(
3899 mut self,
3900 value: crate::common::ChoiceWrapper<CashAccountType2Choice>,
3901 ) -> CashAccount40Builder {
3902 self.tp = ::std::option::Option::Some(value);
3903 self
3904 }
3905 #[must_use]
3907 pub fn ccy(mut self, value: ActiveOrHistoricCurrencyCode) -> CashAccount40Builder {
3908 self.ccy = ::std::option::Option::Some(value);
3909 self
3910 }
3911 #[must_use]
3913 pub fn nm(mut self, value: Max70Text) -> CashAccount40Builder {
3914 self.nm = ::std::option::Option::Some(value);
3915 self
3916 }
3917 #[must_use]
3919 pub fn prxy(mut self, value: ProxyAccountIdentification1) -> CashAccount40Builder {
3920 self.prxy = ::std::option::Option::Some(value);
3921 self
3922 }
3923 pub fn build(self) -> ::std::result::Result<CashAccount40, crate::common::BuilderError> {
3935 ::std::result::Result::Ok(CashAccount40 {
3936 id: self.id,
3937 tp: self.tp,
3938 ccy: self.ccy,
3939 nm: self.nm,
3940 prxy: self.prxy,
3941 })
3942 }
3943}
3944impl CashAccount40 {
3945 #[must_use]
3947 pub fn builder() -> CashAccount40Builder {
3948 CashAccount40Builder::default()
3949 }
3950}
3951#[allow(clippy::large_enum_variant)]
3952#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3953pub enum CashAccountType2Choice {
3954 #[serde(rename = "Cd")]
3955 Cd(ExternalCashAccountType1Code),
3956 #[serde(rename = "Prtry")]
3957 Prtry(Max35Text),
3958}
3959#[allow(clippy::large_enum_variant)]
3960#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3961pub enum CategoryPurpose1Choice {
3962 #[serde(rename = "Cd")]
3963 Cd(ExternalCategoryPurpose1Code),
3964 #[serde(rename = "Prtry")]
3965 Prtry(Max35Text),
3966}
3967#[allow(clippy::large_enum_variant)]
3968#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3969pub enum ChargeType3Choice {
3970 #[serde(rename = "Cd")]
3971 Cd(ExternalChargeType1Code),
3972 #[serde(rename = "Prtry")]
3973 Prtry(GenericIdentification3),
3974}
3975#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3976pub struct Charges16 {
3977 #[serde(rename = "Amt")]
3978 pub amt: ActiveOrHistoricCurrencyAndAmount,
3979 #[serde(rename = "Agt")]
3980 pub agt: BranchAndFinancialInstitutionIdentification8,
3981 #[serde(rename = "Tp")]
3982 #[serde(skip_serializing_if = "Option::is_none")]
3983 pub tp: Option<crate::common::ChoiceWrapper<ChargeType3Choice>>,
3984}
3985#[allow(clippy::struct_field_names)]
3987#[derive(Default)]
3988pub struct Charges16Builder {
3989 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
3990 agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
3991 tp: ::std::option::Option<crate::common::ChoiceWrapper<ChargeType3Choice>>,
3992}
3993impl Charges16Builder {
3994 #[must_use]
3996 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Charges16Builder {
3997 self.amt = ::std::option::Option::Some(value);
3998 self
3999 }
4000 #[must_use]
4002 pub fn agt(mut self, value: BranchAndFinancialInstitutionIdentification8) -> Charges16Builder {
4003 self.agt = ::std::option::Option::Some(value);
4004 self
4005 }
4006 #[must_use]
4008 pub fn tp(
4009 mut self,
4010 value: crate::common::ChoiceWrapper<ChargeType3Choice>,
4011 ) -> Charges16Builder {
4012 self.tp = ::std::option::Option::Some(value);
4013 self
4014 }
4015 pub fn build(self) -> ::std::result::Result<Charges16, crate::common::BuilderError> {
4027 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4028 if self.amt.is_none() {
4029 missing.push("amt".to_owned());
4030 }
4031 if self.agt.is_none() {
4032 missing.push("agt".to_owned());
4033 }
4034 if !missing.is_empty() {
4035 return ::std::result::Result::Err(crate::common::BuilderError {
4036 type_name: "Charges16".to_owned(),
4037 missing_fields: missing,
4038 });
4039 }
4040 ::std::result::Result::Ok(Charges16 {
4041 amt: self.amt.unwrap(),
4042 agt: self.agt.unwrap(),
4043 tp: self.tp,
4044 })
4045 }
4046}
4047impl Charges16 {
4048 #[must_use]
4050 pub fn builder() -> Charges16Builder {
4051 Charges16Builder::default()
4052 }
4053}
4054#[allow(clippy::large_enum_variant)]
4055#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4056pub enum ClearingSystemIdentification2Choice {
4057 #[serde(rename = "Cd")]
4058 Cd(ExternalClearingSystemIdentification1Code),
4059 #[serde(rename = "Prtry")]
4060 Prtry(Max35Text),
4061}
4062#[allow(clippy::large_enum_variant)]
4063#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4064pub enum ClearingSystemIdentification3Choice {
4065 #[serde(rename = "Cd")]
4066 Cd(ExternalCashClearingSystem1Code),
4067 #[serde(rename = "Prtry")]
4068 Prtry(Max35Text),
4069}
4070#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4071pub struct ClearingSystemMemberIdentification2 {
4072 #[serde(rename = "ClrSysId")]
4073 #[serde(skip_serializing_if = "Option::is_none")]
4074 pub clr_sys_id: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
4075 #[serde(rename = "MmbId")]
4076 pub mmb_id: Max35Text,
4077}
4078#[allow(clippy::struct_field_names)]
4080#[derive(Default)]
4081pub struct ClearingSystemMemberIdentification2Builder {
4082 clr_sys_id:
4083 ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
4084 mmb_id: ::std::option::Option<Max35Text>,
4085}
4086impl ClearingSystemMemberIdentification2Builder {
4087 #[must_use]
4089 pub fn clr_sys_id(
4090 mut self,
4091 value: crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>,
4092 ) -> ClearingSystemMemberIdentification2Builder {
4093 self.clr_sys_id = ::std::option::Option::Some(value);
4094 self
4095 }
4096 #[must_use]
4098 pub fn mmb_id(mut self, value: Max35Text) -> ClearingSystemMemberIdentification2Builder {
4099 self.mmb_id = ::std::option::Option::Some(value);
4100 self
4101 }
4102 pub fn build(
4114 self,
4115 ) -> ::std::result::Result<ClearingSystemMemberIdentification2, crate::common::BuilderError>
4116 {
4117 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4118 if self.mmb_id.is_none() {
4119 missing.push("mmb_id".to_owned());
4120 }
4121 if !missing.is_empty() {
4122 return ::std::result::Result::Err(crate::common::BuilderError {
4123 type_name: "ClearingSystemMemberIdentification2".to_owned(),
4124 missing_fields: missing,
4125 });
4126 }
4127 ::std::result::Result::Ok(ClearingSystemMemberIdentification2 {
4128 clr_sys_id: self.clr_sys_id,
4129 mmb_id: self.mmb_id.unwrap(),
4130 })
4131 }
4132}
4133impl ClearingSystemMemberIdentification2 {
4134 #[must_use]
4136 pub fn builder() -> ClearingSystemMemberIdentification2Builder {
4137 ClearingSystemMemberIdentification2Builder::default()
4138 }
4139}
4140#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4141pub struct Contact13 {
4142 #[serde(rename = "NmPrfx")]
4143 #[serde(skip_serializing_if = "Option::is_none")]
4144 pub nm_prfx: Option<NamePrefix2Code>,
4145 #[serde(rename = "Nm")]
4146 #[serde(skip_serializing_if = "Option::is_none")]
4147 pub nm: Option<Max140Text>,
4148 #[serde(rename = "PhneNb")]
4149 #[serde(skip_serializing_if = "Option::is_none")]
4150 pub phne_nb: Option<PhoneNumber>,
4151 #[serde(rename = "MobNb")]
4152 #[serde(skip_serializing_if = "Option::is_none")]
4153 pub mob_nb: Option<PhoneNumber>,
4154 #[serde(rename = "FaxNb")]
4155 #[serde(skip_serializing_if = "Option::is_none")]
4156 pub fax_nb: Option<PhoneNumber>,
4157 #[serde(rename = "URLAdr")]
4158 #[serde(skip_serializing_if = "Option::is_none")]
4159 pub url_adr: Option<Max2048Text>,
4160 #[serde(rename = "EmailAdr")]
4161 #[serde(skip_serializing_if = "Option::is_none")]
4162 pub email_adr: Option<Max256Text>,
4163 #[serde(rename = "EmailPurp")]
4164 #[serde(skip_serializing_if = "Option::is_none")]
4165 pub email_purp: Option<Max35Text>,
4166 #[serde(rename = "JobTitl")]
4167 #[serde(skip_serializing_if = "Option::is_none")]
4168 pub job_titl: Option<Max35Text>,
4169 #[serde(rename = "Rspnsblty")]
4170 #[serde(skip_serializing_if = "Option::is_none")]
4171 pub rspnsblty: Option<Max35Text>,
4172 #[serde(rename = "Dept")]
4173 #[serde(skip_serializing_if = "Option::is_none")]
4174 pub dept: Option<Max70Text>,
4175 #[serde(rename = "Othr")]
4176 #[serde(default)]
4177 #[serde(skip_serializing_if = "Vec::is_empty")]
4178 pub othr: Vec<OtherContact1>,
4179 #[serde(rename = "PrefrdMtd")]
4180 #[serde(skip_serializing_if = "Option::is_none")]
4181 pub prefrd_mtd: Option<PreferredContactMethod2Code>,
4182}
4183#[allow(clippy::struct_field_names)]
4185#[derive(Default)]
4186pub struct Contact13Builder {
4187 nm_prfx: ::std::option::Option<NamePrefix2Code>,
4188 nm: ::std::option::Option<Max140Text>,
4189 phne_nb: ::std::option::Option<PhoneNumber>,
4190 mob_nb: ::std::option::Option<PhoneNumber>,
4191 fax_nb: ::std::option::Option<PhoneNumber>,
4192 url_adr: ::std::option::Option<Max2048Text>,
4193 email_adr: ::std::option::Option<Max256Text>,
4194 email_purp: ::std::option::Option<Max35Text>,
4195 job_titl: ::std::option::Option<Max35Text>,
4196 rspnsblty: ::std::option::Option<Max35Text>,
4197 dept: ::std::option::Option<Max70Text>,
4198 othr: ::std::vec::Vec<OtherContact1>,
4199 prefrd_mtd: ::std::option::Option<PreferredContactMethod2Code>,
4200}
4201impl Contact13Builder {
4202 #[must_use]
4204 pub fn nm_prfx(mut self, value: NamePrefix2Code) -> Contact13Builder {
4205 self.nm_prfx = ::std::option::Option::Some(value);
4206 self
4207 }
4208 #[must_use]
4210 pub fn nm(mut self, value: Max140Text) -> Contact13Builder {
4211 self.nm = ::std::option::Option::Some(value);
4212 self
4213 }
4214 #[must_use]
4216 pub fn phne_nb(mut self, value: PhoneNumber) -> Contact13Builder {
4217 self.phne_nb = ::std::option::Option::Some(value);
4218 self
4219 }
4220 #[must_use]
4222 pub fn mob_nb(mut self, value: PhoneNumber) -> Contact13Builder {
4223 self.mob_nb = ::std::option::Option::Some(value);
4224 self
4225 }
4226 #[must_use]
4228 pub fn fax_nb(mut self, value: PhoneNumber) -> Contact13Builder {
4229 self.fax_nb = ::std::option::Option::Some(value);
4230 self
4231 }
4232 #[must_use]
4234 pub fn url_adr(mut self, value: Max2048Text) -> Contact13Builder {
4235 self.url_adr = ::std::option::Option::Some(value);
4236 self
4237 }
4238 #[must_use]
4240 pub fn email_adr(mut self, value: Max256Text) -> Contact13Builder {
4241 self.email_adr = ::std::option::Option::Some(value);
4242 self
4243 }
4244 #[must_use]
4246 pub fn email_purp(mut self, value: Max35Text) -> Contact13Builder {
4247 self.email_purp = ::std::option::Option::Some(value);
4248 self
4249 }
4250 #[must_use]
4252 pub fn job_titl(mut self, value: Max35Text) -> Contact13Builder {
4253 self.job_titl = ::std::option::Option::Some(value);
4254 self
4255 }
4256 #[must_use]
4258 pub fn rspnsblty(mut self, value: Max35Text) -> Contact13Builder {
4259 self.rspnsblty = ::std::option::Option::Some(value);
4260 self
4261 }
4262 #[must_use]
4264 pub fn dept(mut self, value: Max70Text) -> Contact13Builder {
4265 self.dept = ::std::option::Option::Some(value);
4266 self
4267 }
4268 #[must_use]
4270 pub fn othr(mut self, value: ::std::vec::Vec<OtherContact1>) -> Contact13Builder {
4271 self.othr = value;
4272 self
4273 }
4274 #[must_use]
4276 pub fn add_othr(mut self, value: OtherContact1) -> Contact13Builder {
4277 self.othr.push(value);
4278 self
4279 }
4280 #[must_use]
4282 pub fn prefrd_mtd(mut self, value: PreferredContactMethod2Code) -> Contact13Builder {
4283 self.prefrd_mtd = ::std::option::Option::Some(value);
4284 self
4285 }
4286 pub fn build(self) -> ::std::result::Result<Contact13, crate::common::BuilderError> {
4298 ::std::result::Result::Ok(Contact13 {
4299 nm_prfx: self.nm_prfx,
4300 nm: self.nm,
4301 phne_nb: self.phne_nb,
4302 mob_nb: self.mob_nb,
4303 fax_nb: self.fax_nb,
4304 url_adr: self.url_adr,
4305 email_adr: self.email_adr,
4306 email_purp: self.email_purp,
4307 job_titl: self.job_titl,
4308 rspnsblty: self.rspnsblty,
4309 dept: self.dept,
4310 othr: self.othr,
4311 prefrd_mtd: self.prefrd_mtd,
4312 })
4313 }
4314}
4315impl Contact13 {
4316 #[must_use]
4318 pub fn builder() -> Contact13Builder {
4319 Contact13Builder::default()
4320 }
4321}
4322#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4323pub struct CreditTransferMandateData1 {
4324 #[serde(rename = "MndtId")]
4325 #[serde(skip_serializing_if = "Option::is_none")]
4326 pub mndt_id: Option<Max35Text>,
4327 #[serde(rename = "Tp")]
4328 #[serde(skip_serializing_if = "Option::is_none")]
4329 pub tp: Option<MandateTypeInformation2>,
4330 #[serde(rename = "DtOfSgntr")]
4331 #[serde(skip_serializing_if = "Option::is_none")]
4332 pub dt_of_sgntr: Option<ISODate>,
4333 #[serde(rename = "DtOfVrfctn")]
4334 #[serde(skip_serializing_if = "Option::is_none")]
4335 pub dt_of_vrfctn: Option<ISODateTime>,
4336 #[serde(rename = "ElctrncSgntr")]
4337 #[serde(skip_serializing_if = "Option::is_none")]
4338 pub elctrnc_sgntr: Option<Max10KBinary>,
4339 #[serde(rename = "FrstPmtDt")]
4340 #[serde(skip_serializing_if = "Option::is_none")]
4341 pub frst_pmt_dt: Option<ISODate>,
4342 #[serde(rename = "FnlPmtDt")]
4343 #[serde(skip_serializing_if = "Option::is_none")]
4344 pub fnl_pmt_dt: Option<ISODate>,
4345 #[serde(rename = "Frqcy")]
4346 #[serde(skip_serializing_if = "Option::is_none")]
4347 pub frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
4348 #[serde(rename = "Rsn")]
4349 #[serde(skip_serializing_if = "Option::is_none")]
4350 pub rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
4351}
4352#[allow(clippy::struct_field_names)]
4354#[derive(Default)]
4355pub struct CreditTransferMandateData1Builder {
4356 mndt_id: ::std::option::Option<Max35Text>,
4357 tp: ::std::option::Option<MandateTypeInformation2>,
4358 dt_of_sgntr: ::std::option::Option<ISODate>,
4359 dt_of_vrfctn: ::std::option::Option<ISODateTime>,
4360 elctrnc_sgntr: ::std::option::Option<Max10KBinary>,
4361 frst_pmt_dt: ::std::option::Option<ISODate>,
4362 fnl_pmt_dt: ::std::option::Option<ISODate>,
4363 frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
4364 rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
4365}
4366impl CreditTransferMandateData1Builder {
4367 #[must_use]
4369 pub fn mndt_id(mut self, value: Max35Text) -> CreditTransferMandateData1Builder {
4370 self.mndt_id = ::std::option::Option::Some(value);
4371 self
4372 }
4373 #[must_use]
4375 pub fn tp(mut self, value: MandateTypeInformation2) -> CreditTransferMandateData1Builder {
4376 self.tp = ::std::option::Option::Some(value);
4377 self
4378 }
4379 #[must_use]
4381 pub fn dt_of_sgntr(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4382 self.dt_of_sgntr = ::std::option::Option::Some(value);
4383 self
4384 }
4385 #[must_use]
4387 pub fn dt_of_vrfctn(mut self, value: ISODateTime) -> CreditTransferMandateData1Builder {
4388 self.dt_of_vrfctn = ::std::option::Option::Some(value);
4389 self
4390 }
4391 #[must_use]
4393 pub fn elctrnc_sgntr(mut self, value: Max10KBinary) -> CreditTransferMandateData1Builder {
4394 self.elctrnc_sgntr = ::std::option::Option::Some(value);
4395 self
4396 }
4397 #[must_use]
4399 pub fn frst_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4400 self.frst_pmt_dt = ::std::option::Option::Some(value);
4401 self
4402 }
4403 #[must_use]
4405 pub fn fnl_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
4406 self.fnl_pmt_dt = ::std::option::Option::Some(value);
4407 self
4408 }
4409 #[must_use]
4411 pub fn frqcy(
4412 mut self,
4413 value: crate::common::ChoiceWrapper<Frequency36Choice>,
4414 ) -> CreditTransferMandateData1Builder {
4415 self.frqcy = ::std::option::Option::Some(value);
4416 self
4417 }
4418 #[must_use]
4420 pub fn rsn(
4421 mut self,
4422 value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
4423 ) -> CreditTransferMandateData1Builder {
4424 self.rsn = ::std::option::Option::Some(value);
4425 self
4426 }
4427 pub fn build(
4439 self,
4440 ) -> ::std::result::Result<CreditTransferMandateData1, crate::common::BuilderError> {
4441 ::std::result::Result::Ok(CreditTransferMandateData1 {
4442 mndt_id: self.mndt_id,
4443 tp: self.tp,
4444 dt_of_sgntr: self.dt_of_sgntr,
4445 dt_of_vrfctn: self.dt_of_vrfctn,
4446 elctrnc_sgntr: self.elctrnc_sgntr,
4447 frst_pmt_dt: self.frst_pmt_dt,
4448 fnl_pmt_dt: self.fnl_pmt_dt,
4449 frqcy: self.frqcy,
4450 rsn: self.rsn,
4451 })
4452 }
4453}
4454impl CreditTransferMandateData1 {
4455 #[must_use]
4457 pub fn builder() -> CreditTransferMandateData1Builder {
4458 CreditTransferMandateData1Builder::default()
4459 }
4460}
4461#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4462pub struct CreditTransferTransaction70 {
4463 #[serde(rename = "PmtId")]
4464 pub pmt_id: PaymentIdentification13,
4465 #[serde(rename = "PmtTpInf")]
4466 #[serde(skip_serializing_if = "Option::is_none")]
4467 pub pmt_tp_inf: Option<PaymentTypeInformation28>,
4468 #[serde(rename = "IntrBkSttlmAmt")]
4469 pub intr_bk_sttlm_amt: ActiveCurrencyAndAmount,
4470 #[serde(rename = "IntrBkSttlmDt")]
4471 #[serde(skip_serializing_if = "Option::is_none")]
4472 pub intr_bk_sttlm_dt: Option<ISODate>,
4473 #[serde(rename = "SttlmPrty")]
4474 #[serde(skip_serializing_if = "Option::is_none")]
4475 pub sttlm_prty: Option<Priority3Code>,
4476 #[serde(rename = "SttlmTmIndctn")]
4477 #[serde(skip_serializing_if = "Option::is_none")]
4478 pub sttlm_tm_indctn: Option<SettlementDateTimeIndication1>,
4479 #[serde(rename = "SttlmTmReq")]
4480 #[serde(skip_serializing_if = "Option::is_none")]
4481 pub sttlm_tm_req: Option<SettlementTimeRequest2>,
4482 #[serde(rename = "AddtlDtTm")]
4483 #[serde(skip_serializing_if = "Option::is_none")]
4484 pub addtl_dt_tm: Option<AdditionalDateTime1>,
4485 #[serde(rename = "InstdAmt")]
4486 #[serde(skip_serializing_if = "Option::is_none")]
4487 pub instd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
4488 #[serde(rename = "XchgRate")]
4489 #[serde(skip_serializing_if = "Option::is_none")]
4490 pub xchg_rate: Option<BaseOneRate>,
4491 #[serde(rename = "AgrdRate")]
4492 #[serde(skip_serializing_if = "Option::is_none")]
4493 pub agrd_rate: Option<CurrencyExchange26>,
4494 #[serde(rename = "ChrgBr")]
4495 pub chrg_br: ChargeBearerType1Code,
4496 #[serde(rename = "ChrgsInf")]
4497 #[serde(default)]
4498 #[serde(skip_serializing_if = "Vec::is_empty")]
4499 pub chrgs_inf: Vec<Charges16>,
4500 #[serde(rename = "MndtRltdInf")]
4501 #[serde(skip_serializing_if = "Option::is_none")]
4502 pub mndt_rltd_inf: Option<CreditTransferMandateData1>,
4503 #[serde(rename = "PmtSgntr")]
4504 #[serde(skip_serializing_if = "Option::is_none")]
4505 pub pmt_sgntr: Option<crate::common::ChoiceWrapper<CryptographicKey1Choice>>,
4506 #[serde(rename = "PrvsInstgAgt1")]
4507 #[serde(skip_serializing_if = "Option::is_none")]
4508 pub prvs_instg_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
4509 #[serde(rename = "PrvsInstgAgt1Acct")]
4510 #[serde(skip_serializing_if = "Option::is_none")]
4511 pub prvs_instg_agt1acct: Option<CashAccount40>,
4512 #[serde(rename = "PrvsInstgAgt2")]
4513 #[serde(skip_serializing_if = "Option::is_none")]
4514 pub prvs_instg_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
4515 #[serde(rename = "PrvsInstgAgt2Acct")]
4516 #[serde(skip_serializing_if = "Option::is_none")]
4517 pub prvs_instg_agt2acct: Option<CashAccount40>,
4518 #[serde(rename = "PrvsInstgAgt3")]
4519 #[serde(skip_serializing_if = "Option::is_none")]
4520 pub prvs_instg_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
4521 #[serde(rename = "PrvsInstgAgt3Acct")]
4522 #[serde(skip_serializing_if = "Option::is_none")]
4523 pub prvs_instg_agt3acct: Option<CashAccount40>,
4524 #[serde(rename = "InstgAgt")]
4525 #[serde(skip_serializing_if = "Option::is_none")]
4526 pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
4527 #[serde(rename = "InstdAgt")]
4528 #[serde(skip_serializing_if = "Option::is_none")]
4529 pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
4530 #[serde(rename = "IntrmyAgt1")]
4531 #[serde(skip_serializing_if = "Option::is_none")]
4532 pub intrmy_agt1: Option<BranchAndFinancialInstitutionIdentification8>,
4533 #[serde(rename = "IntrmyAgt1Acct")]
4534 #[serde(skip_serializing_if = "Option::is_none")]
4535 pub intrmy_agt1acct: Option<CashAccount40>,
4536 #[serde(rename = "IntrmyAgt2")]
4537 #[serde(skip_serializing_if = "Option::is_none")]
4538 pub intrmy_agt2: Option<BranchAndFinancialInstitutionIdentification8>,
4539 #[serde(rename = "IntrmyAgt2Acct")]
4540 #[serde(skip_serializing_if = "Option::is_none")]
4541 pub intrmy_agt2acct: Option<CashAccount40>,
4542 #[serde(rename = "IntrmyAgt3")]
4543 #[serde(skip_serializing_if = "Option::is_none")]
4544 pub intrmy_agt3: Option<BranchAndFinancialInstitutionIdentification8>,
4545 #[serde(rename = "IntrmyAgt3Acct")]
4546 #[serde(skip_serializing_if = "Option::is_none")]
4547 pub intrmy_agt3acct: Option<CashAccount40>,
4548 #[serde(rename = "UltmtDbtr")]
4549 #[serde(skip_serializing_if = "Option::is_none")]
4550 pub ultmt_dbtr: Option<PartyIdentification272>,
4551 #[serde(rename = "InitgPty")]
4552 #[serde(skip_serializing_if = "Option::is_none")]
4553 pub initg_pty: Option<PartyIdentification272>,
4554 #[serde(rename = "Dbtr")]
4555 pub dbtr: PartyIdentification272,
4556 #[serde(rename = "DbtrAcct")]
4557 #[serde(skip_serializing_if = "Option::is_none")]
4558 pub dbtr_acct: Option<CashAccount40>,
4559 #[serde(rename = "DbtrAgt")]
4560 pub dbtr_agt: BranchAndFinancialInstitutionIdentification8,
4561 #[serde(rename = "DbtrAgtAcct")]
4562 #[serde(skip_serializing_if = "Option::is_none")]
4563 pub dbtr_agt_acct: Option<CashAccount40>,
4564 #[serde(rename = "CdtrAgt")]
4565 pub cdtr_agt: BranchAndFinancialInstitutionIdentification8,
4566 #[serde(rename = "CdtrAgtAcct")]
4567 #[serde(skip_serializing_if = "Option::is_none")]
4568 pub cdtr_agt_acct: Option<CashAccount40>,
4569 #[serde(rename = "Cdtr")]
4570 pub cdtr: PartyIdentification272,
4571 #[serde(rename = "CdtrAcct")]
4572 #[serde(skip_serializing_if = "Option::is_none")]
4573 pub cdtr_acct: Option<CashAccount40>,
4574 #[serde(rename = "UltmtCdtr")]
4575 #[serde(skip_serializing_if = "Option::is_none")]
4576 pub ultmt_cdtr: Option<PartyIdentification272>,
4577 #[serde(rename = "InstrForCdtrAgt")]
4578 #[serde(default)]
4579 #[serde(skip_serializing_if = "Vec::is_empty")]
4580 pub instr_for_cdtr_agt: Vec<InstructionForCreditorAgent3>,
4581 #[serde(rename = "InstrForNxtAgt")]
4582 #[serde(default)]
4583 #[serde(skip_serializing_if = "Vec::is_empty")]
4584 pub instr_for_nxt_agt: Vec<InstructionForNextAgent1>,
4585 #[serde(rename = "Purp")]
4586 #[serde(skip_serializing_if = "Option::is_none")]
4587 pub purp: Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
4588 #[serde(rename = "RgltryRptg")]
4589 #[serde(default)]
4591 #[serde(skip_serializing_if = "Vec::is_empty")]
4592 pub rgltry_rptg: Vec<RegulatoryReporting3>,
4593 #[serde(rename = "Tax")]
4594 #[serde(skip_serializing_if = "Option::is_none")]
4595 pub tax: Option<TaxData1>,
4596 #[serde(rename = "RltdRmtInf")]
4597 #[serde(default)]
4599 #[serde(skip_serializing_if = "Vec::is_empty")]
4600 pub rltd_rmt_inf: Vec<RemittanceLocation8>,
4601 #[serde(rename = "RmtInf")]
4602 #[serde(skip_serializing_if = "Option::is_none")]
4603 pub rmt_inf: Option<RemittanceInformation22>,
4604 #[serde(rename = "SplmtryData")]
4605 #[serde(default)]
4606 #[serde(skip_serializing_if = "Vec::is_empty")]
4607 pub splmtry_data: Vec<SupplementaryData1>,
4608}
4609#[allow(clippy::struct_field_names)]
4611#[derive(Default)]
4612pub struct CreditTransferTransaction70Builder {
4613 pmt_id: ::std::option::Option<PaymentIdentification13>,
4614 pmt_tp_inf: ::std::option::Option<PaymentTypeInformation28>,
4615 intr_bk_sttlm_amt: ::std::option::Option<ActiveCurrencyAndAmount>,
4616 intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
4617 sttlm_prty: ::std::option::Option<Priority3Code>,
4618 sttlm_tm_indctn: ::std::option::Option<SettlementDateTimeIndication1>,
4619 sttlm_tm_req: ::std::option::Option<SettlementTimeRequest2>,
4620 addtl_dt_tm: ::std::option::Option<AdditionalDateTime1>,
4621 instd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4622 xchg_rate: ::std::option::Option<BaseOneRate>,
4623 agrd_rate: ::std::option::Option<CurrencyExchange26>,
4624 chrg_br: ::std::option::Option<ChargeBearerType1Code>,
4625 chrgs_inf: ::std::vec::Vec<Charges16>,
4626 mndt_rltd_inf: ::std::option::Option<CreditTransferMandateData1>,
4627 pmt_sgntr: ::std::option::Option<crate::common::ChoiceWrapper<CryptographicKey1Choice>>,
4628 prvs_instg_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4629 prvs_instg_agt1acct: ::std::option::Option<CashAccount40>,
4630 prvs_instg_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4631 prvs_instg_agt2acct: ::std::option::Option<CashAccount40>,
4632 prvs_instg_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4633 prvs_instg_agt3acct: ::std::option::Option<CashAccount40>,
4634 instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4635 instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4636 intrmy_agt1: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4637 intrmy_agt1acct: ::std::option::Option<CashAccount40>,
4638 intrmy_agt2: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4639 intrmy_agt2acct: ::std::option::Option<CashAccount40>,
4640 intrmy_agt3: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4641 intrmy_agt3acct: ::std::option::Option<CashAccount40>,
4642 ultmt_dbtr: ::std::option::Option<PartyIdentification272>,
4643 initg_pty: ::std::option::Option<PartyIdentification272>,
4644 dbtr: ::std::option::Option<PartyIdentification272>,
4645 dbtr_acct: ::std::option::Option<CashAccount40>,
4646 dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4647 dbtr_agt_acct: ::std::option::Option<CashAccount40>,
4648 cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
4649 cdtr_agt_acct: ::std::option::Option<CashAccount40>,
4650 cdtr: ::std::option::Option<PartyIdentification272>,
4651 cdtr_acct: ::std::option::Option<CashAccount40>,
4652 ultmt_cdtr: ::std::option::Option<PartyIdentification272>,
4653 instr_for_cdtr_agt: ::std::vec::Vec<InstructionForCreditorAgent3>,
4654 instr_for_nxt_agt: ::std::vec::Vec<InstructionForNextAgent1>,
4655 purp: ::std::option::Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
4656 rgltry_rptg: ::std::vec::Vec<RegulatoryReporting3>,
4657 tax: ::std::option::Option<TaxData1>,
4658 rltd_rmt_inf: ::std::vec::Vec<RemittanceLocation8>,
4659 rmt_inf: ::std::option::Option<RemittanceInformation22>,
4660 splmtry_data: ::std::vec::Vec<SupplementaryData1>,
4661}
4662impl CreditTransferTransaction70Builder {
4663 #[must_use]
4665 pub fn pmt_id(mut self, value: PaymentIdentification13) -> CreditTransferTransaction70Builder {
4666 self.pmt_id = ::std::option::Option::Some(value);
4667 self
4668 }
4669 #[must_use]
4671 pub fn pmt_tp_inf(
4672 mut self,
4673 value: PaymentTypeInformation28,
4674 ) -> CreditTransferTransaction70Builder {
4675 self.pmt_tp_inf = ::std::option::Option::Some(value);
4676 self
4677 }
4678 #[must_use]
4680 pub fn intr_bk_sttlm_amt(
4681 mut self,
4682 value: ActiveCurrencyAndAmount,
4683 ) -> CreditTransferTransaction70Builder {
4684 self.intr_bk_sttlm_amt = ::std::option::Option::Some(value);
4685 self
4686 }
4687 #[must_use]
4689 pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> CreditTransferTransaction70Builder {
4690 self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
4691 self
4692 }
4693 #[must_use]
4695 pub fn sttlm_prty(mut self, value: Priority3Code) -> CreditTransferTransaction70Builder {
4696 self.sttlm_prty = ::std::option::Option::Some(value);
4697 self
4698 }
4699 #[must_use]
4701 pub fn sttlm_tm_indctn(
4702 mut self,
4703 value: SettlementDateTimeIndication1,
4704 ) -> CreditTransferTransaction70Builder {
4705 self.sttlm_tm_indctn = ::std::option::Option::Some(value);
4706 self
4707 }
4708 #[must_use]
4710 pub fn sttlm_tm_req(
4711 mut self,
4712 value: SettlementTimeRequest2,
4713 ) -> CreditTransferTransaction70Builder {
4714 self.sttlm_tm_req = ::std::option::Option::Some(value);
4715 self
4716 }
4717 #[must_use]
4719 pub fn addtl_dt_tm(mut self, value: AdditionalDateTime1) -> CreditTransferTransaction70Builder {
4720 self.addtl_dt_tm = ::std::option::Option::Some(value);
4721 self
4722 }
4723 #[must_use]
4725 pub fn instd_amt(
4726 mut self,
4727 value: ActiveOrHistoricCurrencyAndAmount,
4728 ) -> CreditTransferTransaction70Builder {
4729 self.instd_amt = ::std::option::Option::Some(value);
4730 self
4731 }
4732 #[must_use]
4734 pub fn xchg_rate(mut self, value: BaseOneRate) -> CreditTransferTransaction70Builder {
4735 self.xchg_rate = ::std::option::Option::Some(value);
4736 self
4737 }
4738 #[must_use]
4740 pub fn agrd_rate(mut self, value: CurrencyExchange26) -> CreditTransferTransaction70Builder {
4741 self.agrd_rate = ::std::option::Option::Some(value);
4742 self
4743 }
4744 #[must_use]
4746 pub fn chrg_br(mut self, value: ChargeBearerType1Code) -> CreditTransferTransaction70Builder {
4747 self.chrg_br = ::std::option::Option::Some(value);
4748 self
4749 }
4750 #[must_use]
4752 pub fn chrgs_inf(
4753 mut self,
4754 value: ::std::vec::Vec<Charges16>,
4755 ) -> CreditTransferTransaction70Builder {
4756 self.chrgs_inf = value;
4757 self
4758 }
4759 #[must_use]
4761 pub fn add_chrgs_inf(mut self, value: Charges16) -> CreditTransferTransaction70Builder {
4762 self.chrgs_inf.push(value);
4763 self
4764 }
4765 #[must_use]
4767 pub fn mndt_rltd_inf(
4768 mut self,
4769 value: CreditTransferMandateData1,
4770 ) -> CreditTransferTransaction70Builder {
4771 self.mndt_rltd_inf = ::std::option::Option::Some(value);
4772 self
4773 }
4774 #[must_use]
4776 pub fn pmt_sgntr(
4777 mut self,
4778 value: crate::common::ChoiceWrapper<CryptographicKey1Choice>,
4779 ) -> CreditTransferTransaction70Builder {
4780 self.pmt_sgntr = ::std::option::Option::Some(value);
4781 self
4782 }
4783 #[must_use]
4785 pub fn prvs_instg_agt1(
4786 mut self,
4787 value: BranchAndFinancialInstitutionIdentification8,
4788 ) -> CreditTransferTransaction70Builder {
4789 self.prvs_instg_agt1 = ::std::option::Option::Some(value);
4790 self
4791 }
4792 #[must_use]
4794 pub fn prvs_instg_agt1acct(
4795 mut self,
4796 value: CashAccount40,
4797 ) -> CreditTransferTransaction70Builder {
4798 self.prvs_instg_agt1acct = ::std::option::Option::Some(value);
4799 self
4800 }
4801 #[must_use]
4803 pub fn prvs_instg_agt2(
4804 mut self,
4805 value: BranchAndFinancialInstitutionIdentification8,
4806 ) -> CreditTransferTransaction70Builder {
4807 self.prvs_instg_agt2 = ::std::option::Option::Some(value);
4808 self
4809 }
4810 #[must_use]
4812 pub fn prvs_instg_agt2acct(
4813 mut self,
4814 value: CashAccount40,
4815 ) -> CreditTransferTransaction70Builder {
4816 self.prvs_instg_agt2acct = ::std::option::Option::Some(value);
4817 self
4818 }
4819 #[must_use]
4821 pub fn prvs_instg_agt3(
4822 mut self,
4823 value: BranchAndFinancialInstitutionIdentification8,
4824 ) -> CreditTransferTransaction70Builder {
4825 self.prvs_instg_agt3 = ::std::option::Option::Some(value);
4826 self
4827 }
4828 #[must_use]
4830 pub fn prvs_instg_agt3acct(
4831 mut self,
4832 value: CashAccount40,
4833 ) -> CreditTransferTransaction70Builder {
4834 self.prvs_instg_agt3acct = ::std::option::Option::Some(value);
4835 self
4836 }
4837 #[must_use]
4839 pub fn instg_agt(
4840 mut self,
4841 value: BranchAndFinancialInstitutionIdentification8,
4842 ) -> CreditTransferTransaction70Builder {
4843 self.instg_agt = ::std::option::Option::Some(value);
4844 self
4845 }
4846 #[must_use]
4848 pub fn instd_agt(
4849 mut self,
4850 value: BranchAndFinancialInstitutionIdentification8,
4851 ) -> CreditTransferTransaction70Builder {
4852 self.instd_agt = ::std::option::Option::Some(value);
4853 self
4854 }
4855 #[must_use]
4857 pub fn intrmy_agt1(
4858 mut self,
4859 value: BranchAndFinancialInstitutionIdentification8,
4860 ) -> CreditTransferTransaction70Builder {
4861 self.intrmy_agt1 = ::std::option::Option::Some(value);
4862 self
4863 }
4864 #[must_use]
4866 pub fn intrmy_agt1acct(mut self, value: CashAccount40) -> CreditTransferTransaction70Builder {
4867 self.intrmy_agt1acct = ::std::option::Option::Some(value);
4868 self
4869 }
4870 #[must_use]
4872 pub fn intrmy_agt2(
4873 mut self,
4874 value: BranchAndFinancialInstitutionIdentification8,
4875 ) -> CreditTransferTransaction70Builder {
4876 self.intrmy_agt2 = ::std::option::Option::Some(value);
4877 self
4878 }
4879 #[must_use]
4881 pub fn intrmy_agt2acct(mut self, value: CashAccount40) -> CreditTransferTransaction70Builder {
4882 self.intrmy_agt2acct = ::std::option::Option::Some(value);
4883 self
4884 }
4885 #[must_use]
4887 pub fn intrmy_agt3(
4888 mut self,
4889 value: BranchAndFinancialInstitutionIdentification8,
4890 ) -> CreditTransferTransaction70Builder {
4891 self.intrmy_agt3 = ::std::option::Option::Some(value);
4892 self
4893 }
4894 #[must_use]
4896 pub fn intrmy_agt3acct(mut self, value: CashAccount40) -> CreditTransferTransaction70Builder {
4897 self.intrmy_agt3acct = ::std::option::Option::Some(value);
4898 self
4899 }
4900 #[must_use]
4902 pub fn ultmt_dbtr(
4903 mut self,
4904 value: PartyIdentification272,
4905 ) -> CreditTransferTransaction70Builder {
4906 self.ultmt_dbtr = ::std::option::Option::Some(value);
4907 self
4908 }
4909 #[must_use]
4911 pub fn initg_pty(
4912 mut self,
4913 value: PartyIdentification272,
4914 ) -> CreditTransferTransaction70Builder {
4915 self.initg_pty = ::std::option::Option::Some(value);
4916 self
4917 }
4918 #[must_use]
4920 pub fn dbtr(mut self, value: PartyIdentification272) -> CreditTransferTransaction70Builder {
4921 self.dbtr = ::std::option::Option::Some(value);
4922 self
4923 }
4924 #[must_use]
4926 pub fn dbtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction70Builder {
4927 self.dbtr_acct = ::std::option::Option::Some(value);
4928 self
4929 }
4930 #[must_use]
4932 pub fn dbtr_agt(
4933 mut self,
4934 value: BranchAndFinancialInstitutionIdentification8,
4935 ) -> CreditTransferTransaction70Builder {
4936 self.dbtr_agt = ::std::option::Option::Some(value);
4937 self
4938 }
4939 #[must_use]
4941 pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction70Builder {
4942 self.dbtr_agt_acct = ::std::option::Option::Some(value);
4943 self
4944 }
4945 #[must_use]
4947 pub fn cdtr_agt(
4948 mut self,
4949 value: BranchAndFinancialInstitutionIdentification8,
4950 ) -> CreditTransferTransaction70Builder {
4951 self.cdtr_agt = ::std::option::Option::Some(value);
4952 self
4953 }
4954 #[must_use]
4956 pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> CreditTransferTransaction70Builder {
4957 self.cdtr_agt_acct = ::std::option::Option::Some(value);
4958 self
4959 }
4960 #[must_use]
4962 pub fn cdtr(mut self, value: PartyIdentification272) -> CreditTransferTransaction70Builder {
4963 self.cdtr = ::std::option::Option::Some(value);
4964 self
4965 }
4966 #[must_use]
4968 pub fn cdtr_acct(mut self, value: CashAccount40) -> CreditTransferTransaction70Builder {
4969 self.cdtr_acct = ::std::option::Option::Some(value);
4970 self
4971 }
4972 #[must_use]
4974 pub fn ultmt_cdtr(
4975 mut self,
4976 value: PartyIdentification272,
4977 ) -> CreditTransferTransaction70Builder {
4978 self.ultmt_cdtr = ::std::option::Option::Some(value);
4979 self
4980 }
4981 #[must_use]
4983 pub fn instr_for_cdtr_agt(
4984 mut self,
4985 value: ::std::vec::Vec<InstructionForCreditorAgent3>,
4986 ) -> CreditTransferTransaction70Builder {
4987 self.instr_for_cdtr_agt = value;
4988 self
4989 }
4990 #[must_use]
4992 pub fn add_instr_for_cdtr_agt(
4993 mut self,
4994 value: InstructionForCreditorAgent3,
4995 ) -> CreditTransferTransaction70Builder {
4996 self.instr_for_cdtr_agt.push(value);
4997 self
4998 }
4999 #[must_use]
5001 pub fn instr_for_nxt_agt(
5002 mut self,
5003 value: ::std::vec::Vec<InstructionForNextAgent1>,
5004 ) -> CreditTransferTransaction70Builder {
5005 self.instr_for_nxt_agt = value;
5006 self
5007 }
5008 #[must_use]
5010 pub fn add_instr_for_nxt_agt(
5011 mut self,
5012 value: InstructionForNextAgent1,
5013 ) -> CreditTransferTransaction70Builder {
5014 self.instr_for_nxt_agt.push(value);
5015 self
5016 }
5017 #[must_use]
5019 pub fn purp(
5020 mut self,
5021 value: crate::common::ChoiceWrapper<Purpose2Choice>,
5022 ) -> CreditTransferTransaction70Builder {
5023 self.purp = ::std::option::Option::Some(value);
5024 self
5025 }
5026 #[must_use]
5028 pub fn rgltry_rptg(
5029 mut self,
5030 value: ::std::vec::Vec<RegulatoryReporting3>,
5031 ) -> CreditTransferTransaction70Builder {
5032 self.rgltry_rptg = value;
5033 self
5034 }
5035 #[must_use]
5037 pub fn add_rgltry_rptg(
5038 mut self,
5039 value: RegulatoryReporting3,
5040 ) -> CreditTransferTransaction70Builder {
5041 self.rgltry_rptg.push(value);
5042 self
5043 }
5044 #[must_use]
5046 pub fn tax(mut self, value: TaxData1) -> CreditTransferTransaction70Builder {
5047 self.tax = ::std::option::Option::Some(value);
5048 self
5049 }
5050 #[must_use]
5052 pub fn rltd_rmt_inf(
5053 mut self,
5054 value: ::std::vec::Vec<RemittanceLocation8>,
5055 ) -> CreditTransferTransaction70Builder {
5056 self.rltd_rmt_inf = value;
5057 self
5058 }
5059 #[must_use]
5061 pub fn add_rltd_rmt_inf(
5062 mut self,
5063 value: RemittanceLocation8,
5064 ) -> CreditTransferTransaction70Builder {
5065 self.rltd_rmt_inf.push(value);
5066 self
5067 }
5068 #[must_use]
5070 pub fn rmt_inf(mut self, value: RemittanceInformation22) -> CreditTransferTransaction70Builder {
5071 self.rmt_inf = ::std::option::Option::Some(value);
5072 self
5073 }
5074 #[must_use]
5076 pub fn splmtry_data(
5077 mut self,
5078 value: ::std::vec::Vec<SupplementaryData1>,
5079 ) -> CreditTransferTransaction70Builder {
5080 self.splmtry_data = value;
5081 self
5082 }
5083 #[must_use]
5085 pub fn add_splmtry_data(
5086 mut self,
5087 value: SupplementaryData1,
5088 ) -> CreditTransferTransaction70Builder {
5089 self.splmtry_data.push(value);
5090 self
5091 }
5092 pub fn build(
5104 self,
5105 ) -> ::std::result::Result<CreditTransferTransaction70, crate::common::BuilderError> {
5106 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5107 if self.pmt_id.is_none() {
5108 missing.push("pmt_id".to_owned());
5109 }
5110 if self.intr_bk_sttlm_amt.is_none() {
5111 missing.push("intr_bk_sttlm_amt".to_owned());
5112 }
5113 if self.chrg_br.is_none() {
5114 missing.push("chrg_br".to_owned());
5115 }
5116 if self.dbtr.is_none() {
5117 missing.push("dbtr".to_owned());
5118 }
5119 if self.dbtr_agt.is_none() {
5120 missing.push("dbtr_agt".to_owned());
5121 }
5122 if self.cdtr_agt.is_none() {
5123 missing.push("cdtr_agt".to_owned());
5124 }
5125 if self.cdtr.is_none() {
5126 missing.push("cdtr".to_owned());
5127 }
5128 if !missing.is_empty() {
5129 return ::std::result::Result::Err(crate::common::BuilderError {
5130 type_name: "CreditTransferTransaction70".to_owned(),
5131 missing_fields: missing,
5132 });
5133 }
5134 ::std::result::Result::Ok(CreditTransferTransaction70 {
5135 pmt_id: self.pmt_id.unwrap(),
5136 pmt_tp_inf: self.pmt_tp_inf,
5137 intr_bk_sttlm_amt: self.intr_bk_sttlm_amt.unwrap(),
5138 intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
5139 sttlm_prty: self.sttlm_prty,
5140 sttlm_tm_indctn: self.sttlm_tm_indctn,
5141 sttlm_tm_req: self.sttlm_tm_req,
5142 addtl_dt_tm: self.addtl_dt_tm,
5143 instd_amt: self.instd_amt,
5144 xchg_rate: self.xchg_rate,
5145 agrd_rate: self.agrd_rate,
5146 chrg_br: self.chrg_br.unwrap(),
5147 chrgs_inf: self.chrgs_inf,
5148 mndt_rltd_inf: self.mndt_rltd_inf,
5149 pmt_sgntr: self.pmt_sgntr,
5150 prvs_instg_agt1: self.prvs_instg_agt1,
5151 prvs_instg_agt1acct: self.prvs_instg_agt1acct,
5152 prvs_instg_agt2: self.prvs_instg_agt2,
5153 prvs_instg_agt2acct: self.prvs_instg_agt2acct,
5154 prvs_instg_agt3: self.prvs_instg_agt3,
5155 prvs_instg_agt3acct: self.prvs_instg_agt3acct,
5156 instg_agt: self.instg_agt,
5157 instd_agt: self.instd_agt,
5158 intrmy_agt1: self.intrmy_agt1,
5159 intrmy_agt1acct: self.intrmy_agt1acct,
5160 intrmy_agt2: self.intrmy_agt2,
5161 intrmy_agt2acct: self.intrmy_agt2acct,
5162 intrmy_agt3: self.intrmy_agt3,
5163 intrmy_agt3acct: self.intrmy_agt3acct,
5164 ultmt_dbtr: self.ultmt_dbtr,
5165 initg_pty: self.initg_pty,
5166 dbtr: self.dbtr.unwrap(),
5167 dbtr_acct: self.dbtr_acct,
5168 dbtr_agt: self.dbtr_agt.unwrap(),
5169 dbtr_agt_acct: self.dbtr_agt_acct,
5170 cdtr_agt: self.cdtr_agt.unwrap(),
5171 cdtr_agt_acct: self.cdtr_agt_acct,
5172 cdtr: self.cdtr.unwrap(),
5173 cdtr_acct: self.cdtr_acct,
5174 ultmt_cdtr: self.ultmt_cdtr,
5175 instr_for_cdtr_agt: self.instr_for_cdtr_agt,
5176 instr_for_nxt_agt: self.instr_for_nxt_agt,
5177 purp: self.purp,
5178 rgltry_rptg: self.rgltry_rptg,
5179 tax: self.tax,
5180 rltd_rmt_inf: self.rltd_rmt_inf,
5181 rmt_inf: self.rmt_inf,
5182 splmtry_data: self.splmtry_data,
5183 })
5184 }
5185}
5186impl CreditTransferTransaction70 {
5187 #[must_use]
5189 pub fn builder() -> CreditTransferTransaction70Builder {
5190 CreditTransferTransaction70Builder::default()
5191 }
5192}
5193#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5194pub struct CreditorReferenceInformation3 {
5195 #[serde(rename = "Tp")]
5196 #[serde(skip_serializing_if = "Option::is_none")]
5197 pub tp: Option<CreditorReferenceType3>,
5198 #[serde(rename = "Ref")]
5199 #[serde(skip_serializing_if = "Option::is_none")]
5200 pub r#ref: Option<Max35Text>,
5201}
5202#[allow(clippy::struct_field_names)]
5204#[derive(Default)]
5205pub struct CreditorReferenceInformation3Builder {
5206 tp: ::std::option::Option<CreditorReferenceType3>,
5207 r#ref: ::std::option::Option<Max35Text>,
5208}
5209impl CreditorReferenceInformation3Builder {
5210 #[must_use]
5212 pub fn tp(mut self, value: CreditorReferenceType3) -> CreditorReferenceInformation3Builder {
5213 self.tp = ::std::option::Option::Some(value);
5214 self
5215 }
5216 #[must_use]
5218 pub fn r#ref(mut self, value: Max35Text) -> CreditorReferenceInformation3Builder {
5219 self.r#ref = ::std::option::Option::Some(value);
5220 self
5221 }
5222 pub fn build(
5234 self,
5235 ) -> ::std::result::Result<CreditorReferenceInformation3, crate::common::BuilderError> {
5236 ::std::result::Result::Ok(CreditorReferenceInformation3 {
5237 tp: self.tp,
5238 r#ref: self.r#ref,
5239 })
5240 }
5241}
5242impl CreditorReferenceInformation3 {
5243 #[must_use]
5245 pub fn builder() -> CreditorReferenceInformation3Builder {
5246 CreditorReferenceInformation3Builder::default()
5247 }
5248}
5249#[allow(clippy::large_enum_variant)]
5250#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5251pub enum CreditorReferenceType2Choice {
5252 #[serde(rename = "Cd")]
5253 Cd(ExternalCreditorReferenceType1Code),
5254 #[serde(rename = "Prtry")]
5255 Prtry(Max35Text),
5256}
5257#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5258pub struct CreditorReferenceType3 {
5259 #[serde(rename = "CdOrPrtry")]
5260 pub cd_or_prtry: crate::common::ChoiceWrapper<CreditorReferenceType2Choice>,
5261 #[serde(rename = "Issr")]
5262 #[serde(skip_serializing_if = "Option::is_none")]
5263 pub issr: Option<Max35Text>,
5264}
5265#[allow(clippy::struct_field_names)]
5267#[derive(Default)]
5268pub struct CreditorReferenceType3Builder {
5269 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<CreditorReferenceType2Choice>>,
5270 issr: ::std::option::Option<Max35Text>,
5271}
5272impl CreditorReferenceType3Builder {
5273 #[must_use]
5275 pub fn cd_or_prtry(
5276 mut self,
5277 value: crate::common::ChoiceWrapper<CreditorReferenceType2Choice>,
5278 ) -> CreditorReferenceType3Builder {
5279 self.cd_or_prtry = ::std::option::Option::Some(value);
5280 self
5281 }
5282 #[must_use]
5284 pub fn issr(mut self, value: Max35Text) -> CreditorReferenceType3Builder {
5285 self.issr = ::std::option::Option::Some(value);
5286 self
5287 }
5288 pub fn build(
5300 self,
5301 ) -> ::std::result::Result<CreditorReferenceType3, crate::common::BuilderError> {
5302 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5303 if self.cd_or_prtry.is_none() {
5304 missing.push("cd_or_prtry".to_owned());
5305 }
5306 if !missing.is_empty() {
5307 return ::std::result::Result::Err(crate::common::BuilderError {
5308 type_name: "CreditorReferenceType3".to_owned(),
5309 missing_fields: missing,
5310 });
5311 }
5312 ::std::result::Result::Ok(CreditorReferenceType3 {
5313 cd_or_prtry: self.cd_or_prtry.unwrap(),
5314 issr: self.issr,
5315 })
5316 }
5317}
5318impl CreditorReferenceType3 {
5319 #[must_use]
5321 pub fn builder() -> CreditorReferenceType3Builder {
5322 CreditorReferenceType3Builder::default()
5323 }
5324}
5325#[allow(clippy::large_enum_variant)]
5326#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5327pub enum CryptographicKey1Choice {
5328 #[serde(rename = "ILPV4")]
5329 ILPV4(HexBinaryText),
5330 #[serde(rename = "Sgntr")]
5331 Sgntr(SHA256SignatureText),
5332}
5333#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5334pub struct CurrencyExchange26 {
5335 #[serde(rename = "UnitCcy")]
5336 #[serde(skip_serializing_if = "Option::is_none")]
5337 pub unit_ccy: Option<ActiveOrHistoricCurrencyCode>,
5338 #[serde(rename = "QtdCcy")]
5339 #[serde(skip_serializing_if = "Option::is_none")]
5340 pub qtd_ccy: Option<ActiveOrHistoricCurrencyCode>,
5341 #[serde(rename = "PreAgrdXchgRate")]
5342 pub pre_agrd_xchg_rate: BaseOneRate,
5343 #[serde(rename = "QtnDtTm")]
5344 #[serde(skip_serializing_if = "Option::is_none")]
5345 pub qtn_dt_tm: Option<ISODateTime>,
5346 #[serde(rename = "QtId")]
5347 #[serde(skip_serializing_if = "Option::is_none")]
5348 pub qt_id: Option<UUIDv4Identifier>,
5349 #[serde(rename = "FXAgt")]
5350 #[serde(skip_serializing_if = "Option::is_none")]
5351 pub fx_agt: Option<BranchAndFinancialInstitutionIdentification8>,
5352}
5353#[allow(clippy::struct_field_names)]
5355#[derive(Default)]
5356pub struct CurrencyExchange26Builder {
5357 unit_ccy: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
5358 qtd_ccy: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
5359 pre_agrd_xchg_rate: ::std::option::Option<BaseOneRate>,
5360 qtn_dt_tm: ::std::option::Option<ISODateTime>,
5361 qt_id: ::std::option::Option<UUIDv4Identifier>,
5362 fx_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
5363}
5364impl CurrencyExchange26Builder {
5365 #[must_use]
5367 pub fn unit_ccy(mut self, value: ActiveOrHistoricCurrencyCode) -> CurrencyExchange26Builder {
5368 self.unit_ccy = ::std::option::Option::Some(value);
5369 self
5370 }
5371 #[must_use]
5373 pub fn qtd_ccy(mut self, value: ActiveOrHistoricCurrencyCode) -> CurrencyExchange26Builder {
5374 self.qtd_ccy = ::std::option::Option::Some(value);
5375 self
5376 }
5377 #[must_use]
5379 pub fn pre_agrd_xchg_rate(mut self, value: BaseOneRate) -> CurrencyExchange26Builder {
5380 self.pre_agrd_xchg_rate = ::std::option::Option::Some(value);
5381 self
5382 }
5383 #[must_use]
5385 pub fn qtn_dt_tm(mut self, value: ISODateTime) -> CurrencyExchange26Builder {
5386 self.qtn_dt_tm = ::std::option::Option::Some(value);
5387 self
5388 }
5389 #[must_use]
5391 pub fn qt_id(mut self, value: UUIDv4Identifier) -> CurrencyExchange26Builder {
5392 self.qt_id = ::std::option::Option::Some(value);
5393 self
5394 }
5395 #[must_use]
5397 pub fn fx_agt(
5398 mut self,
5399 value: BranchAndFinancialInstitutionIdentification8,
5400 ) -> CurrencyExchange26Builder {
5401 self.fx_agt = ::std::option::Option::Some(value);
5402 self
5403 }
5404 pub fn build(self) -> ::std::result::Result<CurrencyExchange26, crate::common::BuilderError> {
5416 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5417 if self.pre_agrd_xchg_rate.is_none() {
5418 missing.push("pre_agrd_xchg_rate".to_owned());
5419 }
5420 if !missing.is_empty() {
5421 return ::std::result::Result::Err(crate::common::BuilderError {
5422 type_name: "CurrencyExchange26".to_owned(),
5423 missing_fields: missing,
5424 });
5425 }
5426 ::std::result::Result::Ok(CurrencyExchange26 {
5427 unit_ccy: self.unit_ccy,
5428 qtd_ccy: self.qtd_ccy,
5429 pre_agrd_xchg_rate: self.pre_agrd_xchg_rate.unwrap(),
5430 qtn_dt_tm: self.qtn_dt_tm,
5431 qt_id: self.qt_id,
5432 fx_agt: self.fx_agt,
5433 })
5434 }
5435}
5436impl CurrencyExchange26 {
5437 #[must_use]
5439 pub fn builder() -> CurrencyExchange26Builder {
5440 CurrencyExchange26Builder::default()
5441 }
5442}
5443#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5444pub struct DateAndPlaceOfBirth1 {
5445 #[serde(rename = "BirthDt")]
5446 pub birth_dt: ISODate,
5447 #[serde(rename = "PrvcOfBirth")]
5448 #[serde(skip_serializing_if = "Option::is_none")]
5449 pub prvc_of_birth: Option<Max35Text>,
5450 #[serde(rename = "CityOfBirth")]
5451 pub city_of_birth: Max35Text,
5452 #[serde(rename = "CtryOfBirth")]
5453 pub ctry_of_birth: CountryCode,
5454}
5455#[allow(clippy::struct_field_names)]
5457#[derive(Default)]
5458pub struct DateAndPlaceOfBirth1Builder {
5459 birth_dt: ::std::option::Option<ISODate>,
5460 prvc_of_birth: ::std::option::Option<Max35Text>,
5461 city_of_birth: ::std::option::Option<Max35Text>,
5462 ctry_of_birth: ::std::option::Option<CountryCode>,
5463}
5464impl DateAndPlaceOfBirth1Builder {
5465 #[must_use]
5467 pub fn birth_dt(mut self, value: ISODate) -> DateAndPlaceOfBirth1Builder {
5468 self.birth_dt = ::std::option::Option::Some(value);
5469 self
5470 }
5471 #[must_use]
5473 pub fn prvc_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
5474 self.prvc_of_birth = ::std::option::Option::Some(value);
5475 self
5476 }
5477 #[must_use]
5479 pub fn city_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
5480 self.city_of_birth = ::std::option::Option::Some(value);
5481 self
5482 }
5483 #[must_use]
5485 pub fn ctry_of_birth(mut self, value: CountryCode) -> DateAndPlaceOfBirth1Builder {
5486 self.ctry_of_birth = ::std::option::Option::Some(value);
5487 self
5488 }
5489 pub fn build(self) -> ::std::result::Result<DateAndPlaceOfBirth1, crate::common::BuilderError> {
5501 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5502 if self.birth_dt.is_none() {
5503 missing.push("birth_dt".to_owned());
5504 }
5505 if self.city_of_birth.is_none() {
5506 missing.push("city_of_birth".to_owned());
5507 }
5508 if self.ctry_of_birth.is_none() {
5509 missing.push("ctry_of_birth".to_owned());
5510 }
5511 if !missing.is_empty() {
5512 return ::std::result::Result::Err(crate::common::BuilderError {
5513 type_name: "DateAndPlaceOfBirth1".to_owned(),
5514 missing_fields: missing,
5515 });
5516 }
5517 ::std::result::Result::Ok(DateAndPlaceOfBirth1 {
5518 birth_dt: self.birth_dt.unwrap(),
5519 prvc_of_birth: self.prvc_of_birth,
5520 city_of_birth: self.city_of_birth.unwrap(),
5521 ctry_of_birth: self.ctry_of_birth.unwrap(),
5522 })
5523 }
5524}
5525impl DateAndPlaceOfBirth1 {
5526 #[must_use]
5528 pub fn builder() -> DateAndPlaceOfBirth1Builder {
5529 DateAndPlaceOfBirth1Builder::default()
5530 }
5531}
5532#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5533pub struct DateAndType1 {
5534 #[serde(rename = "Tp")]
5535 pub tp: crate::common::ChoiceWrapper<DateType2Choice>,
5536 #[serde(rename = "Dt")]
5537 pub dt: ISODate,
5538}
5539#[allow(clippy::struct_field_names)]
5541#[derive(Default)]
5542pub struct DateAndType1Builder {
5543 tp: ::std::option::Option<crate::common::ChoiceWrapper<DateType2Choice>>,
5544 dt: ::std::option::Option<ISODate>,
5545}
5546impl DateAndType1Builder {
5547 #[must_use]
5549 pub fn tp(
5550 mut self,
5551 value: crate::common::ChoiceWrapper<DateType2Choice>,
5552 ) -> DateAndType1Builder {
5553 self.tp = ::std::option::Option::Some(value);
5554 self
5555 }
5556 #[must_use]
5558 pub fn dt(mut self, value: ISODate) -> DateAndType1Builder {
5559 self.dt = ::std::option::Option::Some(value);
5560 self
5561 }
5562 pub fn build(self) -> ::std::result::Result<DateAndType1, crate::common::BuilderError> {
5574 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5575 if self.tp.is_none() {
5576 missing.push("tp".to_owned());
5577 }
5578 if self.dt.is_none() {
5579 missing.push("dt".to_owned());
5580 }
5581 if !missing.is_empty() {
5582 return ::std::result::Result::Err(crate::common::BuilderError {
5583 type_name: "DateAndType1".to_owned(),
5584 missing_fields: missing,
5585 });
5586 }
5587 ::std::result::Result::Ok(DateAndType1 {
5588 tp: self.tp.unwrap(),
5589 dt: self.dt.unwrap(),
5590 })
5591 }
5592}
5593impl DateAndType1 {
5594 #[must_use]
5596 pub fn builder() -> DateAndType1Builder {
5597 DateAndType1Builder::default()
5598 }
5599}
5600#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5601pub struct DatePeriod2 {
5602 #[serde(rename = "FrDt")]
5603 pub fr_dt: ISODate,
5604 #[serde(rename = "ToDt")]
5605 pub to_dt: ISODate,
5606}
5607#[allow(clippy::struct_field_names)]
5609#[derive(Default)]
5610pub struct DatePeriod2Builder {
5611 fr_dt: ::std::option::Option<ISODate>,
5612 to_dt: ::std::option::Option<ISODate>,
5613}
5614impl DatePeriod2Builder {
5615 #[must_use]
5617 pub fn fr_dt(mut self, value: ISODate) -> DatePeriod2Builder {
5618 self.fr_dt = ::std::option::Option::Some(value);
5619 self
5620 }
5621 #[must_use]
5623 pub fn to_dt(mut self, value: ISODate) -> DatePeriod2Builder {
5624 self.to_dt = ::std::option::Option::Some(value);
5625 self
5626 }
5627 pub fn build(self) -> ::std::result::Result<DatePeriod2, crate::common::BuilderError> {
5639 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5640 if self.fr_dt.is_none() {
5641 missing.push("fr_dt".to_owned());
5642 }
5643 if self.to_dt.is_none() {
5644 missing.push("to_dt".to_owned());
5645 }
5646 if !missing.is_empty() {
5647 return ::std::result::Result::Err(crate::common::BuilderError {
5648 type_name: "DatePeriod2".to_owned(),
5649 missing_fields: missing,
5650 });
5651 }
5652 ::std::result::Result::Ok(DatePeriod2 {
5653 fr_dt: self.fr_dt.unwrap(),
5654 to_dt: self.to_dt.unwrap(),
5655 })
5656 }
5657}
5658impl DatePeriod2 {
5659 #[must_use]
5661 pub fn builder() -> DatePeriod2Builder {
5662 DatePeriod2Builder::default()
5663 }
5664}
5665#[allow(clippy::large_enum_variant)]
5666#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5667pub enum DateType2Choice {
5668 #[serde(rename = "Cd")]
5669 Cd(ExternalDateType1Code),
5670 #[serde(rename = "Prtry")]
5671 Prtry(Max35Text),
5672}
5673#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5674pub struct Document {
5675 #[serde(rename = "FIToFICstmrCdtTrf")]
5676 pub fi_to_fi_cstmr_cdt_trf: FIToFICustomerCreditTransferV13,
5677}
5678#[allow(clippy::struct_field_names)]
5680#[derive(Default)]
5681pub struct DocumentBuilder {
5682 fi_to_fi_cstmr_cdt_trf: ::std::option::Option<FIToFICustomerCreditTransferV13>,
5683}
5684impl DocumentBuilder {
5685 #[must_use]
5687 pub fn fi_to_fi_cstmr_cdt_trf(
5688 mut self,
5689 value: FIToFICustomerCreditTransferV13,
5690 ) -> DocumentBuilder {
5691 self.fi_to_fi_cstmr_cdt_trf = ::std::option::Option::Some(value);
5692 self
5693 }
5694 pub fn build(self) -> ::std::result::Result<Document, crate::common::BuilderError> {
5706 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5707 if self.fi_to_fi_cstmr_cdt_trf.is_none() {
5708 missing.push("fi_to_fi_cstmr_cdt_trf".to_owned());
5709 }
5710 if !missing.is_empty() {
5711 return ::std::result::Result::Err(crate::common::BuilderError {
5712 type_name: "Document".to_owned(),
5713 missing_fields: missing,
5714 });
5715 }
5716 ::std::result::Result::Ok(Document {
5717 fi_to_fi_cstmr_cdt_trf: self.fi_to_fi_cstmr_cdt_trf.unwrap(),
5718 })
5719 }
5720}
5721impl Document {
5722 #[must_use]
5724 pub fn builder() -> DocumentBuilder {
5725 DocumentBuilder::default()
5726 }
5727}
5728#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5729pub struct DocumentAdjustment1 {
5730 #[serde(rename = "Amt")]
5731 pub amt: ActiveOrHistoricCurrencyAndAmount,
5732 #[serde(rename = "CdtDbtInd")]
5733 #[serde(skip_serializing_if = "Option::is_none")]
5734 pub cdt_dbt_ind: Option<CreditDebitCode>,
5735 #[serde(rename = "Rsn")]
5736 #[serde(skip_serializing_if = "Option::is_none")]
5737 pub rsn: Option<Max4Text>,
5738 #[serde(rename = "AddtlInf")]
5739 #[serde(skip_serializing_if = "Option::is_none")]
5740 pub addtl_inf: Option<Max140Text>,
5741}
5742#[allow(clippy::struct_field_names)]
5744#[derive(Default)]
5745pub struct DocumentAdjustment1Builder {
5746 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5747 cdt_dbt_ind: ::std::option::Option<CreditDebitCode>,
5748 rsn: ::std::option::Option<Max4Text>,
5749 addtl_inf: ::std::option::Option<Max140Text>,
5750}
5751impl DocumentAdjustment1Builder {
5752 #[must_use]
5754 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> DocumentAdjustment1Builder {
5755 self.amt = ::std::option::Option::Some(value);
5756 self
5757 }
5758 #[must_use]
5760 pub fn cdt_dbt_ind(mut self, value: CreditDebitCode) -> DocumentAdjustment1Builder {
5761 self.cdt_dbt_ind = ::std::option::Option::Some(value);
5762 self
5763 }
5764 #[must_use]
5766 pub fn rsn(mut self, value: Max4Text) -> DocumentAdjustment1Builder {
5767 self.rsn = ::std::option::Option::Some(value);
5768 self
5769 }
5770 #[must_use]
5772 pub fn addtl_inf(mut self, value: Max140Text) -> DocumentAdjustment1Builder {
5773 self.addtl_inf = ::std::option::Option::Some(value);
5774 self
5775 }
5776 pub fn build(self) -> ::std::result::Result<DocumentAdjustment1, crate::common::BuilderError> {
5788 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5789 if self.amt.is_none() {
5790 missing.push("amt".to_owned());
5791 }
5792 if !missing.is_empty() {
5793 return ::std::result::Result::Err(crate::common::BuilderError {
5794 type_name: "DocumentAdjustment1".to_owned(),
5795 missing_fields: missing,
5796 });
5797 }
5798 ::std::result::Result::Ok(DocumentAdjustment1 {
5799 amt: self.amt.unwrap(),
5800 cdt_dbt_ind: self.cdt_dbt_ind,
5801 rsn: self.rsn,
5802 addtl_inf: self.addtl_inf,
5803 })
5804 }
5805}
5806impl DocumentAdjustment1 {
5807 #[must_use]
5809 pub fn builder() -> DocumentAdjustment1Builder {
5810 DocumentAdjustment1Builder::default()
5811 }
5812}
5813#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5814pub struct DocumentAmount1 {
5815 #[serde(rename = "Tp")]
5816 pub tp: crate::common::ChoiceWrapper<DocumentAmountType1Choice>,
5817 #[serde(rename = "Amt")]
5818 pub amt: ActiveOrHistoricCurrencyAndAmount,
5819}
5820#[allow(clippy::struct_field_names)]
5822#[derive(Default)]
5823pub struct DocumentAmount1Builder {
5824 tp: ::std::option::Option<crate::common::ChoiceWrapper<DocumentAmountType1Choice>>,
5825 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
5826}
5827impl DocumentAmount1Builder {
5828 #[must_use]
5830 pub fn tp(
5831 mut self,
5832 value: crate::common::ChoiceWrapper<DocumentAmountType1Choice>,
5833 ) -> DocumentAmount1Builder {
5834 self.tp = ::std::option::Option::Some(value);
5835 self
5836 }
5837 #[must_use]
5839 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> DocumentAmount1Builder {
5840 self.amt = ::std::option::Option::Some(value);
5841 self
5842 }
5843 pub fn build(self) -> ::std::result::Result<DocumentAmount1, crate::common::BuilderError> {
5855 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5856 if self.tp.is_none() {
5857 missing.push("tp".to_owned());
5858 }
5859 if self.amt.is_none() {
5860 missing.push("amt".to_owned());
5861 }
5862 if !missing.is_empty() {
5863 return ::std::result::Result::Err(crate::common::BuilderError {
5864 type_name: "DocumentAmount1".to_owned(),
5865 missing_fields: missing,
5866 });
5867 }
5868 ::std::result::Result::Ok(DocumentAmount1 {
5869 tp: self.tp.unwrap(),
5870 amt: self.amt.unwrap(),
5871 })
5872 }
5873}
5874impl DocumentAmount1 {
5875 #[must_use]
5877 pub fn builder() -> DocumentAmount1Builder {
5878 DocumentAmount1Builder::default()
5879 }
5880}
5881#[allow(clippy::large_enum_variant)]
5882#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5883pub enum DocumentAmountType1Choice {
5884 #[serde(rename = "Cd")]
5885 Cd(ExternalDocumentAmountType1Code),
5886 #[serde(rename = "Prtry")]
5887 Prtry(Max35Text),
5888}
5889#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5890pub struct DocumentLineIdentification1 {
5891 #[serde(rename = "Tp")]
5892 #[serde(skip_serializing_if = "Option::is_none")]
5893 pub tp: Option<DocumentLineType1>,
5894 #[serde(rename = "Nb")]
5895 #[serde(skip_serializing_if = "Option::is_none")]
5896 pub nb: Option<Max35Text>,
5897 #[serde(rename = "RltdDt")]
5898 #[serde(skip_serializing_if = "Option::is_none")]
5899 pub rltd_dt: Option<ISODate>,
5900}
5901#[allow(clippy::struct_field_names)]
5903#[derive(Default)]
5904pub struct DocumentLineIdentification1Builder {
5905 tp: ::std::option::Option<DocumentLineType1>,
5906 nb: ::std::option::Option<Max35Text>,
5907 rltd_dt: ::std::option::Option<ISODate>,
5908}
5909impl DocumentLineIdentification1Builder {
5910 #[must_use]
5912 pub fn tp(mut self, value: DocumentLineType1) -> DocumentLineIdentification1Builder {
5913 self.tp = ::std::option::Option::Some(value);
5914 self
5915 }
5916 #[must_use]
5918 pub fn nb(mut self, value: Max35Text) -> DocumentLineIdentification1Builder {
5919 self.nb = ::std::option::Option::Some(value);
5920 self
5921 }
5922 #[must_use]
5924 pub fn rltd_dt(mut self, value: ISODate) -> DocumentLineIdentification1Builder {
5925 self.rltd_dt = ::std::option::Option::Some(value);
5926 self
5927 }
5928 pub fn build(
5940 self,
5941 ) -> ::std::result::Result<DocumentLineIdentification1, crate::common::BuilderError> {
5942 ::std::result::Result::Ok(DocumentLineIdentification1 {
5943 tp: self.tp,
5944 nb: self.nb,
5945 rltd_dt: self.rltd_dt,
5946 })
5947 }
5948}
5949impl DocumentLineIdentification1 {
5950 #[must_use]
5952 pub fn builder() -> DocumentLineIdentification1Builder {
5953 DocumentLineIdentification1Builder::default()
5954 }
5955}
5956#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5957pub struct DocumentLineInformation2 {
5958 #[serde(rename = "Id")]
5959 #[serde(default)]
5960 #[serde(skip_serializing_if = "Vec::is_empty")]
5961 pub id: Vec<DocumentLineIdentification1>,
5962 #[serde(rename = "Desc")]
5963 #[serde(skip_serializing_if = "Option::is_none")]
5964 pub desc: Option<Max2048Text>,
5965 #[serde(rename = "Amt")]
5966 #[serde(skip_serializing_if = "Option::is_none")]
5967 pub amt: Option<RemittanceAmount4>,
5968}
5969#[allow(clippy::struct_field_names)]
5971#[derive(Default)]
5972pub struct DocumentLineInformation2Builder {
5973 id: ::std::vec::Vec<DocumentLineIdentification1>,
5974 desc: ::std::option::Option<Max2048Text>,
5975 amt: ::std::option::Option<RemittanceAmount4>,
5976}
5977impl DocumentLineInformation2Builder {
5978 #[must_use]
5980 pub fn id(
5981 mut self,
5982 value: ::std::vec::Vec<DocumentLineIdentification1>,
5983 ) -> DocumentLineInformation2Builder {
5984 self.id = value;
5985 self
5986 }
5987 #[must_use]
5989 pub fn add_id(mut self, value: DocumentLineIdentification1) -> DocumentLineInformation2Builder {
5990 self.id.push(value);
5991 self
5992 }
5993 #[must_use]
5995 pub fn desc(mut self, value: Max2048Text) -> DocumentLineInformation2Builder {
5996 self.desc = ::std::option::Option::Some(value);
5997 self
5998 }
5999 #[must_use]
6001 pub fn amt(mut self, value: RemittanceAmount4) -> DocumentLineInformation2Builder {
6002 self.amt = ::std::option::Option::Some(value);
6003 self
6004 }
6005 pub fn build(
6017 self,
6018 ) -> ::std::result::Result<DocumentLineInformation2, crate::common::BuilderError> {
6019 ::std::result::Result::Ok(DocumentLineInformation2 {
6020 id: self.id,
6021 desc: self.desc,
6022 amt: self.amt,
6023 })
6024 }
6025}
6026impl DocumentLineInformation2 {
6027 #[must_use]
6029 pub fn builder() -> DocumentLineInformation2Builder {
6030 DocumentLineInformation2Builder::default()
6031 }
6032}
6033#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6034pub struct DocumentLineType1 {
6035 #[serde(rename = "CdOrPrtry")]
6036 pub cd_or_prtry: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
6037 #[serde(rename = "Issr")]
6038 #[serde(skip_serializing_if = "Option::is_none")]
6039 pub issr: Option<Max35Text>,
6040}
6041#[allow(clippy::struct_field_names)]
6043#[derive(Default)]
6044pub struct DocumentLineType1Builder {
6045 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<DocumentLineType1Choice>>,
6046 issr: ::std::option::Option<Max35Text>,
6047}
6048impl DocumentLineType1Builder {
6049 #[must_use]
6051 pub fn cd_or_prtry(
6052 mut self,
6053 value: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
6054 ) -> DocumentLineType1Builder {
6055 self.cd_or_prtry = ::std::option::Option::Some(value);
6056 self
6057 }
6058 #[must_use]
6060 pub fn issr(mut self, value: Max35Text) -> DocumentLineType1Builder {
6061 self.issr = ::std::option::Option::Some(value);
6062 self
6063 }
6064 pub fn build(self) -> ::std::result::Result<DocumentLineType1, crate::common::BuilderError> {
6076 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6077 if self.cd_or_prtry.is_none() {
6078 missing.push("cd_or_prtry".to_owned());
6079 }
6080 if !missing.is_empty() {
6081 return ::std::result::Result::Err(crate::common::BuilderError {
6082 type_name: "DocumentLineType1".to_owned(),
6083 missing_fields: missing,
6084 });
6085 }
6086 ::std::result::Result::Ok(DocumentLineType1 {
6087 cd_or_prtry: self.cd_or_prtry.unwrap(),
6088 issr: self.issr,
6089 })
6090 }
6091}
6092impl DocumentLineType1 {
6093 #[must_use]
6095 pub fn builder() -> DocumentLineType1Builder {
6096 DocumentLineType1Builder::default()
6097 }
6098}
6099#[allow(clippy::large_enum_variant)]
6100#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6101pub enum DocumentLineType1Choice {
6102 #[serde(rename = "Cd")]
6103 Cd(ExternalDocumentLineType1Code),
6104 #[serde(rename = "Prtry")]
6105 Prtry(Max35Text),
6106}
6107#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6108pub struct DocumentType1 {
6109 #[serde(rename = "CdOrPrtry")]
6110 pub cd_or_prtry: crate::common::ChoiceWrapper<DocumentType2Choice>,
6111 #[serde(rename = "Issr")]
6112 #[serde(skip_serializing_if = "Option::is_none")]
6113 pub issr: Option<Max35Text>,
6114}
6115#[allow(clippy::struct_field_names)]
6117#[derive(Default)]
6118pub struct DocumentType1Builder {
6119 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<DocumentType2Choice>>,
6120 issr: ::std::option::Option<Max35Text>,
6121}
6122impl DocumentType1Builder {
6123 #[must_use]
6125 pub fn cd_or_prtry(
6126 mut self,
6127 value: crate::common::ChoiceWrapper<DocumentType2Choice>,
6128 ) -> DocumentType1Builder {
6129 self.cd_or_prtry = ::std::option::Option::Some(value);
6130 self
6131 }
6132 #[must_use]
6134 pub fn issr(mut self, value: Max35Text) -> DocumentType1Builder {
6135 self.issr = ::std::option::Option::Some(value);
6136 self
6137 }
6138 pub fn build(self) -> ::std::result::Result<DocumentType1, crate::common::BuilderError> {
6150 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6151 if self.cd_or_prtry.is_none() {
6152 missing.push("cd_or_prtry".to_owned());
6153 }
6154 if !missing.is_empty() {
6155 return ::std::result::Result::Err(crate::common::BuilderError {
6156 type_name: "DocumentType1".to_owned(),
6157 missing_fields: missing,
6158 });
6159 }
6160 ::std::result::Result::Ok(DocumentType1 {
6161 cd_or_prtry: self.cd_or_prtry.unwrap(),
6162 issr: self.issr,
6163 })
6164 }
6165}
6166impl DocumentType1 {
6167 #[must_use]
6169 pub fn builder() -> DocumentType1Builder {
6170 DocumentType1Builder::default()
6171 }
6172}
6173#[allow(clippy::large_enum_variant)]
6174#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6175pub enum DocumentType2Choice {
6176 #[serde(rename = "Cd")]
6177 Cd(ExternalDocumentType1Code),
6178 #[serde(rename = "Prtry")]
6179 Prtry(Max35Text),
6180}
6181#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6182pub struct FIToFICustomerCreditTransferV13 {
6183 #[serde(rename = "GrpHdr")]
6184 pub grp_hdr: GroupHeader131,
6185 #[serde(rename = "CdtTrfTxInf")]
6186 #[serde(default)]
6187 #[serde(skip_serializing_if = "Vec::is_empty")]
6188 pub cdt_trf_tx_inf: Vec<CreditTransferTransaction70>,
6189 #[serde(rename = "SplmtryData")]
6190 #[serde(default)]
6191 #[serde(skip_serializing_if = "Vec::is_empty")]
6192 pub splmtry_data: Vec<SupplementaryData1>,
6193}
6194#[allow(clippy::struct_field_names)]
6196#[derive(Default)]
6197pub struct FIToFICustomerCreditTransferV13Builder {
6198 grp_hdr: ::std::option::Option<GroupHeader131>,
6199 cdt_trf_tx_inf: ::std::vec::Vec<CreditTransferTransaction70>,
6200 splmtry_data: ::std::vec::Vec<SupplementaryData1>,
6201}
6202impl FIToFICustomerCreditTransferV13Builder {
6203 #[must_use]
6205 pub fn grp_hdr(mut self, value: GroupHeader131) -> FIToFICustomerCreditTransferV13Builder {
6206 self.grp_hdr = ::std::option::Option::Some(value);
6207 self
6208 }
6209 #[must_use]
6211 pub fn cdt_trf_tx_inf(
6212 mut self,
6213 value: ::std::vec::Vec<CreditTransferTransaction70>,
6214 ) -> FIToFICustomerCreditTransferV13Builder {
6215 self.cdt_trf_tx_inf = value;
6216 self
6217 }
6218 #[must_use]
6220 pub fn add_cdt_trf_tx_inf(
6221 mut self,
6222 value: CreditTransferTransaction70,
6223 ) -> FIToFICustomerCreditTransferV13Builder {
6224 self.cdt_trf_tx_inf.push(value);
6225 self
6226 }
6227 #[must_use]
6229 pub fn splmtry_data(
6230 mut self,
6231 value: ::std::vec::Vec<SupplementaryData1>,
6232 ) -> FIToFICustomerCreditTransferV13Builder {
6233 self.splmtry_data = value;
6234 self
6235 }
6236 #[must_use]
6238 pub fn add_splmtry_data(
6239 mut self,
6240 value: SupplementaryData1,
6241 ) -> FIToFICustomerCreditTransferV13Builder {
6242 self.splmtry_data.push(value);
6243 self
6244 }
6245 pub fn build(
6257 self,
6258 ) -> ::std::result::Result<FIToFICustomerCreditTransferV13, crate::common::BuilderError> {
6259 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6260 if self.grp_hdr.is_none() {
6261 missing.push("grp_hdr".to_owned());
6262 }
6263 if !missing.is_empty() {
6264 return ::std::result::Result::Err(crate::common::BuilderError {
6265 type_name: "FIToFICustomerCreditTransferV13".to_owned(),
6266 missing_fields: missing,
6267 });
6268 }
6269 ::std::result::Result::Ok(FIToFICustomerCreditTransferV13 {
6270 grp_hdr: self.grp_hdr.unwrap(),
6271 cdt_trf_tx_inf: self.cdt_trf_tx_inf,
6272 splmtry_data: self.splmtry_data,
6273 })
6274 }
6275}
6276impl FIToFICustomerCreditTransferV13 {
6277 #[must_use]
6279 pub fn builder() -> FIToFICustomerCreditTransferV13Builder {
6280 FIToFICustomerCreditTransferV13Builder::default()
6281 }
6282}
6283#[allow(clippy::large_enum_variant)]
6284#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6285pub enum FinancialIdentificationSchemeName1Choice {
6286 #[serde(rename = "Cd")]
6287 Cd(ExternalFinancialInstitutionIdentification1Code),
6288 #[serde(rename = "Prtry")]
6289 Prtry(Max35Text),
6290}
6291#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6292pub struct FinancialInstitutionIdentification23 {
6293 #[serde(rename = "BICFI")]
6294 #[serde(skip_serializing_if = "Option::is_none")]
6295 pub bicfi: Option<BICFIDec2014Identifier>,
6296 #[serde(rename = "ClrSysMmbId")]
6297 #[serde(skip_serializing_if = "Option::is_none")]
6298 pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
6299 #[serde(rename = "LEI")]
6300 #[serde(skip_serializing_if = "Option::is_none")]
6301 pub lei: Option<LEIIdentifier>,
6302 #[serde(rename = "Nm")]
6303 #[serde(skip_serializing_if = "Option::is_none")]
6304 pub nm: Option<Max140Text>,
6305 #[serde(rename = "PstlAdr")]
6306 #[serde(skip_serializing_if = "Option::is_none")]
6307 pub pstl_adr: Option<PostalAddress27>,
6308 #[serde(rename = "Othr")]
6309 #[serde(skip_serializing_if = "Option::is_none")]
6310 pub othr: Option<GenericFinancialIdentification1>,
6311}
6312#[allow(clippy::struct_field_names)]
6314#[derive(Default)]
6315pub struct FinancialInstitutionIdentification23Builder {
6316 bicfi: ::std::option::Option<BICFIDec2014Identifier>,
6317 clr_sys_mmb_id: ::std::option::Option<ClearingSystemMemberIdentification2>,
6318 lei: ::std::option::Option<LEIIdentifier>,
6319 nm: ::std::option::Option<Max140Text>,
6320 pstl_adr: ::std::option::Option<PostalAddress27>,
6321 othr: ::std::option::Option<GenericFinancialIdentification1>,
6322}
6323impl FinancialInstitutionIdentification23Builder {
6324 #[must_use]
6326 pub fn bicfi(
6327 mut self,
6328 value: BICFIDec2014Identifier,
6329 ) -> FinancialInstitutionIdentification23Builder {
6330 self.bicfi = ::std::option::Option::Some(value);
6331 self
6332 }
6333 #[must_use]
6335 pub fn clr_sys_mmb_id(
6336 mut self,
6337 value: ClearingSystemMemberIdentification2,
6338 ) -> FinancialInstitutionIdentification23Builder {
6339 self.clr_sys_mmb_id = ::std::option::Option::Some(value);
6340 self
6341 }
6342 #[must_use]
6344 pub fn lei(mut self, value: LEIIdentifier) -> FinancialInstitutionIdentification23Builder {
6345 self.lei = ::std::option::Option::Some(value);
6346 self
6347 }
6348 #[must_use]
6350 pub fn nm(mut self, value: Max140Text) -> FinancialInstitutionIdentification23Builder {
6351 self.nm = ::std::option::Option::Some(value);
6352 self
6353 }
6354 #[must_use]
6356 pub fn pstl_adr(
6357 mut self,
6358 value: PostalAddress27,
6359 ) -> FinancialInstitutionIdentification23Builder {
6360 self.pstl_adr = ::std::option::Option::Some(value);
6361 self
6362 }
6363 #[must_use]
6365 pub fn othr(
6366 mut self,
6367 value: GenericFinancialIdentification1,
6368 ) -> FinancialInstitutionIdentification23Builder {
6369 self.othr = ::std::option::Option::Some(value);
6370 self
6371 }
6372 pub fn build(
6384 self,
6385 ) -> ::std::result::Result<FinancialInstitutionIdentification23, crate::common::BuilderError>
6386 {
6387 ::std::result::Result::Ok(FinancialInstitutionIdentification23 {
6388 bicfi: self.bicfi,
6389 clr_sys_mmb_id: self.clr_sys_mmb_id,
6390 lei: self.lei,
6391 nm: self.nm,
6392 pstl_adr: self.pstl_adr,
6393 othr: self.othr,
6394 })
6395 }
6396}
6397impl FinancialInstitutionIdentification23 {
6398 #[must_use]
6400 pub fn builder() -> FinancialInstitutionIdentification23Builder {
6401 FinancialInstitutionIdentification23Builder::default()
6402 }
6403}
6404#[allow(clippy::large_enum_variant)]
6405#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6406pub enum Frequency36Choice {
6407 #[serde(rename = "Tp")]
6408 Tp(Frequency6Code),
6409 #[serde(rename = "Prd")]
6410 Prd(FrequencyPeriod1),
6411 #[serde(rename = "PtInTm")]
6412 PtInTm(FrequencyAndMoment1),
6413}
6414#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6415pub struct FrequencyAndMoment1 {
6416 #[serde(rename = "Tp")]
6417 pub tp: Frequency6Code,
6418 #[serde(rename = "PtInTm")]
6419 pub pt_in_tm: Exact2NumericText,
6420}
6421#[allow(clippy::struct_field_names)]
6423#[derive(Default)]
6424pub struct FrequencyAndMoment1Builder {
6425 tp: ::std::option::Option<Frequency6Code>,
6426 pt_in_tm: ::std::option::Option<Exact2NumericText>,
6427}
6428impl FrequencyAndMoment1Builder {
6429 #[must_use]
6431 pub fn tp(mut self, value: Frequency6Code) -> FrequencyAndMoment1Builder {
6432 self.tp = ::std::option::Option::Some(value);
6433 self
6434 }
6435 #[must_use]
6437 pub fn pt_in_tm(mut self, value: Exact2NumericText) -> FrequencyAndMoment1Builder {
6438 self.pt_in_tm = ::std::option::Option::Some(value);
6439 self
6440 }
6441 pub fn build(self) -> ::std::result::Result<FrequencyAndMoment1, crate::common::BuilderError> {
6453 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6454 if self.tp.is_none() {
6455 missing.push("tp".to_owned());
6456 }
6457 if self.pt_in_tm.is_none() {
6458 missing.push("pt_in_tm".to_owned());
6459 }
6460 if !missing.is_empty() {
6461 return ::std::result::Result::Err(crate::common::BuilderError {
6462 type_name: "FrequencyAndMoment1".to_owned(),
6463 missing_fields: missing,
6464 });
6465 }
6466 ::std::result::Result::Ok(FrequencyAndMoment1 {
6467 tp: self.tp.unwrap(),
6468 pt_in_tm: self.pt_in_tm.unwrap(),
6469 })
6470 }
6471}
6472impl FrequencyAndMoment1 {
6473 #[must_use]
6475 pub fn builder() -> FrequencyAndMoment1Builder {
6476 FrequencyAndMoment1Builder::default()
6477 }
6478}
6479#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6480pub struct FrequencyPeriod1 {
6481 #[serde(rename = "Tp")]
6482 pub tp: Frequency6Code,
6483 #[serde(rename = "CntPerPrd")]
6484 pub cnt_per_prd: DecimalNumber,
6485}
6486#[allow(clippy::struct_field_names)]
6488#[derive(Default)]
6489pub struct FrequencyPeriod1Builder {
6490 tp: ::std::option::Option<Frequency6Code>,
6491 cnt_per_prd: ::std::option::Option<DecimalNumber>,
6492}
6493impl FrequencyPeriod1Builder {
6494 #[must_use]
6496 pub fn tp(mut self, value: Frequency6Code) -> FrequencyPeriod1Builder {
6497 self.tp = ::std::option::Option::Some(value);
6498 self
6499 }
6500 #[must_use]
6502 pub fn cnt_per_prd(mut self, value: DecimalNumber) -> FrequencyPeriod1Builder {
6503 self.cnt_per_prd = ::std::option::Option::Some(value);
6504 self
6505 }
6506 pub fn build(self) -> ::std::result::Result<FrequencyPeriod1, crate::common::BuilderError> {
6518 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6519 if self.tp.is_none() {
6520 missing.push("tp".to_owned());
6521 }
6522 if self.cnt_per_prd.is_none() {
6523 missing.push("cnt_per_prd".to_owned());
6524 }
6525 if !missing.is_empty() {
6526 return ::std::result::Result::Err(crate::common::BuilderError {
6527 type_name: "FrequencyPeriod1".to_owned(),
6528 missing_fields: missing,
6529 });
6530 }
6531 ::std::result::Result::Ok(FrequencyPeriod1 {
6532 tp: self.tp.unwrap(),
6533 cnt_per_prd: self.cnt_per_prd.unwrap(),
6534 })
6535 }
6536}
6537impl FrequencyPeriod1 {
6538 #[must_use]
6540 pub fn builder() -> FrequencyPeriod1Builder {
6541 FrequencyPeriod1Builder::default()
6542 }
6543}
6544#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6545pub struct Garnishment4 {
6546 #[serde(rename = "Tp")]
6547 pub tp: GarnishmentType1,
6548 #[serde(rename = "Grnshee")]
6549 #[serde(skip_serializing_if = "Option::is_none")]
6550 pub grnshee: Option<PartyIdentification272>,
6551 #[serde(rename = "GrnshmtAdmstr")]
6552 #[serde(skip_serializing_if = "Option::is_none")]
6553 pub grnshmt_admstr: Option<PartyIdentification272>,
6554 #[serde(rename = "RefNb")]
6555 #[serde(skip_serializing_if = "Option::is_none")]
6556 pub ref_nb: Option<Max140Text>,
6557 #[serde(rename = "Dt")]
6558 #[serde(skip_serializing_if = "Option::is_none")]
6559 pub dt: Option<ISODate>,
6560 #[serde(rename = "RmtdAmt")]
6561 #[serde(skip_serializing_if = "Option::is_none")]
6562 pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
6563 #[serde(rename = "FmlyMdclInsrncInd")]
6564 #[serde(skip_serializing_if = "Option::is_none")]
6565 pub fmly_mdcl_insrnc_ind: Option<TrueFalseIndicator>,
6566 #[serde(rename = "MplyeeTermntnInd")]
6567 #[serde(skip_serializing_if = "Option::is_none")]
6568 pub mplyee_termntn_ind: Option<TrueFalseIndicator>,
6569}
6570#[allow(clippy::struct_field_names)]
6572#[derive(Default)]
6573pub struct Garnishment4Builder {
6574 tp: ::std::option::Option<GarnishmentType1>,
6575 grnshee: ::std::option::Option<PartyIdentification272>,
6576 grnshmt_admstr: ::std::option::Option<PartyIdentification272>,
6577 ref_nb: ::std::option::Option<Max140Text>,
6578 dt: ::std::option::Option<ISODate>,
6579 rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
6580 fmly_mdcl_insrnc_ind: ::std::option::Option<TrueFalseIndicator>,
6581 mplyee_termntn_ind: ::std::option::Option<TrueFalseIndicator>,
6582}
6583impl Garnishment4Builder {
6584 #[must_use]
6586 pub fn tp(mut self, value: GarnishmentType1) -> Garnishment4Builder {
6587 self.tp = ::std::option::Option::Some(value);
6588 self
6589 }
6590 #[must_use]
6592 pub fn grnshee(mut self, value: PartyIdentification272) -> Garnishment4Builder {
6593 self.grnshee = ::std::option::Option::Some(value);
6594 self
6595 }
6596 #[must_use]
6598 pub fn grnshmt_admstr(mut self, value: PartyIdentification272) -> Garnishment4Builder {
6599 self.grnshmt_admstr = ::std::option::Option::Some(value);
6600 self
6601 }
6602 #[must_use]
6604 pub fn ref_nb(mut self, value: Max140Text) -> Garnishment4Builder {
6605 self.ref_nb = ::std::option::Option::Some(value);
6606 self
6607 }
6608 #[must_use]
6610 pub fn dt(mut self, value: ISODate) -> Garnishment4Builder {
6611 self.dt = ::std::option::Option::Some(value);
6612 self
6613 }
6614 #[must_use]
6616 pub fn rmtd_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Garnishment4Builder {
6617 self.rmtd_amt = ::std::option::Option::Some(value);
6618 self
6619 }
6620 #[must_use]
6622 pub fn fmly_mdcl_insrnc_ind(mut self, value: TrueFalseIndicator) -> Garnishment4Builder {
6623 self.fmly_mdcl_insrnc_ind = ::std::option::Option::Some(value);
6624 self
6625 }
6626 #[must_use]
6628 pub fn mplyee_termntn_ind(mut self, value: TrueFalseIndicator) -> Garnishment4Builder {
6629 self.mplyee_termntn_ind = ::std::option::Option::Some(value);
6630 self
6631 }
6632 pub fn build(self) -> ::std::result::Result<Garnishment4, crate::common::BuilderError> {
6644 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6645 if self.tp.is_none() {
6646 missing.push("tp".to_owned());
6647 }
6648 if !missing.is_empty() {
6649 return ::std::result::Result::Err(crate::common::BuilderError {
6650 type_name: "Garnishment4".to_owned(),
6651 missing_fields: missing,
6652 });
6653 }
6654 ::std::result::Result::Ok(Garnishment4 {
6655 tp: self.tp.unwrap(),
6656 grnshee: self.grnshee,
6657 grnshmt_admstr: self.grnshmt_admstr,
6658 ref_nb: self.ref_nb,
6659 dt: self.dt,
6660 rmtd_amt: self.rmtd_amt,
6661 fmly_mdcl_insrnc_ind: self.fmly_mdcl_insrnc_ind,
6662 mplyee_termntn_ind: self.mplyee_termntn_ind,
6663 })
6664 }
6665}
6666impl Garnishment4 {
6667 #[must_use]
6669 pub fn builder() -> Garnishment4Builder {
6670 Garnishment4Builder::default()
6671 }
6672}
6673#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6674pub struct GarnishmentType1 {
6675 #[serde(rename = "CdOrPrtry")]
6676 pub cd_or_prtry: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
6677 #[serde(rename = "Issr")]
6678 #[serde(skip_serializing_if = "Option::is_none")]
6679 pub issr: Option<Max35Text>,
6680}
6681#[allow(clippy::struct_field_names)]
6683#[derive(Default)]
6684pub struct GarnishmentType1Builder {
6685 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<GarnishmentType1Choice>>,
6686 issr: ::std::option::Option<Max35Text>,
6687}
6688impl GarnishmentType1Builder {
6689 #[must_use]
6691 pub fn cd_or_prtry(
6692 mut self,
6693 value: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
6694 ) -> GarnishmentType1Builder {
6695 self.cd_or_prtry = ::std::option::Option::Some(value);
6696 self
6697 }
6698 #[must_use]
6700 pub fn issr(mut self, value: Max35Text) -> GarnishmentType1Builder {
6701 self.issr = ::std::option::Option::Some(value);
6702 self
6703 }
6704 pub fn build(self) -> ::std::result::Result<GarnishmentType1, crate::common::BuilderError> {
6716 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6717 if self.cd_or_prtry.is_none() {
6718 missing.push("cd_or_prtry".to_owned());
6719 }
6720 if !missing.is_empty() {
6721 return ::std::result::Result::Err(crate::common::BuilderError {
6722 type_name: "GarnishmentType1".to_owned(),
6723 missing_fields: missing,
6724 });
6725 }
6726 ::std::result::Result::Ok(GarnishmentType1 {
6727 cd_or_prtry: self.cd_or_prtry.unwrap(),
6728 issr: self.issr,
6729 })
6730 }
6731}
6732impl GarnishmentType1 {
6733 #[must_use]
6735 pub fn builder() -> GarnishmentType1Builder {
6736 GarnishmentType1Builder::default()
6737 }
6738}
6739#[allow(clippy::large_enum_variant)]
6740#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6741pub enum GarnishmentType1Choice {
6742 #[serde(rename = "Cd")]
6743 Cd(ExternalGarnishmentType1Code),
6744 #[serde(rename = "Prtry")]
6745 Prtry(Max35Text),
6746}
6747#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6748pub struct GenericAccountIdentification1 {
6749 #[serde(rename = "Id")]
6750 pub id: Max34Text,
6751 #[serde(rename = "SchmeNm")]
6752 #[serde(skip_serializing_if = "Option::is_none")]
6753 pub schme_nm: Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
6754 #[serde(rename = "Issr")]
6755 #[serde(skip_serializing_if = "Option::is_none")]
6756 pub issr: Option<Max35Text>,
6757}
6758#[allow(clippy::struct_field_names)]
6760#[derive(Default)]
6761pub struct GenericAccountIdentification1Builder {
6762 id: ::std::option::Option<Max34Text>,
6763 schme_nm: ::std::option::Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
6764 issr: ::std::option::Option<Max35Text>,
6765}
6766impl GenericAccountIdentification1Builder {
6767 #[must_use]
6769 pub fn id(mut self, value: Max34Text) -> GenericAccountIdentification1Builder {
6770 self.id = ::std::option::Option::Some(value);
6771 self
6772 }
6773 #[must_use]
6775 pub fn schme_nm(
6776 mut self,
6777 value: crate::common::ChoiceWrapper<AccountSchemeName1Choice>,
6778 ) -> GenericAccountIdentification1Builder {
6779 self.schme_nm = ::std::option::Option::Some(value);
6780 self
6781 }
6782 #[must_use]
6784 pub fn issr(mut self, value: Max35Text) -> GenericAccountIdentification1Builder {
6785 self.issr = ::std::option::Option::Some(value);
6786 self
6787 }
6788 pub fn build(
6800 self,
6801 ) -> ::std::result::Result<GenericAccountIdentification1, crate::common::BuilderError> {
6802 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6803 if self.id.is_none() {
6804 missing.push("id".to_owned());
6805 }
6806 if !missing.is_empty() {
6807 return ::std::result::Result::Err(crate::common::BuilderError {
6808 type_name: "GenericAccountIdentification1".to_owned(),
6809 missing_fields: missing,
6810 });
6811 }
6812 ::std::result::Result::Ok(GenericAccountIdentification1 {
6813 id: self.id.unwrap(),
6814 schme_nm: self.schme_nm,
6815 issr: self.issr,
6816 })
6817 }
6818}
6819impl GenericAccountIdentification1 {
6820 #[must_use]
6822 pub fn builder() -> GenericAccountIdentification1Builder {
6823 GenericAccountIdentification1Builder::default()
6824 }
6825}
6826#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6827pub struct GenericFinancialIdentification1 {
6828 #[serde(rename = "Id")]
6829 pub id: Max35Text,
6830 #[serde(rename = "SchmeNm")]
6831 #[serde(skip_serializing_if = "Option::is_none")]
6832 pub schme_nm: Option<crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>>,
6833 #[serde(rename = "Issr")]
6834 #[serde(skip_serializing_if = "Option::is_none")]
6835 pub issr: Option<Max35Text>,
6836}
6837#[allow(clippy::struct_field_names)]
6839#[derive(Default)]
6840pub struct GenericFinancialIdentification1Builder {
6841 id: ::std::option::Option<Max35Text>,
6842 schme_nm: ::std::option::Option<
6843 crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
6844 >,
6845 issr: ::std::option::Option<Max35Text>,
6846}
6847impl GenericFinancialIdentification1Builder {
6848 #[must_use]
6850 pub fn id(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
6851 self.id = ::std::option::Option::Some(value);
6852 self
6853 }
6854 #[must_use]
6856 pub fn schme_nm(
6857 mut self,
6858 value: crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
6859 ) -> GenericFinancialIdentification1Builder {
6860 self.schme_nm = ::std::option::Option::Some(value);
6861 self
6862 }
6863 #[must_use]
6865 pub fn issr(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
6866 self.issr = ::std::option::Option::Some(value);
6867 self
6868 }
6869 pub fn build(
6881 self,
6882 ) -> ::std::result::Result<GenericFinancialIdentification1, crate::common::BuilderError> {
6883 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6884 if self.id.is_none() {
6885 missing.push("id".to_owned());
6886 }
6887 if !missing.is_empty() {
6888 return ::std::result::Result::Err(crate::common::BuilderError {
6889 type_name: "GenericFinancialIdentification1".to_owned(),
6890 missing_fields: missing,
6891 });
6892 }
6893 ::std::result::Result::Ok(GenericFinancialIdentification1 {
6894 id: self.id.unwrap(),
6895 schme_nm: self.schme_nm,
6896 issr: self.issr,
6897 })
6898 }
6899}
6900impl GenericFinancialIdentification1 {
6901 #[must_use]
6903 pub fn builder() -> GenericFinancialIdentification1Builder {
6904 GenericFinancialIdentification1Builder::default()
6905 }
6906}
6907#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6908pub struct GenericIdentification3 {
6909 #[serde(rename = "Id")]
6910 pub id: Max35Text,
6911 #[serde(rename = "Issr")]
6912 #[serde(skip_serializing_if = "Option::is_none")]
6913 pub issr: Option<Max35Text>,
6914}
6915#[allow(clippy::struct_field_names)]
6917#[derive(Default)]
6918pub struct GenericIdentification3Builder {
6919 id: ::std::option::Option<Max35Text>,
6920 issr: ::std::option::Option<Max35Text>,
6921}
6922impl GenericIdentification3Builder {
6923 #[must_use]
6925 pub fn id(mut self, value: Max35Text) -> GenericIdentification3Builder {
6926 self.id = ::std::option::Option::Some(value);
6927 self
6928 }
6929 #[must_use]
6931 pub fn issr(mut self, value: Max35Text) -> GenericIdentification3Builder {
6932 self.issr = ::std::option::Option::Some(value);
6933 self
6934 }
6935 pub fn build(
6947 self,
6948 ) -> ::std::result::Result<GenericIdentification3, crate::common::BuilderError> {
6949 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6950 if self.id.is_none() {
6951 missing.push("id".to_owned());
6952 }
6953 if !missing.is_empty() {
6954 return ::std::result::Result::Err(crate::common::BuilderError {
6955 type_name: "GenericIdentification3".to_owned(),
6956 missing_fields: missing,
6957 });
6958 }
6959 ::std::result::Result::Ok(GenericIdentification3 {
6960 id: self.id.unwrap(),
6961 issr: self.issr,
6962 })
6963 }
6964}
6965impl GenericIdentification3 {
6966 #[must_use]
6968 pub fn builder() -> GenericIdentification3Builder {
6969 GenericIdentification3Builder::default()
6970 }
6971}
6972#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6973pub struct GenericIdentification30 {
6974 #[serde(rename = "Id")]
6975 pub id: Exact4AlphaNumericText,
6976 #[serde(rename = "Issr")]
6977 pub issr: Max35Text,
6978 #[serde(rename = "SchmeNm")]
6979 #[serde(skip_serializing_if = "Option::is_none")]
6980 pub schme_nm: Option<Max35Text>,
6981}
6982#[allow(clippy::struct_field_names)]
6984#[derive(Default)]
6985pub struct GenericIdentification30Builder {
6986 id: ::std::option::Option<Exact4AlphaNumericText>,
6987 issr: ::std::option::Option<Max35Text>,
6988 schme_nm: ::std::option::Option<Max35Text>,
6989}
6990impl GenericIdentification30Builder {
6991 #[must_use]
6993 pub fn id(mut self, value: Exact4AlphaNumericText) -> GenericIdentification30Builder {
6994 self.id = ::std::option::Option::Some(value);
6995 self
6996 }
6997 #[must_use]
6999 pub fn issr(mut self, value: Max35Text) -> GenericIdentification30Builder {
7000 self.issr = ::std::option::Option::Some(value);
7001 self
7002 }
7003 #[must_use]
7005 pub fn schme_nm(mut self, value: Max35Text) -> GenericIdentification30Builder {
7006 self.schme_nm = ::std::option::Option::Some(value);
7007 self
7008 }
7009 pub fn build(
7021 self,
7022 ) -> ::std::result::Result<GenericIdentification30, crate::common::BuilderError> {
7023 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7024 if self.id.is_none() {
7025 missing.push("id".to_owned());
7026 }
7027 if self.issr.is_none() {
7028 missing.push("issr".to_owned());
7029 }
7030 if !missing.is_empty() {
7031 return ::std::result::Result::Err(crate::common::BuilderError {
7032 type_name: "GenericIdentification30".to_owned(),
7033 missing_fields: missing,
7034 });
7035 }
7036 ::std::result::Result::Ok(GenericIdentification30 {
7037 id: self.id.unwrap(),
7038 issr: self.issr.unwrap(),
7039 schme_nm: self.schme_nm,
7040 })
7041 }
7042}
7043impl GenericIdentification30 {
7044 #[must_use]
7046 pub fn builder() -> GenericIdentification30Builder {
7047 GenericIdentification30Builder::default()
7048 }
7049}
7050#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7051pub struct GenericOrganisationIdentification3 {
7052 #[serde(rename = "Id")]
7053 pub id: Max256Text,
7054 #[serde(rename = "SchmeNm")]
7055 #[serde(skip_serializing_if = "Option::is_none")]
7056 pub schme_nm: Option<crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>>,
7057 #[serde(rename = "Issr")]
7058 #[serde(skip_serializing_if = "Option::is_none")]
7059 pub issr: Option<Max35Text>,
7060}
7061#[allow(clippy::struct_field_names)]
7063#[derive(Default)]
7064pub struct GenericOrganisationIdentification3Builder {
7065 id: ::std::option::Option<Max256Text>,
7066 schme_nm: ::std::option::Option<
7067 crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
7068 >,
7069 issr: ::std::option::Option<Max35Text>,
7070}
7071impl GenericOrganisationIdentification3Builder {
7072 #[must_use]
7074 pub fn id(mut self, value: Max256Text) -> GenericOrganisationIdentification3Builder {
7075 self.id = ::std::option::Option::Some(value);
7076 self
7077 }
7078 #[must_use]
7080 pub fn schme_nm(
7081 mut self,
7082 value: crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
7083 ) -> GenericOrganisationIdentification3Builder {
7084 self.schme_nm = ::std::option::Option::Some(value);
7085 self
7086 }
7087 #[must_use]
7089 pub fn issr(mut self, value: Max35Text) -> GenericOrganisationIdentification3Builder {
7090 self.issr = ::std::option::Option::Some(value);
7091 self
7092 }
7093 pub fn build(
7105 self,
7106 ) -> ::std::result::Result<GenericOrganisationIdentification3, crate::common::BuilderError>
7107 {
7108 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7109 if self.id.is_none() {
7110 missing.push("id".to_owned());
7111 }
7112 if !missing.is_empty() {
7113 return ::std::result::Result::Err(crate::common::BuilderError {
7114 type_name: "GenericOrganisationIdentification3".to_owned(),
7115 missing_fields: missing,
7116 });
7117 }
7118 ::std::result::Result::Ok(GenericOrganisationIdentification3 {
7119 id: self.id.unwrap(),
7120 schme_nm: self.schme_nm,
7121 issr: self.issr,
7122 })
7123 }
7124}
7125impl GenericOrganisationIdentification3 {
7126 #[must_use]
7128 pub fn builder() -> GenericOrganisationIdentification3Builder {
7129 GenericOrganisationIdentification3Builder::default()
7130 }
7131}
7132#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7133pub struct GenericPersonIdentification2 {
7134 #[serde(rename = "Id")]
7135 pub id: Max256Text,
7136 #[serde(rename = "SchmeNm")]
7137 #[serde(skip_serializing_if = "Option::is_none")]
7138 pub schme_nm: Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
7139 #[serde(rename = "Issr")]
7140 #[serde(skip_serializing_if = "Option::is_none")]
7141 pub issr: Option<Max35Text>,
7142}
7143#[allow(clippy::struct_field_names)]
7145#[derive(Default)]
7146pub struct GenericPersonIdentification2Builder {
7147 id: ::std::option::Option<Max256Text>,
7148 schme_nm:
7149 ::std::option::Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
7150 issr: ::std::option::Option<Max35Text>,
7151}
7152impl GenericPersonIdentification2Builder {
7153 #[must_use]
7155 pub fn id(mut self, value: Max256Text) -> GenericPersonIdentification2Builder {
7156 self.id = ::std::option::Option::Some(value);
7157 self
7158 }
7159 #[must_use]
7161 pub fn schme_nm(
7162 mut self,
7163 value: crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>,
7164 ) -> GenericPersonIdentification2Builder {
7165 self.schme_nm = ::std::option::Option::Some(value);
7166 self
7167 }
7168 #[must_use]
7170 pub fn issr(mut self, value: Max35Text) -> GenericPersonIdentification2Builder {
7171 self.issr = ::std::option::Option::Some(value);
7172 self
7173 }
7174 pub fn build(
7186 self,
7187 ) -> ::std::result::Result<GenericPersonIdentification2, crate::common::BuilderError> {
7188 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7189 if self.id.is_none() {
7190 missing.push("id".to_owned());
7191 }
7192 if !missing.is_empty() {
7193 return ::std::result::Result::Err(crate::common::BuilderError {
7194 type_name: "GenericPersonIdentification2".to_owned(),
7195 missing_fields: missing,
7196 });
7197 }
7198 ::std::result::Result::Ok(GenericPersonIdentification2 {
7199 id: self.id.unwrap(),
7200 schme_nm: self.schme_nm,
7201 issr: self.issr,
7202 })
7203 }
7204}
7205impl GenericPersonIdentification2 {
7206 #[must_use]
7208 pub fn builder() -> GenericPersonIdentification2Builder {
7209 GenericPersonIdentification2Builder::default()
7210 }
7211}
7212#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7213pub struct GroupHeader131 {
7214 #[serde(rename = "MsgId")]
7215 pub msg_id: Max35Text,
7216 #[serde(rename = "CreDtTm")]
7217 pub cre_dt_tm: ISODateTime,
7218 #[serde(rename = "XpryDtTm")]
7219 #[serde(skip_serializing_if = "Option::is_none")]
7220 pub xpry_dt_tm: Option<ISODateTime>,
7221 #[serde(rename = "BtchBookg")]
7222 #[serde(skip_serializing_if = "Option::is_none")]
7223 pub btch_bookg: Option<BatchBookingIndicator>,
7224 #[serde(rename = "NbOfTxs")]
7225 pub nb_of_txs: Max15NumericText,
7226 #[serde(rename = "CtrlSum")]
7227 #[serde(skip_serializing_if = "Option::is_none")]
7228 pub ctrl_sum: Option<DecimalNumber>,
7229 #[serde(rename = "TtlIntrBkSttlmAmt")]
7230 #[serde(skip_serializing_if = "Option::is_none")]
7231 pub ttl_intr_bk_sttlm_amt: Option<ActiveCurrencyAndAmount>,
7232 #[serde(rename = "IntrBkSttlmDt")]
7233 #[serde(skip_serializing_if = "Option::is_none")]
7234 pub intr_bk_sttlm_dt: Option<ISODate>,
7235 #[serde(rename = "SttlmInf")]
7236 pub sttlm_inf: SettlementInstruction15,
7237 #[serde(rename = "PmtTpInf")]
7238 #[serde(skip_serializing_if = "Option::is_none")]
7239 pub pmt_tp_inf: Option<PaymentTypeInformation28>,
7240 #[serde(rename = "InstgAgt")]
7241 #[serde(skip_serializing_if = "Option::is_none")]
7242 pub instg_agt: Option<BranchAndFinancialInstitutionIdentification8>,
7243 #[serde(rename = "InstdAgt")]
7244 #[serde(skip_serializing_if = "Option::is_none")]
7245 pub instd_agt: Option<BranchAndFinancialInstitutionIdentification8>,
7246}
7247#[allow(clippy::struct_field_names)]
7249#[derive(Default)]
7250pub struct GroupHeader131Builder {
7251 msg_id: ::std::option::Option<Max35Text>,
7252 cre_dt_tm: ::std::option::Option<ISODateTime>,
7253 xpry_dt_tm: ::std::option::Option<ISODateTime>,
7254 btch_bookg: ::std::option::Option<BatchBookingIndicator>,
7255 nb_of_txs: ::std::option::Option<Max15NumericText>,
7256 ctrl_sum: ::std::option::Option<DecimalNumber>,
7257 ttl_intr_bk_sttlm_amt: ::std::option::Option<ActiveCurrencyAndAmount>,
7258 intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
7259 sttlm_inf: ::std::option::Option<SettlementInstruction15>,
7260 pmt_tp_inf: ::std::option::Option<PaymentTypeInformation28>,
7261 instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
7262 instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
7263}
7264impl GroupHeader131Builder {
7265 #[must_use]
7267 pub fn msg_id(mut self, value: Max35Text) -> GroupHeader131Builder {
7268 self.msg_id = ::std::option::Option::Some(value);
7269 self
7270 }
7271 #[must_use]
7273 pub fn cre_dt_tm(mut self, value: ISODateTime) -> GroupHeader131Builder {
7274 self.cre_dt_tm = ::std::option::Option::Some(value);
7275 self
7276 }
7277 #[must_use]
7279 pub fn xpry_dt_tm(mut self, value: ISODateTime) -> GroupHeader131Builder {
7280 self.xpry_dt_tm = ::std::option::Option::Some(value);
7281 self
7282 }
7283 #[must_use]
7285 pub fn btch_bookg(mut self, value: BatchBookingIndicator) -> GroupHeader131Builder {
7286 self.btch_bookg = ::std::option::Option::Some(value);
7287 self
7288 }
7289 #[must_use]
7291 pub fn nb_of_txs(mut self, value: Max15NumericText) -> GroupHeader131Builder {
7292 self.nb_of_txs = ::std::option::Option::Some(value);
7293 self
7294 }
7295 #[must_use]
7297 pub fn ctrl_sum(mut self, value: DecimalNumber) -> GroupHeader131Builder {
7298 self.ctrl_sum = ::std::option::Option::Some(value);
7299 self
7300 }
7301 #[must_use]
7303 pub fn ttl_intr_bk_sttlm_amt(
7304 mut self,
7305 value: ActiveCurrencyAndAmount,
7306 ) -> GroupHeader131Builder {
7307 self.ttl_intr_bk_sttlm_amt = ::std::option::Option::Some(value);
7308 self
7309 }
7310 #[must_use]
7312 pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> GroupHeader131Builder {
7313 self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
7314 self
7315 }
7316 #[must_use]
7318 pub fn sttlm_inf(mut self, value: SettlementInstruction15) -> GroupHeader131Builder {
7319 self.sttlm_inf = ::std::option::Option::Some(value);
7320 self
7321 }
7322 #[must_use]
7324 pub fn pmt_tp_inf(mut self, value: PaymentTypeInformation28) -> GroupHeader131Builder {
7325 self.pmt_tp_inf = ::std::option::Option::Some(value);
7326 self
7327 }
7328 #[must_use]
7330 pub fn instg_agt(
7331 mut self,
7332 value: BranchAndFinancialInstitutionIdentification8,
7333 ) -> GroupHeader131Builder {
7334 self.instg_agt = ::std::option::Option::Some(value);
7335 self
7336 }
7337 #[must_use]
7339 pub fn instd_agt(
7340 mut self,
7341 value: BranchAndFinancialInstitutionIdentification8,
7342 ) -> GroupHeader131Builder {
7343 self.instd_agt = ::std::option::Option::Some(value);
7344 self
7345 }
7346 pub fn build(self) -> ::std::result::Result<GroupHeader131, crate::common::BuilderError> {
7358 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7359 if self.msg_id.is_none() {
7360 missing.push("msg_id".to_owned());
7361 }
7362 if self.cre_dt_tm.is_none() {
7363 missing.push("cre_dt_tm".to_owned());
7364 }
7365 if self.nb_of_txs.is_none() {
7366 missing.push("nb_of_txs".to_owned());
7367 }
7368 if self.sttlm_inf.is_none() {
7369 missing.push("sttlm_inf".to_owned());
7370 }
7371 if !missing.is_empty() {
7372 return ::std::result::Result::Err(crate::common::BuilderError {
7373 type_name: "GroupHeader131".to_owned(),
7374 missing_fields: missing,
7375 });
7376 }
7377 ::std::result::Result::Ok(GroupHeader131 {
7378 msg_id: self.msg_id.unwrap(),
7379 cre_dt_tm: self.cre_dt_tm.unwrap(),
7380 xpry_dt_tm: self.xpry_dt_tm,
7381 btch_bookg: self.btch_bookg,
7382 nb_of_txs: self.nb_of_txs.unwrap(),
7383 ctrl_sum: self.ctrl_sum,
7384 ttl_intr_bk_sttlm_amt: self.ttl_intr_bk_sttlm_amt,
7385 intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
7386 sttlm_inf: self.sttlm_inf.unwrap(),
7387 pmt_tp_inf: self.pmt_tp_inf,
7388 instg_agt: self.instg_agt,
7389 instd_agt: self.instd_agt,
7390 })
7391 }
7392}
7393impl GroupHeader131 {
7394 #[must_use]
7396 pub fn builder() -> GroupHeader131Builder {
7397 GroupHeader131Builder::default()
7398 }
7399}
7400#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7401pub struct InstructionForCreditorAgent3 {
7402 #[serde(rename = "Cd")]
7403 #[serde(skip_serializing_if = "Option::is_none")]
7404 pub cd: Option<ExternalCreditorAgentInstruction1Code>,
7405 #[serde(rename = "InstrInf")]
7406 #[serde(skip_serializing_if = "Option::is_none")]
7407 pub instr_inf: Option<Max140Text>,
7408}
7409#[allow(clippy::struct_field_names)]
7411#[derive(Default)]
7412pub struct InstructionForCreditorAgent3Builder {
7413 cd: ::std::option::Option<ExternalCreditorAgentInstruction1Code>,
7414 instr_inf: ::std::option::Option<Max140Text>,
7415}
7416impl InstructionForCreditorAgent3Builder {
7417 #[must_use]
7419 pub fn cd(
7420 mut self,
7421 value: ExternalCreditorAgentInstruction1Code,
7422 ) -> InstructionForCreditorAgent3Builder {
7423 self.cd = ::std::option::Option::Some(value);
7424 self
7425 }
7426 #[must_use]
7428 pub fn instr_inf(mut self, value: Max140Text) -> InstructionForCreditorAgent3Builder {
7429 self.instr_inf = ::std::option::Option::Some(value);
7430 self
7431 }
7432 pub fn build(
7444 self,
7445 ) -> ::std::result::Result<InstructionForCreditorAgent3, crate::common::BuilderError> {
7446 ::std::result::Result::Ok(InstructionForCreditorAgent3 {
7447 cd: self.cd,
7448 instr_inf: self.instr_inf,
7449 })
7450 }
7451}
7452impl InstructionForCreditorAgent3 {
7453 #[must_use]
7455 pub fn builder() -> InstructionForCreditorAgent3Builder {
7456 InstructionForCreditorAgent3Builder::default()
7457 }
7458}
7459#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7460pub struct InstructionForNextAgent1 {
7461 #[serde(rename = "Cd")]
7462 #[serde(skip_serializing_if = "Option::is_none")]
7463 pub cd: Option<Instruction4Code>,
7464 #[serde(rename = "InstrInf")]
7465 #[serde(skip_serializing_if = "Option::is_none")]
7466 pub instr_inf: Option<Max140Text>,
7467}
7468#[allow(clippy::struct_field_names)]
7470#[derive(Default)]
7471pub struct InstructionForNextAgent1Builder {
7472 cd: ::std::option::Option<Instruction4Code>,
7473 instr_inf: ::std::option::Option<Max140Text>,
7474}
7475impl InstructionForNextAgent1Builder {
7476 #[must_use]
7478 pub fn cd(mut self, value: Instruction4Code) -> InstructionForNextAgent1Builder {
7479 self.cd = ::std::option::Option::Some(value);
7480 self
7481 }
7482 #[must_use]
7484 pub fn instr_inf(mut self, value: Max140Text) -> InstructionForNextAgent1Builder {
7485 self.instr_inf = ::std::option::Option::Some(value);
7486 self
7487 }
7488 pub fn build(
7500 self,
7501 ) -> ::std::result::Result<InstructionForNextAgent1, crate::common::BuilderError> {
7502 ::std::result::Result::Ok(InstructionForNextAgent1 {
7503 cd: self.cd,
7504 instr_inf: self.instr_inf,
7505 })
7506 }
7507}
7508impl InstructionForNextAgent1 {
7509 #[must_use]
7511 pub fn builder() -> InstructionForNextAgent1Builder {
7512 InstructionForNextAgent1Builder::default()
7513 }
7514}
7515#[allow(clippy::large_enum_variant)]
7516#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7517pub enum LocalInstrument2Choice {
7518 #[serde(rename = "Cd")]
7519 Cd(ExternalLocalInstrument1Code),
7520 #[serde(rename = "Prtry")]
7521 Prtry(Max35Text),
7522}
7523#[allow(clippy::large_enum_variant)]
7524#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7525pub enum MandateClassification1Choice {
7526 #[serde(rename = "Cd")]
7527 Cd(MandateClassification1Code),
7528 #[serde(rename = "Prtry")]
7529 Prtry(Max35Text),
7530}
7531#[allow(clippy::large_enum_variant)]
7532#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7533pub enum MandateSetupReason1Choice {
7534 #[serde(rename = "Cd")]
7535 Cd(ExternalMandateSetupReason1Code),
7536 #[serde(rename = "Prtry")]
7537 Prtry(Max70Text),
7538}
7539#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7540pub struct MandateTypeInformation2 {
7541 #[serde(rename = "SvcLvl")]
7542 #[serde(skip_serializing_if = "Option::is_none")]
7543 pub svc_lvl: Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
7544 #[serde(rename = "LclInstrm")]
7545 #[serde(skip_serializing_if = "Option::is_none")]
7546 pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
7547 #[serde(rename = "CtgyPurp")]
7548 #[serde(skip_serializing_if = "Option::is_none")]
7549 pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
7550 #[serde(rename = "Clssfctn")]
7551 #[serde(skip_serializing_if = "Option::is_none")]
7552 pub clssfctn: Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
7553}
7554#[allow(clippy::struct_field_names)]
7556#[derive(Default)]
7557pub struct MandateTypeInformation2Builder {
7558 svc_lvl: ::std::option::Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
7559 lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
7560 ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
7561 clssfctn: ::std::option::Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
7562}
7563impl MandateTypeInformation2Builder {
7564 #[must_use]
7566 pub fn svc_lvl(
7567 mut self,
7568 value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
7569 ) -> MandateTypeInformation2Builder {
7570 self.svc_lvl = ::std::option::Option::Some(value);
7571 self
7572 }
7573 #[must_use]
7575 pub fn lcl_instrm(
7576 mut self,
7577 value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
7578 ) -> MandateTypeInformation2Builder {
7579 self.lcl_instrm = ::std::option::Option::Some(value);
7580 self
7581 }
7582 #[must_use]
7584 pub fn ctgy_purp(
7585 mut self,
7586 value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
7587 ) -> MandateTypeInformation2Builder {
7588 self.ctgy_purp = ::std::option::Option::Some(value);
7589 self
7590 }
7591 #[must_use]
7593 pub fn clssfctn(
7594 mut self,
7595 value: crate::common::ChoiceWrapper<MandateClassification1Choice>,
7596 ) -> MandateTypeInformation2Builder {
7597 self.clssfctn = ::std::option::Option::Some(value);
7598 self
7599 }
7600 pub fn build(
7612 self,
7613 ) -> ::std::result::Result<MandateTypeInformation2, crate::common::BuilderError> {
7614 ::std::result::Result::Ok(MandateTypeInformation2 {
7615 svc_lvl: self.svc_lvl,
7616 lcl_instrm: self.lcl_instrm,
7617 ctgy_purp: self.ctgy_purp,
7618 clssfctn: self.clssfctn,
7619 })
7620 }
7621}
7622impl MandateTypeInformation2 {
7623 #[must_use]
7625 pub fn builder() -> MandateTypeInformation2Builder {
7626 MandateTypeInformation2Builder::default()
7627 }
7628}
7629#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7630pub struct NameAndAddress18 {
7631 #[serde(rename = "Nm")]
7632 pub nm: Max140Text,
7633 #[serde(rename = "Adr")]
7634 pub adr: PostalAddress27,
7635}
7636#[allow(clippy::struct_field_names)]
7638#[derive(Default)]
7639pub struct NameAndAddress18Builder {
7640 nm: ::std::option::Option<Max140Text>,
7641 adr: ::std::option::Option<PostalAddress27>,
7642}
7643impl NameAndAddress18Builder {
7644 #[must_use]
7646 pub fn nm(mut self, value: Max140Text) -> NameAndAddress18Builder {
7647 self.nm = ::std::option::Option::Some(value);
7648 self
7649 }
7650 #[must_use]
7652 pub fn adr(mut self, value: PostalAddress27) -> NameAndAddress18Builder {
7653 self.adr = ::std::option::Option::Some(value);
7654 self
7655 }
7656 pub fn build(self) -> ::std::result::Result<NameAndAddress18, crate::common::BuilderError> {
7668 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7669 if self.nm.is_none() {
7670 missing.push("nm".to_owned());
7671 }
7672 if self.adr.is_none() {
7673 missing.push("adr".to_owned());
7674 }
7675 if !missing.is_empty() {
7676 return ::std::result::Result::Err(crate::common::BuilderError {
7677 type_name: "NameAndAddress18".to_owned(),
7678 missing_fields: missing,
7679 });
7680 }
7681 ::std::result::Result::Ok(NameAndAddress18 {
7682 nm: self.nm.unwrap(),
7683 adr: self.adr.unwrap(),
7684 })
7685 }
7686}
7687impl NameAndAddress18 {
7688 #[must_use]
7690 pub fn builder() -> NameAndAddress18Builder {
7691 NameAndAddress18Builder::default()
7692 }
7693}
7694#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7695pub struct OrganisationIdentification39 {
7696 #[serde(rename = "AnyBIC")]
7697 #[serde(skip_serializing_if = "Option::is_none")]
7698 pub any_bic: Option<AnyBICDec2014Identifier>,
7699 #[serde(rename = "LEI")]
7700 #[serde(skip_serializing_if = "Option::is_none")]
7701 pub lei: Option<LEIIdentifier>,
7702 #[serde(rename = "Othr")]
7703 #[serde(default)]
7704 #[serde(skip_serializing_if = "Vec::is_empty")]
7705 pub othr: Vec<GenericOrganisationIdentification3>,
7706}
7707#[allow(clippy::struct_field_names)]
7709#[derive(Default)]
7710pub struct OrganisationIdentification39Builder {
7711 any_bic: ::std::option::Option<AnyBICDec2014Identifier>,
7712 lei: ::std::option::Option<LEIIdentifier>,
7713 othr: ::std::vec::Vec<GenericOrganisationIdentification3>,
7714}
7715impl OrganisationIdentification39Builder {
7716 #[must_use]
7718 pub fn any_bic(
7719 mut self,
7720 value: AnyBICDec2014Identifier,
7721 ) -> OrganisationIdentification39Builder {
7722 self.any_bic = ::std::option::Option::Some(value);
7723 self
7724 }
7725 #[must_use]
7727 pub fn lei(mut self, value: LEIIdentifier) -> OrganisationIdentification39Builder {
7728 self.lei = ::std::option::Option::Some(value);
7729 self
7730 }
7731 #[must_use]
7733 pub fn othr(
7734 mut self,
7735 value: ::std::vec::Vec<GenericOrganisationIdentification3>,
7736 ) -> OrganisationIdentification39Builder {
7737 self.othr = value;
7738 self
7739 }
7740 #[must_use]
7742 pub fn add_othr(
7743 mut self,
7744 value: GenericOrganisationIdentification3,
7745 ) -> OrganisationIdentification39Builder {
7746 self.othr.push(value);
7747 self
7748 }
7749 pub fn build(
7761 self,
7762 ) -> ::std::result::Result<OrganisationIdentification39, crate::common::BuilderError> {
7763 ::std::result::Result::Ok(OrganisationIdentification39 {
7764 any_bic: self.any_bic,
7765 lei: self.lei,
7766 othr: self.othr,
7767 })
7768 }
7769}
7770impl OrganisationIdentification39 {
7771 #[must_use]
7773 pub fn builder() -> OrganisationIdentification39Builder {
7774 OrganisationIdentification39Builder::default()
7775 }
7776}
7777#[allow(clippy::large_enum_variant)]
7778#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7779pub enum OrganisationIdentificationSchemeName1Choice {
7780 #[serde(rename = "Cd")]
7781 Cd(ExternalOrganisationIdentification1Code),
7782 #[serde(rename = "Prtry")]
7783 Prtry(Max35Text),
7784}
7785#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7786pub struct OtherContact1 {
7787 #[serde(rename = "ChanlTp")]
7788 pub chanl_tp: Max4Text,
7789 #[serde(rename = "Id")]
7790 #[serde(skip_serializing_if = "Option::is_none")]
7791 pub id: Option<Max128Text>,
7792}
7793#[allow(clippy::struct_field_names)]
7795#[derive(Default)]
7796pub struct OtherContact1Builder {
7797 chanl_tp: ::std::option::Option<Max4Text>,
7798 id: ::std::option::Option<Max128Text>,
7799}
7800impl OtherContact1Builder {
7801 #[must_use]
7803 pub fn chanl_tp(mut self, value: Max4Text) -> OtherContact1Builder {
7804 self.chanl_tp = ::std::option::Option::Some(value);
7805 self
7806 }
7807 #[must_use]
7809 pub fn id(mut self, value: Max128Text) -> OtherContact1Builder {
7810 self.id = ::std::option::Option::Some(value);
7811 self
7812 }
7813 pub fn build(self) -> ::std::result::Result<OtherContact1, crate::common::BuilderError> {
7825 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7826 if self.chanl_tp.is_none() {
7827 missing.push("chanl_tp".to_owned());
7828 }
7829 if !missing.is_empty() {
7830 return ::std::result::Result::Err(crate::common::BuilderError {
7831 type_name: "OtherContact1".to_owned(),
7832 missing_fields: missing,
7833 });
7834 }
7835 ::std::result::Result::Ok(OtherContact1 {
7836 chanl_tp: self.chanl_tp.unwrap(),
7837 id: self.id,
7838 })
7839 }
7840}
7841impl OtherContact1 {
7842 #[must_use]
7844 pub fn builder() -> OtherContact1Builder {
7845 OtherContact1Builder::default()
7846 }
7847}
7848#[allow(clippy::large_enum_variant)]
7849#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7850pub enum Party52Choice {
7851 #[serde(rename = "OrgId")]
7852 OrgId(OrganisationIdentification39),
7853 #[serde(rename = "PrvtId")]
7854 PrvtId(PersonIdentification18),
7855}
7856#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7857pub struct PartyIdentification272 {
7858 #[serde(rename = "Nm")]
7859 #[serde(skip_serializing_if = "Option::is_none")]
7860 pub nm: Option<Max140Text>,
7861 #[serde(rename = "PstlAdr")]
7862 #[serde(skip_serializing_if = "Option::is_none")]
7863 pub pstl_adr: Option<PostalAddress27>,
7864 #[serde(rename = "Id")]
7865 #[serde(skip_serializing_if = "Option::is_none")]
7866 pub id: Option<crate::common::ChoiceWrapper<Party52Choice>>,
7867 #[serde(rename = "CtryOfRes")]
7868 #[serde(skip_serializing_if = "Option::is_none")]
7869 pub ctry_of_res: Option<CountryCode>,
7870 #[serde(rename = "CtctDtls")]
7871 #[serde(skip_serializing_if = "Option::is_none")]
7872 pub ctct_dtls: Option<Contact13>,
7873}
7874#[allow(clippy::struct_field_names)]
7876#[derive(Default)]
7877pub struct PartyIdentification272Builder {
7878 nm: ::std::option::Option<Max140Text>,
7879 pstl_adr: ::std::option::Option<PostalAddress27>,
7880 id: ::std::option::Option<crate::common::ChoiceWrapper<Party52Choice>>,
7881 ctry_of_res: ::std::option::Option<CountryCode>,
7882 ctct_dtls: ::std::option::Option<Contact13>,
7883}
7884impl PartyIdentification272Builder {
7885 #[must_use]
7887 pub fn nm(mut self, value: Max140Text) -> PartyIdentification272Builder {
7888 self.nm = ::std::option::Option::Some(value);
7889 self
7890 }
7891 #[must_use]
7893 pub fn pstl_adr(mut self, value: PostalAddress27) -> PartyIdentification272Builder {
7894 self.pstl_adr = ::std::option::Option::Some(value);
7895 self
7896 }
7897 #[must_use]
7899 pub fn id(
7900 mut self,
7901 value: crate::common::ChoiceWrapper<Party52Choice>,
7902 ) -> PartyIdentification272Builder {
7903 self.id = ::std::option::Option::Some(value);
7904 self
7905 }
7906 #[must_use]
7908 pub fn ctry_of_res(mut self, value: CountryCode) -> PartyIdentification272Builder {
7909 self.ctry_of_res = ::std::option::Option::Some(value);
7910 self
7911 }
7912 #[must_use]
7914 pub fn ctct_dtls(mut self, value: Contact13) -> PartyIdentification272Builder {
7915 self.ctct_dtls = ::std::option::Option::Some(value);
7916 self
7917 }
7918 pub fn build(
7930 self,
7931 ) -> ::std::result::Result<PartyIdentification272, crate::common::BuilderError> {
7932 ::std::result::Result::Ok(PartyIdentification272 {
7933 nm: self.nm,
7934 pstl_adr: self.pstl_adr,
7935 id: self.id,
7936 ctry_of_res: self.ctry_of_res,
7937 ctct_dtls: self.ctct_dtls,
7938 })
7939 }
7940}
7941impl PartyIdentification272 {
7942 #[must_use]
7944 pub fn builder() -> PartyIdentification272Builder {
7945 PartyIdentification272Builder::default()
7946 }
7947}
7948#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7949pub struct PaymentIdentification13 {
7950 #[serde(rename = "InstrId")]
7951 #[serde(skip_serializing_if = "Option::is_none")]
7952 pub instr_id: Option<Max35Text>,
7953 #[serde(rename = "EndToEndId")]
7954 pub end_to_end_id: Max35Text,
7955 #[serde(rename = "TxId")]
7956 #[serde(skip_serializing_if = "Option::is_none")]
7957 pub tx_id: Option<Max35Text>,
7958 #[serde(rename = "UETR")]
7959 #[serde(skip_serializing_if = "Option::is_none")]
7960 pub uetr: Option<UUIDv4Identifier>,
7961 #[serde(rename = "ClrSysRef")]
7962 #[serde(skip_serializing_if = "Option::is_none")]
7963 pub clr_sys_ref: Option<Max35Text>,
7964}
7965#[allow(clippy::struct_field_names)]
7967#[derive(Default)]
7968pub struct PaymentIdentification13Builder {
7969 instr_id: ::std::option::Option<Max35Text>,
7970 end_to_end_id: ::std::option::Option<Max35Text>,
7971 tx_id: ::std::option::Option<Max35Text>,
7972 uetr: ::std::option::Option<UUIDv4Identifier>,
7973 clr_sys_ref: ::std::option::Option<Max35Text>,
7974}
7975impl PaymentIdentification13Builder {
7976 #[must_use]
7978 pub fn instr_id(mut self, value: Max35Text) -> PaymentIdentification13Builder {
7979 self.instr_id = ::std::option::Option::Some(value);
7980 self
7981 }
7982 #[must_use]
7984 pub fn end_to_end_id(mut self, value: Max35Text) -> PaymentIdentification13Builder {
7985 self.end_to_end_id = ::std::option::Option::Some(value);
7986 self
7987 }
7988 #[must_use]
7990 pub fn tx_id(mut self, value: Max35Text) -> PaymentIdentification13Builder {
7991 self.tx_id = ::std::option::Option::Some(value);
7992 self
7993 }
7994 #[must_use]
7996 pub fn uetr(mut self, value: UUIDv4Identifier) -> PaymentIdentification13Builder {
7997 self.uetr = ::std::option::Option::Some(value);
7998 self
7999 }
8000 #[must_use]
8002 pub fn clr_sys_ref(mut self, value: Max35Text) -> PaymentIdentification13Builder {
8003 self.clr_sys_ref = ::std::option::Option::Some(value);
8004 self
8005 }
8006 pub fn build(
8018 self,
8019 ) -> ::std::result::Result<PaymentIdentification13, crate::common::BuilderError> {
8020 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8021 if self.end_to_end_id.is_none() {
8022 missing.push("end_to_end_id".to_owned());
8023 }
8024 if !missing.is_empty() {
8025 return ::std::result::Result::Err(crate::common::BuilderError {
8026 type_name: "PaymentIdentification13".to_owned(),
8027 missing_fields: missing,
8028 });
8029 }
8030 ::std::result::Result::Ok(PaymentIdentification13 {
8031 instr_id: self.instr_id,
8032 end_to_end_id: self.end_to_end_id.unwrap(),
8033 tx_id: self.tx_id,
8034 uetr: self.uetr,
8035 clr_sys_ref: self.clr_sys_ref,
8036 })
8037 }
8038}
8039impl PaymentIdentification13 {
8040 #[must_use]
8042 pub fn builder() -> PaymentIdentification13Builder {
8043 PaymentIdentification13Builder::default()
8044 }
8045}
8046#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8047pub struct PaymentTypeInformation28 {
8048 #[serde(rename = "InstrPrty")]
8049 #[serde(skip_serializing_if = "Option::is_none")]
8050 pub instr_prty: Option<Priority2Code>,
8051 #[serde(rename = "ClrChanl")]
8052 #[serde(skip_serializing_if = "Option::is_none")]
8053 pub clr_chanl: Option<ClearingChannel2Code>,
8054 #[serde(rename = "SvcLvl")]
8055 #[serde(default)]
8056 #[serde(skip_serializing_if = "Vec::is_empty")]
8057 pub svc_lvl: Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8058 #[serde(rename = "LclInstrm")]
8059 #[serde(skip_serializing_if = "Option::is_none")]
8060 pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
8061 #[serde(rename = "CtgyPurp")]
8062 #[serde(skip_serializing_if = "Option::is_none")]
8063 pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
8064}
8065#[allow(clippy::struct_field_names)]
8067#[derive(Default)]
8068pub struct PaymentTypeInformation28Builder {
8069 instr_prty: ::std::option::Option<Priority2Code>,
8070 clr_chanl: ::std::option::Option<ClearingChannel2Code>,
8071 svc_lvl: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8072 lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
8073 ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
8074}
8075impl PaymentTypeInformation28Builder {
8076 #[must_use]
8078 pub fn instr_prty(mut self, value: Priority2Code) -> PaymentTypeInformation28Builder {
8079 self.instr_prty = ::std::option::Option::Some(value);
8080 self
8081 }
8082 #[must_use]
8084 pub fn clr_chanl(mut self, value: ClearingChannel2Code) -> PaymentTypeInformation28Builder {
8085 self.clr_chanl = ::std::option::Option::Some(value);
8086 self
8087 }
8088 #[must_use]
8090 pub fn svc_lvl(
8091 mut self,
8092 value: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
8093 ) -> PaymentTypeInformation28Builder {
8094 self.svc_lvl = value;
8095 self
8096 }
8097 #[must_use]
8099 pub fn add_svc_lvl(
8100 mut self,
8101 value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
8102 ) -> PaymentTypeInformation28Builder {
8103 self.svc_lvl.push(value);
8104 self
8105 }
8106 #[must_use]
8108 pub fn lcl_instrm(
8109 mut self,
8110 value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
8111 ) -> PaymentTypeInformation28Builder {
8112 self.lcl_instrm = ::std::option::Option::Some(value);
8113 self
8114 }
8115 #[must_use]
8117 pub fn ctgy_purp(
8118 mut self,
8119 value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
8120 ) -> PaymentTypeInformation28Builder {
8121 self.ctgy_purp = ::std::option::Option::Some(value);
8122 self
8123 }
8124 pub fn build(
8136 self,
8137 ) -> ::std::result::Result<PaymentTypeInformation28, crate::common::BuilderError> {
8138 ::std::result::Result::Ok(PaymentTypeInformation28 {
8139 instr_prty: self.instr_prty,
8140 clr_chanl: self.clr_chanl,
8141 svc_lvl: self.svc_lvl,
8142 lcl_instrm: self.lcl_instrm,
8143 ctgy_purp: self.ctgy_purp,
8144 })
8145 }
8146}
8147impl PaymentTypeInformation28 {
8148 #[must_use]
8150 pub fn builder() -> PaymentTypeInformation28Builder {
8151 PaymentTypeInformation28Builder::default()
8152 }
8153}
8154#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8155pub struct PersonIdentification18 {
8156 #[serde(rename = "DtAndPlcOfBirth")]
8157 #[serde(skip_serializing_if = "Option::is_none")]
8158 pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
8159 #[serde(rename = "Othr")]
8160 #[serde(default)]
8161 #[serde(skip_serializing_if = "Vec::is_empty")]
8162 pub othr: Vec<GenericPersonIdentification2>,
8163}
8164#[allow(clippy::struct_field_names)]
8166#[derive(Default)]
8167pub struct PersonIdentification18Builder {
8168 dt_and_plc_of_birth: ::std::option::Option<DateAndPlaceOfBirth1>,
8169 othr: ::std::vec::Vec<GenericPersonIdentification2>,
8170}
8171impl PersonIdentification18Builder {
8172 #[must_use]
8174 pub fn dt_and_plc_of_birth(
8175 mut self,
8176 value: DateAndPlaceOfBirth1,
8177 ) -> PersonIdentification18Builder {
8178 self.dt_and_plc_of_birth = ::std::option::Option::Some(value);
8179 self
8180 }
8181 #[must_use]
8183 pub fn othr(
8184 mut self,
8185 value: ::std::vec::Vec<GenericPersonIdentification2>,
8186 ) -> PersonIdentification18Builder {
8187 self.othr = value;
8188 self
8189 }
8190 #[must_use]
8192 pub fn add_othr(
8193 mut self,
8194 value: GenericPersonIdentification2,
8195 ) -> PersonIdentification18Builder {
8196 self.othr.push(value);
8197 self
8198 }
8199 pub fn build(
8211 self,
8212 ) -> ::std::result::Result<PersonIdentification18, crate::common::BuilderError> {
8213 ::std::result::Result::Ok(PersonIdentification18 {
8214 dt_and_plc_of_birth: self.dt_and_plc_of_birth,
8215 othr: self.othr,
8216 })
8217 }
8218}
8219impl PersonIdentification18 {
8220 #[must_use]
8222 pub fn builder() -> PersonIdentification18Builder {
8223 PersonIdentification18Builder::default()
8224 }
8225}
8226#[allow(clippy::large_enum_variant)]
8227#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8228pub enum PersonIdentificationSchemeName1Choice {
8229 #[serde(rename = "Cd")]
8230 Cd(ExternalPersonIdentification1Code),
8231 #[serde(rename = "Prtry")]
8232 Prtry(Max35Text),
8233}
8234#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8235pub struct PostalAddress27 {
8236 #[serde(rename = "AdrTp")]
8237 #[serde(skip_serializing_if = "Option::is_none")]
8238 pub adr_tp: Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
8239 #[serde(rename = "CareOf")]
8240 #[serde(skip_serializing_if = "Option::is_none")]
8241 pub care_of: Option<Max140Text>,
8242 #[serde(rename = "Dept")]
8243 #[serde(skip_serializing_if = "Option::is_none")]
8244 pub dept: Option<Max70Text>,
8245 #[serde(rename = "SubDept")]
8246 #[serde(skip_serializing_if = "Option::is_none")]
8247 pub sub_dept: Option<Max70Text>,
8248 #[serde(rename = "StrtNm")]
8249 #[serde(skip_serializing_if = "Option::is_none")]
8250 pub strt_nm: Option<Max140Text>,
8251 #[serde(rename = "BldgNb")]
8252 #[serde(skip_serializing_if = "Option::is_none")]
8253 pub bldg_nb: Option<Max16Text>,
8254 #[serde(rename = "BldgNm")]
8255 #[serde(skip_serializing_if = "Option::is_none")]
8256 pub bldg_nm: Option<Max140Text>,
8257 #[serde(rename = "Flr")]
8258 #[serde(skip_serializing_if = "Option::is_none")]
8259 pub flr: Option<Max70Text>,
8260 #[serde(rename = "UnitNb")]
8261 #[serde(skip_serializing_if = "Option::is_none")]
8262 pub unit_nb: Option<Max16Text>,
8263 #[serde(rename = "PstBx")]
8264 #[serde(skip_serializing_if = "Option::is_none")]
8265 pub pst_bx: Option<Max16Text>,
8266 #[serde(rename = "Room")]
8267 #[serde(skip_serializing_if = "Option::is_none")]
8268 pub room: Option<Max70Text>,
8269 #[serde(rename = "PstCd")]
8270 #[serde(skip_serializing_if = "Option::is_none")]
8271 pub pst_cd: Option<Max16Text>,
8272 #[serde(rename = "TwnNm")]
8273 #[serde(skip_serializing_if = "Option::is_none")]
8274 pub twn_nm: Option<Max140Text>,
8275 #[serde(rename = "TwnLctnNm")]
8276 #[serde(skip_serializing_if = "Option::is_none")]
8277 pub twn_lctn_nm: Option<Max140Text>,
8278 #[serde(rename = "DstrctNm")]
8279 #[serde(skip_serializing_if = "Option::is_none")]
8280 pub dstrct_nm: Option<Max140Text>,
8281 #[serde(rename = "CtrySubDvsn")]
8282 #[serde(skip_serializing_if = "Option::is_none")]
8283 pub ctry_sub_dvsn: Option<Max35Text>,
8284 #[serde(rename = "Ctry")]
8285 #[serde(skip_serializing_if = "Option::is_none")]
8286 pub ctry: Option<CountryCode>,
8287 #[serde(rename = "AdrLine")]
8288 #[serde(default)]
8290 #[serde(skip_serializing_if = "Vec::is_empty")]
8291 pub adr_line: Vec<Max70Text>,
8292}
8293#[allow(clippy::struct_field_names)]
8295#[derive(Default)]
8296pub struct PostalAddress27Builder {
8297 adr_tp: ::std::option::Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
8298 care_of: ::std::option::Option<Max140Text>,
8299 dept: ::std::option::Option<Max70Text>,
8300 sub_dept: ::std::option::Option<Max70Text>,
8301 strt_nm: ::std::option::Option<Max140Text>,
8302 bldg_nb: ::std::option::Option<Max16Text>,
8303 bldg_nm: ::std::option::Option<Max140Text>,
8304 flr: ::std::option::Option<Max70Text>,
8305 unit_nb: ::std::option::Option<Max16Text>,
8306 pst_bx: ::std::option::Option<Max16Text>,
8307 room: ::std::option::Option<Max70Text>,
8308 pst_cd: ::std::option::Option<Max16Text>,
8309 twn_nm: ::std::option::Option<Max140Text>,
8310 twn_lctn_nm: ::std::option::Option<Max140Text>,
8311 dstrct_nm: ::std::option::Option<Max140Text>,
8312 ctry_sub_dvsn: ::std::option::Option<Max35Text>,
8313 ctry: ::std::option::Option<CountryCode>,
8314 adr_line: ::std::vec::Vec<Max70Text>,
8315}
8316impl PostalAddress27Builder {
8317 #[must_use]
8319 pub fn adr_tp(
8320 mut self,
8321 value: crate::common::ChoiceWrapper<AddressType3Choice>,
8322 ) -> PostalAddress27Builder {
8323 self.adr_tp = ::std::option::Option::Some(value);
8324 self
8325 }
8326 #[must_use]
8328 pub fn care_of(mut self, value: Max140Text) -> PostalAddress27Builder {
8329 self.care_of = ::std::option::Option::Some(value);
8330 self
8331 }
8332 #[must_use]
8334 pub fn dept(mut self, value: Max70Text) -> PostalAddress27Builder {
8335 self.dept = ::std::option::Option::Some(value);
8336 self
8337 }
8338 #[must_use]
8340 pub fn sub_dept(mut self, value: Max70Text) -> PostalAddress27Builder {
8341 self.sub_dept = ::std::option::Option::Some(value);
8342 self
8343 }
8344 #[must_use]
8346 pub fn strt_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8347 self.strt_nm = ::std::option::Option::Some(value);
8348 self
8349 }
8350 #[must_use]
8352 pub fn bldg_nb(mut self, value: Max16Text) -> PostalAddress27Builder {
8353 self.bldg_nb = ::std::option::Option::Some(value);
8354 self
8355 }
8356 #[must_use]
8358 pub fn bldg_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8359 self.bldg_nm = ::std::option::Option::Some(value);
8360 self
8361 }
8362 #[must_use]
8364 pub fn flr(mut self, value: Max70Text) -> PostalAddress27Builder {
8365 self.flr = ::std::option::Option::Some(value);
8366 self
8367 }
8368 #[must_use]
8370 pub fn unit_nb(mut self, value: Max16Text) -> PostalAddress27Builder {
8371 self.unit_nb = ::std::option::Option::Some(value);
8372 self
8373 }
8374 #[must_use]
8376 pub fn pst_bx(mut self, value: Max16Text) -> PostalAddress27Builder {
8377 self.pst_bx = ::std::option::Option::Some(value);
8378 self
8379 }
8380 #[must_use]
8382 pub fn room(mut self, value: Max70Text) -> PostalAddress27Builder {
8383 self.room = ::std::option::Option::Some(value);
8384 self
8385 }
8386 #[must_use]
8388 pub fn pst_cd(mut self, value: Max16Text) -> PostalAddress27Builder {
8389 self.pst_cd = ::std::option::Option::Some(value);
8390 self
8391 }
8392 #[must_use]
8394 pub fn twn_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8395 self.twn_nm = ::std::option::Option::Some(value);
8396 self
8397 }
8398 #[must_use]
8400 pub fn twn_lctn_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8401 self.twn_lctn_nm = ::std::option::Option::Some(value);
8402 self
8403 }
8404 #[must_use]
8406 pub fn dstrct_nm(mut self, value: Max140Text) -> PostalAddress27Builder {
8407 self.dstrct_nm = ::std::option::Option::Some(value);
8408 self
8409 }
8410 #[must_use]
8412 pub fn ctry_sub_dvsn(mut self, value: Max35Text) -> PostalAddress27Builder {
8413 self.ctry_sub_dvsn = ::std::option::Option::Some(value);
8414 self
8415 }
8416 #[must_use]
8418 pub fn ctry(mut self, value: CountryCode) -> PostalAddress27Builder {
8419 self.ctry = ::std::option::Option::Some(value);
8420 self
8421 }
8422 #[must_use]
8424 pub fn adr_line(mut self, value: ::std::vec::Vec<Max70Text>) -> PostalAddress27Builder {
8425 self.adr_line = value;
8426 self
8427 }
8428 #[must_use]
8430 pub fn add_adr_line(mut self, value: Max70Text) -> PostalAddress27Builder {
8431 self.adr_line.push(value);
8432 self
8433 }
8434 pub fn build(self) -> ::std::result::Result<PostalAddress27, crate::common::BuilderError> {
8446 ::std::result::Result::Ok(PostalAddress27 {
8447 adr_tp: self.adr_tp,
8448 care_of: self.care_of,
8449 dept: self.dept,
8450 sub_dept: self.sub_dept,
8451 strt_nm: self.strt_nm,
8452 bldg_nb: self.bldg_nb,
8453 bldg_nm: self.bldg_nm,
8454 flr: self.flr,
8455 unit_nb: self.unit_nb,
8456 pst_bx: self.pst_bx,
8457 room: self.room,
8458 pst_cd: self.pst_cd,
8459 twn_nm: self.twn_nm,
8460 twn_lctn_nm: self.twn_lctn_nm,
8461 dstrct_nm: self.dstrct_nm,
8462 ctry_sub_dvsn: self.ctry_sub_dvsn,
8463 ctry: self.ctry,
8464 adr_line: self.adr_line,
8465 })
8466 }
8467}
8468impl PostalAddress27 {
8469 #[must_use]
8471 pub fn builder() -> PostalAddress27Builder {
8472 PostalAddress27Builder::default()
8473 }
8474}
8475#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8476pub struct ProxyAccountIdentification1 {
8477 #[serde(rename = "Tp")]
8478 #[serde(skip_serializing_if = "Option::is_none")]
8479 pub tp: Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
8480 #[serde(rename = "Id")]
8481 pub id: Max2048Text,
8482}
8483#[allow(clippy::struct_field_names)]
8485#[derive(Default)]
8486pub struct ProxyAccountIdentification1Builder {
8487 tp: ::std::option::Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
8488 id: ::std::option::Option<Max2048Text>,
8489}
8490impl ProxyAccountIdentification1Builder {
8491 #[must_use]
8493 pub fn tp(
8494 mut self,
8495 value: crate::common::ChoiceWrapper<ProxyAccountType1Choice>,
8496 ) -> ProxyAccountIdentification1Builder {
8497 self.tp = ::std::option::Option::Some(value);
8498 self
8499 }
8500 #[must_use]
8502 pub fn id(mut self, value: Max2048Text) -> ProxyAccountIdentification1Builder {
8503 self.id = ::std::option::Option::Some(value);
8504 self
8505 }
8506 pub fn build(
8518 self,
8519 ) -> ::std::result::Result<ProxyAccountIdentification1, crate::common::BuilderError> {
8520 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8521 if self.id.is_none() {
8522 missing.push("id".to_owned());
8523 }
8524 if !missing.is_empty() {
8525 return ::std::result::Result::Err(crate::common::BuilderError {
8526 type_name: "ProxyAccountIdentification1".to_owned(),
8527 missing_fields: missing,
8528 });
8529 }
8530 ::std::result::Result::Ok(ProxyAccountIdentification1 {
8531 tp: self.tp,
8532 id: self.id.unwrap(),
8533 })
8534 }
8535}
8536impl ProxyAccountIdentification1 {
8537 #[must_use]
8539 pub fn builder() -> ProxyAccountIdentification1Builder {
8540 ProxyAccountIdentification1Builder::default()
8541 }
8542}
8543#[allow(clippy::large_enum_variant)]
8544#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8545pub enum ProxyAccountType1Choice {
8546 #[serde(rename = "Cd")]
8547 Cd(ExternalProxyAccountType1Code),
8548 #[serde(rename = "Prtry")]
8549 Prtry(Max35Text),
8550}
8551#[allow(clippy::large_enum_variant)]
8552#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8553pub enum Purpose2Choice {
8554 #[serde(rename = "Cd")]
8555 Cd(ExternalPurpose1Code),
8556 #[serde(rename = "Prtry")]
8557 Prtry(Max35Text),
8558}
8559#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8560pub struct ReferredDocumentInformation8 {
8561 #[serde(rename = "Tp")]
8562 #[serde(skip_serializing_if = "Option::is_none")]
8563 pub tp: Option<DocumentType1>,
8564 #[serde(rename = "Nb")]
8565 #[serde(skip_serializing_if = "Option::is_none")]
8566 pub nb: Option<Max35Text>,
8567 #[serde(rename = "RltdDt")]
8568 #[serde(skip_serializing_if = "Option::is_none")]
8569 pub rltd_dt: Option<DateAndType1>,
8570 #[serde(rename = "LineDtls")]
8571 #[serde(default)]
8572 #[serde(skip_serializing_if = "Vec::is_empty")]
8573 pub line_dtls: Vec<DocumentLineInformation2>,
8574}
8575#[allow(clippy::struct_field_names)]
8577#[derive(Default)]
8578pub struct ReferredDocumentInformation8Builder {
8579 tp: ::std::option::Option<DocumentType1>,
8580 nb: ::std::option::Option<Max35Text>,
8581 rltd_dt: ::std::option::Option<DateAndType1>,
8582 line_dtls: ::std::vec::Vec<DocumentLineInformation2>,
8583}
8584impl ReferredDocumentInformation8Builder {
8585 #[must_use]
8587 pub fn tp(mut self, value: DocumentType1) -> ReferredDocumentInformation8Builder {
8588 self.tp = ::std::option::Option::Some(value);
8589 self
8590 }
8591 #[must_use]
8593 pub fn nb(mut self, value: Max35Text) -> ReferredDocumentInformation8Builder {
8594 self.nb = ::std::option::Option::Some(value);
8595 self
8596 }
8597 #[must_use]
8599 pub fn rltd_dt(mut self, value: DateAndType1) -> ReferredDocumentInformation8Builder {
8600 self.rltd_dt = ::std::option::Option::Some(value);
8601 self
8602 }
8603 #[must_use]
8605 pub fn line_dtls(
8606 mut self,
8607 value: ::std::vec::Vec<DocumentLineInformation2>,
8608 ) -> ReferredDocumentInformation8Builder {
8609 self.line_dtls = value;
8610 self
8611 }
8612 #[must_use]
8614 pub fn add_line_dtls(
8615 mut self,
8616 value: DocumentLineInformation2,
8617 ) -> ReferredDocumentInformation8Builder {
8618 self.line_dtls.push(value);
8619 self
8620 }
8621 pub fn build(
8633 self,
8634 ) -> ::std::result::Result<ReferredDocumentInformation8, crate::common::BuilderError> {
8635 ::std::result::Result::Ok(ReferredDocumentInformation8 {
8636 tp: self.tp,
8637 nb: self.nb,
8638 rltd_dt: self.rltd_dt,
8639 line_dtls: self.line_dtls,
8640 })
8641 }
8642}
8643impl ReferredDocumentInformation8 {
8644 #[must_use]
8646 pub fn builder() -> ReferredDocumentInformation8Builder {
8647 ReferredDocumentInformation8Builder::default()
8648 }
8649}
8650#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8651pub struct RegulatoryAuthority2 {
8652 #[serde(rename = "Nm")]
8653 #[serde(skip_serializing_if = "Option::is_none")]
8654 pub nm: Option<Max140Text>,
8655 #[serde(rename = "Ctry")]
8656 #[serde(skip_serializing_if = "Option::is_none")]
8657 pub ctry: Option<CountryCode>,
8658}
8659#[allow(clippy::struct_field_names)]
8661#[derive(Default)]
8662pub struct RegulatoryAuthority2Builder {
8663 nm: ::std::option::Option<Max140Text>,
8664 ctry: ::std::option::Option<CountryCode>,
8665}
8666impl RegulatoryAuthority2Builder {
8667 #[must_use]
8669 pub fn nm(mut self, value: Max140Text) -> RegulatoryAuthority2Builder {
8670 self.nm = ::std::option::Option::Some(value);
8671 self
8672 }
8673 #[must_use]
8675 pub fn ctry(mut self, value: CountryCode) -> RegulatoryAuthority2Builder {
8676 self.ctry = ::std::option::Option::Some(value);
8677 self
8678 }
8679 pub fn build(self) -> ::std::result::Result<RegulatoryAuthority2, crate::common::BuilderError> {
8691 ::std::result::Result::Ok(RegulatoryAuthority2 {
8692 nm: self.nm,
8693 ctry: self.ctry,
8694 })
8695 }
8696}
8697impl RegulatoryAuthority2 {
8698 #[must_use]
8700 pub fn builder() -> RegulatoryAuthority2Builder {
8701 RegulatoryAuthority2Builder::default()
8702 }
8703}
8704#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8705pub struct RegulatoryReporting3 {
8706 #[serde(rename = "DbtCdtRptgInd")]
8707 #[serde(skip_serializing_if = "Option::is_none")]
8708 pub dbt_cdt_rptg_ind: Option<RegulatoryReportingType1Code>,
8709 #[serde(rename = "Authrty")]
8710 #[serde(skip_serializing_if = "Option::is_none")]
8711 pub authrty: Option<RegulatoryAuthority2>,
8712 #[serde(rename = "Dtls")]
8713 #[serde(default)]
8714 #[serde(skip_serializing_if = "Vec::is_empty")]
8715 pub dtls: Vec<StructuredRegulatoryReporting3>,
8716}
8717#[allow(clippy::struct_field_names)]
8719#[derive(Default)]
8720pub struct RegulatoryReporting3Builder {
8721 dbt_cdt_rptg_ind: ::std::option::Option<RegulatoryReportingType1Code>,
8722 authrty: ::std::option::Option<RegulatoryAuthority2>,
8723 dtls: ::std::vec::Vec<StructuredRegulatoryReporting3>,
8724}
8725impl RegulatoryReporting3Builder {
8726 #[must_use]
8728 pub fn dbt_cdt_rptg_ind(
8729 mut self,
8730 value: RegulatoryReportingType1Code,
8731 ) -> RegulatoryReporting3Builder {
8732 self.dbt_cdt_rptg_ind = ::std::option::Option::Some(value);
8733 self
8734 }
8735 #[must_use]
8737 pub fn authrty(mut self, value: RegulatoryAuthority2) -> RegulatoryReporting3Builder {
8738 self.authrty = ::std::option::Option::Some(value);
8739 self
8740 }
8741 #[must_use]
8743 pub fn dtls(
8744 mut self,
8745 value: ::std::vec::Vec<StructuredRegulatoryReporting3>,
8746 ) -> RegulatoryReporting3Builder {
8747 self.dtls = value;
8748 self
8749 }
8750 #[must_use]
8752 pub fn add_dtls(
8753 mut self,
8754 value: StructuredRegulatoryReporting3,
8755 ) -> RegulatoryReporting3Builder {
8756 self.dtls.push(value);
8757 self
8758 }
8759 pub fn build(self) -> ::std::result::Result<RegulatoryReporting3, crate::common::BuilderError> {
8771 ::std::result::Result::Ok(RegulatoryReporting3 {
8772 dbt_cdt_rptg_ind: self.dbt_cdt_rptg_ind,
8773 authrty: self.authrty,
8774 dtls: self.dtls,
8775 })
8776 }
8777}
8778impl RegulatoryReporting3 {
8779 #[must_use]
8781 pub fn builder() -> RegulatoryReporting3Builder {
8782 RegulatoryReporting3Builder::default()
8783 }
8784}
8785#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8786pub struct RemittanceAmount4 {
8787 #[serde(rename = "RmtAmtAndTp")]
8788 #[serde(default)]
8789 #[serde(skip_serializing_if = "Vec::is_empty")]
8790 pub rmt_amt_and_tp: Vec<DocumentAmount1>,
8791 #[serde(rename = "AdjstmntAmtAndRsn")]
8792 #[serde(default)]
8793 #[serde(skip_serializing_if = "Vec::is_empty")]
8794 pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
8795}
8796#[allow(clippy::struct_field_names)]
8798#[derive(Default)]
8799pub struct RemittanceAmount4Builder {
8800 rmt_amt_and_tp: ::std::vec::Vec<DocumentAmount1>,
8801 adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
8802}
8803impl RemittanceAmount4Builder {
8804 #[must_use]
8806 pub fn rmt_amt_and_tp(
8807 mut self,
8808 value: ::std::vec::Vec<DocumentAmount1>,
8809 ) -> RemittanceAmount4Builder {
8810 self.rmt_amt_and_tp = value;
8811 self
8812 }
8813 #[must_use]
8815 pub fn add_rmt_amt_and_tp(mut self, value: DocumentAmount1) -> RemittanceAmount4Builder {
8816 self.rmt_amt_and_tp.push(value);
8817 self
8818 }
8819 #[must_use]
8821 pub fn adjstmnt_amt_and_rsn(
8822 mut self,
8823 value: ::std::vec::Vec<DocumentAdjustment1>,
8824 ) -> RemittanceAmount4Builder {
8825 self.adjstmnt_amt_and_rsn = value;
8826 self
8827 }
8828 #[must_use]
8830 pub fn add_adjstmnt_amt_and_rsn(
8831 mut self,
8832 value: DocumentAdjustment1,
8833 ) -> RemittanceAmount4Builder {
8834 self.adjstmnt_amt_and_rsn.push(value);
8835 self
8836 }
8837 pub fn build(self) -> ::std::result::Result<RemittanceAmount4, crate::common::BuilderError> {
8849 ::std::result::Result::Ok(RemittanceAmount4 {
8850 rmt_amt_and_tp: self.rmt_amt_and_tp,
8851 adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
8852 })
8853 }
8854}
8855impl RemittanceAmount4 {
8856 #[must_use]
8858 pub fn builder() -> RemittanceAmount4Builder {
8859 RemittanceAmount4Builder::default()
8860 }
8861}
8862#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8863pub struct RemittanceInformation22 {
8864 #[serde(rename = "Ustrd")]
8865 #[serde(default)]
8866 #[serde(skip_serializing_if = "Vec::is_empty")]
8867 pub ustrd: Vec<Max140Text>,
8868 #[serde(rename = "Strd")]
8869 #[serde(default)]
8870 #[serde(skip_serializing_if = "Vec::is_empty")]
8871 pub strd: Vec<StructuredRemittanceInformation18>,
8872}
8873#[allow(clippy::struct_field_names)]
8875#[derive(Default)]
8876pub struct RemittanceInformation22Builder {
8877 ustrd: ::std::vec::Vec<Max140Text>,
8878 strd: ::std::vec::Vec<StructuredRemittanceInformation18>,
8879}
8880impl RemittanceInformation22Builder {
8881 #[must_use]
8883 pub fn ustrd(mut self, value: ::std::vec::Vec<Max140Text>) -> RemittanceInformation22Builder {
8884 self.ustrd = value;
8885 self
8886 }
8887 #[must_use]
8889 pub fn add_ustrd(mut self, value: Max140Text) -> RemittanceInformation22Builder {
8890 self.ustrd.push(value);
8891 self
8892 }
8893 #[must_use]
8895 pub fn strd(
8896 mut self,
8897 value: ::std::vec::Vec<StructuredRemittanceInformation18>,
8898 ) -> RemittanceInformation22Builder {
8899 self.strd = value;
8900 self
8901 }
8902 #[must_use]
8904 pub fn add_strd(
8905 mut self,
8906 value: StructuredRemittanceInformation18,
8907 ) -> RemittanceInformation22Builder {
8908 self.strd.push(value);
8909 self
8910 }
8911 pub fn build(
8923 self,
8924 ) -> ::std::result::Result<RemittanceInformation22, crate::common::BuilderError> {
8925 ::std::result::Result::Ok(RemittanceInformation22 {
8926 ustrd: self.ustrd,
8927 strd: self.strd,
8928 })
8929 }
8930}
8931impl RemittanceInformation22 {
8932 #[must_use]
8934 pub fn builder() -> RemittanceInformation22Builder {
8935 RemittanceInformation22Builder::default()
8936 }
8937}
8938#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8939pub struct RemittanceLocation8 {
8940 #[serde(rename = "RmtId")]
8941 #[serde(skip_serializing_if = "Option::is_none")]
8942 pub rmt_id: Option<Max35Text>,
8943 #[serde(rename = "RmtLctnDtls")]
8944 #[serde(default)]
8945 #[serde(skip_serializing_if = "Vec::is_empty")]
8946 pub rmt_lctn_dtls: Vec<RemittanceLocationData2>,
8947}
8948#[allow(clippy::struct_field_names)]
8950#[derive(Default)]
8951pub struct RemittanceLocation8Builder {
8952 rmt_id: ::std::option::Option<Max35Text>,
8953 rmt_lctn_dtls: ::std::vec::Vec<RemittanceLocationData2>,
8954}
8955impl RemittanceLocation8Builder {
8956 #[must_use]
8958 pub fn rmt_id(mut self, value: Max35Text) -> RemittanceLocation8Builder {
8959 self.rmt_id = ::std::option::Option::Some(value);
8960 self
8961 }
8962 #[must_use]
8964 pub fn rmt_lctn_dtls(
8965 mut self,
8966 value: ::std::vec::Vec<RemittanceLocationData2>,
8967 ) -> RemittanceLocation8Builder {
8968 self.rmt_lctn_dtls = value;
8969 self
8970 }
8971 #[must_use]
8973 pub fn add_rmt_lctn_dtls(
8974 mut self,
8975 value: RemittanceLocationData2,
8976 ) -> RemittanceLocation8Builder {
8977 self.rmt_lctn_dtls.push(value);
8978 self
8979 }
8980 pub fn build(self) -> ::std::result::Result<RemittanceLocation8, crate::common::BuilderError> {
8992 ::std::result::Result::Ok(RemittanceLocation8 {
8993 rmt_id: self.rmt_id,
8994 rmt_lctn_dtls: self.rmt_lctn_dtls,
8995 })
8996 }
8997}
8998impl RemittanceLocation8 {
8999 #[must_use]
9001 pub fn builder() -> RemittanceLocation8Builder {
9002 RemittanceLocation8Builder::default()
9003 }
9004}
9005#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9006pub struct RemittanceLocationData2 {
9007 #[serde(rename = "Mtd")]
9008 pub mtd: RemittanceLocationMethod2Code,
9009 #[serde(rename = "ElctrncAdr")]
9010 #[serde(skip_serializing_if = "Option::is_none")]
9011 pub elctrnc_adr: Option<Max2048Text>,
9012 #[serde(rename = "PstlAdr")]
9013 #[serde(skip_serializing_if = "Option::is_none")]
9014 pub pstl_adr: Option<NameAndAddress18>,
9015}
9016#[allow(clippy::struct_field_names)]
9018#[derive(Default)]
9019pub struct RemittanceLocationData2Builder {
9020 mtd: ::std::option::Option<RemittanceLocationMethod2Code>,
9021 elctrnc_adr: ::std::option::Option<Max2048Text>,
9022 pstl_adr: ::std::option::Option<NameAndAddress18>,
9023}
9024impl RemittanceLocationData2Builder {
9025 #[must_use]
9027 pub fn mtd(mut self, value: RemittanceLocationMethod2Code) -> RemittanceLocationData2Builder {
9028 self.mtd = ::std::option::Option::Some(value);
9029 self
9030 }
9031 #[must_use]
9033 pub fn elctrnc_adr(mut self, value: Max2048Text) -> RemittanceLocationData2Builder {
9034 self.elctrnc_adr = ::std::option::Option::Some(value);
9035 self
9036 }
9037 #[must_use]
9039 pub fn pstl_adr(mut self, value: NameAndAddress18) -> RemittanceLocationData2Builder {
9040 self.pstl_adr = ::std::option::Option::Some(value);
9041 self
9042 }
9043 pub fn build(
9055 self,
9056 ) -> ::std::result::Result<RemittanceLocationData2, crate::common::BuilderError> {
9057 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9058 if self.mtd.is_none() {
9059 missing.push("mtd".to_owned());
9060 }
9061 if !missing.is_empty() {
9062 return ::std::result::Result::Err(crate::common::BuilderError {
9063 type_name: "RemittanceLocationData2".to_owned(),
9064 missing_fields: missing,
9065 });
9066 }
9067 ::std::result::Result::Ok(RemittanceLocationData2 {
9068 mtd: self.mtd.unwrap(),
9069 elctrnc_adr: self.elctrnc_adr,
9070 pstl_adr: self.pstl_adr,
9071 })
9072 }
9073}
9074impl RemittanceLocationData2 {
9075 #[must_use]
9077 pub fn builder() -> RemittanceLocationData2Builder {
9078 RemittanceLocationData2Builder::default()
9079 }
9080}
9081#[allow(clippy::large_enum_variant)]
9082#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9083pub enum ServiceLevel8Choice {
9084 #[serde(rename = "Cd")]
9085 Cd(ExternalServiceLevel1Code),
9086 #[serde(rename = "Prtry")]
9087 Prtry(Max35Text),
9088}
9089#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9090pub struct SettlementDateTimeIndication1 {
9091 #[serde(rename = "DbtDtTm")]
9092 #[serde(skip_serializing_if = "Option::is_none")]
9093 pub dbt_dt_tm: Option<ISODateTime>,
9094 #[serde(rename = "CdtDtTm")]
9095 #[serde(skip_serializing_if = "Option::is_none")]
9096 pub cdt_dt_tm: Option<ISODateTime>,
9097}
9098#[allow(clippy::struct_field_names)]
9100#[derive(Default)]
9101pub struct SettlementDateTimeIndication1Builder {
9102 dbt_dt_tm: ::std::option::Option<ISODateTime>,
9103 cdt_dt_tm: ::std::option::Option<ISODateTime>,
9104}
9105impl SettlementDateTimeIndication1Builder {
9106 #[must_use]
9108 pub fn dbt_dt_tm(mut self, value: ISODateTime) -> SettlementDateTimeIndication1Builder {
9109 self.dbt_dt_tm = ::std::option::Option::Some(value);
9110 self
9111 }
9112 #[must_use]
9114 pub fn cdt_dt_tm(mut self, value: ISODateTime) -> SettlementDateTimeIndication1Builder {
9115 self.cdt_dt_tm = ::std::option::Option::Some(value);
9116 self
9117 }
9118 pub fn build(
9130 self,
9131 ) -> ::std::result::Result<SettlementDateTimeIndication1, crate::common::BuilderError> {
9132 ::std::result::Result::Ok(SettlementDateTimeIndication1 {
9133 dbt_dt_tm: self.dbt_dt_tm,
9134 cdt_dt_tm: self.cdt_dt_tm,
9135 })
9136 }
9137}
9138impl SettlementDateTimeIndication1 {
9139 #[must_use]
9141 pub fn builder() -> SettlementDateTimeIndication1Builder {
9142 SettlementDateTimeIndication1Builder::default()
9143 }
9144}
9145#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9146pub struct SettlementInstruction15 {
9147 #[serde(rename = "SttlmMtd")]
9148 pub sttlm_mtd: SettlementMethod1Code,
9149 #[serde(rename = "SttlmAcct")]
9150 #[serde(skip_serializing_if = "Option::is_none")]
9151 pub sttlm_acct: Option<CashAccount40>,
9152 #[serde(rename = "ClrSys")]
9153 #[serde(skip_serializing_if = "Option::is_none")]
9154 pub clr_sys: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
9155 #[serde(rename = "InstgRmbrsmntAgt")]
9156 #[serde(skip_serializing_if = "Option::is_none")]
9157 pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
9158 #[serde(rename = "InstgRmbrsmntAgtAcct")]
9159 #[serde(skip_serializing_if = "Option::is_none")]
9160 pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
9161 #[serde(rename = "InstdRmbrsmntAgt")]
9162 #[serde(skip_serializing_if = "Option::is_none")]
9163 pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
9164 #[serde(rename = "InstdRmbrsmntAgtAcct")]
9165 #[serde(skip_serializing_if = "Option::is_none")]
9166 pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
9167 #[serde(rename = "ThrdRmbrsmntAgt")]
9168 #[serde(skip_serializing_if = "Option::is_none")]
9169 pub thrd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification8>,
9170 #[serde(rename = "ThrdRmbrsmntAgtAcct")]
9171 #[serde(skip_serializing_if = "Option::is_none")]
9172 pub thrd_rmbrsmnt_agt_acct: Option<CashAccount40>,
9173}
9174#[allow(clippy::struct_field_names)]
9176#[derive(Default)]
9177pub struct SettlementInstruction15Builder {
9178 sttlm_mtd: ::std::option::Option<SettlementMethod1Code>,
9179 sttlm_acct: ::std::option::Option<CashAccount40>,
9180 clr_sys:
9181 ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
9182 instg_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
9183 instg_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
9184 instd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
9185 instd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
9186 thrd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification8>,
9187 thrd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
9188}
9189impl SettlementInstruction15Builder {
9190 #[must_use]
9192 pub fn sttlm_mtd(mut self, value: SettlementMethod1Code) -> SettlementInstruction15Builder {
9193 self.sttlm_mtd = ::std::option::Option::Some(value);
9194 self
9195 }
9196 #[must_use]
9198 pub fn sttlm_acct(mut self, value: CashAccount40) -> SettlementInstruction15Builder {
9199 self.sttlm_acct = ::std::option::Option::Some(value);
9200 self
9201 }
9202 #[must_use]
9204 pub fn clr_sys(
9205 mut self,
9206 value: crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>,
9207 ) -> SettlementInstruction15Builder {
9208 self.clr_sys = ::std::option::Option::Some(value);
9209 self
9210 }
9211 #[must_use]
9213 pub fn instg_rmbrsmnt_agt(
9214 mut self,
9215 value: BranchAndFinancialInstitutionIdentification8,
9216 ) -> SettlementInstruction15Builder {
9217 self.instg_rmbrsmnt_agt = ::std::option::Option::Some(value);
9218 self
9219 }
9220 #[must_use]
9222 pub fn instg_rmbrsmnt_agt_acct(
9223 mut self,
9224 value: CashAccount40,
9225 ) -> SettlementInstruction15Builder {
9226 self.instg_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
9227 self
9228 }
9229 #[must_use]
9231 pub fn instd_rmbrsmnt_agt(
9232 mut self,
9233 value: BranchAndFinancialInstitutionIdentification8,
9234 ) -> SettlementInstruction15Builder {
9235 self.instd_rmbrsmnt_agt = ::std::option::Option::Some(value);
9236 self
9237 }
9238 #[must_use]
9240 pub fn instd_rmbrsmnt_agt_acct(
9241 mut self,
9242 value: CashAccount40,
9243 ) -> SettlementInstruction15Builder {
9244 self.instd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
9245 self
9246 }
9247 #[must_use]
9249 pub fn thrd_rmbrsmnt_agt(
9250 mut self,
9251 value: BranchAndFinancialInstitutionIdentification8,
9252 ) -> SettlementInstruction15Builder {
9253 self.thrd_rmbrsmnt_agt = ::std::option::Option::Some(value);
9254 self
9255 }
9256 #[must_use]
9258 pub fn thrd_rmbrsmnt_agt_acct(
9259 mut self,
9260 value: CashAccount40,
9261 ) -> SettlementInstruction15Builder {
9262 self.thrd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
9263 self
9264 }
9265 pub fn build(
9277 self,
9278 ) -> ::std::result::Result<SettlementInstruction15, crate::common::BuilderError> {
9279 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9280 if self.sttlm_mtd.is_none() {
9281 missing.push("sttlm_mtd".to_owned());
9282 }
9283 if !missing.is_empty() {
9284 return ::std::result::Result::Err(crate::common::BuilderError {
9285 type_name: "SettlementInstruction15".to_owned(),
9286 missing_fields: missing,
9287 });
9288 }
9289 ::std::result::Result::Ok(SettlementInstruction15 {
9290 sttlm_mtd: self.sttlm_mtd.unwrap(),
9291 sttlm_acct: self.sttlm_acct,
9292 clr_sys: self.clr_sys,
9293 instg_rmbrsmnt_agt: self.instg_rmbrsmnt_agt,
9294 instg_rmbrsmnt_agt_acct: self.instg_rmbrsmnt_agt_acct,
9295 instd_rmbrsmnt_agt: self.instd_rmbrsmnt_agt,
9296 instd_rmbrsmnt_agt_acct: self.instd_rmbrsmnt_agt_acct,
9297 thrd_rmbrsmnt_agt: self.thrd_rmbrsmnt_agt,
9298 thrd_rmbrsmnt_agt_acct: self.thrd_rmbrsmnt_agt_acct,
9299 })
9300 }
9301}
9302impl SettlementInstruction15 {
9303 #[must_use]
9305 pub fn builder() -> SettlementInstruction15Builder {
9306 SettlementInstruction15Builder::default()
9307 }
9308}
9309#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9310pub struct SettlementTimeRequest2 {
9311 #[serde(rename = "CLSTm")]
9312 #[serde(skip_serializing_if = "Option::is_none")]
9313 pub cls_tm: Option<ISOTime>,
9314 #[serde(rename = "TillTm")]
9315 #[serde(skip_serializing_if = "Option::is_none")]
9316 pub till_tm: Option<ISOTime>,
9317 #[serde(rename = "FrTm")]
9318 #[serde(skip_serializing_if = "Option::is_none")]
9319 pub fr_tm: Option<ISOTime>,
9320 #[serde(rename = "RjctTm")]
9321 #[serde(skip_serializing_if = "Option::is_none")]
9322 pub rjct_tm: Option<ISOTime>,
9323}
9324#[allow(clippy::struct_field_names)]
9326#[derive(Default)]
9327pub struct SettlementTimeRequest2Builder {
9328 cls_tm: ::std::option::Option<ISOTime>,
9329 till_tm: ::std::option::Option<ISOTime>,
9330 fr_tm: ::std::option::Option<ISOTime>,
9331 rjct_tm: ::std::option::Option<ISOTime>,
9332}
9333impl SettlementTimeRequest2Builder {
9334 #[must_use]
9336 pub fn cls_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9337 self.cls_tm = ::std::option::Option::Some(value);
9338 self
9339 }
9340 #[must_use]
9342 pub fn till_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9343 self.till_tm = ::std::option::Option::Some(value);
9344 self
9345 }
9346 #[must_use]
9348 pub fn fr_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9349 self.fr_tm = ::std::option::Option::Some(value);
9350 self
9351 }
9352 #[must_use]
9354 pub fn rjct_tm(mut self, value: ISOTime) -> SettlementTimeRequest2Builder {
9355 self.rjct_tm = ::std::option::Option::Some(value);
9356 self
9357 }
9358 pub fn build(
9370 self,
9371 ) -> ::std::result::Result<SettlementTimeRequest2, crate::common::BuilderError> {
9372 ::std::result::Result::Ok(SettlementTimeRequest2 {
9373 cls_tm: self.cls_tm,
9374 till_tm: self.till_tm,
9375 fr_tm: self.fr_tm,
9376 rjct_tm: self.rjct_tm,
9377 })
9378 }
9379}
9380impl SettlementTimeRequest2 {
9381 #[must_use]
9383 pub fn builder() -> SettlementTimeRequest2Builder {
9384 SettlementTimeRequest2Builder::default()
9385 }
9386}
9387#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9388pub struct StructuredRegulatoryReporting3 {
9389 #[serde(rename = "Tp")]
9390 #[serde(skip_serializing_if = "Option::is_none")]
9391 pub tp: Option<Max35Text>,
9392 #[serde(rename = "Dt")]
9393 #[serde(skip_serializing_if = "Option::is_none")]
9394 pub dt: Option<ISODate>,
9395 #[serde(rename = "Ctry")]
9396 #[serde(skip_serializing_if = "Option::is_none")]
9397 pub ctry: Option<CountryCode>,
9398 #[serde(rename = "Cd")]
9399 #[serde(skip_serializing_if = "Option::is_none")]
9400 pub cd: Option<Max10Text>,
9401 #[serde(rename = "Amt")]
9402 #[serde(skip_serializing_if = "Option::is_none")]
9403 pub amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9404 #[serde(rename = "Inf")]
9405 #[serde(default)]
9406 #[serde(skip_serializing_if = "Vec::is_empty")]
9407 pub inf: Vec<Max35Text>,
9408}
9409#[allow(clippy::struct_field_names)]
9411#[derive(Default)]
9412pub struct StructuredRegulatoryReporting3Builder {
9413 tp: ::std::option::Option<Max35Text>,
9414 dt: ::std::option::Option<ISODate>,
9415 ctry: ::std::option::Option<CountryCode>,
9416 cd: ::std::option::Option<Max10Text>,
9417 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9418 inf: ::std::vec::Vec<Max35Text>,
9419}
9420impl StructuredRegulatoryReporting3Builder {
9421 #[must_use]
9423 pub fn tp(mut self, value: Max35Text) -> StructuredRegulatoryReporting3Builder {
9424 self.tp = ::std::option::Option::Some(value);
9425 self
9426 }
9427 #[must_use]
9429 pub fn dt(mut self, value: ISODate) -> StructuredRegulatoryReporting3Builder {
9430 self.dt = ::std::option::Option::Some(value);
9431 self
9432 }
9433 #[must_use]
9435 pub fn ctry(mut self, value: CountryCode) -> StructuredRegulatoryReporting3Builder {
9436 self.ctry = ::std::option::Option::Some(value);
9437 self
9438 }
9439 #[must_use]
9441 pub fn cd(mut self, value: Max10Text) -> StructuredRegulatoryReporting3Builder {
9442 self.cd = ::std::option::Option::Some(value);
9443 self
9444 }
9445 #[must_use]
9447 pub fn amt(
9448 mut self,
9449 value: ActiveOrHistoricCurrencyAndAmount,
9450 ) -> StructuredRegulatoryReporting3Builder {
9451 self.amt = ::std::option::Option::Some(value);
9452 self
9453 }
9454 #[must_use]
9456 pub fn inf(
9457 mut self,
9458 value: ::std::vec::Vec<Max35Text>,
9459 ) -> StructuredRegulatoryReporting3Builder {
9460 self.inf = value;
9461 self
9462 }
9463 #[must_use]
9465 pub fn add_inf(mut self, value: Max35Text) -> StructuredRegulatoryReporting3Builder {
9466 self.inf.push(value);
9467 self
9468 }
9469 pub fn build(
9481 self,
9482 ) -> ::std::result::Result<StructuredRegulatoryReporting3, crate::common::BuilderError> {
9483 ::std::result::Result::Ok(StructuredRegulatoryReporting3 {
9484 tp: self.tp,
9485 dt: self.dt,
9486 ctry: self.ctry,
9487 cd: self.cd,
9488 amt: self.amt,
9489 inf: self.inf,
9490 })
9491 }
9492}
9493impl StructuredRegulatoryReporting3 {
9494 #[must_use]
9496 pub fn builder() -> StructuredRegulatoryReporting3Builder {
9497 StructuredRegulatoryReporting3Builder::default()
9498 }
9499}
9500#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9501pub struct StructuredRemittanceInformation18 {
9502 #[serde(rename = "RfrdDocInf")]
9503 #[serde(default)]
9504 #[serde(skip_serializing_if = "Vec::is_empty")]
9505 pub rfrd_doc_inf: Vec<ReferredDocumentInformation8>,
9506 #[serde(rename = "RfrdDocAmt")]
9507 #[serde(skip_serializing_if = "Option::is_none")]
9508 pub rfrd_doc_amt: Option<RemittanceAmount4>,
9509 #[serde(rename = "CdtrRefInf")]
9510 #[serde(skip_serializing_if = "Option::is_none")]
9511 pub cdtr_ref_inf: Option<CreditorReferenceInformation3>,
9512 #[serde(rename = "Invcr")]
9513 #[serde(skip_serializing_if = "Option::is_none")]
9514 pub invcr: Option<PartyIdentification272>,
9515 #[serde(rename = "Invcee")]
9516 #[serde(skip_serializing_if = "Option::is_none")]
9517 pub invcee: Option<PartyIdentification272>,
9518 #[serde(rename = "TaxRmt")]
9519 #[serde(skip_serializing_if = "Option::is_none")]
9520 pub tax_rmt: Option<TaxData1>,
9521 #[serde(rename = "GrnshmtRmt")]
9522 #[serde(skip_serializing_if = "Option::is_none")]
9523 pub grnshmt_rmt: Option<Garnishment4>,
9524 #[serde(rename = "AddtlRmtInf")]
9525 #[serde(default)]
9527 #[serde(skip_serializing_if = "Vec::is_empty")]
9528 pub addtl_rmt_inf: Vec<Max140Text>,
9529}
9530#[allow(clippy::struct_field_names)]
9532#[derive(Default)]
9533pub struct StructuredRemittanceInformation18Builder {
9534 rfrd_doc_inf: ::std::vec::Vec<ReferredDocumentInformation8>,
9535 rfrd_doc_amt: ::std::option::Option<RemittanceAmount4>,
9536 cdtr_ref_inf: ::std::option::Option<CreditorReferenceInformation3>,
9537 invcr: ::std::option::Option<PartyIdentification272>,
9538 invcee: ::std::option::Option<PartyIdentification272>,
9539 tax_rmt: ::std::option::Option<TaxData1>,
9540 grnshmt_rmt: ::std::option::Option<Garnishment4>,
9541 addtl_rmt_inf: ::std::vec::Vec<Max140Text>,
9542}
9543impl StructuredRemittanceInformation18Builder {
9544 #[must_use]
9546 pub fn rfrd_doc_inf(
9547 mut self,
9548 value: ::std::vec::Vec<ReferredDocumentInformation8>,
9549 ) -> StructuredRemittanceInformation18Builder {
9550 self.rfrd_doc_inf = value;
9551 self
9552 }
9553 #[must_use]
9555 pub fn add_rfrd_doc_inf(
9556 mut self,
9557 value: ReferredDocumentInformation8,
9558 ) -> StructuredRemittanceInformation18Builder {
9559 self.rfrd_doc_inf.push(value);
9560 self
9561 }
9562 #[must_use]
9564 pub fn rfrd_doc_amt(
9565 mut self,
9566 value: RemittanceAmount4,
9567 ) -> StructuredRemittanceInformation18Builder {
9568 self.rfrd_doc_amt = ::std::option::Option::Some(value);
9569 self
9570 }
9571 #[must_use]
9573 pub fn cdtr_ref_inf(
9574 mut self,
9575 value: CreditorReferenceInformation3,
9576 ) -> StructuredRemittanceInformation18Builder {
9577 self.cdtr_ref_inf = ::std::option::Option::Some(value);
9578 self
9579 }
9580 #[must_use]
9582 pub fn invcr(
9583 mut self,
9584 value: PartyIdentification272,
9585 ) -> StructuredRemittanceInformation18Builder {
9586 self.invcr = ::std::option::Option::Some(value);
9587 self
9588 }
9589 #[must_use]
9591 pub fn invcee(
9592 mut self,
9593 value: PartyIdentification272,
9594 ) -> StructuredRemittanceInformation18Builder {
9595 self.invcee = ::std::option::Option::Some(value);
9596 self
9597 }
9598 #[must_use]
9600 pub fn tax_rmt(mut self, value: TaxData1) -> StructuredRemittanceInformation18Builder {
9601 self.tax_rmt = ::std::option::Option::Some(value);
9602 self
9603 }
9604 #[must_use]
9606 pub fn grnshmt_rmt(mut self, value: Garnishment4) -> StructuredRemittanceInformation18Builder {
9607 self.grnshmt_rmt = ::std::option::Option::Some(value);
9608 self
9609 }
9610 #[must_use]
9612 pub fn addtl_rmt_inf(
9613 mut self,
9614 value: ::std::vec::Vec<Max140Text>,
9615 ) -> StructuredRemittanceInformation18Builder {
9616 self.addtl_rmt_inf = value;
9617 self
9618 }
9619 #[must_use]
9621 pub fn add_addtl_rmt_inf(
9622 mut self,
9623 value: Max140Text,
9624 ) -> StructuredRemittanceInformation18Builder {
9625 self.addtl_rmt_inf.push(value);
9626 self
9627 }
9628 pub fn build(
9640 self,
9641 ) -> ::std::result::Result<StructuredRemittanceInformation18, crate::common::BuilderError> {
9642 ::std::result::Result::Ok(StructuredRemittanceInformation18 {
9643 rfrd_doc_inf: self.rfrd_doc_inf,
9644 rfrd_doc_amt: self.rfrd_doc_amt,
9645 cdtr_ref_inf: self.cdtr_ref_inf,
9646 invcr: self.invcr,
9647 invcee: self.invcee,
9648 tax_rmt: self.tax_rmt,
9649 grnshmt_rmt: self.grnshmt_rmt,
9650 addtl_rmt_inf: self.addtl_rmt_inf,
9651 })
9652 }
9653}
9654impl StructuredRemittanceInformation18 {
9655 #[must_use]
9657 pub fn builder() -> StructuredRemittanceInformation18Builder {
9658 StructuredRemittanceInformation18Builder::default()
9659 }
9660}
9661#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9662pub struct SupplementaryData1 {
9663 #[serde(rename = "PlcAndNm")]
9664 #[serde(skip_serializing_if = "Option::is_none")]
9665 pub plc_and_nm: Option<Max350Text>,
9666 #[serde(rename = "Envlp")]
9667 pub envlp: SupplementaryDataEnvelope1,
9668}
9669#[allow(clippy::struct_field_names)]
9671#[derive(Default)]
9672pub struct SupplementaryData1Builder {
9673 plc_and_nm: ::std::option::Option<Max350Text>,
9674 envlp: ::std::option::Option<SupplementaryDataEnvelope1>,
9675}
9676impl SupplementaryData1Builder {
9677 #[must_use]
9679 pub fn plc_and_nm(mut self, value: Max350Text) -> SupplementaryData1Builder {
9680 self.plc_and_nm = ::std::option::Option::Some(value);
9681 self
9682 }
9683 #[must_use]
9685 pub fn envlp(mut self, value: SupplementaryDataEnvelope1) -> SupplementaryData1Builder {
9686 self.envlp = ::std::option::Option::Some(value);
9687 self
9688 }
9689 pub fn build(self) -> ::std::result::Result<SupplementaryData1, crate::common::BuilderError> {
9701 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9702 if self.envlp.is_none() {
9703 missing.push("envlp".to_owned());
9704 }
9705 if !missing.is_empty() {
9706 return ::std::result::Result::Err(crate::common::BuilderError {
9707 type_name: "SupplementaryData1".to_owned(),
9708 missing_fields: missing,
9709 });
9710 }
9711 ::std::result::Result::Ok(SupplementaryData1 {
9712 plc_and_nm: self.plc_and_nm,
9713 envlp: self.envlp.unwrap(),
9714 })
9715 }
9716}
9717impl SupplementaryData1 {
9718 #[must_use]
9720 pub fn builder() -> SupplementaryData1Builder {
9721 SupplementaryData1Builder::default()
9722 }
9723}
9724#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9726pub struct SupplementaryDataEnvelope1 {
9727 #[serde(rename = "$value")]
9728 pub value: String,
9729}
9730#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9731pub struct TaxAmount3 {
9732 #[serde(rename = "Rate")]
9733 #[serde(skip_serializing_if = "Option::is_none")]
9734 pub rate: Option<PercentageRate>,
9735 #[serde(rename = "TaxblBaseAmt")]
9736 #[serde(skip_serializing_if = "Option::is_none")]
9737 pub taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9738 #[serde(rename = "TtlAmt")]
9739 #[serde(skip_serializing_if = "Option::is_none")]
9740 pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9741 #[serde(rename = "Dtls")]
9742 #[serde(default)]
9743 #[serde(skip_serializing_if = "Vec::is_empty")]
9744 pub dtls: Vec<TaxRecordDetails3>,
9745}
9746#[allow(clippy::struct_field_names)]
9748#[derive(Default)]
9749pub struct TaxAmount3Builder {
9750 rate: ::std::option::Option<PercentageRate>,
9751 taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9752 ttl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9753 dtls: ::std::vec::Vec<TaxRecordDetails3>,
9754}
9755impl TaxAmount3Builder {
9756 #[must_use]
9758 pub fn rate(mut self, value: PercentageRate) -> TaxAmount3Builder {
9759 self.rate = ::std::option::Option::Some(value);
9760 self
9761 }
9762 #[must_use]
9764 pub fn taxbl_base_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
9765 self.taxbl_base_amt = ::std::option::Option::Some(value);
9766 self
9767 }
9768 #[must_use]
9770 pub fn ttl_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
9771 self.ttl_amt = ::std::option::Option::Some(value);
9772 self
9773 }
9774 #[must_use]
9776 pub fn dtls(mut self, value: ::std::vec::Vec<TaxRecordDetails3>) -> TaxAmount3Builder {
9777 self.dtls = value;
9778 self
9779 }
9780 #[must_use]
9782 pub fn add_dtls(mut self, value: TaxRecordDetails3) -> TaxAmount3Builder {
9783 self.dtls.push(value);
9784 self
9785 }
9786 pub fn build(self) -> ::std::result::Result<TaxAmount3, crate::common::BuilderError> {
9798 ::std::result::Result::Ok(TaxAmount3 {
9799 rate: self.rate,
9800 taxbl_base_amt: self.taxbl_base_amt,
9801 ttl_amt: self.ttl_amt,
9802 dtls: self.dtls,
9803 })
9804 }
9805}
9806impl TaxAmount3 {
9807 #[must_use]
9809 pub fn builder() -> TaxAmount3Builder {
9810 TaxAmount3Builder::default()
9811 }
9812}
9813#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9814pub struct TaxAuthorisation1 {
9815 #[serde(rename = "Titl")]
9816 #[serde(skip_serializing_if = "Option::is_none")]
9817 pub titl: Option<Max35Text>,
9818 #[serde(rename = "Nm")]
9819 #[serde(skip_serializing_if = "Option::is_none")]
9820 pub nm: Option<Max140Text>,
9821}
9822#[allow(clippy::struct_field_names)]
9824#[derive(Default)]
9825pub struct TaxAuthorisation1Builder {
9826 titl: ::std::option::Option<Max35Text>,
9827 nm: ::std::option::Option<Max140Text>,
9828}
9829impl TaxAuthorisation1Builder {
9830 #[must_use]
9832 pub fn titl(mut self, value: Max35Text) -> TaxAuthorisation1Builder {
9833 self.titl = ::std::option::Option::Some(value);
9834 self
9835 }
9836 #[must_use]
9838 pub fn nm(mut self, value: Max140Text) -> TaxAuthorisation1Builder {
9839 self.nm = ::std::option::Option::Some(value);
9840 self
9841 }
9842 pub fn build(self) -> ::std::result::Result<TaxAuthorisation1, crate::common::BuilderError> {
9854 ::std::result::Result::Ok(TaxAuthorisation1 {
9855 titl: self.titl,
9856 nm: self.nm,
9857 })
9858 }
9859}
9860impl TaxAuthorisation1 {
9861 #[must_use]
9863 pub fn builder() -> TaxAuthorisation1Builder {
9864 TaxAuthorisation1Builder::default()
9865 }
9866}
9867#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
9868pub struct TaxData1 {
9869 #[serde(rename = "Cdtr")]
9870 #[serde(skip_serializing_if = "Option::is_none")]
9871 pub cdtr: Option<TaxParty1>,
9872 #[serde(rename = "Dbtr")]
9873 #[serde(skip_serializing_if = "Option::is_none")]
9874 pub dbtr: Option<TaxParty2>,
9875 #[serde(rename = "UltmtDbtr")]
9876 #[serde(skip_serializing_if = "Option::is_none")]
9877 pub ultmt_dbtr: Option<TaxParty2>,
9878 #[serde(rename = "AdmstnZone")]
9879 #[serde(skip_serializing_if = "Option::is_none")]
9880 pub admstn_zone: Option<Max35Text>,
9881 #[serde(rename = "RefNb")]
9882 #[serde(skip_serializing_if = "Option::is_none")]
9883 pub ref_nb: Option<Max140Text>,
9884 #[serde(rename = "Mtd")]
9885 #[serde(skip_serializing_if = "Option::is_none")]
9886 pub mtd: Option<Max35Text>,
9887 #[serde(rename = "TtlTaxblBaseAmt")]
9888 #[serde(skip_serializing_if = "Option::is_none")]
9889 pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9890 #[serde(rename = "TtlTaxAmt")]
9891 #[serde(skip_serializing_if = "Option::is_none")]
9892 pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
9893 #[serde(rename = "Dt")]
9894 #[serde(skip_serializing_if = "Option::is_none")]
9895 pub dt: Option<ISODate>,
9896 #[serde(rename = "SeqNb")]
9897 #[serde(skip_serializing_if = "Option::is_none")]
9898 pub seq_nb: Option<Number>,
9899 #[serde(rename = "Rcrd")]
9900 #[serde(default)]
9901 #[serde(skip_serializing_if = "Vec::is_empty")]
9902 pub rcrd: Vec<TaxRecord3>,
9903}
9904#[allow(clippy::struct_field_names)]
9906#[derive(Default)]
9907pub struct TaxData1Builder {
9908 cdtr: ::std::option::Option<TaxParty1>,
9909 dbtr: ::std::option::Option<TaxParty2>,
9910 ultmt_dbtr: ::std::option::Option<TaxParty2>,
9911 admstn_zone: ::std::option::Option<Max35Text>,
9912 ref_nb: ::std::option::Option<Max140Text>,
9913 mtd: ::std::option::Option<Max35Text>,
9914 ttl_taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9915 ttl_tax_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
9916 dt: ::std::option::Option<ISODate>,
9917 seq_nb: ::std::option::Option<Number>,
9918 rcrd: ::std::vec::Vec<TaxRecord3>,
9919}
9920impl TaxData1Builder {
9921 #[must_use]
9923 pub fn cdtr(mut self, value: TaxParty1) -> TaxData1Builder {
9924 self.cdtr = ::std::option::Option::Some(value);
9925 self
9926 }
9927 #[must_use]
9929 pub fn dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
9930 self.dbtr = ::std::option::Option::Some(value);
9931 self
9932 }
9933 #[must_use]
9935 pub fn ultmt_dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
9936 self.ultmt_dbtr = ::std::option::Option::Some(value);
9937 self
9938 }
9939 #[must_use]
9941 pub fn admstn_zone(mut self, value: Max35Text) -> TaxData1Builder {
9942 self.admstn_zone = ::std::option::Option::Some(value);
9943 self
9944 }
9945 #[must_use]
9947 pub fn ref_nb(mut self, value: Max140Text) -> TaxData1Builder {
9948 self.ref_nb = ::std::option::Option::Some(value);
9949 self
9950 }
9951 #[must_use]
9953 pub fn mtd(mut self, value: Max35Text) -> TaxData1Builder {
9954 self.mtd = ::std::option::Option::Some(value);
9955 self
9956 }
9957 #[must_use]
9959 pub fn ttl_taxbl_base_amt(
9960 mut self,
9961 value: ActiveOrHistoricCurrencyAndAmount,
9962 ) -> TaxData1Builder {
9963 self.ttl_taxbl_base_amt = ::std::option::Option::Some(value);
9964 self
9965 }
9966 #[must_use]
9968 pub fn ttl_tax_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxData1Builder {
9969 self.ttl_tax_amt = ::std::option::Option::Some(value);
9970 self
9971 }
9972 #[must_use]
9974 pub fn dt(mut self, value: ISODate) -> TaxData1Builder {
9975 self.dt = ::std::option::Option::Some(value);
9976 self
9977 }
9978 #[must_use]
9980 pub fn seq_nb(mut self, value: Number) -> TaxData1Builder {
9981 self.seq_nb = ::std::option::Option::Some(value);
9982 self
9983 }
9984 #[must_use]
9986 pub fn rcrd(mut self, value: ::std::vec::Vec<TaxRecord3>) -> TaxData1Builder {
9987 self.rcrd = value;
9988 self
9989 }
9990 #[must_use]
9992 pub fn add_rcrd(mut self, value: TaxRecord3) -> TaxData1Builder {
9993 self.rcrd.push(value);
9994 self
9995 }
9996 pub fn build(self) -> ::std::result::Result<TaxData1, crate::common::BuilderError> {
10008 ::std::result::Result::Ok(TaxData1 {
10009 cdtr: self.cdtr,
10010 dbtr: self.dbtr,
10011 ultmt_dbtr: self.ultmt_dbtr,
10012 admstn_zone: self.admstn_zone,
10013 ref_nb: self.ref_nb,
10014 mtd: self.mtd,
10015 ttl_taxbl_base_amt: self.ttl_taxbl_base_amt,
10016 ttl_tax_amt: self.ttl_tax_amt,
10017 dt: self.dt,
10018 seq_nb: self.seq_nb,
10019 rcrd: self.rcrd,
10020 })
10021 }
10022}
10023impl TaxData1 {
10024 #[must_use]
10026 pub fn builder() -> TaxData1Builder {
10027 TaxData1Builder::default()
10028 }
10029}
10030#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10031pub struct TaxParty1 {
10032 #[serde(rename = "TaxId")]
10033 #[serde(skip_serializing_if = "Option::is_none")]
10034 pub tax_id: Option<Max35Text>,
10035 #[serde(rename = "RegnId")]
10036 #[serde(skip_serializing_if = "Option::is_none")]
10037 pub regn_id: Option<Max35Text>,
10038 #[serde(rename = "TaxTp")]
10039 #[serde(skip_serializing_if = "Option::is_none")]
10040 pub tax_tp: Option<Max35Text>,
10041}
10042#[allow(clippy::struct_field_names)]
10044#[derive(Default)]
10045pub struct TaxParty1Builder {
10046 tax_id: ::std::option::Option<Max35Text>,
10047 regn_id: ::std::option::Option<Max35Text>,
10048 tax_tp: ::std::option::Option<Max35Text>,
10049}
10050impl TaxParty1Builder {
10051 #[must_use]
10053 pub fn tax_id(mut self, value: Max35Text) -> TaxParty1Builder {
10054 self.tax_id = ::std::option::Option::Some(value);
10055 self
10056 }
10057 #[must_use]
10059 pub fn regn_id(mut self, value: Max35Text) -> TaxParty1Builder {
10060 self.regn_id = ::std::option::Option::Some(value);
10061 self
10062 }
10063 #[must_use]
10065 pub fn tax_tp(mut self, value: Max35Text) -> TaxParty1Builder {
10066 self.tax_tp = ::std::option::Option::Some(value);
10067 self
10068 }
10069 pub fn build(self) -> ::std::result::Result<TaxParty1, crate::common::BuilderError> {
10081 ::std::result::Result::Ok(TaxParty1 {
10082 tax_id: self.tax_id,
10083 regn_id: self.regn_id,
10084 tax_tp: self.tax_tp,
10085 })
10086 }
10087}
10088impl TaxParty1 {
10089 #[must_use]
10091 pub fn builder() -> TaxParty1Builder {
10092 TaxParty1Builder::default()
10093 }
10094}
10095#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10096pub struct TaxParty2 {
10097 #[serde(rename = "TaxId")]
10098 #[serde(skip_serializing_if = "Option::is_none")]
10099 pub tax_id: Option<Max35Text>,
10100 #[serde(rename = "RegnId")]
10101 #[serde(skip_serializing_if = "Option::is_none")]
10102 pub regn_id: Option<Max35Text>,
10103 #[serde(rename = "TaxTp")]
10104 #[serde(skip_serializing_if = "Option::is_none")]
10105 pub tax_tp: Option<Max35Text>,
10106 #[serde(rename = "Authstn")]
10107 #[serde(skip_serializing_if = "Option::is_none")]
10108 pub authstn: Option<TaxAuthorisation1>,
10109}
10110#[allow(clippy::struct_field_names)]
10112#[derive(Default)]
10113pub struct TaxParty2Builder {
10114 tax_id: ::std::option::Option<Max35Text>,
10115 regn_id: ::std::option::Option<Max35Text>,
10116 tax_tp: ::std::option::Option<Max35Text>,
10117 authstn: ::std::option::Option<TaxAuthorisation1>,
10118}
10119impl TaxParty2Builder {
10120 #[must_use]
10122 pub fn tax_id(mut self, value: Max35Text) -> TaxParty2Builder {
10123 self.tax_id = ::std::option::Option::Some(value);
10124 self
10125 }
10126 #[must_use]
10128 pub fn regn_id(mut self, value: Max35Text) -> TaxParty2Builder {
10129 self.regn_id = ::std::option::Option::Some(value);
10130 self
10131 }
10132 #[must_use]
10134 pub fn tax_tp(mut self, value: Max35Text) -> TaxParty2Builder {
10135 self.tax_tp = ::std::option::Option::Some(value);
10136 self
10137 }
10138 #[must_use]
10140 pub fn authstn(mut self, value: TaxAuthorisation1) -> TaxParty2Builder {
10141 self.authstn = ::std::option::Option::Some(value);
10142 self
10143 }
10144 pub fn build(self) -> ::std::result::Result<TaxParty2, crate::common::BuilderError> {
10156 ::std::result::Result::Ok(TaxParty2 {
10157 tax_id: self.tax_id,
10158 regn_id: self.regn_id,
10159 tax_tp: self.tax_tp,
10160 authstn: self.authstn,
10161 })
10162 }
10163}
10164impl TaxParty2 {
10165 #[must_use]
10167 pub fn builder() -> TaxParty2Builder {
10168 TaxParty2Builder::default()
10169 }
10170}
10171#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10172pub struct TaxPeriod3 {
10173 #[serde(rename = "Yr")]
10174 #[serde(skip_serializing_if = "Option::is_none")]
10175 pub yr: Option<ISOYear>,
10176 #[serde(rename = "Tp")]
10177 #[serde(skip_serializing_if = "Option::is_none")]
10178 pub tp: Option<TaxRecordPeriod1Code>,
10179 #[serde(rename = "FrToDt")]
10180 #[serde(skip_serializing_if = "Option::is_none")]
10181 pub fr_to_dt: Option<DatePeriod2>,
10182}
10183#[allow(clippy::struct_field_names)]
10185#[derive(Default)]
10186pub struct TaxPeriod3Builder {
10187 yr: ::std::option::Option<ISOYear>,
10188 tp: ::std::option::Option<TaxRecordPeriod1Code>,
10189 fr_to_dt: ::std::option::Option<DatePeriod2>,
10190}
10191impl TaxPeriod3Builder {
10192 #[must_use]
10194 pub fn yr(mut self, value: ISOYear) -> TaxPeriod3Builder {
10195 self.yr = ::std::option::Option::Some(value);
10196 self
10197 }
10198 #[must_use]
10200 pub fn tp(mut self, value: TaxRecordPeriod1Code) -> TaxPeriod3Builder {
10201 self.tp = ::std::option::Option::Some(value);
10202 self
10203 }
10204 #[must_use]
10206 pub fn fr_to_dt(mut self, value: DatePeriod2) -> TaxPeriod3Builder {
10207 self.fr_to_dt = ::std::option::Option::Some(value);
10208 self
10209 }
10210 pub fn build(self) -> ::std::result::Result<TaxPeriod3, crate::common::BuilderError> {
10222 ::std::result::Result::Ok(TaxPeriod3 {
10223 yr: self.yr,
10224 tp: self.tp,
10225 fr_to_dt: self.fr_to_dt,
10226 })
10227 }
10228}
10229impl TaxPeriod3 {
10230 #[must_use]
10232 pub fn builder() -> TaxPeriod3Builder {
10233 TaxPeriod3Builder::default()
10234 }
10235}
10236#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10237pub struct TaxRecord3 {
10238 #[serde(rename = "Tp")]
10239 #[serde(skip_serializing_if = "Option::is_none")]
10240 pub tp: Option<Max35Text>,
10241 #[serde(rename = "Ctgy")]
10242 #[serde(skip_serializing_if = "Option::is_none")]
10243 pub ctgy: Option<Max35Text>,
10244 #[serde(rename = "CtgyDtls")]
10245 #[serde(skip_serializing_if = "Option::is_none")]
10246 pub ctgy_dtls: Option<Max35Text>,
10247 #[serde(rename = "DbtrSts")]
10248 #[serde(skip_serializing_if = "Option::is_none")]
10249 pub dbtr_sts: Option<Max35Text>,
10250 #[serde(rename = "CertId")]
10251 #[serde(skip_serializing_if = "Option::is_none")]
10252 pub cert_id: Option<Max35Text>,
10253 #[serde(rename = "FrmsCd")]
10254 #[serde(skip_serializing_if = "Option::is_none")]
10255 pub frms_cd: Option<Max35Text>,
10256 #[serde(rename = "Prd")]
10257 #[serde(skip_serializing_if = "Option::is_none")]
10258 pub prd: Option<TaxPeriod3>,
10259 #[serde(rename = "TaxAmt")]
10260 #[serde(skip_serializing_if = "Option::is_none")]
10261 pub tax_amt: Option<TaxAmount3>,
10262 #[serde(rename = "AddtlInf")]
10263 #[serde(skip_serializing_if = "Option::is_none")]
10264 pub addtl_inf: Option<Max140Text>,
10265}
10266#[allow(clippy::struct_field_names)]
10268#[derive(Default)]
10269pub struct TaxRecord3Builder {
10270 tp: ::std::option::Option<Max35Text>,
10271 ctgy: ::std::option::Option<Max35Text>,
10272 ctgy_dtls: ::std::option::Option<Max35Text>,
10273 dbtr_sts: ::std::option::Option<Max35Text>,
10274 cert_id: ::std::option::Option<Max35Text>,
10275 frms_cd: ::std::option::Option<Max35Text>,
10276 prd: ::std::option::Option<TaxPeriod3>,
10277 tax_amt: ::std::option::Option<TaxAmount3>,
10278 addtl_inf: ::std::option::Option<Max140Text>,
10279}
10280impl TaxRecord3Builder {
10281 #[must_use]
10283 pub fn tp(mut self, value: Max35Text) -> TaxRecord3Builder {
10284 self.tp = ::std::option::Option::Some(value);
10285 self
10286 }
10287 #[must_use]
10289 pub fn ctgy(mut self, value: Max35Text) -> TaxRecord3Builder {
10290 self.ctgy = ::std::option::Option::Some(value);
10291 self
10292 }
10293 #[must_use]
10295 pub fn ctgy_dtls(mut self, value: Max35Text) -> TaxRecord3Builder {
10296 self.ctgy_dtls = ::std::option::Option::Some(value);
10297 self
10298 }
10299 #[must_use]
10301 pub fn dbtr_sts(mut self, value: Max35Text) -> TaxRecord3Builder {
10302 self.dbtr_sts = ::std::option::Option::Some(value);
10303 self
10304 }
10305 #[must_use]
10307 pub fn cert_id(mut self, value: Max35Text) -> TaxRecord3Builder {
10308 self.cert_id = ::std::option::Option::Some(value);
10309 self
10310 }
10311 #[must_use]
10313 pub fn frms_cd(mut self, value: Max35Text) -> TaxRecord3Builder {
10314 self.frms_cd = ::std::option::Option::Some(value);
10315 self
10316 }
10317 #[must_use]
10319 pub fn prd(mut self, value: TaxPeriod3) -> TaxRecord3Builder {
10320 self.prd = ::std::option::Option::Some(value);
10321 self
10322 }
10323 #[must_use]
10325 pub fn tax_amt(mut self, value: TaxAmount3) -> TaxRecord3Builder {
10326 self.tax_amt = ::std::option::Option::Some(value);
10327 self
10328 }
10329 #[must_use]
10331 pub fn addtl_inf(mut self, value: Max140Text) -> TaxRecord3Builder {
10332 self.addtl_inf = ::std::option::Option::Some(value);
10333 self
10334 }
10335 pub fn build(self) -> ::std::result::Result<TaxRecord3, crate::common::BuilderError> {
10347 ::std::result::Result::Ok(TaxRecord3 {
10348 tp: self.tp,
10349 ctgy: self.ctgy,
10350 ctgy_dtls: self.ctgy_dtls,
10351 dbtr_sts: self.dbtr_sts,
10352 cert_id: self.cert_id,
10353 frms_cd: self.frms_cd,
10354 prd: self.prd,
10355 tax_amt: self.tax_amt,
10356 addtl_inf: self.addtl_inf,
10357 })
10358 }
10359}
10360impl TaxRecord3 {
10361 #[must_use]
10363 pub fn builder() -> TaxRecord3Builder {
10364 TaxRecord3Builder::default()
10365 }
10366}
10367#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10368pub struct TaxRecordDetails3 {
10369 #[serde(rename = "Prd")]
10370 #[serde(skip_serializing_if = "Option::is_none")]
10371 pub prd: Option<TaxPeriod3>,
10372 #[serde(rename = "Amt")]
10373 pub amt: ActiveOrHistoricCurrencyAndAmount,
10374}
10375#[allow(clippy::struct_field_names)]
10377#[derive(Default)]
10378pub struct TaxRecordDetails3Builder {
10379 prd: ::std::option::Option<TaxPeriod3>,
10380 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
10381}
10382impl TaxRecordDetails3Builder {
10383 #[must_use]
10385 pub fn prd(mut self, value: TaxPeriod3) -> TaxRecordDetails3Builder {
10386 self.prd = ::std::option::Option::Some(value);
10387 self
10388 }
10389 #[must_use]
10391 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxRecordDetails3Builder {
10392 self.amt = ::std::option::Option::Some(value);
10393 self
10394 }
10395 pub fn build(self) -> ::std::result::Result<TaxRecordDetails3, crate::common::BuilderError> {
10407 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
10408 if self.amt.is_none() {
10409 missing.push("amt".to_owned());
10410 }
10411 if !missing.is_empty() {
10412 return ::std::result::Result::Err(crate::common::BuilderError {
10413 type_name: "TaxRecordDetails3".to_owned(),
10414 missing_fields: missing,
10415 });
10416 }
10417 ::std::result::Result::Ok(TaxRecordDetails3 {
10418 prd: self.prd,
10419 amt: self.amt.unwrap(),
10420 })
10421 }
10422}
10423impl TaxRecordDetails3 {
10424 #[must_use]
10426 pub fn builder() -> TaxRecordDetails3Builder {
10427 TaxRecordDetails3Builder::default()
10428 }
10429}
10430impl crate::common::validate::Validatable for ActiveCurrencyAndAmountSimpleType {
10431 #[allow(clippy::unreadable_literal)]
10432 fn validate_constraints(
10433 &self,
10434 path: &str,
10435 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10436 ) {
10437 {
10438 let value: &str = &self.0;
10439 let frac_count = value.find('.').map_or(0, |dot| {
10440 value[dot + 1..]
10441 .chars()
10442 .filter(char::is_ascii_digit)
10443 .count()
10444 });
10445 let violated = frac_count > 5usize;
10446 if violated {
10447 violations.push(crate::common::validate::ConstraintViolation {
10448 path: path.to_string(),
10449 message: format!(
10450 "{} (got {})",
10451 "value exceeds maximum fraction digits 5", frac_count
10452 ),
10453 kind: crate::common::validate::ConstraintKind::FractionDigits,
10454 });
10455 }
10456 }
10457 {
10458 let value: &str = &self.0;
10459 let digit_count = value.chars().filter(char::is_ascii_digit).count();
10460 let violated = digit_count > 18usize;
10461 if violated {
10462 violations.push(crate::common::validate::ConstraintViolation {
10463 path: path.to_string(),
10464 message: format!(
10465 "{} (got {})",
10466 "value exceeds maximum total digits 18", digit_count
10467 ),
10468 kind: crate::common::validate::ConstraintKind::TotalDigits,
10469 });
10470 }
10471 }
10472 }
10473}
10474impl crate::common::validate::Validatable for ActiveCurrencyCode {
10475 #[allow(clippy::unreadable_literal)]
10476 fn validate_constraints(
10477 &self,
10478 path: &str,
10479 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10480 ) {
10481 {
10482 let value: &str = &self.0;
10483 let violated = {
10484 let bytes = value.as_bytes();
10485 bytes.len() != 3usize
10486 || ({
10487 let b = bytes[0usize];
10488 !(65u8..=90u8).contains(&b)
10489 })
10490 || ({
10491 let b = bytes[1usize];
10492 !(65u8..=90u8).contains(&b)
10493 })
10494 || ({
10495 let b = bytes[2usize];
10496 !(65u8..=90u8).contains(&b)
10497 })
10498 };
10499 if violated {
10500 violations.push(crate::common::validate::ConstraintViolation {
10501 path: path.to_string(),
10502 message: "value does not match pattern [A-Z]{3,3}".to_string(),
10503 kind: crate::common::validate::ConstraintKind::Pattern,
10504 });
10505 }
10506 }
10507 }
10508}
10509impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmountSimpleType {
10510 #[allow(clippy::unreadable_literal)]
10511 fn validate_constraints(
10512 &self,
10513 path: &str,
10514 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10515 ) {
10516 {
10517 let value: &str = &self.0;
10518 let frac_count = value.find('.').map_or(0, |dot| {
10519 value[dot + 1..]
10520 .chars()
10521 .filter(char::is_ascii_digit)
10522 .count()
10523 });
10524 let violated = frac_count > 5usize;
10525 if violated {
10526 violations.push(crate::common::validate::ConstraintViolation {
10527 path: path.to_string(),
10528 message: format!(
10529 "{} (got {})",
10530 "value exceeds maximum fraction digits 5", frac_count
10531 ),
10532 kind: crate::common::validate::ConstraintKind::FractionDigits,
10533 });
10534 }
10535 }
10536 {
10537 let value: &str = &self.0;
10538 let digit_count = value.chars().filter(char::is_ascii_digit).count();
10539 let violated = digit_count > 18usize;
10540 if violated {
10541 violations.push(crate::common::validate::ConstraintViolation {
10542 path: path.to_string(),
10543 message: format!(
10544 "{} (got {})",
10545 "value exceeds maximum total digits 18", digit_count
10546 ),
10547 kind: crate::common::validate::ConstraintKind::TotalDigits,
10548 });
10549 }
10550 }
10551 }
10552}
10553impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyCode {
10554 #[allow(clippy::unreadable_literal)]
10555 fn validate_constraints(
10556 &self,
10557 path: &str,
10558 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10559 ) {
10560 {
10561 let value: &str = &self.0;
10562 let violated = {
10563 let bytes = value.as_bytes();
10564 bytes.len() != 3usize
10565 || ({
10566 let b = bytes[0usize];
10567 !(65u8..=90u8).contains(&b)
10568 })
10569 || ({
10570 let b = bytes[1usize];
10571 !(65u8..=90u8).contains(&b)
10572 })
10573 || ({
10574 let b = bytes[2usize];
10575 !(65u8..=90u8).contains(&b)
10576 })
10577 };
10578 if violated {
10579 violations.push(crate::common::validate::ConstraintViolation {
10580 path: path.to_string(),
10581 message: "value does not match pattern [A-Z]{3,3}".to_string(),
10582 kind: crate::common::validate::ConstraintKind::Pattern,
10583 });
10584 }
10585 }
10586 }
10587}
10588impl crate::common::validate::Validatable for AddressType2Code {
10589 fn validate_constraints(
10590 &self,
10591 _path: &str,
10592 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10593 ) {
10594 }
10595}
10596impl crate::common::validate::Validatable for AnyBICDec2014Identifier {
10597 #[allow(clippy::unreadable_literal)]
10598 fn validate_constraints(
10599 &self,
10600 path: &str,
10601 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10602 ) {
10603 {
10604 let value: &str = &self.0;
10605 let violated = {
10606 let bytes = value.as_bytes();
10607 let len = bytes.len();
10608 let result: bool = (|| -> bool {
10609 let mut pos: usize = 0;
10610 if !(8usize..=11usize).contains(&len) {
10611 return true;
10612 }
10613 {
10614 let end = pos + 4usize;
10615 if end > len {
10616 return true;
10617 }
10618 for &b in &bytes[pos..end] {
10619 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10620 return true;
10621 }
10622 }
10623 pos = end;
10624 }
10625 {
10626 let end = pos + 2usize;
10627 if end > len {
10628 return true;
10629 }
10630 for &b in &bytes[pos..end] {
10631 if !(65u8..=90u8).contains(&b) {
10632 return true;
10633 }
10634 }
10635 pos = end;
10636 }
10637 {
10638 let end = pos + 2usize;
10639 if end > len {
10640 return true;
10641 }
10642 for &b in &bytes[pos..end] {
10643 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10644 return true;
10645 }
10646 }
10647 pos = end;
10648 }
10649 {
10650 let saved = pos;
10651 let matched: bool = (|| -> bool {
10652 {
10653 let end = pos + 3usize;
10654 if end > len {
10655 return true;
10656 }
10657 for &b in &bytes[pos..end] {
10658 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10659 return true;
10660 }
10661 }
10662 pos = end;
10663 }
10664 false
10665 })();
10666 if matched {
10667 pos = saved;
10668 }
10669 }
10670 if pos != len {
10671 return true;
10672 }
10673 false
10674 })();
10675 result
10676 };
10677 if violated {
10678 violations
10679 .push(crate::common::validate::ConstraintViolation {
10680 path: path.to_string(),
10681 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}"
10682 .to_string(),
10683 kind: crate::common::validate::ConstraintKind::Pattern,
10684 });
10685 }
10686 }
10687 }
10688}
10689impl crate::common::validate::Validatable for BICFIDec2014Identifier {
10690 #[allow(clippy::unreadable_literal)]
10691 fn validate_constraints(
10692 &self,
10693 path: &str,
10694 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10695 ) {
10696 {
10697 let value: &str = &self.0;
10698 let violated = {
10699 let bytes = value.as_bytes();
10700 let len = bytes.len();
10701 let result: bool = (|| -> bool {
10702 let mut pos: usize = 0;
10703 if !(8usize..=11usize).contains(&len) {
10704 return true;
10705 }
10706 {
10707 let end = pos + 4usize;
10708 if end > len {
10709 return true;
10710 }
10711 for &b in &bytes[pos..end] {
10712 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10713 return true;
10714 }
10715 }
10716 pos = end;
10717 }
10718 {
10719 let end = pos + 2usize;
10720 if end > len {
10721 return true;
10722 }
10723 for &b in &bytes[pos..end] {
10724 if !(65u8..=90u8).contains(&b) {
10725 return true;
10726 }
10727 }
10728 pos = end;
10729 }
10730 {
10731 let end = pos + 2usize;
10732 if end > len {
10733 return true;
10734 }
10735 for &b in &bytes[pos..end] {
10736 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10737 return true;
10738 }
10739 }
10740 pos = end;
10741 }
10742 {
10743 let saved = pos;
10744 let matched: bool = (|| -> bool {
10745 {
10746 let end = pos + 3usize;
10747 if end > len {
10748 return true;
10749 }
10750 for &b in &bytes[pos..end] {
10751 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
10752 return true;
10753 }
10754 }
10755 pos = end;
10756 }
10757 false
10758 })();
10759 if matched {
10760 pos = saved;
10761 }
10762 }
10763 if pos != len {
10764 return true;
10765 }
10766 false
10767 })();
10768 result
10769 };
10770 if violated {
10771 violations
10772 .push(crate::common::validate::ConstraintViolation {
10773 path: path.to_string(),
10774 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}"
10775 .to_string(),
10776 kind: crate::common::validate::ConstraintKind::Pattern,
10777 });
10778 }
10779 }
10780 }
10781}
10782impl crate::common::validate::Validatable for BaseOneRate {
10783 #[allow(clippy::unreadable_literal)]
10784 fn validate_constraints(
10785 &self,
10786 path: &str,
10787 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10788 ) {
10789 {
10790 let value: &str = &self.0;
10791 let frac_count = value.find('.').map_or(0, |dot| {
10792 value[dot + 1..]
10793 .chars()
10794 .filter(char::is_ascii_digit)
10795 .count()
10796 });
10797 let violated = frac_count > 10usize;
10798 if violated {
10799 violations.push(crate::common::validate::ConstraintViolation {
10800 path: path.to_string(),
10801 message: format!(
10802 "{} (got {})",
10803 "value exceeds maximum fraction digits 10", frac_count
10804 ),
10805 kind: crate::common::validate::ConstraintKind::FractionDigits,
10806 });
10807 }
10808 }
10809 {
10810 let value: &str = &self.0;
10811 let digit_count = value.chars().filter(char::is_ascii_digit).count();
10812 let violated = digit_count > 11usize;
10813 if violated {
10814 violations.push(crate::common::validate::ConstraintViolation {
10815 path: path.to_string(),
10816 message: format!(
10817 "{} (got {})",
10818 "value exceeds maximum total digits 11", digit_count
10819 ),
10820 kind: crate::common::validate::ConstraintKind::TotalDigits,
10821 });
10822 }
10823 }
10824 }
10825}
10826impl crate::common::validate::Validatable for BatchBookingIndicator {
10827 fn validate_constraints(
10828 &self,
10829 _path: &str,
10830 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10831 ) {
10832 }
10833}
10834impl crate::common::validate::Validatable for ChargeBearerType1Code {
10835 fn validate_constraints(
10836 &self,
10837 _path: &str,
10838 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10839 ) {
10840 }
10841}
10842impl crate::common::validate::Validatable for ClearingChannel2Code {
10843 fn validate_constraints(
10844 &self,
10845 _path: &str,
10846 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10847 ) {
10848 }
10849}
10850impl crate::common::validate::Validatable for CountryCode {
10851 #[allow(clippy::unreadable_literal)]
10852 fn validate_constraints(
10853 &self,
10854 path: &str,
10855 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10856 ) {
10857 {
10858 let value: &str = &self.0;
10859 let violated = {
10860 let bytes = value.as_bytes();
10861 bytes.len() != 2usize
10862 || ({
10863 let b = bytes[0usize];
10864 !(65u8..=90u8).contains(&b)
10865 })
10866 || ({
10867 let b = bytes[1usize];
10868 !(65u8..=90u8).contains(&b)
10869 })
10870 };
10871 if violated {
10872 violations.push(crate::common::validate::ConstraintViolation {
10873 path: path.to_string(),
10874 message: "value does not match pattern [A-Z]{2,2}".to_string(),
10875 kind: crate::common::validate::ConstraintKind::Pattern,
10876 });
10877 }
10878 }
10879 }
10880}
10881impl crate::common::validate::Validatable for CreditDebitCode {
10882 fn validate_constraints(
10883 &self,
10884 _path: &str,
10885 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10886 ) {
10887 }
10888}
10889impl crate::common::validate::Validatable for DecimalNumber {
10890 #[allow(clippy::unreadable_literal)]
10891 fn validate_constraints(
10892 &self,
10893 path: &str,
10894 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10895 ) {
10896 {
10897 let value: &str = &self.0;
10898 let frac_count = value.find('.').map_or(0, |dot| {
10899 value[dot + 1..]
10900 .chars()
10901 .filter(char::is_ascii_digit)
10902 .count()
10903 });
10904 let violated = frac_count > 17usize;
10905 if violated {
10906 violations.push(crate::common::validate::ConstraintViolation {
10907 path: path.to_string(),
10908 message: format!(
10909 "{} (got {})",
10910 "value exceeds maximum fraction digits 17", frac_count
10911 ),
10912 kind: crate::common::validate::ConstraintKind::FractionDigits,
10913 });
10914 }
10915 }
10916 {
10917 let value: &str = &self.0;
10918 let digit_count = value.chars().filter(char::is_ascii_digit).count();
10919 let violated = digit_count > 18usize;
10920 if violated {
10921 violations.push(crate::common::validate::ConstraintViolation {
10922 path: path.to_string(),
10923 message: format!(
10924 "{} (got {})",
10925 "value exceeds maximum total digits 18", digit_count
10926 ),
10927 kind: crate::common::validate::ConstraintKind::TotalDigits,
10928 });
10929 }
10930 }
10931 }
10932}
10933impl crate::common::validate::Validatable for Exact2NumericText {
10934 #[allow(clippy::unreadable_literal)]
10935 fn validate_constraints(
10936 &self,
10937 path: &str,
10938 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10939 ) {
10940 {
10941 let value: &str = &self.0;
10942 let violated = {
10943 let bytes = value.as_bytes();
10944 bytes.len() != 2usize
10945 || ({
10946 let b = bytes[0usize];
10947 !(48u8..=57u8).contains(&b)
10948 })
10949 || ({
10950 let b = bytes[1usize];
10951 !(48u8..=57u8).contains(&b)
10952 })
10953 };
10954 if violated {
10955 violations.push(crate::common::validate::ConstraintViolation {
10956 path: path.to_string(),
10957 message: "value does not match pattern [0-9]{2}".to_string(),
10958 kind: crate::common::validate::ConstraintKind::Pattern,
10959 });
10960 }
10961 }
10962 }
10963}
10964impl crate::common::validate::Validatable for Exact4AlphaNumericText {
10965 #[allow(clippy::unreadable_literal)]
10966 fn validate_constraints(
10967 &self,
10968 path: &str,
10969 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10970 ) {
10971 {
10972 let value: &str = &self.0;
10973 let violated = {
10974 let bytes = value.as_bytes();
10975 bytes.len() != 4usize
10976 || ({
10977 let b = bytes[0usize];
10978 !(97u8..=122u8).contains(&b)
10979 && !(65u8..=90u8).contains(&b)
10980 && !(48u8..=57u8).contains(&b)
10981 })
10982 || ({
10983 let b = bytes[1usize];
10984 !(97u8..=122u8).contains(&b)
10985 && !(65u8..=90u8).contains(&b)
10986 && !(48u8..=57u8).contains(&b)
10987 })
10988 || ({
10989 let b = bytes[2usize];
10990 !(97u8..=122u8).contains(&b)
10991 && !(65u8..=90u8).contains(&b)
10992 && !(48u8..=57u8).contains(&b)
10993 })
10994 || ({
10995 let b = bytes[3usize];
10996 !(97u8..=122u8).contains(&b)
10997 && !(65u8..=90u8).contains(&b)
10998 && !(48u8..=57u8).contains(&b)
10999 })
11000 };
11001 if violated {
11002 violations.push(crate::common::validate::ConstraintViolation {
11003 path: path.to_string(),
11004 message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
11005 kind: crate::common::validate::ConstraintKind::Pattern,
11006 });
11007 }
11008 }
11009 }
11010}
11011impl crate::common::validate::Validatable for ExternalAccountIdentification1Code {
11012 #[allow(clippy::unreadable_literal)]
11013 fn validate_constraints(
11014 &self,
11015 path: &str,
11016 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11017 ) {
11018 let len = self.0.chars().count();
11019 {
11020 let violated = len < 1usize;
11021 if violated {
11022 violations.push(crate::common::validate::ConstraintViolation {
11023 path: path.to_string(),
11024 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11025 kind: crate::common::validate::ConstraintKind::MinLength,
11026 });
11027 }
11028 }
11029 {
11030 let violated = len > 4usize;
11031 if violated {
11032 violations.push(crate::common::validate::ConstraintViolation {
11033 path: path.to_string(),
11034 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11035 kind: crate::common::validate::ConstraintKind::MaxLength,
11036 });
11037 }
11038 }
11039 }
11040}
11041impl crate::common::validate::Validatable for ExternalCashAccountType1Code {
11042 #[allow(clippy::unreadable_literal)]
11043 fn validate_constraints(
11044 &self,
11045 path: &str,
11046 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11047 ) {
11048 let len = self.0.chars().count();
11049 {
11050 let violated = len < 1usize;
11051 if violated {
11052 violations.push(crate::common::validate::ConstraintViolation {
11053 path: path.to_string(),
11054 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11055 kind: crate::common::validate::ConstraintKind::MinLength,
11056 });
11057 }
11058 }
11059 {
11060 let violated = len > 4usize;
11061 if violated {
11062 violations.push(crate::common::validate::ConstraintViolation {
11063 path: path.to_string(),
11064 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11065 kind: crate::common::validate::ConstraintKind::MaxLength,
11066 });
11067 }
11068 }
11069 }
11070}
11071impl crate::common::validate::Validatable for ExternalCashClearingSystem1Code {
11072 #[allow(clippy::unreadable_literal)]
11073 fn validate_constraints(
11074 &self,
11075 path: &str,
11076 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11077 ) {
11078 let len = self.0.chars().count();
11079 {
11080 let violated = len < 1usize;
11081 if violated {
11082 violations.push(crate::common::validate::ConstraintViolation {
11083 path: path.to_string(),
11084 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11085 kind: crate::common::validate::ConstraintKind::MinLength,
11086 });
11087 }
11088 }
11089 {
11090 let violated = len > 3usize;
11091 if violated {
11092 violations.push(crate::common::validate::ConstraintViolation {
11093 path: path.to_string(),
11094 message: format!("{} (got {})", "value exceeds maximum length 3", len),
11095 kind: crate::common::validate::ConstraintKind::MaxLength,
11096 });
11097 }
11098 }
11099 }
11100}
11101impl crate::common::validate::Validatable for ExternalCategoryPurpose1Code {
11102 #[allow(clippy::unreadable_literal)]
11103 fn validate_constraints(
11104 &self,
11105 path: &str,
11106 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11107 ) {
11108 let len = self.0.chars().count();
11109 {
11110 let violated = len < 1usize;
11111 if violated {
11112 violations.push(crate::common::validate::ConstraintViolation {
11113 path: path.to_string(),
11114 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11115 kind: crate::common::validate::ConstraintKind::MinLength,
11116 });
11117 }
11118 }
11119 {
11120 let violated = len > 4usize;
11121 if violated {
11122 violations.push(crate::common::validate::ConstraintViolation {
11123 path: path.to_string(),
11124 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11125 kind: crate::common::validate::ConstraintKind::MaxLength,
11126 });
11127 }
11128 }
11129 }
11130}
11131impl crate::common::validate::Validatable for ExternalChargeType1Code {
11132 #[allow(clippy::unreadable_literal)]
11133 fn validate_constraints(
11134 &self,
11135 path: &str,
11136 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11137 ) {
11138 let len = self.0.chars().count();
11139 {
11140 let violated = len < 1usize;
11141 if violated {
11142 violations.push(crate::common::validate::ConstraintViolation {
11143 path: path.to_string(),
11144 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11145 kind: crate::common::validate::ConstraintKind::MinLength,
11146 });
11147 }
11148 }
11149 {
11150 let violated = len > 4usize;
11151 if violated {
11152 violations.push(crate::common::validate::ConstraintViolation {
11153 path: path.to_string(),
11154 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11155 kind: crate::common::validate::ConstraintKind::MaxLength,
11156 });
11157 }
11158 }
11159 }
11160}
11161impl crate::common::validate::Validatable for ExternalClearingSystemIdentification1Code {
11162 #[allow(clippy::unreadable_literal)]
11163 fn validate_constraints(
11164 &self,
11165 path: &str,
11166 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11167 ) {
11168 let len = self.0.chars().count();
11169 {
11170 let violated = len < 1usize;
11171 if violated {
11172 violations.push(crate::common::validate::ConstraintViolation {
11173 path: path.to_string(),
11174 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11175 kind: crate::common::validate::ConstraintKind::MinLength,
11176 });
11177 }
11178 }
11179 {
11180 let violated = len > 5usize;
11181 if violated {
11182 violations.push(crate::common::validate::ConstraintViolation {
11183 path: path.to_string(),
11184 message: format!("{} (got {})", "value exceeds maximum length 5", len),
11185 kind: crate::common::validate::ConstraintKind::MaxLength,
11186 });
11187 }
11188 }
11189 }
11190}
11191impl crate::common::validate::Validatable for ExternalCreditorAgentInstruction1Code {
11192 #[allow(clippy::unreadable_literal)]
11193 fn validate_constraints(
11194 &self,
11195 path: &str,
11196 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11197 ) {
11198 let len = self.0.chars().count();
11199 {
11200 let violated = len < 1usize;
11201 if violated {
11202 violations.push(crate::common::validate::ConstraintViolation {
11203 path: path.to_string(),
11204 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11205 kind: crate::common::validate::ConstraintKind::MinLength,
11206 });
11207 }
11208 }
11209 {
11210 let violated = len > 4usize;
11211 if violated {
11212 violations.push(crate::common::validate::ConstraintViolation {
11213 path: path.to_string(),
11214 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11215 kind: crate::common::validate::ConstraintKind::MaxLength,
11216 });
11217 }
11218 }
11219 }
11220}
11221impl crate::common::validate::Validatable for ExternalCreditorReferenceType1Code {
11222 #[allow(clippy::unreadable_literal)]
11223 fn validate_constraints(
11224 &self,
11225 path: &str,
11226 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11227 ) {
11228 let len = self.0.chars().count();
11229 {
11230 let violated = len < 1usize;
11231 if violated {
11232 violations.push(crate::common::validate::ConstraintViolation {
11233 path: path.to_string(),
11234 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11235 kind: crate::common::validate::ConstraintKind::MinLength,
11236 });
11237 }
11238 }
11239 {
11240 let violated = len > 4usize;
11241 if violated {
11242 violations.push(crate::common::validate::ConstraintViolation {
11243 path: path.to_string(),
11244 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11245 kind: crate::common::validate::ConstraintKind::MaxLength,
11246 });
11247 }
11248 }
11249 }
11250}
11251impl crate::common::validate::Validatable for ExternalDateType1Code {
11252 #[allow(clippy::unreadable_literal)]
11253 fn validate_constraints(
11254 &self,
11255 path: &str,
11256 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11257 ) {
11258 let len = self.0.chars().count();
11259 {
11260 let violated = len < 1usize;
11261 if violated {
11262 violations.push(crate::common::validate::ConstraintViolation {
11263 path: path.to_string(),
11264 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11265 kind: crate::common::validate::ConstraintKind::MinLength,
11266 });
11267 }
11268 }
11269 {
11270 let violated = len > 4usize;
11271 if violated {
11272 violations.push(crate::common::validate::ConstraintViolation {
11273 path: path.to_string(),
11274 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11275 kind: crate::common::validate::ConstraintKind::MaxLength,
11276 });
11277 }
11278 }
11279 }
11280}
11281impl crate::common::validate::Validatable for ExternalDocumentAmountType1Code {
11282 #[allow(clippy::unreadable_literal)]
11283 fn validate_constraints(
11284 &self,
11285 path: &str,
11286 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11287 ) {
11288 let len = self.0.chars().count();
11289 {
11290 let violated = len < 1usize;
11291 if violated {
11292 violations.push(crate::common::validate::ConstraintViolation {
11293 path: path.to_string(),
11294 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11295 kind: crate::common::validate::ConstraintKind::MinLength,
11296 });
11297 }
11298 }
11299 {
11300 let violated = len > 4usize;
11301 if violated {
11302 violations.push(crate::common::validate::ConstraintViolation {
11303 path: path.to_string(),
11304 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11305 kind: crate::common::validate::ConstraintKind::MaxLength,
11306 });
11307 }
11308 }
11309 }
11310}
11311impl crate::common::validate::Validatable for ExternalDocumentLineType1Code {
11312 #[allow(clippy::unreadable_literal)]
11313 fn validate_constraints(
11314 &self,
11315 path: &str,
11316 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11317 ) {
11318 let len = self.0.chars().count();
11319 {
11320 let violated = len < 1usize;
11321 if violated {
11322 violations.push(crate::common::validate::ConstraintViolation {
11323 path: path.to_string(),
11324 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11325 kind: crate::common::validate::ConstraintKind::MinLength,
11326 });
11327 }
11328 }
11329 {
11330 let violated = len > 4usize;
11331 if violated {
11332 violations.push(crate::common::validate::ConstraintViolation {
11333 path: path.to_string(),
11334 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11335 kind: crate::common::validate::ConstraintKind::MaxLength,
11336 });
11337 }
11338 }
11339 }
11340}
11341impl crate::common::validate::Validatable for ExternalDocumentType1Code {
11342 #[allow(clippy::unreadable_literal)]
11343 fn validate_constraints(
11344 &self,
11345 path: &str,
11346 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11347 ) {
11348 let len = self.0.chars().count();
11349 {
11350 let violated = len < 1usize;
11351 if violated {
11352 violations.push(crate::common::validate::ConstraintViolation {
11353 path: path.to_string(),
11354 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11355 kind: crate::common::validate::ConstraintKind::MinLength,
11356 });
11357 }
11358 }
11359 {
11360 let violated = len > 4usize;
11361 if violated {
11362 violations.push(crate::common::validate::ConstraintViolation {
11363 path: path.to_string(),
11364 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11365 kind: crate::common::validate::ConstraintKind::MaxLength,
11366 });
11367 }
11368 }
11369 }
11370}
11371impl crate::common::validate::Validatable for ExternalFinancialInstitutionIdentification1Code {
11372 #[allow(clippy::unreadable_literal)]
11373 fn validate_constraints(
11374 &self,
11375 path: &str,
11376 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11377 ) {
11378 let len = self.0.chars().count();
11379 {
11380 let violated = len < 1usize;
11381 if violated {
11382 violations.push(crate::common::validate::ConstraintViolation {
11383 path: path.to_string(),
11384 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11385 kind: crate::common::validate::ConstraintKind::MinLength,
11386 });
11387 }
11388 }
11389 {
11390 let violated = len > 4usize;
11391 if violated {
11392 violations.push(crate::common::validate::ConstraintViolation {
11393 path: path.to_string(),
11394 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11395 kind: crate::common::validate::ConstraintKind::MaxLength,
11396 });
11397 }
11398 }
11399 }
11400}
11401impl crate::common::validate::Validatable for ExternalGarnishmentType1Code {
11402 #[allow(clippy::unreadable_literal)]
11403 fn validate_constraints(
11404 &self,
11405 path: &str,
11406 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11407 ) {
11408 let len = self.0.chars().count();
11409 {
11410 let violated = len < 1usize;
11411 if violated {
11412 violations.push(crate::common::validate::ConstraintViolation {
11413 path: path.to_string(),
11414 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11415 kind: crate::common::validate::ConstraintKind::MinLength,
11416 });
11417 }
11418 }
11419 {
11420 let violated = len > 4usize;
11421 if violated {
11422 violations.push(crate::common::validate::ConstraintViolation {
11423 path: path.to_string(),
11424 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11425 kind: crate::common::validate::ConstraintKind::MaxLength,
11426 });
11427 }
11428 }
11429 }
11430}
11431impl crate::common::validate::Validatable for ExternalLocalInstrument1Code {
11432 #[allow(clippy::unreadable_literal)]
11433 fn validate_constraints(
11434 &self,
11435 path: &str,
11436 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11437 ) {
11438 let len = self.0.chars().count();
11439 {
11440 let violated = len < 1usize;
11441 if violated {
11442 violations.push(crate::common::validate::ConstraintViolation {
11443 path: path.to_string(),
11444 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11445 kind: crate::common::validate::ConstraintKind::MinLength,
11446 });
11447 }
11448 }
11449 {
11450 let violated = len > 35usize;
11451 if violated {
11452 violations.push(crate::common::validate::ConstraintViolation {
11453 path: path.to_string(),
11454 message: format!("{} (got {})", "value exceeds maximum length 35", len),
11455 kind: crate::common::validate::ConstraintKind::MaxLength,
11456 });
11457 }
11458 }
11459 }
11460}
11461impl crate::common::validate::Validatable for ExternalMandateSetupReason1Code {
11462 #[allow(clippy::unreadable_literal)]
11463 fn validate_constraints(
11464 &self,
11465 path: &str,
11466 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11467 ) {
11468 let len = self.0.chars().count();
11469 {
11470 let violated = len < 1usize;
11471 if violated {
11472 violations.push(crate::common::validate::ConstraintViolation {
11473 path: path.to_string(),
11474 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11475 kind: crate::common::validate::ConstraintKind::MinLength,
11476 });
11477 }
11478 }
11479 {
11480 let violated = len > 4usize;
11481 if violated {
11482 violations.push(crate::common::validate::ConstraintViolation {
11483 path: path.to_string(),
11484 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11485 kind: crate::common::validate::ConstraintKind::MaxLength,
11486 });
11487 }
11488 }
11489 }
11490}
11491impl crate::common::validate::Validatable for ExternalOrganisationIdentification1Code {
11492 #[allow(clippy::unreadable_literal)]
11493 fn validate_constraints(
11494 &self,
11495 path: &str,
11496 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11497 ) {
11498 let len = self.0.chars().count();
11499 {
11500 let violated = len < 1usize;
11501 if violated {
11502 violations.push(crate::common::validate::ConstraintViolation {
11503 path: path.to_string(),
11504 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11505 kind: crate::common::validate::ConstraintKind::MinLength,
11506 });
11507 }
11508 }
11509 {
11510 let violated = len > 4usize;
11511 if violated {
11512 violations.push(crate::common::validate::ConstraintViolation {
11513 path: path.to_string(),
11514 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11515 kind: crate::common::validate::ConstraintKind::MaxLength,
11516 });
11517 }
11518 }
11519 }
11520}
11521impl crate::common::validate::Validatable for ExternalPersonIdentification1Code {
11522 #[allow(clippy::unreadable_literal)]
11523 fn validate_constraints(
11524 &self,
11525 path: &str,
11526 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11527 ) {
11528 let len = self.0.chars().count();
11529 {
11530 let violated = len < 1usize;
11531 if violated {
11532 violations.push(crate::common::validate::ConstraintViolation {
11533 path: path.to_string(),
11534 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11535 kind: crate::common::validate::ConstraintKind::MinLength,
11536 });
11537 }
11538 }
11539 {
11540 let violated = len > 4usize;
11541 if violated {
11542 violations.push(crate::common::validate::ConstraintViolation {
11543 path: path.to_string(),
11544 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11545 kind: crate::common::validate::ConstraintKind::MaxLength,
11546 });
11547 }
11548 }
11549 }
11550}
11551impl crate::common::validate::Validatable for ExternalProxyAccountType1Code {
11552 #[allow(clippy::unreadable_literal)]
11553 fn validate_constraints(
11554 &self,
11555 path: &str,
11556 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11557 ) {
11558 let len = self.0.chars().count();
11559 {
11560 let violated = len < 1usize;
11561 if violated {
11562 violations.push(crate::common::validate::ConstraintViolation {
11563 path: path.to_string(),
11564 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11565 kind: crate::common::validate::ConstraintKind::MinLength,
11566 });
11567 }
11568 }
11569 {
11570 let violated = len > 4usize;
11571 if violated {
11572 violations.push(crate::common::validate::ConstraintViolation {
11573 path: path.to_string(),
11574 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11575 kind: crate::common::validate::ConstraintKind::MaxLength,
11576 });
11577 }
11578 }
11579 }
11580}
11581impl crate::common::validate::Validatable for ExternalPurpose1Code {
11582 #[allow(clippy::unreadable_literal)]
11583 fn validate_constraints(
11584 &self,
11585 path: &str,
11586 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11587 ) {
11588 let len = self.0.chars().count();
11589 {
11590 let violated = len < 1usize;
11591 if violated {
11592 violations.push(crate::common::validate::ConstraintViolation {
11593 path: path.to_string(),
11594 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11595 kind: crate::common::validate::ConstraintKind::MinLength,
11596 });
11597 }
11598 }
11599 {
11600 let violated = len > 4usize;
11601 if violated {
11602 violations.push(crate::common::validate::ConstraintViolation {
11603 path: path.to_string(),
11604 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11605 kind: crate::common::validate::ConstraintKind::MaxLength,
11606 });
11607 }
11608 }
11609 }
11610}
11611impl crate::common::validate::Validatable for ExternalServiceLevel1Code {
11612 #[allow(clippy::unreadable_literal)]
11613 fn validate_constraints(
11614 &self,
11615 path: &str,
11616 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11617 ) {
11618 let len = self.0.chars().count();
11619 {
11620 let violated = len < 1usize;
11621 if violated {
11622 violations.push(crate::common::validate::ConstraintViolation {
11623 path: path.to_string(),
11624 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11625 kind: crate::common::validate::ConstraintKind::MinLength,
11626 });
11627 }
11628 }
11629 {
11630 let violated = len > 4usize;
11631 if violated {
11632 violations.push(crate::common::validate::ConstraintViolation {
11633 path: path.to_string(),
11634 message: format!("{} (got {})", "value exceeds maximum length 4", len),
11635 kind: crate::common::validate::ConstraintKind::MaxLength,
11636 });
11637 }
11638 }
11639 }
11640}
11641impl crate::common::validate::Validatable for Frequency6Code {
11642 fn validate_constraints(
11643 &self,
11644 _path: &str,
11645 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11646 ) {
11647 }
11648}
11649impl crate::common::validate::Validatable for HexBinaryText {
11650 #[allow(clippy::unreadable_literal)]
11651 fn validate_constraints(
11652 &self,
11653 path: &str,
11654 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11655 ) {
11656 {
11657 let value: &str = &self.0;
11658 let violated = {
11659 let bytes = value.as_bytes();
11660 let len = bytes.len();
11661 let result: bool = (|| -> bool {
11662 let mut pos: usize = 0;
11663 if len < 1usize {
11664 return true;
11665 }
11666 {
11667 let start = pos;
11668 while pos < len {
11669 let b = bytes[pos];
11670 if !(48u8..=57u8).contains(&b)
11671 && !(97u8..=102u8).contains(&b)
11672 && !(65u8..=70u8).contains(&b)
11673 {
11674 break;
11675 }
11676 pos += 1;
11677 }
11678 let matched = pos - start;
11679 if matched < 1usize {
11680 return true;
11681 }
11682 }
11683 if pos != len {
11684 return true;
11685 }
11686 false
11687 })();
11688 result
11689 };
11690 if violated {
11691 violations.push(crate::common::validate::ConstraintViolation {
11692 path: path.to_string(),
11693 message: "value does not match pattern [0-9a-fA-F]+".to_string(),
11694 kind: crate::common::validate::ConstraintKind::Pattern,
11695 });
11696 }
11697 }
11698 }
11699}
11700impl crate::common::validate::Validatable for IBAN2007Identifier {
11701 #[allow(clippy::unreadable_literal)]
11702 fn validate_constraints(
11703 &self,
11704 path: &str,
11705 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11706 ) {
11707 {
11708 let value: &str = &self.0;
11709 let violated = {
11710 let bytes = value.as_bytes();
11711 let len = bytes.len();
11712 let result: bool = (|| -> bool {
11713 let mut pos: usize = 0;
11714 if !(5usize..=34usize).contains(&len) {
11715 return true;
11716 }
11717 {
11718 let end = pos + 2usize;
11719 if end > len {
11720 return true;
11721 }
11722 for &b in &bytes[pos..end] {
11723 if !(65u8..=90u8).contains(&b) {
11724 return true;
11725 }
11726 }
11727 pos = end;
11728 }
11729 {
11730 let end = pos + 2usize;
11731 if end > len {
11732 return true;
11733 }
11734 for &b in &bytes[pos..end] {
11735 if !(48u8..=57u8).contains(&b) {
11736 return true;
11737 }
11738 }
11739 pos = end;
11740 }
11741 {
11742 let start = pos;
11743 let limit = if pos + 30usize < len {
11744 pos + 30usize
11745 } else {
11746 len
11747 };
11748 while pos < limit {
11749 let b = bytes[pos];
11750 if !(97u8..=122u8).contains(&b)
11751 && !(65u8..=90u8).contains(&b)
11752 && !(48u8..=57u8).contains(&b)
11753 {
11754 break;
11755 }
11756 pos += 1;
11757 }
11758 let matched = pos - start;
11759 if matched < 1usize {
11760 return true;
11761 }
11762 }
11763 if pos != len {
11764 return true;
11765 }
11766 false
11767 })();
11768 result
11769 };
11770 if violated {
11771 violations.push(crate::common::validate::ConstraintViolation {
11772 path: path.to_string(),
11773 message: "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
11774 .to_string(),
11775 kind: crate::common::validate::ConstraintKind::Pattern,
11776 });
11777 }
11778 }
11779 }
11780}
11781impl crate::common::validate::Validatable for ISODate {
11782 fn validate_constraints(
11783 &self,
11784 _path: &str,
11785 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11786 ) {
11787 }
11788}
11789impl crate::common::validate::Validatable for ISODateTime {
11790 fn validate_constraints(
11791 &self,
11792 _path: &str,
11793 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11794 ) {
11795 }
11796}
11797impl crate::common::validate::Validatable for ISOTime {
11798 fn validate_constraints(
11799 &self,
11800 _path: &str,
11801 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11802 ) {
11803 }
11804}
11805impl crate::common::validate::Validatable for ISOYear {
11806 fn validate_constraints(
11807 &self,
11808 _path: &str,
11809 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11810 ) {
11811 }
11812}
11813impl crate::common::validate::Validatable for Instruction4Code {
11814 fn validate_constraints(
11815 &self,
11816 _path: &str,
11817 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11818 ) {
11819 }
11820}
11821impl crate::common::validate::Validatable for LEIIdentifier {
11822 #[allow(clippy::unreadable_literal)]
11823 fn validate_constraints(
11824 &self,
11825 path: &str,
11826 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11827 ) {
11828 {
11829 let value: &str = &self.0;
11830 let violated = {
11831 let bytes = value.as_bytes();
11832 bytes.len() != 20usize
11833 || ({
11834 let b = bytes[0usize];
11835 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11836 })
11837 || ({
11838 let b = bytes[1usize];
11839 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11840 })
11841 || ({
11842 let b = bytes[2usize];
11843 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11844 })
11845 || ({
11846 let b = bytes[3usize];
11847 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11848 })
11849 || ({
11850 let b = bytes[4usize];
11851 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11852 })
11853 || ({
11854 let b = bytes[5usize];
11855 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11856 })
11857 || ({
11858 let b = bytes[6usize];
11859 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11860 })
11861 || ({
11862 let b = bytes[7usize];
11863 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11864 })
11865 || ({
11866 let b = bytes[8usize];
11867 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11868 })
11869 || ({
11870 let b = bytes[9usize];
11871 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11872 })
11873 || ({
11874 let b = bytes[10usize];
11875 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11876 })
11877 || ({
11878 let b = bytes[11usize];
11879 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11880 })
11881 || ({
11882 let b = bytes[12usize];
11883 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11884 })
11885 || ({
11886 let b = bytes[13usize];
11887 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11888 })
11889 || ({
11890 let b = bytes[14usize];
11891 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11892 })
11893 || ({
11894 let b = bytes[15usize];
11895 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11896 })
11897 || ({
11898 let b = bytes[16usize];
11899 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11900 })
11901 || ({
11902 let b = bytes[17usize];
11903 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
11904 })
11905 || ({
11906 let b = bytes[18usize];
11907 !(48u8..=57u8).contains(&b)
11908 })
11909 || ({
11910 let b = bytes[19usize];
11911 !(48u8..=57u8).contains(&b)
11912 })
11913 };
11914 if violated {
11915 violations.push(crate::common::validate::ConstraintViolation {
11916 path: path.to_string(),
11917 message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}".to_string(),
11918 kind: crate::common::validate::ConstraintKind::Pattern,
11919 });
11920 }
11921 }
11922 }
11923}
11924impl crate::common::validate::Validatable for MandateClassification1Code {
11925 fn validate_constraints(
11926 &self,
11927 _path: &str,
11928 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11929 ) {
11930 }
11931}
11932impl crate::common::validate::Validatable for Max10KBinary {
11933 #[allow(clippy::unreadable_literal)]
11934 fn validate_constraints(
11935 &self,
11936 path: &str,
11937 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11938 ) {
11939 let len = self.0.chars().count();
11940 {
11941 let violated = len < 1usize;
11942 if violated {
11943 violations.push(crate::common::validate::ConstraintViolation {
11944 path: path.to_string(),
11945 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11946 kind: crate::common::validate::ConstraintKind::MinLength,
11947 });
11948 }
11949 }
11950 {
11951 let violated = len > 10240usize;
11952 if violated {
11953 violations.push(crate::common::validate::ConstraintViolation {
11954 path: path.to_string(),
11955 message: format!("{} (got {})", "value exceeds maximum length 10240", len),
11956 kind: crate::common::validate::ConstraintKind::MaxLength,
11957 });
11958 }
11959 }
11960 }
11961}
11962impl crate::common::validate::Validatable for Max10Text {
11963 #[allow(clippy::unreadable_literal)]
11964 fn validate_constraints(
11965 &self,
11966 path: &str,
11967 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11968 ) {
11969 let len = self.0.chars().count();
11970 {
11971 let violated = len < 1usize;
11972 if violated {
11973 violations.push(crate::common::validate::ConstraintViolation {
11974 path: path.to_string(),
11975 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
11976 kind: crate::common::validate::ConstraintKind::MinLength,
11977 });
11978 }
11979 }
11980 {
11981 let violated = len > 10usize;
11982 if violated {
11983 violations.push(crate::common::validate::ConstraintViolation {
11984 path: path.to_string(),
11985 message: format!("{} (got {})", "value exceeds maximum length 10", len),
11986 kind: crate::common::validate::ConstraintKind::MaxLength,
11987 });
11988 }
11989 }
11990 }
11991}
11992impl crate::common::validate::Validatable for Max128Text {
11993 #[allow(clippy::unreadable_literal)]
11994 fn validate_constraints(
11995 &self,
11996 path: &str,
11997 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11998 ) {
11999 let len = self.0.chars().count();
12000 {
12001 let violated = len < 1usize;
12002 if violated {
12003 violations.push(crate::common::validate::ConstraintViolation {
12004 path: path.to_string(),
12005 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12006 kind: crate::common::validate::ConstraintKind::MinLength,
12007 });
12008 }
12009 }
12010 {
12011 let violated = len > 128usize;
12012 if violated {
12013 violations.push(crate::common::validate::ConstraintViolation {
12014 path: path.to_string(),
12015 message: format!("{} (got {})", "value exceeds maximum length 128", len),
12016 kind: crate::common::validate::ConstraintKind::MaxLength,
12017 });
12018 }
12019 }
12020 }
12021}
12022impl crate::common::validate::Validatable for Max140Text {
12023 #[allow(clippy::unreadable_literal)]
12024 fn validate_constraints(
12025 &self,
12026 path: &str,
12027 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12028 ) {
12029 let len = self.0.chars().count();
12030 {
12031 let violated = len < 1usize;
12032 if violated {
12033 violations.push(crate::common::validate::ConstraintViolation {
12034 path: path.to_string(),
12035 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12036 kind: crate::common::validate::ConstraintKind::MinLength,
12037 });
12038 }
12039 }
12040 {
12041 let violated = len > 140usize;
12042 if violated {
12043 violations.push(crate::common::validate::ConstraintViolation {
12044 path: path.to_string(),
12045 message: format!("{} (got {})", "value exceeds maximum length 140", len),
12046 kind: crate::common::validate::ConstraintKind::MaxLength,
12047 });
12048 }
12049 }
12050 }
12051}
12052impl crate::common::validate::Validatable for Max15NumericText {
12053 #[allow(clippy::unreadable_literal)]
12054 fn validate_constraints(
12055 &self,
12056 path: &str,
12057 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12058 ) {
12059 {
12060 let value: &str = &self.0;
12061 let violated = {
12062 let bytes = value.as_bytes();
12063 let len = bytes.len();
12064 let result: bool = (|| -> bool {
12065 let mut pos: usize = 0;
12066 if !(1usize..=15usize).contains(&len) {
12067 return true;
12068 }
12069 {
12070 let start = pos;
12071 let limit = if pos + 15usize < len {
12072 pos + 15usize
12073 } else {
12074 len
12075 };
12076 while pos < limit {
12077 let b = bytes[pos];
12078 if !(48u8..=57u8).contains(&b) {
12079 break;
12080 }
12081 pos += 1;
12082 }
12083 let matched = pos - start;
12084 if matched < 1usize {
12085 return true;
12086 }
12087 }
12088 if pos != len {
12089 return true;
12090 }
12091 false
12092 })();
12093 result
12094 };
12095 if violated {
12096 violations.push(crate::common::validate::ConstraintViolation {
12097 path: path.to_string(),
12098 message: "value does not match pattern [0-9]{1,15}".to_string(),
12099 kind: crate::common::validate::ConstraintKind::Pattern,
12100 });
12101 }
12102 }
12103 }
12104}
12105impl crate::common::validate::Validatable for Max16Text {
12106 #[allow(clippy::unreadable_literal)]
12107 fn validate_constraints(
12108 &self,
12109 path: &str,
12110 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12111 ) {
12112 let len = self.0.chars().count();
12113 {
12114 let violated = len < 1usize;
12115 if violated {
12116 violations.push(crate::common::validate::ConstraintViolation {
12117 path: path.to_string(),
12118 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12119 kind: crate::common::validate::ConstraintKind::MinLength,
12120 });
12121 }
12122 }
12123 {
12124 let violated = len > 16usize;
12125 if violated {
12126 violations.push(crate::common::validate::ConstraintViolation {
12127 path: path.to_string(),
12128 message: format!("{} (got {})", "value exceeds maximum length 16", len),
12129 kind: crate::common::validate::ConstraintKind::MaxLength,
12130 });
12131 }
12132 }
12133 }
12134}
12135impl crate::common::validate::Validatable for Max2048Text {
12136 #[allow(clippy::unreadable_literal)]
12137 fn validate_constraints(
12138 &self,
12139 path: &str,
12140 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12141 ) {
12142 let len = self.0.chars().count();
12143 {
12144 let violated = len < 1usize;
12145 if violated {
12146 violations.push(crate::common::validate::ConstraintViolation {
12147 path: path.to_string(),
12148 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12149 kind: crate::common::validate::ConstraintKind::MinLength,
12150 });
12151 }
12152 }
12153 {
12154 let violated = len > 2048usize;
12155 if violated {
12156 violations.push(crate::common::validate::ConstraintViolation {
12157 path: path.to_string(),
12158 message: format!("{} (got {})", "value exceeds maximum length 2048", len),
12159 kind: crate::common::validate::ConstraintKind::MaxLength,
12160 });
12161 }
12162 }
12163 }
12164}
12165impl crate::common::validate::Validatable for Max256Text {
12166 #[allow(clippy::unreadable_literal)]
12167 fn validate_constraints(
12168 &self,
12169 path: &str,
12170 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12171 ) {
12172 let len = self.0.chars().count();
12173 {
12174 let violated = len < 1usize;
12175 if violated {
12176 violations.push(crate::common::validate::ConstraintViolation {
12177 path: path.to_string(),
12178 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12179 kind: crate::common::validate::ConstraintKind::MinLength,
12180 });
12181 }
12182 }
12183 {
12184 let violated = len > 256usize;
12185 if violated {
12186 violations.push(crate::common::validate::ConstraintViolation {
12187 path: path.to_string(),
12188 message: format!("{} (got {})", "value exceeds maximum length 256", len),
12189 kind: crate::common::validate::ConstraintKind::MaxLength,
12190 });
12191 }
12192 }
12193 }
12194}
12195impl crate::common::validate::Validatable for Max34Text {
12196 #[allow(clippy::unreadable_literal)]
12197 fn validate_constraints(
12198 &self,
12199 path: &str,
12200 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12201 ) {
12202 let len = self.0.chars().count();
12203 {
12204 let violated = len < 1usize;
12205 if violated {
12206 violations.push(crate::common::validate::ConstraintViolation {
12207 path: path.to_string(),
12208 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12209 kind: crate::common::validate::ConstraintKind::MinLength,
12210 });
12211 }
12212 }
12213 {
12214 let violated = len > 34usize;
12215 if violated {
12216 violations.push(crate::common::validate::ConstraintViolation {
12217 path: path.to_string(),
12218 message: format!("{} (got {})", "value exceeds maximum length 34", len),
12219 kind: crate::common::validate::ConstraintKind::MaxLength,
12220 });
12221 }
12222 }
12223 }
12224}
12225impl crate::common::validate::Validatable for Max350Text {
12226 #[allow(clippy::unreadable_literal)]
12227 fn validate_constraints(
12228 &self,
12229 path: &str,
12230 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12231 ) {
12232 let len = self.0.chars().count();
12233 {
12234 let violated = len < 1usize;
12235 if violated {
12236 violations.push(crate::common::validate::ConstraintViolation {
12237 path: path.to_string(),
12238 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12239 kind: crate::common::validate::ConstraintKind::MinLength,
12240 });
12241 }
12242 }
12243 {
12244 let violated = len > 350usize;
12245 if violated {
12246 violations.push(crate::common::validate::ConstraintViolation {
12247 path: path.to_string(),
12248 message: format!("{} (got {})", "value exceeds maximum length 350", len),
12249 kind: crate::common::validate::ConstraintKind::MaxLength,
12250 });
12251 }
12252 }
12253 }
12254}
12255impl crate::common::validate::Validatable for Max35Text {
12256 #[allow(clippy::unreadable_literal)]
12257 fn validate_constraints(
12258 &self,
12259 path: &str,
12260 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12261 ) {
12262 let len = self.0.chars().count();
12263 {
12264 let violated = len < 1usize;
12265 if violated {
12266 violations.push(crate::common::validate::ConstraintViolation {
12267 path: path.to_string(),
12268 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12269 kind: crate::common::validate::ConstraintKind::MinLength,
12270 });
12271 }
12272 }
12273 {
12274 let violated = len > 35usize;
12275 if violated {
12276 violations.push(crate::common::validate::ConstraintViolation {
12277 path: path.to_string(),
12278 message: format!("{} (got {})", "value exceeds maximum length 35", len),
12279 kind: crate::common::validate::ConstraintKind::MaxLength,
12280 });
12281 }
12282 }
12283 }
12284}
12285impl crate::common::validate::Validatable for Max4Text {
12286 #[allow(clippy::unreadable_literal)]
12287 fn validate_constraints(
12288 &self,
12289 path: &str,
12290 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12291 ) {
12292 let len = self.0.chars().count();
12293 {
12294 let violated = len < 1usize;
12295 if violated {
12296 violations.push(crate::common::validate::ConstraintViolation {
12297 path: path.to_string(),
12298 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12299 kind: crate::common::validate::ConstraintKind::MinLength,
12300 });
12301 }
12302 }
12303 {
12304 let violated = len > 4usize;
12305 if violated {
12306 violations.push(crate::common::validate::ConstraintViolation {
12307 path: path.to_string(),
12308 message: format!("{} (got {})", "value exceeds maximum length 4", len),
12309 kind: crate::common::validate::ConstraintKind::MaxLength,
12310 });
12311 }
12312 }
12313 }
12314}
12315impl crate::common::validate::Validatable for Max70Text {
12316 #[allow(clippy::unreadable_literal)]
12317 fn validate_constraints(
12318 &self,
12319 path: &str,
12320 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12321 ) {
12322 let len = self.0.chars().count();
12323 {
12324 let violated = len < 1usize;
12325 if violated {
12326 violations.push(crate::common::validate::ConstraintViolation {
12327 path: path.to_string(),
12328 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
12329 kind: crate::common::validate::ConstraintKind::MinLength,
12330 });
12331 }
12332 }
12333 {
12334 let violated = len > 70usize;
12335 if violated {
12336 violations.push(crate::common::validate::ConstraintViolation {
12337 path: path.to_string(),
12338 message: format!("{} (got {})", "value exceeds maximum length 70", len),
12339 kind: crate::common::validate::ConstraintKind::MaxLength,
12340 });
12341 }
12342 }
12343 }
12344}
12345impl crate::common::validate::Validatable for NamePrefix2Code {
12346 fn validate_constraints(
12347 &self,
12348 _path: &str,
12349 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12350 ) {
12351 }
12352}
12353impl crate::common::validate::Validatable for Number {
12354 #[allow(clippy::unreadable_literal)]
12355 fn validate_constraints(
12356 &self,
12357 path: &str,
12358 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12359 ) {
12360 {
12361 let value: &str = &self.0;
12362 let frac_count = value.find('.').map_or(0, |dot| {
12363 value[dot + 1..]
12364 .chars()
12365 .filter(char::is_ascii_digit)
12366 .count()
12367 });
12368 let violated = frac_count > 0usize;
12369 if violated {
12370 violations.push(crate::common::validate::ConstraintViolation {
12371 path: path.to_string(),
12372 message: format!(
12373 "{} (got {})",
12374 "value exceeds maximum fraction digits 0", frac_count
12375 ),
12376 kind: crate::common::validate::ConstraintKind::FractionDigits,
12377 });
12378 }
12379 }
12380 {
12381 let value: &str = &self.0;
12382 let digit_count = value.chars().filter(char::is_ascii_digit).count();
12383 let violated = digit_count > 18usize;
12384 if violated {
12385 violations.push(crate::common::validate::ConstraintViolation {
12386 path: path.to_string(),
12387 message: format!(
12388 "{} (got {})",
12389 "value exceeds maximum total digits 18", digit_count
12390 ),
12391 kind: crate::common::validate::ConstraintKind::TotalDigits,
12392 });
12393 }
12394 }
12395 }
12396}
12397impl crate::common::validate::Validatable for PercentageRate {
12398 #[allow(clippy::unreadable_literal)]
12399 fn validate_constraints(
12400 &self,
12401 path: &str,
12402 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12403 ) {
12404 {
12405 let value: &str = &self.0;
12406 let frac_count = value.find('.').map_or(0, |dot| {
12407 value[dot + 1..]
12408 .chars()
12409 .filter(char::is_ascii_digit)
12410 .count()
12411 });
12412 let violated = frac_count > 10usize;
12413 if violated {
12414 violations.push(crate::common::validate::ConstraintViolation {
12415 path: path.to_string(),
12416 message: format!(
12417 "{} (got {})",
12418 "value exceeds maximum fraction digits 10", frac_count
12419 ),
12420 kind: crate::common::validate::ConstraintKind::FractionDigits,
12421 });
12422 }
12423 }
12424 {
12425 let value: &str = &self.0;
12426 let digit_count = value.chars().filter(char::is_ascii_digit).count();
12427 let violated = digit_count > 11usize;
12428 if violated {
12429 violations.push(crate::common::validate::ConstraintViolation {
12430 path: path.to_string(),
12431 message: format!(
12432 "{} (got {})",
12433 "value exceeds maximum total digits 11", digit_count
12434 ),
12435 kind: crate::common::validate::ConstraintKind::TotalDigits,
12436 });
12437 }
12438 }
12439 }
12440}
12441impl crate::common::validate::Validatable for PhoneNumber {
12442 #[allow(clippy::unreadable_literal)]
12443 fn validate_constraints(
12444 &self,
12445 path: &str,
12446 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12447 ) {
12448 {
12449 let value: &str = &self.0;
12450 let violated = {
12451 let bytes = value.as_bytes();
12452 let len = bytes.len();
12453 let result: bool = (|| -> bool {
12454 let mut pos: usize = 0;
12455 if !(4usize..=35usize).contains(&len) {
12456 return true;
12457 }
12458 if pos >= len || bytes[pos] != 43u8 {
12459 return true;
12460 }
12461 pos += 1;
12462 {
12463 let start = pos;
12464 let limit = if pos + 3usize < len {
12465 pos + 3usize
12466 } else {
12467 len
12468 };
12469 while pos < limit {
12470 let b = bytes[pos];
12471 if !(48u8..=57u8).contains(&b) {
12472 break;
12473 }
12474 pos += 1;
12475 }
12476 let matched = pos - start;
12477 if matched < 1usize {
12478 return true;
12479 }
12480 }
12481 if pos >= len || bytes[pos] != 45u8 {
12482 return true;
12483 }
12484 pos += 1;
12485 {
12486 let start = pos;
12487 let limit = if pos + 30usize < len {
12488 pos + 30usize
12489 } else {
12490 len
12491 };
12492 while pos < limit {
12493 let b = bytes[pos];
12494 if !(48u8..=57u8).contains(&b)
12495 && b != 40u8
12496 && b != 41u8
12497 && b != 43u8
12498 && b != 45u8
12499 {
12500 break;
12501 }
12502 pos += 1;
12503 }
12504 let matched = pos - start;
12505 if matched < 1usize {
12506 return true;
12507 }
12508 }
12509 if pos != len {
12510 return true;
12511 }
12512 false
12513 })();
12514 result
12515 };
12516 if violated {
12517 violations.push(crate::common::validate::ConstraintViolation {
12518 path: path.to_string(),
12519 message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
12520 .to_string(),
12521 kind: crate::common::validate::ConstraintKind::Pattern,
12522 });
12523 }
12524 }
12525 }
12526}
12527impl crate::common::validate::Validatable for PreferredContactMethod2Code {
12528 fn validate_constraints(
12529 &self,
12530 _path: &str,
12531 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12532 ) {
12533 }
12534}
12535impl crate::common::validate::Validatable for Priority2Code {
12536 fn validate_constraints(
12537 &self,
12538 _path: &str,
12539 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12540 ) {
12541 }
12542}
12543impl crate::common::validate::Validatable for Priority3Code {
12544 fn validate_constraints(
12545 &self,
12546 _path: &str,
12547 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12548 ) {
12549 }
12550}
12551impl crate::common::validate::Validatable for RegulatoryReportingType1Code {
12552 fn validate_constraints(
12553 &self,
12554 _path: &str,
12555 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12556 ) {
12557 }
12558}
12559impl crate::common::validate::Validatable for RemittanceLocationMethod2Code {
12560 fn validate_constraints(
12561 &self,
12562 _path: &str,
12563 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12564 ) {
12565 }
12566}
12567impl crate::common::validate::Validatable for SHA256SignatureText {
12568 #[allow(clippy::unreadable_literal)]
12569 fn validate_constraints(
12570 &self,
12571 path: &str,
12572 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12573 ) {
12574 {
12575 let value: &str = &self.0;
12576 let violated = {
12577 let bytes = value.as_bytes();
12578 bytes.len() != 64usize
12579 || ({
12580 let b = bytes[0usize];
12581 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12582 })
12583 || ({
12584 let b = bytes[1usize];
12585 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12586 })
12587 || ({
12588 let b = bytes[2usize];
12589 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12590 })
12591 || ({
12592 let b = bytes[3usize];
12593 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12594 })
12595 || ({
12596 let b = bytes[4usize];
12597 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12598 })
12599 || ({
12600 let b = bytes[5usize];
12601 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12602 })
12603 || ({
12604 let b = bytes[6usize];
12605 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12606 })
12607 || ({
12608 let b = bytes[7usize];
12609 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12610 })
12611 || ({
12612 let b = bytes[8usize];
12613 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12614 })
12615 || ({
12616 let b = bytes[9usize];
12617 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12618 })
12619 || ({
12620 let b = bytes[10usize];
12621 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12622 })
12623 || ({
12624 let b = bytes[11usize];
12625 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12626 })
12627 || ({
12628 let b = bytes[12usize];
12629 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12630 })
12631 || ({
12632 let b = bytes[13usize];
12633 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12634 })
12635 || ({
12636 let b = bytes[14usize];
12637 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12638 })
12639 || ({
12640 let b = bytes[15usize];
12641 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12642 })
12643 || ({
12644 let b = bytes[16usize];
12645 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12646 })
12647 || ({
12648 let b = bytes[17usize];
12649 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12650 })
12651 || ({
12652 let b = bytes[18usize];
12653 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12654 })
12655 || ({
12656 let b = bytes[19usize];
12657 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12658 })
12659 || ({
12660 let b = bytes[20usize];
12661 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12662 })
12663 || ({
12664 let b = bytes[21usize];
12665 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12666 })
12667 || ({
12668 let b = bytes[22usize];
12669 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12670 })
12671 || ({
12672 let b = bytes[23usize];
12673 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12674 })
12675 || ({
12676 let b = bytes[24usize];
12677 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12678 })
12679 || ({
12680 let b = bytes[25usize];
12681 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12682 })
12683 || ({
12684 let b = bytes[26usize];
12685 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12686 })
12687 || ({
12688 let b = bytes[27usize];
12689 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12690 })
12691 || ({
12692 let b = bytes[28usize];
12693 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12694 })
12695 || ({
12696 let b = bytes[29usize];
12697 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12698 })
12699 || ({
12700 let b = bytes[30usize];
12701 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12702 })
12703 || ({
12704 let b = bytes[31usize];
12705 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12706 })
12707 || ({
12708 let b = bytes[32usize];
12709 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12710 })
12711 || ({
12712 let b = bytes[33usize];
12713 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12714 })
12715 || ({
12716 let b = bytes[34usize];
12717 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12718 })
12719 || ({
12720 let b = bytes[35usize];
12721 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12722 })
12723 || ({
12724 let b = bytes[36usize];
12725 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12726 })
12727 || ({
12728 let b = bytes[37usize];
12729 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12730 })
12731 || ({
12732 let b = bytes[38usize];
12733 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12734 })
12735 || ({
12736 let b = bytes[39usize];
12737 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12738 })
12739 || ({
12740 let b = bytes[40usize];
12741 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12742 })
12743 || ({
12744 let b = bytes[41usize];
12745 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12746 })
12747 || ({
12748 let b = bytes[42usize];
12749 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12750 })
12751 || ({
12752 let b = bytes[43usize];
12753 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12754 })
12755 || ({
12756 let b = bytes[44usize];
12757 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12758 })
12759 || ({
12760 let b = bytes[45usize];
12761 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12762 })
12763 || ({
12764 let b = bytes[46usize];
12765 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12766 })
12767 || ({
12768 let b = bytes[47usize];
12769 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12770 })
12771 || ({
12772 let b = bytes[48usize];
12773 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12774 })
12775 || ({
12776 let b = bytes[49usize];
12777 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12778 })
12779 || ({
12780 let b = bytes[50usize];
12781 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12782 })
12783 || ({
12784 let b = bytes[51usize];
12785 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12786 })
12787 || ({
12788 let b = bytes[52usize];
12789 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12790 })
12791 || ({
12792 let b = bytes[53usize];
12793 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12794 })
12795 || ({
12796 let b = bytes[54usize];
12797 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12798 })
12799 || ({
12800 let b = bytes[55usize];
12801 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12802 })
12803 || ({
12804 let b = bytes[56usize];
12805 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12806 })
12807 || ({
12808 let b = bytes[57usize];
12809 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12810 })
12811 || ({
12812 let b = bytes[58usize];
12813 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12814 })
12815 || ({
12816 let b = bytes[59usize];
12817 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12818 })
12819 || ({
12820 let b = bytes[60usize];
12821 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12822 })
12823 || ({
12824 let b = bytes[61usize];
12825 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12826 })
12827 || ({
12828 let b = bytes[62usize];
12829 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12830 })
12831 || ({
12832 let b = bytes[63usize];
12833 !(48u8..=57u8).contains(&b) && !(65u8..=70u8).contains(&b)
12834 })
12835 };
12836 if violated {
12837 violations.push(crate::common::validate::ConstraintViolation {
12838 path: path.to_string(),
12839 message: "value does not match pattern ([0-9A-F][0-9A-F]){32}".to_string(),
12840 kind: crate::common::validate::ConstraintKind::Pattern,
12841 });
12842 }
12843 }
12844 }
12845}
12846impl crate::common::validate::Validatable for SettlementMethod1Code {
12847 fn validate_constraints(
12848 &self,
12849 _path: &str,
12850 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12851 ) {
12852 }
12853}
12854impl crate::common::validate::Validatable for TaxRecordPeriod1Code {
12855 fn validate_constraints(
12856 &self,
12857 _path: &str,
12858 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12859 ) {
12860 }
12861}
12862impl crate::common::validate::Validatable for TrueFalseIndicator {
12863 fn validate_constraints(
12864 &self,
12865 _path: &str,
12866 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12867 ) {
12868 }
12869}
12870impl crate::common::validate::Validatable for UUIDv4Identifier {
12871 #[allow(clippy::unreadable_literal)]
12872 fn validate_constraints(
12873 &self,
12874 path: &str,
12875 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12876 ) {
12877 {
12878 let value: &str = &self.0;
12879 let violated = {
12880 let bytes = value.as_bytes();
12881 bytes.len() != 36usize
12882 || ({
12883 let b = bytes[0usize];
12884 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12885 })
12886 || ({
12887 let b = bytes[1usize];
12888 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12889 })
12890 || ({
12891 let b = bytes[2usize];
12892 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12893 })
12894 || ({
12895 let b = bytes[3usize];
12896 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12897 })
12898 || ({
12899 let b = bytes[4usize];
12900 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12901 })
12902 || ({
12903 let b = bytes[5usize];
12904 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12905 })
12906 || ({
12907 let b = bytes[6usize];
12908 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12909 })
12910 || ({
12911 let b = bytes[7usize];
12912 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12913 })
12914 || bytes[8usize] != 45u8
12915 || ({
12916 let b = bytes[9usize];
12917 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12918 })
12919 || ({
12920 let b = bytes[10usize];
12921 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12922 })
12923 || ({
12924 let b = bytes[11usize];
12925 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12926 })
12927 || ({
12928 let b = bytes[12usize];
12929 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12930 })
12931 || bytes[13usize] != 45u8
12932 || bytes[14usize] != 52u8
12933 || ({
12934 let b = bytes[15usize];
12935 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12936 })
12937 || ({
12938 let b = bytes[16usize];
12939 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12940 })
12941 || ({
12942 let b = bytes[17usize];
12943 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12944 })
12945 || bytes[18usize] != 45u8
12946 || ({
12947 let b = bytes[19usize];
12948 b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
12949 })
12950 || ({
12951 let b = bytes[20usize];
12952 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12953 })
12954 || ({
12955 let b = bytes[21usize];
12956 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12957 })
12958 || ({
12959 let b = bytes[22usize];
12960 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12961 })
12962 || bytes[23usize] != 45u8
12963 || ({
12964 let b = bytes[24usize];
12965 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12966 })
12967 || ({
12968 let b = bytes[25usize];
12969 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12970 })
12971 || ({
12972 let b = bytes[26usize];
12973 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12974 })
12975 || ({
12976 let b = bytes[27usize];
12977 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12978 })
12979 || ({
12980 let b = bytes[28usize];
12981 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12982 })
12983 || ({
12984 let b = bytes[29usize];
12985 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12986 })
12987 || ({
12988 let b = bytes[30usize];
12989 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12990 })
12991 || ({
12992 let b = bytes[31usize];
12993 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12994 })
12995 || ({
12996 let b = bytes[32usize];
12997 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
12998 })
12999 || ({
13000 let b = bytes[33usize];
13001 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13002 })
13003 || ({
13004 let b = bytes[34usize];
13005 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13006 })
13007 || ({
13008 let b = bytes[35usize];
13009 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
13010 })
13011 };
13012 if violated {
13013 violations
13014 .push(crate::common::validate::ConstraintViolation {
13015 path: path.to_string(),
13016 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}"
13017 .to_string(),
13018 kind: crate::common::validate::ConstraintKind::Pattern,
13019 });
13020 }
13021 }
13022 }
13023}
13024impl crate::common::validate::Validatable for AccountIdentification4Choice {
13025 fn validate_constraints(
13026 &self,
13027 path: &str,
13028 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13029 ) {
13030 match self {
13031 Self::IBAN(inner) => {
13032 let snap = violations.len();
13033 inner.validate_constraints("", violations);
13034 if violations.len() > snap {
13035 let pfx = format!("{path}/IBAN");
13036 for v in &mut violations[snap..] {
13037 v.path.insert_str(0, &pfx);
13038 }
13039 }
13040 }
13041 Self::Othr(inner) => {
13042 let snap = violations.len();
13043 inner.validate_constraints("", violations);
13044 if violations.len() > snap {
13045 let pfx = format!("{path}/Othr");
13046 for v in &mut violations[snap..] {
13047 v.path.insert_str(0, &pfx);
13048 }
13049 }
13050 }
13051 }
13052 }
13053}
13054impl crate::common::validate::Validatable for AccountSchemeName1Choice {
13055 fn validate_constraints(
13056 &self,
13057 path: &str,
13058 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13059 ) {
13060 match self {
13061 Self::Cd(inner) => {
13062 let snap = violations.len();
13063 inner.validate_constraints("", violations);
13064 if violations.len() > snap {
13065 let pfx = format!("{path}/Cd");
13066 for v in &mut violations[snap..] {
13067 v.path.insert_str(0, &pfx);
13068 }
13069 }
13070 }
13071 Self::Prtry(inner) => {
13072 let snap = violations.len();
13073 inner.validate_constraints("", violations);
13074 if violations.len() > snap {
13075 let pfx = format!("{path}/Prtry");
13076 for v in &mut violations[snap..] {
13077 v.path.insert_str(0, &pfx);
13078 }
13079 }
13080 }
13081 }
13082 }
13083}
13084impl crate::common::validate::Validatable for ActiveCurrencyAndAmount {
13085 fn validate_constraints(
13086 &self,
13087 path: &str,
13088 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13089 ) {
13090 self.value.validate_constraints(path, violations);
13091 {
13092 let snap = violations.len();
13093 self.ccy.validate_constraints("", violations);
13094 if violations.len() > snap {
13095 let pfx = format!("{path}/@Ccy");
13096 for v in &mut violations[snap..] {
13097 v.path.insert_str(0, &pfx);
13098 }
13099 }
13100 }
13101 }
13102}
13103impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmount {
13104 fn validate_constraints(
13105 &self,
13106 path: &str,
13107 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13108 ) {
13109 self.value.validate_constraints(path, violations);
13110 {
13111 let snap = violations.len();
13112 self.ccy.validate_constraints("", violations);
13113 if violations.len() > snap {
13114 let pfx = format!("{path}/@Ccy");
13115 for v in &mut violations[snap..] {
13116 v.path.insert_str(0, &pfx);
13117 }
13118 }
13119 }
13120 }
13121}
13122impl crate::common::validate::Validatable for AdditionalDateTime1 {
13123 fn validate_constraints(
13124 &self,
13125 path: &str,
13126 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13127 ) {
13128 if let Some(ref val) = self.accptnc_dt_tm {
13129 let snap = violations.len();
13130 val.validate_constraints("", violations);
13131 if violations.len() > snap {
13132 let pfx = format!("{path}/AccptncDtTm");
13133 for v in &mut violations[snap..] {
13134 v.path.insert_str(0, &pfx);
13135 }
13136 }
13137 }
13138 if let Some(ref val) = self.poolg_adjstmnt_dt {
13139 let snap = violations.len();
13140 val.validate_constraints("", violations);
13141 if violations.len() > snap {
13142 let pfx = format!("{path}/PoolgAdjstmntDt");
13143 for v in &mut violations[snap..] {
13144 v.path.insert_str(0, &pfx);
13145 }
13146 }
13147 }
13148 if let Some(ref val) = self.xpry_dt_tm {
13149 let snap = violations.len();
13150 val.validate_constraints("", violations);
13151 if violations.len() > snap {
13152 let pfx = format!("{path}/XpryDtTm");
13153 for v in &mut violations[snap..] {
13154 v.path.insert_str(0, &pfx);
13155 }
13156 }
13157 }
13158 }
13159}
13160impl crate::common::validate::Validatable for AddressType3Choice {
13161 fn validate_constraints(
13162 &self,
13163 path: &str,
13164 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13165 ) {
13166 match self {
13167 Self::Cd(inner) => {
13168 let snap = violations.len();
13169 inner.validate_constraints("", violations);
13170 if violations.len() > snap {
13171 let pfx = format!("{path}/Cd");
13172 for v in &mut violations[snap..] {
13173 v.path.insert_str(0, &pfx);
13174 }
13175 }
13176 }
13177 Self::Prtry(inner) => {
13178 let snap = violations.len();
13179 inner.validate_constraints("", violations);
13180 if violations.len() > snap {
13181 let pfx = format!("{path}/Prtry");
13182 for v in &mut violations[snap..] {
13183 v.path.insert_str(0, &pfx);
13184 }
13185 }
13186 }
13187 }
13188 }
13189}
13190impl crate::common::validate::Validatable for BranchAndFinancialInstitutionIdentification8 {
13191 fn validate_constraints(
13192 &self,
13193 path: &str,
13194 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13195 ) {
13196 {
13197 let snap = violations.len();
13198 self.fin_instn_id.validate_constraints("", violations);
13199 if violations.len() > snap {
13200 let pfx = format!("{path}/FinInstnId");
13201 for v in &mut violations[snap..] {
13202 v.path.insert_str(0, &pfx);
13203 }
13204 }
13205 }
13206 if let Some(ref val) = self.brnch_id {
13207 let snap = violations.len();
13208 val.validate_constraints("", violations);
13209 if violations.len() > snap {
13210 let pfx = format!("{path}/BrnchId");
13211 for v in &mut violations[snap..] {
13212 v.path.insert_str(0, &pfx);
13213 }
13214 }
13215 }
13216 }
13217}
13218impl crate::common::validate::Validatable for BranchData5 {
13219 fn validate_constraints(
13220 &self,
13221 path: &str,
13222 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13223 ) {
13224 if let Some(ref val) = self.id {
13225 let snap = violations.len();
13226 val.validate_constraints("", violations);
13227 if violations.len() > snap {
13228 let pfx = format!("{path}/Id");
13229 for v in &mut violations[snap..] {
13230 v.path.insert_str(0, &pfx);
13231 }
13232 }
13233 }
13234 if let Some(ref val) = self.lei {
13235 let snap = violations.len();
13236 val.validate_constraints("", violations);
13237 if violations.len() > snap {
13238 let pfx = format!("{path}/LEI");
13239 for v in &mut violations[snap..] {
13240 v.path.insert_str(0, &pfx);
13241 }
13242 }
13243 }
13244 if let Some(ref val) = self.nm {
13245 let snap = violations.len();
13246 val.validate_constraints("", violations);
13247 if violations.len() > snap {
13248 let pfx = format!("{path}/Nm");
13249 for v in &mut violations[snap..] {
13250 v.path.insert_str(0, &pfx);
13251 }
13252 }
13253 }
13254 if let Some(ref val) = self.pstl_adr {
13255 let snap = violations.len();
13256 val.validate_constraints("", violations);
13257 if violations.len() > snap {
13258 let pfx = format!("{path}/PstlAdr");
13259 for v in &mut violations[snap..] {
13260 v.path.insert_str(0, &pfx);
13261 }
13262 }
13263 }
13264 }
13265}
13266impl crate::common::validate::Validatable for CashAccount40 {
13267 fn validate_constraints(
13268 &self,
13269 path: &str,
13270 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13271 ) {
13272 if let Some(ref wrapper) = self.id {
13273 let snap = violations.len();
13274 wrapper.inner.validate_constraints("", violations);
13275 if violations.len() > snap {
13276 let pfx = format!("{path}/Id");
13277 for v in &mut violations[snap..] {
13278 v.path.insert_str(0, &pfx);
13279 }
13280 }
13281 }
13282 if let Some(ref wrapper) = self.tp {
13283 let snap = violations.len();
13284 wrapper.inner.validate_constraints("", violations);
13285 if violations.len() > snap {
13286 let pfx = format!("{path}/Tp");
13287 for v in &mut violations[snap..] {
13288 v.path.insert_str(0, &pfx);
13289 }
13290 }
13291 }
13292 if let Some(ref val) = self.ccy {
13293 let snap = violations.len();
13294 val.validate_constraints("", violations);
13295 if violations.len() > snap {
13296 let pfx = format!("{path}/Ccy");
13297 for v in &mut violations[snap..] {
13298 v.path.insert_str(0, &pfx);
13299 }
13300 }
13301 }
13302 if let Some(ref val) = self.nm {
13303 let snap = violations.len();
13304 val.validate_constraints("", violations);
13305 if violations.len() > snap {
13306 let pfx = format!("{path}/Nm");
13307 for v in &mut violations[snap..] {
13308 v.path.insert_str(0, &pfx);
13309 }
13310 }
13311 }
13312 if let Some(ref val) = self.prxy {
13313 let snap = violations.len();
13314 val.validate_constraints("", violations);
13315 if violations.len() > snap {
13316 let pfx = format!("{path}/Prxy");
13317 for v in &mut violations[snap..] {
13318 v.path.insert_str(0, &pfx);
13319 }
13320 }
13321 }
13322 }
13323}
13324impl crate::common::validate::Validatable for CashAccountType2Choice {
13325 fn validate_constraints(
13326 &self,
13327 path: &str,
13328 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13329 ) {
13330 match self {
13331 Self::Cd(inner) => {
13332 let snap = violations.len();
13333 inner.validate_constraints("", violations);
13334 if violations.len() > snap {
13335 let pfx = format!("{path}/Cd");
13336 for v in &mut violations[snap..] {
13337 v.path.insert_str(0, &pfx);
13338 }
13339 }
13340 }
13341 Self::Prtry(inner) => {
13342 let snap = violations.len();
13343 inner.validate_constraints("", violations);
13344 if violations.len() > snap {
13345 let pfx = format!("{path}/Prtry");
13346 for v in &mut violations[snap..] {
13347 v.path.insert_str(0, &pfx);
13348 }
13349 }
13350 }
13351 }
13352 }
13353}
13354impl crate::common::validate::Validatable for CategoryPurpose1Choice {
13355 fn validate_constraints(
13356 &self,
13357 path: &str,
13358 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13359 ) {
13360 match self {
13361 Self::Cd(inner) => {
13362 let snap = violations.len();
13363 inner.validate_constraints("", violations);
13364 if violations.len() > snap {
13365 let pfx = format!("{path}/Cd");
13366 for v in &mut violations[snap..] {
13367 v.path.insert_str(0, &pfx);
13368 }
13369 }
13370 }
13371 Self::Prtry(inner) => {
13372 let snap = violations.len();
13373 inner.validate_constraints("", violations);
13374 if violations.len() > snap {
13375 let pfx = format!("{path}/Prtry");
13376 for v in &mut violations[snap..] {
13377 v.path.insert_str(0, &pfx);
13378 }
13379 }
13380 }
13381 }
13382 }
13383}
13384impl crate::common::validate::Validatable for ChargeType3Choice {
13385 fn validate_constraints(
13386 &self,
13387 path: &str,
13388 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13389 ) {
13390 match self {
13391 Self::Cd(inner) => {
13392 let snap = violations.len();
13393 inner.validate_constraints("", violations);
13394 if violations.len() > snap {
13395 let pfx = format!("{path}/Cd");
13396 for v in &mut violations[snap..] {
13397 v.path.insert_str(0, &pfx);
13398 }
13399 }
13400 }
13401 Self::Prtry(inner) => {
13402 let snap = violations.len();
13403 inner.validate_constraints("", violations);
13404 if violations.len() > snap {
13405 let pfx = format!("{path}/Prtry");
13406 for v in &mut violations[snap..] {
13407 v.path.insert_str(0, &pfx);
13408 }
13409 }
13410 }
13411 }
13412 }
13413}
13414impl crate::common::validate::Validatable for Charges16 {
13415 fn validate_constraints(
13416 &self,
13417 path: &str,
13418 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13419 ) {
13420 {
13421 let snap = violations.len();
13422 self.amt.validate_constraints("", violations);
13423 if violations.len() > snap {
13424 let pfx = format!("{path}/Amt");
13425 for v in &mut violations[snap..] {
13426 v.path.insert_str(0, &pfx);
13427 }
13428 }
13429 }
13430 {
13431 let snap = violations.len();
13432 self.agt.validate_constraints("", violations);
13433 if violations.len() > snap {
13434 let pfx = format!("{path}/Agt");
13435 for v in &mut violations[snap..] {
13436 v.path.insert_str(0, &pfx);
13437 }
13438 }
13439 }
13440 if let Some(ref wrapper) = self.tp {
13441 let snap = violations.len();
13442 wrapper.inner.validate_constraints("", violations);
13443 if violations.len() > snap {
13444 let pfx = format!("{path}/Tp");
13445 for v in &mut violations[snap..] {
13446 v.path.insert_str(0, &pfx);
13447 }
13448 }
13449 }
13450 }
13451}
13452impl crate::common::validate::Validatable for ClearingSystemIdentification2Choice {
13453 fn validate_constraints(
13454 &self,
13455 path: &str,
13456 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13457 ) {
13458 match self {
13459 Self::Cd(inner) => {
13460 let snap = violations.len();
13461 inner.validate_constraints("", violations);
13462 if violations.len() > snap {
13463 let pfx = format!("{path}/Cd");
13464 for v in &mut violations[snap..] {
13465 v.path.insert_str(0, &pfx);
13466 }
13467 }
13468 }
13469 Self::Prtry(inner) => {
13470 let snap = violations.len();
13471 inner.validate_constraints("", violations);
13472 if violations.len() > snap {
13473 let pfx = format!("{path}/Prtry");
13474 for v in &mut violations[snap..] {
13475 v.path.insert_str(0, &pfx);
13476 }
13477 }
13478 }
13479 }
13480 }
13481}
13482impl crate::common::validate::Validatable for ClearingSystemIdentification3Choice {
13483 fn validate_constraints(
13484 &self,
13485 path: &str,
13486 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13487 ) {
13488 match self {
13489 Self::Cd(inner) => {
13490 let snap = violations.len();
13491 inner.validate_constraints("", violations);
13492 if violations.len() > snap {
13493 let pfx = format!("{path}/Cd");
13494 for v in &mut violations[snap..] {
13495 v.path.insert_str(0, &pfx);
13496 }
13497 }
13498 }
13499 Self::Prtry(inner) => {
13500 let snap = violations.len();
13501 inner.validate_constraints("", violations);
13502 if violations.len() > snap {
13503 let pfx = format!("{path}/Prtry");
13504 for v in &mut violations[snap..] {
13505 v.path.insert_str(0, &pfx);
13506 }
13507 }
13508 }
13509 }
13510 }
13511}
13512impl crate::common::validate::Validatable for ClearingSystemMemberIdentification2 {
13513 fn validate_constraints(
13514 &self,
13515 path: &str,
13516 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13517 ) {
13518 if let Some(ref wrapper) = self.clr_sys_id {
13519 let snap = violations.len();
13520 wrapper.inner.validate_constraints("", violations);
13521 if violations.len() > snap {
13522 let pfx = format!("{path}/ClrSysId");
13523 for v in &mut violations[snap..] {
13524 v.path.insert_str(0, &pfx);
13525 }
13526 }
13527 }
13528 {
13529 let snap = violations.len();
13530 self.mmb_id.validate_constraints("", violations);
13531 if violations.len() > snap {
13532 let pfx = format!("{path}/MmbId");
13533 for v in &mut violations[snap..] {
13534 v.path.insert_str(0, &pfx);
13535 }
13536 }
13537 }
13538 }
13539}
13540impl crate::common::validate::Validatable for Contact13 {
13541 fn validate_constraints(
13542 &self,
13543 path: &str,
13544 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13545 ) {
13546 if let Some(ref val) = self.nm_prfx {
13547 let snap = violations.len();
13548 val.validate_constraints("", violations);
13549 if violations.len() > snap {
13550 let pfx = format!("{path}/NmPrfx");
13551 for v in &mut violations[snap..] {
13552 v.path.insert_str(0, &pfx);
13553 }
13554 }
13555 }
13556 if let Some(ref val) = self.nm {
13557 let snap = violations.len();
13558 val.validate_constraints("", violations);
13559 if violations.len() > snap {
13560 let pfx = format!("{path}/Nm");
13561 for v in &mut violations[snap..] {
13562 v.path.insert_str(0, &pfx);
13563 }
13564 }
13565 }
13566 if let Some(ref val) = self.phne_nb {
13567 let snap = violations.len();
13568 val.validate_constraints("", violations);
13569 if violations.len() > snap {
13570 let pfx = format!("{path}/PhneNb");
13571 for v in &mut violations[snap..] {
13572 v.path.insert_str(0, &pfx);
13573 }
13574 }
13575 }
13576 if let Some(ref val) = self.mob_nb {
13577 let snap = violations.len();
13578 val.validate_constraints("", violations);
13579 if violations.len() > snap {
13580 let pfx = format!("{path}/MobNb");
13581 for v in &mut violations[snap..] {
13582 v.path.insert_str(0, &pfx);
13583 }
13584 }
13585 }
13586 if let Some(ref val) = self.fax_nb {
13587 let snap = violations.len();
13588 val.validate_constraints("", violations);
13589 if violations.len() > snap {
13590 let pfx = format!("{path}/FaxNb");
13591 for v in &mut violations[snap..] {
13592 v.path.insert_str(0, &pfx);
13593 }
13594 }
13595 }
13596 if let Some(ref val) = self.url_adr {
13597 let snap = violations.len();
13598 val.validate_constraints("", violations);
13599 if violations.len() > snap {
13600 let pfx = format!("{path}/URLAdr");
13601 for v in &mut violations[snap..] {
13602 v.path.insert_str(0, &pfx);
13603 }
13604 }
13605 }
13606 if let Some(ref val) = self.email_adr {
13607 let snap = violations.len();
13608 val.validate_constraints("", violations);
13609 if violations.len() > snap {
13610 let pfx = format!("{path}/EmailAdr");
13611 for v in &mut violations[snap..] {
13612 v.path.insert_str(0, &pfx);
13613 }
13614 }
13615 }
13616 if let Some(ref val) = self.email_purp {
13617 let snap = violations.len();
13618 val.validate_constraints("", violations);
13619 if violations.len() > snap {
13620 let pfx = format!("{path}/EmailPurp");
13621 for v in &mut violations[snap..] {
13622 v.path.insert_str(0, &pfx);
13623 }
13624 }
13625 }
13626 if let Some(ref val) = self.job_titl {
13627 let snap = violations.len();
13628 val.validate_constraints("", violations);
13629 if violations.len() > snap {
13630 let pfx = format!("{path}/JobTitl");
13631 for v in &mut violations[snap..] {
13632 v.path.insert_str(0, &pfx);
13633 }
13634 }
13635 }
13636 if let Some(ref val) = self.rspnsblty {
13637 let snap = violations.len();
13638 val.validate_constraints("", violations);
13639 if violations.len() > snap {
13640 let pfx = format!("{path}/Rspnsblty");
13641 for v in &mut violations[snap..] {
13642 v.path.insert_str(0, &pfx);
13643 }
13644 }
13645 }
13646 if let Some(ref val) = self.dept {
13647 let snap = violations.len();
13648 val.validate_constraints("", violations);
13649 if violations.len() > snap {
13650 let pfx = format!("{path}/Dept");
13651 for v in &mut violations[snap..] {
13652 v.path.insert_str(0, &pfx);
13653 }
13654 }
13655 }
13656 for (idx, elem) in self.othr.iter().enumerate() {
13657 let snap = violations.len();
13658 elem.validate_constraints("", violations);
13659 if violations.len() > snap {
13660 let pfx = format!("{path}/Othr[{idx}]");
13661 for v in &mut violations[snap..] {
13662 v.path.insert_str(0, &pfx);
13663 }
13664 }
13665 }
13666 if let Some(ref val) = self.prefrd_mtd {
13667 let snap = violations.len();
13668 val.validate_constraints("", violations);
13669 if violations.len() > snap {
13670 let pfx = format!("{path}/PrefrdMtd");
13671 for v in &mut violations[snap..] {
13672 v.path.insert_str(0, &pfx);
13673 }
13674 }
13675 }
13676 }
13677}
13678impl crate::common::validate::Validatable for CreditTransferMandateData1 {
13679 fn validate_constraints(
13680 &self,
13681 path: &str,
13682 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13683 ) {
13684 if let Some(ref val) = self.mndt_id {
13685 let snap = violations.len();
13686 val.validate_constraints("", violations);
13687 if violations.len() > snap {
13688 let pfx = format!("{path}/MndtId");
13689 for v in &mut violations[snap..] {
13690 v.path.insert_str(0, &pfx);
13691 }
13692 }
13693 }
13694 if let Some(ref val) = self.tp {
13695 let snap = violations.len();
13696 val.validate_constraints("", violations);
13697 if violations.len() > snap {
13698 let pfx = format!("{path}/Tp");
13699 for v in &mut violations[snap..] {
13700 v.path.insert_str(0, &pfx);
13701 }
13702 }
13703 }
13704 if let Some(ref val) = self.dt_of_sgntr {
13705 let snap = violations.len();
13706 val.validate_constraints("", violations);
13707 if violations.len() > snap {
13708 let pfx = format!("{path}/DtOfSgntr");
13709 for v in &mut violations[snap..] {
13710 v.path.insert_str(0, &pfx);
13711 }
13712 }
13713 }
13714 if let Some(ref val) = self.dt_of_vrfctn {
13715 let snap = violations.len();
13716 val.validate_constraints("", violations);
13717 if violations.len() > snap {
13718 let pfx = format!("{path}/DtOfVrfctn");
13719 for v in &mut violations[snap..] {
13720 v.path.insert_str(0, &pfx);
13721 }
13722 }
13723 }
13724 if let Some(ref val) = self.elctrnc_sgntr {
13725 let snap = violations.len();
13726 val.validate_constraints("", violations);
13727 if violations.len() > snap {
13728 let pfx = format!("{path}/ElctrncSgntr");
13729 for v in &mut violations[snap..] {
13730 v.path.insert_str(0, &pfx);
13731 }
13732 }
13733 }
13734 if let Some(ref val) = self.frst_pmt_dt {
13735 let snap = violations.len();
13736 val.validate_constraints("", violations);
13737 if violations.len() > snap {
13738 let pfx = format!("{path}/FrstPmtDt");
13739 for v in &mut violations[snap..] {
13740 v.path.insert_str(0, &pfx);
13741 }
13742 }
13743 }
13744 if let Some(ref val) = self.fnl_pmt_dt {
13745 let snap = violations.len();
13746 val.validate_constraints("", violations);
13747 if violations.len() > snap {
13748 let pfx = format!("{path}/FnlPmtDt");
13749 for v in &mut violations[snap..] {
13750 v.path.insert_str(0, &pfx);
13751 }
13752 }
13753 }
13754 if let Some(ref wrapper) = self.frqcy {
13755 let snap = violations.len();
13756 wrapper.inner.validate_constraints("", violations);
13757 if violations.len() > snap {
13758 let pfx = format!("{path}/Frqcy");
13759 for v in &mut violations[snap..] {
13760 v.path.insert_str(0, &pfx);
13761 }
13762 }
13763 }
13764 if let Some(ref wrapper) = self.rsn {
13765 let snap = violations.len();
13766 wrapper.inner.validate_constraints("", violations);
13767 if violations.len() > snap {
13768 let pfx = format!("{path}/Rsn");
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 CreditTransferTransaction70 {
13777 fn validate_constraints(
13778 &self,
13779 path: &str,
13780 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13781 ) {
13782 {
13783 let snap = violations.len();
13784 self.pmt_id.validate_constraints("", violations);
13785 if violations.len() > snap {
13786 let pfx = format!("{path}/PmtId");
13787 for v in &mut violations[snap..] {
13788 v.path.insert_str(0, &pfx);
13789 }
13790 }
13791 }
13792 if let Some(ref val) = self.pmt_tp_inf {
13793 let snap = violations.len();
13794 val.validate_constraints("", violations);
13795 if violations.len() > snap {
13796 let pfx = format!("{path}/PmtTpInf");
13797 for v in &mut violations[snap..] {
13798 v.path.insert_str(0, &pfx);
13799 }
13800 }
13801 }
13802 {
13803 let snap = violations.len();
13804 self.intr_bk_sttlm_amt.validate_constraints("", violations);
13805 if violations.len() > snap {
13806 let pfx = format!("{path}/IntrBkSttlmAmt");
13807 for v in &mut violations[snap..] {
13808 v.path.insert_str(0, &pfx);
13809 }
13810 }
13811 }
13812 if let Some(ref val) = self.intr_bk_sttlm_dt {
13813 let snap = violations.len();
13814 val.validate_constraints("", violations);
13815 if violations.len() > snap {
13816 let pfx = format!("{path}/IntrBkSttlmDt");
13817 for v in &mut violations[snap..] {
13818 v.path.insert_str(0, &pfx);
13819 }
13820 }
13821 }
13822 if let Some(ref val) = self.sttlm_prty {
13823 let snap = violations.len();
13824 val.validate_constraints("", violations);
13825 if violations.len() > snap {
13826 let pfx = format!("{path}/SttlmPrty");
13827 for v in &mut violations[snap..] {
13828 v.path.insert_str(0, &pfx);
13829 }
13830 }
13831 }
13832 if let Some(ref val) = self.sttlm_tm_indctn {
13833 let snap = violations.len();
13834 val.validate_constraints("", violations);
13835 if violations.len() > snap {
13836 let pfx = format!("{path}/SttlmTmIndctn");
13837 for v in &mut violations[snap..] {
13838 v.path.insert_str(0, &pfx);
13839 }
13840 }
13841 }
13842 if let Some(ref val) = self.sttlm_tm_req {
13843 let snap = violations.len();
13844 val.validate_constraints("", violations);
13845 if violations.len() > snap {
13846 let pfx = format!("{path}/SttlmTmReq");
13847 for v in &mut violations[snap..] {
13848 v.path.insert_str(0, &pfx);
13849 }
13850 }
13851 }
13852 if let Some(ref val) = self.addtl_dt_tm {
13853 let snap = violations.len();
13854 val.validate_constraints("", violations);
13855 if violations.len() > snap {
13856 let pfx = format!("{path}/AddtlDtTm");
13857 for v in &mut violations[snap..] {
13858 v.path.insert_str(0, &pfx);
13859 }
13860 }
13861 }
13862 if let Some(ref val) = self.instd_amt {
13863 let snap = violations.len();
13864 val.validate_constraints("", violations);
13865 if violations.len() > snap {
13866 let pfx = format!("{path}/InstdAmt");
13867 for v in &mut violations[snap..] {
13868 v.path.insert_str(0, &pfx);
13869 }
13870 }
13871 }
13872 if let Some(ref val) = self.xchg_rate {
13873 let snap = violations.len();
13874 val.validate_constraints("", violations);
13875 if violations.len() > snap {
13876 let pfx = format!("{path}/XchgRate");
13877 for v in &mut violations[snap..] {
13878 v.path.insert_str(0, &pfx);
13879 }
13880 }
13881 }
13882 if let Some(ref val) = self.agrd_rate {
13883 let snap = violations.len();
13884 val.validate_constraints("", violations);
13885 if violations.len() > snap {
13886 let pfx = format!("{path}/AgrdRate");
13887 for v in &mut violations[snap..] {
13888 v.path.insert_str(0, &pfx);
13889 }
13890 }
13891 }
13892 {
13893 let snap = violations.len();
13894 self.chrg_br.validate_constraints("", violations);
13895 if violations.len() > snap {
13896 let pfx = format!("{path}/ChrgBr");
13897 for v in &mut violations[snap..] {
13898 v.path.insert_str(0, &pfx);
13899 }
13900 }
13901 }
13902 for (idx, elem) in self.chrgs_inf.iter().enumerate() {
13903 let snap = violations.len();
13904 elem.validate_constraints("", violations);
13905 if violations.len() > snap {
13906 let pfx = format!("{path}/ChrgsInf[{idx}]");
13907 for v in &mut violations[snap..] {
13908 v.path.insert_str(0, &pfx);
13909 }
13910 }
13911 }
13912 if let Some(ref val) = self.mndt_rltd_inf {
13913 let snap = violations.len();
13914 val.validate_constraints("", violations);
13915 if violations.len() > snap {
13916 let pfx = format!("{path}/MndtRltdInf");
13917 for v in &mut violations[snap..] {
13918 v.path.insert_str(0, &pfx);
13919 }
13920 }
13921 }
13922 if let Some(ref wrapper) = self.pmt_sgntr {
13923 let snap = violations.len();
13924 wrapper.inner.validate_constraints("", violations);
13925 if violations.len() > snap {
13926 let pfx = format!("{path}/PmtSgntr");
13927 for v in &mut violations[snap..] {
13928 v.path.insert_str(0, &pfx);
13929 }
13930 }
13931 }
13932 if let Some(ref val) = self.prvs_instg_agt1 {
13933 let snap = violations.len();
13934 val.validate_constraints("", violations);
13935 if violations.len() > snap {
13936 let pfx = format!("{path}/PrvsInstgAgt1");
13937 for v in &mut violations[snap..] {
13938 v.path.insert_str(0, &pfx);
13939 }
13940 }
13941 }
13942 if let Some(ref val) = self.prvs_instg_agt1acct {
13943 let snap = violations.len();
13944 val.validate_constraints("", violations);
13945 if violations.len() > snap {
13946 let pfx = format!("{path}/PrvsInstgAgt1Acct");
13947 for v in &mut violations[snap..] {
13948 v.path.insert_str(0, &pfx);
13949 }
13950 }
13951 }
13952 if let Some(ref val) = self.prvs_instg_agt2 {
13953 let snap = violations.len();
13954 val.validate_constraints("", violations);
13955 if violations.len() > snap {
13956 let pfx = format!("{path}/PrvsInstgAgt2");
13957 for v in &mut violations[snap..] {
13958 v.path.insert_str(0, &pfx);
13959 }
13960 }
13961 }
13962 if let Some(ref val) = self.prvs_instg_agt2acct {
13963 let snap = violations.len();
13964 val.validate_constraints("", violations);
13965 if violations.len() > snap {
13966 let pfx = format!("{path}/PrvsInstgAgt2Acct");
13967 for v in &mut violations[snap..] {
13968 v.path.insert_str(0, &pfx);
13969 }
13970 }
13971 }
13972 if let Some(ref val) = self.prvs_instg_agt3 {
13973 let snap = violations.len();
13974 val.validate_constraints("", violations);
13975 if violations.len() > snap {
13976 let pfx = format!("{path}/PrvsInstgAgt3");
13977 for v in &mut violations[snap..] {
13978 v.path.insert_str(0, &pfx);
13979 }
13980 }
13981 }
13982 if let Some(ref val) = self.prvs_instg_agt3acct {
13983 let snap = violations.len();
13984 val.validate_constraints("", violations);
13985 if violations.len() > snap {
13986 let pfx = format!("{path}/PrvsInstgAgt3Acct");
13987 for v in &mut violations[snap..] {
13988 v.path.insert_str(0, &pfx);
13989 }
13990 }
13991 }
13992 if let Some(ref val) = self.instg_agt {
13993 let snap = violations.len();
13994 val.validate_constraints("", violations);
13995 if violations.len() > snap {
13996 let pfx = format!("{path}/InstgAgt");
13997 for v in &mut violations[snap..] {
13998 v.path.insert_str(0, &pfx);
13999 }
14000 }
14001 }
14002 if let Some(ref val) = self.instd_agt {
14003 let snap = violations.len();
14004 val.validate_constraints("", violations);
14005 if violations.len() > snap {
14006 let pfx = format!("{path}/InstdAgt");
14007 for v in &mut violations[snap..] {
14008 v.path.insert_str(0, &pfx);
14009 }
14010 }
14011 }
14012 if let Some(ref val) = self.intrmy_agt1 {
14013 let snap = violations.len();
14014 val.validate_constraints("", violations);
14015 if violations.len() > snap {
14016 let pfx = format!("{path}/IntrmyAgt1");
14017 for v in &mut violations[snap..] {
14018 v.path.insert_str(0, &pfx);
14019 }
14020 }
14021 }
14022 if let Some(ref val) = self.intrmy_agt1acct {
14023 let snap = violations.len();
14024 val.validate_constraints("", violations);
14025 if violations.len() > snap {
14026 let pfx = format!("{path}/IntrmyAgt1Acct");
14027 for v in &mut violations[snap..] {
14028 v.path.insert_str(0, &pfx);
14029 }
14030 }
14031 }
14032 if let Some(ref val) = self.intrmy_agt2 {
14033 let snap = violations.len();
14034 val.validate_constraints("", violations);
14035 if violations.len() > snap {
14036 let pfx = format!("{path}/IntrmyAgt2");
14037 for v in &mut violations[snap..] {
14038 v.path.insert_str(0, &pfx);
14039 }
14040 }
14041 }
14042 if let Some(ref val) = self.intrmy_agt2acct {
14043 let snap = violations.len();
14044 val.validate_constraints("", violations);
14045 if violations.len() > snap {
14046 let pfx = format!("{path}/IntrmyAgt2Acct");
14047 for v in &mut violations[snap..] {
14048 v.path.insert_str(0, &pfx);
14049 }
14050 }
14051 }
14052 if let Some(ref val) = self.intrmy_agt3 {
14053 let snap = violations.len();
14054 val.validate_constraints("", violations);
14055 if violations.len() > snap {
14056 let pfx = format!("{path}/IntrmyAgt3");
14057 for v in &mut violations[snap..] {
14058 v.path.insert_str(0, &pfx);
14059 }
14060 }
14061 }
14062 if let Some(ref val) = self.intrmy_agt3acct {
14063 let snap = violations.len();
14064 val.validate_constraints("", violations);
14065 if violations.len() > snap {
14066 let pfx = format!("{path}/IntrmyAgt3Acct");
14067 for v in &mut violations[snap..] {
14068 v.path.insert_str(0, &pfx);
14069 }
14070 }
14071 }
14072 if let Some(ref val) = self.ultmt_dbtr {
14073 let snap = violations.len();
14074 val.validate_constraints("", violations);
14075 if violations.len() > snap {
14076 let pfx = format!("{path}/UltmtDbtr");
14077 for v in &mut violations[snap..] {
14078 v.path.insert_str(0, &pfx);
14079 }
14080 }
14081 }
14082 if let Some(ref val) = self.initg_pty {
14083 let snap = violations.len();
14084 val.validate_constraints("", violations);
14085 if violations.len() > snap {
14086 let pfx = format!("{path}/InitgPty");
14087 for v in &mut violations[snap..] {
14088 v.path.insert_str(0, &pfx);
14089 }
14090 }
14091 }
14092 {
14093 let snap = violations.len();
14094 self.dbtr.validate_constraints("", violations);
14095 if violations.len() > snap {
14096 let pfx = format!("{path}/Dbtr");
14097 for v in &mut violations[snap..] {
14098 v.path.insert_str(0, &pfx);
14099 }
14100 }
14101 }
14102 if let Some(ref val) = self.dbtr_acct {
14103 let snap = violations.len();
14104 val.validate_constraints("", violations);
14105 if violations.len() > snap {
14106 let pfx = format!("{path}/DbtrAcct");
14107 for v in &mut violations[snap..] {
14108 v.path.insert_str(0, &pfx);
14109 }
14110 }
14111 }
14112 {
14113 let snap = violations.len();
14114 self.dbtr_agt.validate_constraints("", violations);
14115 if violations.len() > snap {
14116 let pfx = format!("{path}/DbtrAgt");
14117 for v in &mut violations[snap..] {
14118 v.path.insert_str(0, &pfx);
14119 }
14120 }
14121 }
14122 if let Some(ref val) = self.dbtr_agt_acct {
14123 let snap = violations.len();
14124 val.validate_constraints("", violations);
14125 if violations.len() > snap {
14126 let pfx = format!("{path}/DbtrAgtAcct");
14127 for v in &mut violations[snap..] {
14128 v.path.insert_str(0, &pfx);
14129 }
14130 }
14131 }
14132 {
14133 let snap = violations.len();
14134 self.cdtr_agt.validate_constraints("", violations);
14135 if violations.len() > snap {
14136 let pfx = format!("{path}/CdtrAgt");
14137 for v in &mut violations[snap..] {
14138 v.path.insert_str(0, &pfx);
14139 }
14140 }
14141 }
14142 if let Some(ref val) = self.cdtr_agt_acct {
14143 let snap = violations.len();
14144 val.validate_constraints("", violations);
14145 if violations.len() > snap {
14146 let pfx = format!("{path}/CdtrAgtAcct");
14147 for v in &mut violations[snap..] {
14148 v.path.insert_str(0, &pfx);
14149 }
14150 }
14151 }
14152 {
14153 let snap = violations.len();
14154 self.cdtr.validate_constraints("", violations);
14155 if violations.len() > snap {
14156 let pfx = format!("{path}/Cdtr");
14157 for v in &mut violations[snap..] {
14158 v.path.insert_str(0, &pfx);
14159 }
14160 }
14161 }
14162 if let Some(ref val) = self.cdtr_acct {
14163 let snap = violations.len();
14164 val.validate_constraints("", violations);
14165 if violations.len() > snap {
14166 let pfx = format!("{path}/CdtrAcct");
14167 for v in &mut violations[snap..] {
14168 v.path.insert_str(0, &pfx);
14169 }
14170 }
14171 }
14172 if let Some(ref val) = self.ultmt_cdtr {
14173 let snap = violations.len();
14174 val.validate_constraints("", violations);
14175 if violations.len() > snap {
14176 let pfx = format!("{path}/UltmtCdtr");
14177 for v in &mut violations[snap..] {
14178 v.path.insert_str(0, &pfx);
14179 }
14180 }
14181 }
14182 for (idx, elem) in self.instr_for_cdtr_agt.iter().enumerate() {
14183 let snap = violations.len();
14184 elem.validate_constraints("", violations);
14185 if violations.len() > snap {
14186 let pfx = format!("{path}/InstrForCdtrAgt[{idx}]");
14187 for v in &mut violations[snap..] {
14188 v.path.insert_str(0, &pfx);
14189 }
14190 }
14191 }
14192 for (idx, elem) in self.instr_for_nxt_agt.iter().enumerate() {
14193 let snap = violations.len();
14194 elem.validate_constraints("", violations);
14195 if violations.len() > snap {
14196 let pfx = format!("{path}/InstrForNxtAgt[{idx}]");
14197 for v in &mut violations[snap..] {
14198 v.path.insert_str(0, &pfx);
14199 }
14200 }
14201 }
14202 if let Some(ref wrapper) = self.purp {
14203 let snap = violations.len();
14204 wrapper.inner.validate_constraints("", violations);
14205 if violations.len() > snap {
14206 let pfx = format!("{path}/Purp");
14207 for v in &mut violations[snap..] {
14208 v.path.insert_str(0, &pfx);
14209 }
14210 }
14211 }
14212 for (idx, elem) in self.rgltry_rptg.iter().enumerate() {
14213 let snap = violations.len();
14214 elem.validate_constraints("", violations);
14215 if violations.len() > snap {
14216 let pfx = format!("{path}/RgltryRptg[{idx}]");
14217 for v in &mut violations[snap..] {
14218 v.path.insert_str(0, &pfx);
14219 }
14220 }
14221 }
14222 if let Some(ref val) = self.tax {
14223 let snap = violations.len();
14224 val.validate_constraints("", violations);
14225 if violations.len() > snap {
14226 let pfx = format!("{path}/Tax");
14227 for v in &mut violations[snap..] {
14228 v.path.insert_str(0, &pfx);
14229 }
14230 }
14231 }
14232 for (idx, elem) in self.rltd_rmt_inf.iter().enumerate() {
14233 let snap = violations.len();
14234 elem.validate_constraints("", violations);
14235 if violations.len() > snap {
14236 let pfx = format!("{path}/RltdRmtInf[{idx}]");
14237 for v in &mut violations[snap..] {
14238 v.path.insert_str(0, &pfx);
14239 }
14240 }
14241 }
14242 if let Some(ref val) = self.rmt_inf {
14243 let snap = violations.len();
14244 val.validate_constraints("", violations);
14245 if violations.len() > snap {
14246 let pfx = format!("{path}/RmtInf");
14247 for v in &mut violations[snap..] {
14248 v.path.insert_str(0, &pfx);
14249 }
14250 }
14251 }
14252 for (idx, elem) in self.splmtry_data.iter().enumerate() {
14253 let snap = violations.len();
14254 elem.validate_constraints("", violations);
14255 if violations.len() > snap {
14256 let pfx = format!("{path}/SplmtryData[{idx}]");
14257 for v in &mut violations[snap..] {
14258 v.path.insert_str(0, &pfx);
14259 }
14260 }
14261 }
14262 }
14263}
14264impl crate::common::validate::Validatable for CreditorReferenceInformation3 {
14265 fn validate_constraints(
14266 &self,
14267 path: &str,
14268 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14269 ) {
14270 if let Some(ref val) = self.tp {
14271 let snap = violations.len();
14272 val.validate_constraints("", violations);
14273 if violations.len() > snap {
14274 let pfx = format!("{path}/Tp");
14275 for v in &mut violations[snap..] {
14276 v.path.insert_str(0, &pfx);
14277 }
14278 }
14279 }
14280 if let Some(ref val) = self.r#ref {
14281 let snap = violations.len();
14282 val.validate_constraints("", violations);
14283 if violations.len() > snap {
14284 let pfx = format!("{path}/Ref");
14285 for v in &mut violations[snap..] {
14286 v.path.insert_str(0, &pfx);
14287 }
14288 }
14289 }
14290 }
14291}
14292impl crate::common::validate::Validatable for CreditorReferenceType2Choice {
14293 fn validate_constraints(
14294 &self,
14295 path: &str,
14296 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14297 ) {
14298 match self {
14299 Self::Cd(inner) => {
14300 let snap = violations.len();
14301 inner.validate_constraints("", violations);
14302 if violations.len() > snap {
14303 let pfx = format!("{path}/Cd");
14304 for v in &mut violations[snap..] {
14305 v.path.insert_str(0, &pfx);
14306 }
14307 }
14308 }
14309 Self::Prtry(inner) => {
14310 let snap = violations.len();
14311 inner.validate_constraints("", violations);
14312 if violations.len() > snap {
14313 let pfx = format!("{path}/Prtry");
14314 for v in &mut violations[snap..] {
14315 v.path.insert_str(0, &pfx);
14316 }
14317 }
14318 }
14319 }
14320 }
14321}
14322impl crate::common::validate::Validatable for CreditorReferenceType3 {
14323 fn validate_constraints(
14324 &self,
14325 path: &str,
14326 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14327 ) {
14328 {
14329 let snap = violations.len();
14330 self.cd_or_prtry.inner.validate_constraints("", violations);
14331 if violations.len() > snap {
14332 let pfx = format!("{path}/CdOrPrtry");
14333 for v in &mut violations[snap..] {
14334 v.path.insert_str(0, &pfx);
14335 }
14336 }
14337 }
14338 if let Some(ref val) = self.issr {
14339 let snap = violations.len();
14340 val.validate_constraints("", violations);
14341 if violations.len() > snap {
14342 let pfx = format!("{path}/Issr");
14343 for v in &mut violations[snap..] {
14344 v.path.insert_str(0, &pfx);
14345 }
14346 }
14347 }
14348 }
14349}
14350impl crate::common::validate::Validatable for CryptographicKey1Choice {
14351 fn validate_constraints(
14352 &self,
14353 path: &str,
14354 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14355 ) {
14356 match self {
14357 Self::ILPV4(inner) => {
14358 let snap = violations.len();
14359 inner.validate_constraints("", violations);
14360 if violations.len() > snap {
14361 let pfx = format!("{path}/ILPV4");
14362 for v in &mut violations[snap..] {
14363 v.path.insert_str(0, &pfx);
14364 }
14365 }
14366 }
14367 Self::Sgntr(inner) => {
14368 let snap = violations.len();
14369 inner.validate_constraints("", violations);
14370 if violations.len() > snap {
14371 let pfx = format!("{path}/Sgntr");
14372 for v in &mut violations[snap..] {
14373 v.path.insert_str(0, &pfx);
14374 }
14375 }
14376 }
14377 }
14378 }
14379}
14380impl crate::common::validate::Validatable for CurrencyExchange26 {
14381 fn validate_constraints(
14382 &self,
14383 path: &str,
14384 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14385 ) {
14386 if let Some(ref val) = self.unit_ccy {
14387 let snap = violations.len();
14388 val.validate_constraints("", violations);
14389 if violations.len() > snap {
14390 let pfx = format!("{path}/UnitCcy");
14391 for v in &mut violations[snap..] {
14392 v.path.insert_str(0, &pfx);
14393 }
14394 }
14395 }
14396 if let Some(ref val) = self.qtd_ccy {
14397 let snap = violations.len();
14398 val.validate_constraints("", violations);
14399 if violations.len() > snap {
14400 let pfx = format!("{path}/QtdCcy");
14401 for v in &mut violations[snap..] {
14402 v.path.insert_str(0, &pfx);
14403 }
14404 }
14405 }
14406 {
14407 let snap = violations.len();
14408 self.pre_agrd_xchg_rate.validate_constraints("", violations);
14409 if violations.len() > snap {
14410 let pfx = format!("{path}/PreAgrdXchgRate");
14411 for v in &mut violations[snap..] {
14412 v.path.insert_str(0, &pfx);
14413 }
14414 }
14415 }
14416 if let Some(ref val) = self.qtn_dt_tm {
14417 let snap = violations.len();
14418 val.validate_constraints("", violations);
14419 if violations.len() > snap {
14420 let pfx = format!("{path}/QtnDtTm");
14421 for v in &mut violations[snap..] {
14422 v.path.insert_str(0, &pfx);
14423 }
14424 }
14425 }
14426 if let Some(ref val) = self.qt_id {
14427 let snap = violations.len();
14428 val.validate_constraints("", violations);
14429 if violations.len() > snap {
14430 let pfx = format!("{path}/QtId");
14431 for v in &mut violations[snap..] {
14432 v.path.insert_str(0, &pfx);
14433 }
14434 }
14435 }
14436 if let Some(ref val) = self.fx_agt {
14437 let snap = violations.len();
14438 val.validate_constraints("", violations);
14439 if violations.len() > snap {
14440 let pfx = format!("{path}/FXAgt");
14441 for v in &mut violations[snap..] {
14442 v.path.insert_str(0, &pfx);
14443 }
14444 }
14445 }
14446 }
14447}
14448impl crate::common::validate::Validatable for DateAndPlaceOfBirth1 {
14449 fn validate_constraints(
14450 &self,
14451 path: &str,
14452 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14453 ) {
14454 {
14455 let snap = violations.len();
14456 self.birth_dt.validate_constraints("", violations);
14457 if violations.len() > snap {
14458 let pfx = format!("{path}/BirthDt");
14459 for v in &mut violations[snap..] {
14460 v.path.insert_str(0, &pfx);
14461 }
14462 }
14463 }
14464 if let Some(ref val) = self.prvc_of_birth {
14465 let snap = violations.len();
14466 val.validate_constraints("", violations);
14467 if violations.len() > snap {
14468 let pfx = format!("{path}/PrvcOfBirth");
14469 for v in &mut violations[snap..] {
14470 v.path.insert_str(0, &pfx);
14471 }
14472 }
14473 }
14474 {
14475 let snap = violations.len();
14476 self.city_of_birth.validate_constraints("", violations);
14477 if violations.len() > snap {
14478 let pfx = format!("{path}/CityOfBirth");
14479 for v in &mut violations[snap..] {
14480 v.path.insert_str(0, &pfx);
14481 }
14482 }
14483 }
14484 {
14485 let snap = violations.len();
14486 self.ctry_of_birth.validate_constraints("", violations);
14487 if violations.len() > snap {
14488 let pfx = format!("{path}/CtryOfBirth");
14489 for v in &mut violations[snap..] {
14490 v.path.insert_str(0, &pfx);
14491 }
14492 }
14493 }
14494 }
14495}
14496impl crate::common::validate::Validatable for DateAndType1 {
14497 fn validate_constraints(
14498 &self,
14499 path: &str,
14500 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14501 ) {
14502 {
14503 let snap = violations.len();
14504 self.tp.inner.validate_constraints("", violations);
14505 if violations.len() > snap {
14506 let pfx = format!("{path}/Tp");
14507 for v in &mut violations[snap..] {
14508 v.path.insert_str(0, &pfx);
14509 }
14510 }
14511 }
14512 {
14513 let snap = violations.len();
14514 self.dt.validate_constraints("", violations);
14515 if violations.len() > snap {
14516 let pfx = format!("{path}/Dt");
14517 for v in &mut violations[snap..] {
14518 v.path.insert_str(0, &pfx);
14519 }
14520 }
14521 }
14522 }
14523}
14524impl crate::common::validate::Validatable for DatePeriod2 {
14525 fn validate_constraints(
14526 &self,
14527 path: &str,
14528 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14529 ) {
14530 {
14531 let snap = violations.len();
14532 self.fr_dt.validate_constraints("", violations);
14533 if violations.len() > snap {
14534 let pfx = format!("{path}/FrDt");
14535 for v in &mut violations[snap..] {
14536 v.path.insert_str(0, &pfx);
14537 }
14538 }
14539 }
14540 {
14541 let snap = violations.len();
14542 self.to_dt.validate_constraints("", violations);
14543 if violations.len() > snap {
14544 let pfx = format!("{path}/ToDt");
14545 for v in &mut violations[snap..] {
14546 v.path.insert_str(0, &pfx);
14547 }
14548 }
14549 }
14550 }
14551}
14552impl crate::common::validate::Validatable for DateType2Choice {
14553 fn validate_constraints(
14554 &self,
14555 path: &str,
14556 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14557 ) {
14558 match self {
14559 Self::Cd(inner) => {
14560 let snap = violations.len();
14561 inner.validate_constraints("", violations);
14562 if violations.len() > snap {
14563 let pfx = format!("{path}/Cd");
14564 for v in &mut violations[snap..] {
14565 v.path.insert_str(0, &pfx);
14566 }
14567 }
14568 }
14569 Self::Prtry(inner) => {
14570 let snap = violations.len();
14571 inner.validate_constraints("", violations);
14572 if violations.len() > snap {
14573 let pfx = format!("{path}/Prtry");
14574 for v in &mut violations[snap..] {
14575 v.path.insert_str(0, &pfx);
14576 }
14577 }
14578 }
14579 }
14580 }
14581}
14582impl crate::common::validate::Validatable for Document {
14583 fn validate_constraints(
14584 &self,
14585 path: &str,
14586 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14587 ) {
14588 {
14589 let snap = violations.len();
14590 self.fi_to_fi_cstmr_cdt_trf
14591 .validate_constraints("", violations);
14592 if violations.len() > snap {
14593 let pfx = format!("{path}/FIToFICstmrCdtTrf");
14594 for v in &mut violations[snap..] {
14595 v.path.insert_str(0, &pfx);
14596 }
14597 }
14598 }
14599 }
14600}
14601impl crate::common::validate::Validatable for DocumentAdjustment1 {
14602 fn validate_constraints(
14603 &self,
14604 path: &str,
14605 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14606 ) {
14607 {
14608 let snap = violations.len();
14609 self.amt.validate_constraints("", violations);
14610 if violations.len() > snap {
14611 let pfx = format!("{path}/Amt");
14612 for v in &mut violations[snap..] {
14613 v.path.insert_str(0, &pfx);
14614 }
14615 }
14616 }
14617 if let Some(ref val) = self.cdt_dbt_ind {
14618 let snap = violations.len();
14619 val.validate_constraints("", violations);
14620 if violations.len() > snap {
14621 let pfx = format!("{path}/CdtDbtInd");
14622 for v in &mut violations[snap..] {
14623 v.path.insert_str(0, &pfx);
14624 }
14625 }
14626 }
14627 if let Some(ref val) = self.rsn {
14628 let snap = violations.len();
14629 val.validate_constraints("", violations);
14630 if violations.len() > snap {
14631 let pfx = format!("{path}/Rsn");
14632 for v in &mut violations[snap..] {
14633 v.path.insert_str(0, &pfx);
14634 }
14635 }
14636 }
14637 if let Some(ref val) = self.addtl_inf {
14638 let snap = violations.len();
14639 val.validate_constraints("", violations);
14640 if violations.len() > snap {
14641 let pfx = format!("{path}/AddtlInf");
14642 for v in &mut violations[snap..] {
14643 v.path.insert_str(0, &pfx);
14644 }
14645 }
14646 }
14647 }
14648}
14649impl crate::common::validate::Validatable for DocumentAmount1 {
14650 fn validate_constraints(
14651 &self,
14652 path: &str,
14653 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14654 ) {
14655 {
14656 let snap = violations.len();
14657 self.tp.inner.validate_constraints("", violations);
14658 if violations.len() > snap {
14659 let pfx = format!("{path}/Tp");
14660 for v in &mut violations[snap..] {
14661 v.path.insert_str(0, &pfx);
14662 }
14663 }
14664 }
14665 {
14666 let snap = violations.len();
14667 self.amt.validate_constraints("", violations);
14668 if violations.len() > snap {
14669 let pfx = format!("{path}/Amt");
14670 for v in &mut violations[snap..] {
14671 v.path.insert_str(0, &pfx);
14672 }
14673 }
14674 }
14675 }
14676}
14677impl crate::common::validate::Validatable for DocumentAmountType1Choice {
14678 fn validate_constraints(
14679 &self,
14680 path: &str,
14681 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14682 ) {
14683 match self {
14684 Self::Cd(inner) => {
14685 let snap = violations.len();
14686 inner.validate_constraints("", violations);
14687 if violations.len() > snap {
14688 let pfx = format!("{path}/Cd");
14689 for v in &mut violations[snap..] {
14690 v.path.insert_str(0, &pfx);
14691 }
14692 }
14693 }
14694 Self::Prtry(inner) => {
14695 let snap = violations.len();
14696 inner.validate_constraints("", violations);
14697 if violations.len() > snap {
14698 let pfx = format!("{path}/Prtry");
14699 for v in &mut violations[snap..] {
14700 v.path.insert_str(0, &pfx);
14701 }
14702 }
14703 }
14704 }
14705 }
14706}
14707impl crate::common::validate::Validatable for DocumentLineIdentification1 {
14708 fn validate_constraints(
14709 &self,
14710 path: &str,
14711 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14712 ) {
14713 if let Some(ref val) = self.tp {
14714 let snap = violations.len();
14715 val.validate_constraints("", violations);
14716 if violations.len() > snap {
14717 let pfx = format!("{path}/Tp");
14718 for v in &mut violations[snap..] {
14719 v.path.insert_str(0, &pfx);
14720 }
14721 }
14722 }
14723 if let Some(ref val) = self.nb {
14724 let snap = violations.len();
14725 val.validate_constraints("", violations);
14726 if violations.len() > snap {
14727 let pfx = format!("{path}/Nb");
14728 for v in &mut violations[snap..] {
14729 v.path.insert_str(0, &pfx);
14730 }
14731 }
14732 }
14733 if let Some(ref val) = self.rltd_dt {
14734 let snap = violations.len();
14735 val.validate_constraints("", violations);
14736 if violations.len() > snap {
14737 let pfx = format!("{path}/RltdDt");
14738 for v in &mut violations[snap..] {
14739 v.path.insert_str(0, &pfx);
14740 }
14741 }
14742 }
14743 }
14744}
14745impl crate::common::validate::Validatable for DocumentLineInformation2 {
14746 fn validate_constraints(
14747 &self,
14748 path: &str,
14749 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14750 ) {
14751 for (idx, elem) in self.id.iter().enumerate() {
14752 let snap = violations.len();
14753 elem.validate_constraints("", violations);
14754 if violations.len() > snap {
14755 let pfx = format!("{path}/Id[{idx}]");
14756 for v in &mut violations[snap..] {
14757 v.path.insert_str(0, &pfx);
14758 }
14759 }
14760 }
14761 if let Some(ref val) = self.desc {
14762 let snap = violations.len();
14763 val.validate_constraints("", violations);
14764 if violations.len() > snap {
14765 let pfx = format!("{path}/Desc");
14766 for v in &mut violations[snap..] {
14767 v.path.insert_str(0, &pfx);
14768 }
14769 }
14770 }
14771 if let Some(ref val) = self.amt {
14772 let snap = violations.len();
14773 val.validate_constraints("", violations);
14774 if violations.len() > snap {
14775 let pfx = format!("{path}/Amt");
14776 for v in &mut violations[snap..] {
14777 v.path.insert_str(0, &pfx);
14778 }
14779 }
14780 }
14781 }
14782}
14783impl crate::common::validate::Validatable for DocumentLineType1 {
14784 fn validate_constraints(
14785 &self,
14786 path: &str,
14787 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14788 ) {
14789 {
14790 let snap = violations.len();
14791 self.cd_or_prtry.inner.validate_constraints("", violations);
14792 if violations.len() > snap {
14793 let pfx = format!("{path}/CdOrPrtry");
14794 for v in &mut violations[snap..] {
14795 v.path.insert_str(0, &pfx);
14796 }
14797 }
14798 }
14799 if let Some(ref val) = self.issr {
14800 let snap = violations.len();
14801 val.validate_constraints("", violations);
14802 if violations.len() > snap {
14803 let pfx = format!("{path}/Issr");
14804 for v in &mut violations[snap..] {
14805 v.path.insert_str(0, &pfx);
14806 }
14807 }
14808 }
14809 }
14810}
14811impl crate::common::validate::Validatable for DocumentLineType1Choice {
14812 fn validate_constraints(
14813 &self,
14814 path: &str,
14815 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14816 ) {
14817 match self {
14818 Self::Cd(inner) => {
14819 let snap = violations.len();
14820 inner.validate_constraints("", violations);
14821 if violations.len() > snap {
14822 let pfx = format!("{path}/Cd");
14823 for v in &mut violations[snap..] {
14824 v.path.insert_str(0, &pfx);
14825 }
14826 }
14827 }
14828 Self::Prtry(inner) => {
14829 let snap = violations.len();
14830 inner.validate_constraints("", violations);
14831 if violations.len() > snap {
14832 let pfx = format!("{path}/Prtry");
14833 for v in &mut violations[snap..] {
14834 v.path.insert_str(0, &pfx);
14835 }
14836 }
14837 }
14838 }
14839 }
14840}
14841impl crate::common::validate::Validatable for DocumentType1 {
14842 fn validate_constraints(
14843 &self,
14844 path: &str,
14845 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14846 ) {
14847 {
14848 let snap = violations.len();
14849 self.cd_or_prtry.inner.validate_constraints("", violations);
14850 if violations.len() > snap {
14851 let pfx = format!("{path}/CdOrPrtry");
14852 for v in &mut violations[snap..] {
14853 v.path.insert_str(0, &pfx);
14854 }
14855 }
14856 }
14857 if let Some(ref val) = self.issr {
14858 let snap = violations.len();
14859 val.validate_constraints("", violations);
14860 if violations.len() > snap {
14861 let pfx = format!("{path}/Issr");
14862 for v in &mut violations[snap..] {
14863 v.path.insert_str(0, &pfx);
14864 }
14865 }
14866 }
14867 }
14868}
14869impl crate::common::validate::Validatable for DocumentType2Choice {
14870 fn validate_constraints(
14871 &self,
14872 path: &str,
14873 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14874 ) {
14875 match self {
14876 Self::Cd(inner) => {
14877 let snap = violations.len();
14878 inner.validate_constraints("", violations);
14879 if violations.len() > snap {
14880 let pfx = format!("{path}/Cd");
14881 for v in &mut violations[snap..] {
14882 v.path.insert_str(0, &pfx);
14883 }
14884 }
14885 }
14886 Self::Prtry(inner) => {
14887 let snap = violations.len();
14888 inner.validate_constraints("", violations);
14889 if violations.len() > snap {
14890 let pfx = format!("{path}/Prtry");
14891 for v in &mut violations[snap..] {
14892 v.path.insert_str(0, &pfx);
14893 }
14894 }
14895 }
14896 }
14897 }
14898}
14899impl crate::common::validate::Validatable for FIToFICustomerCreditTransferV13 {
14900 fn validate_constraints(
14901 &self,
14902 path: &str,
14903 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14904 ) {
14905 {
14906 let snap = violations.len();
14907 self.grp_hdr.validate_constraints("", violations);
14908 if violations.len() > snap {
14909 let pfx = format!("{path}/GrpHdr");
14910 for v in &mut violations[snap..] {
14911 v.path.insert_str(0, &pfx);
14912 }
14913 }
14914 }
14915 for (idx, elem) in self.cdt_trf_tx_inf.iter().enumerate() {
14916 let snap = violations.len();
14917 elem.validate_constraints("", violations);
14918 if violations.len() > snap {
14919 let pfx = format!("{path}/CdtTrfTxInf[{idx}]");
14920 for v in &mut violations[snap..] {
14921 v.path.insert_str(0, &pfx);
14922 }
14923 }
14924 }
14925 for (idx, elem) in self.splmtry_data.iter().enumerate() {
14926 let snap = violations.len();
14927 elem.validate_constraints("", violations);
14928 if violations.len() > snap {
14929 let pfx = format!("{path}/SplmtryData[{idx}]");
14930 for v in &mut violations[snap..] {
14931 v.path.insert_str(0, &pfx);
14932 }
14933 }
14934 }
14935 }
14936}
14937impl crate::common::validate::Validatable for FinancialIdentificationSchemeName1Choice {
14938 fn validate_constraints(
14939 &self,
14940 path: &str,
14941 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14942 ) {
14943 match self {
14944 Self::Cd(inner) => {
14945 let snap = violations.len();
14946 inner.validate_constraints("", violations);
14947 if violations.len() > snap {
14948 let pfx = format!("{path}/Cd");
14949 for v in &mut violations[snap..] {
14950 v.path.insert_str(0, &pfx);
14951 }
14952 }
14953 }
14954 Self::Prtry(inner) => {
14955 let snap = violations.len();
14956 inner.validate_constraints("", violations);
14957 if violations.len() > snap {
14958 let pfx = format!("{path}/Prtry");
14959 for v in &mut violations[snap..] {
14960 v.path.insert_str(0, &pfx);
14961 }
14962 }
14963 }
14964 }
14965 }
14966}
14967impl crate::common::validate::Validatable for FinancialInstitutionIdentification23 {
14968 fn validate_constraints(
14969 &self,
14970 path: &str,
14971 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14972 ) {
14973 if let Some(ref val) = self.bicfi {
14974 let snap = violations.len();
14975 val.validate_constraints("", violations);
14976 if violations.len() > snap {
14977 let pfx = format!("{path}/BICFI");
14978 for v in &mut violations[snap..] {
14979 v.path.insert_str(0, &pfx);
14980 }
14981 }
14982 }
14983 if let Some(ref val) = self.clr_sys_mmb_id {
14984 let snap = violations.len();
14985 val.validate_constraints("", violations);
14986 if violations.len() > snap {
14987 let pfx = format!("{path}/ClrSysMmbId");
14988 for v in &mut violations[snap..] {
14989 v.path.insert_str(0, &pfx);
14990 }
14991 }
14992 }
14993 if let Some(ref val) = self.lei {
14994 let snap = violations.len();
14995 val.validate_constraints("", violations);
14996 if violations.len() > snap {
14997 let pfx = format!("{path}/LEI");
14998 for v in &mut violations[snap..] {
14999 v.path.insert_str(0, &pfx);
15000 }
15001 }
15002 }
15003 if let Some(ref val) = self.nm {
15004 let snap = violations.len();
15005 val.validate_constraints("", violations);
15006 if violations.len() > snap {
15007 let pfx = format!("{path}/Nm");
15008 for v in &mut violations[snap..] {
15009 v.path.insert_str(0, &pfx);
15010 }
15011 }
15012 }
15013 if let Some(ref val) = self.pstl_adr {
15014 let snap = violations.len();
15015 val.validate_constraints("", violations);
15016 if violations.len() > snap {
15017 let pfx = format!("{path}/PstlAdr");
15018 for v in &mut violations[snap..] {
15019 v.path.insert_str(0, &pfx);
15020 }
15021 }
15022 }
15023 if let Some(ref val) = self.othr {
15024 let snap = violations.len();
15025 val.validate_constraints("", violations);
15026 if violations.len() > snap {
15027 let pfx = format!("{path}/Othr");
15028 for v in &mut violations[snap..] {
15029 v.path.insert_str(0, &pfx);
15030 }
15031 }
15032 }
15033 }
15034}
15035impl crate::common::validate::Validatable for Frequency36Choice {
15036 fn validate_constraints(
15037 &self,
15038 path: &str,
15039 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15040 ) {
15041 match self {
15042 Self::Tp(inner) => {
15043 let snap = violations.len();
15044 inner.validate_constraints("", violations);
15045 if violations.len() > snap {
15046 let pfx = format!("{path}/Tp");
15047 for v in &mut violations[snap..] {
15048 v.path.insert_str(0, &pfx);
15049 }
15050 }
15051 }
15052 Self::Prd(inner) => {
15053 let snap = violations.len();
15054 inner.validate_constraints("", violations);
15055 if violations.len() > snap {
15056 let pfx = format!("{path}/Prd");
15057 for v in &mut violations[snap..] {
15058 v.path.insert_str(0, &pfx);
15059 }
15060 }
15061 }
15062 Self::PtInTm(inner) => {
15063 let snap = violations.len();
15064 inner.validate_constraints("", violations);
15065 if violations.len() > snap {
15066 let pfx = format!("{path}/PtInTm");
15067 for v in &mut violations[snap..] {
15068 v.path.insert_str(0, &pfx);
15069 }
15070 }
15071 }
15072 }
15073 }
15074}
15075impl crate::common::validate::Validatable for FrequencyAndMoment1 {
15076 fn validate_constraints(
15077 &self,
15078 path: &str,
15079 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15080 ) {
15081 {
15082 let snap = violations.len();
15083 self.tp.validate_constraints("", violations);
15084 if violations.len() > snap {
15085 let pfx = format!("{path}/Tp");
15086 for v in &mut violations[snap..] {
15087 v.path.insert_str(0, &pfx);
15088 }
15089 }
15090 }
15091 {
15092 let snap = violations.len();
15093 self.pt_in_tm.validate_constraints("", violations);
15094 if violations.len() > snap {
15095 let pfx = format!("{path}/PtInTm");
15096 for v in &mut violations[snap..] {
15097 v.path.insert_str(0, &pfx);
15098 }
15099 }
15100 }
15101 }
15102}
15103impl crate::common::validate::Validatable for FrequencyPeriod1 {
15104 fn validate_constraints(
15105 &self,
15106 path: &str,
15107 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15108 ) {
15109 {
15110 let snap = violations.len();
15111 self.tp.validate_constraints("", violations);
15112 if violations.len() > snap {
15113 let pfx = format!("{path}/Tp");
15114 for v in &mut violations[snap..] {
15115 v.path.insert_str(0, &pfx);
15116 }
15117 }
15118 }
15119 {
15120 let snap = violations.len();
15121 self.cnt_per_prd.validate_constraints("", violations);
15122 if violations.len() > snap {
15123 let pfx = format!("{path}/CntPerPrd");
15124 for v in &mut violations[snap..] {
15125 v.path.insert_str(0, &pfx);
15126 }
15127 }
15128 }
15129 }
15130}
15131impl crate::common::validate::Validatable for Garnishment4 {
15132 fn validate_constraints(
15133 &self,
15134 path: &str,
15135 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15136 ) {
15137 {
15138 let snap = violations.len();
15139 self.tp.validate_constraints("", violations);
15140 if violations.len() > snap {
15141 let pfx = format!("{path}/Tp");
15142 for v in &mut violations[snap..] {
15143 v.path.insert_str(0, &pfx);
15144 }
15145 }
15146 }
15147 if let Some(ref val) = self.grnshee {
15148 let snap = violations.len();
15149 val.validate_constraints("", violations);
15150 if violations.len() > snap {
15151 let pfx = format!("{path}/Grnshee");
15152 for v in &mut violations[snap..] {
15153 v.path.insert_str(0, &pfx);
15154 }
15155 }
15156 }
15157 if let Some(ref val) = self.grnshmt_admstr {
15158 let snap = violations.len();
15159 val.validate_constraints("", violations);
15160 if violations.len() > snap {
15161 let pfx = format!("{path}/GrnshmtAdmstr");
15162 for v in &mut violations[snap..] {
15163 v.path.insert_str(0, &pfx);
15164 }
15165 }
15166 }
15167 if let Some(ref val) = self.ref_nb {
15168 let snap = violations.len();
15169 val.validate_constraints("", violations);
15170 if violations.len() > snap {
15171 let pfx = format!("{path}/RefNb");
15172 for v in &mut violations[snap..] {
15173 v.path.insert_str(0, &pfx);
15174 }
15175 }
15176 }
15177 if let Some(ref val) = self.dt {
15178 let snap = violations.len();
15179 val.validate_constraints("", violations);
15180 if violations.len() > snap {
15181 let pfx = format!("{path}/Dt");
15182 for v in &mut violations[snap..] {
15183 v.path.insert_str(0, &pfx);
15184 }
15185 }
15186 }
15187 if let Some(ref val) = self.rmtd_amt {
15188 let snap = violations.len();
15189 val.validate_constraints("", violations);
15190 if violations.len() > snap {
15191 let pfx = format!("{path}/RmtdAmt");
15192 for v in &mut violations[snap..] {
15193 v.path.insert_str(0, &pfx);
15194 }
15195 }
15196 }
15197 if let Some(ref val) = self.fmly_mdcl_insrnc_ind {
15198 let snap = violations.len();
15199 val.validate_constraints("", violations);
15200 if violations.len() > snap {
15201 let pfx = format!("{path}/FmlyMdclInsrncInd");
15202 for v in &mut violations[snap..] {
15203 v.path.insert_str(0, &pfx);
15204 }
15205 }
15206 }
15207 if let Some(ref val) = self.mplyee_termntn_ind {
15208 let snap = violations.len();
15209 val.validate_constraints("", violations);
15210 if violations.len() > snap {
15211 let pfx = format!("{path}/MplyeeTermntnInd");
15212 for v in &mut violations[snap..] {
15213 v.path.insert_str(0, &pfx);
15214 }
15215 }
15216 }
15217 }
15218}
15219impl crate::common::validate::Validatable for GarnishmentType1 {
15220 fn validate_constraints(
15221 &self,
15222 path: &str,
15223 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15224 ) {
15225 {
15226 let snap = violations.len();
15227 self.cd_or_prtry.inner.validate_constraints("", violations);
15228 if violations.len() > snap {
15229 let pfx = format!("{path}/CdOrPrtry");
15230 for v in &mut violations[snap..] {
15231 v.path.insert_str(0, &pfx);
15232 }
15233 }
15234 }
15235 if let Some(ref val) = self.issr {
15236 let snap = violations.len();
15237 val.validate_constraints("", violations);
15238 if violations.len() > snap {
15239 let pfx = format!("{path}/Issr");
15240 for v in &mut violations[snap..] {
15241 v.path.insert_str(0, &pfx);
15242 }
15243 }
15244 }
15245 }
15246}
15247impl crate::common::validate::Validatable for GarnishmentType1Choice {
15248 fn validate_constraints(
15249 &self,
15250 path: &str,
15251 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15252 ) {
15253 match self {
15254 Self::Cd(inner) => {
15255 let snap = violations.len();
15256 inner.validate_constraints("", violations);
15257 if violations.len() > snap {
15258 let pfx = format!("{path}/Cd");
15259 for v in &mut violations[snap..] {
15260 v.path.insert_str(0, &pfx);
15261 }
15262 }
15263 }
15264 Self::Prtry(inner) => {
15265 let snap = violations.len();
15266 inner.validate_constraints("", violations);
15267 if violations.len() > snap {
15268 let pfx = format!("{path}/Prtry");
15269 for v in &mut violations[snap..] {
15270 v.path.insert_str(0, &pfx);
15271 }
15272 }
15273 }
15274 }
15275 }
15276}
15277impl crate::common::validate::Validatable for GenericAccountIdentification1 {
15278 fn validate_constraints(
15279 &self,
15280 path: &str,
15281 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15282 ) {
15283 {
15284 let snap = violations.len();
15285 self.id.validate_constraints("", violations);
15286 if violations.len() > snap {
15287 let pfx = format!("{path}/Id");
15288 for v in &mut violations[snap..] {
15289 v.path.insert_str(0, &pfx);
15290 }
15291 }
15292 }
15293 if let Some(ref wrapper) = self.schme_nm {
15294 let snap = violations.len();
15295 wrapper.inner.validate_constraints("", violations);
15296 if violations.len() > snap {
15297 let pfx = format!("{path}/SchmeNm");
15298 for v in &mut violations[snap..] {
15299 v.path.insert_str(0, &pfx);
15300 }
15301 }
15302 }
15303 if let Some(ref val) = self.issr {
15304 let snap = violations.len();
15305 val.validate_constraints("", violations);
15306 if violations.len() > snap {
15307 let pfx = format!("{path}/Issr");
15308 for v in &mut violations[snap..] {
15309 v.path.insert_str(0, &pfx);
15310 }
15311 }
15312 }
15313 }
15314}
15315impl crate::common::validate::Validatable for GenericFinancialIdentification1 {
15316 fn validate_constraints(
15317 &self,
15318 path: &str,
15319 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15320 ) {
15321 {
15322 let snap = violations.len();
15323 self.id.validate_constraints("", violations);
15324 if violations.len() > snap {
15325 let pfx = format!("{path}/Id");
15326 for v in &mut violations[snap..] {
15327 v.path.insert_str(0, &pfx);
15328 }
15329 }
15330 }
15331 if let Some(ref wrapper) = self.schme_nm {
15332 let snap = violations.len();
15333 wrapper.inner.validate_constraints("", violations);
15334 if violations.len() > snap {
15335 let pfx = format!("{path}/SchmeNm");
15336 for v in &mut violations[snap..] {
15337 v.path.insert_str(0, &pfx);
15338 }
15339 }
15340 }
15341 if let Some(ref val) = self.issr {
15342 let snap = violations.len();
15343 val.validate_constraints("", violations);
15344 if violations.len() > snap {
15345 let pfx = format!("{path}/Issr");
15346 for v in &mut violations[snap..] {
15347 v.path.insert_str(0, &pfx);
15348 }
15349 }
15350 }
15351 }
15352}
15353impl crate::common::validate::Validatable for GenericIdentification3 {
15354 fn validate_constraints(
15355 &self,
15356 path: &str,
15357 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15358 ) {
15359 {
15360 let snap = violations.len();
15361 self.id.validate_constraints("", violations);
15362 if violations.len() > snap {
15363 let pfx = format!("{path}/Id");
15364 for v in &mut violations[snap..] {
15365 v.path.insert_str(0, &pfx);
15366 }
15367 }
15368 }
15369 if let Some(ref val) = self.issr {
15370 let snap = violations.len();
15371 val.validate_constraints("", violations);
15372 if violations.len() > snap {
15373 let pfx = format!("{path}/Issr");
15374 for v in &mut violations[snap..] {
15375 v.path.insert_str(0, &pfx);
15376 }
15377 }
15378 }
15379 }
15380}
15381impl crate::common::validate::Validatable for GenericIdentification30 {
15382 fn validate_constraints(
15383 &self,
15384 path: &str,
15385 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15386 ) {
15387 {
15388 let snap = violations.len();
15389 self.id.validate_constraints("", violations);
15390 if violations.len() > snap {
15391 let pfx = format!("{path}/Id");
15392 for v in &mut violations[snap..] {
15393 v.path.insert_str(0, &pfx);
15394 }
15395 }
15396 }
15397 {
15398 let snap = violations.len();
15399 self.issr.validate_constraints("", violations);
15400 if violations.len() > snap {
15401 let pfx = format!("{path}/Issr");
15402 for v in &mut violations[snap..] {
15403 v.path.insert_str(0, &pfx);
15404 }
15405 }
15406 }
15407 if let Some(ref val) = self.schme_nm {
15408 let snap = violations.len();
15409 val.validate_constraints("", violations);
15410 if violations.len() > snap {
15411 let pfx = format!("{path}/SchmeNm");
15412 for v in &mut violations[snap..] {
15413 v.path.insert_str(0, &pfx);
15414 }
15415 }
15416 }
15417 }
15418}
15419impl crate::common::validate::Validatable for GenericOrganisationIdentification3 {
15420 fn validate_constraints(
15421 &self,
15422 path: &str,
15423 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15424 ) {
15425 {
15426 let snap = violations.len();
15427 self.id.validate_constraints("", violations);
15428 if violations.len() > snap {
15429 let pfx = format!("{path}/Id");
15430 for v in &mut violations[snap..] {
15431 v.path.insert_str(0, &pfx);
15432 }
15433 }
15434 }
15435 if let Some(ref wrapper) = self.schme_nm {
15436 let snap = violations.len();
15437 wrapper.inner.validate_constraints("", violations);
15438 if violations.len() > snap {
15439 let pfx = format!("{path}/SchmeNm");
15440 for v in &mut violations[snap..] {
15441 v.path.insert_str(0, &pfx);
15442 }
15443 }
15444 }
15445 if let Some(ref val) = self.issr {
15446 let snap = violations.len();
15447 val.validate_constraints("", violations);
15448 if violations.len() > snap {
15449 let pfx = format!("{path}/Issr");
15450 for v in &mut violations[snap..] {
15451 v.path.insert_str(0, &pfx);
15452 }
15453 }
15454 }
15455 }
15456}
15457impl crate::common::validate::Validatable for GenericPersonIdentification2 {
15458 fn validate_constraints(
15459 &self,
15460 path: &str,
15461 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15462 ) {
15463 {
15464 let snap = violations.len();
15465 self.id.validate_constraints("", violations);
15466 if violations.len() > snap {
15467 let pfx = format!("{path}/Id");
15468 for v in &mut violations[snap..] {
15469 v.path.insert_str(0, &pfx);
15470 }
15471 }
15472 }
15473 if let Some(ref wrapper) = self.schme_nm {
15474 let snap = violations.len();
15475 wrapper.inner.validate_constraints("", violations);
15476 if violations.len() > snap {
15477 let pfx = format!("{path}/SchmeNm");
15478 for v in &mut violations[snap..] {
15479 v.path.insert_str(0, &pfx);
15480 }
15481 }
15482 }
15483 if let Some(ref val) = self.issr {
15484 let snap = violations.len();
15485 val.validate_constraints("", violations);
15486 if violations.len() > snap {
15487 let pfx = format!("{path}/Issr");
15488 for v in &mut violations[snap..] {
15489 v.path.insert_str(0, &pfx);
15490 }
15491 }
15492 }
15493 }
15494}
15495impl crate::common::validate::Validatable for GroupHeader131 {
15496 fn validate_constraints(
15497 &self,
15498 path: &str,
15499 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15500 ) {
15501 {
15502 let snap = violations.len();
15503 self.msg_id.validate_constraints("", violations);
15504 if violations.len() > snap {
15505 let pfx = format!("{path}/MsgId");
15506 for v in &mut violations[snap..] {
15507 v.path.insert_str(0, &pfx);
15508 }
15509 }
15510 }
15511 {
15512 let snap = violations.len();
15513 self.cre_dt_tm.validate_constraints("", violations);
15514 if violations.len() > snap {
15515 let pfx = format!("{path}/CreDtTm");
15516 for v in &mut violations[snap..] {
15517 v.path.insert_str(0, &pfx);
15518 }
15519 }
15520 }
15521 if let Some(ref val) = self.xpry_dt_tm {
15522 let snap = violations.len();
15523 val.validate_constraints("", violations);
15524 if violations.len() > snap {
15525 let pfx = format!("{path}/XpryDtTm");
15526 for v in &mut violations[snap..] {
15527 v.path.insert_str(0, &pfx);
15528 }
15529 }
15530 }
15531 if let Some(ref val) = self.btch_bookg {
15532 let snap = violations.len();
15533 val.validate_constraints("", violations);
15534 if violations.len() > snap {
15535 let pfx = format!("{path}/BtchBookg");
15536 for v in &mut violations[snap..] {
15537 v.path.insert_str(0, &pfx);
15538 }
15539 }
15540 }
15541 {
15542 let snap = violations.len();
15543 self.nb_of_txs.validate_constraints("", violations);
15544 if violations.len() > snap {
15545 let pfx = format!("{path}/NbOfTxs");
15546 for v in &mut violations[snap..] {
15547 v.path.insert_str(0, &pfx);
15548 }
15549 }
15550 }
15551 if let Some(ref val) = self.ctrl_sum {
15552 let snap = violations.len();
15553 val.validate_constraints("", violations);
15554 if violations.len() > snap {
15555 let pfx = format!("{path}/CtrlSum");
15556 for v in &mut violations[snap..] {
15557 v.path.insert_str(0, &pfx);
15558 }
15559 }
15560 }
15561 if let Some(ref val) = self.ttl_intr_bk_sttlm_amt {
15562 let snap = violations.len();
15563 val.validate_constraints("", violations);
15564 if violations.len() > snap {
15565 let pfx = format!("{path}/TtlIntrBkSttlmAmt");
15566 for v in &mut violations[snap..] {
15567 v.path.insert_str(0, &pfx);
15568 }
15569 }
15570 }
15571 if let Some(ref val) = self.intr_bk_sttlm_dt {
15572 let snap = violations.len();
15573 val.validate_constraints("", violations);
15574 if violations.len() > snap {
15575 let pfx = format!("{path}/IntrBkSttlmDt");
15576 for v in &mut violations[snap..] {
15577 v.path.insert_str(0, &pfx);
15578 }
15579 }
15580 }
15581 {
15582 let snap = violations.len();
15583 self.sttlm_inf.validate_constraints("", violations);
15584 if violations.len() > snap {
15585 let pfx = format!("{path}/SttlmInf");
15586 for v in &mut violations[snap..] {
15587 v.path.insert_str(0, &pfx);
15588 }
15589 }
15590 }
15591 if let Some(ref val) = self.pmt_tp_inf {
15592 let snap = violations.len();
15593 val.validate_constraints("", violations);
15594 if violations.len() > snap {
15595 let pfx = format!("{path}/PmtTpInf");
15596 for v in &mut violations[snap..] {
15597 v.path.insert_str(0, &pfx);
15598 }
15599 }
15600 }
15601 if let Some(ref val) = self.instg_agt {
15602 let snap = violations.len();
15603 val.validate_constraints("", violations);
15604 if violations.len() > snap {
15605 let pfx = format!("{path}/InstgAgt");
15606 for v in &mut violations[snap..] {
15607 v.path.insert_str(0, &pfx);
15608 }
15609 }
15610 }
15611 if let Some(ref val) = self.instd_agt {
15612 let snap = violations.len();
15613 val.validate_constraints("", violations);
15614 if violations.len() > snap {
15615 let pfx = format!("{path}/InstdAgt");
15616 for v in &mut violations[snap..] {
15617 v.path.insert_str(0, &pfx);
15618 }
15619 }
15620 }
15621 }
15622}
15623impl crate::common::validate::Validatable for InstructionForCreditorAgent3 {
15624 fn validate_constraints(
15625 &self,
15626 path: &str,
15627 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15628 ) {
15629 if let Some(ref val) = self.cd {
15630 let snap = violations.len();
15631 val.validate_constraints("", violations);
15632 if violations.len() > snap {
15633 let pfx = format!("{path}/Cd");
15634 for v in &mut violations[snap..] {
15635 v.path.insert_str(0, &pfx);
15636 }
15637 }
15638 }
15639 if let Some(ref val) = self.instr_inf {
15640 let snap = violations.len();
15641 val.validate_constraints("", violations);
15642 if violations.len() > snap {
15643 let pfx = format!("{path}/InstrInf");
15644 for v in &mut violations[snap..] {
15645 v.path.insert_str(0, &pfx);
15646 }
15647 }
15648 }
15649 }
15650}
15651impl crate::common::validate::Validatable for InstructionForNextAgent1 {
15652 fn validate_constraints(
15653 &self,
15654 path: &str,
15655 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15656 ) {
15657 if let Some(ref val) = self.cd {
15658 let snap = violations.len();
15659 val.validate_constraints("", violations);
15660 if violations.len() > snap {
15661 let pfx = format!("{path}/Cd");
15662 for v in &mut violations[snap..] {
15663 v.path.insert_str(0, &pfx);
15664 }
15665 }
15666 }
15667 if let Some(ref val) = self.instr_inf {
15668 let snap = violations.len();
15669 val.validate_constraints("", violations);
15670 if violations.len() > snap {
15671 let pfx = format!("{path}/InstrInf");
15672 for v in &mut violations[snap..] {
15673 v.path.insert_str(0, &pfx);
15674 }
15675 }
15676 }
15677 }
15678}
15679impl crate::common::validate::Validatable for LocalInstrument2Choice {
15680 fn validate_constraints(
15681 &self,
15682 path: &str,
15683 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15684 ) {
15685 match self {
15686 Self::Cd(inner) => {
15687 let snap = violations.len();
15688 inner.validate_constraints("", violations);
15689 if violations.len() > snap {
15690 let pfx = format!("{path}/Cd");
15691 for v in &mut violations[snap..] {
15692 v.path.insert_str(0, &pfx);
15693 }
15694 }
15695 }
15696 Self::Prtry(inner) => {
15697 let snap = violations.len();
15698 inner.validate_constraints("", violations);
15699 if violations.len() > snap {
15700 let pfx = format!("{path}/Prtry");
15701 for v in &mut violations[snap..] {
15702 v.path.insert_str(0, &pfx);
15703 }
15704 }
15705 }
15706 }
15707 }
15708}
15709impl crate::common::validate::Validatable for MandateClassification1Choice {
15710 fn validate_constraints(
15711 &self,
15712 path: &str,
15713 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15714 ) {
15715 match self {
15716 Self::Cd(inner) => {
15717 let snap = violations.len();
15718 inner.validate_constraints("", violations);
15719 if violations.len() > snap {
15720 let pfx = format!("{path}/Cd");
15721 for v in &mut violations[snap..] {
15722 v.path.insert_str(0, &pfx);
15723 }
15724 }
15725 }
15726 Self::Prtry(inner) => {
15727 let snap = violations.len();
15728 inner.validate_constraints("", violations);
15729 if violations.len() > snap {
15730 let pfx = format!("{path}/Prtry");
15731 for v in &mut violations[snap..] {
15732 v.path.insert_str(0, &pfx);
15733 }
15734 }
15735 }
15736 }
15737 }
15738}
15739impl crate::common::validate::Validatable for MandateSetupReason1Choice {
15740 fn validate_constraints(
15741 &self,
15742 path: &str,
15743 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15744 ) {
15745 match self {
15746 Self::Cd(inner) => {
15747 let snap = violations.len();
15748 inner.validate_constraints("", violations);
15749 if violations.len() > snap {
15750 let pfx = format!("{path}/Cd");
15751 for v in &mut violations[snap..] {
15752 v.path.insert_str(0, &pfx);
15753 }
15754 }
15755 }
15756 Self::Prtry(inner) => {
15757 let snap = violations.len();
15758 inner.validate_constraints("", violations);
15759 if violations.len() > snap {
15760 let pfx = format!("{path}/Prtry");
15761 for v in &mut violations[snap..] {
15762 v.path.insert_str(0, &pfx);
15763 }
15764 }
15765 }
15766 }
15767 }
15768}
15769impl crate::common::validate::Validatable for MandateTypeInformation2 {
15770 fn validate_constraints(
15771 &self,
15772 path: &str,
15773 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15774 ) {
15775 if let Some(ref wrapper) = self.svc_lvl {
15776 let snap = violations.len();
15777 wrapper.inner.validate_constraints("", violations);
15778 if violations.len() > snap {
15779 let pfx = format!("{path}/SvcLvl");
15780 for v in &mut violations[snap..] {
15781 v.path.insert_str(0, &pfx);
15782 }
15783 }
15784 }
15785 if let Some(ref wrapper) = self.lcl_instrm {
15786 let snap = violations.len();
15787 wrapper.inner.validate_constraints("", violations);
15788 if violations.len() > snap {
15789 let pfx = format!("{path}/LclInstrm");
15790 for v in &mut violations[snap..] {
15791 v.path.insert_str(0, &pfx);
15792 }
15793 }
15794 }
15795 if let Some(ref wrapper) = self.ctgy_purp {
15796 let snap = violations.len();
15797 wrapper.inner.validate_constraints("", violations);
15798 if violations.len() > snap {
15799 let pfx = format!("{path}/CtgyPurp");
15800 for v in &mut violations[snap..] {
15801 v.path.insert_str(0, &pfx);
15802 }
15803 }
15804 }
15805 if let Some(ref wrapper) = self.clssfctn {
15806 let snap = violations.len();
15807 wrapper.inner.validate_constraints("", violations);
15808 if violations.len() > snap {
15809 let pfx = format!("{path}/Clssfctn");
15810 for v in &mut violations[snap..] {
15811 v.path.insert_str(0, &pfx);
15812 }
15813 }
15814 }
15815 }
15816}
15817impl crate::common::validate::Validatable for NameAndAddress18 {
15818 fn validate_constraints(
15819 &self,
15820 path: &str,
15821 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15822 ) {
15823 {
15824 let snap = violations.len();
15825 self.nm.validate_constraints("", violations);
15826 if violations.len() > snap {
15827 let pfx = format!("{path}/Nm");
15828 for v in &mut violations[snap..] {
15829 v.path.insert_str(0, &pfx);
15830 }
15831 }
15832 }
15833 {
15834 let snap = violations.len();
15835 self.adr.validate_constraints("", violations);
15836 if violations.len() > snap {
15837 let pfx = format!("{path}/Adr");
15838 for v in &mut violations[snap..] {
15839 v.path.insert_str(0, &pfx);
15840 }
15841 }
15842 }
15843 }
15844}
15845impl crate::common::validate::Validatable for OrganisationIdentification39 {
15846 fn validate_constraints(
15847 &self,
15848 path: &str,
15849 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15850 ) {
15851 if let Some(ref val) = self.any_bic {
15852 let snap = violations.len();
15853 val.validate_constraints("", violations);
15854 if violations.len() > snap {
15855 let pfx = format!("{path}/AnyBIC");
15856 for v in &mut violations[snap..] {
15857 v.path.insert_str(0, &pfx);
15858 }
15859 }
15860 }
15861 if let Some(ref val) = self.lei {
15862 let snap = violations.len();
15863 val.validate_constraints("", violations);
15864 if violations.len() > snap {
15865 let pfx = format!("{path}/LEI");
15866 for v in &mut violations[snap..] {
15867 v.path.insert_str(0, &pfx);
15868 }
15869 }
15870 }
15871 for (idx, elem) in self.othr.iter().enumerate() {
15872 let snap = violations.len();
15873 elem.validate_constraints("", violations);
15874 if violations.len() > snap {
15875 let pfx = format!("{path}/Othr[{idx}]");
15876 for v in &mut violations[snap..] {
15877 v.path.insert_str(0, &pfx);
15878 }
15879 }
15880 }
15881 }
15882}
15883impl crate::common::validate::Validatable for OrganisationIdentificationSchemeName1Choice {
15884 fn validate_constraints(
15885 &self,
15886 path: &str,
15887 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15888 ) {
15889 match self {
15890 Self::Cd(inner) => {
15891 let snap = violations.len();
15892 inner.validate_constraints("", violations);
15893 if violations.len() > snap {
15894 let pfx = format!("{path}/Cd");
15895 for v in &mut violations[snap..] {
15896 v.path.insert_str(0, &pfx);
15897 }
15898 }
15899 }
15900 Self::Prtry(inner) => {
15901 let snap = violations.len();
15902 inner.validate_constraints("", violations);
15903 if violations.len() > snap {
15904 let pfx = format!("{path}/Prtry");
15905 for v in &mut violations[snap..] {
15906 v.path.insert_str(0, &pfx);
15907 }
15908 }
15909 }
15910 }
15911 }
15912}
15913impl crate::common::validate::Validatable for OtherContact1 {
15914 fn validate_constraints(
15915 &self,
15916 path: &str,
15917 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15918 ) {
15919 {
15920 let snap = violations.len();
15921 self.chanl_tp.validate_constraints("", violations);
15922 if violations.len() > snap {
15923 let pfx = format!("{path}/ChanlTp");
15924 for v in &mut violations[snap..] {
15925 v.path.insert_str(0, &pfx);
15926 }
15927 }
15928 }
15929 if let Some(ref val) = self.id {
15930 let snap = violations.len();
15931 val.validate_constraints("", violations);
15932 if violations.len() > snap {
15933 let pfx = format!("{path}/Id");
15934 for v in &mut violations[snap..] {
15935 v.path.insert_str(0, &pfx);
15936 }
15937 }
15938 }
15939 }
15940}
15941impl crate::common::validate::Validatable for Party52Choice {
15942 fn validate_constraints(
15943 &self,
15944 path: &str,
15945 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15946 ) {
15947 match self {
15948 Self::OrgId(inner) => {
15949 let snap = violations.len();
15950 inner.validate_constraints("", violations);
15951 if violations.len() > snap {
15952 let pfx = format!("{path}/OrgId");
15953 for v in &mut violations[snap..] {
15954 v.path.insert_str(0, &pfx);
15955 }
15956 }
15957 }
15958 Self::PrvtId(inner) => {
15959 let snap = violations.len();
15960 inner.validate_constraints("", violations);
15961 if violations.len() > snap {
15962 let pfx = format!("{path}/PrvtId");
15963 for v in &mut violations[snap..] {
15964 v.path.insert_str(0, &pfx);
15965 }
15966 }
15967 }
15968 }
15969 }
15970}
15971impl crate::common::validate::Validatable for PartyIdentification272 {
15972 fn validate_constraints(
15973 &self,
15974 path: &str,
15975 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15976 ) {
15977 if let Some(ref val) = self.nm {
15978 let snap = violations.len();
15979 val.validate_constraints("", violations);
15980 if violations.len() > snap {
15981 let pfx = format!("{path}/Nm");
15982 for v in &mut violations[snap..] {
15983 v.path.insert_str(0, &pfx);
15984 }
15985 }
15986 }
15987 if let Some(ref val) = self.pstl_adr {
15988 let snap = violations.len();
15989 val.validate_constraints("", violations);
15990 if violations.len() > snap {
15991 let pfx = format!("{path}/PstlAdr");
15992 for v in &mut violations[snap..] {
15993 v.path.insert_str(0, &pfx);
15994 }
15995 }
15996 }
15997 if let Some(ref wrapper) = self.id {
15998 let snap = violations.len();
15999 wrapper.inner.validate_constraints("", violations);
16000 if violations.len() > snap {
16001 let pfx = format!("{path}/Id");
16002 for v in &mut violations[snap..] {
16003 v.path.insert_str(0, &pfx);
16004 }
16005 }
16006 }
16007 if let Some(ref val) = self.ctry_of_res {
16008 let snap = violations.len();
16009 val.validate_constraints("", violations);
16010 if violations.len() > snap {
16011 let pfx = format!("{path}/CtryOfRes");
16012 for v in &mut violations[snap..] {
16013 v.path.insert_str(0, &pfx);
16014 }
16015 }
16016 }
16017 if let Some(ref val) = self.ctct_dtls {
16018 let snap = violations.len();
16019 val.validate_constraints("", violations);
16020 if violations.len() > snap {
16021 let pfx = format!("{path}/CtctDtls");
16022 for v in &mut violations[snap..] {
16023 v.path.insert_str(0, &pfx);
16024 }
16025 }
16026 }
16027 }
16028}
16029impl crate::common::validate::Validatable for PaymentIdentification13 {
16030 fn validate_constraints(
16031 &self,
16032 path: &str,
16033 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16034 ) {
16035 if let Some(ref val) = self.instr_id {
16036 let snap = violations.len();
16037 val.validate_constraints("", violations);
16038 if violations.len() > snap {
16039 let pfx = format!("{path}/InstrId");
16040 for v in &mut violations[snap..] {
16041 v.path.insert_str(0, &pfx);
16042 }
16043 }
16044 }
16045 {
16046 let snap = violations.len();
16047 self.end_to_end_id.validate_constraints("", violations);
16048 if violations.len() > snap {
16049 let pfx = format!("{path}/EndToEndId");
16050 for v in &mut violations[snap..] {
16051 v.path.insert_str(0, &pfx);
16052 }
16053 }
16054 }
16055 if let Some(ref val) = self.tx_id {
16056 let snap = violations.len();
16057 val.validate_constraints("", violations);
16058 if violations.len() > snap {
16059 let pfx = format!("{path}/TxId");
16060 for v in &mut violations[snap..] {
16061 v.path.insert_str(0, &pfx);
16062 }
16063 }
16064 }
16065 if let Some(ref val) = self.uetr {
16066 let snap = violations.len();
16067 val.validate_constraints("", violations);
16068 if violations.len() > snap {
16069 let pfx = format!("{path}/UETR");
16070 for v in &mut violations[snap..] {
16071 v.path.insert_str(0, &pfx);
16072 }
16073 }
16074 }
16075 if let Some(ref val) = self.clr_sys_ref {
16076 let snap = violations.len();
16077 val.validate_constraints("", violations);
16078 if violations.len() > snap {
16079 let pfx = format!("{path}/ClrSysRef");
16080 for v in &mut violations[snap..] {
16081 v.path.insert_str(0, &pfx);
16082 }
16083 }
16084 }
16085 }
16086}
16087impl crate::common::validate::Validatable for PaymentTypeInformation28 {
16088 fn validate_constraints(
16089 &self,
16090 path: &str,
16091 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16092 ) {
16093 if let Some(ref val) = self.instr_prty {
16094 let snap = violations.len();
16095 val.validate_constraints("", violations);
16096 if violations.len() > snap {
16097 let pfx = format!("{path}/InstrPrty");
16098 for v in &mut violations[snap..] {
16099 v.path.insert_str(0, &pfx);
16100 }
16101 }
16102 }
16103 if let Some(ref val) = self.clr_chanl {
16104 let snap = violations.len();
16105 val.validate_constraints("", violations);
16106 if violations.len() > snap {
16107 let pfx = format!("{path}/ClrChanl");
16108 for v in &mut violations[snap..] {
16109 v.path.insert_str(0, &pfx);
16110 }
16111 }
16112 }
16113 for (idx, elem) in self.svc_lvl.iter().enumerate() {
16114 let snap = violations.len();
16115 elem.inner.validate_constraints("", violations);
16116 if violations.len() > snap {
16117 let pfx = format!("{path}/SvcLvl[{idx}]");
16118 for v in &mut violations[snap..] {
16119 v.path.insert_str(0, &pfx);
16120 }
16121 }
16122 }
16123 if let Some(ref wrapper) = self.lcl_instrm {
16124 let snap = violations.len();
16125 wrapper.inner.validate_constraints("", violations);
16126 if violations.len() > snap {
16127 let pfx = format!("{path}/LclInstrm");
16128 for v in &mut violations[snap..] {
16129 v.path.insert_str(0, &pfx);
16130 }
16131 }
16132 }
16133 if let Some(ref wrapper) = self.ctgy_purp {
16134 let snap = violations.len();
16135 wrapper.inner.validate_constraints("", violations);
16136 if violations.len() > snap {
16137 let pfx = format!("{path}/CtgyPurp");
16138 for v in &mut violations[snap..] {
16139 v.path.insert_str(0, &pfx);
16140 }
16141 }
16142 }
16143 }
16144}
16145impl crate::common::validate::Validatable for PersonIdentification18 {
16146 fn validate_constraints(
16147 &self,
16148 path: &str,
16149 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16150 ) {
16151 if let Some(ref val) = self.dt_and_plc_of_birth {
16152 let snap = violations.len();
16153 val.validate_constraints("", violations);
16154 if violations.len() > snap {
16155 let pfx = format!("{path}/DtAndPlcOfBirth");
16156 for v in &mut violations[snap..] {
16157 v.path.insert_str(0, &pfx);
16158 }
16159 }
16160 }
16161 for (idx, elem) in self.othr.iter().enumerate() {
16162 let snap = violations.len();
16163 elem.validate_constraints("", violations);
16164 if violations.len() > snap {
16165 let pfx = format!("{path}/Othr[{idx}]");
16166 for v in &mut violations[snap..] {
16167 v.path.insert_str(0, &pfx);
16168 }
16169 }
16170 }
16171 }
16172}
16173impl crate::common::validate::Validatable for PersonIdentificationSchemeName1Choice {
16174 fn validate_constraints(
16175 &self,
16176 path: &str,
16177 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16178 ) {
16179 match self {
16180 Self::Cd(inner) => {
16181 let snap = violations.len();
16182 inner.validate_constraints("", violations);
16183 if violations.len() > snap {
16184 let pfx = format!("{path}/Cd");
16185 for v in &mut violations[snap..] {
16186 v.path.insert_str(0, &pfx);
16187 }
16188 }
16189 }
16190 Self::Prtry(inner) => {
16191 let snap = violations.len();
16192 inner.validate_constraints("", violations);
16193 if violations.len() > snap {
16194 let pfx = format!("{path}/Prtry");
16195 for v in &mut violations[snap..] {
16196 v.path.insert_str(0, &pfx);
16197 }
16198 }
16199 }
16200 }
16201 }
16202}
16203impl crate::common::validate::Validatable for PostalAddress27 {
16204 fn validate_constraints(
16205 &self,
16206 path: &str,
16207 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16208 ) {
16209 if let Some(ref wrapper) = self.adr_tp {
16210 let snap = violations.len();
16211 wrapper.inner.validate_constraints("", violations);
16212 if violations.len() > snap {
16213 let pfx = format!("{path}/AdrTp");
16214 for v in &mut violations[snap..] {
16215 v.path.insert_str(0, &pfx);
16216 }
16217 }
16218 }
16219 if let Some(ref val) = self.care_of {
16220 let snap = violations.len();
16221 val.validate_constraints("", violations);
16222 if violations.len() > snap {
16223 let pfx = format!("{path}/CareOf");
16224 for v in &mut violations[snap..] {
16225 v.path.insert_str(0, &pfx);
16226 }
16227 }
16228 }
16229 if let Some(ref val) = self.dept {
16230 let snap = violations.len();
16231 val.validate_constraints("", violations);
16232 if violations.len() > snap {
16233 let pfx = format!("{path}/Dept");
16234 for v in &mut violations[snap..] {
16235 v.path.insert_str(0, &pfx);
16236 }
16237 }
16238 }
16239 if let Some(ref val) = self.sub_dept {
16240 let snap = violations.len();
16241 val.validate_constraints("", violations);
16242 if violations.len() > snap {
16243 let pfx = format!("{path}/SubDept");
16244 for v in &mut violations[snap..] {
16245 v.path.insert_str(0, &pfx);
16246 }
16247 }
16248 }
16249 if let Some(ref val) = self.strt_nm {
16250 let snap = violations.len();
16251 val.validate_constraints("", violations);
16252 if violations.len() > snap {
16253 let pfx = format!("{path}/StrtNm");
16254 for v in &mut violations[snap..] {
16255 v.path.insert_str(0, &pfx);
16256 }
16257 }
16258 }
16259 if let Some(ref val) = self.bldg_nb {
16260 let snap = violations.len();
16261 val.validate_constraints("", violations);
16262 if violations.len() > snap {
16263 let pfx = format!("{path}/BldgNb");
16264 for v in &mut violations[snap..] {
16265 v.path.insert_str(0, &pfx);
16266 }
16267 }
16268 }
16269 if let Some(ref val) = self.bldg_nm {
16270 let snap = violations.len();
16271 val.validate_constraints("", violations);
16272 if violations.len() > snap {
16273 let pfx = format!("{path}/BldgNm");
16274 for v in &mut violations[snap..] {
16275 v.path.insert_str(0, &pfx);
16276 }
16277 }
16278 }
16279 if let Some(ref val) = self.flr {
16280 let snap = violations.len();
16281 val.validate_constraints("", violations);
16282 if violations.len() > snap {
16283 let pfx = format!("{path}/Flr");
16284 for v in &mut violations[snap..] {
16285 v.path.insert_str(0, &pfx);
16286 }
16287 }
16288 }
16289 if let Some(ref val) = self.unit_nb {
16290 let snap = violations.len();
16291 val.validate_constraints("", violations);
16292 if violations.len() > snap {
16293 let pfx = format!("{path}/UnitNb");
16294 for v in &mut violations[snap..] {
16295 v.path.insert_str(0, &pfx);
16296 }
16297 }
16298 }
16299 if let Some(ref val) = self.pst_bx {
16300 let snap = violations.len();
16301 val.validate_constraints("", violations);
16302 if violations.len() > snap {
16303 let pfx = format!("{path}/PstBx");
16304 for v in &mut violations[snap..] {
16305 v.path.insert_str(0, &pfx);
16306 }
16307 }
16308 }
16309 if let Some(ref val) = self.room {
16310 let snap = violations.len();
16311 val.validate_constraints("", violations);
16312 if violations.len() > snap {
16313 let pfx = format!("{path}/Room");
16314 for v in &mut violations[snap..] {
16315 v.path.insert_str(0, &pfx);
16316 }
16317 }
16318 }
16319 if let Some(ref val) = self.pst_cd {
16320 let snap = violations.len();
16321 val.validate_constraints("", violations);
16322 if violations.len() > snap {
16323 let pfx = format!("{path}/PstCd");
16324 for v in &mut violations[snap..] {
16325 v.path.insert_str(0, &pfx);
16326 }
16327 }
16328 }
16329 if let Some(ref val) = self.twn_nm {
16330 let snap = violations.len();
16331 val.validate_constraints("", violations);
16332 if violations.len() > snap {
16333 let pfx = format!("{path}/TwnNm");
16334 for v in &mut violations[snap..] {
16335 v.path.insert_str(0, &pfx);
16336 }
16337 }
16338 }
16339 if let Some(ref val) = self.twn_lctn_nm {
16340 let snap = violations.len();
16341 val.validate_constraints("", violations);
16342 if violations.len() > snap {
16343 let pfx = format!("{path}/TwnLctnNm");
16344 for v in &mut violations[snap..] {
16345 v.path.insert_str(0, &pfx);
16346 }
16347 }
16348 }
16349 if let Some(ref val) = self.dstrct_nm {
16350 let snap = violations.len();
16351 val.validate_constraints("", violations);
16352 if violations.len() > snap {
16353 let pfx = format!("{path}/DstrctNm");
16354 for v in &mut violations[snap..] {
16355 v.path.insert_str(0, &pfx);
16356 }
16357 }
16358 }
16359 if let Some(ref val) = self.ctry_sub_dvsn {
16360 let snap = violations.len();
16361 val.validate_constraints("", violations);
16362 if violations.len() > snap {
16363 let pfx = format!("{path}/CtrySubDvsn");
16364 for v in &mut violations[snap..] {
16365 v.path.insert_str(0, &pfx);
16366 }
16367 }
16368 }
16369 if let Some(ref val) = self.ctry {
16370 let snap = violations.len();
16371 val.validate_constraints("", violations);
16372 if violations.len() > snap {
16373 let pfx = format!("{path}/Ctry");
16374 for v in &mut violations[snap..] {
16375 v.path.insert_str(0, &pfx);
16376 }
16377 }
16378 }
16379 for (idx, elem) in self.adr_line.iter().enumerate() {
16380 let snap = violations.len();
16381 elem.validate_constraints("", violations);
16382 if violations.len() > snap {
16383 let pfx = format!("{path}/AdrLine[{idx}]");
16384 for v in &mut violations[snap..] {
16385 v.path.insert_str(0, &pfx);
16386 }
16387 }
16388 }
16389 }
16390}
16391impl crate::common::validate::Validatable for ProxyAccountIdentification1 {
16392 fn validate_constraints(
16393 &self,
16394 path: &str,
16395 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16396 ) {
16397 if let Some(ref wrapper) = self.tp {
16398 let snap = violations.len();
16399 wrapper.inner.validate_constraints("", violations);
16400 if violations.len() > snap {
16401 let pfx = format!("{path}/Tp");
16402 for v in &mut violations[snap..] {
16403 v.path.insert_str(0, &pfx);
16404 }
16405 }
16406 }
16407 {
16408 let snap = violations.len();
16409 self.id.validate_constraints("", violations);
16410 if violations.len() > snap {
16411 let pfx = format!("{path}/Id");
16412 for v in &mut violations[snap..] {
16413 v.path.insert_str(0, &pfx);
16414 }
16415 }
16416 }
16417 }
16418}
16419impl crate::common::validate::Validatable for ProxyAccountType1Choice {
16420 fn validate_constraints(
16421 &self,
16422 path: &str,
16423 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16424 ) {
16425 match self {
16426 Self::Cd(inner) => {
16427 let snap = violations.len();
16428 inner.validate_constraints("", violations);
16429 if violations.len() > snap {
16430 let pfx = format!("{path}/Cd");
16431 for v in &mut violations[snap..] {
16432 v.path.insert_str(0, &pfx);
16433 }
16434 }
16435 }
16436 Self::Prtry(inner) => {
16437 let snap = violations.len();
16438 inner.validate_constraints("", violations);
16439 if violations.len() > snap {
16440 let pfx = format!("{path}/Prtry");
16441 for v in &mut violations[snap..] {
16442 v.path.insert_str(0, &pfx);
16443 }
16444 }
16445 }
16446 }
16447 }
16448}
16449impl crate::common::validate::Validatable for Purpose2Choice {
16450 fn validate_constraints(
16451 &self,
16452 path: &str,
16453 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16454 ) {
16455 match self {
16456 Self::Cd(inner) => {
16457 let snap = violations.len();
16458 inner.validate_constraints("", violations);
16459 if violations.len() > snap {
16460 let pfx = format!("{path}/Cd");
16461 for v in &mut violations[snap..] {
16462 v.path.insert_str(0, &pfx);
16463 }
16464 }
16465 }
16466 Self::Prtry(inner) => {
16467 let snap = violations.len();
16468 inner.validate_constraints("", violations);
16469 if violations.len() > snap {
16470 let pfx = format!("{path}/Prtry");
16471 for v in &mut violations[snap..] {
16472 v.path.insert_str(0, &pfx);
16473 }
16474 }
16475 }
16476 }
16477 }
16478}
16479impl crate::common::validate::Validatable for ReferredDocumentInformation8 {
16480 fn validate_constraints(
16481 &self,
16482 path: &str,
16483 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16484 ) {
16485 if let Some(ref val) = self.tp {
16486 let snap = violations.len();
16487 val.validate_constraints("", violations);
16488 if violations.len() > snap {
16489 let pfx = format!("{path}/Tp");
16490 for v in &mut violations[snap..] {
16491 v.path.insert_str(0, &pfx);
16492 }
16493 }
16494 }
16495 if let Some(ref val) = self.nb {
16496 let snap = violations.len();
16497 val.validate_constraints("", violations);
16498 if violations.len() > snap {
16499 let pfx = format!("{path}/Nb");
16500 for v in &mut violations[snap..] {
16501 v.path.insert_str(0, &pfx);
16502 }
16503 }
16504 }
16505 if let Some(ref val) = self.rltd_dt {
16506 let snap = violations.len();
16507 val.validate_constraints("", violations);
16508 if violations.len() > snap {
16509 let pfx = format!("{path}/RltdDt");
16510 for v in &mut violations[snap..] {
16511 v.path.insert_str(0, &pfx);
16512 }
16513 }
16514 }
16515 for (idx, elem) in self.line_dtls.iter().enumerate() {
16516 let snap = violations.len();
16517 elem.validate_constraints("", violations);
16518 if violations.len() > snap {
16519 let pfx = format!("{path}/LineDtls[{idx}]");
16520 for v in &mut violations[snap..] {
16521 v.path.insert_str(0, &pfx);
16522 }
16523 }
16524 }
16525 }
16526}
16527impl crate::common::validate::Validatable for RegulatoryAuthority2 {
16528 fn validate_constraints(
16529 &self,
16530 path: &str,
16531 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16532 ) {
16533 if let Some(ref val) = self.nm {
16534 let snap = violations.len();
16535 val.validate_constraints("", violations);
16536 if violations.len() > snap {
16537 let pfx = format!("{path}/Nm");
16538 for v in &mut violations[snap..] {
16539 v.path.insert_str(0, &pfx);
16540 }
16541 }
16542 }
16543 if let Some(ref val) = self.ctry {
16544 let snap = violations.len();
16545 val.validate_constraints("", violations);
16546 if violations.len() > snap {
16547 let pfx = format!("{path}/Ctry");
16548 for v in &mut violations[snap..] {
16549 v.path.insert_str(0, &pfx);
16550 }
16551 }
16552 }
16553 }
16554}
16555impl crate::common::validate::Validatable for RegulatoryReporting3 {
16556 fn validate_constraints(
16557 &self,
16558 path: &str,
16559 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16560 ) {
16561 if let Some(ref val) = self.dbt_cdt_rptg_ind {
16562 let snap = violations.len();
16563 val.validate_constraints("", violations);
16564 if violations.len() > snap {
16565 let pfx = format!("{path}/DbtCdtRptgInd");
16566 for v in &mut violations[snap..] {
16567 v.path.insert_str(0, &pfx);
16568 }
16569 }
16570 }
16571 if let Some(ref val) = self.authrty {
16572 let snap = violations.len();
16573 val.validate_constraints("", violations);
16574 if violations.len() > snap {
16575 let pfx = format!("{path}/Authrty");
16576 for v in &mut violations[snap..] {
16577 v.path.insert_str(0, &pfx);
16578 }
16579 }
16580 }
16581 for (idx, elem) in self.dtls.iter().enumerate() {
16582 let snap = violations.len();
16583 elem.validate_constraints("", violations);
16584 if violations.len() > snap {
16585 let pfx = format!("{path}/Dtls[{idx}]");
16586 for v in &mut violations[snap..] {
16587 v.path.insert_str(0, &pfx);
16588 }
16589 }
16590 }
16591 }
16592}
16593impl crate::common::validate::Validatable for RemittanceAmount4 {
16594 fn validate_constraints(
16595 &self,
16596 path: &str,
16597 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16598 ) {
16599 for (idx, elem) in self.rmt_amt_and_tp.iter().enumerate() {
16600 let snap = violations.len();
16601 elem.validate_constraints("", violations);
16602 if violations.len() > snap {
16603 let pfx = format!("{path}/RmtAmtAndTp[{idx}]");
16604 for v in &mut violations[snap..] {
16605 v.path.insert_str(0, &pfx);
16606 }
16607 }
16608 }
16609 for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
16610 let snap = violations.len();
16611 elem.validate_constraints("", violations);
16612 if violations.len() > snap {
16613 let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
16614 for v in &mut violations[snap..] {
16615 v.path.insert_str(0, &pfx);
16616 }
16617 }
16618 }
16619 }
16620}
16621impl crate::common::validate::Validatable for RemittanceInformation22 {
16622 fn validate_constraints(
16623 &self,
16624 path: &str,
16625 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16626 ) {
16627 for (idx, elem) in self.ustrd.iter().enumerate() {
16628 let snap = violations.len();
16629 elem.validate_constraints("", violations);
16630 if violations.len() > snap {
16631 let pfx = format!("{path}/Ustrd[{idx}]");
16632 for v in &mut violations[snap..] {
16633 v.path.insert_str(0, &pfx);
16634 }
16635 }
16636 }
16637 for (idx, elem) in self.strd.iter().enumerate() {
16638 let snap = violations.len();
16639 elem.validate_constraints("", violations);
16640 if violations.len() > snap {
16641 let pfx = format!("{path}/Strd[{idx}]");
16642 for v in &mut violations[snap..] {
16643 v.path.insert_str(0, &pfx);
16644 }
16645 }
16646 }
16647 }
16648}
16649impl crate::common::validate::Validatable for RemittanceLocation8 {
16650 fn validate_constraints(
16651 &self,
16652 path: &str,
16653 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16654 ) {
16655 if let Some(ref val) = self.rmt_id {
16656 let snap = violations.len();
16657 val.validate_constraints("", violations);
16658 if violations.len() > snap {
16659 let pfx = format!("{path}/RmtId");
16660 for v in &mut violations[snap..] {
16661 v.path.insert_str(0, &pfx);
16662 }
16663 }
16664 }
16665 for (idx, elem) in self.rmt_lctn_dtls.iter().enumerate() {
16666 let snap = violations.len();
16667 elem.validate_constraints("", violations);
16668 if violations.len() > snap {
16669 let pfx = format!("{path}/RmtLctnDtls[{idx}]");
16670 for v in &mut violations[snap..] {
16671 v.path.insert_str(0, &pfx);
16672 }
16673 }
16674 }
16675 }
16676}
16677impl crate::common::validate::Validatable for RemittanceLocationData2 {
16678 fn validate_constraints(
16679 &self,
16680 path: &str,
16681 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16682 ) {
16683 {
16684 let snap = violations.len();
16685 self.mtd.validate_constraints("", violations);
16686 if violations.len() > snap {
16687 let pfx = format!("{path}/Mtd");
16688 for v in &mut violations[snap..] {
16689 v.path.insert_str(0, &pfx);
16690 }
16691 }
16692 }
16693 if let Some(ref val) = self.elctrnc_adr {
16694 let snap = violations.len();
16695 val.validate_constraints("", violations);
16696 if violations.len() > snap {
16697 let pfx = format!("{path}/ElctrncAdr");
16698 for v in &mut violations[snap..] {
16699 v.path.insert_str(0, &pfx);
16700 }
16701 }
16702 }
16703 if let Some(ref val) = self.pstl_adr {
16704 let snap = violations.len();
16705 val.validate_constraints("", violations);
16706 if violations.len() > snap {
16707 let pfx = format!("{path}/PstlAdr");
16708 for v in &mut violations[snap..] {
16709 v.path.insert_str(0, &pfx);
16710 }
16711 }
16712 }
16713 }
16714}
16715impl crate::common::validate::Validatable for ServiceLevel8Choice {
16716 fn validate_constraints(
16717 &self,
16718 path: &str,
16719 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16720 ) {
16721 match self {
16722 Self::Cd(inner) => {
16723 let snap = violations.len();
16724 inner.validate_constraints("", violations);
16725 if violations.len() > snap {
16726 let pfx = format!("{path}/Cd");
16727 for v in &mut violations[snap..] {
16728 v.path.insert_str(0, &pfx);
16729 }
16730 }
16731 }
16732 Self::Prtry(inner) => {
16733 let snap = violations.len();
16734 inner.validate_constraints("", violations);
16735 if violations.len() > snap {
16736 let pfx = format!("{path}/Prtry");
16737 for v in &mut violations[snap..] {
16738 v.path.insert_str(0, &pfx);
16739 }
16740 }
16741 }
16742 }
16743 }
16744}
16745impl crate::common::validate::Validatable for SettlementDateTimeIndication1 {
16746 fn validate_constraints(
16747 &self,
16748 path: &str,
16749 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16750 ) {
16751 if let Some(ref val) = self.dbt_dt_tm {
16752 let snap = violations.len();
16753 val.validate_constraints("", violations);
16754 if violations.len() > snap {
16755 let pfx = format!("{path}/DbtDtTm");
16756 for v in &mut violations[snap..] {
16757 v.path.insert_str(0, &pfx);
16758 }
16759 }
16760 }
16761 if let Some(ref val) = self.cdt_dt_tm {
16762 let snap = violations.len();
16763 val.validate_constraints("", violations);
16764 if violations.len() > snap {
16765 let pfx = format!("{path}/CdtDtTm");
16766 for v in &mut violations[snap..] {
16767 v.path.insert_str(0, &pfx);
16768 }
16769 }
16770 }
16771 }
16772}
16773impl crate::common::validate::Validatable for SettlementInstruction15 {
16774 fn validate_constraints(
16775 &self,
16776 path: &str,
16777 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16778 ) {
16779 {
16780 let snap = violations.len();
16781 self.sttlm_mtd.validate_constraints("", violations);
16782 if violations.len() > snap {
16783 let pfx = format!("{path}/SttlmMtd");
16784 for v in &mut violations[snap..] {
16785 v.path.insert_str(0, &pfx);
16786 }
16787 }
16788 }
16789 if let Some(ref val) = self.sttlm_acct {
16790 let snap = violations.len();
16791 val.validate_constraints("", violations);
16792 if violations.len() > snap {
16793 let pfx = format!("{path}/SttlmAcct");
16794 for v in &mut violations[snap..] {
16795 v.path.insert_str(0, &pfx);
16796 }
16797 }
16798 }
16799 if let Some(ref wrapper) = self.clr_sys {
16800 let snap = violations.len();
16801 wrapper.inner.validate_constraints("", violations);
16802 if violations.len() > snap {
16803 let pfx = format!("{path}/ClrSys");
16804 for v in &mut violations[snap..] {
16805 v.path.insert_str(0, &pfx);
16806 }
16807 }
16808 }
16809 if let Some(ref val) = self.instg_rmbrsmnt_agt {
16810 let snap = violations.len();
16811 val.validate_constraints("", violations);
16812 if violations.len() > snap {
16813 let pfx = format!("{path}/InstgRmbrsmntAgt");
16814 for v in &mut violations[snap..] {
16815 v.path.insert_str(0, &pfx);
16816 }
16817 }
16818 }
16819 if let Some(ref val) = self.instg_rmbrsmnt_agt_acct {
16820 let snap = violations.len();
16821 val.validate_constraints("", violations);
16822 if violations.len() > snap {
16823 let pfx = format!("{path}/InstgRmbrsmntAgtAcct");
16824 for v in &mut violations[snap..] {
16825 v.path.insert_str(0, &pfx);
16826 }
16827 }
16828 }
16829 if let Some(ref val) = self.instd_rmbrsmnt_agt {
16830 let snap = violations.len();
16831 val.validate_constraints("", violations);
16832 if violations.len() > snap {
16833 let pfx = format!("{path}/InstdRmbrsmntAgt");
16834 for v in &mut violations[snap..] {
16835 v.path.insert_str(0, &pfx);
16836 }
16837 }
16838 }
16839 if let Some(ref val) = self.instd_rmbrsmnt_agt_acct {
16840 let snap = violations.len();
16841 val.validate_constraints("", violations);
16842 if violations.len() > snap {
16843 let pfx = format!("{path}/InstdRmbrsmntAgtAcct");
16844 for v in &mut violations[snap..] {
16845 v.path.insert_str(0, &pfx);
16846 }
16847 }
16848 }
16849 if let Some(ref val) = self.thrd_rmbrsmnt_agt {
16850 let snap = violations.len();
16851 val.validate_constraints("", violations);
16852 if violations.len() > snap {
16853 let pfx = format!("{path}/ThrdRmbrsmntAgt");
16854 for v in &mut violations[snap..] {
16855 v.path.insert_str(0, &pfx);
16856 }
16857 }
16858 }
16859 if let Some(ref val) = self.thrd_rmbrsmnt_agt_acct {
16860 let snap = violations.len();
16861 val.validate_constraints("", violations);
16862 if violations.len() > snap {
16863 let pfx = format!("{path}/ThrdRmbrsmntAgtAcct");
16864 for v in &mut violations[snap..] {
16865 v.path.insert_str(0, &pfx);
16866 }
16867 }
16868 }
16869 }
16870}
16871impl crate::common::validate::Validatable for SettlementTimeRequest2 {
16872 fn validate_constraints(
16873 &self,
16874 path: &str,
16875 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16876 ) {
16877 if let Some(ref val) = self.cls_tm {
16878 let snap = violations.len();
16879 val.validate_constraints("", violations);
16880 if violations.len() > snap {
16881 let pfx = format!("{path}/CLSTm");
16882 for v in &mut violations[snap..] {
16883 v.path.insert_str(0, &pfx);
16884 }
16885 }
16886 }
16887 if let Some(ref val) = self.till_tm {
16888 let snap = violations.len();
16889 val.validate_constraints("", violations);
16890 if violations.len() > snap {
16891 let pfx = format!("{path}/TillTm");
16892 for v in &mut violations[snap..] {
16893 v.path.insert_str(0, &pfx);
16894 }
16895 }
16896 }
16897 if let Some(ref val) = self.fr_tm {
16898 let snap = violations.len();
16899 val.validate_constraints("", violations);
16900 if violations.len() > snap {
16901 let pfx = format!("{path}/FrTm");
16902 for v in &mut violations[snap..] {
16903 v.path.insert_str(0, &pfx);
16904 }
16905 }
16906 }
16907 if let Some(ref val) = self.rjct_tm {
16908 let snap = violations.len();
16909 val.validate_constraints("", violations);
16910 if violations.len() > snap {
16911 let pfx = format!("{path}/RjctTm");
16912 for v in &mut violations[snap..] {
16913 v.path.insert_str(0, &pfx);
16914 }
16915 }
16916 }
16917 }
16918}
16919impl crate::common::validate::Validatable for StructuredRegulatoryReporting3 {
16920 fn validate_constraints(
16921 &self,
16922 path: &str,
16923 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16924 ) {
16925 if let Some(ref val) = self.tp {
16926 let snap = violations.len();
16927 val.validate_constraints("", violations);
16928 if violations.len() > snap {
16929 let pfx = format!("{path}/Tp");
16930 for v in &mut violations[snap..] {
16931 v.path.insert_str(0, &pfx);
16932 }
16933 }
16934 }
16935 if let Some(ref val) = self.dt {
16936 let snap = violations.len();
16937 val.validate_constraints("", violations);
16938 if violations.len() > snap {
16939 let pfx = format!("{path}/Dt");
16940 for v in &mut violations[snap..] {
16941 v.path.insert_str(0, &pfx);
16942 }
16943 }
16944 }
16945 if let Some(ref val) = self.ctry {
16946 let snap = violations.len();
16947 val.validate_constraints("", violations);
16948 if violations.len() > snap {
16949 let pfx = format!("{path}/Ctry");
16950 for v in &mut violations[snap..] {
16951 v.path.insert_str(0, &pfx);
16952 }
16953 }
16954 }
16955 if let Some(ref val) = self.cd {
16956 let snap = violations.len();
16957 val.validate_constraints("", violations);
16958 if violations.len() > snap {
16959 let pfx = format!("{path}/Cd");
16960 for v in &mut violations[snap..] {
16961 v.path.insert_str(0, &pfx);
16962 }
16963 }
16964 }
16965 if let Some(ref val) = self.amt {
16966 let snap = violations.len();
16967 val.validate_constraints("", violations);
16968 if violations.len() > snap {
16969 let pfx = format!("{path}/Amt");
16970 for v in &mut violations[snap..] {
16971 v.path.insert_str(0, &pfx);
16972 }
16973 }
16974 }
16975 for (idx, elem) in self.inf.iter().enumerate() {
16976 let snap = violations.len();
16977 elem.validate_constraints("", violations);
16978 if violations.len() > snap {
16979 let pfx = format!("{path}/Inf[{idx}]");
16980 for v in &mut violations[snap..] {
16981 v.path.insert_str(0, &pfx);
16982 }
16983 }
16984 }
16985 }
16986}
16987impl crate::common::validate::Validatable for StructuredRemittanceInformation18 {
16988 fn validate_constraints(
16989 &self,
16990 path: &str,
16991 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
16992 ) {
16993 for (idx, elem) in self.rfrd_doc_inf.iter().enumerate() {
16994 let snap = violations.len();
16995 elem.validate_constraints("", violations);
16996 if violations.len() > snap {
16997 let pfx = format!("{path}/RfrdDocInf[{idx}]");
16998 for v in &mut violations[snap..] {
16999 v.path.insert_str(0, &pfx);
17000 }
17001 }
17002 }
17003 if let Some(ref val) = self.rfrd_doc_amt {
17004 let snap = violations.len();
17005 val.validate_constraints("", violations);
17006 if violations.len() > snap {
17007 let pfx = format!("{path}/RfrdDocAmt");
17008 for v in &mut violations[snap..] {
17009 v.path.insert_str(0, &pfx);
17010 }
17011 }
17012 }
17013 if let Some(ref val) = self.cdtr_ref_inf {
17014 let snap = violations.len();
17015 val.validate_constraints("", violations);
17016 if violations.len() > snap {
17017 let pfx = format!("{path}/CdtrRefInf");
17018 for v in &mut violations[snap..] {
17019 v.path.insert_str(0, &pfx);
17020 }
17021 }
17022 }
17023 if let Some(ref val) = self.invcr {
17024 let snap = violations.len();
17025 val.validate_constraints("", violations);
17026 if violations.len() > snap {
17027 let pfx = format!("{path}/Invcr");
17028 for v in &mut violations[snap..] {
17029 v.path.insert_str(0, &pfx);
17030 }
17031 }
17032 }
17033 if let Some(ref val) = self.invcee {
17034 let snap = violations.len();
17035 val.validate_constraints("", violations);
17036 if violations.len() > snap {
17037 let pfx = format!("{path}/Invcee");
17038 for v in &mut violations[snap..] {
17039 v.path.insert_str(0, &pfx);
17040 }
17041 }
17042 }
17043 if let Some(ref val) = self.tax_rmt {
17044 let snap = violations.len();
17045 val.validate_constraints("", violations);
17046 if violations.len() > snap {
17047 let pfx = format!("{path}/TaxRmt");
17048 for v in &mut violations[snap..] {
17049 v.path.insert_str(0, &pfx);
17050 }
17051 }
17052 }
17053 if let Some(ref val) = self.grnshmt_rmt {
17054 let snap = violations.len();
17055 val.validate_constraints("", violations);
17056 if violations.len() > snap {
17057 let pfx = format!("{path}/GrnshmtRmt");
17058 for v in &mut violations[snap..] {
17059 v.path.insert_str(0, &pfx);
17060 }
17061 }
17062 }
17063 for (idx, elem) in self.addtl_rmt_inf.iter().enumerate() {
17064 let snap = violations.len();
17065 elem.validate_constraints("", violations);
17066 if violations.len() > snap {
17067 let pfx = format!("{path}/AddtlRmtInf[{idx}]");
17068 for v in &mut violations[snap..] {
17069 v.path.insert_str(0, &pfx);
17070 }
17071 }
17072 }
17073 }
17074}
17075impl crate::common::validate::Validatable for SupplementaryData1 {
17076 fn validate_constraints(
17077 &self,
17078 path: &str,
17079 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17080 ) {
17081 if let Some(ref val) = self.plc_and_nm {
17082 let snap = violations.len();
17083 val.validate_constraints("", violations);
17084 if violations.len() > snap {
17085 let pfx = format!("{path}/PlcAndNm");
17086 for v in &mut violations[snap..] {
17087 v.path.insert_str(0, &pfx);
17088 }
17089 }
17090 }
17091 {
17092 let snap = violations.len();
17093 self.envlp.validate_constraints("", violations);
17094 if violations.len() > snap {
17095 let pfx = format!("{path}/Envlp");
17096 for v in &mut violations[snap..] {
17097 v.path.insert_str(0, &pfx);
17098 }
17099 }
17100 }
17101 }
17102}
17103impl crate::common::validate::Validatable for SupplementaryDataEnvelope1 {
17104 fn validate_constraints(
17105 &self,
17106 _path: &str,
17107 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17108 ) {
17109 }
17110}
17111impl crate::common::validate::Validatable for TaxAmount3 {
17112 fn validate_constraints(
17113 &self,
17114 path: &str,
17115 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17116 ) {
17117 if let Some(ref val) = self.rate {
17118 let snap = violations.len();
17119 val.validate_constraints("", violations);
17120 if violations.len() > snap {
17121 let pfx = format!("{path}/Rate");
17122 for v in &mut violations[snap..] {
17123 v.path.insert_str(0, &pfx);
17124 }
17125 }
17126 }
17127 if let Some(ref val) = self.taxbl_base_amt {
17128 let snap = violations.len();
17129 val.validate_constraints("", violations);
17130 if violations.len() > snap {
17131 let pfx = format!("{path}/TaxblBaseAmt");
17132 for v in &mut violations[snap..] {
17133 v.path.insert_str(0, &pfx);
17134 }
17135 }
17136 }
17137 if let Some(ref val) = self.ttl_amt {
17138 let snap = violations.len();
17139 val.validate_constraints("", violations);
17140 if violations.len() > snap {
17141 let pfx = format!("{path}/TtlAmt");
17142 for v in &mut violations[snap..] {
17143 v.path.insert_str(0, &pfx);
17144 }
17145 }
17146 }
17147 for (idx, elem) in self.dtls.iter().enumerate() {
17148 let snap = violations.len();
17149 elem.validate_constraints("", violations);
17150 if violations.len() > snap {
17151 let pfx = format!("{path}/Dtls[{idx}]");
17152 for v in &mut violations[snap..] {
17153 v.path.insert_str(0, &pfx);
17154 }
17155 }
17156 }
17157 }
17158}
17159impl crate::common::validate::Validatable for TaxAuthorisation1 {
17160 fn validate_constraints(
17161 &self,
17162 path: &str,
17163 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17164 ) {
17165 if let Some(ref val) = self.titl {
17166 let snap = violations.len();
17167 val.validate_constraints("", violations);
17168 if violations.len() > snap {
17169 let pfx = format!("{path}/Titl");
17170 for v in &mut violations[snap..] {
17171 v.path.insert_str(0, &pfx);
17172 }
17173 }
17174 }
17175 if let Some(ref val) = self.nm {
17176 let snap = violations.len();
17177 val.validate_constraints("", violations);
17178 if violations.len() > snap {
17179 let pfx = format!("{path}/Nm");
17180 for v in &mut violations[snap..] {
17181 v.path.insert_str(0, &pfx);
17182 }
17183 }
17184 }
17185 }
17186}
17187impl crate::common::validate::Validatable for TaxData1 {
17188 fn validate_constraints(
17189 &self,
17190 path: &str,
17191 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17192 ) {
17193 if let Some(ref val) = self.cdtr {
17194 let snap = violations.len();
17195 val.validate_constraints("", violations);
17196 if violations.len() > snap {
17197 let pfx = format!("{path}/Cdtr");
17198 for v in &mut violations[snap..] {
17199 v.path.insert_str(0, &pfx);
17200 }
17201 }
17202 }
17203 if let Some(ref val) = self.dbtr {
17204 let snap = violations.len();
17205 val.validate_constraints("", violations);
17206 if violations.len() > snap {
17207 let pfx = format!("{path}/Dbtr");
17208 for v in &mut violations[snap..] {
17209 v.path.insert_str(0, &pfx);
17210 }
17211 }
17212 }
17213 if let Some(ref val) = self.ultmt_dbtr {
17214 let snap = violations.len();
17215 val.validate_constraints("", violations);
17216 if violations.len() > snap {
17217 let pfx = format!("{path}/UltmtDbtr");
17218 for v in &mut violations[snap..] {
17219 v.path.insert_str(0, &pfx);
17220 }
17221 }
17222 }
17223 if let Some(ref val) = self.admstn_zone {
17224 let snap = violations.len();
17225 val.validate_constraints("", violations);
17226 if violations.len() > snap {
17227 let pfx = format!("{path}/AdmstnZone");
17228 for v in &mut violations[snap..] {
17229 v.path.insert_str(0, &pfx);
17230 }
17231 }
17232 }
17233 if let Some(ref val) = self.ref_nb {
17234 let snap = violations.len();
17235 val.validate_constraints("", violations);
17236 if violations.len() > snap {
17237 let pfx = format!("{path}/RefNb");
17238 for v in &mut violations[snap..] {
17239 v.path.insert_str(0, &pfx);
17240 }
17241 }
17242 }
17243 if let Some(ref val) = self.mtd {
17244 let snap = violations.len();
17245 val.validate_constraints("", violations);
17246 if violations.len() > snap {
17247 let pfx = format!("{path}/Mtd");
17248 for v in &mut violations[snap..] {
17249 v.path.insert_str(0, &pfx);
17250 }
17251 }
17252 }
17253 if let Some(ref val) = self.ttl_taxbl_base_amt {
17254 let snap = violations.len();
17255 val.validate_constraints("", violations);
17256 if violations.len() > snap {
17257 let pfx = format!("{path}/TtlTaxblBaseAmt");
17258 for v in &mut violations[snap..] {
17259 v.path.insert_str(0, &pfx);
17260 }
17261 }
17262 }
17263 if let Some(ref val) = self.ttl_tax_amt {
17264 let snap = violations.len();
17265 val.validate_constraints("", violations);
17266 if violations.len() > snap {
17267 let pfx = format!("{path}/TtlTaxAmt");
17268 for v in &mut violations[snap..] {
17269 v.path.insert_str(0, &pfx);
17270 }
17271 }
17272 }
17273 if let Some(ref val) = self.dt {
17274 let snap = violations.len();
17275 val.validate_constraints("", violations);
17276 if violations.len() > snap {
17277 let pfx = format!("{path}/Dt");
17278 for v in &mut violations[snap..] {
17279 v.path.insert_str(0, &pfx);
17280 }
17281 }
17282 }
17283 if let Some(ref val) = self.seq_nb {
17284 let snap = violations.len();
17285 val.validate_constraints("", violations);
17286 if violations.len() > snap {
17287 let pfx = format!("{path}/SeqNb");
17288 for v in &mut violations[snap..] {
17289 v.path.insert_str(0, &pfx);
17290 }
17291 }
17292 }
17293 for (idx, elem) in self.rcrd.iter().enumerate() {
17294 let snap = violations.len();
17295 elem.validate_constraints("", violations);
17296 if violations.len() > snap {
17297 let pfx = format!("{path}/Rcrd[{idx}]");
17298 for v in &mut violations[snap..] {
17299 v.path.insert_str(0, &pfx);
17300 }
17301 }
17302 }
17303 }
17304}
17305impl crate::common::validate::Validatable for TaxParty1 {
17306 fn validate_constraints(
17307 &self,
17308 path: &str,
17309 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17310 ) {
17311 if let Some(ref val) = self.tax_id {
17312 let snap = violations.len();
17313 val.validate_constraints("", violations);
17314 if violations.len() > snap {
17315 let pfx = format!("{path}/TaxId");
17316 for v in &mut violations[snap..] {
17317 v.path.insert_str(0, &pfx);
17318 }
17319 }
17320 }
17321 if let Some(ref val) = self.regn_id {
17322 let snap = violations.len();
17323 val.validate_constraints("", violations);
17324 if violations.len() > snap {
17325 let pfx = format!("{path}/RegnId");
17326 for v in &mut violations[snap..] {
17327 v.path.insert_str(0, &pfx);
17328 }
17329 }
17330 }
17331 if let Some(ref val) = self.tax_tp {
17332 let snap = violations.len();
17333 val.validate_constraints("", violations);
17334 if violations.len() > snap {
17335 let pfx = format!("{path}/TaxTp");
17336 for v in &mut violations[snap..] {
17337 v.path.insert_str(0, &pfx);
17338 }
17339 }
17340 }
17341 }
17342}
17343impl crate::common::validate::Validatable for TaxParty2 {
17344 fn validate_constraints(
17345 &self,
17346 path: &str,
17347 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17348 ) {
17349 if let Some(ref val) = self.tax_id {
17350 let snap = violations.len();
17351 val.validate_constraints("", violations);
17352 if violations.len() > snap {
17353 let pfx = format!("{path}/TaxId");
17354 for v in &mut violations[snap..] {
17355 v.path.insert_str(0, &pfx);
17356 }
17357 }
17358 }
17359 if let Some(ref val) = self.regn_id {
17360 let snap = violations.len();
17361 val.validate_constraints("", violations);
17362 if violations.len() > snap {
17363 let pfx = format!("{path}/RegnId");
17364 for v in &mut violations[snap..] {
17365 v.path.insert_str(0, &pfx);
17366 }
17367 }
17368 }
17369 if let Some(ref val) = self.tax_tp {
17370 let snap = violations.len();
17371 val.validate_constraints("", violations);
17372 if violations.len() > snap {
17373 let pfx = format!("{path}/TaxTp");
17374 for v in &mut violations[snap..] {
17375 v.path.insert_str(0, &pfx);
17376 }
17377 }
17378 }
17379 if let Some(ref val) = self.authstn {
17380 let snap = violations.len();
17381 val.validate_constraints("", violations);
17382 if violations.len() > snap {
17383 let pfx = format!("{path}/Authstn");
17384 for v in &mut violations[snap..] {
17385 v.path.insert_str(0, &pfx);
17386 }
17387 }
17388 }
17389 }
17390}
17391impl crate::common::validate::Validatable for TaxPeriod3 {
17392 fn validate_constraints(
17393 &self,
17394 path: &str,
17395 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17396 ) {
17397 if let Some(ref val) = self.yr {
17398 let snap = violations.len();
17399 val.validate_constraints("", violations);
17400 if violations.len() > snap {
17401 let pfx = format!("{path}/Yr");
17402 for v in &mut violations[snap..] {
17403 v.path.insert_str(0, &pfx);
17404 }
17405 }
17406 }
17407 if let Some(ref val) = self.tp {
17408 let snap = violations.len();
17409 val.validate_constraints("", violations);
17410 if violations.len() > snap {
17411 let pfx = format!("{path}/Tp");
17412 for v in &mut violations[snap..] {
17413 v.path.insert_str(0, &pfx);
17414 }
17415 }
17416 }
17417 if let Some(ref val) = self.fr_to_dt {
17418 let snap = violations.len();
17419 val.validate_constraints("", violations);
17420 if violations.len() > snap {
17421 let pfx = format!("{path}/FrToDt");
17422 for v in &mut violations[snap..] {
17423 v.path.insert_str(0, &pfx);
17424 }
17425 }
17426 }
17427 }
17428}
17429impl crate::common::validate::Validatable for TaxRecord3 {
17430 fn validate_constraints(
17431 &self,
17432 path: &str,
17433 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17434 ) {
17435 if let Some(ref val) = self.tp {
17436 let snap = violations.len();
17437 val.validate_constraints("", violations);
17438 if violations.len() > snap {
17439 let pfx = format!("{path}/Tp");
17440 for v in &mut violations[snap..] {
17441 v.path.insert_str(0, &pfx);
17442 }
17443 }
17444 }
17445 if let Some(ref val) = self.ctgy {
17446 let snap = violations.len();
17447 val.validate_constraints("", violations);
17448 if violations.len() > snap {
17449 let pfx = format!("{path}/Ctgy");
17450 for v in &mut violations[snap..] {
17451 v.path.insert_str(0, &pfx);
17452 }
17453 }
17454 }
17455 if let Some(ref val) = self.ctgy_dtls {
17456 let snap = violations.len();
17457 val.validate_constraints("", violations);
17458 if violations.len() > snap {
17459 let pfx = format!("{path}/CtgyDtls");
17460 for v in &mut violations[snap..] {
17461 v.path.insert_str(0, &pfx);
17462 }
17463 }
17464 }
17465 if let Some(ref val) = self.dbtr_sts {
17466 let snap = violations.len();
17467 val.validate_constraints("", violations);
17468 if violations.len() > snap {
17469 let pfx = format!("{path}/DbtrSts");
17470 for v in &mut violations[snap..] {
17471 v.path.insert_str(0, &pfx);
17472 }
17473 }
17474 }
17475 if let Some(ref val) = self.cert_id {
17476 let snap = violations.len();
17477 val.validate_constraints("", violations);
17478 if violations.len() > snap {
17479 let pfx = format!("{path}/CertId");
17480 for v in &mut violations[snap..] {
17481 v.path.insert_str(0, &pfx);
17482 }
17483 }
17484 }
17485 if let Some(ref val) = self.frms_cd {
17486 let snap = violations.len();
17487 val.validate_constraints("", violations);
17488 if violations.len() > snap {
17489 let pfx = format!("{path}/FrmsCd");
17490 for v in &mut violations[snap..] {
17491 v.path.insert_str(0, &pfx);
17492 }
17493 }
17494 }
17495 if let Some(ref val) = self.prd {
17496 let snap = violations.len();
17497 val.validate_constraints("", violations);
17498 if violations.len() > snap {
17499 let pfx = format!("{path}/Prd");
17500 for v in &mut violations[snap..] {
17501 v.path.insert_str(0, &pfx);
17502 }
17503 }
17504 }
17505 if let Some(ref val) = self.tax_amt {
17506 let snap = violations.len();
17507 val.validate_constraints("", violations);
17508 if violations.len() > snap {
17509 let pfx = format!("{path}/TaxAmt");
17510 for v in &mut violations[snap..] {
17511 v.path.insert_str(0, &pfx);
17512 }
17513 }
17514 }
17515 if let Some(ref val) = self.addtl_inf {
17516 let snap = violations.len();
17517 val.validate_constraints("", violations);
17518 if violations.len() > snap {
17519 let pfx = format!("{path}/AddtlInf");
17520 for v in &mut violations[snap..] {
17521 v.path.insert_str(0, &pfx);
17522 }
17523 }
17524 }
17525 }
17526}
17527impl crate::common::validate::Validatable for TaxRecordDetails3 {
17528 fn validate_constraints(
17529 &self,
17530 path: &str,
17531 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
17532 ) {
17533 if let Some(ref val) = self.prd {
17534 let snap = violations.len();
17535 val.validate_constraints("", violations);
17536 if violations.len() > snap {
17537 let pfx = format!("{path}/Prd");
17538 for v in &mut violations[snap..] {
17539 v.path.insert_str(0, &pfx);
17540 }
17541 }
17542 }
17543 {
17544 let snap = violations.len();
17545 self.amt.validate_constraints("", violations);
17546 if violations.len() > snap {
17547 let pfx = format!("{path}/Amt");
17548 for v in &mut violations[snap..] {
17549 v.path.insert_str(0, &pfx);
17550 }
17551 }
17552 }
17553 }
17554}
17555impl crate::common::validate::IsoMessage for Document {
17556 fn message_type(&self) -> &'static str {
17557 "pacs.008.001.13"
17558 }
17559 fn root_path(&self) -> &'static str {
17560 "/Document"
17561 }
17562}