1#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7#[serde(transparent)]
8pub struct ActiveOrHistoricCurrencyAndAmountSimpleType(pub String);
9impl TryFrom<String> for ActiveOrHistoricCurrencyAndAmountSimpleType {
10 type Error = crate::common::validate::ConstraintError;
11 #[allow(clippy::unreadable_literal)]
12 fn try_from(value: String) -> Result<Self, Self::Error> {
13 {
14 let value: &str = &value;
15 {
16 let frac_count = value.find('.').map_or(0, |dot| {
17 value[dot + 1..]
18 .chars()
19 .filter(char::is_ascii_digit)
20 .count()
21 });
22 let violated = frac_count > 5usize;
23 if violated {
24 return Err(crate::common::validate::ConstraintError {
25 kind: crate::common::validate::ConstraintKind::FractionDigits,
26 message: format!(
27 "{} (got {})",
28 "value exceeds maximum fraction digits 5", frac_count
29 ),
30 });
31 }
32 }
33 {
34 let digit_count = value.chars().filter(char::is_ascii_digit).count();
35 let violated = digit_count > 18usize;
36 if violated {
37 return Err(crate::common::validate::ConstraintError {
38 kind: crate::common::validate::ConstraintKind::TotalDigits,
39 message: format!(
40 "{} (got {})",
41 "value exceeds maximum total digits 18", digit_count
42 ),
43 });
44 }
45 }
46 }
47 Ok(Self(value))
48 }
49}
50impl ActiveOrHistoricCurrencyAndAmountSimpleType {
51 #[allow(clippy::unreadable_literal)]
53 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
54 Self::try_from(value.into())
55 }
56}
57impl From<ActiveOrHistoricCurrencyAndAmountSimpleType> for String {
58 fn from(v: ActiveOrHistoricCurrencyAndAmountSimpleType) -> Self {
59 v.0
60 }
61}
62#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
64#[serde(transparent)]
65pub struct ActiveOrHistoricCurrencyCode(pub String);
66impl TryFrom<String> for ActiveOrHistoricCurrencyCode {
67 type Error = crate::common::validate::ConstraintError;
68 #[allow(clippy::unreadable_literal)]
69 fn try_from(value: String) -> Result<Self, Self::Error> {
70 {
71 let value: &str = &value;
72 {
73 let violated = {
74 let bytes = value.as_bytes();
75 bytes.len() != 3usize
76 || ({
77 let b = bytes[0usize];
78 !(65u8..=90u8).contains(&b)
79 })
80 || ({
81 let b = bytes[1usize];
82 !(65u8..=90u8).contains(&b)
83 })
84 || ({
85 let b = bytes[2usize];
86 !(65u8..=90u8).contains(&b)
87 })
88 };
89 if violated {
90 return Err(crate::common::validate::ConstraintError {
91 kind: crate::common::validate::ConstraintKind::Pattern,
92 message: "value does not match pattern [A-Z]{3,3}".to_string(),
93 });
94 }
95 }
96 }
97 Ok(Self(value))
98 }
99}
100impl ActiveOrHistoricCurrencyCode {
101 #[allow(clippy::unreadable_literal)]
103 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
104 Self::try_from(value.into())
105 }
106}
107impl From<ActiveOrHistoricCurrencyCode> for String {
108 fn from(v: ActiveOrHistoricCurrencyCode) -> Self {
109 v.0
110 }
111}
112#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
113pub enum AddressType2Code {
114 #[serde(rename = "ADDR")]
115 Addr,
116 #[serde(rename = "PBOX")]
117 Pbox,
118 #[serde(rename = "HOME")]
119 Home,
120 #[serde(rename = "BIZZ")]
121 Bizz,
122 #[serde(rename = "MLTO")]
123 Mlto,
124 #[serde(rename = "DLVY")]
125 Dlvy,
126}
127#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
129#[serde(transparent)]
130pub struct AnyBICDec2014Identifier(pub String);
131impl TryFrom<String> for AnyBICDec2014Identifier {
132 type Error = crate::common::validate::ConstraintError;
133 #[allow(clippy::unreadable_literal)]
134 fn try_from(value: String) -> Result<Self, Self::Error> {
135 {
136 let value: &str = &value;
137 {
138 let violated = {
139 let bytes = value.as_bytes();
140 let len = bytes.len();
141 let result: bool = (|| -> bool {
142 let mut pos: usize = 0;
143 if !(8usize..=11usize).contains(&len) {
144 return true;
145 }
146 {
147 let end = pos + 4usize;
148 if end > len {
149 return true;
150 }
151 for &b in &bytes[pos..end] {
152 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
153 return true;
154 }
155 }
156 pos = end;
157 }
158 {
159 let end = pos + 2usize;
160 if end > len {
161 return true;
162 }
163 for &b in &bytes[pos..end] {
164 if !(65u8..=90u8).contains(&b) {
165 return true;
166 }
167 }
168 pos = end;
169 }
170 {
171 let end = pos + 2usize;
172 if end > len {
173 return true;
174 }
175 for &b in &bytes[pos..end] {
176 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
177 return true;
178 }
179 }
180 pos = end;
181 }
182 {
183 let saved = pos;
184 let matched: bool = (|| -> bool {
185 {
186 let end = pos + 3usize;
187 if end > len {
188 return true;
189 }
190 for &b in &bytes[pos..end] {
191 if !(65u8..=90u8).contains(&b)
192 && !(48u8..=57u8).contains(&b)
193 {
194 return true;
195 }
196 }
197 pos = end;
198 }
199 false
200 })();
201 if matched {
202 pos = saved;
203 }
204 }
205 if pos != len {
206 return true;
207 }
208 false
209 })();
210 result
211 };
212 if violated {
213 return Err(crate::common::validate::ConstraintError {
214 kind: crate::common::validate::ConstraintKind::Pattern,
215 message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
216 .to_string(),
217 });
218 }
219 }
220 }
221 Ok(Self(value))
222 }
223}
224impl AnyBICDec2014Identifier {
225 #[allow(clippy::unreadable_literal)]
227 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
228 Self::try_from(value.into())
229 }
230}
231impl From<AnyBICDec2014Identifier> for String {
232 fn from(v: AnyBICDec2014Identifier) -> Self {
233 v.0
234 }
235}
236#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
238#[serde(transparent)]
239pub struct BICFIDec2014Identifier(pub String);
240impl TryFrom<String> for BICFIDec2014Identifier {
241 type Error = crate::common::validate::ConstraintError;
242 #[allow(clippy::unreadable_literal)]
243 fn try_from(value: String) -> Result<Self, Self::Error> {
244 {
245 let value: &str = &value;
246 {
247 let violated = {
248 let bytes = value.as_bytes();
249 let len = bytes.len();
250 let result: bool = (|| -> bool {
251 let mut pos: usize = 0;
252 if !(8usize..=11usize).contains(&len) {
253 return true;
254 }
255 {
256 let end = pos + 4usize;
257 if end > len {
258 return true;
259 }
260 for &b in &bytes[pos..end] {
261 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
262 return true;
263 }
264 }
265 pos = end;
266 }
267 {
268 let end = pos + 2usize;
269 if end > len {
270 return true;
271 }
272 for &b in &bytes[pos..end] {
273 if !(65u8..=90u8).contains(&b) {
274 return true;
275 }
276 }
277 pos = end;
278 }
279 {
280 let end = pos + 2usize;
281 if end > len {
282 return true;
283 }
284 for &b in &bytes[pos..end] {
285 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
286 return true;
287 }
288 }
289 pos = end;
290 }
291 {
292 let saved = pos;
293 let matched: bool = (|| -> bool {
294 {
295 let end = pos + 3usize;
296 if end > len {
297 return true;
298 }
299 for &b in &bytes[pos..end] {
300 if !(65u8..=90u8).contains(&b)
301 && !(48u8..=57u8).contains(&b)
302 {
303 return true;
304 }
305 }
306 pos = end;
307 }
308 false
309 })();
310 if matched {
311 pos = saved;
312 }
313 }
314 if pos != len {
315 return true;
316 }
317 false
318 })();
319 result
320 };
321 if violated {
322 return Err(crate::common::validate::ConstraintError {
323 kind: crate::common::validate::ConstraintKind::Pattern,
324 message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
325 .to_string(),
326 });
327 }
328 }
329 }
330 Ok(Self(value))
331 }
332}
333impl BICFIDec2014Identifier {
334 #[allow(clippy::unreadable_literal)]
336 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
337 Self::try_from(value.into())
338 }
339}
340impl From<BICFIDec2014Identifier> for String {
341 fn from(v: BICFIDec2014Identifier) -> Self {
342 v.0
343 }
344}
345#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
346pub enum ClearingChannel2Code {
347 #[serde(rename = "RTGS")]
348 Rtgs,
349 #[serde(rename = "RTNS")]
350 Rtns,
351 #[serde(rename = "MPNS")]
352 Mpns,
353 #[serde(rename = "BOOK")]
354 Book,
355}
356#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
358#[serde(transparent)]
359pub struct CountryCode(pub String);
360impl TryFrom<String> for CountryCode {
361 type Error = crate::common::validate::ConstraintError;
362 #[allow(clippy::unreadable_literal)]
363 fn try_from(value: String) -> Result<Self, Self::Error> {
364 {
365 let value: &str = &value;
366 {
367 let violated = {
368 let bytes = value.as_bytes();
369 bytes.len() != 2usize
370 || ({
371 let b = bytes[0usize];
372 !(65u8..=90u8).contains(&b)
373 })
374 || ({
375 let b = bytes[1usize];
376 !(65u8..=90u8).contains(&b)
377 })
378 };
379 if violated {
380 return Err(crate::common::validate::ConstraintError {
381 kind: crate::common::validate::ConstraintKind::Pattern,
382 message: "value does not match pattern [A-Z]{2,2}".to_string(),
383 });
384 }
385 }
386 }
387 Ok(Self(value))
388 }
389}
390impl CountryCode {
391 #[allow(clippy::unreadable_literal)]
393 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
394 Self::try_from(value.into())
395 }
396}
397impl From<CountryCode> for String {
398 fn from(v: CountryCode) -> Self {
399 v.0
400 }
401}
402#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
403pub enum CreditDebitCode {
404 #[serde(rename = "CRDT")]
405 Crdt,
406 #[serde(rename = "DBIT")]
407 Dbit,
408}
409#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
412#[serde(transparent)]
413pub struct DecimalNumber(pub String);
414impl TryFrom<String> for DecimalNumber {
415 type Error = crate::common::validate::ConstraintError;
416 #[allow(clippy::unreadable_literal)]
417 fn try_from(value: String) -> Result<Self, Self::Error> {
418 {
419 let value: &str = &value;
420 {
421 let frac_count = value.find('.').map_or(0, |dot| {
422 value[dot + 1..]
423 .chars()
424 .filter(char::is_ascii_digit)
425 .count()
426 });
427 let violated = frac_count > 17usize;
428 if violated {
429 return Err(crate::common::validate::ConstraintError {
430 kind: crate::common::validate::ConstraintKind::FractionDigits,
431 message: format!(
432 "{} (got {})",
433 "value exceeds maximum fraction digits 17", frac_count
434 ),
435 });
436 }
437 }
438 {
439 let digit_count = value.chars().filter(char::is_ascii_digit).count();
440 let violated = digit_count > 18usize;
441 if violated {
442 return Err(crate::common::validate::ConstraintError {
443 kind: crate::common::validate::ConstraintKind::TotalDigits,
444 message: format!(
445 "{} (got {})",
446 "value exceeds maximum total digits 18", digit_count
447 ),
448 });
449 }
450 }
451 }
452 Ok(Self(value))
453 }
454}
455impl DecimalNumber {
456 #[allow(clippy::unreadable_literal)]
458 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
459 Self::try_from(value.into())
460 }
461}
462impl From<DecimalNumber> for String {
463 fn from(v: DecimalNumber) -> Self {
464 v.0
465 }
466}
467#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
468pub enum DocumentType3Code {
469 #[serde(rename = "RADM")]
470 Radm,
471 #[serde(rename = "RPIN")]
472 Rpin,
473 #[serde(rename = "FXDR")]
474 Fxdr,
475 #[serde(rename = "DISP")]
476 Disp,
477 #[serde(rename = "PUOR")]
478 Puor,
479 #[serde(rename = "SCOR")]
480 Scor,
481}
482#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
483pub enum DocumentType6Code {
484 #[serde(rename = "MSIN")]
485 Msin,
486 #[serde(rename = "CNFA")]
487 Cnfa,
488 #[serde(rename = "DNFA")]
489 Dnfa,
490 #[serde(rename = "CINV")]
491 Cinv,
492 #[serde(rename = "CREN")]
493 Cren,
494 #[serde(rename = "DEBN")]
495 Debn,
496 #[serde(rename = "HIRI")]
497 Hiri,
498 #[serde(rename = "SBIN")]
499 Sbin,
500 #[serde(rename = "CMCN")]
501 Cmcn,
502 #[serde(rename = "SOAC")]
503 Soac,
504 #[serde(rename = "DISP")]
505 Disp,
506 #[serde(rename = "BOLD")]
507 Bold,
508 #[serde(rename = "VCHR")]
509 Vchr,
510 #[serde(rename = "AROI")]
511 Aroi,
512 #[serde(rename = "TSUT")]
513 Tsut,
514 #[serde(rename = "PUOR")]
515 Puor,
516}
517#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
519#[serde(transparent)]
520pub struct Exact2NumericText(pub String);
521impl TryFrom<String> for Exact2NumericText {
522 type Error = crate::common::validate::ConstraintError;
523 #[allow(clippy::unreadable_literal)]
524 fn try_from(value: String) -> Result<Self, Self::Error> {
525 {
526 let value: &str = &value;
527 {
528 let violated = {
529 let bytes = value.as_bytes();
530 bytes.len() != 2usize
531 || ({
532 let b = bytes[0usize];
533 !(48u8..=57u8).contains(&b)
534 })
535 || ({
536 let b = bytes[1usize];
537 !(48u8..=57u8).contains(&b)
538 })
539 };
540 if violated {
541 return Err(crate::common::validate::ConstraintError {
542 kind: crate::common::validate::ConstraintKind::Pattern,
543 message: "value does not match pattern [0-9]{2}".to_string(),
544 });
545 }
546 }
547 }
548 Ok(Self(value))
549 }
550}
551impl Exact2NumericText {
552 #[allow(clippy::unreadable_literal)]
554 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
555 Self::try_from(value.into())
556 }
557}
558impl From<Exact2NumericText> for String {
559 fn from(v: Exact2NumericText) -> Self {
560 v.0
561 }
562}
563#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
565#[serde(transparent)]
566pub struct Exact4AlphaNumericText(pub String);
567impl TryFrom<String> for Exact4AlphaNumericText {
568 type Error = crate::common::validate::ConstraintError;
569 #[allow(clippy::unreadable_literal)]
570 fn try_from(value: String) -> Result<Self, Self::Error> {
571 {
572 let value: &str = &value;
573 {
574 let violated = {
575 let bytes = value.as_bytes();
576 bytes.len() != 4usize
577 || ({
578 let b = bytes[0usize];
579 !(97u8..=122u8).contains(&b)
580 && !(65u8..=90u8).contains(&b)
581 && !(48u8..=57u8).contains(&b)
582 })
583 || ({
584 let b = bytes[1usize];
585 !(97u8..=122u8).contains(&b)
586 && !(65u8..=90u8).contains(&b)
587 && !(48u8..=57u8).contains(&b)
588 })
589 || ({
590 let b = bytes[2usize];
591 !(97u8..=122u8).contains(&b)
592 && !(65u8..=90u8).contains(&b)
593 && !(48u8..=57u8).contains(&b)
594 })
595 || ({
596 let b = bytes[3usize];
597 !(97u8..=122u8).contains(&b)
598 && !(65u8..=90u8).contains(&b)
599 && !(48u8..=57u8).contains(&b)
600 })
601 };
602 if violated {
603 return Err(crate::common::validate::ConstraintError {
604 kind: crate::common::validate::ConstraintKind::Pattern,
605 message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
606 });
607 }
608 }
609 }
610 Ok(Self(value))
611 }
612}
613impl Exact4AlphaNumericText {
614 #[allow(clippy::unreadable_literal)]
616 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
617 Self::try_from(value.into())
618 }
619}
620impl From<Exact4AlphaNumericText> for String {
621 fn from(v: Exact4AlphaNumericText) -> Self {
622 v.0
623 }
624}
625#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
628#[serde(transparent)]
629pub struct ExternalAccountIdentification1Code(pub String);
630impl TryFrom<String> for ExternalAccountIdentification1Code {
631 type Error = crate::common::validate::ConstraintError;
632 #[allow(clippy::unreadable_literal)]
633 fn try_from(value: String) -> Result<Self, Self::Error> {
634 {
635 let value: &str = &value;
636 {
637 let len = value.chars().count();
638 let violated = len < 1usize;
639 if violated {
640 return Err(crate::common::validate::ConstraintError {
641 kind: crate::common::validate::ConstraintKind::MinLength,
642 message: format!(
643 "{} (got {})",
644 "value is shorter than minimum length 1", len
645 ),
646 });
647 }
648 }
649 {
650 let len = value.chars().count();
651 let violated = len > 4usize;
652 if violated {
653 return Err(crate::common::validate::ConstraintError {
654 kind: crate::common::validate::ConstraintKind::MaxLength,
655 message: format!("{} (got {})", "value exceeds maximum length 4", len),
656 });
657 }
658 }
659 }
660 Ok(Self(value))
661 }
662}
663impl ExternalAccountIdentification1Code {
664 #[allow(clippy::unreadable_literal)]
666 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
667 Self::try_from(value.into())
668 }
669}
670impl From<ExternalAccountIdentification1Code> for String {
671 fn from(v: ExternalAccountIdentification1Code) -> Self {
672 v.0
673 }
674}
675#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
678#[serde(transparent)]
679pub struct ExternalCashAccountType1Code(pub String);
680impl TryFrom<String> for ExternalCashAccountType1Code {
681 type Error = crate::common::validate::ConstraintError;
682 #[allow(clippy::unreadable_literal)]
683 fn try_from(value: String) -> Result<Self, Self::Error> {
684 {
685 let value: &str = &value;
686 {
687 let len = value.chars().count();
688 let violated = len < 1usize;
689 if violated {
690 return Err(crate::common::validate::ConstraintError {
691 kind: crate::common::validate::ConstraintKind::MinLength,
692 message: format!(
693 "{} (got {})",
694 "value is shorter than minimum length 1", len
695 ),
696 });
697 }
698 }
699 {
700 let len = value.chars().count();
701 let violated = len > 4usize;
702 if violated {
703 return Err(crate::common::validate::ConstraintError {
704 kind: crate::common::validate::ConstraintKind::MaxLength,
705 message: format!("{} (got {})", "value exceeds maximum length 4", len),
706 });
707 }
708 }
709 }
710 Ok(Self(value))
711 }
712}
713impl ExternalCashAccountType1Code {
714 #[allow(clippy::unreadable_literal)]
716 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
717 Self::try_from(value.into())
718 }
719}
720impl From<ExternalCashAccountType1Code> for String {
721 fn from(v: ExternalCashAccountType1Code) -> Self {
722 v.0
723 }
724}
725#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
728#[serde(transparent)]
729pub struct ExternalCashClearingSystem1Code(pub String);
730impl TryFrom<String> for ExternalCashClearingSystem1Code {
731 type Error = crate::common::validate::ConstraintError;
732 #[allow(clippy::unreadable_literal)]
733 fn try_from(value: String) -> Result<Self, Self::Error> {
734 {
735 let value: &str = &value;
736 {
737 let len = value.chars().count();
738 let violated = len < 1usize;
739 if violated {
740 return Err(crate::common::validate::ConstraintError {
741 kind: crate::common::validate::ConstraintKind::MinLength,
742 message: format!(
743 "{} (got {})",
744 "value is shorter than minimum length 1", len
745 ),
746 });
747 }
748 }
749 {
750 let len = value.chars().count();
751 let violated = len > 3usize;
752 if violated {
753 return Err(crate::common::validate::ConstraintError {
754 kind: crate::common::validate::ConstraintKind::MaxLength,
755 message: format!("{} (got {})", "value exceeds maximum length 3", len),
756 });
757 }
758 }
759 }
760 Ok(Self(value))
761 }
762}
763impl ExternalCashClearingSystem1Code {
764 #[allow(clippy::unreadable_literal)]
766 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
767 Self::try_from(value.into())
768 }
769}
770impl From<ExternalCashClearingSystem1Code> for String {
771 fn from(v: ExternalCashClearingSystem1Code) -> Self {
772 v.0
773 }
774}
775#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
778#[serde(transparent)]
779pub struct ExternalCategoryPurpose1Code(pub String);
780impl TryFrom<String> for ExternalCategoryPurpose1Code {
781 type Error = crate::common::validate::ConstraintError;
782 #[allow(clippy::unreadable_literal)]
783 fn try_from(value: String) -> Result<Self, Self::Error> {
784 {
785 let value: &str = &value;
786 {
787 let len = value.chars().count();
788 let violated = len < 1usize;
789 if violated {
790 return Err(crate::common::validate::ConstraintError {
791 kind: crate::common::validate::ConstraintKind::MinLength,
792 message: format!(
793 "{} (got {})",
794 "value is shorter than minimum length 1", len
795 ),
796 });
797 }
798 }
799 {
800 let len = value.chars().count();
801 let violated = len > 4usize;
802 if violated {
803 return Err(crate::common::validate::ConstraintError {
804 kind: crate::common::validate::ConstraintKind::MaxLength,
805 message: format!("{} (got {})", "value exceeds maximum length 4", len),
806 });
807 }
808 }
809 }
810 Ok(Self(value))
811 }
812}
813impl ExternalCategoryPurpose1Code {
814 #[allow(clippy::unreadable_literal)]
816 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
817 Self::try_from(value.into())
818 }
819}
820impl From<ExternalCategoryPurpose1Code> for String {
821 fn from(v: ExternalCategoryPurpose1Code) -> Self {
822 v.0
823 }
824}
825#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
828#[serde(transparent)]
829pub struct ExternalClearingSystemIdentification1Code(pub String);
830impl TryFrom<String> for ExternalClearingSystemIdentification1Code {
831 type Error = crate::common::validate::ConstraintError;
832 #[allow(clippy::unreadable_literal)]
833 fn try_from(value: String) -> Result<Self, Self::Error> {
834 {
835 let value: &str = &value;
836 {
837 let len = value.chars().count();
838 let violated = len < 1usize;
839 if violated {
840 return Err(crate::common::validate::ConstraintError {
841 kind: crate::common::validate::ConstraintKind::MinLength,
842 message: format!(
843 "{} (got {})",
844 "value is shorter than minimum length 1", len
845 ),
846 });
847 }
848 }
849 {
850 let len = value.chars().count();
851 let violated = len > 5usize;
852 if violated {
853 return Err(crate::common::validate::ConstraintError {
854 kind: crate::common::validate::ConstraintKind::MaxLength,
855 message: format!("{} (got {})", "value exceeds maximum length 5", len),
856 });
857 }
858 }
859 }
860 Ok(Self(value))
861 }
862}
863impl ExternalClearingSystemIdentification1Code {
864 #[allow(clippy::unreadable_literal)]
866 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
867 Self::try_from(value.into())
868 }
869}
870impl From<ExternalClearingSystemIdentification1Code> for String {
871 fn from(v: ExternalClearingSystemIdentification1Code) -> Self {
872 v.0
873 }
874}
875#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
878#[serde(transparent)]
879pub struct ExternalDiscountAmountType1Code(pub String);
880impl TryFrom<String> for ExternalDiscountAmountType1Code {
881 type Error = crate::common::validate::ConstraintError;
882 #[allow(clippy::unreadable_literal)]
883 fn try_from(value: String) -> Result<Self, Self::Error> {
884 {
885 let value: &str = &value;
886 {
887 let len = value.chars().count();
888 let violated = len < 1usize;
889 if violated {
890 return Err(crate::common::validate::ConstraintError {
891 kind: crate::common::validate::ConstraintKind::MinLength,
892 message: format!(
893 "{} (got {})",
894 "value is shorter than minimum length 1", len
895 ),
896 });
897 }
898 }
899 {
900 let len = value.chars().count();
901 let violated = len > 4usize;
902 if violated {
903 return Err(crate::common::validate::ConstraintError {
904 kind: crate::common::validate::ConstraintKind::MaxLength,
905 message: format!("{} (got {})", "value exceeds maximum length 4", len),
906 });
907 }
908 }
909 }
910 Ok(Self(value))
911 }
912}
913impl ExternalDiscountAmountType1Code {
914 #[allow(clippy::unreadable_literal)]
916 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
917 Self::try_from(value.into())
918 }
919}
920impl From<ExternalDiscountAmountType1Code> for String {
921 fn from(v: ExternalDiscountAmountType1Code) -> Self {
922 v.0
923 }
924}
925#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
928#[serde(transparent)]
929pub struct ExternalDocumentLineType1Code(pub String);
930impl TryFrom<String> for ExternalDocumentLineType1Code {
931 type Error = crate::common::validate::ConstraintError;
932 #[allow(clippy::unreadable_literal)]
933 fn try_from(value: String) -> Result<Self, Self::Error> {
934 {
935 let value: &str = &value;
936 {
937 let len = value.chars().count();
938 let violated = len < 1usize;
939 if violated {
940 return Err(crate::common::validate::ConstraintError {
941 kind: crate::common::validate::ConstraintKind::MinLength,
942 message: format!(
943 "{} (got {})",
944 "value is shorter than minimum length 1", len
945 ),
946 });
947 }
948 }
949 {
950 let len = value.chars().count();
951 let violated = len > 4usize;
952 if violated {
953 return Err(crate::common::validate::ConstraintError {
954 kind: crate::common::validate::ConstraintKind::MaxLength,
955 message: format!("{} (got {})", "value exceeds maximum length 4", len),
956 });
957 }
958 }
959 }
960 Ok(Self(value))
961 }
962}
963impl ExternalDocumentLineType1Code {
964 #[allow(clippy::unreadable_literal)]
966 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
967 Self::try_from(value.into())
968 }
969}
970impl From<ExternalDocumentLineType1Code> for String {
971 fn from(v: ExternalDocumentLineType1Code) -> Self {
972 v.0
973 }
974}
975#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
978#[serde(transparent)]
979pub struct ExternalFinancialInstitutionIdentification1Code(pub String);
980impl TryFrom<String> for ExternalFinancialInstitutionIdentification1Code {
981 type Error = crate::common::validate::ConstraintError;
982 #[allow(clippy::unreadable_literal)]
983 fn try_from(value: String) -> Result<Self, Self::Error> {
984 {
985 let value: &str = &value;
986 {
987 let len = value.chars().count();
988 let violated = len < 1usize;
989 if violated {
990 return Err(crate::common::validate::ConstraintError {
991 kind: crate::common::validate::ConstraintKind::MinLength,
992 message: format!(
993 "{} (got {})",
994 "value is shorter than minimum length 1", len
995 ),
996 });
997 }
998 }
999 {
1000 let len = value.chars().count();
1001 let violated = len > 4usize;
1002 if violated {
1003 return Err(crate::common::validate::ConstraintError {
1004 kind: crate::common::validate::ConstraintKind::MaxLength,
1005 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1006 });
1007 }
1008 }
1009 }
1010 Ok(Self(value))
1011 }
1012}
1013impl ExternalFinancialInstitutionIdentification1Code {
1014 #[allow(clippy::unreadable_literal)]
1016 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1017 Self::try_from(value.into())
1018 }
1019}
1020impl From<ExternalFinancialInstitutionIdentification1Code> for String {
1021 fn from(v: ExternalFinancialInstitutionIdentification1Code) -> Self {
1022 v.0
1023 }
1024}
1025#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1028#[serde(transparent)]
1029pub struct ExternalGarnishmentType1Code(pub String);
1030impl TryFrom<String> for ExternalGarnishmentType1Code {
1031 type Error = crate::common::validate::ConstraintError;
1032 #[allow(clippy::unreadable_literal)]
1033 fn try_from(value: String) -> Result<Self, Self::Error> {
1034 {
1035 let value: &str = &value;
1036 {
1037 let len = value.chars().count();
1038 let violated = len < 1usize;
1039 if violated {
1040 return Err(crate::common::validate::ConstraintError {
1041 kind: crate::common::validate::ConstraintKind::MinLength,
1042 message: format!(
1043 "{} (got {})",
1044 "value is shorter than minimum length 1", len
1045 ),
1046 });
1047 }
1048 }
1049 {
1050 let len = value.chars().count();
1051 let violated = len > 4usize;
1052 if violated {
1053 return Err(crate::common::validate::ConstraintError {
1054 kind: crate::common::validate::ConstraintKind::MaxLength,
1055 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1056 });
1057 }
1058 }
1059 }
1060 Ok(Self(value))
1061 }
1062}
1063impl ExternalGarnishmentType1Code {
1064 #[allow(clippy::unreadable_literal)]
1066 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1067 Self::try_from(value.into())
1068 }
1069}
1070impl From<ExternalGarnishmentType1Code> for String {
1071 fn from(v: ExternalGarnishmentType1Code) -> Self {
1072 v.0
1073 }
1074}
1075#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1078#[serde(transparent)]
1079pub struct ExternalLocalInstrument1Code(pub String);
1080impl TryFrom<String> for ExternalLocalInstrument1Code {
1081 type Error = crate::common::validate::ConstraintError;
1082 #[allow(clippy::unreadable_literal)]
1083 fn try_from(value: String) -> Result<Self, Self::Error> {
1084 {
1085 let value: &str = &value;
1086 {
1087 let len = value.chars().count();
1088 let violated = len < 1usize;
1089 if violated {
1090 return Err(crate::common::validate::ConstraintError {
1091 kind: crate::common::validate::ConstraintKind::MinLength,
1092 message: format!(
1093 "{} (got {})",
1094 "value is shorter than minimum length 1", len
1095 ),
1096 });
1097 }
1098 }
1099 {
1100 let len = value.chars().count();
1101 let violated = len > 35usize;
1102 if violated {
1103 return Err(crate::common::validate::ConstraintError {
1104 kind: crate::common::validate::ConstraintKind::MaxLength,
1105 message: format!("{} (got {})", "value exceeds maximum length 35", len),
1106 });
1107 }
1108 }
1109 }
1110 Ok(Self(value))
1111 }
1112}
1113impl ExternalLocalInstrument1Code {
1114 #[allow(clippy::unreadable_literal)]
1116 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1117 Self::try_from(value.into())
1118 }
1119}
1120impl From<ExternalLocalInstrument1Code> for String {
1121 fn from(v: ExternalLocalInstrument1Code) -> Self {
1122 v.0
1123 }
1124}
1125#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1128#[serde(transparent)]
1129pub struct ExternalMandateSetupReason1Code(pub String);
1130impl TryFrom<String> for ExternalMandateSetupReason1Code {
1131 type Error = crate::common::validate::ConstraintError;
1132 #[allow(clippy::unreadable_literal)]
1133 fn try_from(value: String) -> Result<Self, Self::Error> {
1134 {
1135 let value: &str = &value;
1136 {
1137 let len = value.chars().count();
1138 let violated = len < 1usize;
1139 if violated {
1140 return Err(crate::common::validate::ConstraintError {
1141 kind: crate::common::validate::ConstraintKind::MinLength,
1142 message: format!(
1143 "{} (got {})",
1144 "value is shorter than minimum length 1", len
1145 ),
1146 });
1147 }
1148 }
1149 {
1150 let len = value.chars().count();
1151 let violated = len > 4usize;
1152 if violated {
1153 return Err(crate::common::validate::ConstraintError {
1154 kind: crate::common::validate::ConstraintKind::MaxLength,
1155 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1156 });
1157 }
1158 }
1159 }
1160 Ok(Self(value))
1161 }
1162}
1163impl ExternalMandateSetupReason1Code {
1164 #[allow(clippy::unreadable_literal)]
1166 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1167 Self::try_from(value.into())
1168 }
1169}
1170impl From<ExternalMandateSetupReason1Code> for String {
1171 fn from(v: ExternalMandateSetupReason1Code) -> Self {
1172 v.0
1173 }
1174}
1175#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1178#[serde(transparent)]
1179pub struct ExternalOrganisationIdentification1Code(pub String);
1180impl TryFrom<String> for ExternalOrganisationIdentification1Code {
1181 type Error = crate::common::validate::ConstraintError;
1182 #[allow(clippy::unreadable_literal)]
1183 fn try_from(value: String) -> Result<Self, Self::Error> {
1184 {
1185 let value: &str = &value;
1186 {
1187 let len = value.chars().count();
1188 let violated = len < 1usize;
1189 if violated {
1190 return Err(crate::common::validate::ConstraintError {
1191 kind: crate::common::validate::ConstraintKind::MinLength,
1192 message: format!(
1193 "{} (got {})",
1194 "value is shorter than minimum length 1", len
1195 ),
1196 });
1197 }
1198 }
1199 {
1200 let len = value.chars().count();
1201 let violated = len > 4usize;
1202 if violated {
1203 return Err(crate::common::validate::ConstraintError {
1204 kind: crate::common::validate::ConstraintKind::MaxLength,
1205 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1206 });
1207 }
1208 }
1209 }
1210 Ok(Self(value))
1211 }
1212}
1213impl ExternalOrganisationIdentification1Code {
1214 #[allow(clippy::unreadable_literal)]
1216 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1217 Self::try_from(value.into())
1218 }
1219}
1220impl From<ExternalOrganisationIdentification1Code> for String {
1221 fn from(v: ExternalOrganisationIdentification1Code) -> Self {
1222 v.0
1223 }
1224}
1225#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1228#[serde(transparent)]
1229pub struct ExternalPersonIdentification1Code(pub String);
1230impl TryFrom<String> for ExternalPersonIdentification1Code {
1231 type Error = crate::common::validate::ConstraintError;
1232 #[allow(clippy::unreadable_literal)]
1233 fn try_from(value: String) -> Result<Self, Self::Error> {
1234 {
1235 let value: &str = &value;
1236 {
1237 let len = value.chars().count();
1238 let violated = len < 1usize;
1239 if violated {
1240 return Err(crate::common::validate::ConstraintError {
1241 kind: crate::common::validate::ConstraintKind::MinLength,
1242 message: format!(
1243 "{} (got {})",
1244 "value is shorter than minimum length 1", len
1245 ),
1246 });
1247 }
1248 }
1249 {
1250 let len = value.chars().count();
1251 let violated = len > 4usize;
1252 if violated {
1253 return Err(crate::common::validate::ConstraintError {
1254 kind: crate::common::validate::ConstraintKind::MaxLength,
1255 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1256 });
1257 }
1258 }
1259 }
1260 Ok(Self(value))
1261 }
1262}
1263impl ExternalPersonIdentification1Code {
1264 #[allow(clippy::unreadable_literal)]
1266 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1267 Self::try_from(value.into())
1268 }
1269}
1270impl From<ExternalPersonIdentification1Code> for String {
1271 fn from(v: ExternalPersonIdentification1Code) -> Self {
1272 v.0
1273 }
1274}
1275#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1278#[serde(transparent)]
1279pub struct ExternalProxyAccountType1Code(pub String);
1280impl TryFrom<String> for ExternalProxyAccountType1Code {
1281 type Error = crate::common::validate::ConstraintError;
1282 #[allow(clippy::unreadable_literal)]
1283 fn try_from(value: String) -> Result<Self, Self::Error> {
1284 {
1285 let value: &str = &value;
1286 {
1287 let len = value.chars().count();
1288 let violated = len < 1usize;
1289 if violated {
1290 return Err(crate::common::validate::ConstraintError {
1291 kind: crate::common::validate::ConstraintKind::MinLength,
1292 message: format!(
1293 "{} (got {})",
1294 "value is shorter than minimum length 1", len
1295 ),
1296 });
1297 }
1298 }
1299 {
1300 let len = value.chars().count();
1301 let violated = len > 4usize;
1302 if violated {
1303 return Err(crate::common::validate::ConstraintError {
1304 kind: crate::common::validate::ConstraintKind::MaxLength,
1305 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1306 });
1307 }
1308 }
1309 }
1310 Ok(Self(value))
1311 }
1312}
1313impl ExternalProxyAccountType1Code {
1314 #[allow(clippy::unreadable_literal)]
1316 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1317 Self::try_from(value.into())
1318 }
1319}
1320impl From<ExternalProxyAccountType1Code> for String {
1321 fn from(v: ExternalProxyAccountType1Code) -> Self {
1322 v.0
1323 }
1324}
1325#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1328#[serde(transparent)]
1329pub struct ExternalPurpose1Code(pub String);
1330impl TryFrom<String> for ExternalPurpose1Code {
1331 type Error = crate::common::validate::ConstraintError;
1332 #[allow(clippy::unreadable_literal)]
1333 fn try_from(value: String) -> Result<Self, Self::Error> {
1334 {
1335 let value: &str = &value;
1336 {
1337 let len = value.chars().count();
1338 let violated = len < 1usize;
1339 if violated {
1340 return Err(crate::common::validate::ConstraintError {
1341 kind: crate::common::validate::ConstraintKind::MinLength,
1342 message: format!(
1343 "{} (got {})",
1344 "value is shorter than minimum length 1", len
1345 ),
1346 });
1347 }
1348 }
1349 {
1350 let len = value.chars().count();
1351 let violated = len > 4usize;
1352 if violated {
1353 return Err(crate::common::validate::ConstraintError {
1354 kind: crate::common::validate::ConstraintKind::MaxLength,
1355 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1356 });
1357 }
1358 }
1359 }
1360 Ok(Self(value))
1361 }
1362}
1363impl ExternalPurpose1Code {
1364 #[allow(clippy::unreadable_literal)]
1366 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1367 Self::try_from(value.into())
1368 }
1369}
1370impl From<ExternalPurpose1Code> for String {
1371 fn from(v: ExternalPurpose1Code) -> Self {
1372 v.0
1373 }
1374}
1375#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1378#[serde(transparent)]
1379pub struct ExternalServiceLevel1Code(pub String);
1380impl TryFrom<String> for ExternalServiceLevel1Code {
1381 type Error = crate::common::validate::ConstraintError;
1382 #[allow(clippy::unreadable_literal)]
1383 fn try_from(value: String) -> Result<Self, Self::Error> {
1384 {
1385 let value: &str = &value;
1386 {
1387 let len = value.chars().count();
1388 let violated = len < 1usize;
1389 if violated {
1390 return Err(crate::common::validate::ConstraintError {
1391 kind: crate::common::validate::ConstraintKind::MinLength,
1392 message: format!(
1393 "{} (got {})",
1394 "value is shorter than minimum length 1", len
1395 ),
1396 });
1397 }
1398 }
1399 {
1400 let len = value.chars().count();
1401 let violated = len > 4usize;
1402 if violated {
1403 return Err(crate::common::validate::ConstraintError {
1404 kind: crate::common::validate::ConstraintKind::MaxLength,
1405 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1406 });
1407 }
1408 }
1409 }
1410 Ok(Self(value))
1411 }
1412}
1413impl ExternalServiceLevel1Code {
1414 #[allow(clippy::unreadable_literal)]
1416 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1417 Self::try_from(value.into())
1418 }
1419}
1420impl From<ExternalServiceLevel1Code> for String {
1421 fn from(v: ExternalServiceLevel1Code) -> Self {
1422 v.0
1423 }
1424}
1425#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1428#[serde(transparent)]
1429pub struct ExternalTaxAmountType1Code(pub String);
1430impl TryFrom<String> for ExternalTaxAmountType1Code {
1431 type Error = crate::common::validate::ConstraintError;
1432 #[allow(clippy::unreadable_literal)]
1433 fn try_from(value: String) -> Result<Self, Self::Error> {
1434 {
1435 let value: &str = &value;
1436 {
1437 let len = value.chars().count();
1438 let violated = len < 1usize;
1439 if violated {
1440 return Err(crate::common::validate::ConstraintError {
1441 kind: crate::common::validate::ConstraintKind::MinLength,
1442 message: format!(
1443 "{} (got {})",
1444 "value is shorter than minimum length 1", len
1445 ),
1446 });
1447 }
1448 }
1449 {
1450 let len = value.chars().count();
1451 let violated = len > 4usize;
1452 if violated {
1453 return Err(crate::common::validate::ConstraintError {
1454 kind: crate::common::validate::ConstraintKind::MaxLength,
1455 message: format!("{} (got {})", "value exceeds maximum length 4", len),
1456 });
1457 }
1458 }
1459 }
1460 Ok(Self(value))
1461 }
1462}
1463impl ExternalTaxAmountType1Code {
1464 #[allow(clippy::unreadable_literal)]
1466 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1467 Self::try_from(value.into())
1468 }
1469}
1470impl From<ExternalTaxAmountType1Code> for String {
1471 fn from(v: ExternalTaxAmountType1Code) -> Self {
1472 v.0
1473 }
1474}
1475#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1476pub enum Frequency6Code {
1477 #[serde(rename = "YEAR")]
1478 Year,
1479 #[serde(rename = "MNTH")]
1480 Mnth,
1481 #[serde(rename = "QURT")]
1482 Qurt,
1483 #[serde(rename = "MIAN")]
1484 Mian,
1485 #[serde(rename = "WEEK")]
1486 Week,
1487 #[serde(rename = "DAIL")]
1488 Dail,
1489 #[serde(rename = "ADHO")]
1490 Adho,
1491 #[serde(rename = "INDA")]
1492 Inda,
1493 #[serde(rename = "FRTN")]
1494 Frtn,
1495}
1496#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1498#[serde(transparent)]
1499pub struct IBAN2007Identifier(pub String);
1500impl TryFrom<String> for IBAN2007Identifier {
1501 type Error = crate::common::validate::ConstraintError;
1502 #[allow(clippy::unreadable_literal)]
1503 fn try_from(value: String) -> Result<Self, Self::Error> {
1504 {
1505 let value: &str = &value;
1506 {
1507 let violated = {
1508 let bytes = value.as_bytes();
1509 let len = bytes.len();
1510 let result: bool = (|| -> bool {
1511 let mut pos: usize = 0;
1512 if !(5usize..=34usize).contains(&len) {
1513 return true;
1514 }
1515 {
1516 let end = pos + 2usize;
1517 if end > len {
1518 return true;
1519 }
1520 for &b in &bytes[pos..end] {
1521 if !(65u8..=90u8).contains(&b) {
1522 return true;
1523 }
1524 }
1525 pos = end;
1526 }
1527 {
1528 let end = pos + 2usize;
1529 if end > len {
1530 return true;
1531 }
1532 for &b in &bytes[pos..end] {
1533 if !(48u8..=57u8).contains(&b) {
1534 return true;
1535 }
1536 }
1537 pos = end;
1538 }
1539 {
1540 let start = pos;
1541 let limit = if pos + 30usize < len {
1542 pos + 30usize
1543 } else {
1544 len
1545 };
1546 while pos < limit {
1547 let b = bytes[pos];
1548 if !(97u8..=122u8).contains(&b)
1549 && !(65u8..=90u8).contains(&b)
1550 && !(48u8..=57u8).contains(&b)
1551 {
1552 break;
1553 }
1554 pos += 1;
1555 }
1556 let matched = pos - start;
1557 if matched < 1usize {
1558 return true;
1559 }
1560 }
1561 if pos != len {
1562 return true;
1563 }
1564 false
1565 })();
1566 result
1567 };
1568 if violated {
1569 return Err(crate::common::validate::ConstraintError {
1570 kind: crate::common::validate::ConstraintKind::Pattern,
1571 message:
1572 "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
1573 .to_string(),
1574 });
1575 }
1576 }
1577 }
1578 Ok(Self(value))
1579 }
1580}
1581impl IBAN2007Identifier {
1582 #[allow(clippy::unreadable_literal)]
1584 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1585 Self::try_from(value.into())
1586 }
1587}
1588impl From<IBAN2007Identifier> for String {
1589 fn from(v: IBAN2007Identifier) -> Self {
1590 v.0
1591 }
1592}
1593#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1594#[serde(transparent)]
1595pub struct ISODate(pub String);
1596#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1597#[serde(transparent)]
1598pub struct ISODateTime(pub String);
1599#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1600#[serde(transparent)]
1601pub struct ISOYear(pub String);
1602#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1604#[serde(transparent)]
1605pub struct LEIIdentifier(pub String);
1606impl TryFrom<String> for LEIIdentifier {
1607 type Error = crate::common::validate::ConstraintError;
1608 #[allow(clippy::unreadable_literal)]
1609 fn try_from(value: String) -> Result<Self, Self::Error> {
1610 {
1611 let value: &str = &value;
1612 {
1613 let violated = {
1614 let bytes = value.as_bytes();
1615 bytes.len() != 20usize
1616 || ({
1617 let b = bytes[0usize];
1618 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1619 })
1620 || ({
1621 let b = bytes[1usize];
1622 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1623 })
1624 || ({
1625 let b = bytes[2usize];
1626 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1627 })
1628 || ({
1629 let b = bytes[3usize];
1630 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1631 })
1632 || ({
1633 let b = bytes[4usize];
1634 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1635 })
1636 || ({
1637 let b = bytes[5usize];
1638 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1639 })
1640 || ({
1641 let b = bytes[6usize];
1642 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1643 })
1644 || ({
1645 let b = bytes[7usize];
1646 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1647 })
1648 || ({
1649 let b = bytes[8usize];
1650 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1651 })
1652 || ({
1653 let b = bytes[9usize];
1654 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1655 })
1656 || ({
1657 let b = bytes[10usize];
1658 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1659 })
1660 || ({
1661 let b = bytes[11usize];
1662 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1663 })
1664 || ({
1665 let b = bytes[12usize];
1666 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1667 })
1668 || ({
1669 let b = bytes[13usize];
1670 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1671 })
1672 || ({
1673 let b = bytes[14usize];
1674 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1675 })
1676 || ({
1677 let b = bytes[15usize];
1678 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1679 })
1680 || ({
1681 let b = bytes[16usize];
1682 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1683 })
1684 || ({
1685 let b = bytes[17usize];
1686 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
1687 })
1688 || ({
1689 let b = bytes[18usize];
1690 !(48u8..=57u8).contains(&b)
1691 })
1692 || ({
1693 let b = bytes[19usize];
1694 !(48u8..=57u8).contains(&b)
1695 })
1696 };
1697 if violated {
1698 return Err(crate::common::validate::ConstraintError {
1699 kind: crate::common::validate::ConstraintKind::Pattern,
1700 message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}"
1701 .to_string(),
1702 });
1703 }
1704 }
1705 }
1706 Ok(Self(value))
1707 }
1708}
1709impl LEIIdentifier {
1710 #[allow(clippy::unreadable_literal)]
1712 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1713 Self::try_from(value.into())
1714 }
1715}
1716impl From<LEIIdentifier> for String {
1717 fn from(v: LEIIdentifier) -> Self {
1718 v.0
1719 }
1720}
1721#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1722pub enum MandateClassification1Code {
1723 #[serde(rename = "FIXE")]
1724 Fixe,
1725 #[serde(rename = "USGB")]
1726 Usgb,
1727 #[serde(rename = "VARI")]
1728 Vari,
1729}
1730#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1733#[serde(transparent)]
1734pub struct Max1025Text(pub String);
1735impl TryFrom<String> for Max1025Text {
1736 type Error = crate::common::validate::ConstraintError;
1737 #[allow(clippy::unreadable_literal)]
1738 fn try_from(value: String) -> Result<Self, Self::Error> {
1739 {
1740 let value: &str = &value;
1741 {
1742 let len = value.chars().count();
1743 let violated = len < 1usize;
1744 if violated {
1745 return Err(crate::common::validate::ConstraintError {
1746 kind: crate::common::validate::ConstraintKind::MinLength,
1747 message: format!(
1748 "{} (got {})",
1749 "value is shorter than minimum length 1", len
1750 ),
1751 });
1752 }
1753 }
1754 {
1755 let len = value.chars().count();
1756 let violated = len > 1025usize;
1757 if violated {
1758 return Err(crate::common::validate::ConstraintError {
1759 kind: crate::common::validate::ConstraintKind::MaxLength,
1760 message: format!("{} (got {})", "value exceeds maximum length 1025", len),
1761 });
1762 }
1763 }
1764 }
1765 Ok(Self(value))
1766 }
1767}
1768impl Max1025Text {
1769 #[allow(clippy::unreadable_literal)]
1771 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1772 Self::try_from(value.into())
1773 }
1774}
1775impl From<Max1025Text> for String {
1776 fn from(v: Max1025Text) -> Self {
1777 v.0
1778 }
1779}
1780#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1783#[serde(transparent)]
1784pub struct Max10KBinary(pub String);
1785impl TryFrom<String> for Max10KBinary {
1786 type Error = crate::common::validate::ConstraintError;
1787 #[allow(clippy::unreadable_literal)]
1788 fn try_from(value: String) -> Result<Self, Self::Error> {
1789 {
1790 let value: &str = &value;
1791 {
1792 let len = value.chars().count();
1793 let violated = len < 1usize;
1794 if violated {
1795 return Err(crate::common::validate::ConstraintError {
1796 kind: crate::common::validate::ConstraintKind::MinLength,
1797 message: format!(
1798 "{} (got {})",
1799 "value is shorter than minimum length 1", len
1800 ),
1801 });
1802 }
1803 }
1804 {
1805 let len = value.chars().count();
1806 let violated = len > 10240usize;
1807 if violated {
1808 return Err(crate::common::validate::ConstraintError {
1809 kind: crate::common::validate::ConstraintKind::MaxLength,
1810 message: format!("{} (got {})", "value exceeds maximum length 10240", len),
1811 });
1812 }
1813 }
1814 }
1815 Ok(Self(value))
1816 }
1817}
1818impl Max10KBinary {
1819 #[allow(clippy::unreadable_literal)]
1821 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1822 Self::try_from(value.into())
1823 }
1824}
1825impl From<Max10KBinary> for String {
1826 fn from(v: Max10KBinary) -> Self {
1827 v.0
1828 }
1829}
1830#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1833#[serde(transparent)]
1834pub struct Max128Text(pub String);
1835impl TryFrom<String> for Max128Text {
1836 type Error = crate::common::validate::ConstraintError;
1837 #[allow(clippy::unreadable_literal)]
1838 fn try_from(value: String) -> Result<Self, Self::Error> {
1839 {
1840 let value: &str = &value;
1841 {
1842 let len = value.chars().count();
1843 let violated = len < 1usize;
1844 if violated {
1845 return Err(crate::common::validate::ConstraintError {
1846 kind: crate::common::validate::ConstraintKind::MinLength,
1847 message: format!(
1848 "{} (got {})",
1849 "value is shorter than minimum length 1", len
1850 ),
1851 });
1852 }
1853 }
1854 {
1855 let len = value.chars().count();
1856 let violated = len > 128usize;
1857 if violated {
1858 return Err(crate::common::validate::ConstraintError {
1859 kind: crate::common::validate::ConstraintKind::MaxLength,
1860 message: format!("{} (got {})", "value exceeds maximum length 128", len),
1861 });
1862 }
1863 }
1864 }
1865 Ok(Self(value))
1866 }
1867}
1868impl Max128Text {
1869 #[allow(clippy::unreadable_literal)]
1871 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1872 Self::try_from(value.into())
1873 }
1874}
1875impl From<Max128Text> for String {
1876 fn from(v: Max128Text) -> Self {
1877 v.0
1878 }
1879}
1880#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1883#[serde(transparent)]
1884pub struct Max140Text(pub String);
1885impl TryFrom<String> for Max140Text {
1886 type Error = crate::common::validate::ConstraintError;
1887 #[allow(clippy::unreadable_literal)]
1888 fn try_from(value: String) -> Result<Self, Self::Error> {
1889 {
1890 let value: &str = &value;
1891 {
1892 let len = value.chars().count();
1893 let violated = len < 1usize;
1894 if violated {
1895 return Err(crate::common::validate::ConstraintError {
1896 kind: crate::common::validate::ConstraintKind::MinLength,
1897 message: format!(
1898 "{} (got {})",
1899 "value is shorter than minimum length 1", len
1900 ),
1901 });
1902 }
1903 }
1904 {
1905 let len = value.chars().count();
1906 let violated = len > 140usize;
1907 if violated {
1908 return Err(crate::common::validate::ConstraintError {
1909 kind: crate::common::validate::ConstraintKind::MaxLength,
1910 message: format!("{} (got {})", "value exceeds maximum length 140", len),
1911 });
1912 }
1913 }
1914 }
1915 Ok(Self(value))
1916 }
1917}
1918impl Max140Text {
1919 #[allow(clippy::unreadable_literal)]
1921 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1922 Self::try_from(value.into())
1923 }
1924}
1925impl From<Max140Text> for String {
1926 fn from(v: Max140Text) -> Self {
1927 v.0
1928 }
1929}
1930#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1932#[serde(transparent)]
1933pub struct Max15NumericText(pub String);
1934impl TryFrom<String> for Max15NumericText {
1935 type Error = crate::common::validate::ConstraintError;
1936 #[allow(clippy::unreadable_literal)]
1937 fn try_from(value: String) -> Result<Self, Self::Error> {
1938 {
1939 let value: &str = &value;
1940 {
1941 let violated = {
1942 let bytes = value.as_bytes();
1943 let len = bytes.len();
1944 let result: bool = (|| -> bool {
1945 let mut pos: usize = 0;
1946 if !(1usize..=15usize).contains(&len) {
1947 return true;
1948 }
1949 {
1950 let start = pos;
1951 let limit = if pos + 15usize < len {
1952 pos + 15usize
1953 } else {
1954 len
1955 };
1956 while pos < limit {
1957 let b = bytes[pos];
1958 if !(48u8..=57u8).contains(&b) {
1959 break;
1960 }
1961 pos += 1;
1962 }
1963 let matched = pos - start;
1964 if matched < 1usize {
1965 return true;
1966 }
1967 }
1968 if pos != len {
1969 return true;
1970 }
1971 false
1972 })();
1973 result
1974 };
1975 if violated {
1976 return Err(crate::common::validate::ConstraintError {
1977 kind: crate::common::validate::ConstraintKind::Pattern,
1978 message: "value does not match pattern [0-9]{1,15}".to_string(),
1979 });
1980 }
1981 }
1982 }
1983 Ok(Self(value))
1984 }
1985}
1986impl Max15NumericText {
1987 #[allow(clippy::unreadable_literal)]
1989 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
1990 Self::try_from(value.into())
1991 }
1992}
1993impl From<Max15NumericText> for String {
1994 fn from(v: Max15NumericText) -> Self {
1995 v.0
1996 }
1997}
1998#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2001#[serde(transparent)]
2002pub struct Max16Text(pub String);
2003impl TryFrom<String> for Max16Text {
2004 type Error = crate::common::validate::ConstraintError;
2005 #[allow(clippy::unreadable_literal)]
2006 fn try_from(value: String) -> Result<Self, Self::Error> {
2007 {
2008 let value: &str = &value;
2009 {
2010 let len = value.chars().count();
2011 let violated = len < 1usize;
2012 if violated {
2013 return Err(crate::common::validate::ConstraintError {
2014 kind: crate::common::validate::ConstraintKind::MinLength,
2015 message: format!(
2016 "{} (got {})",
2017 "value is shorter than minimum length 1", len
2018 ),
2019 });
2020 }
2021 }
2022 {
2023 let len = value.chars().count();
2024 let violated = len > 16usize;
2025 if violated {
2026 return Err(crate::common::validate::ConstraintError {
2027 kind: crate::common::validate::ConstraintKind::MaxLength,
2028 message: format!("{} (got {})", "value exceeds maximum length 16", len),
2029 });
2030 }
2031 }
2032 }
2033 Ok(Self(value))
2034 }
2035}
2036impl Max16Text {
2037 #[allow(clippy::unreadable_literal)]
2039 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2040 Self::try_from(value.into())
2041 }
2042}
2043impl From<Max16Text> for String {
2044 fn from(v: Max16Text) -> Self {
2045 v.0
2046 }
2047}
2048#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2051#[serde(transparent)]
2052pub struct Max2048Text(pub String);
2053impl TryFrom<String> for Max2048Text {
2054 type Error = crate::common::validate::ConstraintError;
2055 #[allow(clippy::unreadable_literal)]
2056 fn try_from(value: String) -> Result<Self, Self::Error> {
2057 {
2058 let value: &str = &value;
2059 {
2060 let len = value.chars().count();
2061 let violated = len < 1usize;
2062 if violated {
2063 return Err(crate::common::validate::ConstraintError {
2064 kind: crate::common::validate::ConstraintKind::MinLength,
2065 message: format!(
2066 "{} (got {})",
2067 "value is shorter than minimum length 1", len
2068 ),
2069 });
2070 }
2071 }
2072 {
2073 let len = value.chars().count();
2074 let violated = len > 2048usize;
2075 if violated {
2076 return Err(crate::common::validate::ConstraintError {
2077 kind: crate::common::validate::ConstraintKind::MaxLength,
2078 message: format!("{} (got {})", "value exceeds maximum length 2048", len),
2079 });
2080 }
2081 }
2082 }
2083 Ok(Self(value))
2084 }
2085}
2086impl Max2048Text {
2087 #[allow(clippy::unreadable_literal)]
2089 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2090 Self::try_from(value.into())
2091 }
2092}
2093impl From<Max2048Text> for String {
2094 fn from(v: Max2048Text) -> Self {
2095 v.0
2096 }
2097}
2098#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2101#[serde(transparent)]
2102pub struct Max34Text(pub String);
2103impl TryFrom<String> for Max34Text {
2104 type Error = crate::common::validate::ConstraintError;
2105 #[allow(clippy::unreadable_literal)]
2106 fn try_from(value: String) -> Result<Self, Self::Error> {
2107 {
2108 let value: &str = &value;
2109 {
2110 let len = value.chars().count();
2111 let violated = len < 1usize;
2112 if violated {
2113 return Err(crate::common::validate::ConstraintError {
2114 kind: crate::common::validate::ConstraintKind::MinLength,
2115 message: format!(
2116 "{} (got {})",
2117 "value is shorter than minimum length 1", len
2118 ),
2119 });
2120 }
2121 }
2122 {
2123 let len = value.chars().count();
2124 let violated = len > 34usize;
2125 if violated {
2126 return Err(crate::common::validate::ConstraintError {
2127 kind: crate::common::validate::ConstraintKind::MaxLength,
2128 message: format!("{} (got {})", "value exceeds maximum length 34", len),
2129 });
2130 }
2131 }
2132 }
2133 Ok(Self(value))
2134 }
2135}
2136impl Max34Text {
2137 #[allow(clippy::unreadable_literal)]
2139 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2140 Self::try_from(value.into())
2141 }
2142}
2143impl From<Max34Text> for String {
2144 fn from(v: Max34Text) -> Self {
2145 v.0
2146 }
2147}
2148#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2151#[serde(transparent)]
2152pub struct Max350Text(pub String);
2153impl TryFrom<String> for Max350Text {
2154 type Error = crate::common::validate::ConstraintError;
2155 #[allow(clippy::unreadable_literal)]
2156 fn try_from(value: String) -> Result<Self, Self::Error> {
2157 {
2158 let value: &str = &value;
2159 {
2160 let len = value.chars().count();
2161 let violated = len < 1usize;
2162 if violated {
2163 return Err(crate::common::validate::ConstraintError {
2164 kind: crate::common::validate::ConstraintKind::MinLength,
2165 message: format!(
2166 "{} (got {})",
2167 "value is shorter than minimum length 1", len
2168 ),
2169 });
2170 }
2171 }
2172 {
2173 let len = value.chars().count();
2174 let violated = len > 350usize;
2175 if violated {
2176 return Err(crate::common::validate::ConstraintError {
2177 kind: crate::common::validate::ConstraintKind::MaxLength,
2178 message: format!("{} (got {})", "value exceeds maximum length 350", len),
2179 });
2180 }
2181 }
2182 }
2183 Ok(Self(value))
2184 }
2185}
2186impl Max350Text {
2187 #[allow(clippy::unreadable_literal)]
2189 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2190 Self::try_from(value.into())
2191 }
2192}
2193impl From<Max350Text> for String {
2194 fn from(v: Max350Text) -> Self {
2195 v.0
2196 }
2197}
2198#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2201#[serde(transparent)]
2202pub struct Max35Text(pub String);
2203impl TryFrom<String> for Max35Text {
2204 type Error = crate::common::validate::ConstraintError;
2205 #[allow(clippy::unreadable_literal)]
2206 fn try_from(value: String) -> Result<Self, Self::Error> {
2207 {
2208 let value: &str = &value;
2209 {
2210 let len = value.chars().count();
2211 let violated = len < 1usize;
2212 if violated {
2213 return Err(crate::common::validate::ConstraintError {
2214 kind: crate::common::validate::ConstraintKind::MinLength,
2215 message: format!(
2216 "{} (got {})",
2217 "value is shorter than minimum length 1", len
2218 ),
2219 });
2220 }
2221 }
2222 {
2223 let len = value.chars().count();
2224 let violated = len > 35usize;
2225 if violated {
2226 return Err(crate::common::validate::ConstraintError {
2227 kind: crate::common::validate::ConstraintKind::MaxLength,
2228 message: format!("{} (got {})", "value exceeds maximum length 35", len),
2229 });
2230 }
2231 }
2232 }
2233 Ok(Self(value))
2234 }
2235}
2236impl Max35Text {
2237 #[allow(clippy::unreadable_literal)]
2239 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2240 Self::try_from(value.into())
2241 }
2242}
2243impl From<Max35Text> for String {
2244 fn from(v: Max35Text) -> Self {
2245 v.0
2246 }
2247}
2248#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2251#[serde(transparent)]
2252pub struct Max4Text(pub String);
2253impl TryFrom<String> for Max4Text {
2254 type Error = crate::common::validate::ConstraintError;
2255 #[allow(clippy::unreadable_literal)]
2256 fn try_from(value: String) -> Result<Self, Self::Error> {
2257 {
2258 let value: &str = &value;
2259 {
2260 let len = value.chars().count();
2261 let violated = len < 1usize;
2262 if violated {
2263 return Err(crate::common::validate::ConstraintError {
2264 kind: crate::common::validate::ConstraintKind::MinLength,
2265 message: format!(
2266 "{} (got {})",
2267 "value is shorter than minimum length 1", len
2268 ),
2269 });
2270 }
2271 }
2272 {
2273 let len = value.chars().count();
2274 let violated = len > 4usize;
2275 if violated {
2276 return Err(crate::common::validate::ConstraintError {
2277 kind: crate::common::validate::ConstraintKind::MaxLength,
2278 message: format!("{} (got {})", "value exceeds maximum length 4", len),
2279 });
2280 }
2281 }
2282 }
2283 Ok(Self(value))
2284 }
2285}
2286impl Max4Text {
2287 #[allow(clippy::unreadable_literal)]
2289 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2290 Self::try_from(value.into())
2291 }
2292}
2293impl From<Max4Text> for String {
2294 fn from(v: Max4Text) -> Self {
2295 v.0
2296 }
2297}
2298#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2301#[serde(transparent)]
2302pub struct Max70Text(pub String);
2303impl TryFrom<String> for Max70Text {
2304 type Error = crate::common::validate::ConstraintError;
2305 #[allow(clippy::unreadable_literal)]
2306 fn try_from(value: String) -> Result<Self, Self::Error> {
2307 {
2308 let value: &str = &value;
2309 {
2310 let len = value.chars().count();
2311 let violated = len < 1usize;
2312 if violated {
2313 return Err(crate::common::validate::ConstraintError {
2314 kind: crate::common::validate::ConstraintKind::MinLength,
2315 message: format!(
2316 "{} (got {})",
2317 "value is shorter than minimum length 1", len
2318 ),
2319 });
2320 }
2321 }
2322 {
2323 let len = value.chars().count();
2324 let violated = len > 70usize;
2325 if violated {
2326 return Err(crate::common::validate::ConstraintError {
2327 kind: crate::common::validate::ConstraintKind::MaxLength,
2328 message: format!("{} (got {})", "value exceeds maximum length 70", len),
2329 });
2330 }
2331 }
2332 }
2333 Ok(Self(value))
2334 }
2335}
2336impl Max70Text {
2337 #[allow(clippy::unreadable_literal)]
2339 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2340 Self::try_from(value.into())
2341 }
2342}
2343impl From<Max70Text> for String {
2344 fn from(v: Max70Text) -> Self {
2345 v.0
2346 }
2347}
2348#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2349pub enum NamePrefix2Code {
2350 #[serde(rename = "DOCT")]
2351 Doct,
2352 #[serde(rename = "MADM")]
2353 Madm,
2354 #[serde(rename = "MISS")]
2355 Miss,
2356 #[serde(rename = "MIST")]
2357 Mist,
2358 #[serde(rename = "MIKS")]
2359 Miks,
2360}
2361#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2364#[serde(transparent)]
2365pub struct Number(pub String);
2366impl TryFrom<String> for Number {
2367 type Error = crate::common::validate::ConstraintError;
2368 #[allow(clippy::unreadable_literal)]
2369 fn try_from(value: String) -> Result<Self, Self::Error> {
2370 {
2371 let value: &str = &value;
2372 {
2373 let frac_count = value.find('.').map_or(0, |dot| {
2374 value[dot + 1..]
2375 .chars()
2376 .filter(char::is_ascii_digit)
2377 .count()
2378 });
2379 let violated = frac_count > 0usize;
2380 if violated {
2381 return Err(crate::common::validate::ConstraintError {
2382 kind: crate::common::validate::ConstraintKind::FractionDigits,
2383 message: format!(
2384 "{} (got {})",
2385 "value exceeds maximum fraction digits 0", frac_count
2386 ),
2387 });
2388 }
2389 }
2390 {
2391 let digit_count = value.chars().filter(char::is_ascii_digit).count();
2392 let violated = digit_count > 18usize;
2393 if violated {
2394 return Err(crate::common::validate::ConstraintError {
2395 kind: crate::common::validate::ConstraintKind::TotalDigits,
2396 message: format!(
2397 "{} (got {})",
2398 "value exceeds maximum total digits 18", digit_count
2399 ),
2400 });
2401 }
2402 }
2403 }
2404 Ok(Self(value))
2405 }
2406}
2407impl Number {
2408 #[allow(clippy::unreadable_literal)]
2410 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2411 Self::try_from(value.into())
2412 }
2413}
2414impl From<Number> for String {
2415 fn from(v: Number) -> Self {
2416 v.0
2417 }
2418}
2419#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2420pub enum PaymentMethod4Code {
2421 #[serde(rename = "CHK")]
2422 Chk,
2423 #[serde(rename = "TRF")]
2424 Trf,
2425 #[serde(rename = "DD")]
2426 Dd,
2427 #[serde(rename = "TRA")]
2428 Tra,
2429}
2430#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2433#[serde(transparent)]
2434pub struct PercentageRate(pub String);
2435impl TryFrom<String> for PercentageRate {
2436 type Error = crate::common::validate::ConstraintError;
2437 #[allow(clippy::unreadable_literal)]
2438 fn try_from(value: String) -> Result<Self, Self::Error> {
2439 {
2440 let value: &str = &value;
2441 {
2442 let frac_count = value.find('.').map_or(0, |dot| {
2443 value[dot + 1..]
2444 .chars()
2445 .filter(char::is_ascii_digit)
2446 .count()
2447 });
2448 let violated = frac_count > 10usize;
2449 if violated {
2450 return Err(crate::common::validate::ConstraintError {
2451 kind: crate::common::validate::ConstraintKind::FractionDigits,
2452 message: format!(
2453 "{} (got {})",
2454 "value exceeds maximum fraction digits 10", frac_count
2455 ),
2456 });
2457 }
2458 }
2459 {
2460 let digit_count = value.chars().filter(char::is_ascii_digit).count();
2461 let violated = digit_count > 11usize;
2462 if violated {
2463 return Err(crate::common::validate::ConstraintError {
2464 kind: crate::common::validate::ConstraintKind::TotalDigits,
2465 message: format!(
2466 "{} (got {})",
2467 "value exceeds maximum total digits 11", digit_count
2468 ),
2469 });
2470 }
2471 }
2472 }
2473 Ok(Self(value))
2474 }
2475}
2476impl PercentageRate {
2477 #[allow(clippy::unreadable_literal)]
2479 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2480 Self::try_from(value.into())
2481 }
2482}
2483impl From<PercentageRate> for String {
2484 fn from(v: PercentageRate) -> Self {
2485 v.0
2486 }
2487}
2488#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2490#[serde(transparent)]
2491pub struct PhoneNumber(pub String);
2492impl TryFrom<String> for PhoneNumber {
2493 type Error = crate::common::validate::ConstraintError;
2494 #[allow(clippy::unreadable_literal)]
2495 fn try_from(value: String) -> Result<Self, Self::Error> {
2496 {
2497 let value: &str = &value;
2498 {
2499 let violated = {
2500 let bytes = value.as_bytes();
2501 let len = bytes.len();
2502 let result: bool = (|| -> bool {
2503 let mut pos: usize = 0;
2504 if !(4usize..=35usize).contains(&len) {
2505 return true;
2506 }
2507 if pos >= len || bytes[pos] != 43u8 {
2508 return true;
2509 }
2510 pos += 1;
2511 {
2512 let start = pos;
2513 let limit = if pos + 3usize < len {
2514 pos + 3usize
2515 } else {
2516 len
2517 };
2518 while pos < limit {
2519 let b = bytes[pos];
2520 if !(48u8..=57u8).contains(&b) {
2521 break;
2522 }
2523 pos += 1;
2524 }
2525 let matched = pos - start;
2526 if matched < 1usize {
2527 return true;
2528 }
2529 }
2530 if pos >= len || bytes[pos] != 45u8 {
2531 return true;
2532 }
2533 pos += 1;
2534 {
2535 let start = pos;
2536 let limit = if pos + 30usize < len {
2537 pos + 30usize
2538 } else {
2539 len
2540 };
2541 while pos < limit {
2542 let b = bytes[pos];
2543 if !(48u8..=57u8).contains(&b)
2544 && b != 40u8
2545 && b != 41u8
2546 && b != 43u8
2547 && b != 45u8
2548 {
2549 break;
2550 }
2551 pos += 1;
2552 }
2553 let matched = pos - start;
2554 if matched < 1usize {
2555 return true;
2556 }
2557 }
2558 if pos != len {
2559 return true;
2560 }
2561 false
2562 })();
2563 result
2564 };
2565 if violated {
2566 return Err(crate::common::validate::ConstraintError {
2567 kind: crate::common::validate::ConstraintKind::Pattern,
2568 message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
2569 .to_string(),
2570 });
2571 }
2572 }
2573 }
2574 Ok(Self(value))
2575 }
2576}
2577impl PhoneNumber {
2578 #[allow(clippy::unreadable_literal)]
2580 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2581 Self::try_from(value.into())
2582 }
2583}
2584impl From<PhoneNumber> for String {
2585 fn from(v: PhoneNumber) -> Self {
2586 v.0
2587 }
2588}
2589#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2590pub enum PreferredContactMethod1Code {
2591 #[serde(rename = "LETT")]
2592 Lett,
2593 #[serde(rename = "MAIL")]
2594 Mail,
2595 #[serde(rename = "PHON")]
2596 Phon,
2597 #[serde(rename = "FAXX")]
2598 Faxx,
2599 #[serde(rename = "CELL")]
2600 Cell,
2601}
2602#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2603pub enum Priority2Code {
2604 #[serde(rename = "HIGH")]
2605 High,
2606 #[serde(rename = "NORM")]
2607 Norm,
2608}
2609#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2610pub enum SequenceType3Code {
2611 #[serde(rename = "FRST")]
2612 Frst,
2613 #[serde(rename = "RCUR")]
2614 Rcur,
2615 #[serde(rename = "FNAL")]
2616 Fnal,
2617 #[serde(rename = "OOFF")]
2618 Ooff,
2619 #[serde(rename = "RPRE")]
2620 Rpre,
2621}
2622#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2623pub enum SettlementMethod1Code {
2624 #[serde(rename = "INDA")]
2625 Inda,
2626 #[serde(rename = "INGA")]
2627 Inga,
2628 #[serde(rename = "COVE")]
2629 Cove,
2630 #[serde(rename = "CLRG")]
2631 Clrg,
2632}
2633#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2634pub enum TaxRecordPeriod1Code {
2635 #[serde(rename = "MM01")]
2636 Mm01,
2637 #[serde(rename = "MM02")]
2638 Mm02,
2639 #[serde(rename = "MM03")]
2640 Mm03,
2641 #[serde(rename = "MM04")]
2642 Mm04,
2643 #[serde(rename = "MM05")]
2644 Mm05,
2645 #[serde(rename = "MM06")]
2646 Mm06,
2647 #[serde(rename = "MM07")]
2648 Mm07,
2649 #[serde(rename = "MM08")]
2650 Mm08,
2651 #[serde(rename = "MM09")]
2652 Mm09,
2653 #[serde(rename = "MM10")]
2654 Mm10,
2655 #[serde(rename = "MM11")]
2656 Mm11,
2657 #[serde(rename = "MM12")]
2658 Mm12,
2659 #[serde(rename = "QTR1")]
2660 Qtr1,
2661 #[serde(rename = "QTR2")]
2662 Qtr2,
2663 #[serde(rename = "QTR3")]
2664 Qtr3,
2665 #[serde(rename = "QTR4")]
2666 Qtr4,
2667 #[serde(rename = "HLF1")]
2668 Hlf1,
2669 #[serde(rename = "HLF2")]
2670 Hlf2,
2671}
2672#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2673#[serde(transparent)]
2674pub struct TrueFalseIndicator(pub bool);
2675#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2677#[serde(transparent)]
2678pub struct UUIDv4Identifier(pub String);
2679impl TryFrom<String> for UUIDv4Identifier {
2680 type Error = crate::common::validate::ConstraintError;
2681 #[allow(clippy::unreadable_literal)]
2682 fn try_from(value: String) -> Result<Self, Self::Error> {
2683 {
2684 let value: &str = &value;
2685 {
2686 let violated = {
2687 let bytes = value.as_bytes();
2688 bytes.len() != 36usize
2689 || ({
2690 let b = bytes[0usize];
2691 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2692 })
2693 || ({
2694 let b = bytes[1usize];
2695 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2696 })
2697 || ({
2698 let b = bytes[2usize];
2699 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2700 })
2701 || ({
2702 let b = bytes[3usize];
2703 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2704 })
2705 || ({
2706 let b = bytes[4usize];
2707 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2708 })
2709 || ({
2710 let b = bytes[5usize];
2711 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2712 })
2713 || ({
2714 let b = bytes[6usize];
2715 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2716 })
2717 || ({
2718 let b = bytes[7usize];
2719 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2720 })
2721 || bytes[8usize] != 45u8
2722 || ({
2723 let b = bytes[9usize];
2724 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2725 })
2726 || ({
2727 let b = bytes[10usize];
2728 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2729 })
2730 || ({
2731 let b = bytes[11usize];
2732 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2733 })
2734 || ({
2735 let b = bytes[12usize];
2736 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2737 })
2738 || bytes[13usize] != 45u8
2739 || bytes[14usize] != 52u8
2740 || ({
2741 let b = bytes[15usize];
2742 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2743 })
2744 || ({
2745 let b = bytes[16usize];
2746 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2747 })
2748 || ({
2749 let b = bytes[17usize];
2750 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2751 })
2752 || bytes[18usize] != 45u8
2753 || ({
2754 let b = bytes[19usize];
2755 b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
2756 })
2757 || ({
2758 let b = bytes[20usize];
2759 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2760 })
2761 || ({
2762 let b = bytes[21usize];
2763 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2764 })
2765 || ({
2766 let b = bytes[22usize];
2767 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2768 })
2769 || bytes[23usize] != 45u8
2770 || ({
2771 let b = bytes[24usize];
2772 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2773 })
2774 || ({
2775 let b = bytes[25usize];
2776 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2777 })
2778 || ({
2779 let b = bytes[26usize];
2780 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2781 })
2782 || ({
2783 let b = bytes[27usize];
2784 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2785 })
2786 || ({
2787 let b = bytes[28usize];
2788 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2789 })
2790 || ({
2791 let b = bytes[29usize];
2792 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2793 })
2794 || ({
2795 let b = bytes[30usize];
2796 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2797 })
2798 || ({
2799 let b = bytes[31usize];
2800 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2801 })
2802 || ({
2803 let b = bytes[32usize];
2804 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2805 })
2806 || ({
2807 let b = bytes[33usize];
2808 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2809 })
2810 || ({
2811 let b = bytes[34usize];
2812 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2813 })
2814 || ({
2815 let b = bytes[35usize];
2816 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
2817 })
2818 };
2819 if violated {
2820 return Err(crate::common::validate::ConstraintError {
2821 kind: crate::common::validate::ConstraintKind::Pattern,
2822 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}"
2823 .to_string(),
2824 });
2825 }
2826 }
2827 }
2828 Ok(Self(value))
2829 }
2830}
2831impl UUIDv4Identifier {
2832 #[allow(clippy::unreadable_literal)]
2834 pub fn new(value: impl Into<String>) -> Result<Self, crate::common::validate::ConstraintError> {
2835 Self::try_from(value.into())
2836 }
2837}
2838impl From<UUIDv4Identifier> for String {
2839 fn from(v: UUIDv4Identifier) -> Self {
2840 v.0
2841 }
2842}
2843#[allow(clippy::large_enum_variant)]
2844#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2845pub enum AccountIdentification4Choice {
2846 #[serde(rename = "IBAN")]
2847 IBAN(IBAN2007Identifier),
2848 #[serde(rename = "Othr")]
2849 Othr(GenericAccountIdentification1),
2850}
2851#[allow(clippy::large_enum_variant)]
2852#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2853pub enum AccountSchemeName1Choice {
2854 #[serde(rename = "Cd")]
2855 Cd(ExternalAccountIdentification1Code),
2856 #[serde(rename = "Prtry")]
2857 Prtry(Max35Text),
2858}
2859#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2860pub struct ActiveOrHistoricCurrencyAndAmount {
2861 #[serde(rename = "$value")]
2862 pub value: ActiveOrHistoricCurrencyAndAmountSimpleType,
2863 #[serde(rename = "@Ccy")]
2864 pub ccy: ActiveOrHistoricCurrencyCode,
2865}
2866#[allow(clippy::large_enum_variant)]
2867#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2868pub enum AddressType3Choice {
2869 #[serde(rename = "Cd")]
2870 Cd(AddressType2Code),
2871 #[serde(rename = "Prtry")]
2872 Prtry(GenericIdentification30),
2873}
2874#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2875pub struct AmendmentInformationDetails14 {
2876 #[serde(rename = "OrgnlMndtId")]
2877 #[serde(skip_serializing_if = "Option::is_none")]
2878 pub orgnl_mndt_id: Option<Max35Text>,
2879 #[serde(rename = "OrgnlCdtrSchmeId")]
2880 #[serde(skip_serializing_if = "Option::is_none")]
2881 pub orgnl_cdtr_schme_id: Option<PartyIdentification135>,
2882 #[serde(rename = "OrgnlCdtrAgt")]
2883 #[serde(skip_serializing_if = "Option::is_none")]
2884 pub orgnl_cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
2885 #[serde(rename = "OrgnlCdtrAgtAcct")]
2886 #[serde(skip_serializing_if = "Option::is_none")]
2887 pub orgnl_cdtr_agt_acct: Option<CashAccount40>,
2888 #[serde(rename = "OrgnlDbtr")]
2889 #[serde(skip_serializing_if = "Option::is_none")]
2890 pub orgnl_dbtr: Option<PartyIdentification135>,
2891 #[serde(rename = "OrgnlDbtrAcct")]
2892 #[serde(skip_serializing_if = "Option::is_none")]
2893 pub orgnl_dbtr_acct: Option<CashAccount40>,
2894 #[serde(rename = "OrgnlDbtrAgt")]
2895 #[serde(skip_serializing_if = "Option::is_none")]
2896 pub orgnl_dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
2897 #[serde(rename = "OrgnlDbtrAgtAcct")]
2898 #[serde(skip_serializing_if = "Option::is_none")]
2899 pub orgnl_dbtr_agt_acct: Option<CashAccount40>,
2900 #[serde(rename = "OrgnlFnlColltnDt")]
2901 #[serde(skip_serializing_if = "Option::is_none")]
2902 pub orgnl_fnl_colltn_dt: Option<ISODate>,
2903 #[serde(rename = "OrgnlFrqcy")]
2904 #[serde(skip_serializing_if = "Option::is_none")]
2905 pub orgnl_frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
2906 #[serde(rename = "OrgnlRsn")]
2907 #[serde(skip_serializing_if = "Option::is_none")]
2908 pub orgnl_rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
2909 #[serde(rename = "OrgnlTrckgDays")]
2910 #[serde(skip_serializing_if = "Option::is_none")]
2911 pub orgnl_trckg_days: Option<Exact2NumericText>,
2912}
2913#[allow(clippy::struct_field_names)]
2915#[derive(Default)]
2916pub struct AmendmentInformationDetails14Builder {
2917 orgnl_mndt_id: ::std::option::Option<Max35Text>,
2918 orgnl_cdtr_schme_id: ::std::option::Option<PartyIdentification135>,
2919 orgnl_cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
2920 orgnl_cdtr_agt_acct: ::std::option::Option<CashAccount40>,
2921 orgnl_dbtr: ::std::option::Option<PartyIdentification135>,
2922 orgnl_dbtr_acct: ::std::option::Option<CashAccount40>,
2923 orgnl_dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
2924 orgnl_dbtr_agt_acct: ::std::option::Option<CashAccount40>,
2925 orgnl_fnl_colltn_dt: ::std::option::Option<ISODate>,
2926 orgnl_frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
2927 orgnl_rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
2928 orgnl_trckg_days: ::std::option::Option<Exact2NumericText>,
2929}
2930impl AmendmentInformationDetails14Builder {
2931 #[must_use]
2933 pub fn orgnl_mndt_id(mut self, value: Max35Text) -> AmendmentInformationDetails14Builder {
2934 self.orgnl_mndt_id = ::std::option::Option::Some(value);
2935 self
2936 }
2937 #[must_use]
2939 pub fn orgnl_cdtr_schme_id(
2940 mut self,
2941 value: PartyIdentification135,
2942 ) -> AmendmentInformationDetails14Builder {
2943 self.orgnl_cdtr_schme_id = ::std::option::Option::Some(value);
2944 self
2945 }
2946 #[must_use]
2948 pub fn orgnl_cdtr_agt(
2949 mut self,
2950 value: BranchAndFinancialInstitutionIdentification6,
2951 ) -> AmendmentInformationDetails14Builder {
2952 self.orgnl_cdtr_agt = ::std::option::Option::Some(value);
2953 self
2954 }
2955 #[must_use]
2957 pub fn orgnl_cdtr_agt_acct(
2958 mut self,
2959 value: CashAccount40,
2960 ) -> AmendmentInformationDetails14Builder {
2961 self.orgnl_cdtr_agt_acct = ::std::option::Option::Some(value);
2962 self
2963 }
2964 #[must_use]
2966 pub fn orgnl_dbtr(
2967 mut self,
2968 value: PartyIdentification135,
2969 ) -> AmendmentInformationDetails14Builder {
2970 self.orgnl_dbtr = ::std::option::Option::Some(value);
2971 self
2972 }
2973 #[must_use]
2975 pub fn orgnl_dbtr_acct(mut self, value: CashAccount40) -> AmendmentInformationDetails14Builder {
2976 self.orgnl_dbtr_acct = ::std::option::Option::Some(value);
2977 self
2978 }
2979 #[must_use]
2981 pub fn orgnl_dbtr_agt(
2982 mut self,
2983 value: BranchAndFinancialInstitutionIdentification6,
2984 ) -> AmendmentInformationDetails14Builder {
2985 self.orgnl_dbtr_agt = ::std::option::Option::Some(value);
2986 self
2987 }
2988 #[must_use]
2990 pub fn orgnl_dbtr_agt_acct(
2991 mut self,
2992 value: CashAccount40,
2993 ) -> AmendmentInformationDetails14Builder {
2994 self.orgnl_dbtr_agt_acct = ::std::option::Option::Some(value);
2995 self
2996 }
2997 #[must_use]
2999 pub fn orgnl_fnl_colltn_dt(mut self, value: ISODate) -> AmendmentInformationDetails14Builder {
3000 self.orgnl_fnl_colltn_dt = ::std::option::Option::Some(value);
3001 self
3002 }
3003 #[must_use]
3005 pub fn orgnl_frqcy(
3006 mut self,
3007 value: crate::common::ChoiceWrapper<Frequency36Choice>,
3008 ) -> AmendmentInformationDetails14Builder {
3009 self.orgnl_frqcy = ::std::option::Option::Some(value);
3010 self
3011 }
3012 #[must_use]
3014 pub fn orgnl_rsn(
3015 mut self,
3016 value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
3017 ) -> AmendmentInformationDetails14Builder {
3018 self.orgnl_rsn = ::std::option::Option::Some(value);
3019 self
3020 }
3021 #[must_use]
3023 pub fn orgnl_trckg_days(
3024 mut self,
3025 value: Exact2NumericText,
3026 ) -> AmendmentInformationDetails14Builder {
3027 self.orgnl_trckg_days = ::std::option::Option::Some(value);
3028 self
3029 }
3030 pub fn build(
3042 self,
3043 ) -> ::std::result::Result<AmendmentInformationDetails14, crate::common::BuilderError> {
3044 ::std::result::Result::Ok(AmendmentInformationDetails14 {
3045 orgnl_mndt_id: self.orgnl_mndt_id,
3046 orgnl_cdtr_schme_id: self.orgnl_cdtr_schme_id,
3047 orgnl_cdtr_agt: self.orgnl_cdtr_agt,
3048 orgnl_cdtr_agt_acct: self.orgnl_cdtr_agt_acct,
3049 orgnl_dbtr: self.orgnl_dbtr,
3050 orgnl_dbtr_acct: self.orgnl_dbtr_acct,
3051 orgnl_dbtr_agt: self.orgnl_dbtr_agt,
3052 orgnl_dbtr_agt_acct: self.orgnl_dbtr_agt_acct,
3053 orgnl_fnl_colltn_dt: self.orgnl_fnl_colltn_dt,
3054 orgnl_frqcy: self.orgnl_frqcy,
3055 orgnl_rsn: self.orgnl_rsn,
3056 orgnl_trckg_days: self.orgnl_trckg_days,
3057 })
3058 }
3059}
3060impl AmendmentInformationDetails14 {
3061 #[must_use]
3063 pub fn builder() -> AmendmentInformationDetails14Builder {
3064 AmendmentInformationDetails14Builder::default()
3065 }
3066}
3067#[allow(clippy::large_enum_variant)]
3068#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3069pub enum AmountType4Choice {
3070 #[serde(rename = "InstdAmt")]
3071 InstdAmt(ActiveOrHistoricCurrencyAndAmount),
3072 #[serde(rename = "EqvtAmt")]
3073 EqvtAmt(EquivalentAmount2),
3074}
3075#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3076pub struct BranchAndFinancialInstitutionIdentification6 {
3077 #[serde(rename = "FinInstnId")]
3078 pub fin_instn_id: FinancialInstitutionIdentification18,
3079 #[serde(rename = "BrnchId")]
3080 #[serde(skip_serializing_if = "Option::is_none")]
3081 pub brnch_id: Option<BranchData3>,
3082}
3083#[allow(clippy::struct_field_names)]
3085#[derive(Default)]
3086pub struct BranchAndFinancialInstitutionIdentification6Builder {
3087 fin_instn_id: ::std::option::Option<FinancialInstitutionIdentification18>,
3088 brnch_id: ::std::option::Option<BranchData3>,
3089}
3090impl BranchAndFinancialInstitutionIdentification6Builder {
3091 #[must_use]
3093 pub fn fin_instn_id(
3094 mut self,
3095 value: FinancialInstitutionIdentification18,
3096 ) -> BranchAndFinancialInstitutionIdentification6Builder {
3097 self.fin_instn_id = ::std::option::Option::Some(value);
3098 self
3099 }
3100 #[must_use]
3102 pub fn brnch_id(
3103 mut self,
3104 value: BranchData3,
3105 ) -> BranchAndFinancialInstitutionIdentification6Builder {
3106 self.brnch_id = ::std::option::Option::Some(value);
3107 self
3108 }
3109 pub fn build(
3121 self,
3122 ) -> ::std::result::Result<
3123 BranchAndFinancialInstitutionIdentification6,
3124 crate::common::BuilderError,
3125 > {
3126 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3127 if self.fin_instn_id.is_none() {
3128 missing.push("fin_instn_id".to_owned());
3129 }
3130 if !missing.is_empty() {
3131 return ::std::result::Result::Err(crate::common::BuilderError {
3132 type_name: "BranchAndFinancialInstitutionIdentification6".to_owned(),
3133 missing_fields: missing,
3134 });
3135 }
3136 ::std::result::Result::Ok(BranchAndFinancialInstitutionIdentification6 {
3137 fin_instn_id: self.fin_instn_id.unwrap(),
3138 brnch_id: self.brnch_id,
3139 })
3140 }
3141}
3142impl BranchAndFinancialInstitutionIdentification6 {
3143 #[must_use]
3145 pub fn builder() -> BranchAndFinancialInstitutionIdentification6Builder {
3146 BranchAndFinancialInstitutionIdentification6Builder::default()
3147 }
3148}
3149#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3150pub struct BranchData3 {
3151 #[serde(rename = "Id")]
3152 #[serde(skip_serializing_if = "Option::is_none")]
3153 pub id: Option<Max35Text>,
3154 #[serde(rename = "LEI")]
3155 #[serde(skip_serializing_if = "Option::is_none")]
3156 pub lei: Option<LEIIdentifier>,
3157 #[serde(rename = "Nm")]
3158 #[serde(skip_serializing_if = "Option::is_none")]
3159 pub nm: Option<Max140Text>,
3160 #[serde(rename = "PstlAdr")]
3161 #[serde(skip_serializing_if = "Option::is_none")]
3162 pub pstl_adr: Option<PostalAddress24>,
3163}
3164#[allow(clippy::struct_field_names)]
3166#[derive(Default)]
3167pub struct BranchData3Builder {
3168 id: ::std::option::Option<Max35Text>,
3169 lei: ::std::option::Option<LEIIdentifier>,
3170 nm: ::std::option::Option<Max140Text>,
3171 pstl_adr: ::std::option::Option<PostalAddress24>,
3172}
3173impl BranchData3Builder {
3174 #[must_use]
3176 pub fn id(mut self, value: Max35Text) -> BranchData3Builder {
3177 self.id = ::std::option::Option::Some(value);
3178 self
3179 }
3180 #[must_use]
3182 pub fn lei(mut self, value: LEIIdentifier) -> BranchData3Builder {
3183 self.lei = ::std::option::Option::Some(value);
3184 self
3185 }
3186 #[must_use]
3188 pub fn nm(mut self, value: Max140Text) -> BranchData3Builder {
3189 self.nm = ::std::option::Option::Some(value);
3190 self
3191 }
3192 #[must_use]
3194 pub fn pstl_adr(mut self, value: PostalAddress24) -> BranchData3Builder {
3195 self.pstl_adr = ::std::option::Option::Some(value);
3196 self
3197 }
3198 pub fn build(self) -> ::std::result::Result<BranchData3, crate::common::BuilderError> {
3210 ::std::result::Result::Ok(BranchData3 {
3211 id: self.id,
3212 lei: self.lei,
3213 nm: self.nm,
3214 pstl_adr: self.pstl_adr,
3215 })
3216 }
3217}
3218impl BranchData3 {
3219 #[must_use]
3221 pub fn builder() -> BranchData3Builder {
3222 BranchData3Builder::default()
3223 }
3224}
3225#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3226pub struct CashAccount40 {
3227 #[serde(rename = "Id")]
3228 #[serde(skip_serializing_if = "Option::is_none")]
3229 pub id: Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3230 #[serde(rename = "Tp")]
3231 #[serde(skip_serializing_if = "Option::is_none")]
3232 pub tp: Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3233 #[serde(rename = "Ccy")]
3234 #[serde(skip_serializing_if = "Option::is_none")]
3235 pub ccy: Option<ActiveOrHistoricCurrencyCode>,
3236 #[serde(rename = "Nm")]
3237 #[serde(skip_serializing_if = "Option::is_none")]
3238 pub nm: Option<Max70Text>,
3239 #[serde(rename = "Prxy")]
3240 #[serde(skip_serializing_if = "Option::is_none")]
3241 pub prxy: Option<ProxyAccountIdentification1>,
3242}
3243#[allow(clippy::struct_field_names)]
3245#[derive(Default)]
3246pub struct CashAccount40Builder {
3247 id: ::std::option::Option<crate::common::ChoiceWrapper<AccountIdentification4Choice>>,
3248 tp: ::std::option::Option<crate::common::ChoiceWrapper<CashAccountType2Choice>>,
3249 ccy: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
3250 nm: ::std::option::Option<Max70Text>,
3251 prxy: ::std::option::Option<ProxyAccountIdentification1>,
3252}
3253impl CashAccount40Builder {
3254 #[must_use]
3256 pub fn id(
3257 mut self,
3258 value: crate::common::ChoiceWrapper<AccountIdentification4Choice>,
3259 ) -> CashAccount40Builder {
3260 self.id = ::std::option::Option::Some(value);
3261 self
3262 }
3263 #[must_use]
3265 pub fn tp(
3266 mut self,
3267 value: crate::common::ChoiceWrapper<CashAccountType2Choice>,
3268 ) -> CashAccount40Builder {
3269 self.tp = ::std::option::Option::Some(value);
3270 self
3271 }
3272 #[must_use]
3274 pub fn ccy(mut self, value: ActiveOrHistoricCurrencyCode) -> CashAccount40Builder {
3275 self.ccy = ::std::option::Option::Some(value);
3276 self
3277 }
3278 #[must_use]
3280 pub fn nm(mut self, value: Max70Text) -> CashAccount40Builder {
3281 self.nm = ::std::option::Option::Some(value);
3282 self
3283 }
3284 #[must_use]
3286 pub fn prxy(mut self, value: ProxyAccountIdentification1) -> CashAccount40Builder {
3287 self.prxy = ::std::option::Option::Some(value);
3288 self
3289 }
3290 pub fn build(self) -> ::std::result::Result<CashAccount40, crate::common::BuilderError> {
3302 ::std::result::Result::Ok(CashAccount40 {
3303 id: self.id,
3304 tp: self.tp,
3305 ccy: self.ccy,
3306 nm: self.nm,
3307 prxy: self.prxy,
3308 })
3309 }
3310}
3311impl CashAccount40 {
3312 #[must_use]
3314 pub fn builder() -> CashAccount40Builder {
3315 CashAccount40Builder::default()
3316 }
3317}
3318#[allow(clippy::large_enum_variant)]
3319#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3320pub enum CashAccountType2Choice {
3321 #[serde(rename = "Cd")]
3322 Cd(ExternalCashAccountType1Code),
3323 #[serde(rename = "Prtry")]
3324 Prtry(Max35Text),
3325}
3326#[allow(clippy::large_enum_variant)]
3327#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3328pub enum CategoryPurpose1Choice {
3329 #[serde(rename = "Cd")]
3330 Cd(ExternalCategoryPurpose1Code),
3331 #[serde(rename = "Prtry")]
3332 Prtry(Max35Text),
3333}
3334#[allow(clippy::large_enum_variant)]
3335#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3336pub enum ClearingSystemIdentification2Choice {
3337 #[serde(rename = "Cd")]
3338 Cd(ExternalClearingSystemIdentification1Code),
3339 #[serde(rename = "Prtry")]
3340 Prtry(Max35Text),
3341}
3342#[allow(clippy::large_enum_variant)]
3343#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3344pub enum ClearingSystemIdentification3Choice {
3345 #[serde(rename = "Cd")]
3346 Cd(ExternalCashClearingSystem1Code),
3347 #[serde(rename = "Prtry")]
3348 Prtry(Max35Text),
3349}
3350#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3351pub struct ClearingSystemMemberIdentification2 {
3352 #[serde(rename = "ClrSysId")]
3353 #[serde(skip_serializing_if = "Option::is_none")]
3354 pub clr_sys_id: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3355 #[serde(rename = "MmbId")]
3356 pub mmb_id: Max35Text,
3357}
3358#[allow(clippy::struct_field_names)]
3360#[derive(Default)]
3361pub struct ClearingSystemMemberIdentification2Builder {
3362 clr_sys_id:
3363 ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>>,
3364 mmb_id: ::std::option::Option<Max35Text>,
3365}
3366impl ClearingSystemMemberIdentification2Builder {
3367 #[must_use]
3369 pub fn clr_sys_id(
3370 mut self,
3371 value: crate::common::ChoiceWrapper<ClearingSystemIdentification2Choice>,
3372 ) -> ClearingSystemMemberIdentification2Builder {
3373 self.clr_sys_id = ::std::option::Option::Some(value);
3374 self
3375 }
3376 #[must_use]
3378 pub fn mmb_id(mut self, value: Max35Text) -> ClearingSystemMemberIdentification2Builder {
3379 self.mmb_id = ::std::option::Option::Some(value);
3380 self
3381 }
3382 pub fn build(
3394 self,
3395 ) -> ::std::result::Result<ClearingSystemMemberIdentification2, crate::common::BuilderError>
3396 {
3397 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3398 if self.mmb_id.is_none() {
3399 missing.push("mmb_id".to_owned());
3400 }
3401 if !missing.is_empty() {
3402 return ::std::result::Result::Err(crate::common::BuilderError {
3403 type_name: "ClearingSystemMemberIdentification2".to_owned(),
3404 missing_fields: missing,
3405 });
3406 }
3407 ::std::result::Result::Ok(ClearingSystemMemberIdentification2 {
3408 clr_sys_id: self.clr_sys_id,
3409 mmb_id: self.mmb_id.unwrap(),
3410 })
3411 }
3412}
3413impl ClearingSystemMemberIdentification2 {
3414 #[must_use]
3416 pub fn builder() -> ClearingSystemMemberIdentification2Builder {
3417 ClearingSystemMemberIdentification2Builder::default()
3418 }
3419}
3420#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3421pub struct Contact4 {
3422 #[serde(rename = "NmPrfx")]
3423 #[serde(skip_serializing_if = "Option::is_none")]
3424 pub nm_prfx: Option<NamePrefix2Code>,
3425 #[serde(rename = "Nm")]
3426 #[serde(skip_serializing_if = "Option::is_none")]
3427 pub nm: Option<Max140Text>,
3428 #[serde(rename = "PhneNb")]
3429 #[serde(skip_serializing_if = "Option::is_none")]
3430 pub phne_nb: Option<PhoneNumber>,
3431 #[serde(rename = "MobNb")]
3432 #[serde(skip_serializing_if = "Option::is_none")]
3433 pub mob_nb: Option<PhoneNumber>,
3434 #[serde(rename = "FaxNb")]
3435 #[serde(skip_serializing_if = "Option::is_none")]
3436 pub fax_nb: Option<PhoneNumber>,
3437 #[serde(rename = "EmailAdr")]
3438 #[serde(skip_serializing_if = "Option::is_none")]
3439 pub email_adr: Option<Max2048Text>,
3440 #[serde(rename = "EmailPurp")]
3441 #[serde(skip_serializing_if = "Option::is_none")]
3442 pub email_purp: Option<Max35Text>,
3443 #[serde(rename = "JobTitl")]
3444 #[serde(skip_serializing_if = "Option::is_none")]
3445 pub job_titl: Option<Max35Text>,
3446 #[serde(rename = "Rspnsblty")]
3447 #[serde(skip_serializing_if = "Option::is_none")]
3448 pub rspnsblty: Option<Max35Text>,
3449 #[serde(rename = "Dept")]
3450 #[serde(skip_serializing_if = "Option::is_none")]
3451 pub dept: Option<Max70Text>,
3452 #[serde(rename = "Othr")]
3453 #[serde(default)]
3454 #[serde(skip_serializing_if = "Vec::is_empty")]
3455 pub othr: Vec<OtherContact1>,
3456 #[serde(rename = "PrefrdMtd")]
3457 #[serde(skip_serializing_if = "Option::is_none")]
3458 pub prefrd_mtd: Option<PreferredContactMethod1Code>,
3459}
3460#[allow(clippy::struct_field_names)]
3462#[derive(Default)]
3463pub struct Contact4Builder {
3464 nm_prfx: ::std::option::Option<NamePrefix2Code>,
3465 nm: ::std::option::Option<Max140Text>,
3466 phne_nb: ::std::option::Option<PhoneNumber>,
3467 mob_nb: ::std::option::Option<PhoneNumber>,
3468 fax_nb: ::std::option::Option<PhoneNumber>,
3469 email_adr: ::std::option::Option<Max2048Text>,
3470 email_purp: ::std::option::Option<Max35Text>,
3471 job_titl: ::std::option::Option<Max35Text>,
3472 rspnsblty: ::std::option::Option<Max35Text>,
3473 dept: ::std::option::Option<Max70Text>,
3474 othr: ::std::vec::Vec<OtherContact1>,
3475 prefrd_mtd: ::std::option::Option<PreferredContactMethod1Code>,
3476}
3477impl Contact4Builder {
3478 #[must_use]
3480 pub fn nm_prfx(mut self, value: NamePrefix2Code) -> Contact4Builder {
3481 self.nm_prfx = ::std::option::Option::Some(value);
3482 self
3483 }
3484 #[must_use]
3486 pub fn nm(mut self, value: Max140Text) -> Contact4Builder {
3487 self.nm = ::std::option::Option::Some(value);
3488 self
3489 }
3490 #[must_use]
3492 pub fn phne_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3493 self.phne_nb = ::std::option::Option::Some(value);
3494 self
3495 }
3496 #[must_use]
3498 pub fn mob_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3499 self.mob_nb = ::std::option::Option::Some(value);
3500 self
3501 }
3502 #[must_use]
3504 pub fn fax_nb(mut self, value: PhoneNumber) -> Contact4Builder {
3505 self.fax_nb = ::std::option::Option::Some(value);
3506 self
3507 }
3508 #[must_use]
3510 pub fn email_adr(mut self, value: Max2048Text) -> Contact4Builder {
3511 self.email_adr = ::std::option::Option::Some(value);
3512 self
3513 }
3514 #[must_use]
3516 pub fn email_purp(mut self, value: Max35Text) -> Contact4Builder {
3517 self.email_purp = ::std::option::Option::Some(value);
3518 self
3519 }
3520 #[must_use]
3522 pub fn job_titl(mut self, value: Max35Text) -> Contact4Builder {
3523 self.job_titl = ::std::option::Option::Some(value);
3524 self
3525 }
3526 #[must_use]
3528 pub fn rspnsblty(mut self, value: Max35Text) -> Contact4Builder {
3529 self.rspnsblty = ::std::option::Option::Some(value);
3530 self
3531 }
3532 #[must_use]
3534 pub fn dept(mut self, value: Max70Text) -> Contact4Builder {
3535 self.dept = ::std::option::Option::Some(value);
3536 self
3537 }
3538 #[must_use]
3540 pub fn othr(mut self, value: ::std::vec::Vec<OtherContact1>) -> Contact4Builder {
3541 self.othr = value;
3542 self
3543 }
3544 #[must_use]
3546 pub fn add_othr(mut self, value: OtherContact1) -> Contact4Builder {
3547 self.othr.push(value);
3548 self
3549 }
3550 #[must_use]
3552 pub fn prefrd_mtd(mut self, value: PreferredContactMethod1Code) -> Contact4Builder {
3553 self.prefrd_mtd = ::std::option::Option::Some(value);
3554 self
3555 }
3556 pub fn build(self) -> ::std::result::Result<Contact4, crate::common::BuilderError> {
3568 ::std::result::Result::Ok(Contact4 {
3569 nm_prfx: self.nm_prfx,
3570 nm: self.nm,
3571 phne_nb: self.phne_nb,
3572 mob_nb: self.mob_nb,
3573 fax_nb: self.fax_nb,
3574 email_adr: self.email_adr,
3575 email_purp: self.email_purp,
3576 job_titl: self.job_titl,
3577 rspnsblty: self.rspnsblty,
3578 dept: self.dept,
3579 othr: self.othr,
3580 prefrd_mtd: self.prefrd_mtd,
3581 })
3582 }
3583}
3584impl Contact4 {
3585 #[must_use]
3587 pub fn builder() -> Contact4Builder {
3588 Contact4Builder::default()
3589 }
3590}
3591#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3592pub struct CreditTransferMandateData1 {
3593 #[serde(rename = "MndtId")]
3594 #[serde(skip_serializing_if = "Option::is_none")]
3595 pub mndt_id: Option<Max35Text>,
3596 #[serde(rename = "Tp")]
3597 #[serde(skip_serializing_if = "Option::is_none")]
3598 pub tp: Option<MandateTypeInformation2>,
3599 #[serde(rename = "DtOfSgntr")]
3600 #[serde(skip_serializing_if = "Option::is_none")]
3601 pub dt_of_sgntr: Option<ISODate>,
3602 #[serde(rename = "DtOfVrfctn")]
3603 #[serde(skip_serializing_if = "Option::is_none")]
3604 pub dt_of_vrfctn: Option<ISODateTime>,
3605 #[serde(rename = "ElctrncSgntr")]
3606 #[serde(skip_serializing_if = "Option::is_none")]
3607 pub elctrnc_sgntr: Option<Max10KBinary>,
3608 #[serde(rename = "FrstPmtDt")]
3609 #[serde(skip_serializing_if = "Option::is_none")]
3610 pub frst_pmt_dt: Option<ISODate>,
3611 #[serde(rename = "FnlPmtDt")]
3612 #[serde(skip_serializing_if = "Option::is_none")]
3613 pub fnl_pmt_dt: Option<ISODate>,
3614 #[serde(rename = "Frqcy")]
3615 #[serde(skip_serializing_if = "Option::is_none")]
3616 pub frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
3617 #[serde(rename = "Rsn")]
3618 #[serde(skip_serializing_if = "Option::is_none")]
3619 pub rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
3620}
3621#[allow(clippy::struct_field_names)]
3623#[derive(Default)]
3624pub struct CreditTransferMandateData1Builder {
3625 mndt_id: ::std::option::Option<Max35Text>,
3626 tp: ::std::option::Option<MandateTypeInformation2>,
3627 dt_of_sgntr: ::std::option::Option<ISODate>,
3628 dt_of_vrfctn: ::std::option::Option<ISODateTime>,
3629 elctrnc_sgntr: ::std::option::Option<Max10KBinary>,
3630 frst_pmt_dt: ::std::option::Option<ISODate>,
3631 fnl_pmt_dt: ::std::option::Option<ISODate>,
3632 frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
3633 rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
3634}
3635impl CreditTransferMandateData1Builder {
3636 #[must_use]
3638 pub fn mndt_id(mut self, value: Max35Text) -> CreditTransferMandateData1Builder {
3639 self.mndt_id = ::std::option::Option::Some(value);
3640 self
3641 }
3642 #[must_use]
3644 pub fn tp(mut self, value: MandateTypeInformation2) -> CreditTransferMandateData1Builder {
3645 self.tp = ::std::option::Option::Some(value);
3646 self
3647 }
3648 #[must_use]
3650 pub fn dt_of_sgntr(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
3651 self.dt_of_sgntr = ::std::option::Option::Some(value);
3652 self
3653 }
3654 #[must_use]
3656 pub fn dt_of_vrfctn(mut self, value: ISODateTime) -> CreditTransferMandateData1Builder {
3657 self.dt_of_vrfctn = ::std::option::Option::Some(value);
3658 self
3659 }
3660 #[must_use]
3662 pub fn elctrnc_sgntr(mut self, value: Max10KBinary) -> CreditTransferMandateData1Builder {
3663 self.elctrnc_sgntr = ::std::option::Option::Some(value);
3664 self
3665 }
3666 #[must_use]
3668 pub fn frst_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
3669 self.frst_pmt_dt = ::std::option::Option::Some(value);
3670 self
3671 }
3672 #[must_use]
3674 pub fn fnl_pmt_dt(mut self, value: ISODate) -> CreditTransferMandateData1Builder {
3675 self.fnl_pmt_dt = ::std::option::Option::Some(value);
3676 self
3677 }
3678 #[must_use]
3680 pub fn frqcy(
3681 mut self,
3682 value: crate::common::ChoiceWrapper<Frequency36Choice>,
3683 ) -> CreditTransferMandateData1Builder {
3684 self.frqcy = ::std::option::Option::Some(value);
3685 self
3686 }
3687 #[must_use]
3689 pub fn rsn(
3690 mut self,
3691 value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
3692 ) -> CreditTransferMandateData1Builder {
3693 self.rsn = ::std::option::Option::Some(value);
3694 self
3695 }
3696 pub fn build(
3708 self,
3709 ) -> ::std::result::Result<CreditTransferMandateData1, crate::common::BuilderError> {
3710 ::std::result::Result::Ok(CreditTransferMandateData1 {
3711 mndt_id: self.mndt_id,
3712 tp: self.tp,
3713 dt_of_sgntr: self.dt_of_sgntr,
3714 dt_of_vrfctn: self.dt_of_vrfctn,
3715 elctrnc_sgntr: self.elctrnc_sgntr,
3716 frst_pmt_dt: self.frst_pmt_dt,
3717 fnl_pmt_dt: self.fnl_pmt_dt,
3718 frqcy: self.frqcy,
3719 rsn: self.rsn,
3720 })
3721 }
3722}
3723impl CreditTransferMandateData1 {
3724 #[must_use]
3726 pub fn builder() -> CreditTransferMandateData1Builder {
3727 CreditTransferMandateData1Builder::default()
3728 }
3729}
3730#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3731pub struct CreditorReferenceInformation2 {
3732 #[serde(rename = "Tp")]
3733 #[serde(skip_serializing_if = "Option::is_none")]
3734 pub tp: Option<CreditorReferenceType2>,
3735 #[serde(rename = "Ref")]
3736 #[serde(skip_serializing_if = "Option::is_none")]
3737 pub r#ref: Option<Max35Text>,
3738}
3739#[allow(clippy::struct_field_names)]
3741#[derive(Default)]
3742pub struct CreditorReferenceInformation2Builder {
3743 tp: ::std::option::Option<CreditorReferenceType2>,
3744 r#ref: ::std::option::Option<Max35Text>,
3745}
3746impl CreditorReferenceInformation2Builder {
3747 #[must_use]
3749 pub fn tp(mut self, value: CreditorReferenceType2) -> CreditorReferenceInformation2Builder {
3750 self.tp = ::std::option::Option::Some(value);
3751 self
3752 }
3753 #[must_use]
3755 pub fn r#ref(mut self, value: Max35Text) -> CreditorReferenceInformation2Builder {
3756 self.r#ref = ::std::option::Option::Some(value);
3757 self
3758 }
3759 pub fn build(
3771 self,
3772 ) -> ::std::result::Result<CreditorReferenceInformation2, crate::common::BuilderError> {
3773 ::std::result::Result::Ok(CreditorReferenceInformation2 {
3774 tp: self.tp,
3775 r#ref: self.r#ref,
3776 })
3777 }
3778}
3779impl CreditorReferenceInformation2 {
3780 #[must_use]
3782 pub fn builder() -> CreditorReferenceInformation2Builder {
3783 CreditorReferenceInformation2Builder::default()
3784 }
3785}
3786#[allow(clippy::large_enum_variant)]
3787#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3788pub enum CreditorReferenceType1Choice {
3789 #[serde(rename = "Cd")]
3790 Cd(DocumentType3Code),
3791 #[serde(rename = "Prtry")]
3792 Prtry(Max35Text),
3793}
3794#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3795pub struct CreditorReferenceType2 {
3796 #[serde(rename = "CdOrPrtry")]
3797 pub cd_or_prtry: crate::common::ChoiceWrapper<CreditorReferenceType1Choice>,
3798 #[serde(rename = "Issr")]
3799 #[serde(skip_serializing_if = "Option::is_none")]
3800 pub issr: Option<Max35Text>,
3801}
3802#[allow(clippy::struct_field_names)]
3804#[derive(Default)]
3805pub struct CreditorReferenceType2Builder {
3806 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<CreditorReferenceType1Choice>>,
3807 issr: ::std::option::Option<Max35Text>,
3808}
3809impl CreditorReferenceType2Builder {
3810 #[must_use]
3812 pub fn cd_or_prtry(
3813 mut self,
3814 value: crate::common::ChoiceWrapper<CreditorReferenceType1Choice>,
3815 ) -> CreditorReferenceType2Builder {
3816 self.cd_or_prtry = ::std::option::Option::Some(value);
3817 self
3818 }
3819 #[must_use]
3821 pub fn issr(mut self, value: Max35Text) -> CreditorReferenceType2Builder {
3822 self.issr = ::std::option::Option::Some(value);
3823 self
3824 }
3825 pub fn build(
3837 self,
3838 ) -> ::std::result::Result<CreditorReferenceType2, crate::common::BuilderError> {
3839 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3840 if self.cd_or_prtry.is_none() {
3841 missing.push("cd_or_prtry".to_owned());
3842 }
3843 if !missing.is_empty() {
3844 return ::std::result::Result::Err(crate::common::BuilderError {
3845 type_name: "CreditorReferenceType2".to_owned(),
3846 missing_fields: missing,
3847 });
3848 }
3849 ::std::result::Result::Ok(CreditorReferenceType2 {
3850 cd_or_prtry: self.cd_or_prtry.unwrap(),
3851 issr: self.issr,
3852 })
3853 }
3854}
3855impl CreditorReferenceType2 {
3856 #[must_use]
3858 pub fn builder() -> CreditorReferenceType2Builder {
3859 CreditorReferenceType2Builder::default()
3860 }
3861}
3862#[allow(clippy::large_enum_variant)]
3863#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3864pub enum DateAndDateTime2Choice {
3865 #[serde(rename = "Dt")]
3866 Dt(ISODate),
3867 #[serde(rename = "DtTm")]
3868 DtTm(ISODateTime),
3869}
3870#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3871pub struct DateAndPlaceOfBirth1 {
3872 #[serde(rename = "BirthDt")]
3873 pub birth_dt: ISODate,
3874 #[serde(rename = "PrvcOfBirth")]
3875 #[serde(skip_serializing_if = "Option::is_none")]
3876 pub prvc_of_birth: Option<Max35Text>,
3877 #[serde(rename = "CityOfBirth")]
3878 pub city_of_birth: Max35Text,
3879 #[serde(rename = "CtryOfBirth")]
3880 pub ctry_of_birth: CountryCode,
3881}
3882#[allow(clippy::struct_field_names)]
3884#[derive(Default)]
3885pub struct DateAndPlaceOfBirth1Builder {
3886 birth_dt: ::std::option::Option<ISODate>,
3887 prvc_of_birth: ::std::option::Option<Max35Text>,
3888 city_of_birth: ::std::option::Option<Max35Text>,
3889 ctry_of_birth: ::std::option::Option<CountryCode>,
3890}
3891impl DateAndPlaceOfBirth1Builder {
3892 #[must_use]
3894 pub fn birth_dt(mut self, value: ISODate) -> DateAndPlaceOfBirth1Builder {
3895 self.birth_dt = ::std::option::Option::Some(value);
3896 self
3897 }
3898 #[must_use]
3900 pub fn prvc_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
3901 self.prvc_of_birth = ::std::option::Option::Some(value);
3902 self
3903 }
3904 #[must_use]
3906 pub fn city_of_birth(mut self, value: Max35Text) -> DateAndPlaceOfBirth1Builder {
3907 self.city_of_birth = ::std::option::Option::Some(value);
3908 self
3909 }
3910 #[must_use]
3912 pub fn ctry_of_birth(mut self, value: CountryCode) -> DateAndPlaceOfBirth1Builder {
3913 self.ctry_of_birth = ::std::option::Option::Some(value);
3914 self
3915 }
3916 pub fn build(self) -> ::std::result::Result<DateAndPlaceOfBirth1, crate::common::BuilderError> {
3928 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3929 if self.birth_dt.is_none() {
3930 missing.push("birth_dt".to_owned());
3931 }
3932 if self.city_of_birth.is_none() {
3933 missing.push("city_of_birth".to_owned());
3934 }
3935 if self.ctry_of_birth.is_none() {
3936 missing.push("ctry_of_birth".to_owned());
3937 }
3938 if !missing.is_empty() {
3939 return ::std::result::Result::Err(crate::common::BuilderError {
3940 type_name: "DateAndPlaceOfBirth1".to_owned(),
3941 missing_fields: missing,
3942 });
3943 }
3944 ::std::result::Result::Ok(DateAndPlaceOfBirth1 {
3945 birth_dt: self.birth_dt.unwrap(),
3946 prvc_of_birth: self.prvc_of_birth,
3947 city_of_birth: self.city_of_birth.unwrap(),
3948 ctry_of_birth: self.ctry_of_birth.unwrap(),
3949 })
3950 }
3951}
3952impl DateAndPlaceOfBirth1 {
3953 #[must_use]
3955 pub fn builder() -> DateAndPlaceOfBirth1Builder {
3956 DateAndPlaceOfBirth1Builder::default()
3957 }
3958}
3959#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3960pub struct DatePeriod2 {
3961 #[serde(rename = "FrDt")]
3962 pub fr_dt: ISODate,
3963 #[serde(rename = "ToDt")]
3964 pub to_dt: ISODate,
3965}
3966#[allow(clippy::struct_field_names)]
3968#[derive(Default)]
3969pub struct DatePeriod2Builder {
3970 fr_dt: ::std::option::Option<ISODate>,
3971 to_dt: ::std::option::Option<ISODate>,
3972}
3973impl DatePeriod2Builder {
3974 #[must_use]
3976 pub fn fr_dt(mut self, value: ISODate) -> DatePeriod2Builder {
3977 self.fr_dt = ::std::option::Option::Some(value);
3978 self
3979 }
3980 #[must_use]
3982 pub fn to_dt(mut self, value: ISODate) -> DatePeriod2Builder {
3983 self.to_dt = ::std::option::Option::Some(value);
3984 self
3985 }
3986 pub fn build(self) -> ::std::result::Result<DatePeriod2, crate::common::BuilderError> {
3998 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
3999 if self.fr_dt.is_none() {
4000 missing.push("fr_dt".to_owned());
4001 }
4002 if self.to_dt.is_none() {
4003 missing.push("to_dt".to_owned());
4004 }
4005 if !missing.is_empty() {
4006 return ::std::result::Result::Err(crate::common::BuilderError {
4007 type_name: "DatePeriod2".to_owned(),
4008 missing_fields: missing,
4009 });
4010 }
4011 ::std::result::Result::Ok(DatePeriod2 {
4012 fr_dt: self.fr_dt.unwrap(),
4013 to_dt: self.to_dt.unwrap(),
4014 })
4015 }
4016}
4017impl DatePeriod2 {
4018 #[must_use]
4020 pub fn builder() -> DatePeriod2Builder {
4021 DatePeriod2Builder::default()
4022 }
4023}
4024#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4025pub struct DiscountAmountAndType1 {
4026 #[serde(rename = "Tp")]
4027 #[serde(skip_serializing_if = "Option::is_none")]
4028 pub tp: Option<crate::common::ChoiceWrapper<DiscountAmountType1Choice>>,
4029 #[serde(rename = "Amt")]
4030 pub amt: ActiveOrHistoricCurrencyAndAmount,
4031}
4032#[allow(clippy::struct_field_names)]
4034#[derive(Default)]
4035pub struct DiscountAmountAndType1Builder {
4036 tp: ::std::option::Option<crate::common::ChoiceWrapper<DiscountAmountType1Choice>>,
4037 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4038}
4039impl DiscountAmountAndType1Builder {
4040 #[must_use]
4042 pub fn tp(
4043 mut self,
4044 value: crate::common::ChoiceWrapper<DiscountAmountType1Choice>,
4045 ) -> DiscountAmountAndType1Builder {
4046 self.tp = ::std::option::Option::Some(value);
4047 self
4048 }
4049 #[must_use]
4051 pub fn amt(
4052 mut self,
4053 value: ActiveOrHistoricCurrencyAndAmount,
4054 ) -> DiscountAmountAndType1Builder {
4055 self.amt = ::std::option::Option::Some(value);
4056 self
4057 }
4058 pub fn build(
4070 self,
4071 ) -> ::std::result::Result<DiscountAmountAndType1, crate::common::BuilderError> {
4072 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4073 if self.amt.is_none() {
4074 missing.push("amt".to_owned());
4075 }
4076 if !missing.is_empty() {
4077 return ::std::result::Result::Err(crate::common::BuilderError {
4078 type_name: "DiscountAmountAndType1".to_owned(),
4079 missing_fields: missing,
4080 });
4081 }
4082 ::std::result::Result::Ok(DiscountAmountAndType1 {
4083 tp: self.tp,
4084 amt: self.amt.unwrap(),
4085 })
4086 }
4087}
4088impl DiscountAmountAndType1 {
4089 #[must_use]
4091 pub fn builder() -> DiscountAmountAndType1Builder {
4092 DiscountAmountAndType1Builder::default()
4093 }
4094}
4095#[allow(clippy::large_enum_variant)]
4096#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4097pub enum DiscountAmountType1Choice {
4098 #[serde(rename = "Cd")]
4099 Cd(ExternalDiscountAmountType1Code),
4100 #[serde(rename = "Prtry")]
4101 Prtry(Max35Text),
4102}
4103#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4104pub struct Document {
4105 #[serde(rename = "FIToFIPmtStsReq")]
4106 pub fi_to_fi_pmt_sts_req: FIToFIPaymentStatusRequestV05,
4107}
4108#[allow(clippy::struct_field_names)]
4110#[derive(Default)]
4111pub struct DocumentBuilder {
4112 fi_to_fi_pmt_sts_req: ::std::option::Option<FIToFIPaymentStatusRequestV05>,
4113}
4114impl DocumentBuilder {
4115 #[must_use]
4117 pub fn fi_to_fi_pmt_sts_req(mut self, value: FIToFIPaymentStatusRequestV05) -> DocumentBuilder {
4118 self.fi_to_fi_pmt_sts_req = ::std::option::Option::Some(value);
4119 self
4120 }
4121 pub fn build(self) -> ::std::result::Result<Document, crate::common::BuilderError> {
4133 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4134 if self.fi_to_fi_pmt_sts_req.is_none() {
4135 missing.push("fi_to_fi_pmt_sts_req".to_owned());
4136 }
4137 if !missing.is_empty() {
4138 return ::std::result::Result::Err(crate::common::BuilderError {
4139 type_name: "Document".to_owned(),
4140 missing_fields: missing,
4141 });
4142 }
4143 ::std::result::Result::Ok(Document {
4144 fi_to_fi_pmt_sts_req: self.fi_to_fi_pmt_sts_req.unwrap(),
4145 })
4146 }
4147}
4148impl Document {
4149 #[must_use]
4151 pub fn builder() -> DocumentBuilder {
4152 DocumentBuilder::default()
4153 }
4154}
4155#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4156pub struct DocumentAdjustment1 {
4157 #[serde(rename = "Amt")]
4158 pub amt: ActiveOrHistoricCurrencyAndAmount,
4159 #[serde(rename = "CdtDbtInd")]
4160 #[serde(skip_serializing_if = "Option::is_none")]
4161 pub cdt_dbt_ind: Option<CreditDebitCode>,
4162 #[serde(rename = "Rsn")]
4163 #[serde(skip_serializing_if = "Option::is_none")]
4164 pub rsn: Option<Max4Text>,
4165 #[serde(rename = "AddtlInf")]
4166 #[serde(skip_serializing_if = "Option::is_none")]
4167 pub addtl_inf: Option<Max140Text>,
4168}
4169#[allow(clippy::struct_field_names)]
4171#[derive(Default)]
4172pub struct DocumentAdjustment1Builder {
4173 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4174 cdt_dbt_ind: ::std::option::Option<CreditDebitCode>,
4175 rsn: ::std::option::Option<Max4Text>,
4176 addtl_inf: ::std::option::Option<Max140Text>,
4177}
4178impl DocumentAdjustment1Builder {
4179 #[must_use]
4181 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> DocumentAdjustment1Builder {
4182 self.amt = ::std::option::Option::Some(value);
4183 self
4184 }
4185 #[must_use]
4187 pub fn cdt_dbt_ind(mut self, value: CreditDebitCode) -> DocumentAdjustment1Builder {
4188 self.cdt_dbt_ind = ::std::option::Option::Some(value);
4189 self
4190 }
4191 #[must_use]
4193 pub fn rsn(mut self, value: Max4Text) -> DocumentAdjustment1Builder {
4194 self.rsn = ::std::option::Option::Some(value);
4195 self
4196 }
4197 #[must_use]
4199 pub fn addtl_inf(mut self, value: Max140Text) -> DocumentAdjustment1Builder {
4200 self.addtl_inf = ::std::option::Option::Some(value);
4201 self
4202 }
4203 pub fn build(self) -> ::std::result::Result<DocumentAdjustment1, crate::common::BuilderError> {
4215 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4216 if self.amt.is_none() {
4217 missing.push("amt".to_owned());
4218 }
4219 if !missing.is_empty() {
4220 return ::std::result::Result::Err(crate::common::BuilderError {
4221 type_name: "DocumentAdjustment1".to_owned(),
4222 missing_fields: missing,
4223 });
4224 }
4225 ::std::result::Result::Ok(DocumentAdjustment1 {
4226 amt: self.amt.unwrap(),
4227 cdt_dbt_ind: self.cdt_dbt_ind,
4228 rsn: self.rsn,
4229 addtl_inf: self.addtl_inf,
4230 })
4231 }
4232}
4233impl DocumentAdjustment1 {
4234 #[must_use]
4236 pub fn builder() -> DocumentAdjustment1Builder {
4237 DocumentAdjustment1Builder::default()
4238 }
4239}
4240#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4241pub struct DocumentLineIdentification1 {
4242 #[serde(rename = "Tp")]
4243 #[serde(skip_serializing_if = "Option::is_none")]
4244 pub tp: Option<DocumentLineType1>,
4245 #[serde(rename = "Nb")]
4246 #[serde(skip_serializing_if = "Option::is_none")]
4247 pub nb: Option<Max35Text>,
4248 #[serde(rename = "RltdDt")]
4249 #[serde(skip_serializing_if = "Option::is_none")]
4250 pub rltd_dt: Option<ISODate>,
4251}
4252#[allow(clippy::struct_field_names)]
4254#[derive(Default)]
4255pub struct DocumentLineIdentification1Builder {
4256 tp: ::std::option::Option<DocumentLineType1>,
4257 nb: ::std::option::Option<Max35Text>,
4258 rltd_dt: ::std::option::Option<ISODate>,
4259}
4260impl DocumentLineIdentification1Builder {
4261 #[must_use]
4263 pub fn tp(mut self, value: DocumentLineType1) -> DocumentLineIdentification1Builder {
4264 self.tp = ::std::option::Option::Some(value);
4265 self
4266 }
4267 #[must_use]
4269 pub fn nb(mut self, value: Max35Text) -> DocumentLineIdentification1Builder {
4270 self.nb = ::std::option::Option::Some(value);
4271 self
4272 }
4273 #[must_use]
4275 pub fn rltd_dt(mut self, value: ISODate) -> DocumentLineIdentification1Builder {
4276 self.rltd_dt = ::std::option::Option::Some(value);
4277 self
4278 }
4279 pub fn build(
4291 self,
4292 ) -> ::std::result::Result<DocumentLineIdentification1, crate::common::BuilderError> {
4293 ::std::result::Result::Ok(DocumentLineIdentification1 {
4294 tp: self.tp,
4295 nb: self.nb,
4296 rltd_dt: self.rltd_dt,
4297 })
4298 }
4299}
4300impl DocumentLineIdentification1 {
4301 #[must_use]
4303 pub fn builder() -> DocumentLineIdentification1Builder {
4304 DocumentLineIdentification1Builder::default()
4305 }
4306}
4307#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4308pub struct DocumentLineInformation1 {
4309 #[serde(rename = "Id")]
4310 #[serde(default)]
4311 #[serde(skip_serializing_if = "Vec::is_empty")]
4312 pub id: Vec<DocumentLineIdentification1>,
4313 #[serde(rename = "Desc")]
4314 #[serde(skip_serializing_if = "Option::is_none")]
4315 pub desc: Option<Max2048Text>,
4316 #[serde(rename = "Amt")]
4317 #[serde(skip_serializing_if = "Option::is_none")]
4318 pub amt: Option<RemittanceAmount3>,
4319}
4320#[allow(clippy::struct_field_names)]
4322#[derive(Default)]
4323pub struct DocumentLineInformation1Builder {
4324 id: ::std::vec::Vec<DocumentLineIdentification1>,
4325 desc: ::std::option::Option<Max2048Text>,
4326 amt: ::std::option::Option<RemittanceAmount3>,
4327}
4328impl DocumentLineInformation1Builder {
4329 #[must_use]
4331 pub fn id(
4332 mut self,
4333 value: ::std::vec::Vec<DocumentLineIdentification1>,
4334 ) -> DocumentLineInformation1Builder {
4335 self.id = value;
4336 self
4337 }
4338 #[must_use]
4340 pub fn add_id(mut self, value: DocumentLineIdentification1) -> DocumentLineInformation1Builder {
4341 self.id.push(value);
4342 self
4343 }
4344 #[must_use]
4346 pub fn desc(mut self, value: Max2048Text) -> DocumentLineInformation1Builder {
4347 self.desc = ::std::option::Option::Some(value);
4348 self
4349 }
4350 #[must_use]
4352 pub fn amt(mut self, value: RemittanceAmount3) -> DocumentLineInformation1Builder {
4353 self.amt = ::std::option::Option::Some(value);
4354 self
4355 }
4356 pub fn build(
4368 self,
4369 ) -> ::std::result::Result<DocumentLineInformation1, crate::common::BuilderError> {
4370 ::std::result::Result::Ok(DocumentLineInformation1 {
4371 id: self.id,
4372 desc: self.desc,
4373 amt: self.amt,
4374 })
4375 }
4376}
4377impl DocumentLineInformation1 {
4378 #[must_use]
4380 pub fn builder() -> DocumentLineInformation1Builder {
4381 DocumentLineInformation1Builder::default()
4382 }
4383}
4384#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4385pub struct DocumentLineType1 {
4386 #[serde(rename = "CdOrPrtry")]
4387 pub cd_or_prtry: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
4388 #[serde(rename = "Issr")]
4389 #[serde(skip_serializing_if = "Option::is_none")]
4390 pub issr: Option<Max35Text>,
4391}
4392#[allow(clippy::struct_field_names)]
4394#[derive(Default)]
4395pub struct DocumentLineType1Builder {
4396 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<DocumentLineType1Choice>>,
4397 issr: ::std::option::Option<Max35Text>,
4398}
4399impl DocumentLineType1Builder {
4400 #[must_use]
4402 pub fn cd_or_prtry(
4403 mut self,
4404 value: crate::common::ChoiceWrapper<DocumentLineType1Choice>,
4405 ) -> DocumentLineType1Builder {
4406 self.cd_or_prtry = ::std::option::Option::Some(value);
4407 self
4408 }
4409 #[must_use]
4411 pub fn issr(mut self, value: Max35Text) -> DocumentLineType1Builder {
4412 self.issr = ::std::option::Option::Some(value);
4413 self
4414 }
4415 pub fn build(self) -> ::std::result::Result<DocumentLineType1, crate::common::BuilderError> {
4427 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4428 if self.cd_or_prtry.is_none() {
4429 missing.push("cd_or_prtry".to_owned());
4430 }
4431 if !missing.is_empty() {
4432 return ::std::result::Result::Err(crate::common::BuilderError {
4433 type_name: "DocumentLineType1".to_owned(),
4434 missing_fields: missing,
4435 });
4436 }
4437 ::std::result::Result::Ok(DocumentLineType1 {
4438 cd_or_prtry: self.cd_or_prtry.unwrap(),
4439 issr: self.issr,
4440 })
4441 }
4442}
4443impl DocumentLineType1 {
4444 #[must_use]
4446 pub fn builder() -> DocumentLineType1Builder {
4447 DocumentLineType1Builder::default()
4448 }
4449}
4450#[allow(clippy::large_enum_variant)]
4451#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4452pub enum DocumentLineType1Choice {
4453 #[serde(rename = "Cd")]
4454 Cd(ExternalDocumentLineType1Code),
4455 #[serde(rename = "Prtry")]
4456 Prtry(Max35Text),
4457}
4458#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4459pub struct EquivalentAmount2 {
4460 #[serde(rename = "Amt")]
4461 pub amt: ActiveOrHistoricCurrencyAndAmount,
4462 #[serde(rename = "CcyOfTrf")]
4463 pub ccy_of_trf: ActiveOrHistoricCurrencyCode,
4464}
4465#[allow(clippy::struct_field_names)]
4467#[derive(Default)]
4468pub struct EquivalentAmount2Builder {
4469 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4470 ccy_of_trf: ::std::option::Option<ActiveOrHistoricCurrencyCode>,
4471}
4472impl EquivalentAmount2Builder {
4473 #[must_use]
4475 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> EquivalentAmount2Builder {
4476 self.amt = ::std::option::Option::Some(value);
4477 self
4478 }
4479 #[must_use]
4481 pub fn ccy_of_trf(mut self, value: ActiveOrHistoricCurrencyCode) -> EquivalentAmount2Builder {
4482 self.ccy_of_trf = ::std::option::Option::Some(value);
4483 self
4484 }
4485 pub fn build(self) -> ::std::result::Result<EquivalentAmount2, crate::common::BuilderError> {
4497 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4498 if self.amt.is_none() {
4499 missing.push("amt".to_owned());
4500 }
4501 if self.ccy_of_trf.is_none() {
4502 missing.push("ccy_of_trf".to_owned());
4503 }
4504 if !missing.is_empty() {
4505 return ::std::result::Result::Err(crate::common::BuilderError {
4506 type_name: "EquivalentAmount2".to_owned(),
4507 missing_fields: missing,
4508 });
4509 }
4510 ::std::result::Result::Ok(EquivalentAmount2 {
4511 amt: self.amt.unwrap(),
4512 ccy_of_trf: self.ccy_of_trf.unwrap(),
4513 })
4514 }
4515}
4516impl EquivalentAmount2 {
4517 #[must_use]
4519 pub fn builder() -> EquivalentAmount2Builder {
4520 EquivalentAmount2Builder::default()
4521 }
4522}
4523#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4524pub struct FIToFIPaymentStatusRequestV05 {
4525 #[serde(rename = "GrpHdr")]
4526 pub grp_hdr: GroupHeader91,
4527 #[serde(rename = "OrgnlGrpInf")]
4528 #[serde(default)]
4529 #[serde(skip_serializing_if = "Vec::is_empty")]
4530 pub orgnl_grp_inf: Vec<OriginalGroupInformation27>,
4531 #[serde(rename = "TxInf")]
4532 #[serde(default)]
4533 #[serde(skip_serializing_if = "Vec::is_empty")]
4534 pub tx_inf: Vec<PaymentTransaction131>,
4535 #[serde(rename = "SplmtryData")]
4536 #[serde(default)]
4537 #[serde(skip_serializing_if = "Vec::is_empty")]
4538 pub splmtry_data: Vec<SupplementaryData1>,
4539}
4540#[allow(clippy::struct_field_names)]
4542#[derive(Default)]
4543pub struct FIToFIPaymentStatusRequestV05Builder {
4544 grp_hdr: ::std::option::Option<GroupHeader91>,
4545 orgnl_grp_inf: ::std::vec::Vec<OriginalGroupInformation27>,
4546 tx_inf: ::std::vec::Vec<PaymentTransaction131>,
4547 splmtry_data: ::std::vec::Vec<SupplementaryData1>,
4548}
4549impl FIToFIPaymentStatusRequestV05Builder {
4550 #[must_use]
4552 pub fn grp_hdr(mut self, value: GroupHeader91) -> FIToFIPaymentStatusRequestV05Builder {
4553 self.grp_hdr = ::std::option::Option::Some(value);
4554 self
4555 }
4556 #[must_use]
4558 pub fn orgnl_grp_inf(
4559 mut self,
4560 value: ::std::vec::Vec<OriginalGroupInformation27>,
4561 ) -> FIToFIPaymentStatusRequestV05Builder {
4562 self.orgnl_grp_inf = value;
4563 self
4564 }
4565 #[must_use]
4567 pub fn add_orgnl_grp_inf(
4568 mut self,
4569 value: OriginalGroupInformation27,
4570 ) -> FIToFIPaymentStatusRequestV05Builder {
4571 self.orgnl_grp_inf.push(value);
4572 self
4573 }
4574 #[must_use]
4576 pub fn tx_inf(
4577 mut self,
4578 value: ::std::vec::Vec<PaymentTransaction131>,
4579 ) -> FIToFIPaymentStatusRequestV05Builder {
4580 self.tx_inf = value;
4581 self
4582 }
4583 #[must_use]
4585 pub fn add_tx_inf(
4586 mut self,
4587 value: PaymentTransaction131,
4588 ) -> FIToFIPaymentStatusRequestV05Builder {
4589 self.tx_inf.push(value);
4590 self
4591 }
4592 #[must_use]
4594 pub fn splmtry_data(
4595 mut self,
4596 value: ::std::vec::Vec<SupplementaryData1>,
4597 ) -> FIToFIPaymentStatusRequestV05Builder {
4598 self.splmtry_data = value;
4599 self
4600 }
4601 #[must_use]
4603 pub fn add_splmtry_data(
4604 mut self,
4605 value: SupplementaryData1,
4606 ) -> FIToFIPaymentStatusRequestV05Builder {
4607 self.splmtry_data.push(value);
4608 self
4609 }
4610 pub fn build(
4622 self,
4623 ) -> ::std::result::Result<FIToFIPaymentStatusRequestV05, crate::common::BuilderError> {
4624 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4625 if self.grp_hdr.is_none() {
4626 missing.push("grp_hdr".to_owned());
4627 }
4628 if !missing.is_empty() {
4629 return ::std::result::Result::Err(crate::common::BuilderError {
4630 type_name: "FIToFIPaymentStatusRequestV05".to_owned(),
4631 missing_fields: missing,
4632 });
4633 }
4634 ::std::result::Result::Ok(FIToFIPaymentStatusRequestV05 {
4635 grp_hdr: self.grp_hdr.unwrap(),
4636 orgnl_grp_inf: self.orgnl_grp_inf,
4637 tx_inf: self.tx_inf,
4638 splmtry_data: self.splmtry_data,
4639 })
4640 }
4641}
4642impl FIToFIPaymentStatusRequestV05 {
4643 #[must_use]
4645 pub fn builder() -> FIToFIPaymentStatusRequestV05Builder {
4646 FIToFIPaymentStatusRequestV05Builder::default()
4647 }
4648}
4649#[allow(clippy::large_enum_variant)]
4650#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4651pub enum FinancialIdentificationSchemeName1Choice {
4652 #[serde(rename = "Cd")]
4653 Cd(ExternalFinancialInstitutionIdentification1Code),
4654 #[serde(rename = "Prtry")]
4655 Prtry(Max35Text),
4656}
4657#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4658pub struct FinancialInstitutionIdentification18 {
4659 #[serde(rename = "BICFI")]
4660 #[serde(skip_serializing_if = "Option::is_none")]
4661 pub bicfi: Option<BICFIDec2014Identifier>,
4662 #[serde(rename = "ClrSysMmbId")]
4663 #[serde(skip_serializing_if = "Option::is_none")]
4664 pub clr_sys_mmb_id: Option<ClearingSystemMemberIdentification2>,
4665 #[serde(rename = "LEI")]
4666 #[serde(skip_serializing_if = "Option::is_none")]
4667 pub lei: Option<LEIIdentifier>,
4668 #[serde(rename = "Nm")]
4669 #[serde(skip_serializing_if = "Option::is_none")]
4670 pub nm: Option<Max140Text>,
4671 #[serde(rename = "PstlAdr")]
4672 #[serde(skip_serializing_if = "Option::is_none")]
4673 pub pstl_adr: Option<PostalAddress24>,
4674 #[serde(rename = "Othr")]
4675 #[serde(skip_serializing_if = "Option::is_none")]
4676 pub othr: Option<GenericFinancialIdentification1>,
4677}
4678#[allow(clippy::struct_field_names)]
4680#[derive(Default)]
4681pub struct FinancialInstitutionIdentification18Builder {
4682 bicfi: ::std::option::Option<BICFIDec2014Identifier>,
4683 clr_sys_mmb_id: ::std::option::Option<ClearingSystemMemberIdentification2>,
4684 lei: ::std::option::Option<LEIIdentifier>,
4685 nm: ::std::option::Option<Max140Text>,
4686 pstl_adr: ::std::option::Option<PostalAddress24>,
4687 othr: ::std::option::Option<GenericFinancialIdentification1>,
4688}
4689impl FinancialInstitutionIdentification18Builder {
4690 #[must_use]
4692 pub fn bicfi(
4693 mut self,
4694 value: BICFIDec2014Identifier,
4695 ) -> FinancialInstitutionIdentification18Builder {
4696 self.bicfi = ::std::option::Option::Some(value);
4697 self
4698 }
4699 #[must_use]
4701 pub fn clr_sys_mmb_id(
4702 mut self,
4703 value: ClearingSystemMemberIdentification2,
4704 ) -> FinancialInstitutionIdentification18Builder {
4705 self.clr_sys_mmb_id = ::std::option::Option::Some(value);
4706 self
4707 }
4708 #[must_use]
4710 pub fn lei(mut self, value: LEIIdentifier) -> FinancialInstitutionIdentification18Builder {
4711 self.lei = ::std::option::Option::Some(value);
4712 self
4713 }
4714 #[must_use]
4716 pub fn nm(mut self, value: Max140Text) -> FinancialInstitutionIdentification18Builder {
4717 self.nm = ::std::option::Option::Some(value);
4718 self
4719 }
4720 #[must_use]
4722 pub fn pstl_adr(
4723 mut self,
4724 value: PostalAddress24,
4725 ) -> FinancialInstitutionIdentification18Builder {
4726 self.pstl_adr = ::std::option::Option::Some(value);
4727 self
4728 }
4729 #[must_use]
4731 pub fn othr(
4732 mut self,
4733 value: GenericFinancialIdentification1,
4734 ) -> FinancialInstitutionIdentification18Builder {
4735 self.othr = ::std::option::Option::Some(value);
4736 self
4737 }
4738 pub fn build(
4750 self,
4751 ) -> ::std::result::Result<FinancialInstitutionIdentification18, crate::common::BuilderError>
4752 {
4753 ::std::result::Result::Ok(FinancialInstitutionIdentification18 {
4754 bicfi: self.bicfi,
4755 clr_sys_mmb_id: self.clr_sys_mmb_id,
4756 lei: self.lei,
4757 nm: self.nm,
4758 pstl_adr: self.pstl_adr,
4759 othr: self.othr,
4760 })
4761 }
4762}
4763impl FinancialInstitutionIdentification18 {
4764 #[must_use]
4766 pub fn builder() -> FinancialInstitutionIdentification18Builder {
4767 FinancialInstitutionIdentification18Builder::default()
4768 }
4769}
4770#[allow(clippy::large_enum_variant)]
4771#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4772pub enum Frequency36Choice {
4773 #[serde(rename = "Tp")]
4774 Tp(Frequency6Code),
4775 #[serde(rename = "Prd")]
4776 Prd(FrequencyPeriod1),
4777 #[serde(rename = "PtInTm")]
4778 PtInTm(FrequencyAndMoment1),
4779}
4780#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4781pub struct FrequencyAndMoment1 {
4782 #[serde(rename = "Tp")]
4783 pub tp: Frequency6Code,
4784 #[serde(rename = "PtInTm")]
4785 pub pt_in_tm: Exact2NumericText,
4786}
4787#[allow(clippy::struct_field_names)]
4789#[derive(Default)]
4790pub struct FrequencyAndMoment1Builder {
4791 tp: ::std::option::Option<Frequency6Code>,
4792 pt_in_tm: ::std::option::Option<Exact2NumericText>,
4793}
4794impl FrequencyAndMoment1Builder {
4795 #[must_use]
4797 pub fn tp(mut self, value: Frequency6Code) -> FrequencyAndMoment1Builder {
4798 self.tp = ::std::option::Option::Some(value);
4799 self
4800 }
4801 #[must_use]
4803 pub fn pt_in_tm(mut self, value: Exact2NumericText) -> FrequencyAndMoment1Builder {
4804 self.pt_in_tm = ::std::option::Option::Some(value);
4805 self
4806 }
4807 pub fn build(self) -> ::std::result::Result<FrequencyAndMoment1, crate::common::BuilderError> {
4819 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4820 if self.tp.is_none() {
4821 missing.push("tp".to_owned());
4822 }
4823 if self.pt_in_tm.is_none() {
4824 missing.push("pt_in_tm".to_owned());
4825 }
4826 if !missing.is_empty() {
4827 return ::std::result::Result::Err(crate::common::BuilderError {
4828 type_name: "FrequencyAndMoment1".to_owned(),
4829 missing_fields: missing,
4830 });
4831 }
4832 ::std::result::Result::Ok(FrequencyAndMoment1 {
4833 tp: self.tp.unwrap(),
4834 pt_in_tm: self.pt_in_tm.unwrap(),
4835 })
4836 }
4837}
4838impl FrequencyAndMoment1 {
4839 #[must_use]
4841 pub fn builder() -> FrequencyAndMoment1Builder {
4842 FrequencyAndMoment1Builder::default()
4843 }
4844}
4845#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4846pub struct FrequencyPeriod1 {
4847 #[serde(rename = "Tp")]
4848 pub tp: Frequency6Code,
4849 #[serde(rename = "CntPerPrd")]
4850 pub cnt_per_prd: DecimalNumber,
4851}
4852#[allow(clippy::struct_field_names)]
4854#[derive(Default)]
4855pub struct FrequencyPeriod1Builder {
4856 tp: ::std::option::Option<Frequency6Code>,
4857 cnt_per_prd: ::std::option::Option<DecimalNumber>,
4858}
4859impl FrequencyPeriod1Builder {
4860 #[must_use]
4862 pub fn tp(mut self, value: Frequency6Code) -> FrequencyPeriod1Builder {
4863 self.tp = ::std::option::Option::Some(value);
4864 self
4865 }
4866 #[must_use]
4868 pub fn cnt_per_prd(mut self, value: DecimalNumber) -> FrequencyPeriod1Builder {
4869 self.cnt_per_prd = ::std::option::Option::Some(value);
4870 self
4871 }
4872 pub fn build(self) -> ::std::result::Result<FrequencyPeriod1, crate::common::BuilderError> {
4884 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
4885 if self.tp.is_none() {
4886 missing.push("tp".to_owned());
4887 }
4888 if self.cnt_per_prd.is_none() {
4889 missing.push("cnt_per_prd".to_owned());
4890 }
4891 if !missing.is_empty() {
4892 return ::std::result::Result::Err(crate::common::BuilderError {
4893 type_name: "FrequencyPeriod1".to_owned(),
4894 missing_fields: missing,
4895 });
4896 }
4897 ::std::result::Result::Ok(FrequencyPeriod1 {
4898 tp: self.tp.unwrap(),
4899 cnt_per_prd: self.cnt_per_prd.unwrap(),
4900 })
4901 }
4902}
4903impl FrequencyPeriod1 {
4904 #[must_use]
4906 pub fn builder() -> FrequencyPeriod1Builder {
4907 FrequencyPeriod1Builder::default()
4908 }
4909}
4910#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4911pub struct Garnishment3 {
4912 #[serde(rename = "Tp")]
4913 pub tp: GarnishmentType1,
4914 #[serde(rename = "Grnshee")]
4915 #[serde(skip_serializing_if = "Option::is_none")]
4916 pub grnshee: Option<PartyIdentification135>,
4917 #[serde(rename = "GrnshmtAdmstr")]
4918 #[serde(skip_serializing_if = "Option::is_none")]
4919 pub grnshmt_admstr: Option<PartyIdentification135>,
4920 #[serde(rename = "RefNb")]
4921 #[serde(skip_serializing_if = "Option::is_none")]
4922 pub ref_nb: Option<Max140Text>,
4923 #[serde(rename = "Dt")]
4924 #[serde(skip_serializing_if = "Option::is_none")]
4925 pub dt: Option<ISODate>,
4926 #[serde(rename = "RmtdAmt")]
4927 #[serde(skip_serializing_if = "Option::is_none")]
4928 pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
4929 #[serde(rename = "FmlyMdclInsrncInd")]
4930 #[serde(skip_serializing_if = "Option::is_none")]
4931 pub fmly_mdcl_insrnc_ind: Option<TrueFalseIndicator>,
4932 #[serde(rename = "MplyeeTermntnInd")]
4933 #[serde(skip_serializing_if = "Option::is_none")]
4934 pub mplyee_termntn_ind: Option<TrueFalseIndicator>,
4935}
4936#[allow(clippy::struct_field_names)]
4938#[derive(Default)]
4939pub struct Garnishment3Builder {
4940 tp: ::std::option::Option<GarnishmentType1>,
4941 grnshee: ::std::option::Option<PartyIdentification135>,
4942 grnshmt_admstr: ::std::option::Option<PartyIdentification135>,
4943 ref_nb: ::std::option::Option<Max140Text>,
4944 dt: ::std::option::Option<ISODate>,
4945 rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
4946 fmly_mdcl_insrnc_ind: ::std::option::Option<TrueFalseIndicator>,
4947 mplyee_termntn_ind: ::std::option::Option<TrueFalseIndicator>,
4948}
4949impl Garnishment3Builder {
4950 #[must_use]
4952 pub fn tp(mut self, value: GarnishmentType1) -> Garnishment3Builder {
4953 self.tp = ::std::option::Option::Some(value);
4954 self
4955 }
4956 #[must_use]
4958 pub fn grnshee(mut self, value: PartyIdentification135) -> Garnishment3Builder {
4959 self.grnshee = ::std::option::Option::Some(value);
4960 self
4961 }
4962 #[must_use]
4964 pub fn grnshmt_admstr(mut self, value: PartyIdentification135) -> Garnishment3Builder {
4965 self.grnshmt_admstr = ::std::option::Option::Some(value);
4966 self
4967 }
4968 #[must_use]
4970 pub fn ref_nb(mut self, value: Max140Text) -> Garnishment3Builder {
4971 self.ref_nb = ::std::option::Option::Some(value);
4972 self
4973 }
4974 #[must_use]
4976 pub fn dt(mut self, value: ISODate) -> Garnishment3Builder {
4977 self.dt = ::std::option::Option::Some(value);
4978 self
4979 }
4980 #[must_use]
4982 pub fn rmtd_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> Garnishment3Builder {
4983 self.rmtd_amt = ::std::option::Option::Some(value);
4984 self
4985 }
4986 #[must_use]
4988 pub fn fmly_mdcl_insrnc_ind(mut self, value: TrueFalseIndicator) -> Garnishment3Builder {
4989 self.fmly_mdcl_insrnc_ind = ::std::option::Option::Some(value);
4990 self
4991 }
4992 #[must_use]
4994 pub fn mplyee_termntn_ind(mut self, value: TrueFalseIndicator) -> Garnishment3Builder {
4995 self.mplyee_termntn_ind = ::std::option::Option::Some(value);
4996 self
4997 }
4998 pub fn build(self) -> ::std::result::Result<Garnishment3, crate::common::BuilderError> {
5010 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5011 if self.tp.is_none() {
5012 missing.push("tp".to_owned());
5013 }
5014 if !missing.is_empty() {
5015 return ::std::result::Result::Err(crate::common::BuilderError {
5016 type_name: "Garnishment3".to_owned(),
5017 missing_fields: missing,
5018 });
5019 }
5020 ::std::result::Result::Ok(Garnishment3 {
5021 tp: self.tp.unwrap(),
5022 grnshee: self.grnshee,
5023 grnshmt_admstr: self.grnshmt_admstr,
5024 ref_nb: self.ref_nb,
5025 dt: self.dt,
5026 rmtd_amt: self.rmtd_amt,
5027 fmly_mdcl_insrnc_ind: self.fmly_mdcl_insrnc_ind,
5028 mplyee_termntn_ind: self.mplyee_termntn_ind,
5029 })
5030 }
5031}
5032impl Garnishment3 {
5033 #[must_use]
5035 pub fn builder() -> Garnishment3Builder {
5036 Garnishment3Builder::default()
5037 }
5038}
5039#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5040pub struct GarnishmentType1 {
5041 #[serde(rename = "CdOrPrtry")]
5042 pub cd_or_prtry: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5043 #[serde(rename = "Issr")]
5044 #[serde(skip_serializing_if = "Option::is_none")]
5045 pub issr: Option<Max35Text>,
5046}
5047#[allow(clippy::struct_field_names)]
5049#[derive(Default)]
5050pub struct GarnishmentType1Builder {
5051 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<GarnishmentType1Choice>>,
5052 issr: ::std::option::Option<Max35Text>,
5053}
5054impl GarnishmentType1Builder {
5055 #[must_use]
5057 pub fn cd_or_prtry(
5058 mut self,
5059 value: crate::common::ChoiceWrapper<GarnishmentType1Choice>,
5060 ) -> GarnishmentType1Builder {
5061 self.cd_or_prtry = ::std::option::Option::Some(value);
5062 self
5063 }
5064 #[must_use]
5066 pub fn issr(mut self, value: Max35Text) -> GarnishmentType1Builder {
5067 self.issr = ::std::option::Option::Some(value);
5068 self
5069 }
5070 pub fn build(self) -> ::std::result::Result<GarnishmentType1, crate::common::BuilderError> {
5082 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5083 if self.cd_or_prtry.is_none() {
5084 missing.push("cd_or_prtry".to_owned());
5085 }
5086 if !missing.is_empty() {
5087 return ::std::result::Result::Err(crate::common::BuilderError {
5088 type_name: "GarnishmentType1".to_owned(),
5089 missing_fields: missing,
5090 });
5091 }
5092 ::std::result::Result::Ok(GarnishmentType1 {
5093 cd_or_prtry: self.cd_or_prtry.unwrap(),
5094 issr: self.issr,
5095 })
5096 }
5097}
5098impl GarnishmentType1 {
5099 #[must_use]
5101 pub fn builder() -> GarnishmentType1Builder {
5102 GarnishmentType1Builder::default()
5103 }
5104}
5105#[allow(clippy::large_enum_variant)]
5106#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5107pub enum GarnishmentType1Choice {
5108 #[serde(rename = "Cd")]
5109 Cd(ExternalGarnishmentType1Code),
5110 #[serde(rename = "Prtry")]
5111 Prtry(Max35Text),
5112}
5113#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5114pub struct GenericAccountIdentification1 {
5115 #[serde(rename = "Id")]
5116 pub id: Max34Text,
5117 #[serde(rename = "SchmeNm")]
5118 #[serde(skip_serializing_if = "Option::is_none")]
5119 pub schme_nm: Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5120 #[serde(rename = "Issr")]
5121 #[serde(skip_serializing_if = "Option::is_none")]
5122 pub issr: Option<Max35Text>,
5123}
5124#[allow(clippy::struct_field_names)]
5126#[derive(Default)]
5127pub struct GenericAccountIdentification1Builder {
5128 id: ::std::option::Option<Max34Text>,
5129 schme_nm: ::std::option::Option<crate::common::ChoiceWrapper<AccountSchemeName1Choice>>,
5130 issr: ::std::option::Option<Max35Text>,
5131}
5132impl GenericAccountIdentification1Builder {
5133 #[must_use]
5135 pub fn id(mut self, value: Max34Text) -> GenericAccountIdentification1Builder {
5136 self.id = ::std::option::Option::Some(value);
5137 self
5138 }
5139 #[must_use]
5141 pub fn schme_nm(
5142 mut self,
5143 value: crate::common::ChoiceWrapper<AccountSchemeName1Choice>,
5144 ) -> GenericAccountIdentification1Builder {
5145 self.schme_nm = ::std::option::Option::Some(value);
5146 self
5147 }
5148 #[must_use]
5150 pub fn issr(mut self, value: Max35Text) -> GenericAccountIdentification1Builder {
5151 self.issr = ::std::option::Option::Some(value);
5152 self
5153 }
5154 pub fn build(
5166 self,
5167 ) -> ::std::result::Result<GenericAccountIdentification1, crate::common::BuilderError> {
5168 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5169 if self.id.is_none() {
5170 missing.push("id".to_owned());
5171 }
5172 if !missing.is_empty() {
5173 return ::std::result::Result::Err(crate::common::BuilderError {
5174 type_name: "GenericAccountIdentification1".to_owned(),
5175 missing_fields: missing,
5176 });
5177 }
5178 ::std::result::Result::Ok(GenericAccountIdentification1 {
5179 id: self.id.unwrap(),
5180 schme_nm: self.schme_nm,
5181 issr: self.issr,
5182 })
5183 }
5184}
5185impl GenericAccountIdentification1 {
5186 #[must_use]
5188 pub fn builder() -> GenericAccountIdentification1Builder {
5189 GenericAccountIdentification1Builder::default()
5190 }
5191}
5192#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5193pub struct GenericFinancialIdentification1 {
5194 #[serde(rename = "Id")]
5195 pub id: Max35Text,
5196 #[serde(rename = "SchmeNm")]
5197 #[serde(skip_serializing_if = "Option::is_none")]
5198 pub schme_nm: Option<crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>>,
5199 #[serde(rename = "Issr")]
5200 #[serde(skip_serializing_if = "Option::is_none")]
5201 pub issr: Option<Max35Text>,
5202}
5203#[allow(clippy::struct_field_names)]
5205#[derive(Default)]
5206pub struct GenericFinancialIdentification1Builder {
5207 id: ::std::option::Option<Max35Text>,
5208 schme_nm: ::std::option::Option<
5209 crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5210 >,
5211 issr: ::std::option::Option<Max35Text>,
5212}
5213impl GenericFinancialIdentification1Builder {
5214 #[must_use]
5216 pub fn id(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5217 self.id = ::std::option::Option::Some(value);
5218 self
5219 }
5220 #[must_use]
5222 pub fn schme_nm(
5223 mut self,
5224 value: crate::common::ChoiceWrapper<FinancialIdentificationSchemeName1Choice>,
5225 ) -> GenericFinancialIdentification1Builder {
5226 self.schme_nm = ::std::option::Option::Some(value);
5227 self
5228 }
5229 #[must_use]
5231 pub fn issr(mut self, value: Max35Text) -> GenericFinancialIdentification1Builder {
5232 self.issr = ::std::option::Option::Some(value);
5233 self
5234 }
5235 pub fn build(
5247 self,
5248 ) -> ::std::result::Result<GenericFinancialIdentification1, crate::common::BuilderError> {
5249 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5250 if self.id.is_none() {
5251 missing.push("id".to_owned());
5252 }
5253 if !missing.is_empty() {
5254 return ::std::result::Result::Err(crate::common::BuilderError {
5255 type_name: "GenericFinancialIdentification1".to_owned(),
5256 missing_fields: missing,
5257 });
5258 }
5259 ::std::result::Result::Ok(GenericFinancialIdentification1 {
5260 id: self.id.unwrap(),
5261 schme_nm: self.schme_nm,
5262 issr: self.issr,
5263 })
5264 }
5265}
5266impl GenericFinancialIdentification1 {
5267 #[must_use]
5269 pub fn builder() -> GenericFinancialIdentification1Builder {
5270 GenericFinancialIdentification1Builder::default()
5271 }
5272}
5273#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5274pub struct GenericIdentification30 {
5275 #[serde(rename = "Id")]
5276 pub id: Exact4AlphaNumericText,
5277 #[serde(rename = "Issr")]
5278 pub issr: Max35Text,
5279 #[serde(rename = "SchmeNm")]
5280 #[serde(skip_serializing_if = "Option::is_none")]
5281 pub schme_nm: Option<Max35Text>,
5282}
5283#[allow(clippy::struct_field_names)]
5285#[derive(Default)]
5286pub struct GenericIdentification30Builder {
5287 id: ::std::option::Option<Exact4AlphaNumericText>,
5288 issr: ::std::option::Option<Max35Text>,
5289 schme_nm: ::std::option::Option<Max35Text>,
5290}
5291impl GenericIdentification30Builder {
5292 #[must_use]
5294 pub fn id(mut self, value: Exact4AlphaNumericText) -> GenericIdentification30Builder {
5295 self.id = ::std::option::Option::Some(value);
5296 self
5297 }
5298 #[must_use]
5300 pub fn issr(mut self, value: Max35Text) -> GenericIdentification30Builder {
5301 self.issr = ::std::option::Option::Some(value);
5302 self
5303 }
5304 #[must_use]
5306 pub fn schme_nm(mut self, value: Max35Text) -> GenericIdentification30Builder {
5307 self.schme_nm = ::std::option::Option::Some(value);
5308 self
5309 }
5310 pub fn build(
5322 self,
5323 ) -> ::std::result::Result<GenericIdentification30, crate::common::BuilderError> {
5324 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5325 if self.id.is_none() {
5326 missing.push("id".to_owned());
5327 }
5328 if self.issr.is_none() {
5329 missing.push("issr".to_owned());
5330 }
5331 if !missing.is_empty() {
5332 return ::std::result::Result::Err(crate::common::BuilderError {
5333 type_name: "GenericIdentification30".to_owned(),
5334 missing_fields: missing,
5335 });
5336 }
5337 ::std::result::Result::Ok(GenericIdentification30 {
5338 id: self.id.unwrap(),
5339 issr: self.issr.unwrap(),
5340 schme_nm: self.schme_nm,
5341 })
5342 }
5343}
5344impl GenericIdentification30 {
5345 #[must_use]
5347 pub fn builder() -> GenericIdentification30Builder {
5348 GenericIdentification30Builder::default()
5349 }
5350}
5351#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5352pub struct GenericOrganisationIdentification1 {
5353 #[serde(rename = "Id")]
5354 pub id: Max35Text,
5355 #[serde(rename = "SchmeNm")]
5356 #[serde(skip_serializing_if = "Option::is_none")]
5357 pub schme_nm: Option<crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>>,
5358 #[serde(rename = "Issr")]
5359 #[serde(skip_serializing_if = "Option::is_none")]
5360 pub issr: Option<Max35Text>,
5361}
5362#[allow(clippy::struct_field_names)]
5364#[derive(Default)]
5365pub struct GenericOrganisationIdentification1Builder {
5366 id: ::std::option::Option<Max35Text>,
5367 schme_nm: ::std::option::Option<
5368 crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
5369 >,
5370 issr: ::std::option::Option<Max35Text>,
5371}
5372impl GenericOrganisationIdentification1Builder {
5373 #[must_use]
5375 pub fn id(mut self, value: Max35Text) -> GenericOrganisationIdentification1Builder {
5376 self.id = ::std::option::Option::Some(value);
5377 self
5378 }
5379 #[must_use]
5381 pub fn schme_nm(
5382 mut self,
5383 value: crate::common::ChoiceWrapper<OrganisationIdentificationSchemeName1Choice>,
5384 ) -> GenericOrganisationIdentification1Builder {
5385 self.schme_nm = ::std::option::Option::Some(value);
5386 self
5387 }
5388 #[must_use]
5390 pub fn issr(mut self, value: Max35Text) -> GenericOrganisationIdentification1Builder {
5391 self.issr = ::std::option::Option::Some(value);
5392 self
5393 }
5394 pub fn build(
5406 self,
5407 ) -> ::std::result::Result<GenericOrganisationIdentification1, crate::common::BuilderError>
5408 {
5409 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5410 if self.id.is_none() {
5411 missing.push("id".to_owned());
5412 }
5413 if !missing.is_empty() {
5414 return ::std::result::Result::Err(crate::common::BuilderError {
5415 type_name: "GenericOrganisationIdentification1".to_owned(),
5416 missing_fields: missing,
5417 });
5418 }
5419 ::std::result::Result::Ok(GenericOrganisationIdentification1 {
5420 id: self.id.unwrap(),
5421 schme_nm: self.schme_nm,
5422 issr: self.issr,
5423 })
5424 }
5425}
5426impl GenericOrganisationIdentification1 {
5427 #[must_use]
5429 pub fn builder() -> GenericOrganisationIdentification1Builder {
5430 GenericOrganisationIdentification1Builder::default()
5431 }
5432}
5433#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5434pub struct GenericPersonIdentification1 {
5435 #[serde(rename = "Id")]
5436 pub id: Max35Text,
5437 #[serde(rename = "SchmeNm")]
5438 #[serde(skip_serializing_if = "Option::is_none")]
5439 pub schme_nm: Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
5440 #[serde(rename = "Issr")]
5441 #[serde(skip_serializing_if = "Option::is_none")]
5442 pub issr: Option<Max35Text>,
5443}
5444#[allow(clippy::struct_field_names)]
5446#[derive(Default)]
5447pub struct GenericPersonIdentification1Builder {
5448 id: ::std::option::Option<Max35Text>,
5449 schme_nm:
5450 ::std::option::Option<crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>>,
5451 issr: ::std::option::Option<Max35Text>,
5452}
5453impl GenericPersonIdentification1Builder {
5454 #[must_use]
5456 pub fn id(mut self, value: Max35Text) -> GenericPersonIdentification1Builder {
5457 self.id = ::std::option::Option::Some(value);
5458 self
5459 }
5460 #[must_use]
5462 pub fn schme_nm(
5463 mut self,
5464 value: crate::common::ChoiceWrapper<PersonIdentificationSchemeName1Choice>,
5465 ) -> GenericPersonIdentification1Builder {
5466 self.schme_nm = ::std::option::Option::Some(value);
5467 self
5468 }
5469 #[must_use]
5471 pub fn issr(mut self, value: Max35Text) -> GenericPersonIdentification1Builder {
5472 self.issr = ::std::option::Option::Some(value);
5473 self
5474 }
5475 pub fn build(
5487 self,
5488 ) -> ::std::result::Result<GenericPersonIdentification1, crate::common::BuilderError> {
5489 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5490 if self.id.is_none() {
5491 missing.push("id".to_owned());
5492 }
5493 if !missing.is_empty() {
5494 return ::std::result::Result::Err(crate::common::BuilderError {
5495 type_name: "GenericPersonIdentification1".to_owned(),
5496 missing_fields: missing,
5497 });
5498 }
5499 ::std::result::Result::Ok(GenericPersonIdentification1 {
5500 id: self.id.unwrap(),
5501 schme_nm: self.schme_nm,
5502 issr: self.issr,
5503 })
5504 }
5505}
5506impl GenericPersonIdentification1 {
5507 #[must_use]
5509 pub fn builder() -> GenericPersonIdentification1Builder {
5510 GenericPersonIdentification1Builder::default()
5511 }
5512}
5513#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5514pub struct GroupHeader91 {
5515 #[serde(rename = "MsgId")]
5516 pub msg_id: Max35Text,
5517 #[serde(rename = "CreDtTm")]
5518 pub cre_dt_tm: ISODateTime,
5519 #[serde(rename = "InstgAgt")]
5520 #[serde(skip_serializing_if = "Option::is_none")]
5521 pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
5522 #[serde(rename = "InstdAgt")]
5523 #[serde(skip_serializing_if = "Option::is_none")]
5524 pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
5525}
5526#[allow(clippy::struct_field_names)]
5528#[derive(Default)]
5529pub struct GroupHeader91Builder {
5530 msg_id: ::std::option::Option<Max35Text>,
5531 cre_dt_tm: ::std::option::Option<ISODateTime>,
5532 instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
5533 instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
5534}
5535impl GroupHeader91Builder {
5536 #[must_use]
5538 pub fn msg_id(mut self, value: Max35Text) -> GroupHeader91Builder {
5539 self.msg_id = ::std::option::Option::Some(value);
5540 self
5541 }
5542 #[must_use]
5544 pub fn cre_dt_tm(mut self, value: ISODateTime) -> GroupHeader91Builder {
5545 self.cre_dt_tm = ::std::option::Option::Some(value);
5546 self
5547 }
5548 #[must_use]
5550 pub fn instg_agt(
5551 mut self,
5552 value: BranchAndFinancialInstitutionIdentification6,
5553 ) -> GroupHeader91Builder {
5554 self.instg_agt = ::std::option::Option::Some(value);
5555 self
5556 }
5557 #[must_use]
5559 pub fn instd_agt(
5560 mut self,
5561 value: BranchAndFinancialInstitutionIdentification6,
5562 ) -> GroupHeader91Builder {
5563 self.instd_agt = ::std::option::Option::Some(value);
5564 self
5565 }
5566 pub fn build(self) -> ::std::result::Result<GroupHeader91, crate::common::BuilderError> {
5578 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
5579 if self.msg_id.is_none() {
5580 missing.push("msg_id".to_owned());
5581 }
5582 if self.cre_dt_tm.is_none() {
5583 missing.push("cre_dt_tm".to_owned());
5584 }
5585 if !missing.is_empty() {
5586 return ::std::result::Result::Err(crate::common::BuilderError {
5587 type_name: "GroupHeader91".to_owned(),
5588 missing_fields: missing,
5589 });
5590 }
5591 ::std::result::Result::Ok(GroupHeader91 {
5592 msg_id: self.msg_id.unwrap(),
5593 cre_dt_tm: self.cre_dt_tm.unwrap(),
5594 instg_agt: self.instg_agt,
5595 instd_agt: self.instd_agt,
5596 })
5597 }
5598}
5599impl GroupHeader91 {
5600 #[must_use]
5602 pub fn builder() -> GroupHeader91Builder {
5603 GroupHeader91Builder::default()
5604 }
5605}
5606#[allow(clippy::large_enum_variant)]
5607#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5608pub enum LocalInstrument2Choice {
5609 #[serde(rename = "Cd")]
5610 Cd(ExternalLocalInstrument1Code),
5611 #[serde(rename = "Prtry")]
5612 Prtry(Max35Text),
5613}
5614#[allow(clippy::large_enum_variant)]
5615#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5616pub enum MandateClassification1Choice {
5617 #[serde(rename = "Cd")]
5618 Cd(MandateClassification1Code),
5619 #[serde(rename = "Prtry")]
5620 Prtry(Max35Text),
5621}
5622#[allow(clippy::large_enum_variant)]
5623#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5624pub enum MandateRelatedData2Choice {
5625 #[serde(rename = "DrctDbtMndt")]
5626 DrctDbtMndt(MandateRelatedInformation15),
5627 #[serde(rename = "CdtTrfMndt")]
5628 CdtTrfMndt(CreditTransferMandateData1),
5629}
5630#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5631pub struct MandateRelatedInformation15 {
5632 #[serde(rename = "MndtId")]
5633 #[serde(skip_serializing_if = "Option::is_none")]
5634 pub mndt_id: Option<Max35Text>,
5635 #[serde(rename = "DtOfSgntr")]
5636 #[serde(skip_serializing_if = "Option::is_none")]
5637 pub dt_of_sgntr: Option<ISODate>,
5638 #[serde(rename = "AmdmntInd")]
5639 #[serde(skip_serializing_if = "Option::is_none")]
5640 pub amdmnt_ind: Option<TrueFalseIndicator>,
5641 #[serde(rename = "AmdmntInfDtls")]
5642 #[serde(skip_serializing_if = "Option::is_none")]
5643 pub amdmnt_inf_dtls: Option<AmendmentInformationDetails14>,
5644 #[serde(rename = "ElctrncSgntr")]
5645 #[serde(skip_serializing_if = "Option::is_none")]
5646 pub elctrnc_sgntr: Option<Max1025Text>,
5647 #[serde(rename = "FrstColltnDt")]
5648 #[serde(skip_serializing_if = "Option::is_none")]
5649 pub frst_colltn_dt: Option<ISODate>,
5650 #[serde(rename = "FnlColltnDt")]
5651 #[serde(skip_serializing_if = "Option::is_none")]
5652 pub fnl_colltn_dt: Option<ISODate>,
5653 #[serde(rename = "Frqcy")]
5654 #[serde(skip_serializing_if = "Option::is_none")]
5655 pub frqcy: Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
5656 #[serde(rename = "Rsn")]
5657 #[serde(skip_serializing_if = "Option::is_none")]
5658 pub rsn: Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
5659 #[serde(rename = "TrckgDays")]
5660 #[serde(skip_serializing_if = "Option::is_none")]
5661 pub trckg_days: Option<Exact2NumericText>,
5662}
5663#[allow(clippy::struct_field_names)]
5665#[derive(Default)]
5666pub struct MandateRelatedInformation15Builder {
5667 mndt_id: ::std::option::Option<Max35Text>,
5668 dt_of_sgntr: ::std::option::Option<ISODate>,
5669 amdmnt_ind: ::std::option::Option<TrueFalseIndicator>,
5670 amdmnt_inf_dtls: ::std::option::Option<AmendmentInformationDetails14>,
5671 elctrnc_sgntr: ::std::option::Option<Max1025Text>,
5672 frst_colltn_dt: ::std::option::Option<ISODate>,
5673 fnl_colltn_dt: ::std::option::Option<ISODate>,
5674 frqcy: ::std::option::Option<crate::common::ChoiceWrapper<Frequency36Choice>>,
5675 rsn: ::std::option::Option<crate::common::ChoiceWrapper<MandateSetupReason1Choice>>,
5676 trckg_days: ::std::option::Option<Exact2NumericText>,
5677}
5678impl MandateRelatedInformation15Builder {
5679 #[must_use]
5681 pub fn mndt_id(mut self, value: Max35Text) -> MandateRelatedInformation15Builder {
5682 self.mndt_id = ::std::option::Option::Some(value);
5683 self
5684 }
5685 #[must_use]
5687 pub fn dt_of_sgntr(mut self, value: ISODate) -> MandateRelatedInformation15Builder {
5688 self.dt_of_sgntr = ::std::option::Option::Some(value);
5689 self
5690 }
5691 #[must_use]
5693 pub fn amdmnt_ind(mut self, value: TrueFalseIndicator) -> MandateRelatedInformation15Builder {
5694 self.amdmnt_ind = ::std::option::Option::Some(value);
5695 self
5696 }
5697 #[must_use]
5699 pub fn amdmnt_inf_dtls(
5700 mut self,
5701 value: AmendmentInformationDetails14,
5702 ) -> MandateRelatedInformation15Builder {
5703 self.amdmnt_inf_dtls = ::std::option::Option::Some(value);
5704 self
5705 }
5706 #[must_use]
5708 pub fn elctrnc_sgntr(mut self, value: Max1025Text) -> MandateRelatedInformation15Builder {
5709 self.elctrnc_sgntr = ::std::option::Option::Some(value);
5710 self
5711 }
5712 #[must_use]
5714 pub fn frst_colltn_dt(mut self, value: ISODate) -> MandateRelatedInformation15Builder {
5715 self.frst_colltn_dt = ::std::option::Option::Some(value);
5716 self
5717 }
5718 #[must_use]
5720 pub fn fnl_colltn_dt(mut self, value: ISODate) -> MandateRelatedInformation15Builder {
5721 self.fnl_colltn_dt = ::std::option::Option::Some(value);
5722 self
5723 }
5724 #[must_use]
5726 pub fn frqcy(
5727 mut self,
5728 value: crate::common::ChoiceWrapper<Frequency36Choice>,
5729 ) -> MandateRelatedInformation15Builder {
5730 self.frqcy = ::std::option::Option::Some(value);
5731 self
5732 }
5733 #[must_use]
5735 pub fn rsn(
5736 mut self,
5737 value: crate::common::ChoiceWrapper<MandateSetupReason1Choice>,
5738 ) -> MandateRelatedInformation15Builder {
5739 self.rsn = ::std::option::Option::Some(value);
5740 self
5741 }
5742 #[must_use]
5744 pub fn trckg_days(mut self, value: Exact2NumericText) -> MandateRelatedInformation15Builder {
5745 self.trckg_days = ::std::option::Option::Some(value);
5746 self
5747 }
5748 pub fn build(
5760 self,
5761 ) -> ::std::result::Result<MandateRelatedInformation15, crate::common::BuilderError> {
5762 ::std::result::Result::Ok(MandateRelatedInformation15 {
5763 mndt_id: self.mndt_id,
5764 dt_of_sgntr: self.dt_of_sgntr,
5765 amdmnt_ind: self.amdmnt_ind,
5766 amdmnt_inf_dtls: self.amdmnt_inf_dtls,
5767 elctrnc_sgntr: self.elctrnc_sgntr,
5768 frst_colltn_dt: self.frst_colltn_dt,
5769 fnl_colltn_dt: self.fnl_colltn_dt,
5770 frqcy: self.frqcy,
5771 rsn: self.rsn,
5772 trckg_days: self.trckg_days,
5773 })
5774 }
5775}
5776impl MandateRelatedInformation15 {
5777 #[must_use]
5779 pub fn builder() -> MandateRelatedInformation15Builder {
5780 MandateRelatedInformation15Builder::default()
5781 }
5782}
5783#[allow(clippy::large_enum_variant)]
5784#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5785pub enum MandateSetupReason1Choice {
5786 #[serde(rename = "Cd")]
5787 Cd(ExternalMandateSetupReason1Code),
5788 #[serde(rename = "Prtry")]
5789 Prtry(Max70Text),
5790}
5791#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5792pub struct MandateTypeInformation2 {
5793 #[serde(rename = "SvcLvl")]
5794 #[serde(skip_serializing_if = "Option::is_none")]
5795 pub svc_lvl: Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
5796 #[serde(rename = "LclInstrm")]
5797 #[serde(skip_serializing_if = "Option::is_none")]
5798 pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
5799 #[serde(rename = "CtgyPurp")]
5800 #[serde(skip_serializing_if = "Option::is_none")]
5801 pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
5802 #[serde(rename = "Clssfctn")]
5803 #[serde(skip_serializing_if = "Option::is_none")]
5804 pub clssfctn: Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
5805}
5806#[allow(clippy::struct_field_names)]
5808#[derive(Default)]
5809pub struct MandateTypeInformation2Builder {
5810 svc_lvl: ::std::option::Option<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
5811 lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
5812 ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
5813 clssfctn: ::std::option::Option<crate::common::ChoiceWrapper<MandateClassification1Choice>>,
5814}
5815impl MandateTypeInformation2Builder {
5816 #[must_use]
5818 pub fn svc_lvl(
5819 mut self,
5820 value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
5821 ) -> MandateTypeInformation2Builder {
5822 self.svc_lvl = ::std::option::Option::Some(value);
5823 self
5824 }
5825 #[must_use]
5827 pub fn lcl_instrm(
5828 mut self,
5829 value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
5830 ) -> MandateTypeInformation2Builder {
5831 self.lcl_instrm = ::std::option::Option::Some(value);
5832 self
5833 }
5834 #[must_use]
5836 pub fn ctgy_purp(
5837 mut self,
5838 value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
5839 ) -> MandateTypeInformation2Builder {
5840 self.ctgy_purp = ::std::option::Option::Some(value);
5841 self
5842 }
5843 #[must_use]
5845 pub fn clssfctn(
5846 mut self,
5847 value: crate::common::ChoiceWrapper<MandateClassification1Choice>,
5848 ) -> MandateTypeInformation2Builder {
5849 self.clssfctn = ::std::option::Option::Some(value);
5850 self
5851 }
5852 pub fn build(
5864 self,
5865 ) -> ::std::result::Result<MandateTypeInformation2, crate::common::BuilderError> {
5866 ::std::result::Result::Ok(MandateTypeInformation2 {
5867 svc_lvl: self.svc_lvl,
5868 lcl_instrm: self.lcl_instrm,
5869 ctgy_purp: self.ctgy_purp,
5870 clssfctn: self.clssfctn,
5871 })
5872 }
5873}
5874impl MandateTypeInformation2 {
5875 #[must_use]
5877 pub fn builder() -> MandateTypeInformation2Builder {
5878 MandateTypeInformation2Builder::default()
5879 }
5880}
5881#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5882pub struct OrganisationIdentification29 {
5883 #[serde(rename = "AnyBIC")]
5884 #[serde(skip_serializing_if = "Option::is_none")]
5885 pub any_bic: Option<AnyBICDec2014Identifier>,
5886 #[serde(rename = "LEI")]
5887 #[serde(skip_serializing_if = "Option::is_none")]
5888 pub lei: Option<LEIIdentifier>,
5889 #[serde(rename = "Othr")]
5890 #[serde(default)]
5891 #[serde(skip_serializing_if = "Vec::is_empty")]
5892 pub othr: Vec<GenericOrganisationIdentification1>,
5893}
5894#[allow(clippy::struct_field_names)]
5896#[derive(Default)]
5897pub struct OrganisationIdentification29Builder {
5898 any_bic: ::std::option::Option<AnyBICDec2014Identifier>,
5899 lei: ::std::option::Option<LEIIdentifier>,
5900 othr: ::std::vec::Vec<GenericOrganisationIdentification1>,
5901}
5902impl OrganisationIdentification29Builder {
5903 #[must_use]
5905 pub fn any_bic(
5906 mut self,
5907 value: AnyBICDec2014Identifier,
5908 ) -> OrganisationIdentification29Builder {
5909 self.any_bic = ::std::option::Option::Some(value);
5910 self
5911 }
5912 #[must_use]
5914 pub fn lei(mut self, value: LEIIdentifier) -> OrganisationIdentification29Builder {
5915 self.lei = ::std::option::Option::Some(value);
5916 self
5917 }
5918 #[must_use]
5920 pub fn othr(
5921 mut self,
5922 value: ::std::vec::Vec<GenericOrganisationIdentification1>,
5923 ) -> OrganisationIdentification29Builder {
5924 self.othr = value;
5925 self
5926 }
5927 #[must_use]
5929 pub fn add_othr(
5930 mut self,
5931 value: GenericOrganisationIdentification1,
5932 ) -> OrganisationIdentification29Builder {
5933 self.othr.push(value);
5934 self
5935 }
5936 pub fn build(
5948 self,
5949 ) -> ::std::result::Result<OrganisationIdentification29, crate::common::BuilderError> {
5950 ::std::result::Result::Ok(OrganisationIdentification29 {
5951 any_bic: self.any_bic,
5952 lei: self.lei,
5953 othr: self.othr,
5954 })
5955 }
5956}
5957impl OrganisationIdentification29 {
5958 #[must_use]
5960 pub fn builder() -> OrganisationIdentification29Builder {
5961 OrganisationIdentification29Builder::default()
5962 }
5963}
5964#[allow(clippy::large_enum_variant)]
5965#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5966pub enum OrganisationIdentificationSchemeName1Choice {
5967 #[serde(rename = "Cd")]
5968 Cd(ExternalOrganisationIdentification1Code),
5969 #[serde(rename = "Prtry")]
5970 Prtry(Max35Text),
5971}
5972#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5973pub struct OriginalGroupInformation27 {
5974 #[serde(rename = "OrgnlMsgId")]
5975 pub orgnl_msg_id: Max35Text,
5976 #[serde(rename = "OrgnlMsgNmId")]
5977 pub orgnl_msg_nm_id: Max35Text,
5978 #[serde(rename = "OrgnlCreDtTm")]
5979 #[serde(skip_serializing_if = "Option::is_none")]
5980 pub orgnl_cre_dt_tm: Option<ISODateTime>,
5981 #[serde(rename = "OrgnlNbOfTxs")]
5982 #[serde(skip_serializing_if = "Option::is_none")]
5983 pub orgnl_nb_of_txs: Option<Max15NumericText>,
5984 #[serde(rename = "OrgnlCtrlSum")]
5985 #[serde(skip_serializing_if = "Option::is_none")]
5986 pub orgnl_ctrl_sum: Option<DecimalNumber>,
5987}
5988#[allow(clippy::struct_field_names)]
5990#[derive(Default)]
5991pub struct OriginalGroupInformation27Builder {
5992 orgnl_msg_id: ::std::option::Option<Max35Text>,
5993 orgnl_msg_nm_id: ::std::option::Option<Max35Text>,
5994 orgnl_cre_dt_tm: ::std::option::Option<ISODateTime>,
5995 orgnl_nb_of_txs: ::std::option::Option<Max15NumericText>,
5996 orgnl_ctrl_sum: ::std::option::Option<DecimalNumber>,
5997}
5998impl OriginalGroupInformation27Builder {
5999 #[must_use]
6001 pub fn orgnl_msg_id(mut self, value: Max35Text) -> OriginalGroupInformation27Builder {
6002 self.orgnl_msg_id = ::std::option::Option::Some(value);
6003 self
6004 }
6005 #[must_use]
6007 pub fn orgnl_msg_nm_id(mut self, value: Max35Text) -> OriginalGroupInformation27Builder {
6008 self.orgnl_msg_nm_id = ::std::option::Option::Some(value);
6009 self
6010 }
6011 #[must_use]
6013 pub fn orgnl_cre_dt_tm(mut self, value: ISODateTime) -> OriginalGroupInformation27Builder {
6014 self.orgnl_cre_dt_tm = ::std::option::Option::Some(value);
6015 self
6016 }
6017 #[must_use]
6019 pub fn orgnl_nb_of_txs(mut self, value: Max15NumericText) -> OriginalGroupInformation27Builder {
6020 self.orgnl_nb_of_txs = ::std::option::Option::Some(value);
6021 self
6022 }
6023 #[must_use]
6025 pub fn orgnl_ctrl_sum(mut self, value: DecimalNumber) -> OriginalGroupInformation27Builder {
6026 self.orgnl_ctrl_sum = ::std::option::Option::Some(value);
6027 self
6028 }
6029 pub fn build(
6041 self,
6042 ) -> ::std::result::Result<OriginalGroupInformation27, crate::common::BuilderError> {
6043 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6044 if self.orgnl_msg_id.is_none() {
6045 missing.push("orgnl_msg_id".to_owned());
6046 }
6047 if self.orgnl_msg_nm_id.is_none() {
6048 missing.push("orgnl_msg_nm_id".to_owned());
6049 }
6050 if !missing.is_empty() {
6051 return ::std::result::Result::Err(crate::common::BuilderError {
6052 type_name: "OriginalGroupInformation27".to_owned(),
6053 missing_fields: missing,
6054 });
6055 }
6056 ::std::result::Result::Ok(OriginalGroupInformation27 {
6057 orgnl_msg_id: self.orgnl_msg_id.unwrap(),
6058 orgnl_msg_nm_id: self.orgnl_msg_nm_id.unwrap(),
6059 orgnl_cre_dt_tm: self.orgnl_cre_dt_tm,
6060 orgnl_nb_of_txs: self.orgnl_nb_of_txs,
6061 orgnl_ctrl_sum: self.orgnl_ctrl_sum,
6062 })
6063 }
6064}
6065impl OriginalGroupInformation27 {
6066 #[must_use]
6068 pub fn builder() -> OriginalGroupInformation27Builder {
6069 OriginalGroupInformation27Builder::default()
6070 }
6071}
6072#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6073pub struct OriginalGroupInformation29 {
6074 #[serde(rename = "OrgnlMsgId")]
6075 pub orgnl_msg_id: Max35Text,
6076 #[serde(rename = "OrgnlMsgNmId")]
6077 pub orgnl_msg_nm_id: Max35Text,
6078 #[serde(rename = "OrgnlCreDtTm")]
6079 #[serde(skip_serializing_if = "Option::is_none")]
6080 pub orgnl_cre_dt_tm: Option<ISODateTime>,
6081}
6082#[allow(clippy::struct_field_names)]
6084#[derive(Default)]
6085pub struct OriginalGroupInformation29Builder {
6086 orgnl_msg_id: ::std::option::Option<Max35Text>,
6087 orgnl_msg_nm_id: ::std::option::Option<Max35Text>,
6088 orgnl_cre_dt_tm: ::std::option::Option<ISODateTime>,
6089}
6090impl OriginalGroupInformation29Builder {
6091 #[must_use]
6093 pub fn orgnl_msg_id(mut self, value: Max35Text) -> OriginalGroupInformation29Builder {
6094 self.orgnl_msg_id = ::std::option::Option::Some(value);
6095 self
6096 }
6097 #[must_use]
6099 pub fn orgnl_msg_nm_id(mut self, value: Max35Text) -> OriginalGroupInformation29Builder {
6100 self.orgnl_msg_nm_id = ::std::option::Option::Some(value);
6101 self
6102 }
6103 #[must_use]
6105 pub fn orgnl_cre_dt_tm(mut self, value: ISODateTime) -> OriginalGroupInformation29Builder {
6106 self.orgnl_cre_dt_tm = ::std::option::Option::Some(value);
6107 self
6108 }
6109 pub fn build(
6121 self,
6122 ) -> ::std::result::Result<OriginalGroupInformation29, crate::common::BuilderError> {
6123 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6124 if self.orgnl_msg_id.is_none() {
6125 missing.push("orgnl_msg_id".to_owned());
6126 }
6127 if self.orgnl_msg_nm_id.is_none() {
6128 missing.push("orgnl_msg_nm_id".to_owned());
6129 }
6130 if !missing.is_empty() {
6131 return ::std::result::Result::Err(crate::common::BuilderError {
6132 type_name: "OriginalGroupInformation29".to_owned(),
6133 missing_fields: missing,
6134 });
6135 }
6136 ::std::result::Result::Ok(OriginalGroupInformation29 {
6137 orgnl_msg_id: self.orgnl_msg_id.unwrap(),
6138 orgnl_msg_nm_id: self.orgnl_msg_nm_id.unwrap(),
6139 orgnl_cre_dt_tm: self.orgnl_cre_dt_tm,
6140 })
6141 }
6142}
6143impl OriginalGroupInformation29 {
6144 #[must_use]
6146 pub fn builder() -> OriginalGroupInformation29Builder {
6147 OriginalGroupInformation29Builder::default()
6148 }
6149}
6150#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6151pub struct OriginalTransactionReference35 {
6152 #[serde(rename = "IntrBkSttlmAmt")]
6153 #[serde(skip_serializing_if = "Option::is_none")]
6154 pub intr_bk_sttlm_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
6155 #[serde(rename = "Amt")]
6156 #[serde(skip_serializing_if = "Option::is_none")]
6157 pub amt: Option<crate::common::ChoiceWrapper<AmountType4Choice>>,
6158 #[serde(rename = "IntrBkSttlmDt")]
6159 #[serde(skip_serializing_if = "Option::is_none")]
6160 pub intr_bk_sttlm_dt: Option<ISODate>,
6161 #[serde(rename = "ReqdColltnDt")]
6162 #[serde(skip_serializing_if = "Option::is_none")]
6163 pub reqd_colltn_dt: Option<ISODate>,
6164 #[serde(rename = "ReqdExctnDt")]
6165 #[serde(skip_serializing_if = "Option::is_none")]
6166 pub reqd_exctn_dt: Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
6167 #[serde(rename = "CdtrSchmeId")]
6168 #[serde(skip_serializing_if = "Option::is_none")]
6169 pub cdtr_schme_id: Option<PartyIdentification135>,
6170 #[serde(rename = "SttlmInf")]
6171 #[serde(skip_serializing_if = "Option::is_none")]
6172 pub sttlm_inf: Option<SettlementInstruction11>,
6173 #[serde(rename = "PmtTpInf")]
6174 #[serde(skip_serializing_if = "Option::is_none")]
6175 pub pmt_tp_inf: Option<PaymentTypeInformation27>,
6176 #[serde(rename = "PmtMtd")]
6177 #[serde(skip_serializing_if = "Option::is_none")]
6178 pub pmt_mtd: Option<PaymentMethod4Code>,
6179 #[serde(rename = "MndtRltdInf")]
6180 #[serde(skip_serializing_if = "Option::is_none")]
6181 pub mndt_rltd_inf: Option<crate::common::ChoiceWrapper<MandateRelatedData2Choice>>,
6182 #[serde(rename = "RmtInf")]
6183 #[serde(skip_serializing_if = "Option::is_none")]
6184 pub rmt_inf: Option<RemittanceInformation21>,
6185 #[serde(rename = "UltmtDbtr")]
6186 #[serde(skip_serializing_if = "Option::is_none")]
6187 pub ultmt_dbtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
6188 #[serde(rename = "Dbtr")]
6189 #[serde(skip_serializing_if = "Option::is_none")]
6190 pub dbtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
6191 #[serde(rename = "DbtrAcct")]
6192 #[serde(skip_serializing_if = "Option::is_none")]
6193 pub dbtr_acct: Option<CashAccount40>,
6194 #[serde(rename = "DbtrAgt")]
6195 #[serde(skip_serializing_if = "Option::is_none")]
6196 pub dbtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
6197 #[serde(rename = "DbtrAgtAcct")]
6198 #[serde(skip_serializing_if = "Option::is_none")]
6199 pub dbtr_agt_acct: Option<CashAccount40>,
6200 #[serde(rename = "CdtrAgt")]
6201 #[serde(skip_serializing_if = "Option::is_none")]
6202 pub cdtr_agt: Option<BranchAndFinancialInstitutionIdentification6>,
6203 #[serde(rename = "CdtrAgtAcct")]
6204 #[serde(skip_serializing_if = "Option::is_none")]
6205 pub cdtr_agt_acct: Option<CashAccount40>,
6206 #[serde(rename = "Cdtr")]
6207 #[serde(skip_serializing_if = "Option::is_none")]
6208 pub cdtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
6209 #[serde(rename = "CdtrAcct")]
6210 #[serde(skip_serializing_if = "Option::is_none")]
6211 pub cdtr_acct: Option<CashAccount40>,
6212 #[serde(rename = "UltmtCdtr")]
6213 #[serde(skip_serializing_if = "Option::is_none")]
6214 pub ultmt_cdtr: Option<crate::common::ChoiceWrapper<Party40Choice>>,
6215 #[serde(rename = "Purp")]
6216 #[serde(skip_serializing_if = "Option::is_none")]
6217 pub purp: Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
6218}
6219#[allow(clippy::struct_field_names)]
6221#[derive(Default)]
6222pub struct OriginalTransactionReference35Builder {
6223 intr_bk_sttlm_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
6224 amt: ::std::option::Option<crate::common::ChoiceWrapper<AmountType4Choice>>,
6225 intr_bk_sttlm_dt: ::std::option::Option<ISODate>,
6226 reqd_colltn_dt: ::std::option::Option<ISODate>,
6227 reqd_exctn_dt: ::std::option::Option<crate::common::ChoiceWrapper<DateAndDateTime2Choice>>,
6228 cdtr_schme_id: ::std::option::Option<PartyIdentification135>,
6229 sttlm_inf: ::std::option::Option<SettlementInstruction11>,
6230 pmt_tp_inf: ::std::option::Option<PaymentTypeInformation27>,
6231 pmt_mtd: ::std::option::Option<PaymentMethod4Code>,
6232 mndt_rltd_inf: ::std::option::Option<crate::common::ChoiceWrapper<MandateRelatedData2Choice>>,
6233 rmt_inf: ::std::option::Option<RemittanceInformation21>,
6234 ultmt_dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
6235 dbtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
6236 dbtr_acct: ::std::option::Option<CashAccount40>,
6237 dbtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
6238 dbtr_agt_acct: ::std::option::Option<CashAccount40>,
6239 cdtr_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
6240 cdtr_agt_acct: ::std::option::Option<CashAccount40>,
6241 cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
6242 cdtr_acct: ::std::option::Option<CashAccount40>,
6243 ultmt_cdtr: ::std::option::Option<crate::common::ChoiceWrapper<Party40Choice>>,
6244 purp: ::std::option::Option<crate::common::ChoiceWrapper<Purpose2Choice>>,
6245}
6246impl OriginalTransactionReference35Builder {
6247 #[must_use]
6249 pub fn intr_bk_sttlm_amt(
6250 mut self,
6251 value: ActiveOrHistoricCurrencyAndAmount,
6252 ) -> OriginalTransactionReference35Builder {
6253 self.intr_bk_sttlm_amt = ::std::option::Option::Some(value);
6254 self
6255 }
6256 #[must_use]
6258 pub fn amt(
6259 mut self,
6260 value: crate::common::ChoiceWrapper<AmountType4Choice>,
6261 ) -> OriginalTransactionReference35Builder {
6262 self.amt = ::std::option::Option::Some(value);
6263 self
6264 }
6265 #[must_use]
6267 pub fn intr_bk_sttlm_dt(mut self, value: ISODate) -> OriginalTransactionReference35Builder {
6268 self.intr_bk_sttlm_dt = ::std::option::Option::Some(value);
6269 self
6270 }
6271 #[must_use]
6273 pub fn reqd_colltn_dt(mut self, value: ISODate) -> OriginalTransactionReference35Builder {
6274 self.reqd_colltn_dt = ::std::option::Option::Some(value);
6275 self
6276 }
6277 #[must_use]
6279 pub fn reqd_exctn_dt(
6280 mut self,
6281 value: crate::common::ChoiceWrapper<DateAndDateTime2Choice>,
6282 ) -> OriginalTransactionReference35Builder {
6283 self.reqd_exctn_dt = ::std::option::Option::Some(value);
6284 self
6285 }
6286 #[must_use]
6288 pub fn cdtr_schme_id(
6289 mut self,
6290 value: PartyIdentification135,
6291 ) -> OriginalTransactionReference35Builder {
6292 self.cdtr_schme_id = ::std::option::Option::Some(value);
6293 self
6294 }
6295 #[must_use]
6297 pub fn sttlm_inf(
6298 mut self,
6299 value: SettlementInstruction11,
6300 ) -> OriginalTransactionReference35Builder {
6301 self.sttlm_inf = ::std::option::Option::Some(value);
6302 self
6303 }
6304 #[must_use]
6306 pub fn pmt_tp_inf(
6307 mut self,
6308 value: PaymentTypeInformation27,
6309 ) -> OriginalTransactionReference35Builder {
6310 self.pmt_tp_inf = ::std::option::Option::Some(value);
6311 self
6312 }
6313 #[must_use]
6315 pub fn pmt_mtd(mut self, value: PaymentMethod4Code) -> OriginalTransactionReference35Builder {
6316 self.pmt_mtd = ::std::option::Option::Some(value);
6317 self
6318 }
6319 #[must_use]
6321 pub fn mndt_rltd_inf(
6322 mut self,
6323 value: crate::common::ChoiceWrapper<MandateRelatedData2Choice>,
6324 ) -> OriginalTransactionReference35Builder {
6325 self.mndt_rltd_inf = ::std::option::Option::Some(value);
6326 self
6327 }
6328 #[must_use]
6330 pub fn rmt_inf(
6331 mut self,
6332 value: RemittanceInformation21,
6333 ) -> OriginalTransactionReference35Builder {
6334 self.rmt_inf = ::std::option::Option::Some(value);
6335 self
6336 }
6337 #[must_use]
6339 pub fn ultmt_dbtr(
6340 mut self,
6341 value: crate::common::ChoiceWrapper<Party40Choice>,
6342 ) -> OriginalTransactionReference35Builder {
6343 self.ultmt_dbtr = ::std::option::Option::Some(value);
6344 self
6345 }
6346 #[must_use]
6348 pub fn dbtr(
6349 mut self,
6350 value: crate::common::ChoiceWrapper<Party40Choice>,
6351 ) -> OriginalTransactionReference35Builder {
6352 self.dbtr = ::std::option::Option::Some(value);
6353 self
6354 }
6355 #[must_use]
6357 pub fn dbtr_acct(mut self, value: CashAccount40) -> OriginalTransactionReference35Builder {
6358 self.dbtr_acct = ::std::option::Option::Some(value);
6359 self
6360 }
6361 #[must_use]
6363 pub fn dbtr_agt(
6364 mut self,
6365 value: BranchAndFinancialInstitutionIdentification6,
6366 ) -> OriginalTransactionReference35Builder {
6367 self.dbtr_agt = ::std::option::Option::Some(value);
6368 self
6369 }
6370 #[must_use]
6372 pub fn dbtr_agt_acct(mut self, value: CashAccount40) -> OriginalTransactionReference35Builder {
6373 self.dbtr_agt_acct = ::std::option::Option::Some(value);
6374 self
6375 }
6376 #[must_use]
6378 pub fn cdtr_agt(
6379 mut self,
6380 value: BranchAndFinancialInstitutionIdentification6,
6381 ) -> OriginalTransactionReference35Builder {
6382 self.cdtr_agt = ::std::option::Option::Some(value);
6383 self
6384 }
6385 #[must_use]
6387 pub fn cdtr_agt_acct(mut self, value: CashAccount40) -> OriginalTransactionReference35Builder {
6388 self.cdtr_agt_acct = ::std::option::Option::Some(value);
6389 self
6390 }
6391 #[must_use]
6393 pub fn cdtr(
6394 mut self,
6395 value: crate::common::ChoiceWrapper<Party40Choice>,
6396 ) -> OriginalTransactionReference35Builder {
6397 self.cdtr = ::std::option::Option::Some(value);
6398 self
6399 }
6400 #[must_use]
6402 pub fn cdtr_acct(mut self, value: CashAccount40) -> OriginalTransactionReference35Builder {
6403 self.cdtr_acct = ::std::option::Option::Some(value);
6404 self
6405 }
6406 #[must_use]
6408 pub fn ultmt_cdtr(
6409 mut self,
6410 value: crate::common::ChoiceWrapper<Party40Choice>,
6411 ) -> OriginalTransactionReference35Builder {
6412 self.ultmt_cdtr = ::std::option::Option::Some(value);
6413 self
6414 }
6415 #[must_use]
6417 pub fn purp(
6418 mut self,
6419 value: crate::common::ChoiceWrapper<Purpose2Choice>,
6420 ) -> OriginalTransactionReference35Builder {
6421 self.purp = ::std::option::Option::Some(value);
6422 self
6423 }
6424 pub fn build(
6436 self,
6437 ) -> ::std::result::Result<OriginalTransactionReference35, crate::common::BuilderError> {
6438 ::std::result::Result::Ok(OriginalTransactionReference35 {
6439 intr_bk_sttlm_amt: self.intr_bk_sttlm_amt,
6440 amt: self.amt,
6441 intr_bk_sttlm_dt: self.intr_bk_sttlm_dt,
6442 reqd_colltn_dt: self.reqd_colltn_dt,
6443 reqd_exctn_dt: self.reqd_exctn_dt,
6444 cdtr_schme_id: self.cdtr_schme_id,
6445 sttlm_inf: self.sttlm_inf,
6446 pmt_tp_inf: self.pmt_tp_inf,
6447 pmt_mtd: self.pmt_mtd,
6448 mndt_rltd_inf: self.mndt_rltd_inf,
6449 rmt_inf: self.rmt_inf,
6450 ultmt_dbtr: self.ultmt_dbtr,
6451 dbtr: self.dbtr,
6452 dbtr_acct: self.dbtr_acct,
6453 dbtr_agt: self.dbtr_agt,
6454 dbtr_agt_acct: self.dbtr_agt_acct,
6455 cdtr_agt: self.cdtr_agt,
6456 cdtr_agt_acct: self.cdtr_agt_acct,
6457 cdtr: self.cdtr,
6458 cdtr_acct: self.cdtr_acct,
6459 ultmt_cdtr: self.ultmt_cdtr,
6460 purp: self.purp,
6461 })
6462 }
6463}
6464impl OriginalTransactionReference35 {
6465 #[must_use]
6467 pub fn builder() -> OriginalTransactionReference35Builder {
6468 OriginalTransactionReference35Builder::default()
6469 }
6470}
6471#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6472pub struct OtherContact1 {
6473 #[serde(rename = "ChanlTp")]
6474 pub chanl_tp: Max4Text,
6475 #[serde(rename = "Id")]
6476 #[serde(skip_serializing_if = "Option::is_none")]
6477 pub id: Option<Max128Text>,
6478}
6479#[allow(clippy::struct_field_names)]
6481#[derive(Default)]
6482pub struct OtherContact1Builder {
6483 chanl_tp: ::std::option::Option<Max4Text>,
6484 id: ::std::option::Option<Max128Text>,
6485}
6486impl OtherContact1Builder {
6487 #[must_use]
6489 pub fn chanl_tp(mut self, value: Max4Text) -> OtherContact1Builder {
6490 self.chanl_tp = ::std::option::Option::Some(value);
6491 self
6492 }
6493 #[must_use]
6495 pub fn id(mut self, value: Max128Text) -> OtherContact1Builder {
6496 self.id = ::std::option::Option::Some(value);
6497 self
6498 }
6499 pub fn build(self) -> ::std::result::Result<OtherContact1, crate::common::BuilderError> {
6511 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
6512 if self.chanl_tp.is_none() {
6513 missing.push("chanl_tp".to_owned());
6514 }
6515 if !missing.is_empty() {
6516 return ::std::result::Result::Err(crate::common::BuilderError {
6517 type_name: "OtherContact1".to_owned(),
6518 missing_fields: missing,
6519 });
6520 }
6521 ::std::result::Result::Ok(OtherContact1 {
6522 chanl_tp: self.chanl_tp.unwrap(),
6523 id: self.id,
6524 })
6525 }
6526}
6527impl OtherContact1 {
6528 #[must_use]
6530 pub fn builder() -> OtherContact1Builder {
6531 OtherContact1Builder::default()
6532 }
6533}
6534#[allow(clippy::large_enum_variant)]
6535#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6536pub enum Party38Choice {
6537 #[serde(rename = "OrgId")]
6538 OrgId(OrganisationIdentification29),
6539 #[serde(rename = "PrvtId")]
6540 PrvtId(PersonIdentification13),
6541}
6542#[allow(clippy::large_enum_variant)]
6543#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6544pub enum Party40Choice {
6545 #[serde(rename = "Pty")]
6546 Pty(PartyIdentification135),
6547 #[serde(rename = "Agt")]
6548 Agt(BranchAndFinancialInstitutionIdentification6),
6549}
6550#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6551pub struct PartyIdentification135 {
6552 #[serde(rename = "Nm")]
6553 #[serde(skip_serializing_if = "Option::is_none")]
6554 pub nm: Option<Max140Text>,
6555 #[serde(rename = "PstlAdr")]
6556 #[serde(skip_serializing_if = "Option::is_none")]
6557 pub pstl_adr: Option<PostalAddress24>,
6558 #[serde(rename = "Id")]
6559 #[serde(skip_serializing_if = "Option::is_none")]
6560 pub id: Option<crate::common::ChoiceWrapper<Party38Choice>>,
6561 #[serde(rename = "CtryOfRes")]
6562 #[serde(skip_serializing_if = "Option::is_none")]
6563 pub ctry_of_res: Option<CountryCode>,
6564 #[serde(rename = "CtctDtls")]
6565 #[serde(skip_serializing_if = "Option::is_none")]
6566 pub ctct_dtls: Option<Contact4>,
6567}
6568#[allow(clippy::struct_field_names)]
6570#[derive(Default)]
6571pub struct PartyIdentification135Builder {
6572 nm: ::std::option::Option<Max140Text>,
6573 pstl_adr: ::std::option::Option<PostalAddress24>,
6574 id: ::std::option::Option<crate::common::ChoiceWrapper<Party38Choice>>,
6575 ctry_of_res: ::std::option::Option<CountryCode>,
6576 ctct_dtls: ::std::option::Option<Contact4>,
6577}
6578impl PartyIdentification135Builder {
6579 #[must_use]
6581 pub fn nm(mut self, value: Max140Text) -> PartyIdentification135Builder {
6582 self.nm = ::std::option::Option::Some(value);
6583 self
6584 }
6585 #[must_use]
6587 pub fn pstl_adr(mut self, value: PostalAddress24) -> PartyIdentification135Builder {
6588 self.pstl_adr = ::std::option::Option::Some(value);
6589 self
6590 }
6591 #[must_use]
6593 pub fn id(
6594 mut self,
6595 value: crate::common::ChoiceWrapper<Party38Choice>,
6596 ) -> PartyIdentification135Builder {
6597 self.id = ::std::option::Option::Some(value);
6598 self
6599 }
6600 #[must_use]
6602 pub fn ctry_of_res(mut self, value: CountryCode) -> PartyIdentification135Builder {
6603 self.ctry_of_res = ::std::option::Option::Some(value);
6604 self
6605 }
6606 #[must_use]
6608 pub fn ctct_dtls(mut self, value: Contact4) -> PartyIdentification135Builder {
6609 self.ctct_dtls = ::std::option::Option::Some(value);
6610 self
6611 }
6612 pub fn build(
6624 self,
6625 ) -> ::std::result::Result<PartyIdentification135, crate::common::BuilderError> {
6626 ::std::result::Result::Ok(PartyIdentification135 {
6627 nm: self.nm,
6628 pstl_adr: self.pstl_adr,
6629 id: self.id,
6630 ctry_of_res: self.ctry_of_res,
6631 ctct_dtls: self.ctct_dtls,
6632 })
6633 }
6634}
6635impl PartyIdentification135 {
6636 #[must_use]
6638 pub fn builder() -> PartyIdentification135Builder {
6639 PartyIdentification135Builder::default()
6640 }
6641}
6642#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6643pub struct PaymentTransaction131 {
6644 #[serde(rename = "StsReqId")]
6645 #[serde(skip_serializing_if = "Option::is_none")]
6646 pub sts_req_id: Option<Max35Text>,
6647 #[serde(rename = "OrgnlGrpInf")]
6648 #[serde(skip_serializing_if = "Option::is_none")]
6649 pub orgnl_grp_inf: Option<OriginalGroupInformation29>,
6650 #[serde(rename = "OrgnlInstrId")]
6651 #[serde(skip_serializing_if = "Option::is_none")]
6652 pub orgnl_instr_id: Option<Max35Text>,
6653 #[serde(rename = "OrgnlEndToEndId")]
6654 #[serde(skip_serializing_if = "Option::is_none")]
6655 pub orgnl_end_to_end_id: Option<Max35Text>,
6656 #[serde(rename = "OrgnlTxId")]
6657 #[serde(skip_serializing_if = "Option::is_none")]
6658 pub orgnl_tx_id: Option<Max35Text>,
6659 #[serde(rename = "OrgnlUETR")]
6660 #[serde(skip_serializing_if = "Option::is_none")]
6661 pub orgnl_uetr: Option<UUIDv4Identifier>,
6662 #[serde(rename = "AccptncDtTm")]
6663 #[serde(skip_serializing_if = "Option::is_none")]
6664 pub accptnc_dt_tm: Option<ISODateTime>,
6665 #[serde(rename = "ClrSysRef")]
6666 #[serde(skip_serializing_if = "Option::is_none")]
6667 pub clr_sys_ref: Option<Max35Text>,
6668 #[serde(rename = "InstgAgt")]
6669 #[serde(skip_serializing_if = "Option::is_none")]
6670 pub instg_agt: Option<BranchAndFinancialInstitutionIdentification6>,
6671 #[serde(rename = "InstdAgt")]
6672 #[serde(skip_serializing_if = "Option::is_none")]
6673 pub instd_agt: Option<BranchAndFinancialInstitutionIdentification6>,
6674 #[serde(rename = "OrgnlTxRef")]
6675 #[serde(skip_serializing_if = "Option::is_none")]
6676 pub orgnl_tx_ref: Option<OriginalTransactionReference35>,
6677 #[serde(rename = "SplmtryData")]
6678 #[serde(default)]
6679 #[serde(skip_serializing_if = "Vec::is_empty")]
6680 pub splmtry_data: Vec<SupplementaryData1>,
6681}
6682#[allow(clippy::struct_field_names)]
6684#[derive(Default)]
6685pub struct PaymentTransaction131Builder {
6686 sts_req_id: ::std::option::Option<Max35Text>,
6687 orgnl_grp_inf: ::std::option::Option<OriginalGroupInformation29>,
6688 orgnl_instr_id: ::std::option::Option<Max35Text>,
6689 orgnl_end_to_end_id: ::std::option::Option<Max35Text>,
6690 orgnl_tx_id: ::std::option::Option<Max35Text>,
6691 orgnl_uetr: ::std::option::Option<UUIDv4Identifier>,
6692 accptnc_dt_tm: ::std::option::Option<ISODateTime>,
6693 clr_sys_ref: ::std::option::Option<Max35Text>,
6694 instg_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
6695 instd_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
6696 orgnl_tx_ref: ::std::option::Option<OriginalTransactionReference35>,
6697 splmtry_data: ::std::vec::Vec<SupplementaryData1>,
6698}
6699impl PaymentTransaction131Builder {
6700 #[must_use]
6702 pub fn sts_req_id(mut self, value: Max35Text) -> PaymentTransaction131Builder {
6703 self.sts_req_id = ::std::option::Option::Some(value);
6704 self
6705 }
6706 #[must_use]
6708 pub fn orgnl_grp_inf(
6709 mut self,
6710 value: OriginalGroupInformation29,
6711 ) -> PaymentTransaction131Builder {
6712 self.orgnl_grp_inf = ::std::option::Option::Some(value);
6713 self
6714 }
6715 #[must_use]
6717 pub fn orgnl_instr_id(mut self, value: Max35Text) -> PaymentTransaction131Builder {
6718 self.orgnl_instr_id = ::std::option::Option::Some(value);
6719 self
6720 }
6721 #[must_use]
6723 pub fn orgnl_end_to_end_id(mut self, value: Max35Text) -> PaymentTransaction131Builder {
6724 self.orgnl_end_to_end_id = ::std::option::Option::Some(value);
6725 self
6726 }
6727 #[must_use]
6729 pub fn orgnl_tx_id(mut self, value: Max35Text) -> PaymentTransaction131Builder {
6730 self.orgnl_tx_id = ::std::option::Option::Some(value);
6731 self
6732 }
6733 #[must_use]
6735 pub fn orgnl_uetr(mut self, value: UUIDv4Identifier) -> PaymentTransaction131Builder {
6736 self.orgnl_uetr = ::std::option::Option::Some(value);
6737 self
6738 }
6739 #[must_use]
6741 pub fn accptnc_dt_tm(mut self, value: ISODateTime) -> PaymentTransaction131Builder {
6742 self.accptnc_dt_tm = ::std::option::Option::Some(value);
6743 self
6744 }
6745 #[must_use]
6747 pub fn clr_sys_ref(mut self, value: Max35Text) -> PaymentTransaction131Builder {
6748 self.clr_sys_ref = ::std::option::Option::Some(value);
6749 self
6750 }
6751 #[must_use]
6753 pub fn instg_agt(
6754 mut self,
6755 value: BranchAndFinancialInstitutionIdentification6,
6756 ) -> PaymentTransaction131Builder {
6757 self.instg_agt = ::std::option::Option::Some(value);
6758 self
6759 }
6760 #[must_use]
6762 pub fn instd_agt(
6763 mut self,
6764 value: BranchAndFinancialInstitutionIdentification6,
6765 ) -> PaymentTransaction131Builder {
6766 self.instd_agt = ::std::option::Option::Some(value);
6767 self
6768 }
6769 #[must_use]
6771 pub fn orgnl_tx_ref(
6772 mut self,
6773 value: OriginalTransactionReference35,
6774 ) -> PaymentTransaction131Builder {
6775 self.orgnl_tx_ref = ::std::option::Option::Some(value);
6776 self
6777 }
6778 #[must_use]
6780 pub fn splmtry_data(
6781 mut self,
6782 value: ::std::vec::Vec<SupplementaryData1>,
6783 ) -> PaymentTransaction131Builder {
6784 self.splmtry_data = value;
6785 self
6786 }
6787 #[must_use]
6789 pub fn add_splmtry_data(mut self, value: SupplementaryData1) -> PaymentTransaction131Builder {
6790 self.splmtry_data.push(value);
6791 self
6792 }
6793 pub fn build(
6805 self,
6806 ) -> ::std::result::Result<PaymentTransaction131, crate::common::BuilderError> {
6807 ::std::result::Result::Ok(PaymentTransaction131 {
6808 sts_req_id: self.sts_req_id,
6809 orgnl_grp_inf: self.orgnl_grp_inf,
6810 orgnl_instr_id: self.orgnl_instr_id,
6811 orgnl_end_to_end_id: self.orgnl_end_to_end_id,
6812 orgnl_tx_id: self.orgnl_tx_id,
6813 orgnl_uetr: self.orgnl_uetr,
6814 accptnc_dt_tm: self.accptnc_dt_tm,
6815 clr_sys_ref: self.clr_sys_ref,
6816 instg_agt: self.instg_agt,
6817 instd_agt: self.instd_agt,
6818 orgnl_tx_ref: self.orgnl_tx_ref,
6819 splmtry_data: self.splmtry_data,
6820 })
6821 }
6822}
6823impl PaymentTransaction131 {
6824 #[must_use]
6826 pub fn builder() -> PaymentTransaction131Builder {
6827 PaymentTransaction131Builder::default()
6828 }
6829}
6830#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6831pub struct PaymentTypeInformation27 {
6832 #[serde(rename = "InstrPrty")]
6833 #[serde(skip_serializing_if = "Option::is_none")]
6834 pub instr_prty: Option<Priority2Code>,
6835 #[serde(rename = "ClrChanl")]
6836 #[serde(skip_serializing_if = "Option::is_none")]
6837 pub clr_chanl: Option<ClearingChannel2Code>,
6838 #[serde(rename = "SvcLvl")]
6839 #[serde(default)]
6840 #[serde(skip_serializing_if = "Vec::is_empty")]
6841 pub svc_lvl: Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6842 #[serde(rename = "LclInstrm")]
6843 #[serde(skip_serializing_if = "Option::is_none")]
6844 pub lcl_instrm: Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6845 #[serde(rename = "SeqTp")]
6846 #[serde(skip_serializing_if = "Option::is_none")]
6847 pub seq_tp: Option<SequenceType3Code>,
6848 #[serde(rename = "CtgyPurp")]
6849 #[serde(skip_serializing_if = "Option::is_none")]
6850 pub ctgy_purp: Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6851}
6852#[allow(clippy::struct_field_names)]
6854#[derive(Default)]
6855pub struct PaymentTypeInformation27Builder {
6856 instr_prty: ::std::option::Option<Priority2Code>,
6857 clr_chanl: ::std::option::Option<ClearingChannel2Code>,
6858 svc_lvl: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6859 lcl_instrm: ::std::option::Option<crate::common::ChoiceWrapper<LocalInstrument2Choice>>,
6860 seq_tp: ::std::option::Option<SequenceType3Code>,
6861 ctgy_purp: ::std::option::Option<crate::common::ChoiceWrapper<CategoryPurpose1Choice>>,
6862}
6863impl PaymentTypeInformation27Builder {
6864 #[must_use]
6866 pub fn instr_prty(mut self, value: Priority2Code) -> PaymentTypeInformation27Builder {
6867 self.instr_prty = ::std::option::Option::Some(value);
6868 self
6869 }
6870 #[must_use]
6872 pub fn clr_chanl(mut self, value: ClearingChannel2Code) -> PaymentTypeInformation27Builder {
6873 self.clr_chanl = ::std::option::Option::Some(value);
6874 self
6875 }
6876 #[must_use]
6878 pub fn svc_lvl(
6879 mut self,
6880 value: ::std::vec::Vec<crate::common::ChoiceWrapper<ServiceLevel8Choice>>,
6881 ) -> PaymentTypeInformation27Builder {
6882 self.svc_lvl = value;
6883 self
6884 }
6885 #[must_use]
6887 pub fn add_svc_lvl(
6888 mut self,
6889 value: crate::common::ChoiceWrapper<ServiceLevel8Choice>,
6890 ) -> PaymentTypeInformation27Builder {
6891 self.svc_lvl.push(value);
6892 self
6893 }
6894 #[must_use]
6896 pub fn lcl_instrm(
6897 mut self,
6898 value: crate::common::ChoiceWrapper<LocalInstrument2Choice>,
6899 ) -> PaymentTypeInformation27Builder {
6900 self.lcl_instrm = ::std::option::Option::Some(value);
6901 self
6902 }
6903 #[must_use]
6905 pub fn seq_tp(mut self, value: SequenceType3Code) -> PaymentTypeInformation27Builder {
6906 self.seq_tp = ::std::option::Option::Some(value);
6907 self
6908 }
6909 #[must_use]
6911 pub fn ctgy_purp(
6912 mut self,
6913 value: crate::common::ChoiceWrapper<CategoryPurpose1Choice>,
6914 ) -> PaymentTypeInformation27Builder {
6915 self.ctgy_purp = ::std::option::Option::Some(value);
6916 self
6917 }
6918 pub fn build(
6930 self,
6931 ) -> ::std::result::Result<PaymentTypeInformation27, crate::common::BuilderError> {
6932 ::std::result::Result::Ok(PaymentTypeInformation27 {
6933 instr_prty: self.instr_prty,
6934 clr_chanl: self.clr_chanl,
6935 svc_lvl: self.svc_lvl,
6936 lcl_instrm: self.lcl_instrm,
6937 seq_tp: self.seq_tp,
6938 ctgy_purp: self.ctgy_purp,
6939 })
6940 }
6941}
6942impl PaymentTypeInformation27 {
6943 #[must_use]
6945 pub fn builder() -> PaymentTypeInformation27Builder {
6946 PaymentTypeInformation27Builder::default()
6947 }
6948}
6949#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
6950pub struct PersonIdentification13 {
6951 #[serde(rename = "DtAndPlcOfBirth")]
6952 #[serde(skip_serializing_if = "Option::is_none")]
6953 pub dt_and_plc_of_birth: Option<DateAndPlaceOfBirth1>,
6954 #[serde(rename = "Othr")]
6955 #[serde(default)]
6956 #[serde(skip_serializing_if = "Vec::is_empty")]
6957 pub othr: Vec<GenericPersonIdentification1>,
6958}
6959#[allow(clippy::struct_field_names)]
6961#[derive(Default)]
6962pub struct PersonIdentification13Builder {
6963 dt_and_plc_of_birth: ::std::option::Option<DateAndPlaceOfBirth1>,
6964 othr: ::std::vec::Vec<GenericPersonIdentification1>,
6965}
6966impl PersonIdentification13Builder {
6967 #[must_use]
6969 pub fn dt_and_plc_of_birth(
6970 mut self,
6971 value: DateAndPlaceOfBirth1,
6972 ) -> PersonIdentification13Builder {
6973 self.dt_and_plc_of_birth = ::std::option::Option::Some(value);
6974 self
6975 }
6976 #[must_use]
6978 pub fn othr(
6979 mut self,
6980 value: ::std::vec::Vec<GenericPersonIdentification1>,
6981 ) -> PersonIdentification13Builder {
6982 self.othr = value;
6983 self
6984 }
6985 #[must_use]
6987 pub fn add_othr(
6988 mut self,
6989 value: GenericPersonIdentification1,
6990 ) -> PersonIdentification13Builder {
6991 self.othr.push(value);
6992 self
6993 }
6994 pub fn build(
7006 self,
7007 ) -> ::std::result::Result<PersonIdentification13, crate::common::BuilderError> {
7008 ::std::result::Result::Ok(PersonIdentification13 {
7009 dt_and_plc_of_birth: self.dt_and_plc_of_birth,
7010 othr: self.othr,
7011 })
7012 }
7013}
7014impl PersonIdentification13 {
7015 #[must_use]
7017 pub fn builder() -> PersonIdentification13Builder {
7018 PersonIdentification13Builder::default()
7019 }
7020}
7021#[allow(clippy::large_enum_variant)]
7022#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7023pub enum PersonIdentificationSchemeName1Choice {
7024 #[serde(rename = "Cd")]
7025 Cd(ExternalPersonIdentification1Code),
7026 #[serde(rename = "Prtry")]
7027 Prtry(Max35Text),
7028}
7029#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7030pub struct PostalAddress24 {
7031 #[serde(rename = "AdrTp")]
7032 #[serde(skip_serializing_if = "Option::is_none")]
7033 pub adr_tp: Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
7034 #[serde(rename = "Dept")]
7035 #[serde(skip_serializing_if = "Option::is_none")]
7036 pub dept: Option<Max70Text>,
7037 #[serde(rename = "SubDept")]
7038 #[serde(skip_serializing_if = "Option::is_none")]
7039 pub sub_dept: Option<Max70Text>,
7040 #[serde(rename = "StrtNm")]
7041 #[serde(skip_serializing_if = "Option::is_none")]
7042 pub strt_nm: Option<Max70Text>,
7043 #[serde(rename = "BldgNb")]
7044 #[serde(skip_serializing_if = "Option::is_none")]
7045 pub bldg_nb: Option<Max16Text>,
7046 #[serde(rename = "BldgNm")]
7047 #[serde(skip_serializing_if = "Option::is_none")]
7048 pub bldg_nm: Option<Max35Text>,
7049 #[serde(rename = "Flr")]
7050 #[serde(skip_serializing_if = "Option::is_none")]
7051 pub flr: Option<Max70Text>,
7052 #[serde(rename = "PstBx")]
7053 #[serde(skip_serializing_if = "Option::is_none")]
7054 pub pst_bx: Option<Max16Text>,
7055 #[serde(rename = "Room")]
7056 #[serde(skip_serializing_if = "Option::is_none")]
7057 pub room: Option<Max70Text>,
7058 #[serde(rename = "PstCd")]
7059 #[serde(skip_serializing_if = "Option::is_none")]
7060 pub pst_cd: Option<Max16Text>,
7061 #[serde(rename = "TwnNm")]
7062 #[serde(skip_serializing_if = "Option::is_none")]
7063 pub twn_nm: Option<Max35Text>,
7064 #[serde(rename = "TwnLctnNm")]
7065 #[serde(skip_serializing_if = "Option::is_none")]
7066 pub twn_lctn_nm: Option<Max35Text>,
7067 #[serde(rename = "DstrctNm")]
7068 #[serde(skip_serializing_if = "Option::is_none")]
7069 pub dstrct_nm: Option<Max35Text>,
7070 #[serde(rename = "CtrySubDvsn")]
7071 #[serde(skip_serializing_if = "Option::is_none")]
7072 pub ctry_sub_dvsn: Option<Max35Text>,
7073 #[serde(rename = "Ctry")]
7074 #[serde(skip_serializing_if = "Option::is_none")]
7075 pub ctry: Option<CountryCode>,
7076 #[serde(rename = "AdrLine")]
7077 #[serde(default)]
7079 #[serde(skip_serializing_if = "Vec::is_empty")]
7080 pub adr_line: Vec<Max70Text>,
7081}
7082#[allow(clippy::struct_field_names)]
7084#[derive(Default)]
7085pub struct PostalAddress24Builder {
7086 adr_tp: ::std::option::Option<crate::common::ChoiceWrapper<AddressType3Choice>>,
7087 dept: ::std::option::Option<Max70Text>,
7088 sub_dept: ::std::option::Option<Max70Text>,
7089 strt_nm: ::std::option::Option<Max70Text>,
7090 bldg_nb: ::std::option::Option<Max16Text>,
7091 bldg_nm: ::std::option::Option<Max35Text>,
7092 flr: ::std::option::Option<Max70Text>,
7093 pst_bx: ::std::option::Option<Max16Text>,
7094 room: ::std::option::Option<Max70Text>,
7095 pst_cd: ::std::option::Option<Max16Text>,
7096 twn_nm: ::std::option::Option<Max35Text>,
7097 twn_lctn_nm: ::std::option::Option<Max35Text>,
7098 dstrct_nm: ::std::option::Option<Max35Text>,
7099 ctry_sub_dvsn: ::std::option::Option<Max35Text>,
7100 ctry: ::std::option::Option<CountryCode>,
7101 adr_line: ::std::vec::Vec<Max70Text>,
7102}
7103impl PostalAddress24Builder {
7104 #[must_use]
7106 pub fn adr_tp(
7107 mut self,
7108 value: crate::common::ChoiceWrapper<AddressType3Choice>,
7109 ) -> PostalAddress24Builder {
7110 self.adr_tp = ::std::option::Option::Some(value);
7111 self
7112 }
7113 #[must_use]
7115 pub fn dept(mut self, value: Max70Text) -> PostalAddress24Builder {
7116 self.dept = ::std::option::Option::Some(value);
7117 self
7118 }
7119 #[must_use]
7121 pub fn sub_dept(mut self, value: Max70Text) -> PostalAddress24Builder {
7122 self.sub_dept = ::std::option::Option::Some(value);
7123 self
7124 }
7125 #[must_use]
7127 pub fn strt_nm(mut self, value: Max70Text) -> PostalAddress24Builder {
7128 self.strt_nm = ::std::option::Option::Some(value);
7129 self
7130 }
7131 #[must_use]
7133 pub fn bldg_nb(mut self, value: Max16Text) -> PostalAddress24Builder {
7134 self.bldg_nb = ::std::option::Option::Some(value);
7135 self
7136 }
7137 #[must_use]
7139 pub fn bldg_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
7140 self.bldg_nm = ::std::option::Option::Some(value);
7141 self
7142 }
7143 #[must_use]
7145 pub fn flr(mut self, value: Max70Text) -> PostalAddress24Builder {
7146 self.flr = ::std::option::Option::Some(value);
7147 self
7148 }
7149 #[must_use]
7151 pub fn pst_bx(mut self, value: Max16Text) -> PostalAddress24Builder {
7152 self.pst_bx = ::std::option::Option::Some(value);
7153 self
7154 }
7155 #[must_use]
7157 pub fn room(mut self, value: Max70Text) -> PostalAddress24Builder {
7158 self.room = ::std::option::Option::Some(value);
7159 self
7160 }
7161 #[must_use]
7163 pub fn pst_cd(mut self, value: Max16Text) -> PostalAddress24Builder {
7164 self.pst_cd = ::std::option::Option::Some(value);
7165 self
7166 }
7167 #[must_use]
7169 pub fn twn_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
7170 self.twn_nm = ::std::option::Option::Some(value);
7171 self
7172 }
7173 #[must_use]
7175 pub fn twn_lctn_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
7176 self.twn_lctn_nm = ::std::option::Option::Some(value);
7177 self
7178 }
7179 #[must_use]
7181 pub fn dstrct_nm(mut self, value: Max35Text) -> PostalAddress24Builder {
7182 self.dstrct_nm = ::std::option::Option::Some(value);
7183 self
7184 }
7185 #[must_use]
7187 pub fn ctry_sub_dvsn(mut self, value: Max35Text) -> PostalAddress24Builder {
7188 self.ctry_sub_dvsn = ::std::option::Option::Some(value);
7189 self
7190 }
7191 #[must_use]
7193 pub fn ctry(mut self, value: CountryCode) -> PostalAddress24Builder {
7194 self.ctry = ::std::option::Option::Some(value);
7195 self
7196 }
7197 #[must_use]
7199 pub fn adr_line(mut self, value: ::std::vec::Vec<Max70Text>) -> PostalAddress24Builder {
7200 self.adr_line = value;
7201 self
7202 }
7203 #[must_use]
7205 pub fn add_adr_line(mut self, value: Max70Text) -> PostalAddress24Builder {
7206 self.adr_line.push(value);
7207 self
7208 }
7209 pub fn build(self) -> ::std::result::Result<PostalAddress24, crate::common::BuilderError> {
7221 ::std::result::Result::Ok(PostalAddress24 {
7222 adr_tp: self.adr_tp,
7223 dept: self.dept,
7224 sub_dept: self.sub_dept,
7225 strt_nm: self.strt_nm,
7226 bldg_nb: self.bldg_nb,
7227 bldg_nm: self.bldg_nm,
7228 flr: self.flr,
7229 pst_bx: self.pst_bx,
7230 room: self.room,
7231 pst_cd: self.pst_cd,
7232 twn_nm: self.twn_nm,
7233 twn_lctn_nm: self.twn_lctn_nm,
7234 dstrct_nm: self.dstrct_nm,
7235 ctry_sub_dvsn: self.ctry_sub_dvsn,
7236 ctry: self.ctry,
7237 adr_line: self.adr_line,
7238 })
7239 }
7240}
7241impl PostalAddress24 {
7242 #[must_use]
7244 pub fn builder() -> PostalAddress24Builder {
7245 PostalAddress24Builder::default()
7246 }
7247}
7248#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7249pub struct ProxyAccountIdentification1 {
7250 #[serde(rename = "Tp")]
7251 #[serde(skip_serializing_if = "Option::is_none")]
7252 pub tp: Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
7253 #[serde(rename = "Id")]
7254 pub id: Max2048Text,
7255}
7256#[allow(clippy::struct_field_names)]
7258#[derive(Default)]
7259pub struct ProxyAccountIdentification1Builder {
7260 tp: ::std::option::Option<crate::common::ChoiceWrapper<ProxyAccountType1Choice>>,
7261 id: ::std::option::Option<Max2048Text>,
7262}
7263impl ProxyAccountIdentification1Builder {
7264 #[must_use]
7266 pub fn tp(
7267 mut self,
7268 value: crate::common::ChoiceWrapper<ProxyAccountType1Choice>,
7269 ) -> ProxyAccountIdentification1Builder {
7270 self.tp = ::std::option::Option::Some(value);
7271 self
7272 }
7273 #[must_use]
7275 pub fn id(mut self, value: Max2048Text) -> ProxyAccountIdentification1Builder {
7276 self.id = ::std::option::Option::Some(value);
7277 self
7278 }
7279 pub fn build(
7291 self,
7292 ) -> ::std::result::Result<ProxyAccountIdentification1, crate::common::BuilderError> {
7293 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7294 if self.id.is_none() {
7295 missing.push("id".to_owned());
7296 }
7297 if !missing.is_empty() {
7298 return ::std::result::Result::Err(crate::common::BuilderError {
7299 type_name: "ProxyAccountIdentification1".to_owned(),
7300 missing_fields: missing,
7301 });
7302 }
7303 ::std::result::Result::Ok(ProxyAccountIdentification1 {
7304 tp: self.tp,
7305 id: self.id.unwrap(),
7306 })
7307 }
7308}
7309impl ProxyAccountIdentification1 {
7310 #[must_use]
7312 pub fn builder() -> ProxyAccountIdentification1Builder {
7313 ProxyAccountIdentification1Builder::default()
7314 }
7315}
7316#[allow(clippy::large_enum_variant)]
7317#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7318pub enum ProxyAccountType1Choice {
7319 #[serde(rename = "Cd")]
7320 Cd(ExternalProxyAccountType1Code),
7321 #[serde(rename = "Prtry")]
7322 Prtry(Max35Text),
7323}
7324#[allow(clippy::large_enum_variant)]
7325#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7326pub enum Purpose2Choice {
7327 #[serde(rename = "Cd")]
7328 Cd(ExternalPurpose1Code),
7329 #[serde(rename = "Prtry")]
7330 Prtry(Max35Text),
7331}
7332#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7333pub struct ReferredDocumentInformation7 {
7334 #[serde(rename = "Tp")]
7335 #[serde(skip_serializing_if = "Option::is_none")]
7336 pub tp: Option<ReferredDocumentType4>,
7337 #[serde(rename = "Nb")]
7338 #[serde(skip_serializing_if = "Option::is_none")]
7339 pub nb: Option<Max35Text>,
7340 #[serde(rename = "RltdDt")]
7341 #[serde(skip_serializing_if = "Option::is_none")]
7342 pub rltd_dt: Option<ISODate>,
7343 #[serde(rename = "LineDtls")]
7344 #[serde(default)]
7345 #[serde(skip_serializing_if = "Vec::is_empty")]
7346 pub line_dtls: Vec<DocumentLineInformation1>,
7347}
7348#[allow(clippy::struct_field_names)]
7350#[derive(Default)]
7351pub struct ReferredDocumentInformation7Builder {
7352 tp: ::std::option::Option<ReferredDocumentType4>,
7353 nb: ::std::option::Option<Max35Text>,
7354 rltd_dt: ::std::option::Option<ISODate>,
7355 line_dtls: ::std::vec::Vec<DocumentLineInformation1>,
7356}
7357impl ReferredDocumentInformation7Builder {
7358 #[must_use]
7360 pub fn tp(mut self, value: ReferredDocumentType4) -> ReferredDocumentInformation7Builder {
7361 self.tp = ::std::option::Option::Some(value);
7362 self
7363 }
7364 #[must_use]
7366 pub fn nb(mut self, value: Max35Text) -> ReferredDocumentInformation7Builder {
7367 self.nb = ::std::option::Option::Some(value);
7368 self
7369 }
7370 #[must_use]
7372 pub fn rltd_dt(mut self, value: ISODate) -> ReferredDocumentInformation7Builder {
7373 self.rltd_dt = ::std::option::Option::Some(value);
7374 self
7375 }
7376 #[must_use]
7378 pub fn line_dtls(
7379 mut self,
7380 value: ::std::vec::Vec<DocumentLineInformation1>,
7381 ) -> ReferredDocumentInformation7Builder {
7382 self.line_dtls = value;
7383 self
7384 }
7385 #[must_use]
7387 pub fn add_line_dtls(
7388 mut self,
7389 value: DocumentLineInformation1,
7390 ) -> ReferredDocumentInformation7Builder {
7391 self.line_dtls.push(value);
7392 self
7393 }
7394 pub fn build(
7406 self,
7407 ) -> ::std::result::Result<ReferredDocumentInformation7, crate::common::BuilderError> {
7408 ::std::result::Result::Ok(ReferredDocumentInformation7 {
7409 tp: self.tp,
7410 nb: self.nb,
7411 rltd_dt: self.rltd_dt,
7412 line_dtls: self.line_dtls,
7413 })
7414 }
7415}
7416impl ReferredDocumentInformation7 {
7417 #[must_use]
7419 pub fn builder() -> ReferredDocumentInformation7Builder {
7420 ReferredDocumentInformation7Builder::default()
7421 }
7422}
7423#[allow(clippy::large_enum_variant)]
7424#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7425pub enum ReferredDocumentType3Choice {
7426 #[serde(rename = "Cd")]
7427 Cd(DocumentType6Code),
7428 #[serde(rename = "Prtry")]
7429 Prtry(Max35Text),
7430}
7431#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7432pub struct ReferredDocumentType4 {
7433 #[serde(rename = "CdOrPrtry")]
7434 pub cd_or_prtry: crate::common::ChoiceWrapper<ReferredDocumentType3Choice>,
7435 #[serde(rename = "Issr")]
7436 #[serde(skip_serializing_if = "Option::is_none")]
7437 pub issr: Option<Max35Text>,
7438}
7439#[allow(clippy::struct_field_names)]
7441#[derive(Default)]
7442pub struct ReferredDocumentType4Builder {
7443 cd_or_prtry: ::std::option::Option<crate::common::ChoiceWrapper<ReferredDocumentType3Choice>>,
7444 issr: ::std::option::Option<Max35Text>,
7445}
7446impl ReferredDocumentType4Builder {
7447 #[must_use]
7449 pub fn cd_or_prtry(
7450 mut self,
7451 value: crate::common::ChoiceWrapper<ReferredDocumentType3Choice>,
7452 ) -> ReferredDocumentType4Builder {
7453 self.cd_or_prtry = ::std::option::Option::Some(value);
7454 self
7455 }
7456 #[must_use]
7458 pub fn issr(mut self, value: Max35Text) -> ReferredDocumentType4Builder {
7459 self.issr = ::std::option::Option::Some(value);
7460 self
7461 }
7462 pub fn build(
7474 self,
7475 ) -> ::std::result::Result<ReferredDocumentType4, crate::common::BuilderError> {
7476 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7477 if self.cd_or_prtry.is_none() {
7478 missing.push("cd_or_prtry".to_owned());
7479 }
7480 if !missing.is_empty() {
7481 return ::std::result::Result::Err(crate::common::BuilderError {
7482 type_name: "ReferredDocumentType4".to_owned(),
7483 missing_fields: missing,
7484 });
7485 }
7486 ::std::result::Result::Ok(ReferredDocumentType4 {
7487 cd_or_prtry: self.cd_or_prtry.unwrap(),
7488 issr: self.issr,
7489 })
7490 }
7491}
7492impl ReferredDocumentType4 {
7493 #[must_use]
7495 pub fn builder() -> ReferredDocumentType4Builder {
7496 ReferredDocumentType4Builder::default()
7497 }
7498}
7499#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7500pub struct RemittanceAmount2 {
7501 #[serde(rename = "DuePyblAmt")]
7502 #[serde(skip_serializing_if = "Option::is_none")]
7503 pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7504 #[serde(rename = "DscntApldAmt")]
7505 #[serde(default)]
7506 #[serde(skip_serializing_if = "Vec::is_empty")]
7507 pub dscnt_apld_amt: Vec<DiscountAmountAndType1>,
7508 #[serde(rename = "CdtNoteAmt")]
7509 #[serde(skip_serializing_if = "Option::is_none")]
7510 pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7511 #[serde(rename = "TaxAmt")]
7512 #[serde(default)]
7513 #[serde(skip_serializing_if = "Vec::is_empty")]
7514 pub tax_amt: Vec<TaxAmountAndType1>,
7515 #[serde(rename = "AdjstmntAmtAndRsn")]
7516 #[serde(default)]
7517 #[serde(skip_serializing_if = "Vec::is_empty")]
7518 pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
7519 #[serde(rename = "RmtdAmt")]
7520 #[serde(skip_serializing_if = "Option::is_none")]
7521 pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7522}
7523#[allow(clippy::struct_field_names)]
7525#[derive(Default)]
7526pub struct RemittanceAmount2Builder {
7527 due_pybl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7528 dscnt_apld_amt: ::std::vec::Vec<DiscountAmountAndType1>,
7529 cdt_note_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7530 tax_amt: ::std::vec::Vec<TaxAmountAndType1>,
7531 adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
7532 rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7533}
7534impl RemittanceAmount2Builder {
7535 #[must_use]
7537 pub fn due_pybl_amt(
7538 mut self,
7539 value: ActiveOrHistoricCurrencyAndAmount,
7540 ) -> RemittanceAmount2Builder {
7541 self.due_pybl_amt = ::std::option::Option::Some(value);
7542 self
7543 }
7544 #[must_use]
7546 pub fn dscnt_apld_amt(
7547 mut self,
7548 value: ::std::vec::Vec<DiscountAmountAndType1>,
7549 ) -> RemittanceAmount2Builder {
7550 self.dscnt_apld_amt = value;
7551 self
7552 }
7553 #[must_use]
7555 pub fn add_dscnt_apld_amt(mut self, value: DiscountAmountAndType1) -> RemittanceAmount2Builder {
7556 self.dscnt_apld_amt.push(value);
7557 self
7558 }
7559 #[must_use]
7561 pub fn cdt_note_amt(
7562 mut self,
7563 value: ActiveOrHistoricCurrencyAndAmount,
7564 ) -> RemittanceAmount2Builder {
7565 self.cdt_note_amt = ::std::option::Option::Some(value);
7566 self
7567 }
7568 #[must_use]
7570 pub fn tax_amt(
7571 mut self,
7572 value: ::std::vec::Vec<TaxAmountAndType1>,
7573 ) -> RemittanceAmount2Builder {
7574 self.tax_amt = value;
7575 self
7576 }
7577 #[must_use]
7579 pub fn add_tax_amt(mut self, value: TaxAmountAndType1) -> RemittanceAmount2Builder {
7580 self.tax_amt.push(value);
7581 self
7582 }
7583 #[must_use]
7585 pub fn adjstmnt_amt_and_rsn(
7586 mut self,
7587 value: ::std::vec::Vec<DocumentAdjustment1>,
7588 ) -> RemittanceAmount2Builder {
7589 self.adjstmnt_amt_and_rsn = value;
7590 self
7591 }
7592 #[must_use]
7594 pub fn add_adjstmnt_amt_and_rsn(
7595 mut self,
7596 value: DocumentAdjustment1,
7597 ) -> RemittanceAmount2Builder {
7598 self.adjstmnt_amt_and_rsn.push(value);
7599 self
7600 }
7601 #[must_use]
7603 pub fn rmtd_amt(
7604 mut self,
7605 value: ActiveOrHistoricCurrencyAndAmount,
7606 ) -> RemittanceAmount2Builder {
7607 self.rmtd_amt = ::std::option::Option::Some(value);
7608 self
7609 }
7610 pub fn build(self) -> ::std::result::Result<RemittanceAmount2, crate::common::BuilderError> {
7622 ::std::result::Result::Ok(RemittanceAmount2 {
7623 due_pybl_amt: self.due_pybl_amt,
7624 dscnt_apld_amt: self.dscnt_apld_amt,
7625 cdt_note_amt: self.cdt_note_amt,
7626 tax_amt: self.tax_amt,
7627 adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
7628 rmtd_amt: self.rmtd_amt,
7629 })
7630 }
7631}
7632impl RemittanceAmount2 {
7633 #[must_use]
7635 pub fn builder() -> RemittanceAmount2Builder {
7636 RemittanceAmount2Builder::default()
7637 }
7638}
7639#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7640pub struct RemittanceAmount3 {
7641 #[serde(rename = "DuePyblAmt")]
7642 #[serde(skip_serializing_if = "Option::is_none")]
7643 pub due_pybl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7644 #[serde(rename = "DscntApldAmt")]
7645 #[serde(default)]
7646 #[serde(skip_serializing_if = "Vec::is_empty")]
7647 pub dscnt_apld_amt: Vec<DiscountAmountAndType1>,
7648 #[serde(rename = "CdtNoteAmt")]
7649 #[serde(skip_serializing_if = "Option::is_none")]
7650 pub cdt_note_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7651 #[serde(rename = "TaxAmt")]
7652 #[serde(default)]
7653 #[serde(skip_serializing_if = "Vec::is_empty")]
7654 pub tax_amt: Vec<TaxAmountAndType1>,
7655 #[serde(rename = "AdjstmntAmtAndRsn")]
7656 #[serde(default)]
7657 #[serde(skip_serializing_if = "Vec::is_empty")]
7658 pub adjstmnt_amt_and_rsn: Vec<DocumentAdjustment1>,
7659 #[serde(rename = "RmtdAmt")]
7660 #[serde(skip_serializing_if = "Option::is_none")]
7661 pub rmtd_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
7662}
7663#[allow(clippy::struct_field_names)]
7665#[derive(Default)]
7666pub struct RemittanceAmount3Builder {
7667 due_pybl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7668 dscnt_apld_amt: ::std::vec::Vec<DiscountAmountAndType1>,
7669 cdt_note_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7670 tax_amt: ::std::vec::Vec<TaxAmountAndType1>,
7671 adjstmnt_amt_and_rsn: ::std::vec::Vec<DocumentAdjustment1>,
7672 rmtd_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
7673}
7674impl RemittanceAmount3Builder {
7675 #[must_use]
7677 pub fn due_pybl_amt(
7678 mut self,
7679 value: ActiveOrHistoricCurrencyAndAmount,
7680 ) -> RemittanceAmount3Builder {
7681 self.due_pybl_amt = ::std::option::Option::Some(value);
7682 self
7683 }
7684 #[must_use]
7686 pub fn dscnt_apld_amt(
7687 mut self,
7688 value: ::std::vec::Vec<DiscountAmountAndType1>,
7689 ) -> RemittanceAmount3Builder {
7690 self.dscnt_apld_amt = value;
7691 self
7692 }
7693 #[must_use]
7695 pub fn add_dscnt_apld_amt(mut self, value: DiscountAmountAndType1) -> RemittanceAmount3Builder {
7696 self.dscnt_apld_amt.push(value);
7697 self
7698 }
7699 #[must_use]
7701 pub fn cdt_note_amt(
7702 mut self,
7703 value: ActiveOrHistoricCurrencyAndAmount,
7704 ) -> RemittanceAmount3Builder {
7705 self.cdt_note_amt = ::std::option::Option::Some(value);
7706 self
7707 }
7708 #[must_use]
7710 pub fn tax_amt(
7711 mut self,
7712 value: ::std::vec::Vec<TaxAmountAndType1>,
7713 ) -> RemittanceAmount3Builder {
7714 self.tax_amt = value;
7715 self
7716 }
7717 #[must_use]
7719 pub fn add_tax_amt(mut self, value: TaxAmountAndType1) -> RemittanceAmount3Builder {
7720 self.tax_amt.push(value);
7721 self
7722 }
7723 #[must_use]
7725 pub fn adjstmnt_amt_and_rsn(
7726 mut self,
7727 value: ::std::vec::Vec<DocumentAdjustment1>,
7728 ) -> RemittanceAmount3Builder {
7729 self.adjstmnt_amt_and_rsn = value;
7730 self
7731 }
7732 #[must_use]
7734 pub fn add_adjstmnt_amt_and_rsn(
7735 mut self,
7736 value: DocumentAdjustment1,
7737 ) -> RemittanceAmount3Builder {
7738 self.adjstmnt_amt_and_rsn.push(value);
7739 self
7740 }
7741 #[must_use]
7743 pub fn rmtd_amt(
7744 mut self,
7745 value: ActiveOrHistoricCurrencyAndAmount,
7746 ) -> RemittanceAmount3Builder {
7747 self.rmtd_amt = ::std::option::Option::Some(value);
7748 self
7749 }
7750 pub fn build(self) -> ::std::result::Result<RemittanceAmount3, crate::common::BuilderError> {
7762 ::std::result::Result::Ok(RemittanceAmount3 {
7763 due_pybl_amt: self.due_pybl_amt,
7764 dscnt_apld_amt: self.dscnt_apld_amt,
7765 cdt_note_amt: self.cdt_note_amt,
7766 tax_amt: self.tax_amt,
7767 adjstmnt_amt_and_rsn: self.adjstmnt_amt_and_rsn,
7768 rmtd_amt: self.rmtd_amt,
7769 })
7770 }
7771}
7772impl RemittanceAmount3 {
7773 #[must_use]
7775 pub fn builder() -> RemittanceAmount3Builder {
7776 RemittanceAmount3Builder::default()
7777 }
7778}
7779#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7780pub struct RemittanceInformation21 {
7781 #[serde(rename = "Ustrd")]
7782 #[serde(default)]
7783 #[serde(skip_serializing_if = "Vec::is_empty")]
7784 pub ustrd: Vec<Max140Text>,
7785 #[serde(rename = "Strd")]
7786 #[serde(default)]
7787 #[serde(skip_serializing_if = "Vec::is_empty")]
7788 pub strd: Vec<StructuredRemittanceInformation17>,
7789}
7790#[allow(clippy::struct_field_names)]
7792#[derive(Default)]
7793pub struct RemittanceInformation21Builder {
7794 ustrd: ::std::vec::Vec<Max140Text>,
7795 strd: ::std::vec::Vec<StructuredRemittanceInformation17>,
7796}
7797impl RemittanceInformation21Builder {
7798 #[must_use]
7800 pub fn ustrd(mut self, value: ::std::vec::Vec<Max140Text>) -> RemittanceInformation21Builder {
7801 self.ustrd = value;
7802 self
7803 }
7804 #[must_use]
7806 pub fn add_ustrd(mut self, value: Max140Text) -> RemittanceInformation21Builder {
7807 self.ustrd.push(value);
7808 self
7809 }
7810 #[must_use]
7812 pub fn strd(
7813 mut self,
7814 value: ::std::vec::Vec<StructuredRemittanceInformation17>,
7815 ) -> RemittanceInformation21Builder {
7816 self.strd = value;
7817 self
7818 }
7819 #[must_use]
7821 pub fn add_strd(
7822 mut self,
7823 value: StructuredRemittanceInformation17,
7824 ) -> RemittanceInformation21Builder {
7825 self.strd.push(value);
7826 self
7827 }
7828 pub fn build(
7840 self,
7841 ) -> ::std::result::Result<RemittanceInformation21, crate::common::BuilderError> {
7842 ::std::result::Result::Ok(RemittanceInformation21 {
7843 ustrd: self.ustrd,
7844 strd: self.strd,
7845 })
7846 }
7847}
7848impl RemittanceInformation21 {
7849 #[must_use]
7851 pub fn builder() -> RemittanceInformation21Builder {
7852 RemittanceInformation21Builder::default()
7853 }
7854}
7855#[allow(clippy::large_enum_variant)]
7856#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7857pub enum ServiceLevel8Choice {
7858 #[serde(rename = "Cd")]
7859 Cd(ExternalServiceLevel1Code),
7860 #[serde(rename = "Prtry")]
7861 Prtry(Max35Text),
7862}
7863#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7864pub struct SettlementInstruction11 {
7865 #[serde(rename = "SttlmMtd")]
7866 pub sttlm_mtd: SettlementMethod1Code,
7867 #[serde(rename = "SttlmAcct")]
7868 #[serde(skip_serializing_if = "Option::is_none")]
7869 pub sttlm_acct: Option<CashAccount40>,
7870 #[serde(rename = "ClrSys")]
7871 #[serde(skip_serializing_if = "Option::is_none")]
7872 pub clr_sys: Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
7873 #[serde(rename = "InstgRmbrsmntAgt")]
7874 #[serde(skip_serializing_if = "Option::is_none")]
7875 pub instg_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7876 #[serde(rename = "InstgRmbrsmntAgtAcct")]
7877 #[serde(skip_serializing_if = "Option::is_none")]
7878 pub instg_rmbrsmnt_agt_acct: Option<CashAccount40>,
7879 #[serde(rename = "InstdRmbrsmntAgt")]
7880 #[serde(skip_serializing_if = "Option::is_none")]
7881 pub instd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7882 #[serde(rename = "InstdRmbrsmntAgtAcct")]
7883 #[serde(skip_serializing_if = "Option::is_none")]
7884 pub instd_rmbrsmnt_agt_acct: Option<CashAccount40>,
7885 #[serde(rename = "ThrdRmbrsmntAgt")]
7886 #[serde(skip_serializing_if = "Option::is_none")]
7887 pub thrd_rmbrsmnt_agt: Option<BranchAndFinancialInstitutionIdentification6>,
7888 #[serde(rename = "ThrdRmbrsmntAgtAcct")]
7889 #[serde(skip_serializing_if = "Option::is_none")]
7890 pub thrd_rmbrsmnt_agt_acct: Option<CashAccount40>,
7891}
7892#[allow(clippy::struct_field_names)]
7894#[derive(Default)]
7895pub struct SettlementInstruction11Builder {
7896 sttlm_mtd: ::std::option::Option<SettlementMethod1Code>,
7897 sttlm_acct: ::std::option::Option<CashAccount40>,
7898 clr_sys:
7899 ::std::option::Option<crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>>,
7900 instg_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7901 instg_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
7902 instd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7903 instd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
7904 thrd_rmbrsmnt_agt: ::std::option::Option<BranchAndFinancialInstitutionIdentification6>,
7905 thrd_rmbrsmnt_agt_acct: ::std::option::Option<CashAccount40>,
7906}
7907impl SettlementInstruction11Builder {
7908 #[must_use]
7910 pub fn sttlm_mtd(mut self, value: SettlementMethod1Code) -> SettlementInstruction11Builder {
7911 self.sttlm_mtd = ::std::option::Option::Some(value);
7912 self
7913 }
7914 #[must_use]
7916 pub fn sttlm_acct(mut self, value: CashAccount40) -> SettlementInstruction11Builder {
7917 self.sttlm_acct = ::std::option::Option::Some(value);
7918 self
7919 }
7920 #[must_use]
7922 pub fn clr_sys(
7923 mut self,
7924 value: crate::common::ChoiceWrapper<ClearingSystemIdentification3Choice>,
7925 ) -> SettlementInstruction11Builder {
7926 self.clr_sys = ::std::option::Option::Some(value);
7927 self
7928 }
7929 #[must_use]
7931 pub fn instg_rmbrsmnt_agt(
7932 mut self,
7933 value: BranchAndFinancialInstitutionIdentification6,
7934 ) -> SettlementInstruction11Builder {
7935 self.instg_rmbrsmnt_agt = ::std::option::Option::Some(value);
7936 self
7937 }
7938 #[must_use]
7940 pub fn instg_rmbrsmnt_agt_acct(
7941 mut self,
7942 value: CashAccount40,
7943 ) -> SettlementInstruction11Builder {
7944 self.instg_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
7945 self
7946 }
7947 #[must_use]
7949 pub fn instd_rmbrsmnt_agt(
7950 mut self,
7951 value: BranchAndFinancialInstitutionIdentification6,
7952 ) -> SettlementInstruction11Builder {
7953 self.instd_rmbrsmnt_agt = ::std::option::Option::Some(value);
7954 self
7955 }
7956 #[must_use]
7958 pub fn instd_rmbrsmnt_agt_acct(
7959 mut self,
7960 value: CashAccount40,
7961 ) -> SettlementInstruction11Builder {
7962 self.instd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
7963 self
7964 }
7965 #[must_use]
7967 pub fn thrd_rmbrsmnt_agt(
7968 mut self,
7969 value: BranchAndFinancialInstitutionIdentification6,
7970 ) -> SettlementInstruction11Builder {
7971 self.thrd_rmbrsmnt_agt = ::std::option::Option::Some(value);
7972 self
7973 }
7974 #[must_use]
7976 pub fn thrd_rmbrsmnt_agt_acct(
7977 mut self,
7978 value: CashAccount40,
7979 ) -> SettlementInstruction11Builder {
7980 self.thrd_rmbrsmnt_agt_acct = ::std::option::Option::Some(value);
7981 self
7982 }
7983 pub fn build(
7995 self,
7996 ) -> ::std::result::Result<SettlementInstruction11, crate::common::BuilderError> {
7997 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
7998 if self.sttlm_mtd.is_none() {
7999 missing.push("sttlm_mtd".to_owned());
8000 }
8001 if !missing.is_empty() {
8002 return ::std::result::Result::Err(crate::common::BuilderError {
8003 type_name: "SettlementInstruction11".to_owned(),
8004 missing_fields: missing,
8005 });
8006 }
8007 ::std::result::Result::Ok(SettlementInstruction11 {
8008 sttlm_mtd: self.sttlm_mtd.unwrap(),
8009 sttlm_acct: self.sttlm_acct,
8010 clr_sys: self.clr_sys,
8011 instg_rmbrsmnt_agt: self.instg_rmbrsmnt_agt,
8012 instg_rmbrsmnt_agt_acct: self.instg_rmbrsmnt_agt_acct,
8013 instd_rmbrsmnt_agt: self.instd_rmbrsmnt_agt,
8014 instd_rmbrsmnt_agt_acct: self.instd_rmbrsmnt_agt_acct,
8015 thrd_rmbrsmnt_agt: self.thrd_rmbrsmnt_agt,
8016 thrd_rmbrsmnt_agt_acct: self.thrd_rmbrsmnt_agt_acct,
8017 })
8018 }
8019}
8020impl SettlementInstruction11 {
8021 #[must_use]
8023 pub fn builder() -> SettlementInstruction11Builder {
8024 SettlementInstruction11Builder::default()
8025 }
8026}
8027#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8028pub struct StructuredRemittanceInformation17 {
8029 #[serde(rename = "RfrdDocInf")]
8030 #[serde(default)]
8031 #[serde(skip_serializing_if = "Vec::is_empty")]
8032 pub rfrd_doc_inf: Vec<ReferredDocumentInformation7>,
8033 #[serde(rename = "RfrdDocAmt")]
8034 #[serde(skip_serializing_if = "Option::is_none")]
8035 pub rfrd_doc_amt: Option<RemittanceAmount2>,
8036 #[serde(rename = "CdtrRefInf")]
8037 #[serde(skip_serializing_if = "Option::is_none")]
8038 pub cdtr_ref_inf: Option<CreditorReferenceInformation2>,
8039 #[serde(rename = "Invcr")]
8040 #[serde(skip_serializing_if = "Option::is_none")]
8041 pub invcr: Option<PartyIdentification135>,
8042 #[serde(rename = "Invcee")]
8043 #[serde(skip_serializing_if = "Option::is_none")]
8044 pub invcee: Option<PartyIdentification135>,
8045 #[serde(rename = "TaxRmt")]
8046 #[serde(skip_serializing_if = "Option::is_none")]
8047 pub tax_rmt: Option<TaxData1>,
8048 #[serde(rename = "GrnshmtRmt")]
8049 #[serde(skip_serializing_if = "Option::is_none")]
8050 pub grnshmt_rmt: Option<Garnishment3>,
8051 #[serde(rename = "AddtlRmtInf")]
8052 #[serde(default)]
8054 #[serde(skip_serializing_if = "Vec::is_empty")]
8055 pub addtl_rmt_inf: Vec<Max140Text>,
8056}
8057#[allow(clippy::struct_field_names)]
8059#[derive(Default)]
8060pub struct StructuredRemittanceInformation17Builder {
8061 rfrd_doc_inf: ::std::vec::Vec<ReferredDocumentInformation7>,
8062 rfrd_doc_amt: ::std::option::Option<RemittanceAmount2>,
8063 cdtr_ref_inf: ::std::option::Option<CreditorReferenceInformation2>,
8064 invcr: ::std::option::Option<PartyIdentification135>,
8065 invcee: ::std::option::Option<PartyIdentification135>,
8066 tax_rmt: ::std::option::Option<TaxData1>,
8067 grnshmt_rmt: ::std::option::Option<Garnishment3>,
8068 addtl_rmt_inf: ::std::vec::Vec<Max140Text>,
8069}
8070impl StructuredRemittanceInformation17Builder {
8071 #[must_use]
8073 pub fn rfrd_doc_inf(
8074 mut self,
8075 value: ::std::vec::Vec<ReferredDocumentInformation7>,
8076 ) -> StructuredRemittanceInformation17Builder {
8077 self.rfrd_doc_inf = value;
8078 self
8079 }
8080 #[must_use]
8082 pub fn add_rfrd_doc_inf(
8083 mut self,
8084 value: ReferredDocumentInformation7,
8085 ) -> StructuredRemittanceInformation17Builder {
8086 self.rfrd_doc_inf.push(value);
8087 self
8088 }
8089 #[must_use]
8091 pub fn rfrd_doc_amt(
8092 mut self,
8093 value: RemittanceAmount2,
8094 ) -> StructuredRemittanceInformation17Builder {
8095 self.rfrd_doc_amt = ::std::option::Option::Some(value);
8096 self
8097 }
8098 #[must_use]
8100 pub fn cdtr_ref_inf(
8101 mut self,
8102 value: CreditorReferenceInformation2,
8103 ) -> StructuredRemittanceInformation17Builder {
8104 self.cdtr_ref_inf = ::std::option::Option::Some(value);
8105 self
8106 }
8107 #[must_use]
8109 pub fn invcr(
8110 mut self,
8111 value: PartyIdentification135,
8112 ) -> StructuredRemittanceInformation17Builder {
8113 self.invcr = ::std::option::Option::Some(value);
8114 self
8115 }
8116 #[must_use]
8118 pub fn invcee(
8119 mut self,
8120 value: PartyIdentification135,
8121 ) -> StructuredRemittanceInformation17Builder {
8122 self.invcee = ::std::option::Option::Some(value);
8123 self
8124 }
8125 #[must_use]
8127 pub fn tax_rmt(mut self, value: TaxData1) -> StructuredRemittanceInformation17Builder {
8128 self.tax_rmt = ::std::option::Option::Some(value);
8129 self
8130 }
8131 #[must_use]
8133 pub fn grnshmt_rmt(mut self, value: Garnishment3) -> StructuredRemittanceInformation17Builder {
8134 self.grnshmt_rmt = ::std::option::Option::Some(value);
8135 self
8136 }
8137 #[must_use]
8139 pub fn addtl_rmt_inf(
8140 mut self,
8141 value: ::std::vec::Vec<Max140Text>,
8142 ) -> StructuredRemittanceInformation17Builder {
8143 self.addtl_rmt_inf = value;
8144 self
8145 }
8146 #[must_use]
8148 pub fn add_addtl_rmt_inf(
8149 mut self,
8150 value: Max140Text,
8151 ) -> StructuredRemittanceInformation17Builder {
8152 self.addtl_rmt_inf.push(value);
8153 self
8154 }
8155 pub fn build(
8167 self,
8168 ) -> ::std::result::Result<StructuredRemittanceInformation17, crate::common::BuilderError> {
8169 ::std::result::Result::Ok(StructuredRemittanceInformation17 {
8170 rfrd_doc_inf: self.rfrd_doc_inf,
8171 rfrd_doc_amt: self.rfrd_doc_amt,
8172 cdtr_ref_inf: self.cdtr_ref_inf,
8173 invcr: self.invcr,
8174 invcee: self.invcee,
8175 tax_rmt: self.tax_rmt,
8176 grnshmt_rmt: self.grnshmt_rmt,
8177 addtl_rmt_inf: self.addtl_rmt_inf,
8178 })
8179 }
8180}
8181impl StructuredRemittanceInformation17 {
8182 #[must_use]
8184 pub fn builder() -> StructuredRemittanceInformation17Builder {
8185 StructuredRemittanceInformation17Builder::default()
8186 }
8187}
8188#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8189pub struct SupplementaryData1 {
8190 #[serde(rename = "PlcAndNm")]
8191 #[serde(skip_serializing_if = "Option::is_none")]
8192 pub plc_and_nm: Option<Max350Text>,
8193 #[serde(rename = "Envlp")]
8194 pub envlp: SupplementaryDataEnvelope1,
8195}
8196#[allow(clippy::struct_field_names)]
8198#[derive(Default)]
8199pub struct SupplementaryData1Builder {
8200 plc_and_nm: ::std::option::Option<Max350Text>,
8201 envlp: ::std::option::Option<SupplementaryDataEnvelope1>,
8202}
8203impl SupplementaryData1Builder {
8204 #[must_use]
8206 pub fn plc_and_nm(mut self, value: Max350Text) -> SupplementaryData1Builder {
8207 self.plc_and_nm = ::std::option::Option::Some(value);
8208 self
8209 }
8210 #[must_use]
8212 pub fn envlp(mut self, value: SupplementaryDataEnvelope1) -> SupplementaryData1Builder {
8213 self.envlp = ::std::option::Option::Some(value);
8214 self
8215 }
8216 pub fn build(self) -> ::std::result::Result<SupplementaryData1, crate::common::BuilderError> {
8228 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8229 if self.envlp.is_none() {
8230 missing.push("envlp".to_owned());
8231 }
8232 if !missing.is_empty() {
8233 return ::std::result::Result::Err(crate::common::BuilderError {
8234 type_name: "SupplementaryData1".to_owned(),
8235 missing_fields: missing,
8236 });
8237 }
8238 ::std::result::Result::Ok(SupplementaryData1 {
8239 plc_and_nm: self.plc_and_nm,
8240 envlp: self.envlp.unwrap(),
8241 })
8242 }
8243}
8244impl SupplementaryData1 {
8245 #[must_use]
8247 pub fn builder() -> SupplementaryData1Builder {
8248 SupplementaryData1Builder::default()
8249 }
8250}
8251#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8253pub struct SupplementaryDataEnvelope1 {
8254 #[serde(rename = "$value")]
8255 pub value: String,
8256}
8257#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8258pub struct TaxAmount3 {
8259 #[serde(rename = "Rate")]
8260 #[serde(skip_serializing_if = "Option::is_none")]
8261 pub rate: Option<PercentageRate>,
8262 #[serde(rename = "TaxblBaseAmt")]
8263 #[serde(skip_serializing_if = "Option::is_none")]
8264 pub taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8265 #[serde(rename = "TtlAmt")]
8266 #[serde(skip_serializing_if = "Option::is_none")]
8267 pub ttl_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8268 #[serde(rename = "Dtls")]
8269 #[serde(default)]
8270 #[serde(skip_serializing_if = "Vec::is_empty")]
8271 pub dtls: Vec<TaxRecordDetails3>,
8272}
8273#[allow(clippy::struct_field_names)]
8275#[derive(Default)]
8276pub struct TaxAmount3Builder {
8277 rate: ::std::option::Option<PercentageRate>,
8278 taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8279 ttl_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8280 dtls: ::std::vec::Vec<TaxRecordDetails3>,
8281}
8282impl TaxAmount3Builder {
8283 #[must_use]
8285 pub fn rate(mut self, value: PercentageRate) -> TaxAmount3Builder {
8286 self.rate = ::std::option::Option::Some(value);
8287 self
8288 }
8289 #[must_use]
8291 pub fn taxbl_base_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
8292 self.taxbl_base_amt = ::std::option::Option::Some(value);
8293 self
8294 }
8295 #[must_use]
8297 pub fn ttl_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmount3Builder {
8298 self.ttl_amt = ::std::option::Option::Some(value);
8299 self
8300 }
8301 #[must_use]
8303 pub fn dtls(mut self, value: ::std::vec::Vec<TaxRecordDetails3>) -> TaxAmount3Builder {
8304 self.dtls = value;
8305 self
8306 }
8307 #[must_use]
8309 pub fn add_dtls(mut self, value: TaxRecordDetails3) -> TaxAmount3Builder {
8310 self.dtls.push(value);
8311 self
8312 }
8313 pub fn build(self) -> ::std::result::Result<TaxAmount3, crate::common::BuilderError> {
8325 ::std::result::Result::Ok(TaxAmount3 {
8326 rate: self.rate,
8327 taxbl_base_amt: self.taxbl_base_amt,
8328 ttl_amt: self.ttl_amt,
8329 dtls: self.dtls,
8330 })
8331 }
8332}
8333impl TaxAmount3 {
8334 #[must_use]
8336 pub fn builder() -> TaxAmount3Builder {
8337 TaxAmount3Builder::default()
8338 }
8339}
8340#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8341pub struct TaxAmountAndType1 {
8342 #[serde(rename = "Tp")]
8343 #[serde(skip_serializing_if = "Option::is_none")]
8344 pub tp: Option<crate::common::ChoiceWrapper<TaxAmountType1Choice>>,
8345 #[serde(rename = "Amt")]
8346 pub amt: ActiveOrHistoricCurrencyAndAmount,
8347}
8348#[allow(clippy::struct_field_names)]
8350#[derive(Default)]
8351pub struct TaxAmountAndType1Builder {
8352 tp: ::std::option::Option<crate::common::ChoiceWrapper<TaxAmountType1Choice>>,
8353 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8354}
8355impl TaxAmountAndType1Builder {
8356 #[must_use]
8358 pub fn tp(
8359 mut self,
8360 value: crate::common::ChoiceWrapper<TaxAmountType1Choice>,
8361 ) -> TaxAmountAndType1Builder {
8362 self.tp = ::std::option::Option::Some(value);
8363 self
8364 }
8365 #[must_use]
8367 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxAmountAndType1Builder {
8368 self.amt = ::std::option::Option::Some(value);
8369 self
8370 }
8371 pub fn build(self) -> ::std::result::Result<TaxAmountAndType1, crate::common::BuilderError> {
8383 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
8384 if self.amt.is_none() {
8385 missing.push("amt".to_owned());
8386 }
8387 if !missing.is_empty() {
8388 return ::std::result::Result::Err(crate::common::BuilderError {
8389 type_name: "TaxAmountAndType1".to_owned(),
8390 missing_fields: missing,
8391 });
8392 }
8393 ::std::result::Result::Ok(TaxAmountAndType1 {
8394 tp: self.tp,
8395 amt: self.amt.unwrap(),
8396 })
8397 }
8398}
8399impl TaxAmountAndType1 {
8400 #[must_use]
8402 pub fn builder() -> TaxAmountAndType1Builder {
8403 TaxAmountAndType1Builder::default()
8404 }
8405}
8406#[allow(clippy::large_enum_variant)]
8407#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8408pub enum TaxAmountType1Choice {
8409 #[serde(rename = "Cd")]
8410 Cd(ExternalTaxAmountType1Code),
8411 #[serde(rename = "Prtry")]
8412 Prtry(Max35Text),
8413}
8414#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8415pub struct TaxAuthorisation1 {
8416 #[serde(rename = "Titl")]
8417 #[serde(skip_serializing_if = "Option::is_none")]
8418 pub titl: Option<Max35Text>,
8419 #[serde(rename = "Nm")]
8420 #[serde(skip_serializing_if = "Option::is_none")]
8421 pub nm: Option<Max140Text>,
8422}
8423#[allow(clippy::struct_field_names)]
8425#[derive(Default)]
8426pub struct TaxAuthorisation1Builder {
8427 titl: ::std::option::Option<Max35Text>,
8428 nm: ::std::option::Option<Max140Text>,
8429}
8430impl TaxAuthorisation1Builder {
8431 #[must_use]
8433 pub fn titl(mut self, value: Max35Text) -> TaxAuthorisation1Builder {
8434 self.titl = ::std::option::Option::Some(value);
8435 self
8436 }
8437 #[must_use]
8439 pub fn nm(mut self, value: Max140Text) -> TaxAuthorisation1Builder {
8440 self.nm = ::std::option::Option::Some(value);
8441 self
8442 }
8443 pub fn build(self) -> ::std::result::Result<TaxAuthorisation1, crate::common::BuilderError> {
8455 ::std::result::Result::Ok(TaxAuthorisation1 {
8456 titl: self.titl,
8457 nm: self.nm,
8458 })
8459 }
8460}
8461impl TaxAuthorisation1 {
8462 #[must_use]
8464 pub fn builder() -> TaxAuthorisation1Builder {
8465 TaxAuthorisation1Builder::default()
8466 }
8467}
8468#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8469pub struct TaxData1 {
8470 #[serde(rename = "Cdtr")]
8471 #[serde(skip_serializing_if = "Option::is_none")]
8472 pub cdtr: Option<TaxParty1>,
8473 #[serde(rename = "Dbtr")]
8474 #[serde(skip_serializing_if = "Option::is_none")]
8475 pub dbtr: Option<TaxParty2>,
8476 #[serde(rename = "UltmtDbtr")]
8477 #[serde(skip_serializing_if = "Option::is_none")]
8478 pub ultmt_dbtr: Option<TaxParty2>,
8479 #[serde(rename = "AdmstnZone")]
8480 #[serde(skip_serializing_if = "Option::is_none")]
8481 pub admstn_zone: Option<Max35Text>,
8482 #[serde(rename = "RefNb")]
8483 #[serde(skip_serializing_if = "Option::is_none")]
8484 pub ref_nb: Option<Max140Text>,
8485 #[serde(rename = "Mtd")]
8486 #[serde(skip_serializing_if = "Option::is_none")]
8487 pub mtd: Option<Max35Text>,
8488 #[serde(rename = "TtlTaxblBaseAmt")]
8489 #[serde(skip_serializing_if = "Option::is_none")]
8490 pub ttl_taxbl_base_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8491 #[serde(rename = "TtlTaxAmt")]
8492 #[serde(skip_serializing_if = "Option::is_none")]
8493 pub ttl_tax_amt: Option<ActiveOrHistoricCurrencyAndAmount>,
8494 #[serde(rename = "Dt")]
8495 #[serde(skip_serializing_if = "Option::is_none")]
8496 pub dt: Option<ISODate>,
8497 #[serde(rename = "SeqNb")]
8498 #[serde(skip_serializing_if = "Option::is_none")]
8499 pub seq_nb: Option<Number>,
8500 #[serde(rename = "Rcrd")]
8501 #[serde(default)]
8502 #[serde(skip_serializing_if = "Vec::is_empty")]
8503 pub rcrd: Vec<TaxRecord3>,
8504}
8505#[allow(clippy::struct_field_names)]
8507#[derive(Default)]
8508pub struct TaxData1Builder {
8509 cdtr: ::std::option::Option<TaxParty1>,
8510 dbtr: ::std::option::Option<TaxParty2>,
8511 ultmt_dbtr: ::std::option::Option<TaxParty2>,
8512 admstn_zone: ::std::option::Option<Max35Text>,
8513 ref_nb: ::std::option::Option<Max140Text>,
8514 mtd: ::std::option::Option<Max35Text>,
8515 ttl_taxbl_base_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8516 ttl_tax_amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8517 dt: ::std::option::Option<ISODate>,
8518 seq_nb: ::std::option::Option<Number>,
8519 rcrd: ::std::vec::Vec<TaxRecord3>,
8520}
8521impl TaxData1Builder {
8522 #[must_use]
8524 pub fn cdtr(mut self, value: TaxParty1) -> TaxData1Builder {
8525 self.cdtr = ::std::option::Option::Some(value);
8526 self
8527 }
8528 #[must_use]
8530 pub fn dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
8531 self.dbtr = ::std::option::Option::Some(value);
8532 self
8533 }
8534 #[must_use]
8536 pub fn ultmt_dbtr(mut self, value: TaxParty2) -> TaxData1Builder {
8537 self.ultmt_dbtr = ::std::option::Option::Some(value);
8538 self
8539 }
8540 #[must_use]
8542 pub fn admstn_zone(mut self, value: Max35Text) -> TaxData1Builder {
8543 self.admstn_zone = ::std::option::Option::Some(value);
8544 self
8545 }
8546 #[must_use]
8548 pub fn ref_nb(mut self, value: Max140Text) -> TaxData1Builder {
8549 self.ref_nb = ::std::option::Option::Some(value);
8550 self
8551 }
8552 #[must_use]
8554 pub fn mtd(mut self, value: Max35Text) -> TaxData1Builder {
8555 self.mtd = ::std::option::Option::Some(value);
8556 self
8557 }
8558 #[must_use]
8560 pub fn ttl_taxbl_base_amt(
8561 mut self,
8562 value: ActiveOrHistoricCurrencyAndAmount,
8563 ) -> TaxData1Builder {
8564 self.ttl_taxbl_base_amt = ::std::option::Option::Some(value);
8565 self
8566 }
8567 #[must_use]
8569 pub fn ttl_tax_amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxData1Builder {
8570 self.ttl_tax_amt = ::std::option::Option::Some(value);
8571 self
8572 }
8573 #[must_use]
8575 pub fn dt(mut self, value: ISODate) -> TaxData1Builder {
8576 self.dt = ::std::option::Option::Some(value);
8577 self
8578 }
8579 #[must_use]
8581 pub fn seq_nb(mut self, value: Number) -> TaxData1Builder {
8582 self.seq_nb = ::std::option::Option::Some(value);
8583 self
8584 }
8585 #[must_use]
8587 pub fn rcrd(mut self, value: ::std::vec::Vec<TaxRecord3>) -> TaxData1Builder {
8588 self.rcrd = value;
8589 self
8590 }
8591 #[must_use]
8593 pub fn add_rcrd(mut self, value: TaxRecord3) -> TaxData1Builder {
8594 self.rcrd.push(value);
8595 self
8596 }
8597 pub fn build(self) -> ::std::result::Result<TaxData1, crate::common::BuilderError> {
8609 ::std::result::Result::Ok(TaxData1 {
8610 cdtr: self.cdtr,
8611 dbtr: self.dbtr,
8612 ultmt_dbtr: self.ultmt_dbtr,
8613 admstn_zone: self.admstn_zone,
8614 ref_nb: self.ref_nb,
8615 mtd: self.mtd,
8616 ttl_taxbl_base_amt: self.ttl_taxbl_base_amt,
8617 ttl_tax_amt: self.ttl_tax_amt,
8618 dt: self.dt,
8619 seq_nb: self.seq_nb,
8620 rcrd: self.rcrd,
8621 })
8622 }
8623}
8624impl TaxData1 {
8625 #[must_use]
8627 pub fn builder() -> TaxData1Builder {
8628 TaxData1Builder::default()
8629 }
8630}
8631#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8632pub struct TaxParty1 {
8633 #[serde(rename = "TaxId")]
8634 #[serde(skip_serializing_if = "Option::is_none")]
8635 pub tax_id: Option<Max35Text>,
8636 #[serde(rename = "RegnId")]
8637 #[serde(skip_serializing_if = "Option::is_none")]
8638 pub regn_id: Option<Max35Text>,
8639 #[serde(rename = "TaxTp")]
8640 #[serde(skip_serializing_if = "Option::is_none")]
8641 pub tax_tp: Option<Max35Text>,
8642}
8643#[allow(clippy::struct_field_names)]
8645#[derive(Default)]
8646pub struct TaxParty1Builder {
8647 tax_id: ::std::option::Option<Max35Text>,
8648 regn_id: ::std::option::Option<Max35Text>,
8649 tax_tp: ::std::option::Option<Max35Text>,
8650}
8651impl TaxParty1Builder {
8652 #[must_use]
8654 pub fn tax_id(mut self, value: Max35Text) -> TaxParty1Builder {
8655 self.tax_id = ::std::option::Option::Some(value);
8656 self
8657 }
8658 #[must_use]
8660 pub fn regn_id(mut self, value: Max35Text) -> TaxParty1Builder {
8661 self.regn_id = ::std::option::Option::Some(value);
8662 self
8663 }
8664 #[must_use]
8666 pub fn tax_tp(mut self, value: Max35Text) -> TaxParty1Builder {
8667 self.tax_tp = ::std::option::Option::Some(value);
8668 self
8669 }
8670 pub fn build(self) -> ::std::result::Result<TaxParty1, crate::common::BuilderError> {
8682 ::std::result::Result::Ok(TaxParty1 {
8683 tax_id: self.tax_id,
8684 regn_id: self.regn_id,
8685 tax_tp: self.tax_tp,
8686 })
8687 }
8688}
8689impl TaxParty1 {
8690 #[must_use]
8692 pub fn builder() -> TaxParty1Builder {
8693 TaxParty1Builder::default()
8694 }
8695}
8696#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8697pub struct TaxParty2 {
8698 #[serde(rename = "TaxId")]
8699 #[serde(skip_serializing_if = "Option::is_none")]
8700 pub tax_id: Option<Max35Text>,
8701 #[serde(rename = "RegnId")]
8702 #[serde(skip_serializing_if = "Option::is_none")]
8703 pub regn_id: Option<Max35Text>,
8704 #[serde(rename = "TaxTp")]
8705 #[serde(skip_serializing_if = "Option::is_none")]
8706 pub tax_tp: Option<Max35Text>,
8707 #[serde(rename = "Authstn")]
8708 #[serde(skip_serializing_if = "Option::is_none")]
8709 pub authstn: Option<TaxAuthorisation1>,
8710}
8711#[allow(clippy::struct_field_names)]
8713#[derive(Default)]
8714pub struct TaxParty2Builder {
8715 tax_id: ::std::option::Option<Max35Text>,
8716 regn_id: ::std::option::Option<Max35Text>,
8717 tax_tp: ::std::option::Option<Max35Text>,
8718 authstn: ::std::option::Option<TaxAuthorisation1>,
8719}
8720impl TaxParty2Builder {
8721 #[must_use]
8723 pub fn tax_id(mut self, value: Max35Text) -> TaxParty2Builder {
8724 self.tax_id = ::std::option::Option::Some(value);
8725 self
8726 }
8727 #[must_use]
8729 pub fn regn_id(mut self, value: Max35Text) -> TaxParty2Builder {
8730 self.regn_id = ::std::option::Option::Some(value);
8731 self
8732 }
8733 #[must_use]
8735 pub fn tax_tp(mut self, value: Max35Text) -> TaxParty2Builder {
8736 self.tax_tp = ::std::option::Option::Some(value);
8737 self
8738 }
8739 #[must_use]
8741 pub fn authstn(mut self, value: TaxAuthorisation1) -> TaxParty2Builder {
8742 self.authstn = ::std::option::Option::Some(value);
8743 self
8744 }
8745 pub fn build(self) -> ::std::result::Result<TaxParty2, crate::common::BuilderError> {
8757 ::std::result::Result::Ok(TaxParty2 {
8758 tax_id: self.tax_id,
8759 regn_id: self.regn_id,
8760 tax_tp: self.tax_tp,
8761 authstn: self.authstn,
8762 })
8763 }
8764}
8765impl TaxParty2 {
8766 #[must_use]
8768 pub fn builder() -> TaxParty2Builder {
8769 TaxParty2Builder::default()
8770 }
8771}
8772#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8773pub struct TaxPeriod3 {
8774 #[serde(rename = "Yr")]
8775 #[serde(skip_serializing_if = "Option::is_none")]
8776 pub yr: Option<ISOYear>,
8777 #[serde(rename = "Tp")]
8778 #[serde(skip_serializing_if = "Option::is_none")]
8779 pub tp: Option<TaxRecordPeriod1Code>,
8780 #[serde(rename = "FrToDt")]
8781 #[serde(skip_serializing_if = "Option::is_none")]
8782 pub fr_to_dt: Option<DatePeriod2>,
8783}
8784#[allow(clippy::struct_field_names)]
8786#[derive(Default)]
8787pub struct TaxPeriod3Builder {
8788 yr: ::std::option::Option<ISOYear>,
8789 tp: ::std::option::Option<TaxRecordPeriod1Code>,
8790 fr_to_dt: ::std::option::Option<DatePeriod2>,
8791}
8792impl TaxPeriod3Builder {
8793 #[must_use]
8795 pub fn yr(mut self, value: ISOYear) -> TaxPeriod3Builder {
8796 self.yr = ::std::option::Option::Some(value);
8797 self
8798 }
8799 #[must_use]
8801 pub fn tp(mut self, value: TaxRecordPeriod1Code) -> TaxPeriod3Builder {
8802 self.tp = ::std::option::Option::Some(value);
8803 self
8804 }
8805 #[must_use]
8807 pub fn fr_to_dt(mut self, value: DatePeriod2) -> TaxPeriod3Builder {
8808 self.fr_to_dt = ::std::option::Option::Some(value);
8809 self
8810 }
8811 pub fn build(self) -> ::std::result::Result<TaxPeriod3, crate::common::BuilderError> {
8823 ::std::result::Result::Ok(TaxPeriod3 {
8824 yr: self.yr,
8825 tp: self.tp,
8826 fr_to_dt: self.fr_to_dt,
8827 })
8828 }
8829}
8830impl TaxPeriod3 {
8831 #[must_use]
8833 pub fn builder() -> TaxPeriod3Builder {
8834 TaxPeriod3Builder::default()
8835 }
8836}
8837#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8838pub struct TaxRecord3 {
8839 #[serde(rename = "Tp")]
8840 #[serde(skip_serializing_if = "Option::is_none")]
8841 pub tp: Option<Max35Text>,
8842 #[serde(rename = "Ctgy")]
8843 #[serde(skip_serializing_if = "Option::is_none")]
8844 pub ctgy: Option<Max35Text>,
8845 #[serde(rename = "CtgyDtls")]
8846 #[serde(skip_serializing_if = "Option::is_none")]
8847 pub ctgy_dtls: Option<Max35Text>,
8848 #[serde(rename = "DbtrSts")]
8849 #[serde(skip_serializing_if = "Option::is_none")]
8850 pub dbtr_sts: Option<Max35Text>,
8851 #[serde(rename = "CertId")]
8852 #[serde(skip_serializing_if = "Option::is_none")]
8853 pub cert_id: Option<Max35Text>,
8854 #[serde(rename = "FrmsCd")]
8855 #[serde(skip_serializing_if = "Option::is_none")]
8856 pub frms_cd: Option<Max35Text>,
8857 #[serde(rename = "Prd")]
8858 #[serde(skip_serializing_if = "Option::is_none")]
8859 pub prd: Option<TaxPeriod3>,
8860 #[serde(rename = "TaxAmt")]
8861 #[serde(skip_serializing_if = "Option::is_none")]
8862 pub tax_amt: Option<TaxAmount3>,
8863 #[serde(rename = "AddtlInf")]
8864 #[serde(skip_serializing_if = "Option::is_none")]
8865 pub addtl_inf: Option<Max140Text>,
8866}
8867#[allow(clippy::struct_field_names)]
8869#[derive(Default)]
8870pub struct TaxRecord3Builder {
8871 tp: ::std::option::Option<Max35Text>,
8872 ctgy: ::std::option::Option<Max35Text>,
8873 ctgy_dtls: ::std::option::Option<Max35Text>,
8874 dbtr_sts: ::std::option::Option<Max35Text>,
8875 cert_id: ::std::option::Option<Max35Text>,
8876 frms_cd: ::std::option::Option<Max35Text>,
8877 prd: ::std::option::Option<TaxPeriod3>,
8878 tax_amt: ::std::option::Option<TaxAmount3>,
8879 addtl_inf: ::std::option::Option<Max140Text>,
8880}
8881impl TaxRecord3Builder {
8882 #[must_use]
8884 pub fn tp(mut self, value: Max35Text) -> TaxRecord3Builder {
8885 self.tp = ::std::option::Option::Some(value);
8886 self
8887 }
8888 #[must_use]
8890 pub fn ctgy(mut self, value: Max35Text) -> TaxRecord3Builder {
8891 self.ctgy = ::std::option::Option::Some(value);
8892 self
8893 }
8894 #[must_use]
8896 pub fn ctgy_dtls(mut self, value: Max35Text) -> TaxRecord3Builder {
8897 self.ctgy_dtls = ::std::option::Option::Some(value);
8898 self
8899 }
8900 #[must_use]
8902 pub fn dbtr_sts(mut self, value: Max35Text) -> TaxRecord3Builder {
8903 self.dbtr_sts = ::std::option::Option::Some(value);
8904 self
8905 }
8906 #[must_use]
8908 pub fn cert_id(mut self, value: Max35Text) -> TaxRecord3Builder {
8909 self.cert_id = ::std::option::Option::Some(value);
8910 self
8911 }
8912 #[must_use]
8914 pub fn frms_cd(mut self, value: Max35Text) -> TaxRecord3Builder {
8915 self.frms_cd = ::std::option::Option::Some(value);
8916 self
8917 }
8918 #[must_use]
8920 pub fn prd(mut self, value: TaxPeriod3) -> TaxRecord3Builder {
8921 self.prd = ::std::option::Option::Some(value);
8922 self
8923 }
8924 #[must_use]
8926 pub fn tax_amt(mut self, value: TaxAmount3) -> TaxRecord3Builder {
8927 self.tax_amt = ::std::option::Option::Some(value);
8928 self
8929 }
8930 #[must_use]
8932 pub fn addtl_inf(mut self, value: Max140Text) -> TaxRecord3Builder {
8933 self.addtl_inf = ::std::option::Option::Some(value);
8934 self
8935 }
8936 pub fn build(self) -> ::std::result::Result<TaxRecord3, crate::common::BuilderError> {
8948 ::std::result::Result::Ok(TaxRecord3 {
8949 tp: self.tp,
8950 ctgy: self.ctgy,
8951 ctgy_dtls: self.ctgy_dtls,
8952 dbtr_sts: self.dbtr_sts,
8953 cert_id: self.cert_id,
8954 frms_cd: self.frms_cd,
8955 prd: self.prd,
8956 tax_amt: self.tax_amt,
8957 addtl_inf: self.addtl_inf,
8958 })
8959 }
8960}
8961impl TaxRecord3 {
8962 #[must_use]
8964 pub fn builder() -> TaxRecord3Builder {
8965 TaxRecord3Builder::default()
8966 }
8967}
8968#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
8969pub struct TaxRecordDetails3 {
8970 #[serde(rename = "Prd")]
8971 #[serde(skip_serializing_if = "Option::is_none")]
8972 pub prd: Option<TaxPeriod3>,
8973 #[serde(rename = "Amt")]
8974 pub amt: ActiveOrHistoricCurrencyAndAmount,
8975}
8976#[allow(clippy::struct_field_names)]
8978#[derive(Default)]
8979pub struct TaxRecordDetails3Builder {
8980 prd: ::std::option::Option<TaxPeriod3>,
8981 amt: ::std::option::Option<ActiveOrHistoricCurrencyAndAmount>,
8982}
8983impl TaxRecordDetails3Builder {
8984 #[must_use]
8986 pub fn prd(mut self, value: TaxPeriod3) -> TaxRecordDetails3Builder {
8987 self.prd = ::std::option::Option::Some(value);
8988 self
8989 }
8990 #[must_use]
8992 pub fn amt(mut self, value: ActiveOrHistoricCurrencyAndAmount) -> TaxRecordDetails3Builder {
8993 self.amt = ::std::option::Option::Some(value);
8994 self
8995 }
8996 pub fn build(self) -> ::std::result::Result<TaxRecordDetails3, crate::common::BuilderError> {
9008 let mut missing: ::std::vec::Vec<::std::string::String> = ::std::vec::Vec::new();
9009 if self.amt.is_none() {
9010 missing.push("amt".to_owned());
9011 }
9012 if !missing.is_empty() {
9013 return ::std::result::Result::Err(crate::common::BuilderError {
9014 type_name: "TaxRecordDetails3".to_owned(),
9015 missing_fields: missing,
9016 });
9017 }
9018 ::std::result::Result::Ok(TaxRecordDetails3 {
9019 prd: self.prd,
9020 amt: self.amt.unwrap(),
9021 })
9022 }
9023}
9024impl TaxRecordDetails3 {
9025 #[must_use]
9027 pub fn builder() -> TaxRecordDetails3Builder {
9028 TaxRecordDetails3Builder::default()
9029 }
9030}
9031impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmountSimpleType {
9032 #[allow(clippy::unreadable_literal)]
9033 fn validate_constraints(
9034 &self,
9035 path: &str,
9036 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9037 ) {
9038 {
9039 let value: &str = &self.0;
9040 let frac_count = value.find('.').map_or(0, |dot| {
9041 value[dot + 1..]
9042 .chars()
9043 .filter(char::is_ascii_digit)
9044 .count()
9045 });
9046 let violated = frac_count > 5usize;
9047 if violated {
9048 violations.push(crate::common::validate::ConstraintViolation {
9049 path: path.to_string(),
9050 message: format!(
9051 "{} (got {})",
9052 "value exceeds maximum fraction digits 5", frac_count
9053 ),
9054 kind: crate::common::validate::ConstraintKind::FractionDigits,
9055 });
9056 }
9057 }
9058 {
9059 let value: &str = &self.0;
9060 let digit_count = value.chars().filter(char::is_ascii_digit).count();
9061 let violated = digit_count > 18usize;
9062 if violated {
9063 violations.push(crate::common::validate::ConstraintViolation {
9064 path: path.to_string(),
9065 message: format!(
9066 "{} (got {})",
9067 "value exceeds maximum total digits 18", digit_count
9068 ),
9069 kind: crate::common::validate::ConstraintKind::TotalDigits,
9070 });
9071 }
9072 }
9073 }
9074}
9075impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyCode {
9076 #[allow(clippy::unreadable_literal)]
9077 fn validate_constraints(
9078 &self,
9079 path: &str,
9080 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9081 ) {
9082 {
9083 let value: &str = &self.0;
9084 let violated = {
9085 let bytes = value.as_bytes();
9086 bytes.len() != 3usize
9087 || ({
9088 let b = bytes[0usize];
9089 !(65u8..=90u8).contains(&b)
9090 })
9091 || ({
9092 let b = bytes[1usize];
9093 !(65u8..=90u8).contains(&b)
9094 })
9095 || ({
9096 let b = bytes[2usize];
9097 !(65u8..=90u8).contains(&b)
9098 })
9099 };
9100 if violated {
9101 violations.push(crate::common::validate::ConstraintViolation {
9102 path: path.to_string(),
9103 message: "value does not match pattern [A-Z]{3,3}".to_string(),
9104 kind: crate::common::validate::ConstraintKind::Pattern,
9105 });
9106 }
9107 }
9108 }
9109}
9110impl crate::common::validate::Validatable for AddressType2Code {
9111 fn validate_constraints(
9112 &self,
9113 _path: &str,
9114 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9115 ) {
9116 }
9117}
9118impl crate::common::validate::Validatable for AnyBICDec2014Identifier {
9119 #[allow(clippy::unreadable_literal)]
9120 fn validate_constraints(
9121 &self,
9122 path: &str,
9123 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9124 ) {
9125 {
9126 let value: &str = &self.0;
9127 let violated = {
9128 let bytes = value.as_bytes();
9129 let len = bytes.len();
9130 let result: bool = (|| -> bool {
9131 let mut pos: usize = 0;
9132 if !(8usize..=11usize).contains(&len) {
9133 return true;
9134 }
9135 {
9136 let end = pos + 4usize;
9137 if end > len {
9138 return true;
9139 }
9140 for &b in &bytes[pos..end] {
9141 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9142 return true;
9143 }
9144 }
9145 pos = end;
9146 }
9147 {
9148 let end = pos + 2usize;
9149 if end > len {
9150 return true;
9151 }
9152 for &b in &bytes[pos..end] {
9153 if !(65u8..=90u8).contains(&b) {
9154 return true;
9155 }
9156 }
9157 pos = end;
9158 }
9159 {
9160 let end = pos + 2usize;
9161 if end > len {
9162 return true;
9163 }
9164 for &b in &bytes[pos..end] {
9165 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9166 return true;
9167 }
9168 }
9169 pos = end;
9170 }
9171 {
9172 let saved = pos;
9173 let matched: bool = (|| -> bool {
9174 {
9175 let end = pos + 3usize;
9176 if end > len {
9177 return true;
9178 }
9179 for &b in &bytes[pos..end] {
9180 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9181 return true;
9182 }
9183 }
9184 pos = end;
9185 }
9186 false
9187 })();
9188 if matched {
9189 pos = saved;
9190 }
9191 }
9192 if pos != len {
9193 return true;
9194 }
9195 false
9196 })();
9197 result
9198 };
9199 if violated {
9200 violations
9201 .push(crate::common::validate::ConstraintViolation {
9202 path: path.to_string(),
9203 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}"
9204 .to_string(),
9205 kind: crate::common::validate::ConstraintKind::Pattern,
9206 });
9207 }
9208 }
9209 }
9210}
9211impl crate::common::validate::Validatable for BICFIDec2014Identifier {
9212 #[allow(clippy::unreadable_literal)]
9213 fn validate_constraints(
9214 &self,
9215 path: &str,
9216 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9217 ) {
9218 {
9219 let value: &str = &self.0;
9220 let violated = {
9221 let bytes = value.as_bytes();
9222 let len = bytes.len();
9223 let result: bool = (|| -> bool {
9224 let mut pos: usize = 0;
9225 if !(8usize..=11usize).contains(&len) {
9226 return true;
9227 }
9228 {
9229 let end = pos + 4usize;
9230 if end > len {
9231 return true;
9232 }
9233 for &b in &bytes[pos..end] {
9234 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9235 return true;
9236 }
9237 }
9238 pos = end;
9239 }
9240 {
9241 let end = pos + 2usize;
9242 if end > len {
9243 return true;
9244 }
9245 for &b in &bytes[pos..end] {
9246 if !(65u8..=90u8).contains(&b) {
9247 return true;
9248 }
9249 }
9250 pos = end;
9251 }
9252 {
9253 let end = pos + 2usize;
9254 if end > len {
9255 return true;
9256 }
9257 for &b in &bytes[pos..end] {
9258 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9259 return true;
9260 }
9261 }
9262 pos = end;
9263 }
9264 {
9265 let saved = pos;
9266 let matched: bool = (|| -> bool {
9267 {
9268 let end = pos + 3usize;
9269 if end > len {
9270 return true;
9271 }
9272 for &b in &bytes[pos..end] {
9273 if !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b) {
9274 return true;
9275 }
9276 }
9277 pos = end;
9278 }
9279 false
9280 })();
9281 if matched {
9282 pos = saved;
9283 }
9284 }
9285 if pos != len {
9286 return true;
9287 }
9288 false
9289 })();
9290 result
9291 };
9292 if violated {
9293 violations
9294 .push(crate::common::validate::ConstraintViolation {
9295 path: path.to_string(),
9296 message: "value does not match pattern [A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}"
9297 .to_string(),
9298 kind: crate::common::validate::ConstraintKind::Pattern,
9299 });
9300 }
9301 }
9302 }
9303}
9304impl crate::common::validate::Validatable for ClearingChannel2Code {
9305 fn validate_constraints(
9306 &self,
9307 _path: &str,
9308 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9309 ) {
9310 }
9311}
9312impl crate::common::validate::Validatable for CountryCode {
9313 #[allow(clippy::unreadable_literal)]
9314 fn validate_constraints(
9315 &self,
9316 path: &str,
9317 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9318 ) {
9319 {
9320 let value: &str = &self.0;
9321 let violated = {
9322 let bytes = value.as_bytes();
9323 bytes.len() != 2usize
9324 || ({
9325 let b = bytes[0usize];
9326 !(65u8..=90u8).contains(&b)
9327 })
9328 || ({
9329 let b = bytes[1usize];
9330 !(65u8..=90u8).contains(&b)
9331 })
9332 };
9333 if violated {
9334 violations.push(crate::common::validate::ConstraintViolation {
9335 path: path.to_string(),
9336 message: "value does not match pattern [A-Z]{2,2}".to_string(),
9337 kind: crate::common::validate::ConstraintKind::Pattern,
9338 });
9339 }
9340 }
9341 }
9342}
9343impl crate::common::validate::Validatable for CreditDebitCode {
9344 fn validate_constraints(
9345 &self,
9346 _path: &str,
9347 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9348 ) {
9349 }
9350}
9351impl crate::common::validate::Validatable for DecimalNumber {
9352 #[allow(clippy::unreadable_literal)]
9353 fn validate_constraints(
9354 &self,
9355 path: &str,
9356 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9357 ) {
9358 {
9359 let value: &str = &self.0;
9360 let frac_count = value.find('.').map_or(0, |dot| {
9361 value[dot + 1..]
9362 .chars()
9363 .filter(char::is_ascii_digit)
9364 .count()
9365 });
9366 let violated = frac_count > 17usize;
9367 if violated {
9368 violations.push(crate::common::validate::ConstraintViolation {
9369 path: path.to_string(),
9370 message: format!(
9371 "{} (got {})",
9372 "value exceeds maximum fraction digits 17", frac_count
9373 ),
9374 kind: crate::common::validate::ConstraintKind::FractionDigits,
9375 });
9376 }
9377 }
9378 {
9379 let value: &str = &self.0;
9380 let digit_count = value.chars().filter(char::is_ascii_digit).count();
9381 let violated = digit_count > 18usize;
9382 if violated {
9383 violations.push(crate::common::validate::ConstraintViolation {
9384 path: path.to_string(),
9385 message: format!(
9386 "{} (got {})",
9387 "value exceeds maximum total digits 18", digit_count
9388 ),
9389 kind: crate::common::validate::ConstraintKind::TotalDigits,
9390 });
9391 }
9392 }
9393 }
9394}
9395impl crate::common::validate::Validatable for DocumentType3Code {
9396 fn validate_constraints(
9397 &self,
9398 _path: &str,
9399 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9400 ) {
9401 }
9402}
9403impl crate::common::validate::Validatable for DocumentType6Code {
9404 fn validate_constraints(
9405 &self,
9406 _path: &str,
9407 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9408 ) {
9409 }
9410}
9411impl crate::common::validate::Validatable for Exact2NumericText {
9412 #[allow(clippy::unreadable_literal)]
9413 fn validate_constraints(
9414 &self,
9415 path: &str,
9416 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9417 ) {
9418 {
9419 let value: &str = &self.0;
9420 let violated = {
9421 let bytes = value.as_bytes();
9422 bytes.len() != 2usize
9423 || ({
9424 let b = bytes[0usize];
9425 !(48u8..=57u8).contains(&b)
9426 })
9427 || ({
9428 let b = bytes[1usize];
9429 !(48u8..=57u8).contains(&b)
9430 })
9431 };
9432 if violated {
9433 violations.push(crate::common::validate::ConstraintViolation {
9434 path: path.to_string(),
9435 message: "value does not match pattern [0-9]{2}".to_string(),
9436 kind: crate::common::validate::ConstraintKind::Pattern,
9437 });
9438 }
9439 }
9440 }
9441}
9442impl crate::common::validate::Validatable for Exact4AlphaNumericText {
9443 #[allow(clippy::unreadable_literal)]
9444 fn validate_constraints(
9445 &self,
9446 path: &str,
9447 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9448 ) {
9449 {
9450 let value: &str = &self.0;
9451 let violated = {
9452 let bytes = value.as_bytes();
9453 bytes.len() != 4usize
9454 || ({
9455 let b = bytes[0usize];
9456 !(97u8..=122u8).contains(&b)
9457 && !(65u8..=90u8).contains(&b)
9458 && !(48u8..=57u8).contains(&b)
9459 })
9460 || ({
9461 let b = bytes[1usize];
9462 !(97u8..=122u8).contains(&b)
9463 && !(65u8..=90u8).contains(&b)
9464 && !(48u8..=57u8).contains(&b)
9465 })
9466 || ({
9467 let b = bytes[2usize];
9468 !(97u8..=122u8).contains(&b)
9469 && !(65u8..=90u8).contains(&b)
9470 && !(48u8..=57u8).contains(&b)
9471 })
9472 || ({
9473 let b = bytes[3usize];
9474 !(97u8..=122u8).contains(&b)
9475 && !(65u8..=90u8).contains(&b)
9476 && !(48u8..=57u8).contains(&b)
9477 })
9478 };
9479 if violated {
9480 violations.push(crate::common::validate::ConstraintViolation {
9481 path: path.to_string(),
9482 message: "value does not match pattern [a-zA-Z0-9]{4}".to_string(),
9483 kind: crate::common::validate::ConstraintKind::Pattern,
9484 });
9485 }
9486 }
9487 }
9488}
9489impl crate::common::validate::Validatable for ExternalAccountIdentification1Code {
9490 #[allow(clippy::unreadable_literal)]
9491 fn validate_constraints(
9492 &self,
9493 path: &str,
9494 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9495 ) {
9496 let len = self.0.chars().count();
9497 {
9498 let violated = len < 1usize;
9499 if violated {
9500 violations.push(crate::common::validate::ConstraintViolation {
9501 path: path.to_string(),
9502 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9503 kind: crate::common::validate::ConstraintKind::MinLength,
9504 });
9505 }
9506 }
9507 {
9508 let violated = len > 4usize;
9509 if violated {
9510 violations.push(crate::common::validate::ConstraintViolation {
9511 path: path.to_string(),
9512 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9513 kind: crate::common::validate::ConstraintKind::MaxLength,
9514 });
9515 }
9516 }
9517 }
9518}
9519impl crate::common::validate::Validatable for ExternalCashAccountType1Code {
9520 #[allow(clippy::unreadable_literal)]
9521 fn validate_constraints(
9522 &self,
9523 path: &str,
9524 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9525 ) {
9526 let len = self.0.chars().count();
9527 {
9528 let violated = len < 1usize;
9529 if violated {
9530 violations.push(crate::common::validate::ConstraintViolation {
9531 path: path.to_string(),
9532 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9533 kind: crate::common::validate::ConstraintKind::MinLength,
9534 });
9535 }
9536 }
9537 {
9538 let violated = len > 4usize;
9539 if violated {
9540 violations.push(crate::common::validate::ConstraintViolation {
9541 path: path.to_string(),
9542 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9543 kind: crate::common::validate::ConstraintKind::MaxLength,
9544 });
9545 }
9546 }
9547 }
9548}
9549impl crate::common::validate::Validatable for ExternalCashClearingSystem1Code {
9550 #[allow(clippy::unreadable_literal)]
9551 fn validate_constraints(
9552 &self,
9553 path: &str,
9554 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9555 ) {
9556 let len = self.0.chars().count();
9557 {
9558 let violated = len < 1usize;
9559 if violated {
9560 violations.push(crate::common::validate::ConstraintViolation {
9561 path: path.to_string(),
9562 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9563 kind: crate::common::validate::ConstraintKind::MinLength,
9564 });
9565 }
9566 }
9567 {
9568 let violated = len > 3usize;
9569 if violated {
9570 violations.push(crate::common::validate::ConstraintViolation {
9571 path: path.to_string(),
9572 message: format!("{} (got {})", "value exceeds maximum length 3", len),
9573 kind: crate::common::validate::ConstraintKind::MaxLength,
9574 });
9575 }
9576 }
9577 }
9578}
9579impl crate::common::validate::Validatable for ExternalCategoryPurpose1Code {
9580 #[allow(clippy::unreadable_literal)]
9581 fn validate_constraints(
9582 &self,
9583 path: &str,
9584 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9585 ) {
9586 let len = self.0.chars().count();
9587 {
9588 let violated = len < 1usize;
9589 if violated {
9590 violations.push(crate::common::validate::ConstraintViolation {
9591 path: path.to_string(),
9592 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9593 kind: crate::common::validate::ConstraintKind::MinLength,
9594 });
9595 }
9596 }
9597 {
9598 let violated = len > 4usize;
9599 if violated {
9600 violations.push(crate::common::validate::ConstraintViolation {
9601 path: path.to_string(),
9602 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9603 kind: crate::common::validate::ConstraintKind::MaxLength,
9604 });
9605 }
9606 }
9607 }
9608}
9609impl crate::common::validate::Validatable for ExternalClearingSystemIdentification1Code {
9610 #[allow(clippy::unreadable_literal)]
9611 fn validate_constraints(
9612 &self,
9613 path: &str,
9614 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9615 ) {
9616 let len = self.0.chars().count();
9617 {
9618 let violated = len < 1usize;
9619 if violated {
9620 violations.push(crate::common::validate::ConstraintViolation {
9621 path: path.to_string(),
9622 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9623 kind: crate::common::validate::ConstraintKind::MinLength,
9624 });
9625 }
9626 }
9627 {
9628 let violated = len > 5usize;
9629 if violated {
9630 violations.push(crate::common::validate::ConstraintViolation {
9631 path: path.to_string(),
9632 message: format!("{} (got {})", "value exceeds maximum length 5", len),
9633 kind: crate::common::validate::ConstraintKind::MaxLength,
9634 });
9635 }
9636 }
9637 }
9638}
9639impl crate::common::validate::Validatable for ExternalDiscountAmountType1Code {
9640 #[allow(clippy::unreadable_literal)]
9641 fn validate_constraints(
9642 &self,
9643 path: &str,
9644 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9645 ) {
9646 let len = self.0.chars().count();
9647 {
9648 let violated = len < 1usize;
9649 if violated {
9650 violations.push(crate::common::validate::ConstraintViolation {
9651 path: path.to_string(),
9652 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9653 kind: crate::common::validate::ConstraintKind::MinLength,
9654 });
9655 }
9656 }
9657 {
9658 let violated = len > 4usize;
9659 if violated {
9660 violations.push(crate::common::validate::ConstraintViolation {
9661 path: path.to_string(),
9662 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9663 kind: crate::common::validate::ConstraintKind::MaxLength,
9664 });
9665 }
9666 }
9667 }
9668}
9669impl crate::common::validate::Validatable for ExternalDocumentLineType1Code {
9670 #[allow(clippy::unreadable_literal)]
9671 fn validate_constraints(
9672 &self,
9673 path: &str,
9674 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9675 ) {
9676 let len = self.0.chars().count();
9677 {
9678 let violated = len < 1usize;
9679 if violated {
9680 violations.push(crate::common::validate::ConstraintViolation {
9681 path: path.to_string(),
9682 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9683 kind: crate::common::validate::ConstraintKind::MinLength,
9684 });
9685 }
9686 }
9687 {
9688 let violated = len > 4usize;
9689 if violated {
9690 violations.push(crate::common::validate::ConstraintViolation {
9691 path: path.to_string(),
9692 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9693 kind: crate::common::validate::ConstraintKind::MaxLength,
9694 });
9695 }
9696 }
9697 }
9698}
9699impl crate::common::validate::Validatable for ExternalFinancialInstitutionIdentification1Code {
9700 #[allow(clippy::unreadable_literal)]
9701 fn validate_constraints(
9702 &self,
9703 path: &str,
9704 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9705 ) {
9706 let len = self.0.chars().count();
9707 {
9708 let violated = len < 1usize;
9709 if violated {
9710 violations.push(crate::common::validate::ConstraintViolation {
9711 path: path.to_string(),
9712 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9713 kind: crate::common::validate::ConstraintKind::MinLength,
9714 });
9715 }
9716 }
9717 {
9718 let violated = len > 4usize;
9719 if violated {
9720 violations.push(crate::common::validate::ConstraintViolation {
9721 path: path.to_string(),
9722 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9723 kind: crate::common::validate::ConstraintKind::MaxLength,
9724 });
9725 }
9726 }
9727 }
9728}
9729impl crate::common::validate::Validatable for ExternalGarnishmentType1Code {
9730 #[allow(clippy::unreadable_literal)]
9731 fn validate_constraints(
9732 &self,
9733 path: &str,
9734 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9735 ) {
9736 let len = self.0.chars().count();
9737 {
9738 let violated = len < 1usize;
9739 if violated {
9740 violations.push(crate::common::validate::ConstraintViolation {
9741 path: path.to_string(),
9742 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9743 kind: crate::common::validate::ConstraintKind::MinLength,
9744 });
9745 }
9746 }
9747 {
9748 let violated = len > 4usize;
9749 if violated {
9750 violations.push(crate::common::validate::ConstraintViolation {
9751 path: path.to_string(),
9752 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9753 kind: crate::common::validate::ConstraintKind::MaxLength,
9754 });
9755 }
9756 }
9757 }
9758}
9759impl crate::common::validate::Validatable for ExternalLocalInstrument1Code {
9760 #[allow(clippy::unreadable_literal)]
9761 fn validate_constraints(
9762 &self,
9763 path: &str,
9764 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9765 ) {
9766 let len = self.0.chars().count();
9767 {
9768 let violated = len < 1usize;
9769 if violated {
9770 violations.push(crate::common::validate::ConstraintViolation {
9771 path: path.to_string(),
9772 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9773 kind: crate::common::validate::ConstraintKind::MinLength,
9774 });
9775 }
9776 }
9777 {
9778 let violated = len > 35usize;
9779 if violated {
9780 violations.push(crate::common::validate::ConstraintViolation {
9781 path: path.to_string(),
9782 message: format!("{} (got {})", "value exceeds maximum length 35", len),
9783 kind: crate::common::validate::ConstraintKind::MaxLength,
9784 });
9785 }
9786 }
9787 }
9788}
9789impl crate::common::validate::Validatable for ExternalMandateSetupReason1Code {
9790 #[allow(clippy::unreadable_literal)]
9791 fn validate_constraints(
9792 &self,
9793 path: &str,
9794 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9795 ) {
9796 let len = self.0.chars().count();
9797 {
9798 let violated = len < 1usize;
9799 if violated {
9800 violations.push(crate::common::validate::ConstraintViolation {
9801 path: path.to_string(),
9802 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9803 kind: crate::common::validate::ConstraintKind::MinLength,
9804 });
9805 }
9806 }
9807 {
9808 let violated = len > 4usize;
9809 if violated {
9810 violations.push(crate::common::validate::ConstraintViolation {
9811 path: path.to_string(),
9812 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9813 kind: crate::common::validate::ConstraintKind::MaxLength,
9814 });
9815 }
9816 }
9817 }
9818}
9819impl crate::common::validate::Validatable for ExternalOrganisationIdentification1Code {
9820 #[allow(clippy::unreadable_literal)]
9821 fn validate_constraints(
9822 &self,
9823 path: &str,
9824 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9825 ) {
9826 let len = self.0.chars().count();
9827 {
9828 let violated = len < 1usize;
9829 if violated {
9830 violations.push(crate::common::validate::ConstraintViolation {
9831 path: path.to_string(),
9832 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9833 kind: crate::common::validate::ConstraintKind::MinLength,
9834 });
9835 }
9836 }
9837 {
9838 let violated = len > 4usize;
9839 if violated {
9840 violations.push(crate::common::validate::ConstraintViolation {
9841 path: path.to_string(),
9842 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9843 kind: crate::common::validate::ConstraintKind::MaxLength,
9844 });
9845 }
9846 }
9847 }
9848}
9849impl crate::common::validate::Validatable for ExternalPersonIdentification1Code {
9850 #[allow(clippy::unreadable_literal)]
9851 fn validate_constraints(
9852 &self,
9853 path: &str,
9854 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9855 ) {
9856 let len = self.0.chars().count();
9857 {
9858 let violated = len < 1usize;
9859 if violated {
9860 violations.push(crate::common::validate::ConstraintViolation {
9861 path: path.to_string(),
9862 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9863 kind: crate::common::validate::ConstraintKind::MinLength,
9864 });
9865 }
9866 }
9867 {
9868 let violated = len > 4usize;
9869 if violated {
9870 violations.push(crate::common::validate::ConstraintViolation {
9871 path: path.to_string(),
9872 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9873 kind: crate::common::validate::ConstraintKind::MaxLength,
9874 });
9875 }
9876 }
9877 }
9878}
9879impl crate::common::validate::Validatable for ExternalProxyAccountType1Code {
9880 #[allow(clippy::unreadable_literal)]
9881 fn validate_constraints(
9882 &self,
9883 path: &str,
9884 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9885 ) {
9886 let len = self.0.chars().count();
9887 {
9888 let violated = len < 1usize;
9889 if violated {
9890 violations.push(crate::common::validate::ConstraintViolation {
9891 path: path.to_string(),
9892 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9893 kind: crate::common::validate::ConstraintKind::MinLength,
9894 });
9895 }
9896 }
9897 {
9898 let violated = len > 4usize;
9899 if violated {
9900 violations.push(crate::common::validate::ConstraintViolation {
9901 path: path.to_string(),
9902 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9903 kind: crate::common::validate::ConstraintKind::MaxLength,
9904 });
9905 }
9906 }
9907 }
9908}
9909impl crate::common::validate::Validatable for ExternalPurpose1Code {
9910 #[allow(clippy::unreadable_literal)]
9911 fn validate_constraints(
9912 &self,
9913 path: &str,
9914 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9915 ) {
9916 let len = self.0.chars().count();
9917 {
9918 let violated = len < 1usize;
9919 if violated {
9920 violations.push(crate::common::validate::ConstraintViolation {
9921 path: path.to_string(),
9922 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9923 kind: crate::common::validate::ConstraintKind::MinLength,
9924 });
9925 }
9926 }
9927 {
9928 let violated = len > 4usize;
9929 if violated {
9930 violations.push(crate::common::validate::ConstraintViolation {
9931 path: path.to_string(),
9932 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9933 kind: crate::common::validate::ConstraintKind::MaxLength,
9934 });
9935 }
9936 }
9937 }
9938}
9939impl crate::common::validate::Validatable for ExternalServiceLevel1Code {
9940 #[allow(clippy::unreadable_literal)]
9941 fn validate_constraints(
9942 &self,
9943 path: &str,
9944 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9945 ) {
9946 let len = self.0.chars().count();
9947 {
9948 let violated = len < 1usize;
9949 if violated {
9950 violations.push(crate::common::validate::ConstraintViolation {
9951 path: path.to_string(),
9952 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9953 kind: crate::common::validate::ConstraintKind::MinLength,
9954 });
9955 }
9956 }
9957 {
9958 let violated = len > 4usize;
9959 if violated {
9960 violations.push(crate::common::validate::ConstraintViolation {
9961 path: path.to_string(),
9962 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9963 kind: crate::common::validate::ConstraintKind::MaxLength,
9964 });
9965 }
9966 }
9967 }
9968}
9969impl crate::common::validate::Validatable for ExternalTaxAmountType1Code {
9970 #[allow(clippy::unreadable_literal)]
9971 fn validate_constraints(
9972 &self,
9973 path: &str,
9974 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
9975 ) {
9976 let len = self.0.chars().count();
9977 {
9978 let violated = len < 1usize;
9979 if violated {
9980 violations.push(crate::common::validate::ConstraintViolation {
9981 path: path.to_string(),
9982 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
9983 kind: crate::common::validate::ConstraintKind::MinLength,
9984 });
9985 }
9986 }
9987 {
9988 let violated = len > 4usize;
9989 if violated {
9990 violations.push(crate::common::validate::ConstraintViolation {
9991 path: path.to_string(),
9992 message: format!("{} (got {})", "value exceeds maximum length 4", len),
9993 kind: crate::common::validate::ConstraintKind::MaxLength,
9994 });
9995 }
9996 }
9997 }
9998}
9999impl crate::common::validate::Validatable for Frequency6Code {
10000 fn validate_constraints(
10001 &self,
10002 _path: &str,
10003 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10004 ) {
10005 }
10006}
10007impl crate::common::validate::Validatable for IBAN2007Identifier {
10008 #[allow(clippy::unreadable_literal)]
10009 fn validate_constraints(
10010 &self,
10011 path: &str,
10012 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10013 ) {
10014 {
10015 let value: &str = &self.0;
10016 let violated = {
10017 let bytes = value.as_bytes();
10018 let len = bytes.len();
10019 let result: bool = (|| -> bool {
10020 let mut pos: usize = 0;
10021 if !(5usize..=34usize).contains(&len) {
10022 return true;
10023 }
10024 {
10025 let end = pos + 2usize;
10026 if end > len {
10027 return true;
10028 }
10029 for &b in &bytes[pos..end] {
10030 if !(65u8..=90u8).contains(&b) {
10031 return true;
10032 }
10033 }
10034 pos = end;
10035 }
10036 {
10037 let end = pos + 2usize;
10038 if end > len {
10039 return true;
10040 }
10041 for &b in &bytes[pos..end] {
10042 if !(48u8..=57u8).contains(&b) {
10043 return true;
10044 }
10045 }
10046 pos = end;
10047 }
10048 {
10049 let start = pos;
10050 let limit = if pos + 30usize < len {
10051 pos + 30usize
10052 } else {
10053 len
10054 };
10055 while pos < limit {
10056 let b = bytes[pos];
10057 if !(97u8..=122u8).contains(&b)
10058 && !(65u8..=90u8).contains(&b)
10059 && !(48u8..=57u8).contains(&b)
10060 {
10061 break;
10062 }
10063 pos += 1;
10064 }
10065 let matched = pos - start;
10066 if matched < 1usize {
10067 return true;
10068 }
10069 }
10070 if pos != len {
10071 return true;
10072 }
10073 false
10074 })();
10075 result
10076 };
10077 if violated {
10078 violations.push(crate::common::validate::ConstraintViolation {
10079 path: path.to_string(),
10080 message: "value does not match pattern [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"
10081 .to_string(),
10082 kind: crate::common::validate::ConstraintKind::Pattern,
10083 });
10084 }
10085 }
10086 }
10087}
10088impl crate::common::validate::Validatable for ISODate {
10089 fn validate_constraints(
10090 &self,
10091 _path: &str,
10092 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10093 ) {
10094 }
10095}
10096impl crate::common::validate::Validatable for ISODateTime {
10097 fn validate_constraints(
10098 &self,
10099 _path: &str,
10100 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10101 ) {
10102 }
10103}
10104impl crate::common::validate::Validatable for ISOYear {
10105 fn validate_constraints(
10106 &self,
10107 _path: &str,
10108 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10109 ) {
10110 }
10111}
10112impl crate::common::validate::Validatable for LEIIdentifier {
10113 #[allow(clippy::unreadable_literal)]
10114 fn validate_constraints(
10115 &self,
10116 path: &str,
10117 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10118 ) {
10119 {
10120 let value: &str = &self.0;
10121 let violated = {
10122 let bytes = value.as_bytes();
10123 bytes.len() != 20usize
10124 || ({
10125 let b = bytes[0usize];
10126 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10127 })
10128 || ({
10129 let b = bytes[1usize];
10130 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10131 })
10132 || ({
10133 let b = bytes[2usize];
10134 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10135 })
10136 || ({
10137 let b = bytes[3usize];
10138 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10139 })
10140 || ({
10141 let b = bytes[4usize];
10142 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10143 })
10144 || ({
10145 let b = bytes[5usize];
10146 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10147 })
10148 || ({
10149 let b = bytes[6usize];
10150 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10151 })
10152 || ({
10153 let b = bytes[7usize];
10154 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10155 })
10156 || ({
10157 let b = bytes[8usize];
10158 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10159 })
10160 || ({
10161 let b = bytes[9usize];
10162 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10163 })
10164 || ({
10165 let b = bytes[10usize];
10166 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10167 })
10168 || ({
10169 let b = bytes[11usize];
10170 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10171 })
10172 || ({
10173 let b = bytes[12usize];
10174 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10175 })
10176 || ({
10177 let b = bytes[13usize];
10178 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10179 })
10180 || ({
10181 let b = bytes[14usize];
10182 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10183 })
10184 || ({
10185 let b = bytes[15usize];
10186 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10187 })
10188 || ({
10189 let b = bytes[16usize];
10190 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10191 })
10192 || ({
10193 let b = bytes[17usize];
10194 !(65u8..=90u8).contains(&b) && !(48u8..=57u8).contains(&b)
10195 })
10196 || ({
10197 let b = bytes[18usize];
10198 !(48u8..=57u8).contains(&b)
10199 })
10200 || ({
10201 let b = bytes[19usize];
10202 !(48u8..=57u8).contains(&b)
10203 })
10204 };
10205 if violated {
10206 violations.push(crate::common::validate::ConstraintViolation {
10207 path: path.to_string(),
10208 message: "value does not match pattern [A-Z0-9]{18,18}[0-9]{2,2}".to_string(),
10209 kind: crate::common::validate::ConstraintKind::Pattern,
10210 });
10211 }
10212 }
10213 }
10214}
10215impl crate::common::validate::Validatable for MandateClassification1Code {
10216 fn validate_constraints(
10217 &self,
10218 _path: &str,
10219 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10220 ) {
10221 }
10222}
10223impl crate::common::validate::Validatable for Max1025Text {
10224 #[allow(clippy::unreadable_literal)]
10225 fn validate_constraints(
10226 &self,
10227 path: &str,
10228 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10229 ) {
10230 let len = self.0.chars().count();
10231 {
10232 let violated = len < 1usize;
10233 if violated {
10234 violations.push(crate::common::validate::ConstraintViolation {
10235 path: path.to_string(),
10236 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10237 kind: crate::common::validate::ConstraintKind::MinLength,
10238 });
10239 }
10240 }
10241 {
10242 let violated = len > 1025usize;
10243 if violated {
10244 violations.push(crate::common::validate::ConstraintViolation {
10245 path: path.to_string(),
10246 message: format!("{} (got {})", "value exceeds maximum length 1025", len),
10247 kind: crate::common::validate::ConstraintKind::MaxLength,
10248 });
10249 }
10250 }
10251 }
10252}
10253impl crate::common::validate::Validatable for Max10KBinary {
10254 #[allow(clippy::unreadable_literal)]
10255 fn validate_constraints(
10256 &self,
10257 path: &str,
10258 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10259 ) {
10260 let len = self.0.chars().count();
10261 {
10262 let violated = len < 1usize;
10263 if violated {
10264 violations.push(crate::common::validate::ConstraintViolation {
10265 path: path.to_string(),
10266 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10267 kind: crate::common::validate::ConstraintKind::MinLength,
10268 });
10269 }
10270 }
10271 {
10272 let violated = len > 10240usize;
10273 if violated {
10274 violations.push(crate::common::validate::ConstraintViolation {
10275 path: path.to_string(),
10276 message: format!("{} (got {})", "value exceeds maximum length 10240", len),
10277 kind: crate::common::validate::ConstraintKind::MaxLength,
10278 });
10279 }
10280 }
10281 }
10282}
10283impl crate::common::validate::Validatable for Max128Text {
10284 #[allow(clippy::unreadable_literal)]
10285 fn validate_constraints(
10286 &self,
10287 path: &str,
10288 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10289 ) {
10290 let len = self.0.chars().count();
10291 {
10292 let violated = len < 1usize;
10293 if violated {
10294 violations.push(crate::common::validate::ConstraintViolation {
10295 path: path.to_string(),
10296 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10297 kind: crate::common::validate::ConstraintKind::MinLength,
10298 });
10299 }
10300 }
10301 {
10302 let violated = len > 128usize;
10303 if violated {
10304 violations.push(crate::common::validate::ConstraintViolation {
10305 path: path.to_string(),
10306 message: format!("{} (got {})", "value exceeds maximum length 128", len),
10307 kind: crate::common::validate::ConstraintKind::MaxLength,
10308 });
10309 }
10310 }
10311 }
10312}
10313impl crate::common::validate::Validatable for Max140Text {
10314 #[allow(clippy::unreadable_literal)]
10315 fn validate_constraints(
10316 &self,
10317 path: &str,
10318 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10319 ) {
10320 let len = self.0.chars().count();
10321 {
10322 let violated = len < 1usize;
10323 if violated {
10324 violations.push(crate::common::validate::ConstraintViolation {
10325 path: path.to_string(),
10326 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10327 kind: crate::common::validate::ConstraintKind::MinLength,
10328 });
10329 }
10330 }
10331 {
10332 let violated = len > 140usize;
10333 if violated {
10334 violations.push(crate::common::validate::ConstraintViolation {
10335 path: path.to_string(),
10336 message: format!("{} (got {})", "value exceeds maximum length 140", len),
10337 kind: crate::common::validate::ConstraintKind::MaxLength,
10338 });
10339 }
10340 }
10341 }
10342}
10343impl crate::common::validate::Validatable for Max15NumericText {
10344 #[allow(clippy::unreadable_literal)]
10345 fn validate_constraints(
10346 &self,
10347 path: &str,
10348 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10349 ) {
10350 {
10351 let value: &str = &self.0;
10352 let violated = {
10353 let bytes = value.as_bytes();
10354 let len = bytes.len();
10355 let result: bool = (|| -> bool {
10356 let mut pos: usize = 0;
10357 if !(1usize..=15usize).contains(&len) {
10358 return true;
10359 }
10360 {
10361 let start = pos;
10362 let limit = if pos + 15usize < len {
10363 pos + 15usize
10364 } else {
10365 len
10366 };
10367 while pos < limit {
10368 let b = bytes[pos];
10369 if !(48u8..=57u8).contains(&b) {
10370 break;
10371 }
10372 pos += 1;
10373 }
10374 let matched = pos - start;
10375 if matched < 1usize {
10376 return true;
10377 }
10378 }
10379 if pos != len {
10380 return true;
10381 }
10382 false
10383 })();
10384 result
10385 };
10386 if violated {
10387 violations.push(crate::common::validate::ConstraintViolation {
10388 path: path.to_string(),
10389 message: "value does not match pattern [0-9]{1,15}".to_string(),
10390 kind: crate::common::validate::ConstraintKind::Pattern,
10391 });
10392 }
10393 }
10394 }
10395}
10396impl crate::common::validate::Validatable for Max16Text {
10397 #[allow(clippy::unreadable_literal)]
10398 fn validate_constraints(
10399 &self,
10400 path: &str,
10401 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10402 ) {
10403 let len = self.0.chars().count();
10404 {
10405 let violated = len < 1usize;
10406 if violated {
10407 violations.push(crate::common::validate::ConstraintViolation {
10408 path: path.to_string(),
10409 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10410 kind: crate::common::validate::ConstraintKind::MinLength,
10411 });
10412 }
10413 }
10414 {
10415 let violated = len > 16usize;
10416 if violated {
10417 violations.push(crate::common::validate::ConstraintViolation {
10418 path: path.to_string(),
10419 message: format!("{} (got {})", "value exceeds maximum length 16", len),
10420 kind: crate::common::validate::ConstraintKind::MaxLength,
10421 });
10422 }
10423 }
10424 }
10425}
10426impl crate::common::validate::Validatable for Max2048Text {
10427 #[allow(clippy::unreadable_literal)]
10428 fn validate_constraints(
10429 &self,
10430 path: &str,
10431 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10432 ) {
10433 let len = self.0.chars().count();
10434 {
10435 let violated = len < 1usize;
10436 if violated {
10437 violations.push(crate::common::validate::ConstraintViolation {
10438 path: path.to_string(),
10439 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10440 kind: crate::common::validate::ConstraintKind::MinLength,
10441 });
10442 }
10443 }
10444 {
10445 let violated = len > 2048usize;
10446 if violated {
10447 violations.push(crate::common::validate::ConstraintViolation {
10448 path: path.to_string(),
10449 message: format!("{} (got {})", "value exceeds maximum length 2048", len),
10450 kind: crate::common::validate::ConstraintKind::MaxLength,
10451 });
10452 }
10453 }
10454 }
10455}
10456impl crate::common::validate::Validatable for Max34Text {
10457 #[allow(clippy::unreadable_literal)]
10458 fn validate_constraints(
10459 &self,
10460 path: &str,
10461 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10462 ) {
10463 let len = self.0.chars().count();
10464 {
10465 let violated = len < 1usize;
10466 if violated {
10467 violations.push(crate::common::validate::ConstraintViolation {
10468 path: path.to_string(),
10469 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10470 kind: crate::common::validate::ConstraintKind::MinLength,
10471 });
10472 }
10473 }
10474 {
10475 let violated = len > 34usize;
10476 if violated {
10477 violations.push(crate::common::validate::ConstraintViolation {
10478 path: path.to_string(),
10479 message: format!("{} (got {})", "value exceeds maximum length 34", len),
10480 kind: crate::common::validate::ConstraintKind::MaxLength,
10481 });
10482 }
10483 }
10484 }
10485}
10486impl crate::common::validate::Validatable for Max350Text {
10487 #[allow(clippy::unreadable_literal)]
10488 fn validate_constraints(
10489 &self,
10490 path: &str,
10491 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10492 ) {
10493 let len = self.0.chars().count();
10494 {
10495 let violated = len < 1usize;
10496 if violated {
10497 violations.push(crate::common::validate::ConstraintViolation {
10498 path: path.to_string(),
10499 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10500 kind: crate::common::validate::ConstraintKind::MinLength,
10501 });
10502 }
10503 }
10504 {
10505 let violated = len > 350usize;
10506 if violated {
10507 violations.push(crate::common::validate::ConstraintViolation {
10508 path: path.to_string(),
10509 message: format!("{} (got {})", "value exceeds maximum length 350", len),
10510 kind: crate::common::validate::ConstraintKind::MaxLength,
10511 });
10512 }
10513 }
10514 }
10515}
10516impl crate::common::validate::Validatable for Max35Text {
10517 #[allow(clippy::unreadable_literal)]
10518 fn validate_constraints(
10519 &self,
10520 path: &str,
10521 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10522 ) {
10523 let len = self.0.chars().count();
10524 {
10525 let violated = len < 1usize;
10526 if violated {
10527 violations.push(crate::common::validate::ConstraintViolation {
10528 path: path.to_string(),
10529 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10530 kind: crate::common::validate::ConstraintKind::MinLength,
10531 });
10532 }
10533 }
10534 {
10535 let violated = len > 35usize;
10536 if violated {
10537 violations.push(crate::common::validate::ConstraintViolation {
10538 path: path.to_string(),
10539 message: format!("{} (got {})", "value exceeds maximum length 35", len),
10540 kind: crate::common::validate::ConstraintKind::MaxLength,
10541 });
10542 }
10543 }
10544 }
10545}
10546impl crate::common::validate::Validatable for Max4Text {
10547 #[allow(clippy::unreadable_literal)]
10548 fn validate_constraints(
10549 &self,
10550 path: &str,
10551 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10552 ) {
10553 let len = self.0.chars().count();
10554 {
10555 let violated = len < 1usize;
10556 if violated {
10557 violations.push(crate::common::validate::ConstraintViolation {
10558 path: path.to_string(),
10559 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10560 kind: crate::common::validate::ConstraintKind::MinLength,
10561 });
10562 }
10563 }
10564 {
10565 let violated = len > 4usize;
10566 if violated {
10567 violations.push(crate::common::validate::ConstraintViolation {
10568 path: path.to_string(),
10569 message: format!("{} (got {})", "value exceeds maximum length 4", len),
10570 kind: crate::common::validate::ConstraintKind::MaxLength,
10571 });
10572 }
10573 }
10574 }
10575}
10576impl crate::common::validate::Validatable for Max70Text {
10577 #[allow(clippy::unreadable_literal)]
10578 fn validate_constraints(
10579 &self,
10580 path: &str,
10581 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10582 ) {
10583 let len = self.0.chars().count();
10584 {
10585 let violated = len < 1usize;
10586 if violated {
10587 violations.push(crate::common::validate::ConstraintViolation {
10588 path: path.to_string(),
10589 message: format!("{} (got {})", "value is shorter than minimum length 1", len),
10590 kind: crate::common::validate::ConstraintKind::MinLength,
10591 });
10592 }
10593 }
10594 {
10595 let violated = len > 70usize;
10596 if violated {
10597 violations.push(crate::common::validate::ConstraintViolation {
10598 path: path.to_string(),
10599 message: format!("{} (got {})", "value exceeds maximum length 70", len),
10600 kind: crate::common::validate::ConstraintKind::MaxLength,
10601 });
10602 }
10603 }
10604 }
10605}
10606impl crate::common::validate::Validatable for NamePrefix2Code {
10607 fn validate_constraints(
10608 &self,
10609 _path: &str,
10610 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10611 ) {
10612 }
10613}
10614impl crate::common::validate::Validatable for Number {
10615 #[allow(clippy::unreadable_literal)]
10616 fn validate_constraints(
10617 &self,
10618 path: &str,
10619 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10620 ) {
10621 {
10622 let value: &str = &self.0;
10623 let frac_count = value.find('.').map_or(0, |dot| {
10624 value[dot + 1..]
10625 .chars()
10626 .filter(char::is_ascii_digit)
10627 .count()
10628 });
10629 let violated = frac_count > 0usize;
10630 if violated {
10631 violations.push(crate::common::validate::ConstraintViolation {
10632 path: path.to_string(),
10633 message: format!(
10634 "{} (got {})",
10635 "value exceeds maximum fraction digits 0", frac_count
10636 ),
10637 kind: crate::common::validate::ConstraintKind::FractionDigits,
10638 });
10639 }
10640 }
10641 {
10642 let value: &str = &self.0;
10643 let digit_count = value.chars().filter(char::is_ascii_digit).count();
10644 let violated = digit_count > 18usize;
10645 if violated {
10646 violations.push(crate::common::validate::ConstraintViolation {
10647 path: path.to_string(),
10648 message: format!(
10649 "{} (got {})",
10650 "value exceeds maximum total digits 18", digit_count
10651 ),
10652 kind: crate::common::validate::ConstraintKind::TotalDigits,
10653 });
10654 }
10655 }
10656 }
10657}
10658impl crate::common::validate::Validatable for PaymentMethod4Code {
10659 fn validate_constraints(
10660 &self,
10661 _path: &str,
10662 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10663 ) {
10664 }
10665}
10666impl crate::common::validate::Validatable for PercentageRate {
10667 #[allow(clippy::unreadable_literal)]
10668 fn validate_constraints(
10669 &self,
10670 path: &str,
10671 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10672 ) {
10673 {
10674 let value: &str = &self.0;
10675 let frac_count = value.find('.').map_or(0, |dot| {
10676 value[dot + 1..]
10677 .chars()
10678 .filter(char::is_ascii_digit)
10679 .count()
10680 });
10681 let violated = frac_count > 10usize;
10682 if violated {
10683 violations.push(crate::common::validate::ConstraintViolation {
10684 path: path.to_string(),
10685 message: format!(
10686 "{} (got {})",
10687 "value exceeds maximum fraction digits 10", frac_count
10688 ),
10689 kind: crate::common::validate::ConstraintKind::FractionDigits,
10690 });
10691 }
10692 }
10693 {
10694 let value: &str = &self.0;
10695 let digit_count = value.chars().filter(char::is_ascii_digit).count();
10696 let violated = digit_count > 11usize;
10697 if violated {
10698 violations.push(crate::common::validate::ConstraintViolation {
10699 path: path.to_string(),
10700 message: format!(
10701 "{} (got {})",
10702 "value exceeds maximum total digits 11", digit_count
10703 ),
10704 kind: crate::common::validate::ConstraintKind::TotalDigits,
10705 });
10706 }
10707 }
10708 }
10709}
10710impl crate::common::validate::Validatable for PhoneNumber {
10711 #[allow(clippy::unreadable_literal)]
10712 fn validate_constraints(
10713 &self,
10714 path: &str,
10715 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10716 ) {
10717 {
10718 let value: &str = &self.0;
10719 let violated = {
10720 let bytes = value.as_bytes();
10721 let len = bytes.len();
10722 let result: bool = (|| -> bool {
10723 let mut pos: usize = 0;
10724 if !(4usize..=35usize).contains(&len) {
10725 return true;
10726 }
10727 if pos >= len || bytes[pos] != 43u8 {
10728 return true;
10729 }
10730 pos += 1;
10731 {
10732 let start = pos;
10733 let limit = if pos + 3usize < len {
10734 pos + 3usize
10735 } else {
10736 len
10737 };
10738 while pos < limit {
10739 let b = bytes[pos];
10740 if !(48u8..=57u8).contains(&b) {
10741 break;
10742 }
10743 pos += 1;
10744 }
10745 let matched = pos - start;
10746 if matched < 1usize {
10747 return true;
10748 }
10749 }
10750 if pos >= len || bytes[pos] != 45u8 {
10751 return true;
10752 }
10753 pos += 1;
10754 {
10755 let start = pos;
10756 let limit = if pos + 30usize < len {
10757 pos + 30usize
10758 } else {
10759 len
10760 };
10761 while pos < limit {
10762 let b = bytes[pos];
10763 if !(48u8..=57u8).contains(&b)
10764 && b != 40u8
10765 && b != 41u8
10766 && b != 43u8
10767 && b != 45u8
10768 {
10769 break;
10770 }
10771 pos += 1;
10772 }
10773 let matched = pos - start;
10774 if matched < 1usize {
10775 return true;
10776 }
10777 }
10778 if pos != len {
10779 return true;
10780 }
10781 false
10782 })();
10783 result
10784 };
10785 if violated {
10786 violations.push(crate::common::validate::ConstraintViolation {
10787 path: path.to_string(),
10788 message: "value does not match pattern \\+[0-9]{1,3}-[0-9()+\\-]{1,30}"
10789 .to_string(),
10790 kind: crate::common::validate::ConstraintKind::Pattern,
10791 });
10792 }
10793 }
10794 }
10795}
10796impl crate::common::validate::Validatable for PreferredContactMethod1Code {
10797 fn validate_constraints(
10798 &self,
10799 _path: &str,
10800 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10801 ) {
10802 }
10803}
10804impl crate::common::validate::Validatable for Priority2Code {
10805 fn validate_constraints(
10806 &self,
10807 _path: &str,
10808 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10809 ) {
10810 }
10811}
10812impl crate::common::validate::Validatable for SequenceType3Code {
10813 fn validate_constraints(
10814 &self,
10815 _path: &str,
10816 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10817 ) {
10818 }
10819}
10820impl crate::common::validate::Validatable for SettlementMethod1Code {
10821 fn validate_constraints(
10822 &self,
10823 _path: &str,
10824 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10825 ) {
10826 }
10827}
10828impl crate::common::validate::Validatable for TaxRecordPeriod1Code {
10829 fn validate_constraints(
10830 &self,
10831 _path: &str,
10832 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10833 ) {
10834 }
10835}
10836impl crate::common::validate::Validatable for TrueFalseIndicator {
10837 fn validate_constraints(
10838 &self,
10839 _path: &str,
10840 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10841 ) {
10842 }
10843}
10844impl crate::common::validate::Validatable for UUIDv4Identifier {
10845 #[allow(clippy::unreadable_literal)]
10846 fn validate_constraints(
10847 &self,
10848 path: &str,
10849 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
10850 ) {
10851 {
10852 let value: &str = &self.0;
10853 let violated = {
10854 let bytes = value.as_bytes();
10855 bytes.len() != 36usize
10856 || ({
10857 let b = bytes[0usize];
10858 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10859 })
10860 || ({
10861 let b = bytes[1usize];
10862 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10863 })
10864 || ({
10865 let b = bytes[2usize];
10866 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10867 })
10868 || ({
10869 let b = bytes[3usize];
10870 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10871 })
10872 || ({
10873 let b = bytes[4usize];
10874 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10875 })
10876 || ({
10877 let b = bytes[5usize];
10878 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10879 })
10880 || ({
10881 let b = bytes[6usize];
10882 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10883 })
10884 || ({
10885 let b = bytes[7usize];
10886 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10887 })
10888 || bytes[8usize] != 45u8
10889 || ({
10890 let b = bytes[9usize];
10891 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10892 })
10893 || ({
10894 let b = bytes[10usize];
10895 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10896 })
10897 || ({
10898 let b = bytes[11usize];
10899 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10900 })
10901 || ({
10902 let b = bytes[12usize];
10903 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10904 })
10905 || bytes[13usize] != 45u8
10906 || bytes[14usize] != 52u8
10907 || ({
10908 let b = bytes[15usize];
10909 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10910 })
10911 || ({
10912 let b = bytes[16usize];
10913 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10914 })
10915 || ({
10916 let b = bytes[17usize];
10917 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10918 })
10919 || bytes[18usize] != 45u8
10920 || ({
10921 let b = bytes[19usize];
10922 b != 56u8 && b != 57u8 && b != 97u8 && b != 98u8
10923 })
10924 || ({
10925 let b = bytes[20usize];
10926 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10927 })
10928 || ({
10929 let b = bytes[21usize];
10930 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10931 })
10932 || ({
10933 let b = bytes[22usize];
10934 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10935 })
10936 || bytes[23usize] != 45u8
10937 || ({
10938 let b = bytes[24usize];
10939 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10940 })
10941 || ({
10942 let b = bytes[25usize];
10943 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10944 })
10945 || ({
10946 let b = bytes[26usize];
10947 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10948 })
10949 || ({
10950 let b = bytes[27usize];
10951 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10952 })
10953 || ({
10954 let b = bytes[28usize];
10955 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10956 })
10957 || ({
10958 let b = bytes[29usize];
10959 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10960 })
10961 || ({
10962 let b = bytes[30usize];
10963 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10964 })
10965 || ({
10966 let b = bytes[31usize];
10967 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10968 })
10969 || ({
10970 let b = bytes[32usize];
10971 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10972 })
10973 || ({
10974 let b = bytes[33usize];
10975 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10976 })
10977 || ({
10978 let b = bytes[34usize];
10979 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10980 })
10981 || ({
10982 let b = bytes[35usize];
10983 !(97u8..=102u8).contains(&b) && !(48u8..=57u8).contains(&b)
10984 })
10985 };
10986 if violated {
10987 violations
10988 .push(crate::common::validate::ConstraintViolation {
10989 path: path.to_string(),
10990 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}"
10991 .to_string(),
10992 kind: crate::common::validate::ConstraintKind::Pattern,
10993 });
10994 }
10995 }
10996 }
10997}
10998impl crate::common::validate::Validatable for AccountIdentification4Choice {
10999 fn validate_constraints(
11000 &self,
11001 path: &str,
11002 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11003 ) {
11004 match self {
11005 Self::IBAN(inner) => {
11006 let snap = violations.len();
11007 inner.validate_constraints("", violations);
11008 if violations.len() > snap {
11009 let pfx = format!("{path}/IBAN");
11010 for v in &mut violations[snap..] {
11011 v.path.insert_str(0, &pfx);
11012 }
11013 }
11014 }
11015 Self::Othr(inner) => {
11016 let snap = violations.len();
11017 inner.validate_constraints("", violations);
11018 if violations.len() > snap {
11019 let pfx = format!("{path}/Othr");
11020 for v in &mut violations[snap..] {
11021 v.path.insert_str(0, &pfx);
11022 }
11023 }
11024 }
11025 }
11026 }
11027}
11028impl crate::common::validate::Validatable for AccountSchemeName1Choice {
11029 fn validate_constraints(
11030 &self,
11031 path: &str,
11032 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11033 ) {
11034 match self {
11035 Self::Cd(inner) => {
11036 let snap = violations.len();
11037 inner.validate_constraints("", violations);
11038 if violations.len() > snap {
11039 let pfx = format!("{path}/Cd");
11040 for v in &mut violations[snap..] {
11041 v.path.insert_str(0, &pfx);
11042 }
11043 }
11044 }
11045 Self::Prtry(inner) => {
11046 let snap = violations.len();
11047 inner.validate_constraints("", violations);
11048 if violations.len() > snap {
11049 let pfx = format!("{path}/Prtry");
11050 for v in &mut violations[snap..] {
11051 v.path.insert_str(0, &pfx);
11052 }
11053 }
11054 }
11055 }
11056 }
11057}
11058impl crate::common::validate::Validatable for ActiveOrHistoricCurrencyAndAmount {
11059 fn validate_constraints(
11060 &self,
11061 path: &str,
11062 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11063 ) {
11064 self.value.validate_constraints(path, violations);
11065 {
11066 let snap = violations.len();
11067 self.ccy.validate_constraints("", violations);
11068 if violations.len() > snap {
11069 let pfx = format!("{path}/@Ccy");
11070 for v in &mut violations[snap..] {
11071 v.path.insert_str(0, &pfx);
11072 }
11073 }
11074 }
11075 }
11076}
11077impl crate::common::validate::Validatable for AddressType3Choice {
11078 fn validate_constraints(
11079 &self,
11080 path: &str,
11081 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11082 ) {
11083 match self {
11084 Self::Cd(inner) => {
11085 let snap = violations.len();
11086 inner.validate_constraints("", violations);
11087 if violations.len() > snap {
11088 let pfx = format!("{path}/Cd");
11089 for v in &mut violations[snap..] {
11090 v.path.insert_str(0, &pfx);
11091 }
11092 }
11093 }
11094 Self::Prtry(inner) => {
11095 let snap = violations.len();
11096 inner.validate_constraints("", violations);
11097 if violations.len() > snap {
11098 let pfx = format!("{path}/Prtry");
11099 for v in &mut violations[snap..] {
11100 v.path.insert_str(0, &pfx);
11101 }
11102 }
11103 }
11104 }
11105 }
11106}
11107impl crate::common::validate::Validatable for AmendmentInformationDetails14 {
11108 fn validate_constraints(
11109 &self,
11110 path: &str,
11111 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11112 ) {
11113 if let Some(ref val) = self.orgnl_mndt_id {
11114 let snap = violations.len();
11115 val.validate_constraints("", violations);
11116 if violations.len() > snap {
11117 let pfx = format!("{path}/OrgnlMndtId");
11118 for v in &mut violations[snap..] {
11119 v.path.insert_str(0, &pfx);
11120 }
11121 }
11122 }
11123 if let Some(ref val) = self.orgnl_cdtr_schme_id {
11124 let snap = violations.len();
11125 val.validate_constraints("", violations);
11126 if violations.len() > snap {
11127 let pfx = format!("{path}/OrgnlCdtrSchmeId");
11128 for v in &mut violations[snap..] {
11129 v.path.insert_str(0, &pfx);
11130 }
11131 }
11132 }
11133 if let Some(ref val) = self.orgnl_cdtr_agt {
11134 let snap = violations.len();
11135 val.validate_constraints("", violations);
11136 if violations.len() > snap {
11137 let pfx = format!("{path}/OrgnlCdtrAgt");
11138 for v in &mut violations[snap..] {
11139 v.path.insert_str(0, &pfx);
11140 }
11141 }
11142 }
11143 if let Some(ref val) = self.orgnl_cdtr_agt_acct {
11144 let snap = violations.len();
11145 val.validate_constraints("", violations);
11146 if violations.len() > snap {
11147 let pfx = format!("{path}/OrgnlCdtrAgtAcct");
11148 for v in &mut violations[snap..] {
11149 v.path.insert_str(0, &pfx);
11150 }
11151 }
11152 }
11153 if let Some(ref val) = self.orgnl_dbtr {
11154 let snap = violations.len();
11155 val.validate_constraints("", violations);
11156 if violations.len() > snap {
11157 let pfx = format!("{path}/OrgnlDbtr");
11158 for v in &mut violations[snap..] {
11159 v.path.insert_str(0, &pfx);
11160 }
11161 }
11162 }
11163 if let Some(ref val) = self.orgnl_dbtr_acct {
11164 let snap = violations.len();
11165 val.validate_constraints("", violations);
11166 if violations.len() > snap {
11167 let pfx = format!("{path}/OrgnlDbtrAcct");
11168 for v in &mut violations[snap..] {
11169 v.path.insert_str(0, &pfx);
11170 }
11171 }
11172 }
11173 if let Some(ref val) = self.orgnl_dbtr_agt {
11174 let snap = violations.len();
11175 val.validate_constraints("", violations);
11176 if violations.len() > snap {
11177 let pfx = format!("{path}/OrgnlDbtrAgt");
11178 for v in &mut violations[snap..] {
11179 v.path.insert_str(0, &pfx);
11180 }
11181 }
11182 }
11183 if let Some(ref val) = self.orgnl_dbtr_agt_acct {
11184 let snap = violations.len();
11185 val.validate_constraints("", violations);
11186 if violations.len() > snap {
11187 let pfx = format!("{path}/OrgnlDbtrAgtAcct");
11188 for v in &mut violations[snap..] {
11189 v.path.insert_str(0, &pfx);
11190 }
11191 }
11192 }
11193 if let Some(ref val) = self.orgnl_fnl_colltn_dt {
11194 let snap = violations.len();
11195 val.validate_constraints("", violations);
11196 if violations.len() > snap {
11197 let pfx = format!("{path}/OrgnlFnlColltnDt");
11198 for v in &mut violations[snap..] {
11199 v.path.insert_str(0, &pfx);
11200 }
11201 }
11202 }
11203 if let Some(ref wrapper) = self.orgnl_frqcy {
11204 let snap = violations.len();
11205 wrapper.inner.validate_constraints("", violations);
11206 if violations.len() > snap {
11207 let pfx = format!("{path}/OrgnlFrqcy");
11208 for v in &mut violations[snap..] {
11209 v.path.insert_str(0, &pfx);
11210 }
11211 }
11212 }
11213 if let Some(ref wrapper) = self.orgnl_rsn {
11214 let snap = violations.len();
11215 wrapper.inner.validate_constraints("", violations);
11216 if violations.len() > snap {
11217 let pfx = format!("{path}/OrgnlRsn");
11218 for v in &mut violations[snap..] {
11219 v.path.insert_str(0, &pfx);
11220 }
11221 }
11222 }
11223 if let Some(ref val) = self.orgnl_trckg_days {
11224 let snap = violations.len();
11225 val.validate_constraints("", violations);
11226 if violations.len() > snap {
11227 let pfx = format!("{path}/OrgnlTrckgDays");
11228 for v in &mut violations[snap..] {
11229 v.path.insert_str(0, &pfx);
11230 }
11231 }
11232 }
11233 }
11234}
11235impl crate::common::validate::Validatable for AmountType4Choice {
11236 fn validate_constraints(
11237 &self,
11238 path: &str,
11239 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11240 ) {
11241 match self {
11242 Self::InstdAmt(inner) => {
11243 let snap = violations.len();
11244 inner.validate_constraints("", violations);
11245 if violations.len() > snap {
11246 let pfx = format!("{path}/InstdAmt");
11247 for v in &mut violations[snap..] {
11248 v.path.insert_str(0, &pfx);
11249 }
11250 }
11251 }
11252 Self::EqvtAmt(inner) => {
11253 let snap = violations.len();
11254 inner.validate_constraints("", violations);
11255 if violations.len() > snap {
11256 let pfx = format!("{path}/EqvtAmt");
11257 for v in &mut violations[snap..] {
11258 v.path.insert_str(0, &pfx);
11259 }
11260 }
11261 }
11262 }
11263 }
11264}
11265impl crate::common::validate::Validatable for BranchAndFinancialInstitutionIdentification6 {
11266 fn validate_constraints(
11267 &self,
11268 path: &str,
11269 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11270 ) {
11271 {
11272 let snap = violations.len();
11273 self.fin_instn_id.validate_constraints("", violations);
11274 if violations.len() > snap {
11275 let pfx = format!("{path}/FinInstnId");
11276 for v in &mut violations[snap..] {
11277 v.path.insert_str(0, &pfx);
11278 }
11279 }
11280 }
11281 if let Some(ref val) = self.brnch_id {
11282 let snap = violations.len();
11283 val.validate_constraints("", violations);
11284 if violations.len() > snap {
11285 let pfx = format!("{path}/BrnchId");
11286 for v in &mut violations[snap..] {
11287 v.path.insert_str(0, &pfx);
11288 }
11289 }
11290 }
11291 }
11292}
11293impl crate::common::validate::Validatable for BranchData3 {
11294 fn validate_constraints(
11295 &self,
11296 path: &str,
11297 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11298 ) {
11299 if let Some(ref val) = self.id {
11300 let snap = violations.len();
11301 val.validate_constraints("", violations);
11302 if violations.len() > snap {
11303 let pfx = format!("{path}/Id");
11304 for v in &mut violations[snap..] {
11305 v.path.insert_str(0, &pfx);
11306 }
11307 }
11308 }
11309 if let Some(ref val) = self.lei {
11310 let snap = violations.len();
11311 val.validate_constraints("", violations);
11312 if violations.len() > snap {
11313 let pfx = format!("{path}/LEI");
11314 for v in &mut violations[snap..] {
11315 v.path.insert_str(0, &pfx);
11316 }
11317 }
11318 }
11319 if let Some(ref val) = self.nm {
11320 let snap = violations.len();
11321 val.validate_constraints("", violations);
11322 if violations.len() > snap {
11323 let pfx = format!("{path}/Nm");
11324 for v in &mut violations[snap..] {
11325 v.path.insert_str(0, &pfx);
11326 }
11327 }
11328 }
11329 if let Some(ref val) = self.pstl_adr {
11330 let snap = violations.len();
11331 val.validate_constraints("", violations);
11332 if violations.len() > snap {
11333 let pfx = format!("{path}/PstlAdr");
11334 for v in &mut violations[snap..] {
11335 v.path.insert_str(0, &pfx);
11336 }
11337 }
11338 }
11339 }
11340}
11341impl crate::common::validate::Validatable for CashAccount40 {
11342 fn validate_constraints(
11343 &self,
11344 path: &str,
11345 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11346 ) {
11347 if let Some(ref wrapper) = self.id {
11348 let snap = violations.len();
11349 wrapper.inner.validate_constraints("", violations);
11350 if violations.len() > snap {
11351 let pfx = format!("{path}/Id");
11352 for v in &mut violations[snap..] {
11353 v.path.insert_str(0, &pfx);
11354 }
11355 }
11356 }
11357 if let Some(ref wrapper) = self.tp {
11358 let snap = violations.len();
11359 wrapper.inner.validate_constraints("", violations);
11360 if violations.len() > snap {
11361 let pfx = format!("{path}/Tp");
11362 for v in &mut violations[snap..] {
11363 v.path.insert_str(0, &pfx);
11364 }
11365 }
11366 }
11367 if let Some(ref val) = self.ccy {
11368 let snap = violations.len();
11369 val.validate_constraints("", violations);
11370 if violations.len() > snap {
11371 let pfx = format!("{path}/Ccy");
11372 for v in &mut violations[snap..] {
11373 v.path.insert_str(0, &pfx);
11374 }
11375 }
11376 }
11377 if let Some(ref val) = self.nm {
11378 let snap = violations.len();
11379 val.validate_constraints("", violations);
11380 if violations.len() > snap {
11381 let pfx = format!("{path}/Nm");
11382 for v in &mut violations[snap..] {
11383 v.path.insert_str(0, &pfx);
11384 }
11385 }
11386 }
11387 if let Some(ref val) = self.prxy {
11388 let snap = violations.len();
11389 val.validate_constraints("", violations);
11390 if violations.len() > snap {
11391 let pfx = format!("{path}/Prxy");
11392 for v in &mut violations[snap..] {
11393 v.path.insert_str(0, &pfx);
11394 }
11395 }
11396 }
11397 }
11398}
11399impl crate::common::validate::Validatable for CashAccountType2Choice {
11400 fn validate_constraints(
11401 &self,
11402 path: &str,
11403 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11404 ) {
11405 match self {
11406 Self::Cd(inner) => {
11407 let snap = violations.len();
11408 inner.validate_constraints("", violations);
11409 if violations.len() > snap {
11410 let pfx = format!("{path}/Cd");
11411 for v in &mut violations[snap..] {
11412 v.path.insert_str(0, &pfx);
11413 }
11414 }
11415 }
11416 Self::Prtry(inner) => {
11417 let snap = violations.len();
11418 inner.validate_constraints("", violations);
11419 if violations.len() > snap {
11420 let pfx = format!("{path}/Prtry");
11421 for v in &mut violations[snap..] {
11422 v.path.insert_str(0, &pfx);
11423 }
11424 }
11425 }
11426 }
11427 }
11428}
11429impl crate::common::validate::Validatable for CategoryPurpose1Choice {
11430 fn validate_constraints(
11431 &self,
11432 path: &str,
11433 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11434 ) {
11435 match self {
11436 Self::Cd(inner) => {
11437 let snap = violations.len();
11438 inner.validate_constraints("", violations);
11439 if violations.len() > snap {
11440 let pfx = format!("{path}/Cd");
11441 for v in &mut violations[snap..] {
11442 v.path.insert_str(0, &pfx);
11443 }
11444 }
11445 }
11446 Self::Prtry(inner) => {
11447 let snap = violations.len();
11448 inner.validate_constraints("", violations);
11449 if violations.len() > snap {
11450 let pfx = format!("{path}/Prtry");
11451 for v in &mut violations[snap..] {
11452 v.path.insert_str(0, &pfx);
11453 }
11454 }
11455 }
11456 }
11457 }
11458}
11459impl crate::common::validate::Validatable for ClearingSystemIdentification2Choice {
11460 fn validate_constraints(
11461 &self,
11462 path: &str,
11463 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11464 ) {
11465 match self {
11466 Self::Cd(inner) => {
11467 let snap = violations.len();
11468 inner.validate_constraints("", violations);
11469 if violations.len() > snap {
11470 let pfx = format!("{path}/Cd");
11471 for v in &mut violations[snap..] {
11472 v.path.insert_str(0, &pfx);
11473 }
11474 }
11475 }
11476 Self::Prtry(inner) => {
11477 let snap = violations.len();
11478 inner.validate_constraints("", violations);
11479 if violations.len() > snap {
11480 let pfx = format!("{path}/Prtry");
11481 for v in &mut violations[snap..] {
11482 v.path.insert_str(0, &pfx);
11483 }
11484 }
11485 }
11486 }
11487 }
11488}
11489impl crate::common::validate::Validatable for ClearingSystemIdentification3Choice {
11490 fn validate_constraints(
11491 &self,
11492 path: &str,
11493 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11494 ) {
11495 match self {
11496 Self::Cd(inner) => {
11497 let snap = violations.len();
11498 inner.validate_constraints("", violations);
11499 if violations.len() > snap {
11500 let pfx = format!("{path}/Cd");
11501 for v in &mut violations[snap..] {
11502 v.path.insert_str(0, &pfx);
11503 }
11504 }
11505 }
11506 Self::Prtry(inner) => {
11507 let snap = violations.len();
11508 inner.validate_constraints("", violations);
11509 if violations.len() > snap {
11510 let pfx = format!("{path}/Prtry");
11511 for v in &mut violations[snap..] {
11512 v.path.insert_str(0, &pfx);
11513 }
11514 }
11515 }
11516 }
11517 }
11518}
11519impl crate::common::validate::Validatable for ClearingSystemMemberIdentification2 {
11520 fn validate_constraints(
11521 &self,
11522 path: &str,
11523 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11524 ) {
11525 if let Some(ref wrapper) = self.clr_sys_id {
11526 let snap = violations.len();
11527 wrapper.inner.validate_constraints("", violations);
11528 if violations.len() > snap {
11529 let pfx = format!("{path}/ClrSysId");
11530 for v in &mut violations[snap..] {
11531 v.path.insert_str(0, &pfx);
11532 }
11533 }
11534 }
11535 {
11536 let snap = violations.len();
11537 self.mmb_id.validate_constraints("", violations);
11538 if violations.len() > snap {
11539 let pfx = format!("{path}/MmbId");
11540 for v in &mut violations[snap..] {
11541 v.path.insert_str(0, &pfx);
11542 }
11543 }
11544 }
11545 }
11546}
11547impl crate::common::validate::Validatable for Contact4 {
11548 fn validate_constraints(
11549 &self,
11550 path: &str,
11551 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11552 ) {
11553 if let Some(ref val) = self.nm_prfx {
11554 let snap = violations.len();
11555 val.validate_constraints("", violations);
11556 if violations.len() > snap {
11557 let pfx = format!("{path}/NmPrfx");
11558 for v in &mut violations[snap..] {
11559 v.path.insert_str(0, &pfx);
11560 }
11561 }
11562 }
11563 if let Some(ref val) = self.nm {
11564 let snap = violations.len();
11565 val.validate_constraints("", violations);
11566 if violations.len() > snap {
11567 let pfx = format!("{path}/Nm");
11568 for v in &mut violations[snap..] {
11569 v.path.insert_str(0, &pfx);
11570 }
11571 }
11572 }
11573 if let Some(ref val) = self.phne_nb {
11574 let snap = violations.len();
11575 val.validate_constraints("", violations);
11576 if violations.len() > snap {
11577 let pfx = format!("{path}/PhneNb");
11578 for v in &mut violations[snap..] {
11579 v.path.insert_str(0, &pfx);
11580 }
11581 }
11582 }
11583 if let Some(ref val) = self.mob_nb {
11584 let snap = violations.len();
11585 val.validate_constraints("", violations);
11586 if violations.len() > snap {
11587 let pfx = format!("{path}/MobNb");
11588 for v in &mut violations[snap..] {
11589 v.path.insert_str(0, &pfx);
11590 }
11591 }
11592 }
11593 if let Some(ref val) = self.fax_nb {
11594 let snap = violations.len();
11595 val.validate_constraints("", violations);
11596 if violations.len() > snap {
11597 let pfx = format!("{path}/FaxNb");
11598 for v in &mut violations[snap..] {
11599 v.path.insert_str(0, &pfx);
11600 }
11601 }
11602 }
11603 if let Some(ref val) = self.email_adr {
11604 let snap = violations.len();
11605 val.validate_constraints("", violations);
11606 if violations.len() > snap {
11607 let pfx = format!("{path}/EmailAdr");
11608 for v in &mut violations[snap..] {
11609 v.path.insert_str(0, &pfx);
11610 }
11611 }
11612 }
11613 if let Some(ref val) = self.email_purp {
11614 let snap = violations.len();
11615 val.validate_constraints("", violations);
11616 if violations.len() > snap {
11617 let pfx = format!("{path}/EmailPurp");
11618 for v in &mut violations[snap..] {
11619 v.path.insert_str(0, &pfx);
11620 }
11621 }
11622 }
11623 if let Some(ref val) = self.job_titl {
11624 let snap = violations.len();
11625 val.validate_constraints("", violations);
11626 if violations.len() > snap {
11627 let pfx = format!("{path}/JobTitl");
11628 for v in &mut violations[snap..] {
11629 v.path.insert_str(0, &pfx);
11630 }
11631 }
11632 }
11633 if let Some(ref val) = self.rspnsblty {
11634 let snap = violations.len();
11635 val.validate_constraints("", violations);
11636 if violations.len() > snap {
11637 let pfx = format!("{path}/Rspnsblty");
11638 for v in &mut violations[snap..] {
11639 v.path.insert_str(0, &pfx);
11640 }
11641 }
11642 }
11643 if let Some(ref val) = self.dept {
11644 let snap = violations.len();
11645 val.validate_constraints("", violations);
11646 if violations.len() > snap {
11647 let pfx = format!("{path}/Dept");
11648 for v in &mut violations[snap..] {
11649 v.path.insert_str(0, &pfx);
11650 }
11651 }
11652 }
11653 for (idx, elem) in self.othr.iter().enumerate() {
11654 let snap = violations.len();
11655 elem.validate_constraints("", violations);
11656 if violations.len() > snap {
11657 let pfx = format!("{path}/Othr[{idx}]");
11658 for v in &mut violations[snap..] {
11659 v.path.insert_str(0, &pfx);
11660 }
11661 }
11662 }
11663 if let Some(ref val) = self.prefrd_mtd {
11664 let snap = violations.len();
11665 val.validate_constraints("", violations);
11666 if violations.len() > snap {
11667 let pfx = format!("{path}/PrefrdMtd");
11668 for v in &mut violations[snap..] {
11669 v.path.insert_str(0, &pfx);
11670 }
11671 }
11672 }
11673 }
11674}
11675impl crate::common::validate::Validatable for CreditTransferMandateData1 {
11676 fn validate_constraints(
11677 &self,
11678 path: &str,
11679 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11680 ) {
11681 if let Some(ref val) = self.mndt_id {
11682 let snap = violations.len();
11683 val.validate_constraints("", violations);
11684 if violations.len() > snap {
11685 let pfx = format!("{path}/MndtId");
11686 for v in &mut violations[snap..] {
11687 v.path.insert_str(0, &pfx);
11688 }
11689 }
11690 }
11691 if let Some(ref val) = self.tp {
11692 let snap = violations.len();
11693 val.validate_constraints("", violations);
11694 if violations.len() > snap {
11695 let pfx = format!("{path}/Tp");
11696 for v in &mut violations[snap..] {
11697 v.path.insert_str(0, &pfx);
11698 }
11699 }
11700 }
11701 if let Some(ref val) = self.dt_of_sgntr {
11702 let snap = violations.len();
11703 val.validate_constraints("", violations);
11704 if violations.len() > snap {
11705 let pfx = format!("{path}/DtOfSgntr");
11706 for v in &mut violations[snap..] {
11707 v.path.insert_str(0, &pfx);
11708 }
11709 }
11710 }
11711 if let Some(ref val) = self.dt_of_vrfctn {
11712 let snap = violations.len();
11713 val.validate_constraints("", violations);
11714 if violations.len() > snap {
11715 let pfx = format!("{path}/DtOfVrfctn");
11716 for v in &mut violations[snap..] {
11717 v.path.insert_str(0, &pfx);
11718 }
11719 }
11720 }
11721 if let Some(ref val) = self.elctrnc_sgntr {
11722 let snap = violations.len();
11723 val.validate_constraints("", violations);
11724 if violations.len() > snap {
11725 let pfx = format!("{path}/ElctrncSgntr");
11726 for v in &mut violations[snap..] {
11727 v.path.insert_str(0, &pfx);
11728 }
11729 }
11730 }
11731 if let Some(ref val) = self.frst_pmt_dt {
11732 let snap = violations.len();
11733 val.validate_constraints("", violations);
11734 if violations.len() > snap {
11735 let pfx = format!("{path}/FrstPmtDt");
11736 for v in &mut violations[snap..] {
11737 v.path.insert_str(0, &pfx);
11738 }
11739 }
11740 }
11741 if let Some(ref val) = self.fnl_pmt_dt {
11742 let snap = violations.len();
11743 val.validate_constraints("", violations);
11744 if violations.len() > snap {
11745 let pfx = format!("{path}/FnlPmtDt");
11746 for v in &mut violations[snap..] {
11747 v.path.insert_str(0, &pfx);
11748 }
11749 }
11750 }
11751 if let Some(ref wrapper) = self.frqcy {
11752 let snap = violations.len();
11753 wrapper.inner.validate_constraints("", violations);
11754 if violations.len() > snap {
11755 let pfx = format!("{path}/Frqcy");
11756 for v in &mut violations[snap..] {
11757 v.path.insert_str(0, &pfx);
11758 }
11759 }
11760 }
11761 if let Some(ref wrapper) = self.rsn {
11762 let snap = violations.len();
11763 wrapper.inner.validate_constraints("", violations);
11764 if violations.len() > snap {
11765 let pfx = format!("{path}/Rsn");
11766 for v in &mut violations[snap..] {
11767 v.path.insert_str(0, &pfx);
11768 }
11769 }
11770 }
11771 }
11772}
11773impl crate::common::validate::Validatable for CreditorReferenceInformation2 {
11774 fn validate_constraints(
11775 &self,
11776 path: &str,
11777 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11778 ) {
11779 if let Some(ref val) = self.tp {
11780 let snap = violations.len();
11781 val.validate_constraints("", violations);
11782 if violations.len() > snap {
11783 let pfx = format!("{path}/Tp");
11784 for v in &mut violations[snap..] {
11785 v.path.insert_str(0, &pfx);
11786 }
11787 }
11788 }
11789 if let Some(ref val) = self.r#ref {
11790 let snap = violations.len();
11791 val.validate_constraints("", violations);
11792 if violations.len() > snap {
11793 let pfx = format!("{path}/Ref");
11794 for v in &mut violations[snap..] {
11795 v.path.insert_str(0, &pfx);
11796 }
11797 }
11798 }
11799 }
11800}
11801impl crate::common::validate::Validatable for CreditorReferenceType1Choice {
11802 fn validate_constraints(
11803 &self,
11804 path: &str,
11805 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11806 ) {
11807 match self {
11808 Self::Cd(inner) => {
11809 let snap = violations.len();
11810 inner.validate_constraints("", violations);
11811 if violations.len() > snap {
11812 let pfx = format!("{path}/Cd");
11813 for v in &mut violations[snap..] {
11814 v.path.insert_str(0, &pfx);
11815 }
11816 }
11817 }
11818 Self::Prtry(inner) => {
11819 let snap = violations.len();
11820 inner.validate_constraints("", violations);
11821 if violations.len() > snap {
11822 let pfx = format!("{path}/Prtry");
11823 for v in &mut violations[snap..] {
11824 v.path.insert_str(0, &pfx);
11825 }
11826 }
11827 }
11828 }
11829 }
11830}
11831impl crate::common::validate::Validatable for CreditorReferenceType2 {
11832 fn validate_constraints(
11833 &self,
11834 path: &str,
11835 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11836 ) {
11837 {
11838 let snap = violations.len();
11839 self.cd_or_prtry.inner.validate_constraints("", violations);
11840 if violations.len() > snap {
11841 let pfx = format!("{path}/CdOrPrtry");
11842 for v in &mut violations[snap..] {
11843 v.path.insert_str(0, &pfx);
11844 }
11845 }
11846 }
11847 if let Some(ref val) = self.issr {
11848 let snap = violations.len();
11849 val.validate_constraints("", violations);
11850 if violations.len() > snap {
11851 let pfx = format!("{path}/Issr");
11852 for v in &mut violations[snap..] {
11853 v.path.insert_str(0, &pfx);
11854 }
11855 }
11856 }
11857 }
11858}
11859impl crate::common::validate::Validatable for DateAndDateTime2Choice {
11860 fn validate_constraints(
11861 &self,
11862 path: &str,
11863 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11864 ) {
11865 match self {
11866 Self::Dt(inner) => {
11867 let snap = violations.len();
11868 inner.validate_constraints("", violations);
11869 if violations.len() > snap {
11870 let pfx = format!("{path}/Dt");
11871 for v in &mut violations[snap..] {
11872 v.path.insert_str(0, &pfx);
11873 }
11874 }
11875 }
11876 Self::DtTm(inner) => {
11877 let snap = violations.len();
11878 inner.validate_constraints("", violations);
11879 if violations.len() > snap {
11880 let pfx = format!("{path}/DtTm");
11881 for v in &mut violations[snap..] {
11882 v.path.insert_str(0, &pfx);
11883 }
11884 }
11885 }
11886 }
11887 }
11888}
11889impl crate::common::validate::Validatable for DateAndPlaceOfBirth1 {
11890 fn validate_constraints(
11891 &self,
11892 path: &str,
11893 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11894 ) {
11895 {
11896 let snap = violations.len();
11897 self.birth_dt.validate_constraints("", violations);
11898 if violations.len() > snap {
11899 let pfx = format!("{path}/BirthDt");
11900 for v in &mut violations[snap..] {
11901 v.path.insert_str(0, &pfx);
11902 }
11903 }
11904 }
11905 if let Some(ref val) = self.prvc_of_birth {
11906 let snap = violations.len();
11907 val.validate_constraints("", violations);
11908 if violations.len() > snap {
11909 let pfx = format!("{path}/PrvcOfBirth");
11910 for v in &mut violations[snap..] {
11911 v.path.insert_str(0, &pfx);
11912 }
11913 }
11914 }
11915 {
11916 let snap = violations.len();
11917 self.city_of_birth.validate_constraints("", violations);
11918 if violations.len() > snap {
11919 let pfx = format!("{path}/CityOfBirth");
11920 for v in &mut violations[snap..] {
11921 v.path.insert_str(0, &pfx);
11922 }
11923 }
11924 }
11925 {
11926 let snap = violations.len();
11927 self.ctry_of_birth.validate_constraints("", violations);
11928 if violations.len() > snap {
11929 let pfx = format!("{path}/CtryOfBirth");
11930 for v in &mut violations[snap..] {
11931 v.path.insert_str(0, &pfx);
11932 }
11933 }
11934 }
11935 }
11936}
11937impl crate::common::validate::Validatable for DatePeriod2 {
11938 fn validate_constraints(
11939 &self,
11940 path: &str,
11941 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11942 ) {
11943 {
11944 let snap = violations.len();
11945 self.fr_dt.validate_constraints("", violations);
11946 if violations.len() > snap {
11947 let pfx = format!("{path}/FrDt");
11948 for v in &mut violations[snap..] {
11949 v.path.insert_str(0, &pfx);
11950 }
11951 }
11952 }
11953 {
11954 let snap = violations.len();
11955 self.to_dt.validate_constraints("", violations);
11956 if violations.len() > snap {
11957 let pfx = format!("{path}/ToDt");
11958 for v in &mut violations[snap..] {
11959 v.path.insert_str(0, &pfx);
11960 }
11961 }
11962 }
11963 }
11964}
11965impl crate::common::validate::Validatable for DiscountAmountAndType1 {
11966 fn validate_constraints(
11967 &self,
11968 path: &str,
11969 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11970 ) {
11971 if let Some(ref wrapper) = self.tp {
11972 let snap = violations.len();
11973 wrapper.inner.validate_constraints("", violations);
11974 if violations.len() > snap {
11975 let pfx = format!("{path}/Tp");
11976 for v in &mut violations[snap..] {
11977 v.path.insert_str(0, &pfx);
11978 }
11979 }
11980 }
11981 {
11982 let snap = violations.len();
11983 self.amt.validate_constraints("", violations);
11984 if violations.len() > snap {
11985 let pfx = format!("{path}/Amt");
11986 for v in &mut violations[snap..] {
11987 v.path.insert_str(0, &pfx);
11988 }
11989 }
11990 }
11991 }
11992}
11993impl crate::common::validate::Validatable for DiscountAmountType1Choice {
11994 fn validate_constraints(
11995 &self,
11996 path: &str,
11997 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
11998 ) {
11999 match self {
12000 Self::Cd(inner) => {
12001 let snap = violations.len();
12002 inner.validate_constraints("", violations);
12003 if violations.len() > snap {
12004 let pfx = format!("{path}/Cd");
12005 for v in &mut violations[snap..] {
12006 v.path.insert_str(0, &pfx);
12007 }
12008 }
12009 }
12010 Self::Prtry(inner) => {
12011 let snap = violations.len();
12012 inner.validate_constraints("", violations);
12013 if violations.len() > snap {
12014 let pfx = format!("{path}/Prtry");
12015 for v in &mut violations[snap..] {
12016 v.path.insert_str(0, &pfx);
12017 }
12018 }
12019 }
12020 }
12021 }
12022}
12023impl crate::common::validate::Validatable for Document {
12024 fn validate_constraints(
12025 &self,
12026 path: &str,
12027 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12028 ) {
12029 {
12030 let snap = violations.len();
12031 self.fi_to_fi_pmt_sts_req
12032 .validate_constraints("", violations);
12033 if violations.len() > snap {
12034 let pfx = format!("{path}/FIToFIPmtStsReq");
12035 for v in &mut violations[snap..] {
12036 v.path.insert_str(0, &pfx);
12037 }
12038 }
12039 }
12040 }
12041}
12042impl crate::common::validate::Validatable for DocumentAdjustment1 {
12043 fn validate_constraints(
12044 &self,
12045 path: &str,
12046 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12047 ) {
12048 {
12049 let snap = violations.len();
12050 self.amt.validate_constraints("", violations);
12051 if violations.len() > snap {
12052 let pfx = format!("{path}/Amt");
12053 for v in &mut violations[snap..] {
12054 v.path.insert_str(0, &pfx);
12055 }
12056 }
12057 }
12058 if let Some(ref val) = self.cdt_dbt_ind {
12059 let snap = violations.len();
12060 val.validate_constraints("", violations);
12061 if violations.len() > snap {
12062 let pfx = format!("{path}/CdtDbtInd");
12063 for v in &mut violations[snap..] {
12064 v.path.insert_str(0, &pfx);
12065 }
12066 }
12067 }
12068 if let Some(ref val) = self.rsn {
12069 let snap = violations.len();
12070 val.validate_constraints("", violations);
12071 if violations.len() > snap {
12072 let pfx = format!("{path}/Rsn");
12073 for v in &mut violations[snap..] {
12074 v.path.insert_str(0, &pfx);
12075 }
12076 }
12077 }
12078 if let Some(ref val) = self.addtl_inf {
12079 let snap = violations.len();
12080 val.validate_constraints("", violations);
12081 if violations.len() > snap {
12082 let pfx = format!("{path}/AddtlInf");
12083 for v in &mut violations[snap..] {
12084 v.path.insert_str(0, &pfx);
12085 }
12086 }
12087 }
12088 }
12089}
12090impl crate::common::validate::Validatable for DocumentLineIdentification1 {
12091 fn validate_constraints(
12092 &self,
12093 path: &str,
12094 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12095 ) {
12096 if let Some(ref val) = self.tp {
12097 let snap = violations.len();
12098 val.validate_constraints("", violations);
12099 if violations.len() > snap {
12100 let pfx = format!("{path}/Tp");
12101 for v in &mut violations[snap..] {
12102 v.path.insert_str(0, &pfx);
12103 }
12104 }
12105 }
12106 if let Some(ref val) = self.nb {
12107 let snap = violations.len();
12108 val.validate_constraints("", violations);
12109 if violations.len() > snap {
12110 let pfx = format!("{path}/Nb");
12111 for v in &mut violations[snap..] {
12112 v.path.insert_str(0, &pfx);
12113 }
12114 }
12115 }
12116 if let Some(ref val) = self.rltd_dt {
12117 let snap = violations.len();
12118 val.validate_constraints("", violations);
12119 if violations.len() > snap {
12120 let pfx = format!("{path}/RltdDt");
12121 for v in &mut violations[snap..] {
12122 v.path.insert_str(0, &pfx);
12123 }
12124 }
12125 }
12126 }
12127}
12128impl crate::common::validate::Validatable for DocumentLineInformation1 {
12129 fn validate_constraints(
12130 &self,
12131 path: &str,
12132 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12133 ) {
12134 for (idx, elem) in self.id.iter().enumerate() {
12135 let snap = violations.len();
12136 elem.validate_constraints("", violations);
12137 if violations.len() > snap {
12138 let pfx = format!("{path}/Id[{idx}]");
12139 for v in &mut violations[snap..] {
12140 v.path.insert_str(0, &pfx);
12141 }
12142 }
12143 }
12144 if let Some(ref val) = self.desc {
12145 let snap = violations.len();
12146 val.validate_constraints("", violations);
12147 if violations.len() > snap {
12148 let pfx = format!("{path}/Desc");
12149 for v in &mut violations[snap..] {
12150 v.path.insert_str(0, &pfx);
12151 }
12152 }
12153 }
12154 if let Some(ref val) = self.amt {
12155 let snap = violations.len();
12156 val.validate_constraints("", violations);
12157 if violations.len() > snap {
12158 let pfx = format!("{path}/Amt");
12159 for v in &mut violations[snap..] {
12160 v.path.insert_str(0, &pfx);
12161 }
12162 }
12163 }
12164 }
12165}
12166impl crate::common::validate::Validatable for DocumentLineType1 {
12167 fn validate_constraints(
12168 &self,
12169 path: &str,
12170 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12171 ) {
12172 {
12173 let snap = violations.len();
12174 self.cd_or_prtry.inner.validate_constraints("", violations);
12175 if violations.len() > snap {
12176 let pfx = format!("{path}/CdOrPrtry");
12177 for v in &mut violations[snap..] {
12178 v.path.insert_str(0, &pfx);
12179 }
12180 }
12181 }
12182 if let Some(ref val) = self.issr {
12183 let snap = violations.len();
12184 val.validate_constraints("", violations);
12185 if violations.len() > snap {
12186 let pfx = format!("{path}/Issr");
12187 for v in &mut violations[snap..] {
12188 v.path.insert_str(0, &pfx);
12189 }
12190 }
12191 }
12192 }
12193}
12194impl crate::common::validate::Validatable for DocumentLineType1Choice {
12195 fn validate_constraints(
12196 &self,
12197 path: &str,
12198 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12199 ) {
12200 match self {
12201 Self::Cd(inner) => {
12202 let snap = violations.len();
12203 inner.validate_constraints("", violations);
12204 if violations.len() > snap {
12205 let pfx = format!("{path}/Cd");
12206 for v in &mut violations[snap..] {
12207 v.path.insert_str(0, &pfx);
12208 }
12209 }
12210 }
12211 Self::Prtry(inner) => {
12212 let snap = violations.len();
12213 inner.validate_constraints("", violations);
12214 if violations.len() > snap {
12215 let pfx = format!("{path}/Prtry");
12216 for v in &mut violations[snap..] {
12217 v.path.insert_str(0, &pfx);
12218 }
12219 }
12220 }
12221 }
12222 }
12223}
12224impl crate::common::validate::Validatable for EquivalentAmount2 {
12225 fn validate_constraints(
12226 &self,
12227 path: &str,
12228 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12229 ) {
12230 {
12231 let snap = violations.len();
12232 self.amt.validate_constraints("", violations);
12233 if violations.len() > snap {
12234 let pfx = format!("{path}/Amt");
12235 for v in &mut violations[snap..] {
12236 v.path.insert_str(0, &pfx);
12237 }
12238 }
12239 }
12240 {
12241 let snap = violations.len();
12242 self.ccy_of_trf.validate_constraints("", violations);
12243 if violations.len() > snap {
12244 let pfx = format!("{path}/CcyOfTrf");
12245 for v in &mut violations[snap..] {
12246 v.path.insert_str(0, &pfx);
12247 }
12248 }
12249 }
12250 }
12251}
12252impl crate::common::validate::Validatable for FIToFIPaymentStatusRequestV05 {
12253 fn validate_constraints(
12254 &self,
12255 path: &str,
12256 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12257 ) {
12258 {
12259 let snap = violations.len();
12260 self.grp_hdr.validate_constraints("", violations);
12261 if violations.len() > snap {
12262 let pfx = format!("{path}/GrpHdr");
12263 for v in &mut violations[snap..] {
12264 v.path.insert_str(0, &pfx);
12265 }
12266 }
12267 }
12268 for (idx, elem) in self.orgnl_grp_inf.iter().enumerate() {
12269 let snap = violations.len();
12270 elem.validate_constraints("", violations);
12271 if violations.len() > snap {
12272 let pfx = format!("{path}/OrgnlGrpInf[{idx}]");
12273 for v in &mut violations[snap..] {
12274 v.path.insert_str(0, &pfx);
12275 }
12276 }
12277 }
12278 for (idx, elem) in self.tx_inf.iter().enumerate() {
12279 let snap = violations.len();
12280 elem.validate_constraints("", violations);
12281 if violations.len() > snap {
12282 let pfx = format!("{path}/TxInf[{idx}]");
12283 for v in &mut violations[snap..] {
12284 v.path.insert_str(0, &pfx);
12285 }
12286 }
12287 }
12288 for (idx, elem) in self.splmtry_data.iter().enumerate() {
12289 let snap = violations.len();
12290 elem.validate_constraints("", violations);
12291 if violations.len() > snap {
12292 let pfx = format!("{path}/SplmtryData[{idx}]");
12293 for v in &mut violations[snap..] {
12294 v.path.insert_str(0, &pfx);
12295 }
12296 }
12297 }
12298 }
12299}
12300impl crate::common::validate::Validatable for FinancialIdentificationSchemeName1Choice {
12301 fn validate_constraints(
12302 &self,
12303 path: &str,
12304 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12305 ) {
12306 match self {
12307 Self::Cd(inner) => {
12308 let snap = violations.len();
12309 inner.validate_constraints("", violations);
12310 if violations.len() > snap {
12311 let pfx = format!("{path}/Cd");
12312 for v in &mut violations[snap..] {
12313 v.path.insert_str(0, &pfx);
12314 }
12315 }
12316 }
12317 Self::Prtry(inner) => {
12318 let snap = violations.len();
12319 inner.validate_constraints("", violations);
12320 if violations.len() > snap {
12321 let pfx = format!("{path}/Prtry");
12322 for v in &mut violations[snap..] {
12323 v.path.insert_str(0, &pfx);
12324 }
12325 }
12326 }
12327 }
12328 }
12329}
12330impl crate::common::validate::Validatable for FinancialInstitutionIdentification18 {
12331 fn validate_constraints(
12332 &self,
12333 path: &str,
12334 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12335 ) {
12336 if let Some(ref val) = self.bicfi {
12337 let snap = violations.len();
12338 val.validate_constraints("", violations);
12339 if violations.len() > snap {
12340 let pfx = format!("{path}/BICFI");
12341 for v in &mut violations[snap..] {
12342 v.path.insert_str(0, &pfx);
12343 }
12344 }
12345 }
12346 if let Some(ref val) = self.clr_sys_mmb_id {
12347 let snap = violations.len();
12348 val.validate_constraints("", violations);
12349 if violations.len() > snap {
12350 let pfx = format!("{path}/ClrSysMmbId");
12351 for v in &mut violations[snap..] {
12352 v.path.insert_str(0, &pfx);
12353 }
12354 }
12355 }
12356 if let Some(ref val) = self.lei {
12357 let snap = violations.len();
12358 val.validate_constraints("", violations);
12359 if violations.len() > snap {
12360 let pfx = format!("{path}/LEI");
12361 for v in &mut violations[snap..] {
12362 v.path.insert_str(0, &pfx);
12363 }
12364 }
12365 }
12366 if let Some(ref val) = self.nm {
12367 let snap = violations.len();
12368 val.validate_constraints("", violations);
12369 if violations.len() > snap {
12370 let pfx = format!("{path}/Nm");
12371 for v in &mut violations[snap..] {
12372 v.path.insert_str(0, &pfx);
12373 }
12374 }
12375 }
12376 if let Some(ref val) = self.pstl_adr {
12377 let snap = violations.len();
12378 val.validate_constraints("", violations);
12379 if violations.len() > snap {
12380 let pfx = format!("{path}/PstlAdr");
12381 for v in &mut violations[snap..] {
12382 v.path.insert_str(0, &pfx);
12383 }
12384 }
12385 }
12386 if let Some(ref val) = self.othr {
12387 let snap = violations.len();
12388 val.validate_constraints("", violations);
12389 if violations.len() > snap {
12390 let pfx = format!("{path}/Othr");
12391 for v in &mut violations[snap..] {
12392 v.path.insert_str(0, &pfx);
12393 }
12394 }
12395 }
12396 }
12397}
12398impl crate::common::validate::Validatable for Frequency36Choice {
12399 fn validate_constraints(
12400 &self,
12401 path: &str,
12402 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12403 ) {
12404 match self {
12405 Self::Tp(inner) => {
12406 let snap = violations.len();
12407 inner.validate_constraints("", violations);
12408 if violations.len() > snap {
12409 let pfx = format!("{path}/Tp");
12410 for v in &mut violations[snap..] {
12411 v.path.insert_str(0, &pfx);
12412 }
12413 }
12414 }
12415 Self::Prd(inner) => {
12416 let snap = violations.len();
12417 inner.validate_constraints("", violations);
12418 if violations.len() > snap {
12419 let pfx = format!("{path}/Prd");
12420 for v in &mut violations[snap..] {
12421 v.path.insert_str(0, &pfx);
12422 }
12423 }
12424 }
12425 Self::PtInTm(inner) => {
12426 let snap = violations.len();
12427 inner.validate_constraints("", violations);
12428 if violations.len() > snap {
12429 let pfx = format!("{path}/PtInTm");
12430 for v in &mut violations[snap..] {
12431 v.path.insert_str(0, &pfx);
12432 }
12433 }
12434 }
12435 }
12436 }
12437}
12438impl crate::common::validate::Validatable for FrequencyAndMoment1 {
12439 fn validate_constraints(
12440 &self,
12441 path: &str,
12442 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12443 ) {
12444 {
12445 let snap = violations.len();
12446 self.tp.validate_constraints("", violations);
12447 if violations.len() > snap {
12448 let pfx = format!("{path}/Tp");
12449 for v in &mut violations[snap..] {
12450 v.path.insert_str(0, &pfx);
12451 }
12452 }
12453 }
12454 {
12455 let snap = violations.len();
12456 self.pt_in_tm.validate_constraints("", violations);
12457 if violations.len() > snap {
12458 let pfx = format!("{path}/PtInTm");
12459 for v in &mut violations[snap..] {
12460 v.path.insert_str(0, &pfx);
12461 }
12462 }
12463 }
12464 }
12465}
12466impl crate::common::validate::Validatable for FrequencyPeriod1 {
12467 fn validate_constraints(
12468 &self,
12469 path: &str,
12470 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12471 ) {
12472 {
12473 let snap = violations.len();
12474 self.tp.validate_constraints("", violations);
12475 if violations.len() > snap {
12476 let pfx = format!("{path}/Tp");
12477 for v in &mut violations[snap..] {
12478 v.path.insert_str(0, &pfx);
12479 }
12480 }
12481 }
12482 {
12483 let snap = violations.len();
12484 self.cnt_per_prd.validate_constraints("", violations);
12485 if violations.len() > snap {
12486 let pfx = format!("{path}/CntPerPrd");
12487 for v in &mut violations[snap..] {
12488 v.path.insert_str(0, &pfx);
12489 }
12490 }
12491 }
12492 }
12493}
12494impl crate::common::validate::Validatable for Garnishment3 {
12495 fn validate_constraints(
12496 &self,
12497 path: &str,
12498 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12499 ) {
12500 {
12501 let snap = violations.len();
12502 self.tp.validate_constraints("", violations);
12503 if violations.len() > snap {
12504 let pfx = format!("{path}/Tp");
12505 for v in &mut violations[snap..] {
12506 v.path.insert_str(0, &pfx);
12507 }
12508 }
12509 }
12510 if let Some(ref val) = self.grnshee {
12511 let snap = violations.len();
12512 val.validate_constraints("", violations);
12513 if violations.len() > snap {
12514 let pfx = format!("{path}/Grnshee");
12515 for v in &mut violations[snap..] {
12516 v.path.insert_str(0, &pfx);
12517 }
12518 }
12519 }
12520 if let Some(ref val) = self.grnshmt_admstr {
12521 let snap = violations.len();
12522 val.validate_constraints("", violations);
12523 if violations.len() > snap {
12524 let pfx = format!("{path}/GrnshmtAdmstr");
12525 for v in &mut violations[snap..] {
12526 v.path.insert_str(0, &pfx);
12527 }
12528 }
12529 }
12530 if let Some(ref val) = self.ref_nb {
12531 let snap = violations.len();
12532 val.validate_constraints("", violations);
12533 if violations.len() > snap {
12534 let pfx = format!("{path}/RefNb");
12535 for v in &mut violations[snap..] {
12536 v.path.insert_str(0, &pfx);
12537 }
12538 }
12539 }
12540 if let Some(ref val) = self.dt {
12541 let snap = violations.len();
12542 val.validate_constraints("", violations);
12543 if violations.len() > snap {
12544 let pfx = format!("{path}/Dt");
12545 for v in &mut violations[snap..] {
12546 v.path.insert_str(0, &pfx);
12547 }
12548 }
12549 }
12550 if let Some(ref val) = self.rmtd_amt {
12551 let snap = violations.len();
12552 val.validate_constraints("", violations);
12553 if violations.len() > snap {
12554 let pfx = format!("{path}/RmtdAmt");
12555 for v in &mut violations[snap..] {
12556 v.path.insert_str(0, &pfx);
12557 }
12558 }
12559 }
12560 if let Some(ref val) = self.fmly_mdcl_insrnc_ind {
12561 let snap = violations.len();
12562 val.validate_constraints("", violations);
12563 if violations.len() > snap {
12564 let pfx = format!("{path}/FmlyMdclInsrncInd");
12565 for v in &mut violations[snap..] {
12566 v.path.insert_str(0, &pfx);
12567 }
12568 }
12569 }
12570 if let Some(ref val) = self.mplyee_termntn_ind {
12571 let snap = violations.len();
12572 val.validate_constraints("", violations);
12573 if violations.len() > snap {
12574 let pfx = format!("{path}/MplyeeTermntnInd");
12575 for v in &mut violations[snap..] {
12576 v.path.insert_str(0, &pfx);
12577 }
12578 }
12579 }
12580 }
12581}
12582impl crate::common::validate::Validatable for GarnishmentType1 {
12583 fn validate_constraints(
12584 &self,
12585 path: &str,
12586 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12587 ) {
12588 {
12589 let snap = violations.len();
12590 self.cd_or_prtry.inner.validate_constraints("", violations);
12591 if violations.len() > snap {
12592 let pfx = format!("{path}/CdOrPrtry");
12593 for v in &mut violations[snap..] {
12594 v.path.insert_str(0, &pfx);
12595 }
12596 }
12597 }
12598 if let Some(ref val) = self.issr {
12599 let snap = violations.len();
12600 val.validate_constraints("", violations);
12601 if violations.len() > snap {
12602 let pfx = format!("{path}/Issr");
12603 for v in &mut violations[snap..] {
12604 v.path.insert_str(0, &pfx);
12605 }
12606 }
12607 }
12608 }
12609}
12610impl crate::common::validate::Validatable for GarnishmentType1Choice {
12611 fn validate_constraints(
12612 &self,
12613 path: &str,
12614 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12615 ) {
12616 match self {
12617 Self::Cd(inner) => {
12618 let snap = violations.len();
12619 inner.validate_constraints("", violations);
12620 if violations.len() > snap {
12621 let pfx = format!("{path}/Cd");
12622 for v in &mut violations[snap..] {
12623 v.path.insert_str(0, &pfx);
12624 }
12625 }
12626 }
12627 Self::Prtry(inner) => {
12628 let snap = violations.len();
12629 inner.validate_constraints("", violations);
12630 if violations.len() > snap {
12631 let pfx = format!("{path}/Prtry");
12632 for v in &mut violations[snap..] {
12633 v.path.insert_str(0, &pfx);
12634 }
12635 }
12636 }
12637 }
12638 }
12639}
12640impl crate::common::validate::Validatable for GenericAccountIdentification1 {
12641 fn validate_constraints(
12642 &self,
12643 path: &str,
12644 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12645 ) {
12646 {
12647 let snap = violations.len();
12648 self.id.validate_constraints("", violations);
12649 if violations.len() > snap {
12650 let pfx = format!("{path}/Id");
12651 for v in &mut violations[snap..] {
12652 v.path.insert_str(0, &pfx);
12653 }
12654 }
12655 }
12656 if let Some(ref wrapper) = self.schme_nm {
12657 let snap = violations.len();
12658 wrapper.inner.validate_constraints("", violations);
12659 if violations.len() > snap {
12660 let pfx = format!("{path}/SchmeNm");
12661 for v in &mut violations[snap..] {
12662 v.path.insert_str(0, &pfx);
12663 }
12664 }
12665 }
12666 if let Some(ref val) = self.issr {
12667 let snap = violations.len();
12668 val.validate_constraints("", violations);
12669 if violations.len() > snap {
12670 let pfx = format!("{path}/Issr");
12671 for v in &mut violations[snap..] {
12672 v.path.insert_str(0, &pfx);
12673 }
12674 }
12675 }
12676 }
12677}
12678impl crate::common::validate::Validatable for GenericFinancialIdentification1 {
12679 fn validate_constraints(
12680 &self,
12681 path: &str,
12682 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12683 ) {
12684 {
12685 let snap = violations.len();
12686 self.id.validate_constraints("", violations);
12687 if violations.len() > snap {
12688 let pfx = format!("{path}/Id");
12689 for v in &mut violations[snap..] {
12690 v.path.insert_str(0, &pfx);
12691 }
12692 }
12693 }
12694 if let Some(ref wrapper) = self.schme_nm {
12695 let snap = violations.len();
12696 wrapper.inner.validate_constraints("", violations);
12697 if violations.len() > snap {
12698 let pfx = format!("{path}/SchmeNm");
12699 for v in &mut violations[snap..] {
12700 v.path.insert_str(0, &pfx);
12701 }
12702 }
12703 }
12704 if let Some(ref val) = self.issr {
12705 let snap = violations.len();
12706 val.validate_constraints("", violations);
12707 if violations.len() > snap {
12708 let pfx = format!("{path}/Issr");
12709 for v in &mut violations[snap..] {
12710 v.path.insert_str(0, &pfx);
12711 }
12712 }
12713 }
12714 }
12715}
12716impl crate::common::validate::Validatable for GenericIdentification30 {
12717 fn validate_constraints(
12718 &self,
12719 path: &str,
12720 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12721 ) {
12722 {
12723 let snap = violations.len();
12724 self.id.validate_constraints("", violations);
12725 if violations.len() > snap {
12726 let pfx = format!("{path}/Id");
12727 for v in &mut violations[snap..] {
12728 v.path.insert_str(0, &pfx);
12729 }
12730 }
12731 }
12732 {
12733 let snap = violations.len();
12734 self.issr.validate_constraints("", violations);
12735 if violations.len() > snap {
12736 let pfx = format!("{path}/Issr");
12737 for v in &mut violations[snap..] {
12738 v.path.insert_str(0, &pfx);
12739 }
12740 }
12741 }
12742 if let Some(ref val) = self.schme_nm {
12743 let snap = violations.len();
12744 val.validate_constraints("", violations);
12745 if violations.len() > snap {
12746 let pfx = format!("{path}/SchmeNm");
12747 for v in &mut violations[snap..] {
12748 v.path.insert_str(0, &pfx);
12749 }
12750 }
12751 }
12752 }
12753}
12754impl crate::common::validate::Validatable for GenericOrganisationIdentification1 {
12755 fn validate_constraints(
12756 &self,
12757 path: &str,
12758 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12759 ) {
12760 {
12761 let snap = violations.len();
12762 self.id.validate_constraints("", violations);
12763 if violations.len() > snap {
12764 let pfx = format!("{path}/Id");
12765 for v in &mut violations[snap..] {
12766 v.path.insert_str(0, &pfx);
12767 }
12768 }
12769 }
12770 if let Some(ref wrapper) = self.schme_nm {
12771 let snap = violations.len();
12772 wrapper.inner.validate_constraints("", violations);
12773 if violations.len() > snap {
12774 let pfx = format!("{path}/SchmeNm");
12775 for v in &mut violations[snap..] {
12776 v.path.insert_str(0, &pfx);
12777 }
12778 }
12779 }
12780 if let Some(ref val) = self.issr {
12781 let snap = violations.len();
12782 val.validate_constraints("", violations);
12783 if violations.len() > snap {
12784 let pfx = format!("{path}/Issr");
12785 for v in &mut violations[snap..] {
12786 v.path.insert_str(0, &pfx);
12787 }
12788 }
12789 }
12790 }
12791}
12792impl crate::common::validate::Validatable for GenericPersonIdentification1 {
12793 fn validate_constraints(
12794 &self,
12795 path: &str,
12796 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12797 ) {
12798 {
12799 let snap = violations.len();
12800 self.id.validate_constraints("", violations);
12801 if violations.len() > snap {
12802 let pfx = format!("{path}/Id");
12803 for v in &mut violations[snap..] {
12804 v.path.insert_str(0, &pfx);
12805 }
12806 }
12807 }
12808 if let Some(ref wrapper) = self.schme_nm {
12809 let snap = violations.len();
12810 wrapper.inner.validate_constraints("", violations);
12811 if violations.len() > snap {
12812 let pfx = format!("{path}/SchmeNm");
12813 for v in &mut violations[snap..] {
12814 v.path.insert_str(0, &pfx);
12815 }
12816 }
12817 }
12818 if let Some(ref val) = self.issr {
12819 let snap = violations.len();
12820 val.validate_constraints("", violations);
12821 if violations.len() > snap {
12822 let pfx = format!("{path}/Issr");
12823 for v in &mut violations[snap..] {
12824 v.path.insert_str(0, &pfx);
12825 }
12826 }
12827 }
12828 }
12829}
12830impl crate::common::validate::Validatable for GroupHeader91 {
12831 fn validate_constraints(
12832 &self,
12833 path: &str,
12834 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12835 ) {
12836 {
12837 let snap = violations.len();
12838 self.msg_id.validate_constraints("", violations);
12839 if violations.len() > snap {
12840 let pfx = format!("{path}/MsgId");
12841 for v in &mut violations[snap..] {
12842 v.path.insert_str(0, &pfx);
12843 }
12844 }
12845 }
12846 {
12847 let snap = violations.len();
12848 self.cre_dt_tm.validate_constraints("", violations);
12849 if violations.len() > snap {
12850 let pfx = format!("{path}/CreDtTm");
12851 for v in &mut violations[snap..] {
12852 v.path.insert_str(0, &pfx);
12853 }
12854 }
12855 }
12856 if let Some(ref val) = self.instg_agt {
12857 let snap = violations.len();
12858 val.validate_constraints("", violations);
12859 if violations.len() > snap {
12860 let pfx = format!("{path}/InstgAgt");
12861 for v in &mut violations[snap..] {
12862 v.path.insert_str(0, &pfx);
12863 }
12864 }
12865 }
12866 if let Some(ref val) = self.instd_agt {
12867 let snap = violations.len();
12868 val.validate_constraints("", violations);
12869 if violations.len() > snap {
12870 let pfx = format!("{path}/InstdAgt");
12871 for v in &mut violations[snap..] {
12872 v.path.insert_str(0, &pfx);
12873 }
12874 }
12875 }
12876 }
12877}
12878impl crate::common::validate::Validatable for LocalInstrument2Choice {
12879 fn validate_constraints(
12880 &self,
12881 path: &str,
12882 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12883 ) {
12884 match self {
12885 Self::Cd(inner) => {
12886 let snap = violations.len();
12887 inner.validate_constraints("", violations);
12888 if violations.len() > snap {
12889 let pfx = format!("{path}/Cd");
12890 for v in &mut violations[snap..] {
12891 v.path.insert_str(0, &pfx);
12892 }
12893 }
12894 }
12895 Self::Prtry(inner) => {
12896 let snap = violations.len();
12897 inner.validate_constraints("", violations);
12898 if violations.len() > snap {
12899 let pfx = format!("{path}/Prtry");
12900 for v in &mut violations[snap..] {
12901 v.path.insert_str(0, &pfx);
12902 }
12903 }
12904 }
12905 }
12906 }
12907}
12908impl crate::common::validate::Validatable for MandateClassification1Choice {
12909 fn validate_constraints(
12910 &self,
12911 path: &str,
12912 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12913 ) {
12914 match self {
12915 Self::Cd(inner) => {
12916 let snap = violations.len();
12917 inner.validate_constraints("", violations);
12918 if violations.len() > snap {
12919 let pfx = format!("{path}/Cd");
12920 for v in &mut violations[snap..] {
12921 v.path.insert_str(0, &pfx);
12922 }
12923 }
12924 }
12925 Self::Prtry(inner) => {
12926 let snap = violations.len();
12927 inner.validate_constraints("", violations);
12928 if violations.len() > snap {
12929 let pfx = format!("{path}/Prtry");
12930 for v in &mut violations[snap..] {
12931 v.path.insert_str(0, &pfx);
12932 }
12933 }
12934 }
12935 }
12936 }
12937}
12938impl crate::common::validate::Validatable for MandateRelatedData2Choice {
12939 fn validate_constraints(
12940 &self,
12941 path: &str,
12942 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12943 ) {
12944 match self {
12945 Self::DrctDbtMndt(inner) => {
12946 let snap = violations.len();
12947 inner.validate_constraints("", violations);
12948 if violations.len() > snap {
12949 let pfx = format!("{path}/DrctDbtMndt");
12950 for v in &mut violations[snap..] {
12951 v.path.insert_str(0, &pfx);
12952 }
12953 }
12954 }
12955 Self::CdtTrfMndt(inner) => {
12956 let snap = violations.len();
12957 inner.validate_constraints("", violations);
12958 if violations.len() > snap {
12959 let pfx = format!("{path}/CdtTrfMndt");
12960 for v in &mut violations[snap..] {
12961 v.path.insert_str(0, &pfx);
12962 }
12963 }
12964 }
12965 }
12966 }
12967}
12968impl crate::common::validate::Validatable for MandateRelatedInformation15 {
12969 fn validate_constraints(
12970 &self,
12971 path: &str,
12972 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
12973 ) {
12974 if let Some(ref val) = self.mndt_id {
12975 let snap = violations.len();
12976 val.validate_constraints("", violations);
12977 if violations.len() > snap {
12978 let pfx = format!("{path}/MndtId");
12979 for v in &mut violations[snap..] {
12980 v.path.insert_str(0, &pfx);
12981 }
12982 }
12983 }
12984 if let Some(ref val) = self.dt_of_sgntr {
12985 let snap = violations.len();
12986 val.validate_constraints("", violations);
12987 if violations.len() > snap {
12988 let pfx = format!("{path}/DtOfSgntr");
12989 for v in &mut violations[snap..] {
12990 v.path.insert_str(0, &pfx);
12991 }
12992 }
12993 }
12994 if let Some(ref val) = self.amdmnt_ind {
12995 let snap = violations.len();
12996 val.validate_constraints("", violations);
12997 if violations.len() > snap {
12998 let pfx = format!("{path}/AmdmntInd");
12999 for v in &mut violations[snap..] {
13000 v.path.insert_str(0, &pfx);
13001 }
13002 }
13003 }
13004 if let Some(ref val) = self.amdmnt_inf_dtls {
13005 let snap = violations.len();
13006 val.validate_constraints("", violations);
13007 if violations.len() > snap {
13008 let pfx = format!("{path}/AmdmntInfDtls");
13009 for v in &mut violations[snap..] {
13010 v.path.insert_str(0, &pfx);
13011 }
13012 }
13013 }
13014 if let Some(ref val) = self.elctrnc_sgntr {
13015 let snap = violations.len();
13016 val.validate_constraints("", violations);
13017 if violations.len() > snap {
13018 let pfx = format!("{path}/ElctrncSgntr");
13019 for v in &mut violations[snap..] {
13020 v.path.insert_str(0, &pfx);
13021 }
13022 }
13023 }
13024 if let Some(ref val) = self.frst_colltn_dt {
13025 let snap = violations.len();
13026 val.validate_constraints("", violations);
13027 if violations.len() > snap {
13028 let pfx = format!("{path}/FrstColltnDt");
13029 for v in &mut violations[snap..] {
13030 v.path.insert_str(0, &pfx);
13031 }
13032 }
13033 }
13034 if let Some(ref val) = self.fnl_colltn_dt {
13035 let snap = violations.len();
13036 val.validate_constraints("", violations);
13037 if violations.len() > snap {
13038 let pfx = format!("{path}/FnlColltnDt");
13039 for v in &mut violations[snap..] {
13040 v.path.insert_str(0, &pfx);
13041 }
13042 }
13043 }
13044 if let Some(ref wrapper) = self.frqcy {
13045 let snap = violations.len();
13046 wrapper.inner.validate_constraints("", violations);
13047 if violations.len() > snap {
13048 let pfx = format!("{path}/Frqcy");
13049 for v in &mut violations[snap..] {
13050 v.path.insert_str(0, &pfx);
13051 }
13052 }
13053 }
13054 if let Some(ref wrapper) = self.rsn {
13055 let snap = violations.len();
13056 wrapper.inner.validate_constraints("", violations);
13057 if violations.len() > snap {
13058 let pfx = format!("{path}/Rsn");
13059 for v in &mut violations[snap..] {
13060 v.path.insert_str(0, &pfx);
13061 }
13062 }
13063 }
13064 if let Some(ref val) = self.trckg_days {
13065 let snap = violations.len();
13066 val.validate_constraints("", violations);
13067 if violations.len() > snap {
13068 let pfx = format!("{path}/TrckgDays");
13069 for v in &mut violations[snap..] {
13070 v.path.insert_str(0, &pfx);
13071 }
13072 }
13073 }
13074 }
13075}
13076impl crate::common::validate::Validatable for MandateSetupReason1Choice {
13077 fn validate_constraints(
13078 &self,
13079 path: &str,
13080 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13081 ) {
13082 match self {
13083 Self::Cd(inner) => {
13084 let snap = violations.len();
13085 inner.validate_constraints("", violations);
13086 if violations.len() > snap {
13087 let pfx = format!("{path}/Cd");
13088 for v in &mut violations[snap..] {
13089 v.path.insert_str(0, &pfx);
13090 }
13091 }
13092 }
13093 Self::Prtry(inner) => {
13094 let snap = violations.len();
13095 inner.validate_constraints("", violations);
13096 if violations.len() > snap {
13097 let pfx = format!("{path}/Prtry");
13098 for v in &mut violations[snap..] {
13099 v.path.insert_str(0, &pfx);
13100 }
13101 }
13102 }
13103 }
13104 }
13105}
13106impl crate::common::validate::Validatable for MandateTypeInformation2 {
13107 fn validate_constraints(
13108 &self,
13109 path: &str,
13110 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13111 ) {
13112 if let Some(ref wrapper) = self.svc_lvl {
13113 let snap = violations.len();
13114 wrapper.inner.validate_constraints("", violations);
13115 if violations.len() > snap {
13116 let pfx = format!("{path}/SvcLvl");
13117 for v in &mut violations[snap..] {
13118 v.path.insert_str(0, &pfx);
13119 }
13120 }
13121 }
13122 if let Some(ref wrapper) = self.lcl_instrm {
13123 let snap = violations.len();
13124 wrapper.inner.validate_constraints("", violations);
13125 if violations.len() > snap {
13126 let pfx = format!("{path}/LclInstrm");
13127 for v in &mut violations[snap..] {
13128 v.path.insert_str(0, &pfx);
13129 }
13130 }
13131 }
13132 if let Some(ref wrapper) = self.ctgy_purp {
13133 let snap = violations.len();
13134 wrapper.inner.validate_constraints("", violations);
13135 if violations.len() > snap {
13136 let pfx = format!("{path}/CtgyPurp");
13137 for v in &mut violations[snap..] {
13138 v.path.insert_str(0, &pfx);
13139 }
13140 }
13141 }
13142 if let Some(ref wrapper) = self.clssfctn {
13143 let snap = violations.len();
13144 wrapper.inner.validate_constraints("", violations);
13145 if violations.len() > snap {
13146 let pfx = format!("{path}/Clssfctn");
13147 for v in &mut violations[snap..] {
13148 v.path.insert_str(0, &pfx);
13149 }
13150 }
13151 }
13152 }
13153}
13154impl crate::common::validate::Validatable for OrganisationIdentification29 {
13155 fn validate_constraints(
13156 &self,
13157 path: &str,
13158 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13159 ) {
13160 if let Some(ref val) = self.any_bic {
13161 let snap = violations.len();
13162 val.validate_constraints("", violations);
13163 if violations.len() > snap {
13164 let pfx = format!("{path}/AnyBIC");
13165 for v in &mut violations[snap..] {
13166 v.path.insert_str(0, &pfx);
13167 }
13168 }
13169 }
13170 if let Some(ref val) = self.lei {
13171 let snap = violations.len();
13172 val.validate_constraints("", violations);
13173 if violations.len() > snap {
13174 let pfx = format!("{path}/LEI");
13175 for v in &mut violations[snap..] {
13176 v.path.insert_str(0, &pfx);
13177 }
13178 }
13179 }
13180 for (idx, elem) in self.othr.iter().enumerate() {
13181 let snap = violations.len();
13182 elem.validate_constraints("", violations);
13183 if violations.len() > snap {
13184 let pfx = format!("{path}/Othr[{idx}]");
13185 for v in &mut violations[snap..] {
13186 v.path.insert_str(0, &pfx);
13187 }
13188 }
13189 }
13190 }
13191}
13192impl crate::common::validate::Validatable for OrganisationIdentificationSchemeName1Choice {
13193 fn validate_constraints(
13194 &self,
13195 path: &str,
13196 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13197 ) {
13198 match self {
13199 Self::Cd(inner) => {
13200 let snap = violations.len();
13201 inner.validate_constraints("", violations);
13202 if violations.len() > snap {
13203 let pfx = format!("{path}/Cd");
13204 for v in &mut violations[snap..] {
13205 v.path.insert_str(0, &pfx);
13206 }
13207 }
13208 }
13209 Self::Prtry(inner) => {
13210 let snap = violations.len();
13211 inner.validate_constraints("", violations);
13212 if violations.len() > snap {
13213 let pfx = format!("{path}/Prtry");
13214 for v in &mut violations[snap..] {
13215 v.path.insert_str(0, &pfx);
13216 }
13217 }
13218 }
13219 }
13220 }
13221}
13222impl crate::common::validate::Validatable for OriginalGroupInformation27 {
13223 fn validate_constraints(
13224 &self,
13225 path: &str,
13226 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13227 ) {
13228 {
13229 let snap = violations.len();
13230 self.orgnl_msg_id.validate_constraints("", violations);
13231 if violations.len() > snap {
13232 let pfx = format!("{path}/OrgnlMsgId");
13233 for v in &mut violations[snap..] {
13234 v.path.insert_str(0, &pfx);
13235 }
13236 }
13237 }
13238 {
13239 let snap = violations.len();
13240 self.orgnl_msg_nm_id.validate_constraints("", violations);
13241 if violations.len() > snap {
13242 let pfx = format!("{path}/OrgnlMsgNmId");
13243 for v in &mut violations[snap..] {
13244 v.path.insert_str(0, &pfx);
13245 }
13246 }
13247 }
13248 if let Some(ref val) = self.orgnl_cre_dt_tm {
13249 let snap = violations.len();
13250 val.validate_constraints("", violations);
13251 if violations.len() > snap {
13252 let pfx = format!("{path}/OrgnlCreDtTm");
13253 for v in &mut violations[snap..] {
13254 v.path.insert_str(0, &pfx);
13255 }
13256 }
13257 }
13258 if let Some(ref val) = self.orgnl_nb_of_txs {
13259 let snap = violations.len();
13260 val.validate_constraints("", violations);
13261 if violations.len() > snap {
13262 let pfx = format!("{path}/OrgnlNbOfTxs");
13263 for v in &mut violations[snap..] {
13264 v.path.insert_str(0, &pfx);
13265 }
13266 }
13267 }
13268 if let Some(ref val) = self.orgnl_ctrl_sum {
13269 let snap = violations.len();
13270 val.validate_constraints("", violations);
13271 if violations.len() > snap {
13272 let pfx = format!("{path}/OrgnlCtrlSum");
13273 for v in &mut violations[snap..] {
13274 v.path.insert_str(0, &pfx);
13275 }
13276 }
13277 }
13278 }
13279}
13280impl crate::common::validate::Validatable for OriginalGroupInformation29 {
13281 fn validate_constraints(
13282 &self,
13283 path: &str,
13284 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13285 ) {
13286 {
13287 let snap = violations.len();
13288 self.orgnl_msg_id.validate_constraints("", violations);
13289 if violations.len() > snap {
13290 let pfx = format!("{path}/OrgnlMsgId");
13291 for v in &mut violations[snap..] {
13292 v.path.insert_str(0, &pfx);
13293 }
13294 }
13295 }
13296 {
13297 let snap = violations.len();
13298 self.orgnl_msg_nm_id.validate_constraints("", violations);
13299 if violations.len() > snap {
13300 let pfx = format!("{path}/OrgnlMsgNmId");
13301 for v in &mut violations[snap..] {
13302 v.path.insert_str(0, &pfx);
13303 }
13304 }
13305 }
13306 if let Some(ref val) = self.orgnl_cre_dt_tm {
13307 let snap = violations.len();
13308 val.validate_constraints("", violations);
13309 if violations.len() > snap {
13310 let pfx = format!("{path}/OrgnlCreDtTm");
13311 for v in &mut violations[snap..] {
13312 v.path.insert_str(0, &pfx);
13313 }
13314 }
13315 }
13316 }
13317}
13318impl crate::common::validate::Validatable for OriginalTransactionReference35 {
13319 fn validate_constraints(
13320 &self,
13321 path: &str,
13322 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13323 ) {
13324 if let Some(ref val) = self.intr_bk_sttlm_amt {
13325 let snap = violations.len();
13326 val.validate_constraints("", violations);
13327 if violations.len() > snap {
13328 let pfx = format!("{path}/IntrBkSttlmAmt");
13329 for v in &mut violations[snap..] {
13330 v.path.insert_str(0, &pfx);
13331 }
13332 }
13333 }
13334 if let Some(ref wrapper) = self.amt {
13335 let snap = violations.len();
13336 wrapper.inner.validate_constraints("", violations);
13337 if violations.len() > snap {
13338 let pfx = format!("{path}/Amt");
13339 for v in &mut violations[snap..] {
13340 v.path.insert_str(0, &pfx);
13341 }
13342 }
13343 }
13344 if let Some(ref val) = self.intr_bk_sttlm_dt {
13345 let snap = violations.len();
13346 val.validate_constraints("", violations);
13347 if violations.len() > snap {
13348 let pfx = format!("{path}/IntrBkSttlmDt");
13349 for v in &mut violations[snap..] {
13350 v.path.insert_str(0, &pfx);
13351 }
13352 }
13353 }
13354 if let Some(ref val) = self.reqd_colltn_dt {
13355 let snap = violations.len();
13356 val.validate_constraints("", violations);
13357 if violations.len() > snap {
13358 let pfx = format!("{path}/ReqdColltnDt");
13359 for v in &mut violations[snap..] {
13360 v.path.insert_str(0, &pfx);
13361 }
13362 }
13363 }
13364 if let Some(ref wrapper) = self.reqd_exctn_dt {
13365 let snap = violations.len();
13366 wrapper.inner.validate_constraints("", violations);
13367 if violations.len() > snap {
13368 let pfx = format!("{path}/ReqdExctnDt");
13369 for v in &mut violations[snap..] {
13370 v.path.insert_str(0, &pfx);
13371 }
13372 }
13373 }
13374 if let Some(ref val) = self.cdtr_schme_id {
13375 let snap = violations.len();
13376 val.validate_constraints("", violations);
13377 if violations.len() > snap {
13378 let pfx = format!("{path}/CdtrSchmeId");
13379 for v in &mut violations[snap..] {
13380 v.path.insert_str(0, &pfx);
13381 }
13382 }
13383 }
13384 if let Some(ref val) = self.sttlm_inf {
13385 let snap = violations.len();
13386 val.validate_constraints("", violations);
13387 if violations.len() > snap {
13388 let pfx = format!("{path}/SttlmInf");
13389 for v in &mut violations[snap..] {
13390 v.path.insert_str(0, &pfx);
13391 }
13392 }
13393 }
13394 if let Some(ref val) = self.pmt_tp_inf {
13395 let snap = violations.len();
13396 val.validate_constraints("", violations);
13397 if violations.len() > snap {
13398 let pfx = format!("{path}/PmtTpInf");
13399 for v in &mut violations[snap..] {
13400 v.path.insert_str(0, &pfx);
13401 }
13402 }
13403 }
13404 if let Some(ref val) = self.pmt_mtd {
13405 let snap = violations.len();
13406 val.validate_constraints("", violations);
13407 if violations.len() > snap {
13408 let pfx = format!("{path}/PmtMtd");
13409 for v in &mut violations[snap..] {
13410 v.path.insert_str(0, &pfx);
13411 }
13412 }
13413 }
13414 if let Some(ref wrapper) = self.mndt_rltd_inf {
13415 let snap = violations.len();
13416 wrapper.inner.validate_constraints("", violations);
13417 if violations.len() > snap {
13418 let pfx = format!("{path}/MndtRltdInf");
13419 for v in &mut violations[snap..] {
13420 v.path.insert_str(0, &pfx);
13421 }
13422 }
13423 }
13424 if let Some(ref val) = self.rmt_inf {
13425 let snap = violations.len();
13426 val.validate_constraints("", violations);
13427 if violations.len() > snap {
13428 let pfx = format!("{path}/RmtInf");
13429 for v in &mut violations[snap..] {
13430 v.path.insert_str(0, &pfx);
13431 }
13432 }
13433 }
13434 if let Some(ref wrapper) = self.ultmt_dbtr {
13435 let snap = violations.len();
13436 wrapper.inner.validate_constraints("", violations);
13437 if violations.len() > snap {
13438 let pfx = format!("{path}/UltmtDbtr");
13439 for v in &mut violations[snap..] {
13440 v.path.insert_str(0, &pfx);
13441 }
13442 }
13443 }
13444 if let Some(ref wrapper) = self.dbtr {
13445 let snap = violations.len();
13446 wrapper.inner.validate_constraints("", violations);
13447 if violations.len() > snap {
13448 let pfx = format!("{path}/Dbtr");
13449 for v in &mut violations[snap..] {
13450 v.path.insert_str(0, &pfx);
13451 }
13452 }
13453 }
13454 if let Some(ref val) = self.dbtr_acct {
13455 let snap = violations.len();
13456 val.validate_constraints("", violations);
13457 if violations.len() > snap {
13458 let pfx = format!("{path}/DbtrAcct");
13459 for v in &mut violations[snap..] {
13460 v.path.insert_str(0, &pfx);
13461 }
13462 }
13463 }
13464 if let Some(ref val) = self.dbtr_agt {
13465 let snap = violations.len();
13466 val.validate_constraints("", violations);
13467 if violations.len() > snap {
13468 let pfx = format!("{path}/DbtrAgt");
13469 for v in &mut violations[snap..] {
13470 v.path.insert_str(0, &pfx);
13471 }
13472 }
13473 }
13474 if let Some(ref val) = self.dbtr_agt_acct {
13475 let snap = violations.len();
13476 val.validate_constraints("", violations);
13477 if violations.len() > snap {
13478 let pfx = format!("{path}/DbtrAgtAcct");
13479 for v in &mut violations[snap..] {
13480 v.path.insert_str(0, &pfx);
13481 }
13482 }
13483 }
13484 if let Some(ref val) = self.cdtr_agt {
13485 let snap = violations.len();
13486 val.validate_constraints("", violations);
13487 if violations.len() > snap {
13488 let pfx = format!("{path}/CdtrAgt");
13489 for v in &mut violations[snap..] {
13490 v.path.insert_str(0, &pfx);
13491 }
13492 }
13493 }
13494 if let Some(ref val) = self.cdtr_agt_acct {
13495 let snap = violations.len();
13496 val.validate_constraints("", violations);
13497 if violations.len() > snap {
13498 let pfx = format!("{path}/CdtrAgtAcct");
13499 for v in &mut violations[snap..] {
13500 v.path.insert_str(0, &pfx);
13501 }
13502 }
13503 }
13504 if let Some(ref wrapper) = self.cdtr {
13505 let snap = violations.len();
13506 wrapper.inner.validate_constraints("", violations);
13507 if violations.len() > snap {
13508 let pfx = format!("{path}/Cdtr");
13509 for v in &mut violations[snap..] {
13510 v.path.insert_str(0, &pfx);
13511 }
13512 }
13513 }
13514 if let Some(ref val) = self.cdtr_acct {
13515 let snap = violations.len();
13516 val.validate_constraints("", violations);
13517 if violations.len() > snap {
13518 let pfx = format!("{path}/CdtrAcct");
13519 for v in &mut violations[snap..] {
13520 v.path.insert_str(0, &pfx);
13521 }
13522 }
13523 }
13524 if let Some(ref wrapper) = self.ultmt_cdtr {
13525 let snap = violations.len();
13526 wrapper.inner.validate_constraints("", violations);
13527 if violations.len() > snap {
13528 let pfx = format!("{path}/UltmtCdtr");
13529 for v in &mut violations[snap..] {
13530 v.path.insert_str(0, &pfx);
13531 }
13532 }
13533 }
13534 if let Some(ref wrapper) = self.purp {
13535 let snap = violations.len();
13536 wrapper.inner.validate_constraints("", violations);
13537 if violations.len() > snap {
13538 let pfx = format!("{path}/Purp");
13539 for v in &mut violations[snap..] {
13540 v.path.insert_str(0, &pfx);
13541 }
13542 }
13543 }
13544 }
13545}
13546impl crate::common::validate::Validatable for OtherContact1 {
13547 fn validate_constraints(
13548 &self,
13549 path: &str,
13550 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13551 ) {
13552 {
13553 let snap = violations.len();
13554 self.chanl_tp.validate_constraints("", violations);
13555 if violations.len() > snap {
13556 let pfx = format!("{path}/ChanlTp");
13557 for v in &mut violations[snap..] {
13558 v.path.insert_str(0, &pfx);
13559 }
13560 }
13561 }
13562 if let Some(ref val) = self.id {
13563 let snap = violations.len();
13564 val.validate_constraints("", violations);
13565 if violations.len() > snap {
13566 let pfx = format!("{path}/Id");
13567 for v in &mut violations[snap..] {
13568 v.path.insert_str(0, &pfx);
13569 }
13570 }
13571 }
13572 }
13573}
13574impl crate::common::validate::Validatable for Party38Choice {
13575 fn validate_constraints(
13576 &self,
13577 path: &str,
13578 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13579 ) {
13580 match self {
13581 Self::OrgId(inner) => {
13582 let snap = violations.len();
13583 inner.validate_constraints("", violations);
13584 if violations.len() > snap {
13585 let pfx = format!("{path}/OrgId");
13586 for v in &mut violations[snap..] {
13587 v.path.insert_str(0, &pfx);
13588 }
13589 }
13590 }
13591 Self::PrvtId(inner) => {
13592 let snap = violations.len();
13593 inner.validate_constraints("", violations);
13594 if violations.len() > snap {
13595 let pfx = format!("{path}/PrvtId");
13596 for v in &mut violations[snap..] {
13597 v.path.insert_str(0, &pfx);
13598 }
13599 }
13600 }
13601 }
13602 }
13603}
13604impl crate::common::validate::Validatable for Party40Choice {
13605 fn validate_constraints(
13606 &self,
13607 path: &str,
13608 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13609 ) {
13610 match self {
13611 Self::Pty(inner) => {
13612 let snap = violations.len();
13613 inner.validate_constraints("", violations);
13614 if violations.len() > snap {
13615 let pfx = format!("{path}/Pty");
13616 for v in &mut violations[snap..] {
13617 v.path.insert_str(0, &pfx);
13618 }
13619 }
13620 }
13621 Self::Agt(inner) => {
13622 let snap = violations.len();
13623 inner.validate_constraints("", violations);
13624 if violations.len() > snap {
13625 let pfx = format!("{path}/Agt");
13626 for v in &mut violations[snap..] {
13627 v.path.insert_str(0, &pfx);
13628 }
13629 }
13630 }
13631 }
13632 }
13633}
13634impl crate::common::validate::Validatable for PartyIdentification135 {
13635 fn validate_constraints(
13636 &self,
13637 path: &str,
13638 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13639 ) {
13640 if let Some(ref val) = self.nm {
13641 let snap = violations.len();
13642 val.validate_constraints("", violations);
13643 if violations.len() > snap {
13644 let pfx = format!("{path}/Nm");
13645 for v in &mut violations[snap..] {
13646 v.path.insert_str(0, &pfx);
13647 }
13648 }
13649 }
13650 if let Some(ref val) = self.pstl_adr {
13651 let snap = violations.len();
13652 val.validate_constraints("", violations);
13653 if violations.len() > snap {
13654 let pfx = format!("{path}/PstlAdr");
13655 for v in &mut violations[snap..] {
13656 v.path.insert_str(0, &pfx);
13657 }
13658 }
13659 }
13660 if let Some(ref wrapper) = self.id {
13661 let snap = violations.len();
13662 wrapper.inner.validate_constraints("", violations);
13663 if violations.len() > snap {
13664 let pfx = format!("{path}/Id");
13665 for v in &mut violations[snap..] {
13666 v.path.insert_str(0, &pfx);
13667 }
13668 }
13669 }
13670 if let Some(ref val) = self.ctry_of_res {
13671 let snap = violations.len();
13672 val.validate_constraints("", violations);
13673 if violations.len() > snap {
13674 let pfx = format!("{path}/CtryOfRes");
13675 for v in &mut violations[snap..] {
13676 v.path.insert_str(0, &pfx);
13677 }
13678 }
13679 }
13680 if let Some(ref val) = self.ctct_dtls {
13681 let snap = violations.len();
13682 val.validate_constraints("", violations);
13683 if violations.len() > snap {
13684 let pfx = format!("{path}/CtctDtls");
13685 for v in &mut violations[snap..] {
13686 v.path.insert_str(0, &pfx);
13687 }
13688 }
13689 }
13690 }
13691}
13692impl crate::common::validate::Validatable for PaymentTransaction131 {
13693 fn validate_constraints(
13694 &self,
13695 path: &str,
13696 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13697 ) {
13698 if let Some(ref val) = self.sts_req_id {
13699 let snap = violations.len();
13700 val.validate_constraints("", violations);
13701 if violations.len() > snap {
13702 let pfx = format!("{path}/StsReqId");
13703 for v in &mut violations[snap..] {
13704 v.path.insert_str(0, &pfx);
13705 }
13706 }
13707 }
13708 if let Some(ref val) = self.orgnl_grp_inf {
13709 let snap = violations.len();
13710 val.validate_constraints("", violations);
13711 if violations.len() > snap {
13712 let pfx = format!("{path}/OrgnlGrpInf");
13713 for v in &mut violations[snap..] {
13714 v.path.insert_str(0, &pfx);
13715 }
13716 }
13717 }
13718 if let Some(ref val) = self.orgnl_instr_id {
13719 let snap = violations.len();
13720 val.validate_constraints("", violations);
13721 if violations.len() > snap {
13722 let pfx = format!("{path}/OrgnlInstrId");
13723 for v in &mut violations[snap..] {
13724 v.path.insert_str(0, &pfx);
13725 }
13726 }
13727 }
13728 if let Some(ref val) = self.orgnl_end_to_end_id {
13729 let snap = violations.len();
13730 val.validate_constraints("", violations);
13731 if violations.len() > snap {
13732 let pfx = format!("{path}/OrgnlEndToEndId");
13733 for v in &mut violations[snap..] {
13734 v.path.insert_str(0, &pfx);
13735 }
13736 }
13737 }
13738 if let Some(ref val) = self.orgnl_tx_id {
13739 let snap = violations.len();
13740 val.validate_constraints("", violations);
13741 if violations.len() > snap {
13742 let pfx = format!("{path}/OrgnlTxId");
13743 for v in &mut violations[snap..] {
13744 v.path.insert_str(0, &pfx);
13745 }
13746 }
13747 }
13748 if let Some(ref val) = self.orgnl_uetr {
13749 let snap = violations.len();
13750 val.validate_constraints("", violations);
13751 if violations.len() > snap {
13752 let pfx = format!("{path}/OrgnlUETR");
13753 for v in &mut violations[snap..] {
13754 v.path.insert_str(0, &pfx);
13755 }
13756 }
13757 }
13758 if let Some(ref val) = self.accptnc_dt_tm {
13759 let snap = violations.len();
13760 val.validate_constraints("", violations);
13761 if violations.len() > snap {
13762 let pfx = format!("{path}/AccptncDtTm");
13763 for v in &mut violations[snap..] {
13764 v.path.insert_str(0, &pfx);
13765 }
13766 }
13767 }
13768 if let Some(ref val) = self.clr_sys_ref {
13769 let snap = violations.len();
13770 val.validate_constraints("", violations);
13771 if violations.len() > snap {
13772 let pfx = format!("{path}/ClrSysRef");
13773 for v in &mut violations[snap..] {
13774 v.path.insert_str(0, &pfx);
13775 }
13776 }
13777 }
13778 if let Some(ref val) = self.instg_agt {
13779 let snap = violations.len();
13780 val.validate_constraints("", violations);
13781 if violations.len() > snap {
13782 let pfx = format!("{path}/InstgAgt");
13783 for v in &mut violations[snap..] {
13784 v.path.insert_str(0, &pfx);
13785 }
13786 }
13787 }
13788 if let Some(ref val) = self.instd_agt {
13789 let snap = violations.len();
13790 val.validate_constraints("", violations);
13791 if violations.len() > snap {
13792 let pfx = format!("{path}/InstdAgt");
13793 for v in &mut violations[snap..] {
13794 v.path.insert_str(0, &pfx);
13795 }
13796 }
13797 }
13798 if let Some(ref val) = self.orgnl_tx_ref {
13799 let snap = violations.len();
13800 val.validate_constraints("", violations);
13801 if violations.len() > snap {
13802 let pfx = format!("{path}/OrgnlTxRef");
13803 for v in &mut violations[snap..] {
13804 v.path.insert_str(0, &pfx);
13805 }
13806 }
13807 }
13808 for (idx, elem) in self.splmtry_data.iter().enumerate() {
13809 let snap = violations.len();
13810 elem.validate_constraints("", violations);
13811 if violations.len() > snap {
13812 let pfx = format!("{path}/SplmtryData[{idx}]");
13813 for v in &mut violations[snap..] {
13814 v.path.insert_str(0, &pfx);
13815 }
13816 }
13817 }
13818 }
13819}
13820impl crate::common::validate::Validatable for PaymentTypeInformation27 {
13821 fn validate_constraints(
13822 &self,
13823 path: &str,
13824 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13825 ) {
13826 if let Some(ref val) = self.instr_prty {
13827 let snap = violations.len();
13828 val.validate_constraints("", violations);
13829 if violations.len() > snap {
13830 let pfx = format!("{path}/InstrPrty");
13831 for v in &mut violations[snap..] {
13832 v.path.insert_str(0, &pfx);
13833 }
13834 }
13835 }
13836 if let Some(ref val) = self.clr_chanl {
13837 let snap = violations.len();
13838 val.validate_constraints("", violations);
13839 if violations.len() > snap {
13840 let pfx = format!("{path}/ClrChanl");
13841 for v in &mut violations[snap..] {
13842 v.path.insert_str(0, &pfx);
13843 }
13844 }
13845 }
13846 for (idx, elem) in self.svc_lvl.iter().enumerate() {
13847 let snap = violations.len();
13848 elem.inner.validate_constraints("", violations);
13849 if violations.len() > snap {
13850 let pfx = format!("{path}/SvcLvl[{idx}]");
13851 for v in &mut violations[snap..] {
13852 v.path.insert_str(0, &pfx);
13853 }
13854 }
13855 }
13856 if let Some(ref wrapper) = self.lcl_instrm {
13857 let snap = violations.len();
13858 wrapper.inner.validate_constraints("", violations);
13859 if violations.len() > snap {
13860 let pfx = format!("{path}/LclInstrm");
13861 for v in &mut violations[snap..] {
13862 v.path.insert_str(0, &pfx);
13863 }
13864 }
13865 }
13866 if let Some(ref val) = self.seq_tp {
13867 let snap = violations.len();
13868 val.validate_constraints("", violations);
13869 if violations.len() > snap {
13870 let pfx = format!("{path}/SeqTp");
13871 for v in &mut violations[snap..] {
13872 v.path.insert_str(0, &pfx);
13873 }
13874 }
13875 }
13876 if let Some(ref wrapper) = self.ctgy_purp {
13877 let snap = violations.len();
13878 wrapper.inner.validate_constraints("", violations);
13879 if violations.len() > snap {
13880 let pfx = format!("{path}/CtgyPurp");
13881 for v in &mut violations[snap..] {
13882 v.path.insert_str(0, &pfx);
13883 }
13884 }
13885 }
13886 }
13887}
13888impl crate::common::validate::Validatable for PersonIdentification13 {
13889 fn validate_constraints(
13890 &self,
13891 path: &str,
13892 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13893 ) {
13894 if let Some(ref val) = self.dt_and_plc_of_birth {
13895 let snap = violations.len();
13896 val.validate_constraints("", violations);
13897 if violations.len() > snap {
13898 let pfx = format!("{path}/DtAndPlcOfBirth");
13899 for v in &mut violations[snap..] {
13900 v.path.insert_str(0, &pfx);
13901 }
13902 }
13903 }
13904 for (idx, elem) in self.othr.iter().enumerate() {
13905 let snap = violations.len();
13906 elem.validate_constraints("", violations);
13907 if violations.len() > snap {
13908 let pfx = format!("{path}/Othr[{idx}]");
13909 for v in &mut violations[snap..] {
13910 v.path.insert_str(0, &pfx);
13911 }
13912 }
13913 }
13914 }
13915}
13916impl crate::common::validate::Validatable for PersonIdentificationSchemeName1Choice {
13917 fn validate_constraints(
13918 &self,
13919 path: &str,
13920 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13921 ) {
13922 match self {
13923 Self::Cd(inner) => {
13924 let snap = violations.len();
13925 inner.validate_constraints("", violations);
13926 if violations.len() > snap {
13927 let pfx = format!("{path}/Cd");
13928 for v in &mut violations[snap..] {
13929 v.path.insert_str(0, &pfx);
13930 }
13931 }
13932 }
13933 Self::Prtry(inner) => {
13934 let snap = violations.len();
13935 inner.validate_constraints("", violations);
13936 if violations.len() > snap {
13937 let pfx = format!("{path}/Prtry");
13938 for v in &mut violations[snap..] {
13939 v.path.insert_str(0, &pfx);
13940 }
13941 }
13942 }
13943 }
13944 }
13945}
13946impl crate::common::validate::Validatable for PostalAddress24 {
13947 fn validate_constraints(
13948 &self,
13949 path: &str,
13950 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
13951 ) {
13952 if let Some(ref wrapper) = self.adr_tp {
13953 let snap = violations.len();
13954 wrapper.inner.validate_constraints("", violations);
13955 if violations.len() > snap {
13956 let pfx = format!("{path}/AdrTp");
13957 for v in &mut violations[snap..] {
13958 v.path.insert_str(0, &pfx);
13959 }
13960 }
13961 }
13962 if let Some(ref val) = self.dept {
13963 let snap = violations.len();
13964 val.validate_constraints("", violations);
13965 if violations.len() > snap {
13966 let pfx = format!("{path}/Dept");
13967 for v in &mut violations[snap..] {
13968 v.path.insert_str(0, &pfx);
13969 }
13970 }
13971 }
13972 if let Some(ref val) = self.sub_dept {
13973 let snap = violations.len();
13974 val.validate_constraints("", violations);
13975 if violations.len() > snap {
13976 let pfx = format!("{path}/SubDept");
13977 for v in &mut violations[snap..] {
13978 v.path.insert_str(0, &pfx);
13979 }
13980 }
13981 }
13982 if let Some(ref val) = self.strt_nm {
13983 let snap = violations.len();
13984 val.validate_constraints("", violations);
13985 if violations.len() > snap {
13986 let pfx = format!("{path}/StrtNm");
13987 for v in &mut violations[snap..] {
13988 v.path.insert_str(0, &pfx);
13989 }
13990 }
13991 }
13992 if let Some(ref val) = self.bldg_nb {
13993 let snap = violations.len();
13994 val.validate_constraints("", violations);
13995 if violations.len() > snap {
13996 let pfx = format!("{path}/BldgNb");
13997 for v in &mut violations[snap..] {
13998 v.path.insert_str(0, &pfx);
13999 }
14000 }
14001 }
14002 if let Some(ref val) = self.bldg_nm {
14003 let snap = violations.len();
14004 val.validate_constraints("", violations);
14005 if violations.len() > snap {
14006 let pfx = format!("{path}/BldgNm");
14007 for v in &mut violations[snap..] {
14008 v.path.insert_str(0, &pfx);
14009 }
14010 }
14011 }
14012 if let Some(ref val) = self.flr {
14013 let snap = violations.len();
14014 val.validate_constraints("", violations);
14015 if violations.len() > snap {
14016 let pfx = format!("{path}/Flr");
14017 for v in &mut violations[snap..] {
14018 v.path.insert_str(0, &pfx);
14019 }
14020 }
14021 }
14022 if let Some(ref val) = self.pst_bx {
14023 let snap = violations.len();
14024 val.validate_constraints("", violations);
14025 if violations.len() > snap {
14026 let pfx = format!("{path}/PstBx");
14027 for v in &mut violations[snap..] {
14028 v.path.insert_str(0, &pfx);
14029 }
14030 }
14031 }
14032 if let Some(ref val) = self.room {
14033 let snap = violations.len();
14034 val.validate_constraints("", violations);
14035 if violations.len() > snap {
14036 let pfx = format!("{path}/Room");
14037 for v in &mut violations[snap..] {
14038 v.path.insert_str(0, &pfx);
14039 }
14040 }
14041 }
14042 if let Some(ref val) = self.pst_cd {
14043 let snap = violations.len();
14044 val.validate_constraints("", violations);
14045 if violations.len() > snap {
14046 let pfx = format!("{path}/PstCd");
14047 for v in &mut violations[snap..] {
14048 v.path.insert_str(0, &pfx);
14049 }
14050 }
14051 }
14052 if let Some(ref val) = self.twn_nm {
14053 let snap = violations.len();
14054 val.validate_constraints("", violations);
14055 if violations.len() > snap {
14056 let pfx = format!("{path}/TwnNm");
14057 for v in &mut violations[snap..] {
14058 v.path.insert_str(0, &pfx);
14059 }
14060 }
14061 }
14062 if let Some(ref val) = self.twn_lctn_nm {
14063 let snap = violations.len();
14064 val.validate_constraints("", violations);
14065 if violations.len() > snap {
14066 let pfx = format!("{path}/TwnLctnNm");
14067 for v in &mut violations[snap..] {
14068 v.path.insert_str(0, &pfx);
14069 }
14070 }
14071 }
14072 if let Some(ref val) = self.dstrct_nm {
14073 let snap = violations.len();
14074 val.validate_constraints("", violations);
14075 if violations.len() > snap {
14076 let pfx = format!("{path}/DstrctNm");
14077 for v in &mut violations[snap..] {
14078 v.path.insert_str(0, &pfx);
14079 }
14080 }
14081 }
14082 if let Some(ref val) = self.ctry_sub_dvsn {
14083 let snap = violations.len();
14084 val.validate_constraints("", violations);
14085 if violations.len() > snap {
14086 let pfx = format!("{path}/CtrySubDvsn");
14087 for v in &mut violations[snap..] {
14088 v.path.insert_str(0, &pfx);
14089 }
14090 }
14091 }
14092 if let Some(ref val) = self.ctry {
14093 let snap = violations.len();
14094 val.validate_constraints("", violations);
14095 if violations.len() > snap {
14096 let pfx = format!("{path}/Ctry");
14097 for v in &mut violations[snap..] {
14098 v.path.insert_str(0, &pfx);
14099 }
14100 }
14101 }
14102 for (idx, elem) in self.adr_line.iter().enumerate() {
14103 let snap = violations.len();
14104 elem.validate_constraints("", violations);
14105 if violations.len() > snap {
14106 let pfx = format!("{path}/AdrLine[{idx}]");
14107 for v in &mut violations[snap..] {
14108 v.path.insert_str(0, &pfx);
14109 }
14110 }
14111 }
14112 }
14113}
14114impl crate::common::validate::Validatable for ProxyAccountIdentification1 {
14115 fn validate_constraints(
14116 &self,
14117 path: &str,
14118 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14119 ) {
14120 if let Some(ref wrapper) = self.tp {
14121 let snap = violations.len();
14122 wrapper.inner.validate_constraints("", violations);
14123 if violations.len() > snap {
14124 let pfx = format!("{path}/Tp");
14125 for v in &mut violations[snap..] {
14126 v.path.insert_str(0, &pfx);
14127 }
14128 }
14129 }
14130 {
14131 let snap = violations.len();
14132 self.id.validate_constraints("", violations);
14133 if violations.len() > snap {
14134 let pfx = format!("{path}/Id");
14135 for v in &mut violations[snap..] {
14136 v.path.insert_str(0, &pfx);
14137 }
14138 }
14139 }
14140 }
14141}
14142impl crate::common::validate::Validatable for ProxyAccountType1Choice {
14143 fn validate_constraints(
14144 &self,
14145 path: &str,
14146 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14147 ) {
14148 match self {
14149 Self::Cd(inner) => {
14150 let snap = violations.len();
14151 inner.validate_constraints("", violations);
14152 if violations.len() > snap {
14153 let pfx = format!("{path}/Cd");
14154 for v in &mut violations[snap..] {
14155 v.path.insert_str(0, &pfx);
14156 }
14157 }
14158 }
14159 Self::Prtry(inner) => {
14160 let snap = violations.len();
14161 inner.validate_constraints("", violations);
14162 if violations.len() > snap {
14163 let pfx = format!("{path}/Prtry");
14164 for v in &mut violations[snap..] {
14165 v.path.insert_str(0, &pfx);
14166 }
14167 }
14168 }
14169 }
14170 }
14171}
14172impl crate::common::validate::Validatable for Purpose2Choice {
14173 fn validate_constraints(
14174 &self,
14175 path: &str,
14176 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14177 ) {
14178 match self {
14179 Self::Cd(inner) => {
14180 let snap = violations.len();
14181 inner.validate_constraints("", violations);
14182 if violations.len() > snap {
14183 let pfx = format!("{path}/Cd");
14184 for v in &mut violations[snap..] {
14185 v.path.insert_str(0, &pfx);
14186 }
14187 }
14188 }
14189 Self::Prtry(inner) => {
14190 let snap = violations.len();
14191 inner.validate_constraints("", violations);
14192 if violations.len() > snap {
14193 let pfx = format!("{path}/Prtry");
14194 for v in &mut violations[snap..] {
14195 v.path.insert_str(0, &pfx);
14196 }
14197 }
14198 }
14199 }
14200 }
14201}
14202impl crate::common::validate::Validatable for ReferredDocumentInformation7 {
14203 fn validate_constraints(
14204 &self,
14205 path: &str,
14206 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14207 ) {
14208 if let Some(ref val) = self.tp {
14209 let snap = violations.len();
14210 val.validate_constraints("", violations);
14211 if violations.len() > snap {
14212 let pfx = format!("{path}/Tp");
14213 for v in &mut violations[snap..] {
14214 v.path.insert_str(0, &pfx);
14215 }
14216 }
14217 }
14218 if let Some(ref val) = self.nb {
14219 let snap = violations.len();
14220 val.validate_constraints("", violations);
14221 if violations.len() > snap {
14222 let pfx = format!("{path}/Nb");
14223 for v in &mut violations[snap..] {
14224 v.path.insert_str(0, &pfx);
14225 }
14226 }
14227 }
14228 if let Some(ref val) = self.rltd_dt {
14229 let snap = violations.len();
14230 val.validate_constraints("", violations);
14231 if violations.len() > snap {
14232 let pfx = format!("{path}/RltdDt");
14233 for v in &mut violations[snap..] {
14234 v.path.insert_str(0, &pfx);
14235 }
14236 }
14237 }
14238 for (idx, elem) in self.line_dtls.iter().enumerate() {
14239 let snap = violations.len();
14240 elem.validate_constraints("", violations);
14241 if violations.len() > snap {
14242 let pfx = format!("{path}/LineDtls[{idx}]");
14243 for v in &mut violations[snap..] {
14244 v.path.insert_str(0, &pfx);
14245 }
14246 }
14247 }
14248 }
14249}
14250impl crate::common::validate::Validatable for ReferredDocumentType3Choice {
14251 fn validate_constraints(
14252 &self,
14253 path: &str,
14254 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14255 ) {
14256 match self {
14257 Self::Cd(inner) => {
14258 let snap = violations.len();
14259 inner.validate_constraints("", violations);
14260 if violations.len() > snap {
14261 let pfx = format!("{path}/Cd");
14262 for v in &mut violations[snap..] {
14263 v.path.insert_str(0, &pfx);
14264 }
14265 }
14266 }
14267 Self::Prtry(inner) => {
14268 let snap = violations.len();
14269 inner.validate_constraints("", violations);
14270 if violations.len() > snap {
14271 let pfx = format!("{path}/Prtry");
14272 for v in &mut violations[snap..] {
14273 v.path.insert_str(0, &pfx);
14274 }
14275 }
14276 }
14277 }
14278 }
14279}
14280impl crate::common::validate::Validatable for ReferredDocumentType4 {
14281 fn validate_constraints(
14282 &self,
14283 path: &str,
14284 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14285 ) {
14286 {
14287 let snap = violations.len();
14288 self.cd_or_prtry.inner.validate_constraints("", violations);
14289 if violations.len() > snap {
14290 let pfx = format!("{path}/CdOrPrtry");
14291 for v in &mut violations[snap..] {
14292 v.path.insert_str(0, &pfx);
14293 }
14294 }
14295 }
14296 if let Some(ref val) = self.issr {
14297 let snap = violations.len();
14298 val.validate_constraints("", violations);
14299 if violations.len() > snap {
14300 let pfx = format!("{path}/Issr");
14301 for v in &mut violations[snap..] {
14302 v.path.insert_str(0, &pfx);
14303 }
14304 }
14305 }
14306 }
14307}
14308impl crate::common::validate::Validatable for RemittanceAmount2 {
14309 fn validate_constraints(
14310 &self,
14311 path: &str,
14312 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14313 ) {
14314 if let Some(ref val) = self.due_pybl_amt {
14315 let snap = violations.len();
14316 val.validate_constraints("", violations);
14317 if violations.len() > snap {
14318 let pfx = format!("{path}/DuePyblAmt");
14319 for v in &mut violations[snap..] {
14320 v.path.insert_str(0, &pfx);
14321 }
14322 }
14323 }
14324 for (idx, elem) in self.dscnt_apld_amt.iter().enumerate() {
14325 let snap = violations.len();
14326 elem.validate_constraints("", violations);
14327 if violations.len() > snap {
14328 let pfx = format!("{path}/DscntApldAmt[{idx}]");
14329 for v in &mut violations[snap..] {
14330 v.path.insert_str(0, &pfx);
14331 }
14332 }
14333 }
14334 if let Some(ref val) = self.cdt_note_amt {
14335 let snap = violations.len();
14336 val.validate_constraints("", violations);
14337 if violations.len() > snap {
14338 let pfx = format!("{path}/CdtNoteAmt");
14339 for v in &mut violations[snap..] {
14340 v.path.insert_str(0, &pfx);
14341 }
14342 }
14343 }
14344 for (idx, elem) in self.tax_amt.iter().enumerate() {
14345 let snap = violations.len();
14346 elem.validate_constraints("", violations);
14347 if violations.len() > snap {
14348 let pfx = format!("{path}/TaxAmt[{idx}]");
14349 for v in &mut violations[snap..] {
14350 v.path.insert_str(0, &pfx);
14351 }
14352 }
14353 }
14354 for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
14355 let snap = violations.len();
14356 elem.validate_constraints("", violations);
14357 if violations.len() > snap {
14358 let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
14359 for v in &mut violations[snap..] {
14360 v.path.insert_str(0, &pfx);
14361 }
14362 }
14363 }
14364 if let Some(ref val) = self.rmtd_amt {
14365 let snap = violations.len();
14366 val.validate_constraints("", violations);
14367 if violations.len() > snap {
14368 let pfx = format!("{path}/RmtdAmt");
14369 for v in &mut violations[snap..] {
14370 v.path.insert_str(0, &pfx);
14371 }
14372 }
14373 }
14374 }
14375}
14376impl crate::common::validate::Validatable for RemittanceAmount3 {
14377 fn validate_constraints(
14378 &self,
14379 path: &str,
14380 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14381 ) {
14382 if let Some(ref val) = self.due_pybl_amt {
14383 let snap = violations.len();
14384 val.validate_constraints("", violations);
14385 if violations.len() > snap {
14386 let pfx = format!("{path}/DuePyblAmt");
14387 for v in &mut violations[snap..] {
14388 v.path.insert_str(0, &pfx);
14389 }
14390 }
14391 }
14392 for (idx, elem) in self.dscnt_apld_amt.iter().enumerate() {
14393 let snap = violations.len();
14394 elem.validate_constraints("", violations);
14395 if violations.len() > snap {
14396 let pfx = format!("{path}/DscntApldAmt[{idx}]");
14397 for v in &mut violations[snap..] {
14398 v.path.insert_str(0, &pfx);
14399 }
14400 }
14401 }
14402 if let Some(ref val) = self.cdt_note_amt {
14403 let snap = violations.len();
14404 val.validate_constraints("", violations);
14405 if violations.len() > snap {
14406 let pfx = format!("{path}/CdtNoteAmt");
14407 for v in &mut violations[snap..] {
14408 v.path.insert_str(0, &pfx);
14409 }
14410 }
14411 }
14412 for (idx, elem) in self.tax_amt.iter().enumerate() {
14413 let snap = violations.len();
14414 elem.validate_constraints("", violations);
14415 if violations.len() > snap {
14416 let pfx = format!("{path}/TaxAmt[{idx}]");
14417 for v in &mut violations[snap..] {
14418 v.path.insert_str(0, &pfx);
14419 }
14420 }
14421 }
14422 for (idx, elem) in self.adjstmnt_amt_and_rsn.iter().enumerate() {
14423 let snap = violations.len();
14424 elem.validate_constraints("", violations);
14425 if violations.len() > snap {
14426 let pfx = format!("{path}/AdjstmntAmtAndRsn[{idx}]");
14427 for v in &mut violations[snap..] {
14428 v.path.insert_str(0, &pfx);
14429 }
14430 }
14431 }
14432 if let Some(ref val) = self.rmtd_amt {
14433 let snap = violations.len();
14434 val.validate_constraints("", violations);
14435 if violations.len() > snap {
14436 let pfx = format!("{path}/RmtdAmt");
14437 for v in &mut violations[snap..] {
14438 v.path.insert_str(0, &pfx);
14439 }
14440 }
14441 }
14442 }
14443}
14444impl crate::common::validate::Validatable for RemittanceInformation21 {
14445 fn validate_constraints(
14446 &self,
14447 path: &str,
14448 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14449 ) {
14450 for (idx, elem) in self.ustrd.iter().enumerate() {
14451 let snap = violations.len();
14452 elem.validate_constraints("", violations);
14453 if violations.len() > snap {
14454 let pfx = format!("{path}/Ustrd[{idx}]");
14455 for v in &mut violations[snap..] {
14456 v.path.insert_str(0, &pfx);
14457 }
14458 }
14459 }
14460 for (idx, elem) in self.strd.iter().enumerate() {
14461 let snap = violations.len();
14462 elem.validate_constraints("", violations);
14463 if violations.len() > snap {
14464 let pfx = format!("{path}/Strd[{idx}]");
14465 for v in &mut violations[snap..] {
14466 v.path.insert_str(0, &pfx);
14467 }
14468 }
14469 }
14470 }
14471}
14472impl crate::common::validate::Validatable for ServiceLevel8Choice {
14473 fn validate_constraints(
14474 &self,
14475 path: &str,
14476 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14477 ) {
14478 match self {
14479 Self::Cd(inner) => {
14480 let snap = violations.len();
14481 inner.validate_constraints("", violations);
14482 if violations.len() > snap {
14483 let pfx = format!("{path}/Cd");
14484 for v in &mut violations[snap..] {
14485 v.path.insert_str(0, &pfx);
14486 }
14487 }
14488 }
14489 Self::Prtry(inner) => {
14490 let snap = violations.len();
14491 inner.validate_constraints("", violations);
14492 if violations.len() > snap {
14493 let pfx = format!("{path}/Prtry");
14494 for v in &mut violations[snap..] {
14495 v.path.insert_str(0, &pfx);
14496 }
14497 }
14498 }
14499 }
14500 }
14501}
14502impl crate::common::validate::Validatable for SettlementInstruction11 {
14503 fn validate_constraints(
14504 &self,
14505 path: &str,
14506 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14507 ) {
14508 {
14509 let snap = violations.len();
14510 self.sttlm_mtd.validate_constraints("", violations);
14511 if violations.len() > snap {
14512 let pfx = format!("{path}/SttlmMtd");
14513 for v in &mut violations[snap..] {
14514 v.path.insert_str(0, &pfx);
14515 }
14516 }
14517 }
14518 if let Some(ref val) = self.sttlm_acct {
14519 let snap = violations.len();
14520 val.validate_constraints("", violations);
14521 if violations.len() > snap {
14522 let pfx = format!("{path}/SttlmAcct");
14523 for v in &mut violations[snap..] {
14524 v.path.insert_str(0, &pfx);
14525 }
14526 }
14527 }
14528 if let Some(ref wrapper) = self.clr_sys {
14529 let snap = violations.len();
14530 wrapper.inner.validate_constraints("", violations);
14531 if violations.len() > snap {
14532 let pfx = format!("{path}/ClrSys");
14533 for v in &mut violations[snap..] {
14534 v.path.insert_str(0, &pfx);
14535 }
14536 }
14537 }
14538 if let Some(ref val) = self.instg_rmbrsmnt_agt {
14539 let snap = violations.len();
14540 val.validate_constraints("", violations);
14541 if violations.len() > snap {
14542 let pfx = format!("{path}/InstgRmbrsmntAgt");
14543 for v in &mut violations[snap..] {
14544 v.path.insert_str(0, &pfx);
14545 }
14546 }
14547 }
14548 if let Some(ref val) = self.instg_rmbrsmnt_agt_acct {
14549 let snap = violations.len();
14550 val.validate_constraints("", violations);
14551 if violations.len() > snap {
14552 let pfx = format!("{path}/InstgRmbrsmntAgtAcct");
14553 for v in &mut violations[snap..] {
14554 v.path.insert_str(0, &pfx);
14555 }
14556 }
14557 }
14558 if let Some(ref val) = self.instd_rmbrsmnt_agt {
14559 let snap = violations.len();
14560 val.validate_constraints("", violations);
14561 if violations.len() > snap {
14562 let pfx = format!("{path}/InstdRmbrsmntAgt");
14563 for v in &mut violations[snap..] {
14564 v.path.insert_str(0, &pfx);
14565 }
14566 }
14567 }
14568 if let Some(ref val) = self.instd_rmbrsmnt_agt_acct {
14569 let snap = violations.len();
14570 val.validate_constraints("", violations);
14571 if violations.len() > snap {
14572 let pfx = format!("{path}/InstdRmbrsmntAgtAcct");
14573 for v in &mut violations[snap..] {
14574 v.path.insert_str(0, &pfx);
14575 }
14576 }
14577 }
14578 if let Some(ref val) = self.thrd_rmbrsmnt_agt {
14579 let snap = violations.len();
14580 val.validate_constraints("", violations);
14581 if violations.len() > snap {
14582 let pfx = format!("{path}/ThrdRmbrsmntAgt");
14583 for v in &mut violations[snap..] {
14584 v.path.insert_str(0, &pfx);
14585 }
14586 }
14587 }
14588 if let Some(ref val) = self.thrd_rmbrsmnt_agt_acct {
14589 let snap = violations.len();
14590 val.validate_constraints("", violations);
14591 if violations.len() > snap {
14592 let pfx = format!("{path}/ThrdRmbrsmntAgtAcct");
14593 for v in &mut violations[snap..] {
14594 v.path.insert_str(0, &pfx);
14595 }
14596 }
14597 }
14598 }
14599}
14600impl crate::common::validate::Validatable for StructuredRemittanceInformation17 {
14601 fn validate_constraints(
14602 &self,
14603 path: &str,
14604 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14605 ) {
14606 for (idx, elem) in self.rfrd_doc_inf.iter().enumerate() {
14607 let snap = violations.len();
14608 elem.validate_constraints("", violations);
14609 if violations.len() > snap {
14610 let pfx = format!("{path}/RfrdDocInf[{idx}]");
14611 for v in &mut violations[snap..] {
14612 v.path.insert_str(0, &pfx);
14613 }
14614 }
14615 }
14616 if let Some(ref val) = self.rfrd_doc_amt {
14617 let snap = violations.len();
14618 val.validate_constraints("", violations);
14619 if violations.len() > snap {
14620 let pfx = format!("{path}/RfrdDocAmt");
14621 for v in &mut violations[snap..] {
14622 v.path.insert_str(0, &pfx);
14623 }
14624 }
14625 }
14626 if let Some(ref val) = self.cdtr_ref_inf {
14627 let snap = violations.len();
14628 val.validate_constraints("", violations);
14629 if violations.len() > snap {
14630 let pfx = format!("{path}/CdtrRefInf");
14631 for v in &mut violations[snap..] {
14632 v.path.insert_str(0, &pfx);
14633 }
14634 }
14635 }
14636 if let Some(ref val) = self.invcr {
14637 let snap = violations.len();
14638 val.validate_constraints("", violations);
14639 if violations.len() > snap {
14640 let pfx = format!("{path}/Invcr");
14641 for v in &mut violations[snap..] {
14642 v.path.insert_str(0, &pfx);
14643 }
14644 }
14645 }
14646 if let Some(ref val) = self.invcee {
14647 let snap = violations.len();
14648 val.validate_constraints("", violations);
14649 if violations.len() > snap {
14650 let pfx = format!("{path}/Invcee");
14651 for v in &mut violations[snap..] {
14652 v.path.insert_str(0, &pfx);
14653 }
14654 }
14655 }
14656 if let Some(ref val) = self.tax_rmt {
14657 let snap = violations.len();
14658 val.validate_constraints("", violations);
14659 if violations.len() > snap {
14660 let pfx = format!("{path}/TaxRmt");
14661 for v in &mut violations[snap..] {
14662 v.path.insert_str(0, &pfx);
14663 }
14664 }
14665 }
14666 if let Some(ref val) = self.grnshmt_rmt {
14667 let snap = violations.len();
14668 val.validate_constraints("", violations);
14669 if violations.len() > snap {
14670 let pfx = format!("{path}/GrnshmtRmt");
14671 for v in &mut violations[snap..] {
14672 v.path.insert_str(0, &pfx);
14673 }
14674 }
14675 }
14676 for (idx, elem) in self.addtl_rmt_inf.iter().enumerate() {
14677 let snap = violations.len();
14678 elem.validate_constraints("", violations);
14679 if violations.len() > snap {
14680 let pfx = format!("{path}/AddtlRmtInf[{idx}]");
14681 for v in &mut violations[snap..] {
14682 v.path.insert_str(0, &pfx);
14683 }
14684 }
14685 }
14686 }
14687}
14688impl crate::common::validate::Validatable for SupplementaryData1 {
14689 fn validate_constraints(
14690 &self,
14691 path: &str,
14692 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14693 ) {
14694 if let Some(ref val) = self.plc_and_nm {
14695 let snap = violations.len();
14696 val.validate_constraints("", violations);
14697 if violations.len() > snap {
14698 let pfx = format!("{path}/PlcAndNm");
14699 for v in &mut violations[snap..] {
14700 v.path.insert_str(0, &pfx);
14701 }
14702 }
14703 }
14704 {
14705 let snap = violations.len();
14706 self.envlp.validate_constraints("", violations);
14707 if violations.len() > snap {
14708 let pfx = format!("{path}/Envlp");
14709 for v in &mut violations[snap..] {
14710 v.path.insert_str(0, &pfx);
14711 }
14712 }
14713 }
14714 }
14715}
14716impl crate::common::validate::Validatable for SupplementaryDataEnvelope1 {
14717 fn validate_constraints(
14718 &self,
14719 _path: &str,
14720 _violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14721 ) {
14722 }
14723}
14724impl crate::common::validate::Validatable for TaxAmount3 {
14725 fn validate_constraints(
14726 &self,
14727 path: &str,
14728 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14729 ) {
14730 if let Some(ref val) = self.rate {
14731 let snap = violations.len();
14732 val.validate_constraints("", violations);
14733 if violations.len() > snap {
14734 let pfx = format!("{path}/Rate");
14735 for v in &mut violations[snap..] {
14736 v.path.insert_str(0, &pfx);
14737 }
14738 }
14739 }
14740 if let Some(ref val) = self.taxbl_base_amt {
14741 let snap = violations.len();
14742 val.validate_constraints("", violations);
14743 if violations.len() > snap {
14744 let pfx = format!("{path}/TaxblBaseAmt");
14745 for v in &mut violations[snap..] {
14746 v.path.insert_str(0, &pfx);
14747 }
14748 }
14749 }
14750 if let Some(ref val) = self.ttl_amt {
14751 let snap = violations.len();
14752 val.validate_constraints("", violations);
14753 if violations.len() > snap {
14754 let pfx = format!("{path}/TtlAmt");
14755 for v in &mut violations[snap..] {
14756 v.path.insert_str(0, &pfx);
14757 }
14758 }
14759 }
14760 for (idx, elem) in self.dtls.iter().enumerate() {
14761 let snap = violations.len();
14762 elem.validate_constraints("", violations);
14763 if violations.len() > snap {
14764 let pfx = format!("{path}/Dtls[{idx}]");
14765 for v in &mut violations[snap..] {
14766 v.path.insert_str(0, &pfx);
14767 }
14768 }
14769 }
14770 }
14771}
14772impl crate::common::validate::Validatable for TaxAmountAndType1 {
14773 fn validate_constraints(
14774 &self,
14775 path: &str,
14776 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14777 ) {
14778 if let Some(ref wrapper) = self.tp {
14779 let snap = violations.len();
14780 wrapper.inner.validate_constraints("", violations);
14781 if violations.len() > snap {
14782 let pfx = format!("{path}/Tp");
14783 for v in &mut violations[snap..] {
14784 v.path.insert_str(0, &pfx);
14785 }
14786 }
14787 }
14788 {
14789 let snap = violations.len();
14790 self.amt.validate_constraints("", violations);
14791 if violations.len() > snap {
14792 let pfx = format!("{path}/Amt");
14793 for v in &mut violations[snap..] {
14794 v.path.insert_str(0, &pfx);
14795 }
14796 }
14797 }
14798 }
14799}
14800impl crate::common::validate::Validatable for TaxAmountType1Choice {
14801 fn validate_constraints(
14802 &self,
14803 path: &str,
14804 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14805 ) {
14806 match self {
14807 Self::Cd(inner) => {
14808 let snap = violations.len();
14809 inner.validate_constraints("", violations);
14810 if violations.len() > snap {
14811 let pfx = format!("{path}/Cd");
14812 for v in &mut violations[snap..] {
14813 v.path.insert_str(0, &pfx);
14814 }
14815 }
14816 }
14817 Self::Prtry(inner) => {
14818 let snap = violations.len();
14819 inner.validate_constraints("", violations);
14820 if violations.len() > snap {
14821 let pfx = format!("{path}/Prtry");
14822 for v in &mut violations[snap..] {
14823 v.path.insert_str(0, &pfx);
14824 }
14825 }
14826 }
14827 }
14828 }
14829}
14830impl crate::common::validate::Validatable for TaxAuthorisation1 {
14831 fn validate_constraints(
14832 &self,
14833 path: &str,
14834 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14835 ) {
14836 if let Some(ref val) = self.titl {
14837 let snap = violations.len();
14838 val.validate_constraints("", violations);
14839 if violations.len() > snap {
14840 let pfx = format!("{path}/Titl");
14841 for v in &mut violations[snap..] {
14842 v.path.insert_str(0, &pfx);
14843 }
14844 }
14845 }
14846 if let Some(ref val) = self.nm {
14847 let snap = violations.len();
14848 val.validate_constraints("", violations);
14849 if violations.len() > snap {
14850 let pfx = format!("{path}/Nm");
14851 for v in &mut violations[snap..] {
14852 v.path.insert_str(0, &pfx);
14853 }
14854 }
14855 }
14856 }
14857}
14858impl crate::common::validate::Validatable for TaxData1 {
14859 fn validate_constraints(
14860 &self,
14861 path: &str,
14862 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14863 ) {
14864 if let Some(ref val) = self.cdtr {
14865 let snap = violations.len();
14866 val.validate_constraints("", violations);
14867 if violations.len() > snap {
14868 let pfx = format!("{path}/Cdtr");
14869 for v in &mut violations[snap..] {
14870 v.path.insert_str(0, &pfx);
14871 }
14872 }
14873 }
14874 if let Some(ref val) = self.dbtr {
14875 let snap = violations.len();
14876 val.validate_constraints("", violations);
14877 if violations.len() > snap {
14878 let pfx = format!("{path}/Dbtr");
14879 for v in &mut violations[snap..] {
14880 v.path.insert_str(0, &pfx);
14881 }
14882 }
14883 }
14884 if let Some(ref val) = self.ultmt_dbtr {
14885 let snap = violations.len();
14886 val.validate_constraints("", violations);
14887 if violations.len() > snap {
14888 let pfx = format!("{path}/UltmtDbtr");
14889 for v in &mut violations[snap..] {
14890 v.path.insert_str(0, &pfx);
14891 }
14892 }
14893 }
14894 if let Some(ref val) = self.admstn_zone {
14895 let snap = violations.len();
14896 val.validate_constraints("", violations);
14897 if violations.len() > snap {
14898 let pfx = format!("{path}/AdmstnZone");
14899 for v in &mut violations[snap..] {
14900 v.path.insert_str(0, &pfx);
14901 }
14902 }
14903 }
14904 if let Some(ref val) = self.ref_nb {
14905 let snap = violations.len();
14906 val.validate_constraints("", violations);
14907 if violations.len() > snap {
14908 let pfx = format!("{path}/RefNb");
14909 for v in &mut violations[snap..] {
14910 v.path.insert_str(0, &pfx);
14911 }
14912 }
14913 }
14914 if let Some(ref val) = self.mtd {
14915 let snap = violations.len();
14916 val.validate_constraints("", violations);
14917 if violations.len() > snap {
14918 let pfx = format!("{path}/Mtd");
14919 for v in &mut violations[snap..] {
14920 v.path.insert_str(0, &pfx);
14921 }
14922 }
14923 }
14924 if let Some(ref val) = self.ttl_taxbl_base_amt {
14925 let snap = violations.len();
14926 val.validate_constraints("", violations);
14927 if violations.len() > snap {
14928 let pfx = format!("{path}/TtlTaxblBaseAmt");
14929 for v in &mut violations[snap..] {
14930 v.path.insert_str(0, &pfx);
14931 }
14932 }
14933 }
14934 if let Some(ref val) = self.ttl_tax_amt {
14935 let snap = violations.len();
14936 val.validate_constraints("", violations);
14937 if violations.len() > snap {
14938 let pfx = format!("{path}/TtlTaxAmt");
14939 for v in &mut violations[snap..] {
14940 v.path.insert_str(0, &pfx);
14941 }
14942 }
14943 }
14944 if let Some(ref val) = self.dt {
14945 let snap = violations.len();
14946 val.validate_constraints("", violations);
14947 if violations.len() > snap {
14948 let pfx = format!("{path}/Dt");
14949 for v in &mut violations[snap..] {
14950 v.path.insert_str(0, &pfx);
14951 }
14952 }
14953 }
14954 if let Some(ref val) = self.seq_nb {
14955 let snap = violations.len();
14956 val.validate_constraints("", violations);
14957 if violations.len() > snap {
14958 let pfx = format!("{path}/SeqNb");
14959 for v in &mut violations[snap..] {
14960 v.path.insert_str(0, &pfx);
14961 }
14962 }
14963 }
14964 for (idx, elem) in self.rcrd.iter().enumerate() {
14965 let snap = violations.len();
14966 elem.validate_constraints("", violations);
14967 if violations.len() > snap {
14968 let pfx = format!("{path}/Rcrd[{idx}]");
14969 for v in &mut violations[snap..] {
14970 v.path.insert_str(0, &pfx);
14971 }
14972 }
14973 }
14974 }
14975}
14976impl crate::common::validate::Validatable for TaxParty1 {
14977 fn validate_constraints(
14978 &self,
14979 path: &str,
14980 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
14981 ) {
14982 if let Some(ref val) = self.tax_id {
14983 let snap = violations.len();
14984 val.validate_constraints("", violations);
14985 if violations.len() > snap {
14986 let pfx = format!("{path}/TaxId");
14987 for v in &mut violations[snap..] {
14988 v.path.insert_str(0, &pfx);
14989 }
14990 }
14991 }
14992 if let Some(ref val) = self.regn_id {
14993 let snap = violations.len();
14994 val.validate_constraints("", violations);
14995 if violations.len() > snap {
14996 let pfx = format!("{path}/RegnId");
14997 for v in &mut violations[snap..] {
14998 v.path.insert_str(0, &pfx);
14999 }
15000 }
15001 }
15002 if let Some(ref val) = self.tax_tp {
15003 let snap = violations.len();
15004 val.validate_constraints("", violations);
15005 if violations.len() > snap {
15006 let pfx = format!("{path}/TaxTp");
15007 for v in &mut violations[snap..] {
15008 v.path.insert_str(0, &pfx);
15009 }
15010 }
15011 }
15012 }
15013}
15014impl crate::common::validate::Validatable for TaxParty2 {
15015 fn validate_constraints(
15016 &self,
15017 path: &str,
15018 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15019 ) {
15020 if let Some(ref val) = self.tax_id {
15021 let snap = violations.len();
15022 val.validate_constraints("", violations);
15023 if violations.len() > snap {
15024 let pfx = format!("{path}/TaxId");
15025 for v in &mut violations[snap..] {
15026 v.path.insert_str(0, &pfx);
15027 }
15028 }
15029 }
15030 if let Some(ref val) = self.regn_id {
15031 let snap = violations.len();
15032 val.validate_constraints("", violations);
15033 if violations.len() > snap {
15034 let pfx = format!("{path}/RegnId");
15035 for v in &mut violations[snap..] {
15036 v.path.insert_str(0, &pfx);
15037 }
15038 }
15039 }
15040 if let Some(ref val) = self.tax_tp {
15041 let snap = violations.len();
15042 val.validate_constraints("", violations);
15043 if violations.len() > snap {
15044 let pfx = format!("{path}/TaxTp");
15045 for v in &mut violations[snap..] {
15046 v.path.insert_str(0, &pfx);
15047 }
15048 }
15049 }
15050 if let Some(ref val) = self.authstn {
15051 let snap = violations.len();
15052 val.validate_constraints("", violations);
15053 if violations.len() > snap {
15054 let pfx = format!("{path}/Authstn");
15055 for v in &mut violations[snap..] {
15056 v.path.insert_str(0, &pfx);
15057 }
15058 }
15059 }
15060 }
15061}
15062impl crate::common::validate::Validatable for TaxPeriod3 {
15063 fn validate_constraints(
15064 &self,
15065 path: &str,
15066 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15067 ) {
15068 if let Some(ref val) = self.yr {
15069 let snap = violations.len();
15070 val.validate_constraints("", violations);
15071 if violations.len() > snap {
15072 let pfx = format!("{path}/Yr");
15073 for v in &mut violations[snap..] {
15074 v.path.insert_str(0, &pfx);
15075 }
15076 }
15077 }
15078 if let Some(ref val) = self.tp {
15079 let snap = violations.len();
15080 val.validate_constraints("", violations);
15081 if violations.len() > snap {
15082 let pfx = format!("{path}/Tp");
15083 for v in &mut violations[snap..] {
15084 v.path.insert_str(0, &pfx);
15085 }
15086 }
15087 }
15088 if let Some(ref val) = self.fr_to_dt {
15089 let snap = violations.len();
15090 val.validate_constraints("", violations);
15091 if violations.len() > snap {
15092 let pfx = format!("{path}/FrToDt");
15093 for v in &mut violations[snap..] {
15094 v.path.insert_str(0, &pfx);
15095 }
15096 }
15097 }
15098 }
15099}
15100impl crate::common::validate::Validatable for TaxRecord3 {
15101 fn validate_constraints(
15102 &self,
15103 path: &str,
15104 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15105 ) {
15106 if let Some(ref val) = self.tp {
15107 let snap = violations.len();
15108 val.validate_constraints("", violations);
15109 if violations.len() > snap {
15110 let pfx = format!("{path}/Tp");
15111 for v in &mut violations[snap..] {
15112 v.path.insert_str(0, &pfx);
15113 }
15114 }
15115 }
15116 if let Some(ref val) = self.ctgy {
15117 let snap = violations.len();
15118 val.validate_constraints("", violations);
15119 if violations.len() > snap {
15120 let pfx = format!("{path}/Ctgy");
15121 for v in &mut violations[snap..] {
15122 v.path.insert_str(0, &pfx);
15123 }
15124 }
15125 }
15126 if let Some(ref val) = self.ctgy_dtls {
15127 let snap = violations.len();
15128 val.validate_constraints("", violations);
15129 if violations.len() > snap {
15130 let pfx = format!("{path}/CtgyDtls");
15131 for v in &mut violations[snap..] {
15132 v.path.insert_str(0, &pfx);
15133 }
15134 }
15135 }
15136 if let Some(ref val) = self.dbtr_sts {
15137 let snap = violations.len();
15138 val.validate_constraints("", violations);
15139 if violations.len() > snap {
15140 let pfx = format!("{path}/DbtrSts");
15141 for v in &mut violations[snap..] {
15142 v.path.insert_str(0, &pfx);
15143 }
15144 }
15145 }
15146 if let Some(ref val) = self.cert_id {
15147 let snap = violations.len();
15148 val.validate_constraints("", violations);
15149 if violations.len() > snap {
15150 let pfx = format!("{path}/CertId");
15151 for v in &mut violations[snap..] {
15152 v.path.insert_str(0, &pfx);
15153 }
15154 }
15155 }
15156 if let Some(ref val) = self.frms_cd {
15157 let snap = violations.len();
15158 val.validate_constraints("", violations);
15159 if violations.len() > snap {
15160 let pfx = format!("{path}/FrmsCd");
15161 for v in &mut violations[snap..] {
15162 v.path.insert_str(0, &pfx);
15163 }
15164 }
15165 }
15166 if let Some(ref val) = self.prd {
15167 let snap = violations.len();
15168 val.validate_constraints("", violations);
15169 if violations.len() > snap {
15170 let pfx = format!("{path}/Prd");
15171 for v in &mut violations[snap..] {
15172 v.path.insert_str(0, &pfx);
15173 }
15174 }
15175 }
15176 if let Some(ref val) = self.tax_amt {
15177 let snap = violations.len();
15178 val.validate_constraints("", violations);
15179 if violations.len() > snap {
15180 let pfx = format!("{path}/TaxAmt");
15181 for v in &mut violations[snap..] {
15182 v.path.insert_str(0, &pfx);
15183 }
15184 }
15185 }
15186 if let Some(ref val) = self.addtl_inf {
15187 let snap = violations.len();
15188 val.validate_constraints("", violations);
15189 if violations.len() > snap {
15190 let pfx = format!("{path}/AddtlInf");
15191 for v in &mut violations[snap..] {
15192 v.path.insert_str(0, &pfx);
15193 }
15194 }
15195 }
15196 }
15197}
15198impl crate::common::validate::Validatable for TaxRecordDetails3 {
15199 fn validate_constraints(
15200 &self,
15201 path: &str,
15202 violations: &mut Vec<crate::common::validate::ConstraintViolation>,
15203 ) {
15204 if let Some(ref val) = self.prd {
15205 let snap = violations.len();
15206 val.validate_constraints("", violations);
15207 if violations.len() > snap {
15208 let pfx = format!("{path}/Prd");
15209 for v in &mut violations[snap..] {
15210 v.path.insert_str(0, &pfx);
15211 }
15212 }
15213 }
15214 {
15215 let snap = violations.len();
15216 self.amt.validate_constraints("", violations);
15217 if violations.len() > snap {
15218 let pfx = format!("{path}/Amt");
15219 for v in &mut violations[snap..] {
15220 v.path.insert_str(0, &pfx);
15221 }
15222 }
15223 }
15224 }
15225}
15226impl crate::common::validate::IsoMessage for Document {
15227 fn message_type(&self) -> &'static str {
15228 "pacs.028.001.05"
15229 }
15230 fn root_path(&self) -> &'static str {
15231 "/Document"
15232 }
15233}